/* Bharat travel guide — a deliberately different visual language from the
   case-portal family's tri-colour "dispute tracker" theme. Warm, editorial,
   travel-brand feel: off-white ground, saffron/terracotta accent, deep
   ink text, generous whitespace, card-based layout. */

:root {
  --bg: #fbf7f1;
  --surface: #ffffff;
  --ink: #24211d;
  --ink-muted: #6b6459;
  --border: #e8e0d3;
  --accent: #ff9933;
  --accent-dark: #a35b17; /* Task 16f: was #b3651a (4.1:1 on --bg); now 4.84:1 on --bg, 5.16:1 on white, 4.51:1 on --accent-soft */
  --accent-soft: #ffedd6;
  --callout-bg: #fff4e0;
  --callout-border: #e8bf82;
  --flag-saffron: #ff9933;
  --flag-green: #138808;
  --flag-green-soft: #e3f3e0;
  --flag-green-dark: #0c5c05;
  --flag-navy: #0b1f66;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(36, 33, 29, 0.06), 0 4px 16px rgba(36, 33, 29, 0.05);
  --shadow-glossy: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 1px 2px rgba(36, 33, 29, 0.08),
    0 6px 20px rgba(36, 33, 29, 0.08);
}

/* The flag bar, now a genuine ribbon rather than a flat 3-band strip —
   a soft sheen sweeps across each band (a lighter diagonal highlight),
   giving it the "glossy" quality requested without turning it into a
   literal shiny plastic flag. Bookends the page: header above, footer
   below (see footer.ejs). */
.tricolour-bar {
  height: 6px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 35%),
    linear-gradient(
      to right,
      var(--flag-saffron) 0%,
      var(--flag-saffron) 33.33%,
      #ffffff 33.33%,
      #ffffff 66.66%,
      var(--flag-green) 66.66%,
      var(--flag-green) 100%
    );
  box-shadow: 0 1px 3px rgba(36, 33, 29, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--flag-navy);
  letter-spacing: -0.01em;
}
.brand span {
  color: var(--accent);
}
.brand-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted, #6b7280) !important;
  margin-top: -2px;
}
.brand:hover {
  text-decoration: none;
}
.nav {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 0.95rem;
}
.nav a {
  color: var(--ink-muted);
}
.nav a:hover {
  color: var(--accent-dark);
}
.nav form {
  display: inline;
}
.nav button.link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink-muted);
  cursor: pointer;
}
.nav button.link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}
.nav-search {
  display: inline-flex !important;
}
.nav-search input[type="search"] {
  width: 180px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--ink);
}
.nav-search input[type="search"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: var(--surface);
}

/* Category filter chips (search page) - reuses .tag's own look, plus an
   active/selected state so the current filter is visually obvious. */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 24px;
}
.category-filter .tag {
  cursor: pointer;
}
.tag-active {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  text-align: center;
  background: radial-gradient(
      ellipse 70% 100% at 50% 0%,
      rgba(255, 153, 51, 0.08) 0%,
      rgba(255, 153, 51, 0) 60%
    ),
    radial-gradient(ellipse 60% 80% at 85% 30%, rgba(19, 136, 8, 0.05) 0%, rgba(19, 136, 8, 0) 60%);
}
.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}
.hero-subtitle {
  font-size: 0.95rem !important;
  font-style: italic;
  margin-bottom: 12px !important;
}
.hero .stat {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 3px rgba(36, 33, 29, 0.08);
  border: 1px solid var(--callout-border);
}

/* Grid + cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin: 24px 0 48px;
}
.card {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 12%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 2px 4px rgba(36, 33, 29, 0.08),
    0 8px 24px rgba(36, 33, 29, 0.08);
  text-decoration: none;
}
a.card {
  display: block;
  color: inherit;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.card .meta {
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.card .count {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
}

/* Photo-forward card variant — used once every site had a real, sourced
   image (2026-09-09), for the discovery grids (homepage states, state
   site-listings, "more sites" related cards). Overrides .card's own
   padding with a full-bleed image on top + a padded text block below,
   the standard pattern on travel/discovery platforms (TripAdvisor,
   Airbnb, Lonely Planet) rather than a plain text list. */
.card.card-thumb {
  padding: 0;
  overflow: hidden;
}
.card-thumb-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--accent-soft);
}
.card-thumb-body {
  padding: 14px 18px 16px;
}
.card-thumb-body h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

