/* ===========================================================================
   Kwezr web brand kit
   ---------------------------------------------------------------------------
   The single stylesheet behind the public landing page. Organised as cascade
   layers so specificity stays predictable:

     tokens      design decisions only — colour, type, space, radius, elevation
     base        element defaults and the page shell
     components  every reusable block, prefixed `k-`
     utilities   single-purpose helpers, always last so they win

   Conventions
   -----------
   • Components are `k-<block>`, variants `k-<block>--<variant>`, parts
     `k-<block>__<part>`. Nothing outside this file should invent a `k-` class.
   • Never hard-code a colour, radius or spacing value in a component — read a
     token. Tokens are the only place a raw value belongs.
   • Direction is handled with logical properties (`inset-inline`,
     `padding-inline`, `margin-inline`) so Arabic RTL needs no overrides. Where
     a rule genuinely cannot be expressed logically, scope it to `[dir="rtl"]`.
   • Font files are referenced relatively so Django's ManifestStaticFilesStorage
     rewrites them to hashed paths during collectstatic.
   =========================================================================== */

@layer tokens, base, components, utilities;

/* ── Fonts ─────────────────────────────────────────────────────────────────
   Montserrat (Latin) and Almarai (Arabic), both SIL OFL 1.1, subset to woff2.
   `unicode-range` does the language routing: one font stack serves both pages
   and the browser only downloads the subsets it actually paints. */

@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/montserrat-400.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/montserrat-500.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/montserrat-700.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/montserrat-800.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Almarai'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/almarai-400.woff2") format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Almarai'; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/almarai-700.woff2") format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Almarai'; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/almarai-800.woff2") format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

