:root {
      --background: #FAF6EF;
      --foreground: #17323B;
      --primary: #1F6FB2;
      --primary-foreground: #FAF6EF;
      --secondary: #F4EDDD;
      --accent: #C2573A;
      --muted: #526A74;
      --border: #DCD2B8;
      --radius: 4px;
      --font-heading: 'El Messiri', system-ui, sans-serif;
      --font-body: 'Tajawal', system-ui, sans-serif;
    }

    /* Additional functional tokens derived strictly from root variables */
    :root {
      color-scheme: light;
      --glaze-mint: color-mix(in srgb, var(--primary) 35%, #8FC7B9);
      --glaze-honey: color-mix(in srgb, var(--accent) 45%, #D9A13B);
      --grout-line: var(--border);
      --plaster-soft: var(--secondary);
      --ink-75: color-mix(in srgb, var(--foreground) 75%, transparent);
      --ink-55: color-mix(in srgb, var(--foreground) 55%, transparent);
      --ink-16: color-mix(in srgb, var(--foreground) 16%, transparent);
      --ink-08: color-mix(in srgb, var(--foreground) 8%, transparent);
      --primary-12: color-mix(in srgb, var(--primary) 12%, transparent);
      --primary-24: color-mix(in srgb, var(--primary) 24%, transparent);
      --accent-15: color-mix(in srgb, var(--accent) 15%, transparent);
      --mint-tint: color-mix(in srgb, var(--glaze-mint) 14%, var(--background));
    }

    /* Global reset and core physics */
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      overflow-x: clip;
      background-color: var(--background);
      color: var(--foreground);
      font-family: var(--font-body);
      font-size: 16px;
      line-height: 1.75;
      text-rendering: optimizeLegibility;
      -webkit-font-smoothing: antialiased;
      scroll-behavior: smooth;
    }

    ::selection {
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button, input, select, textarea {
      font-family: inherit;
      color: inherit;
    }

    img {
      max-width: 100%;
      height: auto;
      display: block;
    }

    /* Typography */
    h1, h2, h3, h4, h5, h6 {
      font-family: var(--font-heading);
      font-weight: 700;
      line-height: 1.18;
      color: var(--foreground);
    }

    .container {
      width: 100%;
      max-width: 1240px;
      margin-inline: auto;
      padding-inline: clamp(1.25rem, 4vw, 2.5rem);
    }

    /* Zellij Anchor Chip */
    .chip-label {
      display: inline-flex;
      align-items: center;
      gap: 0.55rem;
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      color: var(--primary);
      margin-bottom: 0.9rem;
    }
    .chip-label .zellij-dot {
      width: 10px;
      height: 10px;
      background-color: var(--primary);
      border-radius: min(var(--radius), 2px);
      box-shadow: inset 1px 1px 0 color-mix(in srgb, var(--primary-foreground) 30%, transparent);
      display: inline-block;
    }
    .chip-label.accent-chip {
      color: var(--accent);
    }
    .chip-label.accent-chip .zellij-dot {
      background-color: var(--accent);
    }
    .chip-label.mint-chip {
      color: color-mix(in srgb, var(--foreground) 85%, var(--primary));
    }
    .chip-label.mint-chip .zellij-dot {
      background-color: var(--glaze-mint);
    }

    /* Header & Navigation */
    .site-header {
      position: relative;
      z-index: 40;
      background-color: var(--background);
      border-bottom: 1px solid var(--ink-16);
      padding-block: 1rem;
    }
    .nav-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }
    .brand-wrap {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-family: var(--font-heading);
      font-size: 1.32rem;
      font-weight: 700;
      color: var(--foreground);
      /* The header ran out of room and everything broke mid-word: the brand
         name over two lines, every nav label over two lines, the CTA too. */
      flex-shrink: 0;
      white-space: nowrap;
      text-decoration: none;
    }
    .brand-icon {
      width: 32px;
      height: 32px;
      flex-shrink: 0;
      color: var(--primary);
    }
    .brand-sub {
      display: block;
      white-space: nowrap;
      font-family: var(--font-body);
      font-size: 0.68rem;
      font-weight: 500;
      color: var(--muted);
      margin-top: -0.2rem;
    }

    .nav-chips {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      list-style: none;
      flex-wrap: nowrap;
      margin: 0;
      padding: 0;
    }
    .nav-chip-link {
      display: inline-flex;
      align-items: center;
      white-space: nowrap;
      text-decoration: none;
      padding: 0.4rem 0.72rem;
      font-size: 0.8rem;
      font-weight: 700;
      border-radius: var(--radius);
      background-color: var(--secondary);
      border: 1px solid var(--grout-line);
      color: var(--foreground);
      transition: all 0.2s ease;
    }
    .nav-chip-link:hover, .nav-chip-link:focus-visible {
      background-color: var(--primary);
      color: var(--primary-foreground);
      border-color: var(--primary);
    }

    .nav-cta-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      flex-shrink: 0;
      text-decoration: none;
      gap: 0.5rem;
      background-color: var(--accent);
      color: var(--primary-foreground);
      padding: 0.55rem 1.25rem;
      font-size: 0.85rem;
      font-weight: 700;
      border-radius: var(--radius);
      border: 1px solid color-mix(in srgb, var(--accent) 80%, var(--foreground));
      box-shadow: inset 0 1px 0 color-mix(in srgb, var(--primary-foreground) 25%, transparent);
      transition: background-color 0.2s ease, transform 0.15s ease;
    }
    .nav-cta-btn:hover, .nav-cta-btn:focus-visible {
      background-color: color-mix(in srgb, var(--accent) 85%, var(--foreground));
      transform: translateY(-1px);
    }

    /* Frise Strip Separators */
    /* Zellij divider. The tile is a background image that repeats at its own
       size, so each star keeps its proportions. The original scaled a single
       160x36 viewBox across the whole page width (preserveAspectRatio="none"),
       which stretched every star about 8x sideways into a dart shape. */

    /* Same divider on the footer's dark ground. */

    /* ---- The three voices (mirrors _VoiceKey in dialogue_page.dart) ---- */
    .voices-block { margin-top: 3rem; }
    .voices-head { text-align: center; margin-bottom: 1.4rem; }
    .voices-kicker {
      font-family: var(--font-heading);
      font-size: clamp(1.15rem, 2.4vw, 1.45rem);
      font-weight: 700;
      color: var(--foreground);
    }
    .voices-lead { margin-top: .4rem; color: var(--ink-75); font-size: .98rem; }

    .voice-key {
      max-width: 560px;
      margin: 0 auto;
      background: var(--background);
      border: 1px solid var(--grout-line);
      /* 20px = AppTheme.radiusLarge, 16px padding = the Flutter card's inset */
      border-radius: 20px;
      padding: 16px;
    }
    .voice-row { display: flex; align-items: flex-start; gap: 12px; }
    .voice-badge {
      flex: none;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--primary-24);
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    /* The middle row carries the accent: it is the turn about the reader's own
       child, and the one other material leaves out. */
    .voice-badge.is-accent { background: var(--primary); color: #fff; }
    .voice-badge .material-symbols-outlined { font-size: 18px; }
    .voice-text {
      padding-top: 4px;
      font-size: .95rem;
      line-height: 1.6;
      color: var(--ink-75);
    }
    .voice-text strong { color: var(--foreground); font-weight: 700; }
    .voice-text strong.is-accent { font-weight: 800; }
    /* A rule, not a gap, so the three rows read as one conversation running
       down the card. 2px wide, inset 15px so it centres under the 32px badge. */
    .voice-thread {
      height: 14px;
      margin-inline-start: 15px;
      width: 2px;
      background: var(--grout-line);
    }


    /* Entrance: opacity and offset only, never scale (scaling re-rasterises
       text every frame). 14px rise and 320ms per part, 90ms apart — the same
       numbers as OnboardingEntrance in the app. */
    .voice-row[data-beat],
    .voice-thread[data-beat] {
      opacity: 0;
      transform: translateY(14px);
    }
    .voice-key.is-in .voice-row,
    .voice-key.is-in .voice-thread {
      opacity: 1;
      transform: translateY(0);
      transition: opacity 320ms ease-out, transform 320ms ease-out;
    }
    .voice-key.is-in [data-beat="0"] { transition-delay: 0ms; }
    .voice-key.is-in [data-beat="1"] { transition-delay: 90ms; }
    .voice-key.is-in [data-beat="2"] { transition-delay: 180ms; }
    @media (prefers-reduced-motion: reduce) {
      .voice-row[data-beat],
      .voice-thread[data-beat] { opacity: 1; transform: none; }
      .voice-key.is-in .voice-row,
      .voice-key.is-in .voice-thread { transition: none; }
    }

    /* Brand + promises block in the hero showcase */
    .brand-promise {
      background: var(--foreground);
      color: var(--background);
      padding: 1.4rem 1.5rem;
      border-radius: min(var(--radius), 6px);
    }
    .brand-promise-head {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      padding-bottom: 1rem;
      margin-bottom: 1rem;
      border-bottom: 1px solid rgba(250, 246, 239, 0.16);
    }
    .brand-promise-head img { flex: none; }
    .brand-promise-head strong {
      display: block;
      font-family: var(--font-heading);
      font-size: 1.22rem;
      line-height: 1.3;
    }
    .brand-promise-head span {
      font-size: 0.85rem;
      opacity: 0.75;
    }
    .brand-promise-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: grid;
      gap: 0.6rem;
      font-size: 0.95rem;
    }
    .brand-promise-list li {
      display: flex;
      align-items: flex-start;
      gap: 0.6rem;
    }
    .brand-promise-list li::before {
      content: "";
      flex: none;
      width: 7px;
      height: 7px;
      margin-top: 0.62rem;
      border-radius: 50%;
      background: var(--accent);
    }

    /* Live demo launcher + modal (the real note_viewer engine from /demo/) */
    .live-demo-launch {
      margin-top: 1.8rem;
      padding-top: 1.6rem;
      border-top: 1px dashed var(--grout-line);
    }
    .live-demo-note {
      font-size: 0.95rem;
      color: var(--ink-75);
      margin-bottom: 1.1rem;
    }
    .open-live-demo svg { width: 20px; height: 20px; flex: none; }

    /* Lesson Demo Dedicated Cards Across the Page */
    .lesson-demo-card {
      background: var(--background);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.8rem;
      margin-top: 2rem;
      box-shadow: 0 8px 24px rgba(23, 50, 59, 0.06);
      display: flex;
      flex-direction: column;
      gap: 1rem;
      text-align: right;
      transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }
    .lesson-demo-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 32px rgba(23, 50, 59, 0.1);
      border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    }
    .lesson-demo-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.75rem;
    }
    .lesson-demo-title {
      font-family: var(--font-heading);
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--foreground);
      margin: 0;
      line-height: 1.4;
    }
    .lesson-demo-desc {
      font-size: 0.95rem;
      color: var(--ink-75);
      line-height: 1.65;
      margin: 0;
    }
    .lesson-demo-footer {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      margin-top: 0.5rem;
    }

    .live-modal {
      position: fixed;
      inset: 0;
      z-index: 1100;
      display: flex;
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease, visibility 0.25s ease;
      background: rgba(23, 50, 59, 0.72);
      align-items: center;
      justify-content: center;
      padding: 18px 14px;
      overscroll-behavior: contain;
    }
    .live-modal.open {
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
    }

    .live-phone {
      width: 100%;
      max-width: 430px;
      height: min(860px, 94vh);
      background: #0B1416;
      border: 6px solid #0B1416;
      border-radius: 36px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.55);
    }
    .live-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex: none;
      padding: 10px 14px;
      background: var(--primary);
      color: var(--primary-foreground);
      font-family: var(--font-heading);
      font-weight: 700;
      font-size: 0.95rem;
    }
    .live-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 0;
      cursor: pointer;
      background: rgba(255, 255, 255, 0.18);
      color: #fff;
      font-size: 1rem;
      line-height: 1;
    }
    .live-body {
      flex: 1;
      position: relative;
      background: var(--background);
      overflow: hidden;
    }
    .live-loader {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      text-align: center;
      padding: 20px;
      background: var(--background);
    }
    .live-spinner {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      border: 4px solid var(--primary-24);
      border-top-color: var(--primary);
      animation: live-spin 0.9s linear infinite;
    }
    @keyframes live-spin { to { transform: rotate(360deg); } }
    .live-loader-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem; }
    .live-loader-hint { font-size: 0.85rem; color: var(--ink-55); }
    /* visibility, not display: a display:none host measures 0x0 at the moment
       Flutter creates its view and never re-measures, which renders blank. */
    #demo-host { width: 100%; height: 100%; position: relative; overflow: hidden; visibility: hidden; }
    @media (prefers-reduced-motion: reduce) { .live-spinner { animation: none; } }

    /* Hero Section */
    .hero-section {
      position: relative;
      padding-top: clamp(3rem, 6vh, 5.5rem);
      padding-bottom: clamp(3.5rem, 7vh, 6rem);
      background-color: var(--background);
      border-bottom: 2px solid var(--grout-line);
    }
    .hero-grid {
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: clamp(2rem, 5vw, 4rem);
      align-items: center;
    }
    .hero-masthead {
      font-size: clamp(2.2rem, 4.8vw, 3.8rem);
      letter-spacing: -0.01em;
      margin-bottom: 1.25rem;
      line-height: 1.12;
    }
    .hero-masthead .accent-word {
      color: var(--accent);
      display: inline-block;
    }
    .hero-masthead .primary-word {
      color: var(--primary);
    }
    .hero-lede {
      font-size: clamp(1.05rem, 1.4vw, 1.25rem);
      color: var(--ink-75);
      line-height: 1.8;
      max-width: 58ch;
      margin-bottom: 2rem;
    }

    /* Action Buttons Cluster */
    .cta-cluster {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.9rem;
      margin-bottom: 2.25rem;
    }
    .btn-terracotta {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.65rem;
      background-color: var(--accent);
      color: var(--primary-foreground);
      padding: 0.9rem 1.8rem;
      font-size: 1.05rem;
      font-weight: 700;
      border-radius: var(--radius);
      border: 1px solid color-mix(in srgb, var(--accent) 80%, var(--foreground));
      box-shadow: inset 0 1px 0 color-mix(in srgb, var(--primary-foreground) 25%, transparent);
      cursor: pointer;
      transition: background-color 0.2s ease, transform 0.15s ease;
    }
    .btn-terracotta:hover, .btn-terracotta:focus-visible {
      background-color: color-mix(in srgb, var(--accent) 85%, var(--foreground));
      transform: translateY(-2px);
    }

    .btn-store {
      display: inline-flex;
      align-items: center;
      gap: 0.65rem;
      background-color: var(--secondary);
      color: var(--foreground);
      padding: 0.8rem 1.25rem;
      font-size: 0.9rem;
      font-weight: 600;
      border-radius: var(--radius);
      border: 1px solid var(--grout-line);
      box-shadow: inset 0 1px 0 color-mix(in srgb, var(--primary-foreground) 35%, transparent);
      transition: all 0.2s ease;
    }
    .btn-store svg {
      width: 20px;
      height: 20px;
      color: var(--primary);
      flex-shrink: 0;
    }
    .btn-store:hover, .btn-store:focus-visible {
      background-color: var(--background);
      border-color: var(--primary);
      color: var(--primary);
      transform: translateY(-1px);
    }

    /* Hero Fold Facts Bar */
    .hero-facts-bar {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
      padding-top: 1.5rem;
      border-top: 2px solid var(--grout-line);
    }
    .fact-item {
      display: flex;
      align-items: flex-start;
      gap: 0.65rem;
    }
    .fact-tile-icon {
      width: 20px;
      height: 20px;
      background-color: var(--primary);
      border-radius: min(var(--radius), 2px);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--primary-foreground);
      flex-shrink: 0;
      margin-top: 0.2rem;
    }
    .fact-tile-icon svg {
      width: 12px;
      height: 12px;
    }
    .fact-text {
      font-size: 0.92rem;
      font-weight: 600;
      line-height: 1.5;
      color: var(--foreground);
    }

    /* Hero Visual Panel: La Colonne & Courtyard Tilework */
    .hero-zellij-showcase {
      position: relative;
      background-color: var(--secondary);
      border: 2px solid var(--grout-line);
      border-radius: min(var(--radius), 6px);
      padding: 1.5rem;
      box-shadow: 0 4px 20px var(--ink-08);
      overflow: hidden;
    }
    .hero-showcase-inner {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }
    .hero-zellij-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--grout-line);
      padding-bottom: 0.75rem;
    }
    .hero-badge-tag {
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--primary);
      background-color: var(--primary-12);
      padding: 0.25rem 0.6rem;
      border-radius: var(--radius);
      border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    }
    .hero-concept-card {
      background-color: var(--background);
      border: 1px solid var(--grout-line);
      border-radius: var(--radius);
      padding: 1.25rem;
      position: relative;
    }
    .concept-title {
      font-size: 1.15rem;
      margin-bottom: 0.5rem;
      color: var(--foreground);
    }
    .concept-quote {
      font-size: 0.92rem;
      color: var(--ink-75);
      line-height: 1.6;
    }
    .concept-footer-pill {
      margin-top: 0.9rem;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--accent);
      background-color: var(--accent-15);
      padding: 0.25rem 0.65rem;
      border-radius: var(--radius);
    }

    /* Section Base */
    .section-wrap {
      padding-block: clamp(4rem, 8vh, 6.5rem);
      position: relative;
    }
    .section-head {
      margin-bottom: clamp(2rem, 4.5vw, 3.25rem);
      max-width: 68ch;
    }
    .section-title {
      font-size: clamp(1.8rem, 3.4vw, 2.6rem);
      line-height: 1.18;
      margin-bottom: 0.75rem;
    }
    .section-subtitle {
      font-size: 1.05rem;
      color: var(--ink-75);
      line-height: 1.7;
    }

    /* SHOWPIECE: "جرّب سؤالاً واحداً" — Interactive Feynman Tile */
    .demo-section {
      background-color: var(--secondary);
      border-top: 2px solid var(--grout-line);
      border-bottom: 2px solid var(--grout-line);
    }
    .demo-chalk-bg {
      position: absolute;
      inset: 0;
      opacity: 0.04;
      pointer-events: none;
    }


    /* Explanation Accordion / Stepper */
    @keyframes fadeInStep {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Section: "كيف يعمل الدرس" — 4-Step Exact Order */
    .how-section {
      background-color: var(--background);
    }
    .how-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.25rem;
    }
    .how-tile-card {
      background-color: var(--secondary);
      border: 2px solid var(--grout-line);
      border-radius: min(var(--radius), 6px);
      padding: 1.5rem 1.25rem;
      display: flex;
      flex-direction: column;
      position: relative;
      transition: transform 0.25s ease, border-color 0.25s ease;
    }
    .how-tile-card:hover {
      transform: translateY(-3px);
      border-color: var(--primary);
    }
    .how-step-badge {
      width: 44px;
      height: 44px;
      background-color: var(--primary);
      color: var(--primary-foreground);
      border-radius: min(var(--radius), 4px);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-heading);
      font-size: 1.4rem;
      font-weight: 700;
      margin-bottom: 1.25rem;
      box-shadow: inset 1px 1px 0 color-mix(in srgb, var(--primary-foreground) 30%, transparent);
    }
    .how-tile-card:nth-child(2) .how-step-badge {
      background-color: var(--glaze-mint);
      color: var(--foreground);
    }
    .how-tile-card:nth-child(3) .how-step-badge {
      background-color: var(--accent);
    }
    .how-tile-card:nth-child(4) .how-step-badge {
      background-color: color-mix(in srgb, var(--primary) 75%, var(--foreground));
    }
    .how-card-title {
      font-size: 1.18rem;
      margin-bottom: 0.65rem;
      line-height: 1.25;
    }
    .how-card-desc {
      font-size: 0.92rem;
      color: var(--ink-75);
      line-height: 1.65;
    }

    /* Section: "تشكيلة واسعة من العناصر التفاعلية" (Strictly Qualitative) */
    .elements-section {
      background-color: var(--secondary);
      border-top: 2px solid var(--grout-line);
      border-bottom: 2px solid var(--grout-line);
    }
    .elements-bento {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.25rem;
    }
    .bento-cell {
      background-color: var(--background);
      border: 2px solid var(--grout-line);
      border-radius: min(var(--radius), 6px);
      padding: 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }
    .bento-cell.cell-wide {
      grid-column: span 2;
    }
    .bento-icon-wrap {
      width: 42px;
      height: 42px;
      background-color: var(--secondary);
      border: 1px solid var(--grout-line);
      border-radius: min(var(--radius), 4px);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--primary);
    }
    .bento-cell-title {
      font-size: 1.12rem;
      color: var(--foreground);
    }
    .bento-cell-desc {
      font-size: 0.92rem;
      color: var(--ink-75);
      line-height: 1.6;
    }
    .mini-interactive-visual {
      margin-top: 0.5rem;
      background-color: var(--secondary);
      border: 1px solid var(--grout-line);
      border-radius: var(--radius);
      padding: 0.75rem 1rem;
      font-size: 0.85rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: var(--foreground);
    }
    .mini-pill {
      background-color: var(--primary);
      color: var(--primary-foreground);
      padding: 0.2rem 0.55rem;
      border-radius: min(var(--radius), 2px);
      font-size: 0.75rem;
      font-weight: 700;
    }

    /* Section: الدافعية ونظام التحفيز (Mint Zone) */
    .motivation-section {
      background-color: var(--mint-tint);
      border-bottom: 2px solid var(--grout-line);
    }
    /* Single column since the fabricated streak widget was removed — a 2-column
       grid left an empty half next to the text. */
    .motivation-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 2rem;
    }

    /* Section: المتابعة — صفحة "نجاحي" vs تقرير الولي */
    .tracking-section {
      background-color: var(--background);
    }
    .dual-columns {
      display: grid;
      grid-template-columns: 1fr;
      gap: clamp(1.5rem, 3.5vw, 2rem);
      max-width: 760px;
      margin-inline: auto;
    }
    /* Phone beside the text. A screenshot sitting alone in a full-width band
       either has to be blown up (unreadable) or float in dead space; put it in
       its own column and it is readable at a sane size with no gap to fill. */
    .dual-card {
      background-color: var(--secondary);
      border: 2px solid var(--grout-line);
      border-radius: min(var(--radius), 6px);
      overflow: hidden;
      display: grid;
      grid-template-columns: 210px 1fr;
      gap: clamp(1.2rem, 3vw, 1.8rem);
      align-items: center;
      padding: clamp(1.2rem, 3vw, 1.6rem);
    }
    .dual-card-media { min-width: 0; }
    .dual-card-media img {
      display: block;
      width: 100%;
      height: auto;
      border-radius: 12px;
      border: 1px solid var(--grout-line);
    }
    .dual-card-body {
      min-width: 0;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }
    .dual-title {
      font-size: 1.35rem;
      color: var(--foreground);
    }
    .dual-desc {
      font-size: 0.95rem;
      color: var(--ink-75);
      line-height: 1.65;
    }
    .dual-items-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
      margin-top: 0.5rem;
    }
    .dual-item {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      font-size: 0.92rem;
      font-weight: 600;
      color: var(--foreground);
      background-color: var(--background);
      border: 1px solid var(--grout-line);
      border-radius: var(--radius);
      padding: 0.6rem 0.85rem;
    }
    .dual-item-icon {
      width: 18px;
      height: 18px;
      color: var(--primary);
      flex-shrink: 0;
    }
    .dual-item.parent-item .dual-item-icon {
      color: var(--accent);
    }

    /* Section: الدفع بلا مفاجآت (Flexibility) */
    .payment-section {
      background-color: var(--secondary);
      border-top: 2px solid var(--grout-line);
      border-bottom: 2px solid var(--grout-line);
    }
    .payment-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.25rem;
    }
    .pay-card {
      background-color: var(--background);
      border: 2px solid var(--grout-line);
      border-radius: min(var(--radius), 6px);
      padding: 1.75rem 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }
    .pay-badge-icon {
      width: 38px;
      height: 38px;
      background-color: var(--primary-12);
      border-radius: min(var(--radius), 4px);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--primary);
    }
    .pay-title {
      font-size: 1.15rem;
      color: var(--foreground);
    }
    .pay-desc {
      font-size: 0.92rem;
      color: var(--ink-75);
      line-height: 1.6;
    }

    /* Section: البنية التقنية (Reliability) */
    .tech-section {
      background-color: var(--background);
    }
    .tech-bar-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
    }
    .tech-pill-box {
      background-color: var(--secondary);
      border: 2px solid var(--grout-line);
      border-radius: min(var(--radius), 6px);
      padding: 1.5rem;
      display: flex;
      gap: 1rem;
      align-items: flex-start;
    }
    .tech-icon-square {
      width: 40px;
      height: 40px;
      background-color: var(--primary);
      color: var(--primary-foreground);
      border-radius: min(var(--radius), 4px);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .tech-content h4 {
      font-size: 1.05rem;
      margin-bottom: 0.35rem;
    }
    .tech-content p {
      font-size: 0.88rem;
      color: var(--ink-75);
      line-height: 1.55;
    }

    /* Section: الختام وعرض الوحدة المجانية */
    .offer-section {
      background-color: var(--secondary);
      border-top: 2px solid var(--grout-line);
      border-bottom: 2px solid var(--grout-line);
      position: relative;
    }
    .offer-card {
      background-color: var(--background);
      border: 2px solid var(--grout-line);
      border-radius: min(var(--radius), 8px);
      padding: clamp(2rem, 5vw, 3.5rem);
      text-align: center;
      max-width: 880px;
      margin-inline: auto;
      box-shadow: 0 8px 36px var(--ink-08);
      position: relative;
    }
    .offer-title {
      font-size: clamp(1.9rem, 3.6vw, 2.75rem);
      margin-bottom: 1.25rem;
    }
    .offer-lede {
      font-size: 1.15rem;
      color: var(--ink-75);
      line-height: 1.75;
      max-width: 58ch;
      margin-inline: auto;
      margin-bottom: 2rem;
    }
    .offer-checklist {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1rem 1.5rem;
      margin-bottom: 2.25rem;
    }
    .offer-check-item {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--foreground);
    }
    .offer-check-item svg {
      width: 18px;
      height: 18px;
      color: var(--accent);
    }

    /* Site Footer */
    .site-footer {
      background-color: var(--foreground);
      color: var(--background);
      padding-top: clamp(3.5rem, 7vh, 5rem);
      padding-bottom: 0;
      position: relative;
    }
    .footer-top {
      display: grid;
      grid-template-columns: 1.5fr 1fr 1fr;
      gap: clamp(2rem, 5vw, 4rem);
      margin-bottom: 3.5rem;
    }
    .footer-brand-wrap {
      display: inline-block;
      font-family: var(--font-heading);
      font-size: clamp(1.8rem, 3.2vw, 2.5rem);
      font-weight: 700;
      color: var(--background);
      margin-bottom: 1rem;
    }
    .footer-brand-wrap span {
      color: var(--glaze-honey);
    }
    .footer-desc {
      font-size: 0.95rem;
      color: color-mix(in srgb, var(--background) 72%, transparent);
      line-height: 1.7;
      max-width: 44ch;
    }
    .footer-col-title {
      font-family: var(--font-heading);
      font-size: 1.15rem;
      color: var(--background);
      margin-bottom: 1.25rem;
    }
    .footer-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.65rem;
    }
    .footer-link {
      font-size: 0.9rem;
      color: color-mix(in srgb, var(--background) 70%, transparent);
      transition: color 0.2s ease;
    }
    .footer-link:hover, .footer-link:focus-visible {
      color: var(--glaze-honey);
    }
    .footer-bottom-bar {
      border-top: 1px solid color-mix(in srgb, var(--background) 15%, transparent);
      padding-block: 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.85rem;
      color: color-mix(in srgb, var(--background) 60%, transparent);
    }

    /* Interactive Download Modal (when clicking CTA) */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background-color: color-mix(in srgb, var(--foreground) 60%, transparent);
      z-index: 999;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      backdrop-filter: blur(4px);
      overscroll-behavior: contain;
    }
    .modal-backdrop.active {
      display: flex;
    }
    .modal-box {
      background-color: var(--background);
      border: 2px solid var(--grout-line);
      border-radius: min(var(--radius), 6px);
      max-width: 500px;
      width: 100%;
      padding: 2rem;
      position: relative;
      box-shadow: 0 10px 40px var(--ink-16);
      animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes modalPop {
      from { opacity: 0; transform: scale(0.94); }
      to { opacity: 1; transform: scale(1); }
    }
    .modal-close-btn {
      position: absolute;
      top: 1rem;
      left: 1rem;
      background: none;
      border: none;
      font-size: 1.5rem;
      color: var(--muted);
      cursor: pointer;
      line-height: 1;
    }

    /* Responsive adjustments */
    @media (max-width: 1023px) {
      .hero-grid {
        grid-template-columns: 1fr;
      }
      .how-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      .elements-bento {
        grid-template-columns: 1fr;
      }
      .bento-cell.cell-wide {
        grid-column: span 1;
      }
      .motivation-grid {
        grid-template-columns: 1fr;
      }
      .dual-columns {
        grid-template-columns: 1fr;
      }
      .payment-grid {
        grid-template-columns: 1fr;
      }
      .tech-bar-grid {
        grid-template-columns: 1fr;
      }
      .footer-top {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 1100px) {
      .nav-chips { display: none; }
    }
    @media (max-width: 767px) {
      .brand-sub {
        display: none;
      }
      .nav-inner {
        gap: 0.5rem;
      }
      .brand-wrap {
        font-size: 1.18rem;
      }
      .nav-cta-btn {
        padding: 0.42rem 0.65rem;
        font-size: 0.78rem;
      }
      /* Phone above the text once there is no room for two columns. It takes
         the full card width on purpose: a 576px-wide screenshot shrunk to a
         200px thumbnail is unreadable, which defeats the point of showing a
         real screen. At full width it renders near its own scale. */
      .dual-card {
        grid-template-columns: 1fr;
        gap: 1.1rem;
      }
      .dual-card-media {
        max-width: none;
      }
      .how-grid {
        grid-template-columns: 1fr;
      }
      .hero-facts-bar {
        grid-template-columns: 1fr;
        gap: 0.9rem;
      }
      .footer-bottom-bar {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
      }
    }