/* Page header (state / site detail) */
.page-head {
  padding: 36px 0 12px;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.page-head h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}
.page-head .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
/* Deliberately a different colour family from the normal .tag (which
   uses the site's own orange accent) - a tentative-list property must
   never be visually confusable with a confirmed UNESCO site at a
   glance. Reuses the same amber/caution tone as .gate-banner, since
   both are "this isn't the confirmed/final thing" signals. */
.tag-tentative {
  background: var(--callout-bg);
  color: #6b4a12;
  border: 1px solid var(--callout-border);
}
.card .tag-tentative {
  margin-bottom: 8px;
}
/* Only ever rendered for the logged-in admin (a non-admin 404s before
   reaching a draft page at all) - a clear, impossible-to-miss red so it
   never reads as just another neutral tag while previewing unreleased
   content. */
.tag-draft {
  background: #fbe2da;
  color: #9c3626;
  border: 1px solid #f3b7b0;
  font-weight: 700;
}
/* Same amber signal as .tag-tentative, but as plain coloured text for
   the discovery-grid .count line (a pill badge would be too heavy
   repeated across every state card) - used when a state has 0 confirmed
   sites but real Watchlist entries. */
.count.tag-tentative-inline {
  color: #8a6314;
  font-weight: 700;
}

/* Content body (rendered markdown) */
.content-body {
  max-width: 760px;
  margin: 24px 0 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 36px 36px;
  box-shadow: var(--shadow);
}
.content-body h2 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.content-body h2:first-of-type {
  border-top: none;
  margin-top: 24px;
}
.content-body p,
.content-body ul,
.content-body ol {
  color: #3a352d;
}
.content-body strong {
  color: var(--ink);
}
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.92rem;
}
.content-body th,
.content-body td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.content-body th {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.content-body em {
  color: var(--ink-muted);
}

/* Login */
.auth-wrap {
  max-width: 380px;
  margin: 80px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.auth-wrap h1 {
  font-size: 1.4rem;
  margin: 0 0 20px;
  text-align: center;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.field textarea {
  resize: vertical;
  min-height: 120px;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field-hint {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 4px;
}
.form-success {
  background: var(--flag-green-soft);
  color: var(--flag-green-dark);
  border: 1px solid var(--flag-green);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-weight: 600;
}
/* Honeypot field - present in the DOM (so basic bots fill it) but
   invisible and unreachable to real visitors, including keyboard/screen-
   reader users (unlike display:none, which some bots skip). */
.field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Star rating widget - a row of clickable stars submitting a real POST,
   not just decorative. Buttons are in reverse order in the markup
   (star 5 first, star 1 last) with row-reverse here to display them
   correctly left-to-right - the standard pure-CSS trick for "hovering
   star N highlights stars 1..N", since :hover ~ sibling only selects
   LATER siblings in DOM order. */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
  margin: 10px 0;
}
.star-rating button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 2px;
  color: var(--border);
  transition: color 0.1s ease, transform 0.1s ease;
}
.star-rating button:hover,
.star-rating button:hover ~ button {
  color: var(--callout-border);
  transform: scale(1.15);
}
.rating-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--ink-muted);
}
.rating-summary strong {
  color: var(--ink);
  font-size: 1.1rem;
}
.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.password-toggle:hover {
  color: var(--ink);
}
.field-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink-muted);
  cursor: pointer;
}
.field-checkbox input {
  width: auto;
  margin: 0;
}
button.btn,
a.btn {
  display: inline-block;
  width: 100%;
  padding: 11px 16px;
  background: linear-gradient(180deg, #ffb366 0%, var(--accent) 55%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-glossy);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
button.btn:hover,
a.btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 10px 24px rgba(179, 101, 26, 0.22);
  text-decoration: none;
}
button.btn:active,
a.btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
/* A secondary, green-flag-toned button variant — for actions that read
   as "confirm/verify/positive" rather than the primary saffron CTA
   (e.g. a feedback form's submit, a "mark verified" state). */
button.btn-green,
a.btn-green {
  background: linear-gradient(180deg, #4caf3d 0%, var(--flag-green) 55%, var(--flag-green-dark) 100%);
}
button.btn-green:hover,
a.btn-green:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 10px 24px rgba(12, 92, 5, 0.22);
}
.form-error {
  background: #fdeceb;
  border: 1px solid #f3b7b0;
  color: #9c3626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--ink-muted);
  font-size: 0.85rem;
  text-align: center;
}
/* Pulls the ribbon flush against the footer's top border rather than
   sitting inset by the footer's own padding — a visual bookend with
   the header's identical bar. */
.site-footer .tricolour-bar {
  margin: -28px 0 20px;
}
.site-footer p {
  margin: 8px 0;
}
.footer-progress {
  font-style: italic;
  opacity: 1; /* Task 16f: was 0.85 (3.97:1) */
}
.footer-copyright {
  font-size: 0.78rem;
  opacity: 1; /* Task 16f: was 0.7 (2.96:1; its link 2.83:1) */
}

/* Gate notice banner shown during the private/gated development phase */
.gate-banner {
  background: var(--callout-bg);
  border-bottom: 1px solid var(--callout-border);
  color: #6b4a12;
  text-align: center;
  font-size: 0.85rem;
  padding: 8px 16px;
}

.empty-state {
  color: var(--ink-muted);
  padding: 40px 0;
  text-align: center;
}

/* Shown on a state page with zero confirmed sites but real Watchlist
   entries - same amber/caution tone as .tag-tentative/.gate-banner, so
   it reads as "not the confirmed thing" at a glance. */
.notice-card {
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0 40px;
  color: var(--ink);
}
.notice-card ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

/* Map */
.map-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 20px 0;
}
.india-map {
  width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
}
.india-outline {
  fill: var(--accent-soft);
  stroke: var(--accent-dark);
  stroke-width: 2;
  stroke-linejoin: round;
}
.map-dot {
  fill: var(--flag-navy);
  stroke: #ffffff;
  stroke-width: 1.5;
  transition: r 0.12s ease, fill 0.12s ease;
}
.map-dot-link:hover .map-dot,
.map-dot-link:focus .map-dot {
  fill: var(--flag-saffron);
  r: 7;
}
.map-dot-link {
  cursor: pointer;
}
/* Applied by public/js/map-highlight.js when arriving via a
   #dot-<state>-<slug> link from a site page's Quick Facts panel. */
