/* ── Reset ── */
    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Lexend Zetta', Arial, sans-serif;
      background: #f5f5f7;
      color: #1a1a2e;
      min-width: 320px;
    }

    button,
    input {
      font: inherit;
    }

    /* ── Reading Progress Bar ── */
    #reading-progress-bar {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 1000;
      width: 0%;
      height: 3px;
      border-radius: 0 2px 2px 0;
      background: linear-gradient(90deg, #3b4cca, #6c78e0, #3b4cca);
      background-size: 200% 100%;
      box-shadow: 0 0 8px rgba(59, 76, 202, 0.6);
      transition: width 100ms linear, opacity 400ms ease;
      animation: shimmer 2s linear infinite;
    }

    #reading-progress-bar.complete {
      opacity: 0;
    }

    #reading-progress-bar::after {
      content: '';
      position: absolute;
      right: -1px;
      top: 50%;
      transform: translateY(-50%);
      width: 6px;
      height: 6px;
      background: #6c78e0;
      border-radius: 50%;
      box-shadow: 0 0 6px 2px rgba(108, 120, 224, 0.8);
    }

    #reading-progress-bar.complete::after {
      opacity: 0;
    }

    @keyframes shimmer {
      from {
        background-position: 200% 0;
      }

      to {
        background-position: -200% 0;
      }
    }

    /* ── Page Wrapper ── */
    .terms-page {
      min-height: 100vh;
      padding-bottom: calc(var(--terms-banner-height, 0px) + 1.5rem);
      transition: padding-bottom 250ms ease;
    }

    /* ── Header ── */
    .page-header {
      padding: 3.25rem 1.5rem 2.75rem;
      text-align: center;
      color: #fff;
      background: #1a1a2e;
    }

    .brand-name {
      margin: 0 0 0.75rem;
      color: #aeb0c0;
      font-size: 0.58rem;
      font-weight: 500;
      letter-spacing: 0.17em;
      text-transform: uppercase;
    }

    .page-header h1 {
      margin: 0;
      font-family: 'Cinzel', Georgia, serif;
      font-size: clamp(1.55rem, 4vw, 2.35rem);
      line-height: 1.25;
      letter-spacing: 0.035em;
    }

    /* ── Policy Container ── */
    .policy-container {
      width: min(100%, 800px);
      margin: 0 auto;
      padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1rem, 3vw, 2rem);
      animation: enter-policy 650ms ease both;
    }

    @keyframes enter-policy {
      from {
        opacity: 0;
        transform: translateY(14px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .policy-container p {
      margin: 0 0 1rem;
      color: #33343d;
      font-size: clamp(0.76rem, 1.45vw, 0.88rem);
      line-height: 1.85;
      letter-spacing: 0.012em;
    }

    .effective-date {
      margin-bottom: 1.6rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid #d8d8dc;
      color: #666875;
      font-size: clamp(0.68rem, 1.3vw, 0.77rem);
    }

    /* ── Sections ── */
    .policy-section {
      margin-top: 2rem;
      padding-bottom: 1.4rem;
      border-bottom: 1px solid #e2e2e5;
    }

    .policy-section:last-of-type {
      border-bottom: 0;
    }

    .policy-section h2 {
      margin: 0 0 0.85rem;
      padding-left: 12px;
      border-left: 3px solid #3b4cca;
      color: #1a1a2e;
      font-family: 'Cinzel', Georgia, serif;
      font-size: clamp(1.03rem, 2.2vw, 1.34rem);
      line-height: 1.45;
    }

    /* ── Lists ── */
    .policy-list {
      margin: 0 0 1rem;
      padding: 0;
      list-style: none;
    }

    .policy-list li {
      position: relative;
      margin-bottom: 0.35rem;
      padding-left: 1.3rem;
      color: #464752;
      font-size: clamp(0.76rem, 1.45vw, 0.88rem);
      line-height: 1.85;
    }

    .policy-list li::before {
      position: absolute;
      top: 0;
      left: 0;
      color: #3b4cca;
      content: "•";
      font-weight: 700;
    }

    /* ── Back Home Button ── */
    .back-home-button {
      display: inline-flex;
      align-items: center;
      gap: 0.55rem;
      margin-top: 1.3rem;
      padding: 0.78rem 1.25rem;
      border-radius: 7px;
      background: #1a1a2e;
      color: #fff;
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      text-decoration: none;
      transition: background 180ms ease, transform 180ms ease;
    }

    .back-home-button:hover {
      background: #3b4cca;
      transform: translateY(-2px);
    }

    .back-home-button:focus-visible {
      outline: 2px solid #91a0ff;
      outline-offset: 3px;
    }

    /* ═══════════════════════════════════════════════
       TERMS BANNER
    ═══════════════════════════════════════════════ */
    .terms-banner {
      position: fixed;
      z-index: 20;
      right: 0;
      bottom: 0;
      left: 0;
      overflow: hidden;
      border-top: 3px solid #3b4cca;
      background: #1a1a2e;
      color: #f5f5f7;
      box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.3);
      transform: translateY(100%);
      transition: transform 430ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .terms-banner.visible {
      transform: translateY(0);
    }

    .terms-banner.dismissed {
      transform: translateY(100%);
      pointer-events: none;
    }

    /* Header row */
    .terms-banner__header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      min-height: 3.3rem;
      padding: 0.62rem clamp(1rem, 4vw, 2.5rem);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(0, 0, 0, 0.14);
    }

    .terms-banner__heading {
      display: flex;
      align-items: center;
      gap: 0.8rem;
      min-width: 0;
    }

    .terms-banner__heading strong {
      flex: 0 0 auto;
      padding-left: 10px;
      border-left: 3px solid #3b4cca;
      color: #fff;
      font-family: 'Cinzel', Georgia, serif;
      font-size: clamp(0.82rem, 2vw, 1rem);
      letter-spacing: 0.03em;
    }

    .terms-banner__heading span {
      color: #aeb0c0;
      font-size: clamp(0.6rem, 1.3vw, 0.72rem);
      line-height: 1.5;
    }

    /* ── Toggle arrow button ── */
    .terms-banner__toggle {
      position: relative;
      display: grid;
      width: 2.2rem;
      height: 2.2rem;
      flex: 0 0 2.2rem;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 5px;
      background: rgba(255, 255, 255, 0.05);
      color: #54ff3c;
      cursor: pointer;
      transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
    }

    .terms-banner__toggle svg {
      width: 1.2rem;
      height: 1.2rem;
      transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Arrow points UP by default (click to expand = shows content below) */
    .terms-banner__toggle svg {
      transform: rotate(0deg);
    }

    /* When open, arrow points DOWN (click to collapse) */
    .terms-banner__toggle.is-open svg {
      transform: rotate(180deg);
    }

    .terms-banner__toggle:hover {
      background: rgba(84, 255, 60, 0.12);
      border-color: rgba(84, 255, 60, 0.35);
      color: #7cff68;
      transform: translateY(-1px);
    }

    .terms-banner__toggle:active {
      transform: translateY(0);
    }

    .terms-banner__toggle:focus-visible {
      outline: 2px solid #91a0ff;
      outline-offset: 3px;
    }

    /* Collapsible summary — CSS grid trick */
    .terms-banner__collapsible {
      display: grid;
      grid-template-rows: 0fr;
      border-bottom: 1px solid transparent;
      transition: grid-template-rows 300ms ease, border-color 200ms ease;
    }

    .terms-banner__collapsible>div {
      overflow: hidden;
    }

    .terms-banner__collapsible.is-open {
      grid-template-rows: 1fr;
      border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .terms-banner__summary {
      margin: 0;
      padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
      color: #c8cad8;
      font-size: clamp(0.66rem, 1.4vw, 0.78rem);
      line-height: 1.6;
      letter-spacing: 0.065em;
    }

    /* Footer row */
    .terms-banner__footer {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
      background: rgba(0, 0, 0, 0.11);
    }

    .terms-banner__agreement {
      display: flex;
      flex: 1;
      align-items: center;
      gap: 0.6rem;
      min-width: 0;
      color: #e8e9f0;
      font-size: clamp(0.61rem, 1.25vw, 0.72rem);
      line-height: 1.5;
      cursor: pointer;
    }

    .terms-banner__agreement input[type="checkbox"] {
      width: 15px;
      height: 15px;
      flex: 0 0 15px;
      margin: 0;
      accent-color: #3b4cca;
      cursor: pointer;
    }

    .terms-banner__continue {
      flex: 0 0 auto;
      padding: 0.57rem 1.15rem;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.05);
      color: #6e7088;
      font-size: clamp(0.63rem, 1.2vw, 0.73rem);
      font-weight: 600;
      cursor: not-allowed;
      transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
    }

    .terms-banner__continue.active {
      border-color: #3b4cca;
      background: #3b4cca;
      color: #fff;
      cursor: pointer;
    }

    .terms-banner__continue.active:hover {
      background: #4d5fe0;
      transform: translateY(-1px);
    }

    .terms-banner__continue.active:active {
      transform: translateY(0);
    }

    .terms-banner__continue:focus-visible {
      outline: 2px solid #91a0ff;
      outline-offset: 3px;
    }

    /* sr-only */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* ── Responsive ── */
    @media (max-width: 560px) {
      .page-header {
        padding: 2.4rem 1rem 1.9rem;
      }

      .brand-name {
        font-size: 0.52rem;
      }

      .policy-container {
        padding-right: 1rem;
        padding-left: 1rem;
      }

      .policy-container p,
      .policy-list li {
        font-size: 0.73rem;
        line-height: 1.78;
      }

      .terms-banner__heading {
        gap: 0.55rem;
      }

      .terms-banner__heading span {
        max-width: 9rem;
      }

      .terms-banner__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        padding-top: 0.6rem;
        padding-bottom: 0.75rem;
      }

      .terms-banner__continue {
        width: 100%;
        text-align: center;
      }
    }

    @media (prefers-reduced-motion: reduce) {

      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
      }
    }
