/* Page styles for how-it-works.html */
:root {
      --primary: #1E3A8A;
      --primary-dark: #1D2C51;
      --primary-light: #E6F1FF;
      --foreground: #1f2937;
      --muted: #6b7280;
      --background: #fcfcfc;
      --card: #ffffff;
      --border: #e5e7eb;
      --secondary: #f3f4f6;
      --emerald: #059669;
      --emerald-light: #D1FAE5;
      --mono: 'DM Mono', 'Courier New', monospace;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      font-family: 'DM Sans', system-ui, sans-serif;
      background: var(--background);
      color: var(--foreground);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    /* ── Top accent bar ── */
    .top-bar {
      height: 4px;
      background: linear-gradient(90deg, var(--primary-dark), #2563EB);
    }

    /* ── Header ── */
    .nav-links { display: flex; align-items: center; gap: 4px; }
    .nav-link {
      font-size: 14px;
      font-weight: 500;
      color: var(--muted);
      text-decoration: none;
      padding: 6px 12px;
      border-radius: 5px;
      transition: background 0.15s, color 0.15s;
    }
    .nav-link:hover { background: var(--secondary); color: var(--foreground); }
    .nav-link.active { color: var(--primary); background: var(--primary-light); }
    .btn-primary {
      background: var(--primary);
      color: #fff;
      font-size: 13.5px;
      font-weight: 600;
      padding: 8px 18px;
      border-radius: 5px;
      text-decoration: none;
      transition: background 0.15s;
      white-space: nowrap;
    }
    .btn-primary:hover { background: var(--primary-dark); }

    /* ── Hero ── */
    .hero {
      background: linear-gradient(155deg, #0f1e42 0%, var(--primary) 55%, #1a4199 100%);
      padding: 80px 24px 0;
      position: relative;
      overflow: hidden;
    }
    .hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse 70% 60% at 50% 110%, rgba(37,99,235,0.2) 0%, transparent 65%);
      pointer-events: none;
    }
    .hero-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1fr 380px;
      gap: 48px;
      align-items: flex-end;
      position: relative;
      z-index: 1;
    }
    .hero-text { padding-bottom: 64px; }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.18);
      color: rgba(255,255,255,0.85);
      font-size: 11.5px;
      font-weight: 600;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      padding: 6px 14px;
      border-radius: 5px;
      margin-bottom: 24px;
    }
    .hero h1 {
      font-size: clamp(28px, 4vw, 46px);
      font-weight: 700;
      color: #fff;
      letter-spacing: -0.025em;
      margin-bottom: 16px;
      line-height: 1.13;
    }
    .hero-sub {
      font-size: 16px;
      color: rgba(255,255,255,0.65);
      max-width: 500px;
      line-height: 1.65;
      margin-bottom: 28px;
    }
    .hero-pills {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .hero-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.13);
      color: rgba(255,255,255,0.65);
      font-size: 12px;
      font-weight: 500;
      padding: 5px 12px;
      border-radius: 5px;
    }

    /* ── Hero process mini-flow ── */
    .hero-flow {
      background: #fff;
      border-radius: 5px 5px 0 0;
      padding: 22px;
      box-shadow: 0 -8px 40px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.06);
      position: relative;
      overflow: hidden;
    }
    .hero-flow::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--primary-dark), #2563EB);
    }
    .hero-flow-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }
    .hero-flow-title {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--foreground);
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }
    .hero-flow-badge {
      font-size: 10.5px;
      font-weight: 700;
      color: var(--primary);
      background: var(--primary-light);
      padding: 3px 9px;
      border-radius: 5px;
      letter-spacing: 0.04em;
    }
    .flow-step-mini {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 8px 0;
      border-bottom: 1px solid #f3f4f6;
    }
    .flow-step-mini:last-child { border-bottom: none; }
    .flow-mini-num {
      width: 22px; height: 22px;
      background: var(--primary);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 10px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
    }
    .flow-mini-label {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--foreground);
      flex: 1;
    }
    .flow-mini-check {
      width: 18px; height: 18px;
      background: var(--emerald-light);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }

    /* ── Nav pills bar ── */
    .nav-pills-bar {
      background: #fff;
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 66px;
      z-index: 40;
    }
    .nav-pills-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 24px;
      display: flex;
      align-items: center;
      overflow-x: auto;
      scrollbar-width: none;
    }
    .nav-pills-inner::-webkit-scrollbar { display: none; }
    .nav-pill {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      font-weight: 500;
      color: var(--muted);
      padding: 14px 16px;
      white-space: nowrap;
      text-decoration: none;
      border-bottom: 2px solid transparent;
      transition: color 0.15s, border-color 0.15s;
    }
    .nav-pill:hover { color: var(--foreground); }
    .nav-pill.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

    /* ── Page layout ── */
    .page-body {
      max-width: 1200px;
      margin: 0 auto;
      padding: 64px 24px 80px;
      display: grid;
      grid-template-columns: 210px 1fr;
      gap: 56px;
      align-items: start;
    }

    /* ── Sidebar ── */
    .sidebar {
      position: sticky;
      top: 112px;
    }
    .sidebar-label {
      font-size: 10.5px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 10px;
    }
    .sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
    .sidebar-link {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 9px 12px;
      border-radius: 5px;
      font-size: 13.5px;
      font-weight: 500;
      color: var(--muted);
      text-decoration: none;
      transition: background 0.15s, color 0.15s;
    }
    .sidebar-link:hover { background: var(--secondary); color: var(--foreground); }
    .sidebar-link.active { background: var(--primary-light); color: var(--primary); }
    .sidebar-link svg { flex-shrink: 0; opacity: 0.6; }
    .sidebar-link.active svg { opacity: 1; }
    .sidebar-step-num {
      width: 18px; height: 18px;
      background: var(--primary-light);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 9.5px;
      font-weight: 700;
      color: var(--primary);
      flex-shrink: 0;
    }
    .sidebar-link.active .sidebar-step-num {
      background: var(--primary);
      color: #fff;
    }

    .sidebar-demo-card {
      margin-top: 28px;
      border: 1px solid var(--border);
      border-radius: 5px;
      overflow: hidden;
    }
    .sidebar-demo-head {
      background: var(--primary);
      padding: 12px 14px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .sidebar-demo-head span {
      font-size: 12px;
      font-weight: 700;
      color: #fff;
      letter-spacing: 0.02em;
    }
    .sidebar-demo-body {
      padding: 14px;
      background: #fff;
    }
    .sidebar-demo-body p {
      font-size: 12.5px;
      color: var(--muted);
      line-height: 1.55;
      margin-bottom: 12px;
    }
    .sidebar-demo-btn {
      display: block;
      background: var(--primary-light);
      color: var(--primary);
      font-size: 12.5px;
      font-weight: 700;
      padding: 8px 12px;
      border-radius: 5px;
      text-decoration: none;
      text-align: center;
      transition: background 0.15s;
    }
    .sidebar-demo-btn:hover { background: #d0e3ff; }

    /* ── Main content ── */
    main { min-width: 0; }

    .section {
      margin-bottom: 68px;
      scroll-margin-top: 120px;
    }

    .section-eyebrow {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--primary);
      margin-bottom: 10px;
    }
    .section-eyebrow::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--primary-light);
      max-width: 60px;
    }
    .section h2 {
      font-size: clamp(19px, 2.5vw, 24px);
      font-weight: 700;
      color: var(--foreground);
      letter-spacing: -0.02em;
      margin-bottom: 8px;
      line-height: 1.25;
    }
    .section-intro {
      font-size: 15px;
      color: var(--muted);
      line-height: 1.7;
      margin-bottom: 28px;
      max-width: 580px;
    }

    /* ── Step header ── */
    .step-header {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 10px;
    }
    .step-num-badge {
      width: 40px; height: 40px;
      background: var(--primary);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
    }
    .step-label {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--primary);
    }

    /* ── Step detail card ── */
    .step-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 5px;
      overflow: hidden;
    }
    .step-card-top {
      padding: 20px 22px 16px;
      border-bottom: 1px solid var(--secondary);
    }
    .step-card-top p {
      font-size: 14.5px;
      color: var(--muted);
      line-height: 1.7;
    }
    .step-card-top p strong { color: var(--foreground); font-weight: 600; }
    .step-card-items {
      padding: 6px 0;
    }
    .step-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 11px 22px;
      border-bottom: 1px solid #f9fafb;
      transition: background 0.12s;
    }
    .step-item:last-child { border-bottom: none; }
    .step-item:hover { background: #fafbfc; }
    .step-item-dot {
      width: 7px; height: 7px;
      background: var(--primary);
      border-radius: 50%;
      flex-shrink: 0;
    }
    .step-item-text {
      font-size: 13.5px;
      font-weight: 500;
      color: var(--foreground);
      flex: 1;
    }
    .step-item-sub {
      font-size: 12px;
      color: var(--muted);
    }
    .step-item-badge {
      font-size: 10.5px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 3px;
      letter-spacing: 0.03em;
      flex-shrink: 0;
    }
    .step-item-badge.blue { background: var(--primary-light); color: var(--primary); }
    .step-item-badge.green { background: var(--emerald-light); color: var(--emerald); }
    .step-item-badge.grey { background: var(--secondary); color: var(--muted); }

    /* ── Step callout ── */
    .step-callout {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      background: var(--primary-light);
      border: 1px solid #c8dcf8;
      border-radius: 5px;
      padding: 14px 16px;
      margin-top: 12px;
      font-size: 13.5px;
      color: var(--primary);
      font-weight: 500;
      line-height: 1.55;
    }
    .step-callout svg { flex-shrink: 0; margin-top: 1px; }

    /* ── Certificate fields preview ── */
    .cert-fields-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .cert-field {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 5px;
      padding: 13px 15px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      transition: border-color 0.15s;
    }
    .cert-field:hover { border-color: #bbd3f8; }
    .cert-field-num {
      width: 22px; height: 22px;
      background: var(--primary-light);
      border-radius: 5px;
      display: flex; align-items: center; justify-content: center;
      font-size: 10px;
      font-weight: 700;
      color: var(--primary);
      flex-shrink: 0;
    }
    .cert-field-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--foreground);
    }
    .cert-field-desc {
      font-size: 12px;
      color: var(--muted);
      line-height: 1.45;
      margin-top: 2px;
    }

    /* ── Verification steps ── */
    .verify-steps {
      display: flex;
      flex-direction: column;
      gap: 0;
      position: relative;
    }
    .verify-steps::before {
      content: '';
      position: absolute;
      left: 17px;
      top: 22px;
      bottom: 22px;
      width: 2px;
      background: var(--border);
    }
    .verify-step {
      display: flex;
      align-items: flex-start;
      gap: 16px;
      padding: 0 0 24px 0;
      position: relative;
    }
    .verify-step:last-child { padding-bottom: 0; }
    .verify-step-num {
      width: 36px; height: 36px;
      background: var(--primary);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
      position: relative;
      z-index: 1;
    }
    .verify-step-body { padding-top: 6px; }
    .verify-step-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--foreground);
      margin-bottom: 4px;
    }
    .verify-step-desc {
      font-size: 14px;
      color: var(--muted);
      line-height: 1.6;
    }
    .verify-step-tag {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      margin-top: 8px;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--primary);
      background: var(--primary-light);
      padding: 3px 10px;
      border-radius: 5px;
      font-family: var(--mono);
      letter-spacing: 0.03em;
    }

    /* ── Audience blocks ── */
    .audience-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .audience-card {
      border: 1px solid var(--border);
      border-radius: 5px;
      overflow: hidden;
    }
    .audience-card-head {
      padding: 14px 18px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .audience-card-head.participants { background: #f0fdf8; border-bottom: 1px solid #a7f3d0; }
    .audience-card-head.organisations { background: var(--primary-light); border-bottom: 1px solid #c8dcf8; }
    .audience-card-icon {
      width: 30px; height: 30px;
      border-radius: 5px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .audience-card-icon.green { background: var(--emerald-light); }
    .audience-card-icon.blue { background: #dbeafe; }
    .audience-card-title {
      font-size: 13.5px;
      font-weight: 700;
    }
    .audience-card-title.green { color: #065f46; }
    .audience-card-title.blue { color: var(--primary); }
    .audience-card-sub {
      font-size: 11.5px;
      color: var(--muted);
      margin-top: 1px;
    }
    .audience-card-items { padding: 8px 0; }
    .audience-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 18px;
      font-size: 13.5px;
      font-weight: 500;
      color: var(--foreground);
      border-bottom: 1px solid #f9fafb;
    }
    .audience-item:last-child { border-bottom: none; }
    .audience-item svg { flex-shrink: 0; }

    /* ── Closing CTA ── */
    .closing-cta {
      background: linear-gradient(145deg, var(--primary-dark), var(--primary));
      border-radius: 5px;
      padding: 36px 36px 40px;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 24px;
      align-items: center;
      position: relative;
      overflow: hidden;
    }
    .closing-cta::after {
      content: '';
      position: absolute;
      right: -40px; top: -40px;
      width: 220px; height: 220px;
      background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
      pointer-events: none;
    }
    .closing-cta-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.5);
      margin-bottom: 10px;
    }
    .closing-cta h3 {
      font-size: clamp(18px, 2vw, 22px);
      font-weight: 700;
      color: #fff;
      letter-spacing: -0.02em;
      margin-bottom: 8px;
    }
    .closing-cta p {
      font-size: 14px;
      color: rgba(255,255,255,0.6);
      line-height: 1.6;
      max-width: 420px;
    }
    .closing-cta-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex-shrink: 0;
    }
    .cta-btn-white {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #fff;
      color: var(--primary);
      font-size: 14px;
      font-weight: 700;
      padding: 12px 22px;
      border-radius: 5px;
      text-decoration: none;
      white-space: nowrap;
      transition: opacity 0.15s;
    }
    .cta-btn-white:hover { opacity: 0.88; }
    .cta-btn-ghost {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.15);
      color: rgba(255,255,255,0.75);
      font-size: 13.5px;
      font-weight: 600;
      padding: 11px 22px;
      border-radius: 5px;
      text-decoration: none;
      white-space: nowrap;
      transition: background 0.15s;
    }
    .cta-btn-ghost:hover { background: rgba(255,255,255,0.13); }

    /* ── Result words panel ── */
    .result-panel {
      background: var(--secondary);
      border: 1px solid var(--border);
      border-radius: 5px;
      padding: 28px 32px;
      text-align: center;
      margin-bottom: 20px;
    }
    .result-panel .label {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 18px;
    }
    .result-words {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .result-word {
      font-size: 17px;
      font-weight: 700;
      color: var(--primary);
      padding: 7px 18px;
      border: 1px solid #c8dcf8;
      background: var(--primary-light);
      border-radius: 5px;
      letter-spacing: -0.01em;
    }
    .result-sep {
      font-size: 16px;
      color: var(--border);
      font-weight: 300;
    }



    /* ── Responsive ── */
    @media (max-width: 960px) {
      .hero-inner { grid-template-columns: 1fr; }
      .hero-flow { display: none; }
      .hero-text { padding-bottom: 56px; }
    }
    @media (max-width: 900px) {
      .page-body { grid-template-columns: 1fr; gap: 0; padding: 32px 20px 60px; }
      .sidebar { display: none; }
      .cert-fields-grid { grid-template-columns: 1fr; }
      .audience-grid { grid-template-columns: 1fr; }
      .closing-cta { grid-template-columns: 1fr; }
      .closing-cta-actions { flex-direction: row; }
    }
    @media (max-width: 640px) {
      .hero { padding: 52px 20px 0; }
      .nav-links { display: none; }
    }