.map-dot-highlighted {
  fill: var(--flag-saffron);
  r: 8;
  stroke-width: 2.5;
  animation: map-dot-pulse 1.4s ease-in-out 2;
}
@keyframes map-dot-pulse {
  0%, 100% { r: 8; }
  50% { r: 11; }
}
/* Tentative List markers (watchlist items with a plotted mapX/mapY).
   Round 1 was a diamond that "looked odd"; round 2 was a same-shape
   amber circle that then blended into the map's own cream/tan land
   fill (--bg: #fbf7f1) - too subtle to actually read as different at a
   glance, which defeats the point. Back to a diamond (deliberately
   different shape from .map-dot's circle - never confusable with a
   confirmed site), now in a strong violet that has no collision with
   any other colour already in use here: not --flag-navy (confirmed
   dots), not --accent/--flag-saffron (the confirmed-dot hover colour -
   reusing that for tentative's resting state would make a hovered
   confirmed dot look like a tentative one). See the on-page legend in
   map.ejs for the explanation shown to visitors. */
.map-dot-tentative {
  fill: #7c3aed;
  stroke: #4c1d95;
  stroke-width: 1.5;
  stroke-dasharray: 2 1.5;
  transform-box: fill-box;
  transform-origin: center;
  /* Rotation lives in this CSS transform, not an SVG `transform`
     attribute on the <rect> - a CSS transform overrides the attribute
     entirely (SVG2/CSS Transforms spec), so the hover rule's own
     transform below would silently drop the rotation if it were set
     via the attribute instead. */
  transform: rotate(45deg);
  transition: transform 0.12s ease, fill 0.12s ease;
}
.map-dot-tentative-link:hover .map-dot-tentative,
.map-dot-tentative-link:focus .map-dot-tentative {
  fill: #4c1d95;
  transform: rotate(45deg) scale(1.35);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.map-legend-swatch.confirmed {
  border-radius: 50%;
  background: var(--flag-navy);
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px var(--flag-navy);
}
.map-legend-swatch.tentative {
  background: #7c3aed;
  border: 1.5px solid #4c1d95;
  transform: rotate(45deg);
}
.map-note {
  max-width: 760px;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 16px 0 40px;
}
.map-list-heading {
  font-size: 1.1rem;
  margin: 8px 0 4px;
}
.related-heading {
  font-size: 1.2rem;
  margin: 8px 0 0;
}

/* Site hero image */
.hero-image {
  max-width: 760px;
  margin: 20px 0 0;
}
.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}
.hero-image figcaption {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 6px;
}
.hero-image figcaption a {
  color: var(--ink-muted);
  text-decoration: underline;
}

