/* ── Brand variables (mirrors admin_dashboard.php) ──────────────────── */
    :root {
      --primary:   #1a2a6c;
      --secondary: #b21f1f;
      --accent:    #2563EB;
      --light-bg:  #EFF6FF;
      --body-text: #374151;
      --rule:      #CBD5E1;
      --muted:     #94A3B8;
    }

    /* ── Base ────────────────────────────────────────────────────────────── */
    html { scroll-behavior: smooth; }
    body {
      font-family: 'Segoe UI', Arial, sans-serif;
      background: #F8FAFC;
      color: var(--body-text);
      line-height: 1.78;
    }

    /* ── Top banner ──────────────────────────────────────────────────────── */
    .terms-banner {
      background: linear-gradient(135deg, var(--primary) 0%, #1a3a8c 60%, var(--secondary) 100%);
      color: #fff;
      padding: 2.5rem 2rem 2rem;
      position: relative;
      overflow: hidden;
    }
    .terms-banner::before {
      content: '';
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,0.02) 40px,
        rgba(255,255,255,0.02) 80px
      );
      pointer-events: none;
    }
    .terms-banner h1 {
      font-size: 2rem;
      font-weight: 700;
      letter-spacing: .4px;
      position: relative;
    }
    .terms-banner .badge-ver {
      background: rgba(255,255,255,.18);
      border: 1px solid rgba(255,255,255,.35);
      border-radius: 20px;
      font-size: .78rem;
      padding: .25rem .75rem;
      margin-left: .5rem;
      vertical-align: middle;
    }
    .terms-banner .meta {
      font-size: .875rem;
      opacity: .75;
      margin-top: .4rem;
      position: relative;
    }

    /* ── Action bar (print / download) ──────────────────────────────────── */
    .action-bar {
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border-bottom: 1px solid var(--rule);
      padding: .6rem 0;
      position: sticky;
      top: 0;
      z-index: 1000;
    }
    .action-bar .btn {
      font-size: .82rem;
    }

    /* ── Summary card ────────────────────────────────────────────────────── */
    .summary-card {
      background: var(--light-bg);
      border-left: 5px solid var(--accent);
      border-radius: 8px;
      padding: 1.25rem 1.5rem;
      box-shadow: 0 6px 20px rgba(37,99,235,0.10);
      transition: box-shadow 0.3s ease;
    }
    .summary-card:hover { box-shadow: 0 8px 28px rgba(37,99,235,0.15); }
    .summary-card ul {
      margin-bottom: 0;
    }
    .summary-card li {
      margin-bottom: .35rem;
    }

    /* ── Table of contents ───────────────────────────────────────────────── */
    .toc-card {
      background: #fff;
      border: 1px solid var(--rule);
      border-radius: 8px;
      padding: 1.25rem 1.5rem;
      box-shadow: 0 4px 16px rgba(0,0,0,0.04);
      transition: box-shadow 0.3s ease;
    }
    .toc-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
    .toc-card ol {
      margin-bottom: 0;
      padding-left: 1.2rem;
    }
    .toc-card a {
      color: var(--accent);
      text-decoration: none;
      transition: color 0.2s ease, padding-left 0.2s ease;
      display: inline-block;
    }
    .toc-card a:hover {
      color: var(--primary);
      padding-left: 4px;
    }

    /* ── Section headings ────────────────────────────────────────────────── */
    .section-title {
      color: var(--primary);
      font-weight: 700;
      font-size: 1.2rem;
      border-bottom: 2px solid var(--rule);
      padding-bottom: .4rem;
      margin-top: 2.5rem;
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 12px;
      scroll-margin-top: 60px;
    }
    .section-title::before {
      font-family: "Font Awesome 6 Free";
      font-weight: 900;
      content: "\f054";
      font-size: .85rem;
      color: var(--accent);
    }
    .sub-title {
      color: var(--accent);
      font-weight: 600;
      font-size: 1rem;
      margin-top: 1.5rem;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .sub-title::before {
      font-family: "Font Awesome 6 Free";
      font-weight: 900;
      content: "\f105";
      font-size: .85rem;
      color: var(--primary);
    }

    /* ── Highlight / callout ─────────────────────────────────────────────── */
    .highlight {
      background: var(--light-bg);
      border-left: 4px solid var(--accent);
      border-radius: 4px;
      padding: .75rem 1.1rem;
      font-style: italic;
      color: var(--primary);
      margin: 1rem 0;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .highlight:hover {
      transform: translateX(4px);
      box-shadow: 0 2px 12px rgba(37,99,235,0.08);
    }
    .warning-box {
      background: #fff5f5;
      border-left: 4px solid var(--secondary);
      border-radius: 4px;
      padding: .75rem 1.1rem;
      color: #7f1d1d;
      margin: 1rem 0;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .warning-box:hover {
      transform: translateX(4px);
      box-shadow: 0 2px 12px rgba(178,31,31,0.08);
    }
    .info-box {
      background: #f0fdf4;
      border-left: 4px solid #16a34a;
      border-radius: 4px;
      padding: .75rem 1.1rem;
      color: #14532d;
      margin: 1rem 0;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .info-box:hover {
      transform: translateX(4px);
      box-shadow: 0 2px 12px rgba(22,163,74,0.08);
    }

    /* ── Clause table ────────────────────────────────────────────────────── */
    .clause-table td:first-child {
      font-weight: 600;
      white-space: nowrap;
      color: var(--primary);
      width: 180px;
    }

    /* ── Footer band ─────────────────────────────────────────────────────── */
    .terms-footer {
      background: var(--primary);
      color: rgba(255,255,255,.7);
      font-size: .82rem;
      padding: 1rem 2rem;
      text-align: center;
      margin-top: 3rem;
      border-top: 3px solid var(--accent);
    }

    /* ── Back link ───────────────────────────────────────────────────────── */
    .back-link {
      color: rgba(255,255,255,.8);
      font-size: .85rem;
      text-decoration: none;
    }
    .back-link:hover { color: #fff; text-decoration: underline; }

    /* ── Back to Top ─────────────────────────────────────────────────────── */
    #backToTop {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      width: 44px;
      height: 44px;
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: 50%;
      font-size: 1.1rem;
      cursor: pointer;
      box-shadow: 0 4px 14px rgba(26,42,108,0.3);
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
      z-index: 999;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    #backToTop:hover { background: var(--accent); transform: translateY(20px) scale(1.08); }
    #backToTop.visible { opacity: 1; transform: translateY(0); }

    /* ── Print styles ────────────────────────────────────────────────────── */
    @media print {
      .action-bar, .back-link, .terms-footer, #backToTop { display: none !important; }
      .section-title { page-break-after: avoid; }
      body { background: #fff; }
    }