@layer tokens {
  /* Palette and scales mirror the Flutter app's DESIGN_SYSTEM.md so web and
     product read as one brand. Change a value here, never in a component. */
  :root {
    /* Brand */
    --k-primary: #2F8CFF;
    --k-primary-strong: #1D6FDB;
    /* Kept for parity with the app's palette; the web page does not paint with
       them. Delete them here only if the app drops them too. */
    --k-secondary: #22D3EE;
    --k-accent: #7C4DFF;
    --k-success: #22C55E;
    --k-warning: #F59E0B;

    /* No gradients. Flat brand colour, hairlines and honest whitespace do the
       work — a multi-stop gradient is the fastest way to look like every other
       AI product page. --k-tint is the one soft fill, for the featured tile. */
    --k-tint: #EDF4FF;
    --k-panel: #1D6FDB;

    /* Surfaces and ink (light) */
    --k-ink-1: #0B1220;
    --k-ink-2: #334155;
    --k-ink-3: #475569;
    --k-bg: #F7F9FC;
    --k-surface: #FFFFFF;
    --k-surface-2: #F1F5FA;
    --k-surface-3: #FAFBFF;
    --k-border: #E5EAF2;
    --k-border-strong: #D8E0EC;
    --k-on-brand: #FFFFFF;

    /* Elevation */
    --k-shadow-1: 0 1px 2px rgba(11, 18, 32, .06), 0 2px 8px rgba(11, 18, 32, .04);
    --k-shadow-2: 0 4px 12px rgba(11, 18, 32, .07), 0 12px 32px rgba(11, 18, 32, .06);
    --k-shadow-3: 0 18px 48px rgba(11, 18, 32, .14), 0 4px 12px rgba(11, 18, 32, .06);
    --k-glow: 0 10px 30px rgba(47, 140, 255, .32);
    /* A whole filter value, not a colour — the screenshots are near-black device
       cutouts, so dark mode prepends a rim light (see the dark blocks below). */
    --k-device-shadow: drop-shadow(0 12px 24px rgba(11, 18, 32, .16));

    /* Radius — the app's deliberate 3-tier system, plus a panel exception */
    --k-r-sm: 12px;   /* chips, icon tiles, inputs */
    --k-r-md: 20px;   /* interactive surfaces */
    --k-r-lg: 24px;   /* cards */
    --k-r-panel: 32px;
    --k-r-full: 999px;

    /* Space — 8pt scale, same steps as the app's AppTokens */
    --k-s-1: 8px;
    --k-s-2: 12px;
    --k-s-3: 16px;
    --k-s-4: 24px;
    --k-s-5: 32px;   /* unused today — kept so the scale stays whole */
    --k-s-6: 48px;   /* unused today — kept so the scale stays whole */

    /* Type */
    --k-font: 'Montserrat', 'Almarai', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --k-text-body: 17px;
    --k-text-sm: .9rem;
    --k-text-xs: .82rem;
    --k-title-1: clamp(2rem, 5vw, 3.2rem);
    --k-title-2: clamp(1.8rem, 4.2vw, 2.75rem);
    --k-title-3: 1.06rem;

    /* Layout */
    --k-maxw: 1160px;
    --k-gutter: 20px;
    --k-section-y: clamp(64px, 9vw, 112px);

    /* Motion */
    --k-ease: cubic-bezier(.22, .61, .36, 1);
    --k-fast: .18s;
    --k-slow: .6s;
  }

  /* Dark theme. Declared twice on purpose: once for the system preference
     (skipped when the visitor has explicitly chosen light) and once for the
     explicit toggle, so the toggle wins in both directions. */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --k-ink-1: #F8FAFC;
      --k-ink-2: #CBD5E1;
      --k-ink-3: #94A3B8;
      --k-bg: #07111F;
      --k-surface: #0E1A2B;
      --k-surface-2: #14233A;
      --k-surface-3: #1A2B45;
      --k-border: #263A56;
      --k-border-strong: #345077;
      --k-tint: #152A47;
      --k-device-shadow: drop-shadow(0 0 1px rgba(255, 255, 255, .5))
                         drop-shadow(0 14px 28px rgba(0, 0, 0, .65));
      --k-shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
      --k-shadow-2: 0 4px 12px rgba(0, 0, 0, .45);
      --k-shadow-3: 0 18px 48px rgba(0, 0, 0, .55);
      --k-glow: 0 10px 30px rgba(47, 140, 255, .28);
    }
  }
  :root[data-theme="dark"] {
    --k-ink-1: #F8FAFC;
    --k-ink-2: #CBD5E1;
    --k-ink-3: #94A3B8;
    --k-bg: #07111F;
    --k-surface: #0E1A2B;
    --k-surface-2: #14233A;
    --k-surface-3: #1A2B45;
    --k-border: #263A56;
    --k-border-strong: #345077;
    --k-tint: #152A47;
    --k-device-shadow: drop-shadow(0 0 1px rgba(255, 255, 255, .5))
                       drop-shadow(0 14px 28px rgba(0, 0, 0, .65));
    --k-shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --k-shadow-2: 0 4px 12px rgba(0, 0, 0, .45);
    --k-shadow-3: 0 18px 48px rgba(0, 0, 0, .55);
    --k-glow: 0 10px 30px rgba(47, 140, 255, .28);
  }
}

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

  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

  body {
    margin: 0;
    background: var(--k-bg);
    color: var(--k-ink-1);
    font-family: var(--k-font);
    font-size: var(--k-text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  img, svg { max-width: 100%; }
  img { height: auto; }
  a { color: var(--k-primary); }
  p { margin: 0; }

  h1, h2, h3 {
    margin: 0;
    line-height: 1.18;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }
  /* Arabic sets tighter than Latin at the same size and takes no tracking. */
  :lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.35; }

  :where(a, button, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--k-primary);
    outline-offset: 3px;
    border-radius: 6px;
  }

  /* One place decides that motion is optional. */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      animation-duration: .001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .001ms !important;
    }
  }
}