/* Quick Facts strip — the "at a glance" pattern common on travel-guide
   sites (Lonely Planet, TripAdvisor destination pages): scannable
   frontmatter-only facts, never scraped from free-text body content
   (which isn't consistently formatted across all 45 pages — checked
   before relying on it, see content.js). */
.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 760px;
  margin: 20px 0 0;
}
.quick-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  box-shadow: var(--shadow);
}
.quick-fact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.quick-fact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
a.quick-fact-map {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.quick-fact-map:hover {
  border-color: var(--accent);
}
a.quick-fact-map:hover .quick-fact-value {
  color: var(--accent-dark);
}

/* Jump-nav — a Wikipedia/travel-guide-style on-page table of contents,
   auto-generated server-side from the page's own H2 headings
   (content.js), never hand-maintained. */
.jump-nav {
  max-width: 760px;
  margin: 16px 0 0;
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--callout-border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
}
.jump-nav-label {
  font-weight: 700;
  color: var(--accent-dark);
  margin-right: 2px;
}
.jump-nav a {
  color: var(--ink);
  white-space: nowrap;
}
.jump-nav a:hover {
  color: var(--accent-dark);
}

/* Section icons, injected server-side into each H2 (content.js) */
.content-body h2 .section-icon {
  margin-right: 2px;
}

/* Ratings table gets a distinct, more visual treatment than a plain
   data grid — the star characters already come from the markdown
   source (content authoring), this only widens/centers the rating
   column and gives it a soft highlight so it reads as a rating widget
   rather than a spreadsheet row. */
.content-body table td:last-child,
.content-body table th:last-child {
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: 1px;
  background: var(--accent-soft);
}
.content-body table th:last-child {
  background: var(--accent-dark);
  color: #fff;
}

@media (max-width: 560px) {
  .quick-facts,
  .jump-nav {
    max-width: 100%;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
  .content-body {
    padding: 4px 20px 24px;
  }
}

/* Public reviews section (site.ejs) - "super easy and unique style", per
   Mr. Soni's 2026-09-09 request: a warm, card-based, one-tap-to-rate
   experience distinct from the plain content-body cards used elsewhere,
   and the reactions/replies visually distinguish this from the separate
   private quick-star widget further down the page. */
.reviews-section {
  max-width: 720px;
  margin: 40px 0;
}
.reviews-head {
  margin-bottom: 16px;
}
.reviews-head h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}
.reviews-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.reviews-summary-score {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-dark);
}
.reviews-summary-stars {
  color: var(--callout-border);
  font-size: 1.3rem;
  letter-spacing: 1px;
}
.reviews-summary-count {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.review-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-glossy);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.review-form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--flag-saffron), var(--flag-green));
}
.review-form-prompt {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--ink);
}
/* Star picker: real radio buttons under the hood (works with zero JS,
   keyboard-accessible), but visually just a friendly row of big tappable
   stars - reverse-order DOM + row-reverse flex, same trick as
   .star-rating, so hovering/checking star N visually fills 1..N. */
