:root {
      --saffron: #c45c1f;
      --saffron-deep: #9a4518;
      --blue-rich: #0c2d5c;
      --blue-mid: #143d78;
      --pearl: #f7f5f0;
      --pearl-soft: #ebe7df;
      --jet: #0a0a0a;
      --jet-soft: #1a1a1a;
      --text-on-dark: rgba(247, 245, 240, 0.94);
      --text-muted-dark: rgba(247, 245, 240, 0.72);
      --text-on-light: #141414;
      --text-muted-light: #3d3d3d;
      --radius: 12px;
      --shadow: 0 18px 50px rgba(10, 10, 10, 0.18);
      --font-display: "Cormorant Garamond", "Georgia", serif;
      --font-body: "Source Sans 3", system-ui, sans-serif;
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
      /* Avoid layout shift when results change page height (scrollbar toggles). */
      scrollbar-gutter: stable;
    }

    @supports not (scrollbar-gutter: stable) {
      html {
        overflow-y: scroll;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto;
      }
      *,
      *::before,
      *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }

    body {
      margin: 0;
      font-family: var(--font-body);
      font-size: 1.0625rem;
      line-height: 1.65;
      color: var(--text-on-light);
      background: var(--pearl);
      scrollbar-gutter: stable;
    }

    .skip-link {
      position: absolute;
      left: -9999px;
      top: auto;
      width: 1px;
      height: 1px;
      overflow: hidden;
    }

    .skip-link:focus {
      left: 1rem;
      top: 1rem;
      width: auto;
      height: auto;
      padding: 0.75rem 1rem;
      background: var(--jet);
      color: var(--pearl);
      z-index: 100;
      border-radius: 6px;
    }

    /* Header */
    .site-header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(247, 245, 240, 0.92);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(12, 45, 92, 0.08);
    }

    .header-inner {
      max-width: 1120px;
      margin: 0 auto;
      padding: 1rem 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .header-actions {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.5rem 0.75rem;
    }

    .auth-cluster {
      display: flex;
      align-items: center;
      gap: 0.35rem 0.5rem;
      flex-wrap: wrap;
    }

    .auth-cluster[hidden] {
      display: none !important;
    }

    .auth-user-name {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--blue-rich);
      max-width: 160px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .btn-ghost {
      background: transparent;
      color: var(--blue-rich);
      border: 2px solid rgba(12, 45, 92, 0.22);
      padding: 0.55rem 1.1rem;
      font-size: 0.92rem;
    }

    .btn-ghost:hover {
      border-color: var(--saffron);
      background: rgba(196, 92, 31, 0.06);
      transform: translateY(-1px);
    }

    .btn-dark {
      background: var(--jet);
      color: var(--pearl);
      box-shadow: 0 4px 14px rgba(10, 10, 10, 0.2);
    }

    .btn-dark:hover {
      background: #222;
      transform: translateY(-1px);
    }

    .btn-google {
      width: 100%;
      margin-top: 0.25rem;
      background: var(--pearl);
      color: var(--jet);
      border: 1px solid rgba(10, 10, 10, 0.14);
      box-shadow: none;
      font-weight: 600;
      gap: 0.5rem;
    }

    .btn-google:hover {
      background: var(--pearl-soft);
      transform: translateY(-1px);
    }

    .btn-google svg {
      flex-shrink: 0;
    }

    .auth-divider {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin: 1rem 0;
      color: var(--text-muted-light);
      font-size: 0.8rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .auth-divider::before,
    .auth-divider::after {
      content: "";
      flex: 1;
      height: 1px;
      background: rgba(12, 45, 92, 0.12);
    }

    /* Auth modal */
    .modal-open {
      overflow: hidden;
    }

    .auth-modal {
      position: fixed;
      inset: 0;
      z-index: 200;
      display: grid;
      place-items: center;
      padding: 1rem;
    }

    .auth-modal[hidden] {
      display: none !important;
    }

    .auth-modal__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(10, 10, 10, 0.55);
      backdrop-filter: blur(4px);
    }

    .auth-modal__dialog {
      position: relative;
      width: min(100%, 420px);
      max-height: min(90vh, 640px);
      overflow: auto;
      background: var(--pearl);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      border: 1px solid rgba(12, 45, 92, 0.1);
      padding: 1.5rem 1.5rem 1.75rem;
    }

    .auth-modal__head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 1.25rem;
    }

    .auth-modal__head h2 {
      font-family: var(--font-display);
      font-size: 1.65rem;
      font-weight: 700;
      margin: 0;
      color: var(--blue-rich);
      line-height: 1.2;
    }

    .modal-close {
      flex-shrink: 0;
      width: 2.25rem;
      height: 2.25rem;
      border: none;
      border-radius: 8px;
      background: rgba(12, 45, 92, 0.08);
      color: var(--blue-rich);
      cursor: pointer;
      font-size: 1.35rem;
      line-height: 1;
      display: grid;
      place-items: center;
    }

    .modal-close:hover {
      background: rgba(196, 92, 31, 0.15);
    }

    .modal-close:focus-visible {
      outline: 2px solid var(--saffron);
      outline-offset: 2px;
    }

    .auth-alert {
      padding: 0.65rem 0.85rem;
      border-radius: 8px;
      font-size: 0.92rem;
      margin-bottom: 1rem;
      line-height: 1.45;
    }

    .auth-alert[hidden] {
      display: none !important;
    }

    .auth-alert--error {
      background: rgba(196, 92, 31, 0.12);
      color: var(--saffron-deep);
      border: 1px solid rgba(196, 92, 31, 0.35);
    }

    .auth-alert--success {
      background: rgba(12, 45, 92, 0.08);
      color: var(--blue-rich);
      border: 1px solid rgba(12, 45, 92, 0.2);
    }

    .auth-form label {
      display: block;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-muted-light);
      margin-bottom: 0.35rem;
    }

    .auth-form input {
      width: 100%;
      padding: 0.65rem 0.85rem;
      font-family: var(--font-body);
      font-size: 1rem;
      border-radius: 8px;
      border: 1px solid rgba(12, 45, 92, 0.18);
      background: #fff;
      margin-bottom: 0.85rem;
    }

    .auth-form input:focus {
      outline: 2px solid var(--saffron);
      outline-offset: 0;
      border-color: transparent;
    }

    .auth-form .btn[type="submit"] {
      width: 100%;
      margin-top: 0.35rem;
    }

    .auth-form__row {
      display: flex;
      justify-content: flex-end;
      margin: -0.35rem 0 0.85rem;
    }

    .auth-form__row a {
      font-size: 0.88rem;
      font-weight: 600;
      color: var(--blue-rich);
      text-decoration: none;
      border-bottom: 1px solid rgba(196, 92, 31, 0.45);
    }

    .auth-form__row a:hover {
      color: var(--saffron-deep);
    }

    .auth-switch {
      margin-top: 1rem;
      font-size: 0.92rem;
      color: var(--text-muted-light);
      text-align: center;
    }

    .auth-switch a {
      font-weight: 700;
      color: var(--blue-rich);
      text-decoration: none;
      border-bottom: 1px solid rgba(196, 92, 31, 0.45);
    }

    .auth-switch a:hover {
      color: var(--saffron-deep);
    }

    .brand {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1.35rem;
      letter-spacing: 0.02em;
      color: var(--blue-rich);
      text-decoration: none;
    }

    .brand span {
      color: var(--saffron);
    }

    .nav-links {
      display: flex;
      gap: 0.25rem 1.25rem;
      flex-wrap: wrap;
      align-items: center;
    }

    .nav-links a {
      color: var(--text-muted-light);
      text-decoration: none;
      font-weight: 600;
      font-size: 0.95rem;
      padding: 0.35rem 0;
      border-bottom: 2px solid transparent;
      transition: color 0.2s, border-color 0.2s;
    }

    .nav-links a:hover,
    .nav-links a:focus-visible {
      color: var(--blue-rich);
      border-bottom-color: var(--saffron);
      outline: none;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.65rem 1.35rem;
      font-family: var(--font-body);
      font-weight: 600;
      font-size: 0.95rem;
      border-radius: 999px;
      border: none;
      cursor: pointer;
      text-decoration: none;
      transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    }

    .btn:focus-visible {
      outline: 2px solid var(--saffron);
      outline-offset: 3px;
    }

    .btn-primary {
      background: var(--saffron);
      color: var(--pearl);
      box-shadow: 0 4px 14px rgba(196, 92, 31, 0.35);
    }

    .btn-primary:hover {
      background: var(--saffron-deep);
      transform: translateY(-1px);
    }

    .btn-outline-light {
      background: transparent;
      color: var(--pearl);
      border: 2px solid rgba(247, 245, 240, 0.55);
    }

    .btn-outline-light:hover {
      background: rgba(247, 245, 240, 0.08);
      border-color: var(--pearl);
    }

    /* Hero */
    .hero {
      background: linear-gradient(145deg, var(--blue-rich) 0%, var(--blue-mid) 48%, #0a1f3d 100%);
      color: var(--text-on-dark);
      position: relative;
      overflow: hidden;
    }

    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 85% 15%, rgba(196, 92, 31, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 50% at 10% 90%, rgba(247, 245, 240, 0.06), transparent 50%);
      pointer-events: none;
    }

    .hero-inner {
      max-width: 1120px;
      margin: 0 auto;
      padding: 4.5rem 1.5rem 5rem;
      position: relative;
    }

    .hero-badge {
      display: inline-block;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--text-muted-dark);
      margin-bottom: 1rem;
      padding-bottom: 0.35rem;
      border-bottom: 2px solid var(--saffron);
    }

    .hero h1 {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: clamp(2.35rem, 5vw, 3.5rem);
      line-height: 1.12;
      margin: 0 0 1.25rem;
      max-width: 14ch;
    }

    .hero-lead {
      font-size: 1.15rem;
      max-width: 36rem;
      color: var(--text-muted-dark);
      margin: 0 0 2rem;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      align-items: center;
    }

    .hero-strip {
      margin-top: 3rem;
      padding-top: 2rem;
      border-top: 1px solid rgba(247, 245, 240, 0.12);
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1.5rem;
    }

    .hero-stat strong {
      display: block;
      font-family: var(--font-display);
      font-size: 1.65rem;
      color: var(--pearl);
      margin-bottom: 0.25rem;
    }

    .hero-stat span {
      font-size: 0.9rem;
      color: var(--text-muted-dark);
    }

    /* Sections */
    main section {
      scroll-margin-top: 5rem;
    }

    .section-light {
      padding: 4.5rem 1.5rem;
    }

    .section-dark {
      background: var(--jet);
      color: var(--text-on-dark);
      padding: 4.5rem 1.5rem;
    }

    .section-inner {
      max-width: 1120px;
      margin: 0 auto;
    }

    .section-label {
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--saffron);
      margin: 0 0 0.5rem;
    }

    .section-dark .section-label {
      color: #e8925a;
    }

    .section-title {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: clamp(1.85rem, 3vw, 2.35rem);
      margin: 0 0 1rem;
      color: var(--blue-rich);
      line-height: 1.2;
    }

    .section-dark .section-title {
      color: var(--pearl);
    }

    .section-intro {
      max-width: 42rem;
      color: var(--text-muted-light);
      margin: 0 0 2.5rem;
      font-size: 1.05rem;
    }

    .section-dark .section-intro {
      color: var(--text-muted-dark);
    }

    .cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.5rem;
    }

    .card {
      background: var(--pearl);
      border-radius: var(--radius);
      padding: 1.75rem;
      border: 1px solid rgba(12, 45, 92, 0.08);
      box-shadow: var(--shadow);
    }

    .section-dark .card {
      background: var(--jet-soft);
      border-color: rgba(247, 245, 240, 0.08);
      box-shadow: none;
    }

    .card-icon {
      width: 48px;
      height: 48px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.35rem;
      margin-bottom: 1rem;
    }

    .card-icon.saffron {
      background: rgba(196, 92, 31, 0.15);
      color: var(--saffron-deep);
    }

    .card-icon.blue {
      background: rgba(12, 45, 92, 0.12);
      color: var(--blue-rich);
    }

    .section-dark .card-icon.blue {
      background: rgba(247, 245, 240, 0.08);
      color: #8fb4e8;
    }

    .card h3 {
      font-family: var(--font-display);
      font-size: 1.35rem;
      margin: 0 0 0.65rem;
      color: var(--blue-rich);
    }

    .section-dark .card h3 {
      color: var(--pearl);
    }

    .card p {
      margin: 0;
      font-size: 0.98rem;
      color: var(--text-muted-light);
      line-height: 1.6;
    }

    .section-dark .card p {
      color: var(--text-muted-dark);
    }

    /* Pillars band */
    .pillars-band {
      background: linear-gradient(180deg, var(--pearl-soft) 0%, var(--pearl) 100%);
      padding: 4.5rem 1.5rem;
      border-top: 1px solid rgba(12, 45, 92, 0.06);
      border-bottom: 1px solid rgba(12, 45, 92, 0.06);
    }

    .pillar-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 2rem;
      align-items: start;
    }

    .pillar {
      position: relative;
      padding-left: 1.25rem;
      border-left: 4px solid var(--saffron);
    }

    .pillar:nth-child(2) {
      border-left-color: var(--blue-rich);
    }

    .pillar:nth-child(3) {
      border-left-color: var(--jet);
    }

    .pillar-num {
      font-family: var(--font-display);
      font-size: 3rem;
      font-weight: 700;
      line-height: 1;
      color: rgba(12, 45, 92, 0.12);
      margin-bottom: 0.5rem;
    }

    .pillar h2 {
      font-family: var(--font-display);
      font-size: 1.5rem;
      margin: 0 0 0.75rem;
      color: var(--blue-rich);
    }

    .pillar p {
      margin: 0 0 1rem;
      color: var(--text-muted-light);
    }

    .pillar ul {
      margin: 0;
      padding-left: 1.15rem;
      color: var(--text-muted-light);
      font-size: 0.98rem;
    }

    .pillar li {
      margin-bottom: 0.45rem;
    }

    /* Museum timeline (on light .pillars-band — use dark text, not --text-muted-dark) */
    .pillars-band .timeline {
      display: grid;
      gap: 1rem;
      margin-top: 2.25rem;
    }

    .pillars-band .timeline-row {
      display: grid;
      grid-template-columns: minmax(7.5rem, auto) 1fr;
      gap: 1.25rem 1.5rem;
      align-items: start;
      padding: 1.15rem 1.35rem;
      background: rgba(255, 255, 255, 0.92);
      border-radius: var(--radius);
      border: 1px solid rgba(12, 45, 92, 0.12);
      box-shadow: 0 2px 12px rgba(12, 45, 92, 0.06);
    }

    .pillars-band .timeline-era {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: clamp(1.05rem, 2.5vw, 1.2rem);
      line-height: 1.35;
      letter-spacing: 0.01em;
      color: var(--blue-rich);
      white-space: nowrap;
    }

    .pillars-band .timeline-row p {
      margin: 0;
      padding-top: 0.12rem;
      color: var(--text-muted-light);
      font-size: 1.0625rem;
      line-height: 1.65;
      font-weight: 500;
    }

    @media (max-width: 520px) {
      .pillars-band .timeline-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
      }

      .pillars-band .timeline-era {
        white-space: normal;
        border-bottom: 1px solid rgba(12, 45, 92, 0.1);
        padding-bottom: 0.5rem;
        margin-bottom: 0.15rem;
      }

      .pillars-band .timeline-row p {
        padding-top: 0;
      }
    }

    /* CTA */
    .cta {
      background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-deep) 100%);
      color: var(--pearl);
      padding: 4rem 1.5rem;
      text-align: center;
    }

    .cta-inner {
      max-width: 560px;
      margin: 0 auto;
    }

    .cta h2 {
      font-family: var(--font-display);
      font-size: clamp(1.75rem, 3vw, 2.25rem);
      margin: 0 0 1rem;
    }

    .cta p {
      margin: 0 0 1.5rem;
      opacity: 0.92;
      font-size: 1.05rem;
    }

    .cta .btn {
      background: var(--jet);
      color: var(--pearl);
      box-shadow: 0 8px 24px rgba(10, 10, 10, 0.25);
    }

    .cta .btn:hover {
      background: #222;
      transform: translateY(-1px);
    }

    .cta-form {
      margin-top: 1.75rem;
      text-align: left;
      background: rgba(10, 10, 10, 0.14);
      padding: 1.5rem;
      border-radius: var(--radius);
      border: 1px solid rgba(247, 245, 240, 0.18);
    }

    .cta-form-grid {
      display: grid;
      gap: 1rem;
    }

    @media (min-width: 520px) {
      .cta-form-grid--half {
        grid-template-columns: 1fr 1fr;
      }
    }

    .cta-form label {
      display: block;
      font-weight: 600;
      font-size: 0.88rem;
      margin-bottom: 0.35rem;
      opacity: 0.95;
    }

    .cta-form input,
    .cta-form textarea {
      width: 100%;
      padding: 0.65rem 0.85rem;
      border-radius: 8px;
      border: 1px solid rgba(10, 10, 10, 0.18);
      font-family: var(--font-body);
      font-size: 1rem;
      background: var(--pearl);
      color: var(--text-on-light);
    }

    .cta-form textarea {
      min-height: 130px;
      resize: vertical;
    }

    .cta-form input:focus,
    .cta-form textarea:focus {
      outline: 2px solid var(--jet);
      outline-offset: 2px;
      border-color: transparent;
    }

    .cta-form-note {
      margin: 0.85rem 0 1rem;
      font-size: 0.93rem;
      line-height: 1.5;
      opacity: 0.94;
    }

    #contact-form-status {
      margin-bottom: 1rem;
      padding: 0.65rem 0.85rem;
      border-radius: 8px;
      font-size: 0.95rem;
      line-height: 1.45;
      font-weight: 600;
    }

    #contact-form-status[hidden] {
      display: none !important;
    }

    #contact-form-status[data-variant="error"] {
      background: rgba(255, 255, 255, 0.92);
      color: #5c1508;
      border: 1px solid rgba(10, 10, 10, 0.08);
    }

    #contact-form-status[data-variant="success"] {
      background: rgba(247, 245, 240, 0.98);
      color: var(--blue-rich);
      border: 1px solid rgba(12, 45, 92, 0.15);
    }

    #contact-form-status[data-variant="info"] {
      background: rgba(12, 45, 92, 0.22);
      color: var(--pearl);
      border: 1px solid rgba(247, 245, 240, 0.25);
    }

    /* Footer */
    .site-footer {
      background: var(--jet);
      color: var(--text-muted-dark);
      padding: 2.5rem 1.5rem;
      font-size: 0.9rem;
    }

    .footer-inner {
      max-width: 1120px;
      margin: 0 auto;
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      justify-content: space-between;
      align-items: center;
    }

    .site-footer a {
      color: var(--pearl-soft);
      text-decoration: none;
    }

    .site-footer a:hover {
      text-decoration: underline;
    }

    .footer-brand {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1.1rem;
      color: var(--pearl);
    }

    .nav-links a.nav-links__current {
      color: var(--blue-rich);
      border-bottom-color: var(--saffron);
    }

    /* Dashboard: dark glass header (same markup as marketing) */
    .site-header.site-header--dark {
      background: rgba(12, 29, 61, 0.72);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(247, 245, 240, 0.12);
    }

    .site-header.site-header--dark .brand {
      color: var(--pearl);
    }

    .site-header.site-header--dark .brand span {
      color: #e8925a;
    }

    .site-header.site-header--dark .nav-links a {
      color: var(--text-muted-dark);
    }

    .site-header.site-header--dark .nav-links a:hover,
    .site-header.site-header--dark .nav-links a:focus-visible {
      color: var(--pearl);
      border-bottom-color: var(--saffron);
    }

    .site-header.site-header--dark .nav-links a.nav-links__current {
      color: var(--pearl);
      border-bottom-color: var(--saffron);
    }

    .site-header.site-header--dark .auth-user-name {
      color: var(--pearl-soft);
    }

    .site-header.site-header--dark .btn-ghost {
      background: transparent;
      color: var(--pearl-soft);
      border: 2px solid rgba(247, 245, 240, 0.35);
    }

    .site-header.site-header--dark .btn-ghost:hover {
      border-color: var(--saffron);
      background: rgba(196, 92, 31, 0.12);
    }