@layer components {

  /* ── k-wrap: the single content measure ──────────────────────────────── */
  .k-wrap {
    width: 100%;
    max-width: var(--k-maxw);
    margin-inline: auto;
    padding-inline: var(--k-gutter);
  }

  /* ── k-section: vertical rhythm + the alternating band ───────────────── */
  .k-section { padding-block: var(--k-section-y); }
  .k-section--band { background: var(--k-surface-2); border-block: 1px solid var(--k-border); }
  .k-section--tight { padding-block: clamp(36px, 5vw, 56px); }

  .k-section__head { margin-bottom: clamp(32px, 5vw, 56px); }

  /* ── k-kicker: every section opens the same way ──────────────────────── */
  .k-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--k-primary);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .k-kicker::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--k-primary);
  }
  :lang(ar) .k-kicker { letter-spacing: 0; text-transform: none; }

  /* ── Titles ──────────────────────────────────────────────────────────── */
  .k-title { font-size: var(--k-title-2); font-weight: 800; max-width: 22ch; }
  .k-title--hero { font-size: var(--k-title-1); max-width: 15ch; margin-top: var(--k-s-4); }
  :lang(ar) .k-title--hero { max-width: 17ch; }
  .k-lead {
    margin-top: var(--k-s-3);
    max-width: 62ch;
    color: var(--k-ink-2);
    font-size: clamp(1rem, 1.6vw, 1.12rem);
  }

  /* The one emphasis treatment: brand colour on a word inside a heading. */
  .k-em { color: var(--k-primary); }

  /* ── k-btn ───────────────────────────────────────────────────────────── */
  .k-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;              /* ≥44px touch target */
    padding: var(--k-s-2) var(--k-s-4);
    border: 1px solid transparent;
    border-radius: var(--k-r-full);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--k-fast) var(--k-ease),
                box-shadow var(--k-fast) var(--k-ease),
                background-color var(--k-fast) var(--k-ease);
  }
  .k-btn--primary { background: var(--k-primary); color: var(--k-on-brand); box-shadow: var(--k-glow); }
  .k-btn--primary:hover { background: var(--k-primary-strong); transform: translateY(-2px); }
  .k-btn--ghost {
    background: var(--k-surface);
    color: var(--k-ink-1);
    border-color: var(--k-border);
    box-shadow: var(--k-shadow-1);
  }
  .k-btn--ghost:hover { border-color: var(--k-border-strong); transform: translateY(-2px); }
  .k-btn--quiet {
    min-width: 44px;
    min-height: 44px;
    padding-inline: var(--k-s-2);
    background: transparent;
    border-color: var(--k-border);
    color: var(--k-ink-2);
    font-size: var(--k-text-sm);
    gap: 6px;
  }
  .k-btn--quiet:hover { background: var(--k-surface-2); color: var(--k-ink-1); }

  /* ── k-store: App Store / Google Play ────────────────────────────────── */
  .k-stores { display: flex; flex-wrap: wrap; gap: var(--k-s-2); }
  .k-store {
    display: inline-flex;
    align-items: center;
    gap: var(--k-s-2);
    min-height: 56px;
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--k-r-md);
    background: #0B1220;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--k-shadow-2);
    transition: transform var(--k-fast) var(--k-ease), box-shadow var(--k-fast) var(--k-ease);
  }
  .k-store:hover { transform: translateY(-2px); box-shadow: var(--k-shadow-3); }
  .k-store svg { flex: 0 0 auto; }
  .k-store__text { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
  .k-store__text small { font-size: .68rem; font-weight: 500; opacity: .78; }
  .k-store__text strong { font-size: 1.06rem; font-weight: 700; }
  :root[data-theme="dark"] .k-store { background: #1B2E4B; border-color: var(--k-border-strong); }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .k-store { background: #1B2E4B; border-color: var(--k-border-strong); }
  }

  /* ── k-pill / k-chip ─────────────────────────────────────────────────── */
  .k-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--k-s-1);
    padding: var(--k-s-1) var(--k-s-3);
    border: 1px solid color-mix(in srgb, var(--k-primary) 26%, transparent);
    border-radius: var(--k-r-full);
    background: color-mix(in srgb, var(--k-primary) 12%, var(--k-surface));
    color: var(--k-primary);
    font-size: .85rem;
    font-weight: 700;
  }
  .k-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k-success); }

  .k-chip {
    padding: var(--k-s-1) var(--k-s-3);
    border: 1px solid var(--k-border);
    border-radius: var(--k-r-full);
    background: var(--k-surface);
    color: var(--k-ink-2);
    font-size: var(--k-text-sm);
    font-weight: 700;
  }

  /* ── k-card ──────────────────────────────────────────────────────────── */
  .k-card {
    position: relative;
    padding: 26px;
    border: 1px solid var(--k-border);
    border-radius: var(--k-r-lg);
    background: var(--k-surface);
    box-shadow: var(--k-shadow-1);
    transition: transform var(--k-fast) var(--k-ease),
                box-shadow var(--k-fast) var(--k-ease),
                border-color var(--k-fast) var(--k-ease);
  }
  .k-card--lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--k-shadow-2);
    border-color: var(--k-border-strong);
  }
  .k-card--brand {
    background: var(--k-tint);
    border-color: color-mix(in srgb, var(--k-primary) 22%, var(--k-border));
  }
  .k-card__title { margin-bottom: var(--k-s-1); font-size: var(--k-title-3); font-weight: 800; }
  .k-card__body { color: var(--k-ink-2); font-size: .96rem; }

  /* ── k-code: a code meant to be read off the screen and typed ────────── */
  /* Used by the invite page (/r/<code>/). Tabular figures so 0/O and 1/I
     cannot be confused, generous tracking because the string is transcribed
     by hand, and `user-select: all` so one tap grabs the whole thing on the
     platforms where the copy button cannot reach the clipboard. Stays LTR
     under `dir="rtl"`: the code is a Latin/digit string in both languages. */
  .k-code {
    display: block;
    direction: ltr;
    unicode-bidi: isolate;
    margin-block: var(--k-s-3);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: clamp(2rem, 8vw, 3.25rem);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1.1;
    color: var(--k-primary);
    user-select: all;
    -webkit-user-select: all;
    word-break: break-all;
  }

  /* ── k-icon-tile ─────────────────────────────────────────────────────── */
  .k-icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: var(--k-s-3);
    border-radius: var(--k-r-sm);
    background: color-mix(in srgb, var(--k-primary) 12%, var(--k-surface));
    color: var(--k-primary);
  }
  .k-icon-tile--solid { background: var(--k-primary); color: #fff; }
  .k-icon-tile--sm { width: 38px; height: 38px; margin-bottom: 0; }

  /* ── k-grid ──────────────────────────────────────────────────────────── */
  .k-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
  @media (min-width: 680px) {
    .k-grid--3, .k-grid--4 { grid-template-columns: repeat(2, 1fr); }
  }
  @media (min-width: 1000px) {
    .k-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .k-grid--4 { grid-template-columns: repeat(4, 1fr); }
  }

  /* ── k-bento: four columns where tiles 1, 6, 7, 8 take a double width.
     2+1+1+1+1+2+2+2 = 12, so it still resolves to three clean rows. ────── */
  @media (min-width: 1000px) {
    .k-bento > :nth-child(1),
    .k-bento > :nth-child(6),
    .k-bento > :nth-child(7),
    .k-bento > :nth-child(8) {
      grid-column: span 2;
      display: grid;
      align-content: center;
    }
    .k-bento > :nth-child(1) .k-bento__body,
    .k-bento > :nth-child(6) .k-bento__body,
    .k-bento > :nth-child(7) .k-bento__body,
    .k-bento > :nth-child(8) .k-bento__body {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 0 18px;
      align-items: start;
    }
    .k-bento > :nth-child(1) .k-icon-tile,
    .k-bento > :nth-child(6) .k-icon-tile,
    .k-bento > :nth-child(7) .k-icon-tile,
    .k-bento > :nth-child(8) .k-icon-tile { grid-row: span 2; margin-bottom: 0; }
  }

  /* ── k-steps ─────────────────────────────────────────────────────────── */
  .k-steps { position: relative; }
  @media (min-width: 1000px) {
    /* A hairline rail so the row reads as one sequence, not four boxes. */
    .k-steps::before {
      content: "";
      position: absolute;
      inset-inline: 12%;
      top: 46px;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--k-border-strong) 12%, var(--k-border-strong) 88%, transparent);
      z-index: 0;
    }
  }
  .k-step { position: relative; z-index: 1; }
  .k-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: var(--k-s-3);
    border-radius: var(--k-r-sm);
    background: var(--k-primary);
    color: #fff;
    font-weight: 800;
  }
  .k-step__ghost {
    position: absolute;
    inset-inline-end: 14px;
    top: 2px;
    font-size: 4.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--k-ink-1);
    opacity: .05;
    pointer-events: none;
    user-select: none;
  }

  /* ── k-checklist ─────────────────────────────────────────────────────── */
  .k-checklist { display: grid; gap: var(--k-s-2); margin: 0; padding: 0; list-style: none; }
  .k-checklist li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--k-ink-2);
    font-size: .96rem;
  }
  .k-checklist svg { flex: 0 0 auto; margin-top: 4px; color: var(--k-success); }

  /* ── k-media: horizontal snap strip of screenshots ───────────────────── */
  .k-media {
    display: flex;
    gap: var(--k-s-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-block: var(--k-s-1) var(--k-s-4);
    padding-inline: var(--k-gutter);
    margin-inline: calc(var(--k-gutter) * -1);
    scrollbar-width: thin;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
  }
  .k-shot { flex: 0 0 auto; width: 232px; margin: 0; scroll-snap-align: center; }
  @media (min-width: 700px) { .k-shot { width: 268px; } }
  .k-shot img {
    display: block;
    width: 100%;
    /* The composite these are recovered from bleeds the device off the bottom,
       so the image ends mid-device; fade it rather than cut it flat. */
    -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 99%);
    mask-image: linear-gradient(to bottom, #000 88%, transparent 99%);
    filter: var(--k-device-shadow);
  }
  .k-shot figcaption {
    margin-top: 14px;
    color: var(--k-ink-2);
    font-size: .92rem;
    font-weight: 500;
  }

  /* ── k-chat: illustrative assistant exchange ─────────────────────────── */
  .k-chat { display: grid; gap: var(--k-s-2); }
  .k-bubble {
    max-width: 90%;
    padding: 14px 18px;
    border-radius: var(--k-r-md);
    font-size: .96rem;
  }
  .k-bubble--ask {
    justify-self: end;
    background: var(--k-primary);
    color: var(--k-on-brand);
    border-end-end-radius: var(--k-s-1);
  }
  .k-bubble--answer {
    justify-self: start;
    background: var(--k-surface);
    border: 1px solid var(--k-border);
    color: var(--k-ink-2);
    border-end-start-radius: var(--k-s-1);
  }
  .k-cite {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: var(--k-r-full);
    background: color-mix(in srgb, var(--k-primary) 12%, transparent);
    color: var(--k-primary);
    font-size: var(--k-text-xs);
    font-weight: 700;
  }

  /* ── k-table: the comparison matrix ──────────────────────────────────── */
  .k-scroll-x { overflow-x: auto; }
  .k-table {
    width: 100%;
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--k-border);
    border-radius: var(--k-r-lg);
    background: var(--k-surface);
    overflow: hidden;
  }
  .k-table th, .k-table td {
    padding: var(--k-s-3) var(--k-s-4);
    text-align: start;
    vertical-align: top;
    font-size: .96rem;
  }
  .k-table thead th {
    background: var(--k-surface-2);
    color: var(--k-ink-2);
    font-size: .9rem;
    font-weight: 800;
  }
  .k-table tbody tr + tr th,
  .k-table tbody tr + tr td { border-top: 1px solid var(--k-border); }
  .k-table tbody th { color: var(--k-ink-1); font-weight: 700; }
  .k-table .is-them { color: var(--k-ink-3); }
  .k-table .is-us { background: color-mix(in srgb, var(--k-primary) 7%, var(--k-surface)); }
  .k-table thead .is-us { color: var(--k-primary); }
  .k-table td.is-us { color: var(--k-ink-1); font-weight: 700; }
  .k-cell { display: flex; gap: var(--k-s-1); align-items: flex-start; }
  .k-cell svg { flex: 0 0 auto; margin-top: 3px; }

  /* ── k-plan ──────────────────────────────────────────────────────────── */
  .k-plans { display: grid; gap: var(--k-s-4); align-items: start; }
  @media (min-width: 860px) { .k-plans { grid-template-columns: repeat(2, 1fr); } }
  .k-plan { padding: 30px; }
  .k-plan--featured {
    border-color: var(--k-primary);
    box-shadow: var(--k-shadow-2);
  }
  .k-plan__badge {
    position: absolute;
    top: -13px;
    inset-inline-end: var(--k-s-4);
    padding: 5px 14px;
    border-radius: var(--k-r-full);
    background: var(--k-primary);
    color: #fff;
    font-size: .74rem;
    font-weight: 800;
  }
  .k-plan__name { font-size: 1.6rem; font-weight: 800; }
  /* Billing runs through the stores, so the card leads with the plan name
     rather than a price this page cannot keep in sync. */
  .k-plan__price { margin-top: var(--k-s-1); color: var(--k-primary); font-size: .95rem; font-weight: 700; }
  .k-plan__tagline { margin-top: 4px; color: var(--k-ink-3); font-size: .93rem; }
  .k-plan .k-checklist { margin: 22px 0 26px; }

  /* ── k-faq ───────────────────────────────────────────────────────────── */
  .k-faq { display: grid; gap: var(--k-s-2); max-width: 860px; }
  .k-faq__item {
    padding: 4px 22px;
    border: 1px solid var(--k-border);
    border-radius: var(--k-r-md);
    background: var(--k-surface);
    box-shadow: var(--k-shadow-1);
  }
  .k-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--k-s-3);
    min-height: 48px;
    padding-block: 18px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }
  .k-faq__item summary::-webkit-details-marker { display: none; }
  .k-faq__chev { flex: 0 0 auto; color: var(--k-ink-3); transition: transform .2s var(--k-ease); }
  .k-faq__item[open] .k-faq__chev { transform: rotate(180deg); }
  .k-faq__item p { padding-bottom: var(--k-s-4); color: var(--k-ink-2); font-size: .97rem; }

  /* ── k-panel: the closing call to action ─────────────────────────────── */
  .k-panel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(36px, 6vw, 68px);
    border-radius: var(--k-r-panel);
    background: var(--k-panel);
    color: #fff;
    box-shadow: var(--k-shadow-3);
  }
  .k-panel h2 { max-width: 20ch; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; }
  .k-panel p { margin-top: var(--k-s-3); max-width: 52ch; color: rgba(255, 255, 255, .92); }
  .k-panel .k-stores { margin-top: 30px; }
  .k-panel .k-store { background: #fff; color: var(--k-ink-1); border-color: transparent; }
  .k-panel .k-store svg { color: #0B1220; }
  .k-panel__orb {
    position: absolute;
    inset-inline-end: clamp(-40px, -2vw, 8px);
    bottom: -28px;
    width: clamp(150px, 24vw, 250px);
    opacity: .95;
    pointer-events: none;
  }
  @media (max-width: 780px) { .k-panel__orb { display: none; } }

  /* ── k-header ────────────────────────────────────────────────────────── */
  .k-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--k-bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s var(--k-ease), box-shadow .2s var(--k-ease);
  }
  .k-header.is-scrolled { border-bottom-color: var(--k-border); box-shadow: var(--k-shadow-1); }
  .k-nav { display: flex; align-items: center; gap: var(--k-s-3); height: 72px; transition: height .22s var(--k-ease); }
  .k-header.is-scrolled .k-nav { height: 62px; }
  .k-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--k-ink-1);
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
  }
  .k-brand img { width: 34px; height: 34px; border-radius: 9px; }
  .k-nav__links { display: none; gap: 26px; margin-inline-start: 22px; }
  .k-nav__links a { color: var(--k-ink-2); font-size: .95rem; font-weight: 500; text-decoration: none; }
  .k-nav__links a:hover { color: var(--k-primary); }
  .k-nav__actions { display: flex; align-items: center; gap: var(--k-s-1); margin-inline-start: auto; }
  .k-nav__cta { display: none; }
  @media (min-width: 900px) {
    .k-nav__links { display: flex; }
    .k-nav__cta { display: inline-flex; }
  }

  /* ── k-hero ──────────────────────────────────────────────────────────── */
  .k-hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(28px, 4vw, 56px) clamp(8px, 2vw, 24px);
  }
  .k-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: clamp(28px, 5vw, 48px);
    align-items: center;
  }
  @media (min-width: 940px) { .k-hero__grid { grid-template-columns: 1.05fr .95fr; } }
  .k-hero__sub { margin-top: var(--k-s-4); max-width: 56ch; color: var(--k-ink-2); font-size: clamp(1rem, 1.7vw, 1.14rem); }
  .k-hero__actions { margin-top: 30px; }
  .k-hero__note { margin-top: 14px; color: var(--k-ink-3); font-size: .88rem; }
  .k-hero__device { position: relative; display: flex; justify-content: center; }
  .k-hero__device img {
    width: auto;
    max-width: 100%;
    height: min(70vh, 560px);
    object-fit: contain;
    /* The source frame bleeds off the bottom; fade it so the device sinks into
       the page instead of ending on a hard cut. */
    -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
    mask-image: linear-gradient(to bottom, #000 84%, transparent 99%);
    filter: var(--k-device-shadow);
  }
  @media (max-width: 939px) { .k-hero__device img { height: auto; width: min(78%, 330px); } }

  /* ── k-proof: factual reassurance under the hero CTAs ────────────────── */
  .k-proof {
    display: flex;
    flex-wrap: wrap;
    gap: var(--k-s-2) var(--k-s-4);
    margin: var(--k-s-4) 0 0;
    padding: 0;
    list-style: none;
  }
  .k-proof li { display: flex; align-items: center; gap: var(--k-s-1); color: var(--k-ink-2); font-size: var(--k-text-sm); font-weight: 500; }
  .k-proof svg { flex: 0 0 auto; color: var(--k-success); }

  /* ── k-strip: the file-format row ────────────────────────────────────── */
  .k-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--k-s-2) var(--k-s-4); }
  .k-strip__label {
    color: var(--k-ink-3);
    font-size: var(--k-text-sm);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  :lang(ar) .k-strip__label { letter-spacing: 0; text-transform: none; }
  @media (max-width: 720px) { .k-strip__label { flex: 0 0 100%; text-align: center; } }

  /* ── k-tags: "built for your major" ──────────────────────────────────── */
  .k-tags { display: flex; flex-wrap: wrap; gap: var(--k-s-2); margin: 0; padding: 0; list-style: none; }
  .k-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--k-s-1);
    padding: 10px var(--k-s-3);
    border: 1px solid var(--k-border);
    border-radius: var(--k-r-full);
    background: var(--k-surface);
    color: var(--k-ink-1);
    font-size: .94rem;
    font-weight: 700;
    transition: border-color var(--k-fast) var(--k-ease), transform var(--k-fast) var(--k-ease);
  }
  .k-tag:hover { border-color: color-mix(in srgb, var(--k-primary) 45%, var(--k-border)); transform: translateY(-2px); }
  .k-tag svg { color: var(--k-primary); }

  /* ── k-split: two-column feature block ───────────────────────────────── */
  .k-split { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
  @media (min-width: 940px) { .k-split { grid-template-columns: 1fr 1fr; } }

  /* ── k-footer ────────────────────────────────────────────────────────── */
  .k-footer { padding-block: 52px 36px; border-top: 1px solid var(--k-border); background: var(--k-surface-3); }
  .k-footer__grid { display: grid; gap: 34px; }
  @media (min-width: 760px) { .k-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
  .k-footer__grid h4 {
    margin: 0 0 14px;
    color: var(--k-ink-3);
    font-size: var(--k-text-xs);
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  :lang(ar) .k-footer__grid h4 { letter-spacing: 0; text-transform: none; }
  .k-footer__grid ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
  .k-footer__grid a { color: var(--k-ink-2); font-size: .94rem; text-decoration: none; }
  .k-footer__grid a:hover { color: var(--k-primary); }
  .k-footer__tagline { margin-top: 14px; max-width: 38ch; color: var(--k-ink-3); font-size: .94rem; }
  .k-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--k-s-2);
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--k-border);
    color: var(--k-ink-3);
    font-size: var(--k-text-sm);
  }

  /* ── k-mobile-cta: the header CTA is hidden under 900px ──────────────── */
  .k-mobile-cta {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: var(--k-s-2) var(--k-s-3) calc(var(--k-s-2) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--k-border);
    background: color-mix(in srgb, var(--k-surface) 92%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    transform: translateY(110%);
    transition: transform .25s var(--k-ease);
  }
  .k-mobile-cta.is-visible { transform: none; }
  .k-mobile-cta img { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 9px; }
  .k-mobile-cta__text { flex: 1 1 auto; min-width: 0; }
  .k-mobile-cta__text strong { display: block; font-size: .95rem; font-weight: 800; }
  .k-mobile-cta__text small { display: block; color: var(--k-ink-3); font-size: .78rem; }
  .k-mobile-cta .k-btn { min-height: 44px; padding: 10px 20px; white-space: nowrap; }
  @media (min-width: 900px) { .k-mobile-cta { display: none; } }

  /* ── k-skip ──────────────────────────────────────────────────────────── */
  .k-skip {
    position: absolute;
    inset-inline-start: var(--k-s-2);
    top: -100px;
    z-index: 200;
    padding: var(--k-s-2) 18px;
    border-radius: var(--k-r-sm);
    background: var(--k-surface);
    color: var(--k-ink-1);
    box-shadow: var(--k-shadow-2);
    font-weight: 700;
    text-decoration: none;
  }
  .k-skip:focus { top: var(--k-s-2); }
}

@layer utilities {
  .k-reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--k-slow) var(--k-ease), transform var(--k-slow) var(--k-ease); }
  .k-reveal.is-visible { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { .k-reveal { opacity: 1; transform: none; } }

  .k-plain-list { margin: 0; padding: 0; list-style: none; }
  .k-muted { color: var(--k-ink-3); font-size: var(--k-text-xs); }
}

/* The only motion left: content fading up as it enters the viewport, and the
   hover/scroll transitions declared inline on their components. */