.star-picker {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
  margin-bottom: 14px;
}
.star-picker-option {
  cursor: pointer;
}
.star-picker-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.star-picker-option span {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: var(--border);
  transition: color 0.12s ease, transform 0.12s ease;
}
.star-picker-option input:checked ~ span,
.star-picker-option input:checked ~ span ~ span,
.star-picker:hover .star-picker-option:hover span,
.star-picker:hover .star-picker-option:hover ~ .star-picker-option span {
  color: var(--callout-border);
}
.star-picker-option:has(input:checked) span {
  color: var(--callout-border);
}
.review-form .field {
  margin-bottom: 10px;
}
.btn-review-submit {
  width: auto !important;
  padding: 11px 28px !important;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  scroll-margin-top: 20px;
}
.review-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.review-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--flag-saffron), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.review-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
}
.review-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 0.9rem;
}
.review-stars {
  color: var(--callout-border);
  letter-spacing: 1px;
}
.review-date {
  color: var(--ink-muted);
  font-size: 0.8rem;
}
.review-note {
  margin: 6px 0 10px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.review-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.reaction-form {
  display: inline-block;
}
.reaction-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease, background 0.1s ease;
}
.reaction-btn:hover {
  transform: translateY(-1px) scale(1.06);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.reaction-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.review-replies {
  margin: 10px 0 6px 20px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-reply {
  display: flex;
  gap: 10px;
}
.review-reply .review-note {
  margin: 2px 0 0;
}

.review-reply-toggle {
  margin-top: 8px;
}
.review-reply-toggle summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-dark);
  list-style: none;
}
.review-reply-toggle summary::-webkit-details-marker {
  display: none;
}
.review-reply-toggle summary::before {
  content: "↩ ";
}
.review-reply-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}
.review-reply-form input,
.review-reply-form textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
}
.review-reply-form textarea {
  min-height: 70px;
  resize: vertical;
}
.btn-sm {
  width: auto !important;
  padding: 7px 18px !important;
  font-size: 0.85rem !important;
}

/* ===== Member accounts + personal memories (2026-09-25) ===== */
.nav a.nav-signin {
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 600;
}
.nav a.nav-signin:hover {
  background: var(--accent-soft);
}
.nav a.nav-member {
  font-weight: 600;
  color: var(--accent-dark);
}

.auth-wrap-wide {
  max-width: 460px;
  margin: 48px auto;
}
.auth-lead {
  text-align: center;
  color: var(--ink-muted);
  margin: -8px 0 20px;
}
.auth-links {
  text-align: center;
  font-size: 0.9rem;
  margin: 14px 0 0;
  color: var(--ink-muted);
}
.auth-message {
  text-align: center;
}
.auth-message .btn {
  width: auto;
  padding-left: 28px;
  padding-right: 28px;
}
.auth-inline {
  margin-bottom: 16px;
}
button.btn-secondary,
a.btn-secondary {
  background: var(--surface);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  box-shadow: none;
  width: auto;
}
button.btn-secondary:hover,
a.btn-secondary:hover {
  background: var(--accent-soft);
  box-shadow: none;
}
button.btn-danger {
  background: #b3261e;
  box-shadow: none;
}
.link-danger {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  color: #9c3626;
  cursor: pointer;
  text-decoration: underline;
}

.account-wrap,
.memories-wrap {
  max-width: 720px;
  margin: 40px auto;
}
.account-wrap h1,
.memories-wrap h1 {
  text-align: center;
  margin-bottom: 4px;
}
.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.account-card h2 {
  margin-top: 0;
  font-size: 1.15rem;
}
.account-danger {
  border-color: #f3b7b0;
}
.privacy-page {
  max-width: 720px;
  margin: 40px auto;
}

/* My Memories page */
.memories-hero {
  text-align: center;
  margin-bottom: 24px;
}
.memories-progress {
  max-width: 360px;
  margin: 12px auto 0;
}
.memories-progress-bar {
  height: 10px;
  background: var(--accent-soft);
  border-radius: 999px;
  overflow: hidden;
}
.memories-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--flag-saffron), var(--flag-green));
  border-radius: 999px;
}
.memories-progress p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.memories-hero-links {
  font-size: 0.85rem;
  margin-top: 10px;
}
.memories-empty {
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
}
.memories-empty .btn {
  width: auto;
  padding-left: 28px;
  padding-right: 28px;
}
.memories-place {
  margin-bottom: 18px;
}
.memories-place-head {
  font-weight: 700;
  margin-bottom: 6px;
}
.memories-place-state {
  font-weight: 400;
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin-left: 8px;
}

/* Memory cards + form (shared by My Memories and every site page) */
.memory-section {
  margin: 40px 0;
  padding: 24px;
  background: var(--flag-green-soft);
  border: 1px solid #b9dcb3;
  border-radius: var(--radius);
}
.memory-section h2 {
  margin-top: 0;
}
.memory-add-heading {
  margin: 20px 0 8px;
  font-size: 1rem;
}
.memory-cta .btn {
  width: auto;
  padding-left: 24px;
  padding-right: 24px;
  margin-right: 8px;
}
.memory-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.memory-form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.memory-form .btn {
  width: auto;
  padding-left: 28px;
  padding-right: 28px;
}
.memory-private-note {
  margin-left: 12px;
}
.field-hint-inline {
  font-weight: 400;
  opacity: 0.8;
}
.memory-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 12px;
}
.memory-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.memory-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.memory-card-date {
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.memory-card-body {
  white-space: pre-wrap;
  margin: 10px 0;
}
.memory-card-actions {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.memory-edit summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--accent-dark);
}
.memory-edit[open] {
  flex-basis: 100%;
}
.memory-delete {
  margin: 0;
}
@media (max-width: 560px) {
  .memory-form-row {
    grid-template-columns: 1fr;
  }
  .auth-wrap-wide {
    margin: 24px 12px;
    padding: 22px;
  }
}

/* --- Mobile header (Task 16c, 2 Oct 2026) ---
   The header packed brand + search + 6-8 links into one non-wrapping row, so
   below ~820px "Watchlist"/"Treasures" ran off the right edge and every page
   scrolled sideways (Task 15 audit, all 74 pages at 390px). CSS-only on
   purpose: Bharat's CSP blocks inline scripts, and a wrap needs no JS. */
@media (max-width: 820px) {
  /* Jump-nav links are nowrap so short labels never split mid-word, but two
     long Taj Mahal labels ("Realistic Costs (per person, ...)", "Ratings
     (draft - ...)") were wider than a phone and pushed that page to 529px. */
  .jump-nav a {
    white-space: normal;
  }
  /* Wide comparison tables (Mountain Railways, Hill Forts of Rajasthan)
     scroll inside their own box instead of widening the whole page. */
  .content-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
  .site-header .container {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .nav {
    flex-wrap: wrap;
    gap: 8px 18px;
    width: 100%;
    font-size: 0.95rem;
  }
  .nav-search {
    order: -1;
    width: 100%;
  }
  .nav-search input[type="search"] {
    width: 100%;
  }
}

/* --- Task 16f (links in text), 2 Oct 2026 ---
   In-text links were only distinguishable by colour (1.33:1 against the
   body text - WCAG wants 3:1 or a non-colour cue). Underline links that sit
   inside running text; nav, cards and buttons are unaffected. */
p a,
.breadcrumb a,
.content-body li a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Task 19 (2 Oct 2026): growth plan UI - docs/SEO-GROWTH-PLAN.md --- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* 19k: hero search */
.hero-search {
  display: flex;
  gap: 8px;
  max-width: 620px;
  margin: 18px auto 14px; /* centred, like the rest of the hero */
}
.hero-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-size: 1.05rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.hero-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent-dark);
}
.hero-search button.btn {
  width: auto;
  padding: 0 22px;
}
/* 19k: featured row + section headings */
.featured {
  margin: 8px 0 28px;
}
.featured h2,
.section-heading {
  font-size: 1.3rem;
  margin: 8px 0 12px;
}
.featured-month {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 6px;
  vertical-align: middle;
}
/* 19i: share bar - neutral pills, plain links */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 760px;
  margin: 16px 0 0;
}
.share-label {
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.share-btn {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.share-btn:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
  text-decoration: none;
}
/* 19l: trust box */
.trust-box {
  max-width: 760px;
  margin: 28px 0 8px;
  padding: 16px 20px;
  background: var(--flag-green-soft);
  border-left: 4px solid var(--flag-green);
  border-radius: var(--radius);
}
.trust-box h2 {
  font-size: 1.1rem;
  margin: 0 0 6px;
}
.trust-box p {
  margin: 6px 0;
  line-height: 1.55;
}
/* 19j: phone-only bottom navigation */
.bottom-nav {
  display: none;
}
@media (max-width: 820px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(36, 33, 29, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    min-height: 48px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
  }
  .bottom-nav a span {
    font-size: 1.15rem;
  }
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .hero-search input[type="search"] {
    font-size: 1rem;
  }
}
/* 19l self-caught (axe): saffron links on the green box were 4.46:1 - dark green is well above 4.5:1. */
.trust-box a {
  color: var(--flag-green-dark);
}
/* 19q: WebP <picture> wrappers must not change card / hero layout. */
.card-thumb picture,
.hero-image picture {
  display: block;
}
/* Task 19s: "In short" answer under the H1 */
.site-summary {
  max-width: 760px;
  margin: 14px 0 0;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent-dark);
  border-radius: var(--radius);
  line-height: 1.55;
}
