/*
Theme Name: demo
Theme URI: https://ikanhealth.in
Description: Demo block theme mapped with iKAN design system, templates, and full site editing
Version: 1.0.0
Author: iKAN Team
Text Domain: demo
*/

/*
 * iKAN 2's design system, ported.
 *
 * Transcribed from `ikan2/src/styles.css` so the two surfaces stop looking
 * like two products. This file is a PORT, not an invention — the token values,
 * the type scale and the surface utilities are byte-copies of that file, and
 * the comments on the type scale are its own. Diff against the source when it
 * moves.
 *
 * WHAT IS HERE, AND WHAT IS NOT
 *
 * Here: the fonts, the colour ramp, the radius scale, the shadows, the
 * Material 3 type roles, and the three generic utilities (`surface`,
 * `eyebrow`, `shadow-app`/`shadow-dock`).
 *
 * Not here: the forty-odd app-specific utilities — `nav-item`, `score-ring`,
 * `program-band`, `activity-dial`, `hero-*`, `metric-*`. They describe the
 * app's own components, nothing on this site renders them, and copying them
 * would be 900 lines of dead CSS that still has to be kept in step.
 *
 * SCOPED, NOT GLOBAL. The tokens live on `.ikan2-theme` rather than `:root`.
 * Dropping them on `:root` would restyle admin, the member app and every
 * marketing page at once — a change nobody could review, and one that would
 * move the contrast ratchet in ways this repo measures carefully. A page opts
 * in by adding the class; /about does today. Roll it page by page.
 *
 * Light only: this site has no dark mode, so iKAN 2's `.dark` block is not
 * carried over.
 */

.ikan2-theme {
  /* ── Faces ───────────────────────────────────────────────── */
  --font-display: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;

  /* ── Radius ──────────────────────────────────────────────── */
  --radius: 0.75rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);

  /* ── Colour, all oklch as the source requires ────────────── */
  --background: oklch(0.995 0.002 240);
  --foreground: oklch(0.16 0.012 255);
  --canvas: oklch(0.955 0.006 250);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.129 0.042 264.695);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.129 0.042 264.695);
  --primary: oklch(0.18 0.012 255);
  --primary-foreground: oklch(0.984 0.003 247.858);
  --secondary: oklch(0.955 0.006 250);
  --secondary-foreground: oklch(0.208 0.042 265.755);
  --muted: oklch(0.96 0.005 250);
  --muted-foreground: oklch(0.5 0.018 255);
  --accent: oklch(0.968 0.007 247.896);
  --accent-foreground: oklch(0.208 0.042 265.755);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --border: oklch(0.9 0.009 250);
  --input: oklch(0.9 0.009 250);
  --ring: oklch(0.704 0.04 256.788);

  /* the four accent families the app tints groups with */
  --calm: oklch(0.76 0.095 165);
  --calm-soft: oklch(0.95 0.035 165);
  --calm-strong: oklch(0.47 0.095 165);
  --mind: oklch(0.78 0.08 245);
  --mind-soft: oklch(0.95 0.03 245);
  --mind-strong: oklch(0.48 0.1 245);
  --rest: oklch(0.82 0.12 83);
  --rest-soft: oklch(0.96 0.045 83);
  --rest-strong: oklch(0.52 0.11 75);
  --alert: oklch(0.7 0.15 25);
  --alert-soft: oklch(0.96 0.035 25);
  --alert-strong: oklch(0.52 0.17 25);
  --alert-foreground: oklch(0.99 0 0);

  /* ── Error family ────────────────────────────────────────── */
  --error: oklch(0.501 0.178 28.7);
  --on-error: oklch(1 0 0);
  --error-container: oklch(0.922 0.03 22.8);
  --on-error-container: oklch(0.42 0.147 28.1);

  /* ── Brand accents ───────────────────────────────────────────
   * The four hues this site has always used, now carried upstream in oklch
   * with an accessible `-ink` variant for text on a light ground. Added to
   * iKAN 2 after the audit; these are the same colours as this repo's
   * --ikan-brand-* and the aliases below keep both vocabularies working. */
  --brand-teal: oklch(0.729 0.106 181.8);
  --brand-teal-ink: oklch(0.485 0.064 170.8);
  --brand-amber: oklch(0.782 0.151 74.7);
  --brand-amber-ink: oklch(0.508 0.108 73.3);
  --brand-coral: oklch(0.705 0.135 21.1);
  --brand-coral-ink: oklch(0.511 0.141 26.5);
  --brand-slate: oklch(0.674 0.111 269.3);
  --brand-slate-ink: oklch(0.487 0.111 268.4);

  /* ── Motion ──────────────────────────────────────────────── */
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.26, 0.64, 1);

  /* ── Elevation ───────────────────────────────────────────── */
  --shadow-app: 0 0 45px oklch(0.2 0.01 255 / 0.08);
  --shadow-card: 0 10px 30px oklch(0.2 0.01 255 / 0.06);
  --shadow-dock: 0 12px 35px oklch(0.18 0.01 255 / 0.14);

  /* ── This repo's token names, pointed at the values above, so existing
   *    site components keep resolving inside an opted-in page. ─────── */
  --color-text-primary: var(--foreground);
  --color-text-muted: var(--muted-foreground);
  --color-bg-page: var(--canvas);
  --color-bg-card: var(--card);
  --color-bg-muted: var(--secondary);
  --color-border-light: var(--border);
  --color-border-default: var(--border);
  --color-primary-default: var(--foreground);
  --color-primary-on: var(--background);

  /* Components across this site set `font-family: var(--font-family-base)`
     inline. Aliasing it means anything opted into the theme picks up Manrope
     without every one of those call sites being hunted down. */
  --font-family-base: var(--font-sans);

  /* this repo's brand names, resolved to the upstream hues */
  --ikan-brand-teal: var(--brand-teal);
  --ikan-brand-amber: var(--brand-amber);
  --ikan-brand-coral: var(--brand-coral);
  --ikan-brand-slate: var(--brand-slate);
  --ikan-brand-teal-text: var(--brand-teal-ink);

  /* ── The earlier vocabulary, still aliased ───────────────────
   *
   * The site's OWN components no longer need these: all 755 references across
   * 36 files were rewritten to iKAN 2's token names directly, so `--card`,
   * `--foreground` and `--muted-foreground` are what the markup says now.
   *
   * The block stays because shared components under `app/ui` — `PageHero`,
   * `Pagination`, `progress` and others — render INSIDE themed site pages and
   * still write the old names. They are used by the app surface too, where
   * these names resolve from `globals.css` at `:root`, so renaming them there
   * is a separate migration with a different blast radius.
   *
   * These are translations, not new values. Anything that cannot be said in
   * iKAN 2's vocabulary is left to `globals.css` rather than invented here —
   * the spacing scale and `--marquee-duration` are not redefined.
   */
  --color-accent-default: var(--secondary);
  --color-accent-on: var(--foreground);
  --color-chart-1: var(--brand-teal);
  --color-chart-2: var(--brand-amber);
  --color-chart-3: var(--brand-coral);

  /* The grey ramp collapses onto three roles. It only ever held white, a
     near-white wash and near-black. */
  --grey-0: var(--background);
  --grey-1: var(--secondary);
  --grey-9: var(--foreground);

  --ikan-brand-teal-bg: var(--calm-soft);
  --ikan-brand-teal-dark: var(--brand-teal-ink);

  /* Weights, as iKAN 2's roles use them. */
  --font-weight-regular: 400;
  --font-weight-medium: 500;

  /*
   * The size scale, snapped onto iKAN 2's roles. Six of the nine already
   * agreed to the pixel; the three that did not are the large end, where the
   * old scale jumped 32 -> 48 and iKAN 2 steps 32 -> 34 -> 42. The jump is
   * what made the old headings shout.
   */
  --text-xs: 12px;      /* label-md */
  --text-sm: 14px;      /* label-lg, body-md */
  --text-base: 16px;    /* body-lg */
  --text-lg: 18px;      /* subhead */
  --text-xl: 20px;      /* title-lg */
  --text-2xl: 24px;     /* headline-sm */
  --text-3xl: 32px;     /* headline-lg */
  --text-4xl: 42px;     /* display-md, was 48px */

  --line-height-sm: 1.4;
  --line-height-md: 1.5;

  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*
 * Type scale, on Material 3's roles and sizes (Display / Headline / Title / Body / Label),
 * set in the app's own faces: Sora for Headline and Title, the body face for Body and Label.
 * Each role fixes size, line height, weight and tracking together, so a heading is picked by
 * what it is rather than by a pixel value. One deviation from M3, marked below: article body
 * text gets a taller line for long-form reading.
 *
 *   role            size / line-height / weight   used for
 *   headline-lg     32 / 40 / 600                 page titles: Resources, Programs, Journal
 *   headline-md     28 / 36 / 600                 an article's title
 *   headline-sm     24 / 32 / 600                 an article's section (h2)
 *   title-lg        22 / 28 / 500                 an article's standfirst
 *   title-md        16 / 24 / 600                 an article's sub-section (h3), score band
 *   body-lg         16 / 26 / 400                 article body and lists (M3 says 24)
 *   body-md         14 / 21 / 400                 the detail line of a score block
 *   label-lg        14 / 20 / 500                 author, date, read time
 *   label-md        12 / 16 / 500                 chips and captions
 */
@utility font-display {
  font-family: var(--font-display);
}

@utility type-headline-lg {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
@utility type-headline-md {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
@utility type-headline-sm {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: normal;
}
@utility type-title-lg {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 28px;
  /* M3 says 400; Sora is only loaded from 500 up, so 500 is the lightest real weight */
  font-weight: 500;
  letter-spacing: normal;
}
@utility type-title-md {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
@utility type-body-lg {
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  letter-spacing: normal;
}
@utility type-body-md {
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  letter-spacing: normal;
}
@utility type-label-lg {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: normal;
}
@utility type-label-md {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

@utility ikan2-shadow-app {
  box-shadow: var(--shadow-app);
}
@utility ikan2-shadow-dock {
  box-shadow: var(--shadow-dock);
}
@utility ikan2-surface {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}
@utility ikan2-eyebrow {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-foreground);
}

/*
 * DISPLAY — the tier iKAN 2's scale is missing.
 *
 * iKAN 2 implements Material 3's Headline, Title, Body and Label roles and
 * stops there, because a 420px phone column never needs anything larger than
 * Headline Large. A website does, which is why the About h1 was a bespoke
 * `text-[34px]` on both surfaces instead of a role.
 *
 * Rather than invent three sizes, this continues the same M3 ladder upward.
 * M3's Display tier is 57/45/36; those are tuned for Roboto, so they are set
 * here in Sora's terms with the tracking tightening as the size grows, which
 * is the convention the Headline roles already follow.
 *
 *   display-lg   52 / 58 / 600   -0.02em    page title, desktop
 *   display-md   42 / 48 / 600   -0.015em   page title, tablet
 *   display-sm   34 / 40 / 600   -0.01em    page title, phone — iKAN 2's 34
 *
 * display-sm is deliberately the 34px the app already uses, so the phone
 * rendering of a page is identical across the two surfaces and only the larger
 * breakpoints are new.
 */
@utility type-display-lg {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 58px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
@utility type-display-md {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 48px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
@utility type-display-sm {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/*
 * ACTION — the one role iKAN 2 uses but never named.
 *
 * Its primary button is `text-[15px] font-semibold` in the body face, which is
 * neither label-lg (14/20/500) nor body-lg. It is a distinct role: the label on
 * a control. Naming it stops every button re-deciding its own size.
 */
@utility type-action {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Body XL and Body S — the 17px and 13px orphans, named upstream after the
   audit that flagged them. 17 is a page standfirst, 13 a dense card body. */
@utility type-body-xl {
  font-size: 17px;
  line-height: 28px;
  font-weight: 400;
  letter-spacing: normal;
}
@utility type-body-sm {
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: normal;
}

/*
 * ELEMENT MAPPING — against iKAN 2's DESIGN-SYSTEM.md, not my reading of it.
 *
 * Three corrections to the first attempt, all from that document:
 *
 * 1. h3 IS title-md (16/24/600, +0.01em), not title-lg. I had promoted it to
 *    22/28 to fix a card-title hierarchy, which quietly redefined a role the
 *    app already owns. The element default now matches the app; a card title
 *    that genuinely needs the larger step asks for `type-title-lg` by name, so
 *    the deviation is visible at the call site instead of hidden in a tag.
 *
 * 2. ONE BREAKPOINT, NOT TWO. The app has no responsive type at all — the type
 *    scale is identical at 640/768/1024, and the only width rules in the whole
 *    stylesheet are at 1024 (layout) and 768 (splash screen). I had stepped h1
 *    at 768 as well, inventing a tier the system does not recognise. The step
 *    is now at 1024 only, and only Headline L/M move, which is what
 *    DESIGN-SYSTEM.md names as the natural extension.
 *
 * 3. THE ELEMENT RULES I HAD MISSED: body at 88% foreground, strong at 650,
 *    links underlined with a 3px offset, list items 0.4em apart. These are the
 *    app's own element styles and they were simply absent here.
 *
 * h4/h5/h6 stay defined. DESIGN-SYSTEM.md records them as undefined in the app
 * and flags that as a gap, not a decision — an unstyled h4 renders as a browser
 * default, which is nobody's intent. They are mapped to the roles that continue
 * the ladder.
 */
@layer base {
  .ikan2-theme {
    color: color-mix(in oklab, var(--foreground) 88%, transparent);
  }

  .ikan2-theme h1 {
    font-family: var(--font-display);
    font-size: 34px;
    line-height: 40px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--foreground);
  }

  /* Headline S — tracking 0, per the table. */
  .ikan2-theme h2 {
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    letter-spacing: normal;
    color: var(--foreground);
  }

  /* Title M — the app's h3, +0.01em. */
  .ikan2-theme h3 {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--foreground);
  }

  /* Title L for h4, then the two Label roles — continuing the ladder into the
     levels the app leaves undefined. */
  .ikan2-theme h4 {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 28px;
    font-weight: 500;
    color: var(--foreground);
  }

  .ikan2-theme h5 {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--foreground);
  }

  .ikan2-theme h6 {
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--foreground);
  }

  /* Body L */
  .ikan2-theme p,
  .ikan2-theme li {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
  }

  .ikan2-theme li + li {
    margin-top: 0.4em;
  }

  .ikan2-theme li::marker {
    color: var(--muted-foreground);
  }

  /* Body M */
  .ikan2-theme small,
  .ikan2-theme figcaption {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 21px;
    font-weight: 400;
  }

  /* Label L */
  .ikan2-theme label {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
  }

  .ikan2-theme strong {
    font-weight: 650;
  }

  .ikan2-theme a {
    text-underline-offset: 3px;
  }

  .ikan2-theme button,
  .ikan2-theme input,
  .ikan2-theme select,
  .ikan2-theme textarea {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
  }

  /* The app's only breakpoint. Headline L/M step up; nothing else moves. */
  @media (min-width: 1024px) {
    .ikan2-theme h1 {
      font-size: 32px;
      line-height: 40px;
    }

    .ikan2-theme h2 {
      font-size: 28px;
      line-height: 36px;
      letter-spacing: -0.01em;
    }
  }
}

/*
 * PROSE — article and legal text rendered as plain HTML.
 *
 * Transcribed from iKAN 2's `.prose-ikan`, including its own layering: these
 * sit in `@layer base` so an explicit `type-*` class on a prose child still
 * wins. Upstream learned that the hard way — before the fix, `.prose-ikan h2`
 * beat `.type-headline-lg` and a heading that asked for 32px silently rendered
 * at 24.
 *
 * Each level is one of the roles, so the scale is set in one place: h2 is
 * headline-sm, h3 is title-md, everything else is body-lg.
 */
@layer base {
  .prose-ikan {
    font-size: 16px;
    line-height: 26px;
    color: color-mix(in oklab, var(--foreground) 88%, transparent);
  }
  .prose-ikan > * + * {
    margin-top: 1em;
  }
  .prose-ikan > :first-child {
    margin-top: 0;
  }
  .prose-ikan h2 {
    margin-top: 1.9em;
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    color: var(--foreground);
  }
  .prose-ikan h3 {
    margin-top: 1.6em;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--foreground);
  }
  .prose-ikan strong {
    font-weight: 650;
    color: var(--foreground);
  }
  .prose-ikan ul,
  .prose-ikan ol {
    padding-left: 1.3em;
  }
  .prose-ikan ul {
    list-style: disc;
  }
  .prose-ikan ol {
    list-style: decimal;
  }
  .prose-ikan li + li {
    margin-top: 0.4em;
  }
  .prose-ikan li::marker {
    color: var(--muted-foreground);
  }
  .prose-ikan a {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* The legal HTML in this repo was authored for a Tailwind-classed container
     and carries utility classes the site no longer loads on these pages. The
     divs it wraps sections in must not inherit card chrome from them. */
  .prose-ikan div {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
}

/*
 * PROSE — the two levels upstream does not define.
 *
 * `.prose-ikan` styles h2 and h3 and stops, so an h4 inside an article falls
 * through to the element default, which is `title-lg` at 22px — LARGER than the
 * h3 above it. The privacy policy has exactly this shape ("Information We
 * Collect" as h3, "Personal Information" as h4) and rendered inverted.
 *
 * h4 is set in the body face at body-lg with the strong weight: smaller than
 * h3, and told apart from body copy by weight rather than size, which is the
 * same trick h3 uses against the body. h5/h6 follow it down.
 *
 * This is latent upstream too — iKAN 2's own prose has no h4 rule.
 */
@layer base {
  .prose-ikan h4 {
    margin-top: 1.4em;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 24px;
    font-weight: 650;
    letter-spacing: normal;
    color: var(--foreground);
  }

  .prose-ikan h5,
  .prose-ikan h6 {
    margin-top: 1.2em;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 20px;
    font-weight: 650;
    letter-spacing: normal;
    color: var(--foreground);
  }

  /* The emoji in these headings sat in a span with a margin utility, which went
     when the authoring classes were stripped. Restore the gap structurally. */
  .prose-ikan :is(h2, h3, h4) > span:first-child {
    margin-right: 0.4em;
  }

  /* The policy markup nests sections in bare divs; without this the blocks run
     together, because `> * + *` only reaches direct children. */
  .prose-ikan div > * + * {
    margin-top: 0.9em;
  }
}

/*
 * CONTAINERS — the app column and the reading measure.
 *
 * Transcribed from iKAN 2, including the fix it made after the breakpoint
 * audit: between 640 and 1023 the column used to stay at 100%, so a 1023px
 * window ran 16/26 body at roughly 125 characters a line against a 45-75
 * ideal. There is now a 36rem step at 640.
 *
 * Two measures, because they are two jobs. `max-w-app` is 30rem above 1024 —
 * the app presenting as a phone on a canvas, which is the product's own idea of
 * itself. `max-w-read` is 38rem (~76 characters) for anything long-form:
 * articles, legal, About, FAQ. Below 1024 they are identical.
 *
 * The `display-mode` exceptions matter on this site too: the Android build
 * loads these same pages in a WebView, and an installed app should fill the
 * device like a native one rather than sit in a 36rem column.
 */
@utility max-w-app {
  max-width: 100%;
  @media (min-width: 640px) {
    max-width: 36rem;
  }
  @media (min-width: 1024px) {
    max-width: 30rem;
  }
  @media (display-mode: standalone) and (max-width: 1023px) {
    max-width: 100%;
  }
  @media (display-mode: fullscreen) and (max-width: 1023px) {
    max-width: 100%;
  }
}

@utility max-w-read {
  max-width: 100%;
  @media (min-width: 640px) {
    max-width: 36rem;
  }
  @media (min-width: 1024px) {
    max-width: 38rem;
  }
  @media (display-mode: standalone) and (max-width: 1023px) {
    max-width: 100%;
  }
  @media (display-mode: fullscreen) and (max-width: 1023px) {
    max-width: 100%;
  }
}

/* ─────────────────────────────────────────────────────────────────
 * iKAN 2 component utilities
 *
 * Copied from `ikan2/src/styles.css`, where they are declared with Tailwind's
 * `@utility`. They are written here as ordinary class rules scoped to
 * `.ikan2-theme` rather than as `@utility`, for the reason the rest of this
 * file is scoped that way: `@utility` compiles into the UTILITIES LAYER, which
 * loses to every unlayered rule in this repo's `globals.css`. A plain scoped
 * class has the specificity to win and does not restyle admin or the app.
 *
 * Bodies are byte-for-byte iKAN 2's apart from the `.ikan2-theme ` prefix and
 * the `&`-nesting being written out. Do not "improve" them here — they are a
 * copy, and a copy that drifts is worse than no copy.
 * ───────────────────────────────────────────────────────────────── */

.ikan2-theme .surface {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.ikan2-theme .surface-wash {
  background: radial-gradient(
    60% 70% at 50% 58%,
    color-mix(in oklab, currentColor 14%, transparent),
    transparent 72%
  );
}

.ikan2-theme .tile {
  transition:
    transform 0.25s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.25s ease;
}

.ikan2-theme .tile:active {
  transform: scale(0.97);
}

.ikan2-theme .eyebrow {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-foreground);
}

.ikan2-theme .insight-card {
  width: 155px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  padding: 15px;
  box-shadow: var(--shadow-card);
}

.ikan2-theme .insight-card svg {
  width: 19px;
  height: 19px;
}

.ikan2-theme .insight-card p {
  margin-top: 18px;
  font-size: 11px;
  color: var(--muted-foreground);
}

.ikan2-theme .insight-card strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 20px;
}

.ikan2-theme .insight-card span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted-foreground);
}

.ikan2-theme .semantic-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

.ikan2-theme .metric-pill {
  border-radius: 12px;
  background: var(--secondary);
  padding: 8px 10px;
}

.ikan2-theme .metric-pill span {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-foreground);
}

.ikan2-theme .program-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: linear-gradient(120deg, var(--foreground), oklch(0.29 0.018 255));
  color: var(--background);
}

.ikan2-theme .program-band span {
  display: block;
  font-size: 10px;
  color: oklch(0.83 0.01 250);
}

.ikan2-theme .program-band strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 16px;
}

.ikan2-theme .read-card {
  position: relative;
  display: block;
  width: 210px;
  height: 152px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.ikan2-theme .read-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ikan2-theme .read-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px;
  color: var(--background);
}

.ikan2-theme .read-body strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.3;
}

.ikan2-theme .read-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.18);
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backdrop-filter: blur(6px);
}

.ikan2-theme .read-meta {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  opacity: 0.75;
}

/*
 * The scroll reveal. `reveal` is the resting state and `reveal-in` is added by
 * the `Reveal` component once an IntersectionObserver sees the element, which
 * is exactly how iKAN 2 drives it.
 */
.ikan2-theme .reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 0.6s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.6s cubic-bezier(0.32, 0.72, 0, 1);
}

.ikan2-theme .reveal-in {
  opacity: 1;
  transform: none;
}

/*
 * Someone who has asked their system not to animate gets the content, not a
 * blank screen: the resting state is the revealed one and nothing transitions.
 * iKAN 2 does not carry this guard; it is the one deliberate addition.
 */
@media (prefers-reduced-motion: reduce) {
  .ikan2-theme .reveal,
  .ikan2-theme .reveal-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ─────────────────────────────────────────────────────────────────
 * TYPE ROLES AS REAL CLASSES
 *
 * These are the same roles declared above with `@utility`, repeated here as
 * ordinary classes scoped to `.ikan2-theme`.
 *
 * WHY BOTH. `@utility` compiles into Tailwind's UTILITIES LAYER, and an
 * unlayered rule beats any layer. Every `type-*` class in this repo was
 * therefore silently doing nothing wherever an unlayered rule in `globals.css`
 * set a font-size on the same element — the nav wordmark carrying
 * `className="type-subhead"` rendered at the inherited 16px/400 instead of
 * 18px/600, and nothing in the markup said why.
 *
 * Scoped to `.ikan2-theme` these are specificity 0,2,0 and win. A component
 * that wants a role must carry `ikan2-theme` on itself or an ancestor.
 * Generated from iKAN 2's own declarations; do not hand-edit the values.
 * ───────────────────────────────────────────────────────────────── */

.ikan2-theme .type-display-lg {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 58px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ikan2-theme .type-display-md {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 48px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.ikan2-theme .type-display-sm {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ikan2-theme .type-headline-lg {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ikan2-theme .type-headline-md {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ikan2-theme .type-headline-sm {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  /* declared, not omitted: letter-spacing inherits, so a role that
  leaves it out picks up whatever an ancestor set. */
  letter-spacing: normal;
}

.ikan2-theme .type-subhead {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: normal;
}

.ikan2-theme .type-title-lg {
  font-family: var(--font-display);
  /* 22, which is M3's own Title Large and the size the screens settled on. It was briefly 20
  * to put distance between this and Headline S (24) — but 20 and 22 were both already in
  * use, 2px apart, doing the same job, so that created a third near-duplicate instead of
  * removing one. They are now one role at 22.
  *
  * 600, not M3's 400/500: of the 18 call sites, 17 overrode the weight to semibold. When
  * every use fights the role, the role is wrong. The one exception — the article standfirst
  * — now carries font-medium instead, so the override is on the rare case, not the common
  * one. */
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: normal;
}

.ikan2-theme .type-title-md {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ikan2-theme .type-body {
  font-size: 15px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: normal;
}

.ikan2-theme .type-body-lg {
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  /* declared, not omitted: letter-spacing inherits, so a role that
  leaves it out picks up whatever an ancestor set. */
  letter-spacing: normal;
}

.ikan2-theme .type-body-md {
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  /* declared, not omitted: letter-spacing inherits, so a role that
  leaves it out picks up whatever an ancestor set. */
  letter-spacing: normal;
}

.ikan2-theme .type-body-xl {
  font-size: 17px;
  line-height: 28px;
  font-weight: 400;
  letter-spacing: normal;
}

.ikan2-theme .type-body-sm {
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: normal;
}

.ikan2-theme .type-action {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ikan2-theme .type-label-lg {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  /* declared, not omitted: letter-spacing inherits, so a role that
  leaves it out picks up whatever an ancestor set. */
  letter-spacing: normal;
}

.ikan2-theme .type-label-md {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ══ HEADINGS, ported ══════════════════════════════════════════════
 *
 * iKAN 2 maps every heading level to a type role in its base layer
 * (`ikan2/src/styles.css`, "h1 … h6"), so an unclassed heading is never the
 * browser's Times-ish 2em bold. Same map here, wrapped in :where() so it has
 * no specificity: any class on a heading still wins, exactly as iKAN 2's
 * @layer base loses to its type-* utilities.
 *
 * OPT-IN, like `.ikan2-theme`: a page adds `ikan2-type` to its root. Applied
 * site-wide it would zero the UA margins and set letter-spacing on headings
 * that Services and the newsletter block style only partly (their rules set
 * margin-top and font, and lean on the browser for the rest).
 *
 *   h1 headline-lg · h2 headline-sm · h3 title-md · h4 title-lg
 *   h5 label-lg    · h6 label-md
 * ═════════════════════════════════════════════════════════════════ */

.ikan2-type :where(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  color: var(--foreground);
}

.ikan2-type :where(h1) {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ikan2-type :where(h2) {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: normal;
}

.ikan2-type :where(h3) {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ikan2-type :where(h4) {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: normal;
}

.ikan2-type :where(h5) {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: normal;
}

.ikan2-type :where(h6) {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ══ COMPONENTS, ported ════════════════════════════════════════════
 *
 * The header of this file kept iKAN 2's components out because nothing on
 * the site rendered them. The partner application (/join/partner) is the
 * first site page that is a real form, so the handful it needs are
 * transcribed here, class for class, from their iKAN 2 source. They are
 * the same controls with the same states, not a lookalike:
 *
 *   .state-layer   components/equip/m3.ts       `stateLayer`
 *   .motion-press  styles.css                   `@utility motion-press`
 *   .field         components/auth-ui.tsx       `Field`
 *   .phone-field   components/phone-field.tsx   `PhoneField` (auth variant)
 *   .chip          components/kit/chip.tsx      `Chip`
 *   .btn           components/equip/m3.ts       `Button`
 *   .form-error    components/auth-ui.tsx       `FormError`
 *   .accent-*      components/equip/m3.ts       `accentStyle`
 *   .linear-progress components/equip/m3.ts     `LinearProgress`
 *   .segmented     components/equip/m3.ts       `Segmented`
 *
 * When the source moves, diff and follow it; do not restyle these here.
 * ═════════════════════════════════════════════════════════════════ */

/* M3 state layer: a current-colour veil, 6% on hover, 12% pressed. */
.ikan2-theme .state-layer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.ikan2-theme .state-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.ikan2-theme .state-layer:hover::after {
  opacity: 0.06;
}

.ikan2-theme .state-layer:active::after {
  opacity: 0.12;
}

.ikan2-theme .state-layer:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.ikan2-theme .motion-press {
  transition:
    transform var(--dur-fast) var(--ease-spring),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.ikan2-theme .motion-press:active {
  transform: scale(0.97);
}

/* Field: label above, a 48px secondary box that whitens on focus, error border. */
.ikan2-theme .field {
  display: block;
  min-width: 0;
}

.ikan2-theme .field__label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.ikan2-theme .field__box {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--secondary);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.ikan2-theme .field__box:focus-within {
  border-color: color-mix(in oklab, var(--foreground) 60%, transparent);
  background: var(--background);
}

.ikan2-theme .field__box[data-invalid='true'] {
  border-color: var(--error);
}

.ikan2-theme .field__box--multiline {
  align-items: stretch;
  padding: 12px 16px;
}

.ikan2-theme .field__control {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  outline: none;
}

.ikan2-theme .field__control::placeholder {
  color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
}

.ikan2-theme textarea.field__control {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.ikan2-theme select.field__control {
  cursor: pointer;
}

.ikan2-theme .field__prefix {
  padding-right: 8px;
  font-size: 16px;
  color: var(--muted-foreground);
}

.ikan2-theme .field__message {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-foreground);
}

.ikan2-theme .field__message--error {
  color: var(--error);
}

/* Phone field: flag + dial code over an invisible native select, then the number. */
.ikan2-theme .phone-field__country {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.ikan2-theme .phone-field__country > span {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.ikan2-theme .phone-field__flag {
  font-size: 20px;
  line-height: 1;
}

.ikan2-theme .phone-field__country svg {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.ikan2-theme .phone-field__country select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ikan2-theme .phone-field__number {
  padding-left: 12px;
  border-left: 1px solid color-mix(in oklab, var(--foreground) 15%, transparent);
  font-variant-numeric: tabular-nums;
}

/* Chip: interactive pill. Unselected `neutral`, selected always `solid`. */
.ikan2-theme .chip {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
}

.ikan2-theme .chip--sm {
  height: 28px;
  gap: 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

.ikan2-theme .chip--lg {
  height: 36px;
  padding: 0 16px;
}

.ikan2-theme .chip--outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--foreground) 20%, transparent);
}

.ikan2-theme .chip[aria-pressed='true'],
.ikan2-theme .chip[aria-current='step'] {
  background: var(--foreground);
  color: var(--background);
  box-shadow: none;
}

.ikan2-theme .chip:disabled {
  pointer-events: none;
  opacity: 0.4;
}

.ikan2-theme .chip svg {
  width: 16px;
  height: 16px;
}

/* Button: filled / outlined / text, 48px (lg) or 40px (md). */
.ikan2-theme .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
}

.ikan2-theme .btn--md {
  height: 40px;
  padding: 0 20px;
}

.ikan2-theme .btn--filled {
  background: var(--foreground);
  color: var(--background);
}

.ikan2-theme .btn--outlined {
  background: transparent;
  color: var(--foreground);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--foreground) 25%, transparent);
}

.ikan2-theme .btn--text {
  padding: 0 12px;
  background: transparent;
  color: var(--foreground);
}

.ikan2-theme .btn--icon {
  width: 40px;
  padding: 0;
}

.ikan2-theme .btn:disabled {
  pointer-events: none;
  opacity: 0.4;
}

.ikan2-theme .btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.ikan2-theme .btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  animation: ikan2-spin 0.8s linear infinite;
}

@keyframes ikan2-spin {
  to { transform: rotate(360deg); }
}

.ikan2-theme .form-error {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--error-container);
  color: var(--on-error-container);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

/* Tonal accent per programme: iKAN 2 uses it only for progress and
   selection. `--accent-strong` is the text-safe shade (4.5:1+ on white). */
.ikan2-theme.accent-night, .ikan2-theme .accent-night { --accent: #5e86b8; --accent-strong: #2f5580; --accent-container: #e3ecf8; --on-accent-container: #1c3553; }
.ikan2-theme.accent-ember, .ikan2-theme .accent-ember { --accent: #b98a22; --accent-strong: #7a5a12; --accent-container: #fbefd2; --on-accent-container: #4f3a0a; }
.ikan2-theme.accent-calm, .ikan2-theme .accent-calm { --accent: #4e8f75; --accent-strong: #2b634d; --accent-container: #dff0e8; --on-accent-container: #173d2f; }
.ikan2-theme.accent-mind, .ikan2-theme .accent-mind { --accent: #5d64b4; --accent-strong: #3b418c; --accent-container: #e6e7f6; --on-accent-container: #232761; }
.ikan2-theme.accent-mood, .ikan2-theme .accent-mood { --accent: #c2607c; --accent-strong: #8c3652; --accent-container: #f9e2e9; --on-accent-container: #5a1f32; }

/* Linear progress: a 4px accent run, a 4px gap, then the container for what is left. */
.ikan2-theme .linear-progress {
  display: flex;
  gap: 4px;
  width: 100%;
  height: 4px;
}

.ikan2-theme .linear-progress > span {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 500ms var(--ease-out);
}

.ikan2-theme .linear-progress::after {
  content: '';
  flex: 1;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-container);
}

/* Segmented: equal columns of 48px options; the chosen one fills with --accent-strong. */
.ikan2-theme .segmented {
  display: grid;
  grid-template-columns: repeat(var(--segments, 2), minmax(0, 1fr));
  gap: 8px;
}

.ikan2-theme .segmented__option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid color-mix(in oklab, var(--foreground) 10%, transparent);
  border-radius: 14px;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.ikan2-theme .segmented__option[aria-checked='true'] {
  border-color: transparent;
  background: var(--accent-strong);
  color: var(--background);
}

/* Compact: a 40px row for matrices and long lists of one-of-n questions. */
.ikan2-theme .segmented--sm .segmented__option {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 20px;
}

.ikan2-theme .segmented__option svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ikan2-theme .motion-press:active {
    transform: none;
  }

  .ikan2-theme .btn__spinner {
    animation-duration: 2s;
  }

  .ikan2-theme .linear-progress > span {
    transition: none;
  }
}

/* ══ FLOW CHROME, ported ═══════════════════════════════════════════
 *
 * The pieces of iKAN 2's step flows (`routes/assessment-flow.tsx`) that a
 * site page can use as they are. The app's phone column and fixed footer are
 * deliberately NOT here: the site lays itself out across phone, tablet and
 * desktop, so the page that uses these supplies its own responsive layout.
 *
 *   .flow-footer__*  components/equip/steps.tsx `Footer` (hint + actions)
 *   .select-row      components/equip/m3.ts `SelectRow`
 *   .sheet           components/equip/m3.ts `BottomSheet`
 *   .notice          routes/assessment-flow  "Picking up where you left off."
 * ═════════════════════════════════════════════════════════════════ */

.ikan2-theme .flow-footer__hint {
  margin: 0;
  padding: 8px 16px 0;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  color: var(--muted-foreground);
}

.ikan2-theme .flow-footer__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
}

.ikan2-theme .flow-footer__actions .btn--filled {
  flex: 1;
}

/* Icon tile: the accent circle iKAN 2's programme steps lead a block with
   (components/equip/steps.tsx `BlockText`, h-10 w-10 accent-container). */
.ikan2-theme .icon-tile {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent-container);
  color: var(--on-accent-container);
}

.ikan2-theme .icon-tile svg {
  width: 20px;
  height: 20px;
}

.ikan2-theme .notice {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-container);
  color: var(--on-accent-container);
  font-size: 15px;
  line-height: 22px;
}

/* SelectRow: 56px row, a radio/check glyph, the selected row in accent-container. */
.ikan2-theme .select-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid color-mix(in oklab, var(--foreground) 10%, transparent);
  border-radius: 20px;
}

/* Rows touch: the site's `li + li` rhythm rule would open a gap between a
   highlighted row and the divider under it. */
.ikan2-theme .select-list > li {
  margin: 0;
}

.ikan2-theme .select-list > li + li {
  border-top: 1px solid color-mix(in oklab, var(--foreground) 10%, transparent);
}

.ikan2-theme .select-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.ikan2-theme .select-row[aria-current='step'] {
  background: var(--accent-container);
  color: var(--on-accent-container);
}

.ikan2-theme .select-row[aria-current='step'] .select-row__glyph:not(.select-row__glyph--done) {
  border-color: var(--accent-strong);
  color: var(--on-accent-container);
}

.ikan2-theme .select-row:disabled {
  cursor: default;
  color: var(--muted-foreground);
}

.ikan2-theme .select-row__glyph {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid color-mix(in oklab, var(--foreground) 55%, transparent);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ikan2-theme .select-row__glyph--done {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--background);
}

.ikan2-theme .select-row__glyph svg {
  width: 14px;
  height: 14px;
}

.ikan2-theme .select-row__meta {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted-foreground);
}

/* BottomSheet: a scrim and a 28px-radius panel in the app column, with a handle. */
.ikan2-theme .sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ikan2-theme .sheet__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: color-mix(in oklab, var(--foreground) 40%, transparent);
  animation: ikan2-fade var(--dur-base) var(--ease-out);
}

.ikan2-theme .sheet__panel {
  position: relative;
  width: 100%;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 12px 24px max(2rem, env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--background);
  animation: ikan2-sheet 280ms var(--ease-out);
}

@media (min-width: 640px) {
  .ikan2-theme .sheet__panel { max-width: 36rem; }
}

@media (min-width: 1024px) {
  .ikan2-theme .sheet__panel { max-width: 30rem; }
}

.ikan2-theme .sheet__handle {
  width: 32px;
  height: 4px;
  margin: 0 auto;
  border-radius: 999px;
  background: color-mix(in oklab, var(--foreground) 30%, transparent);
}

.ikan2-theme .sheet__title {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
}

.ikan2-theme .sheet__body {
  margin-top: 20px;
}

.ikan2-theme .sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

@keyframes ikan2-fade {
  from { opacity: 0; }
}

@keyframes ikan2-sheet {
  from { transform: translateY(24px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ikan2-theme .sheet__scrim,
  .ikan2-theme .sheet__panel {
    animation: none;
  }
}


/* ── Mobile PWA Navigation Dock & Utilities ────────────────────── */
.shadow-dock {
  box-shadow: 0 12px 35px rgba(20, 24, 33, 0.14);
}

.nav-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-icon {
  display: grid;
  width: 40px;
  height: 28px;
  place-items: center;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.pb-safe {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

/* ── Shimmer Skeleton Loading Framework ─────────────────────── */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton,
.skeleton-box,
.skeleton-card,
.skeleton-text,
.skeleton-circle {
  background: linear-gradient(90deg, rgba(230, 233, 238, 0.6) 25%, rgba(245, 247, 250, 0.9) 50%, rgba(230, 233, 238, 0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  display: block;
}

.skeleton-text {
  height: 14px;
  width: 100%;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
  border-radius: 6px;
}

.skeleton-circle {
  border-radius: 50% !important;
}

.skeleton-card {
  border-radius: var(--radius-xl, 16px);
  min-height: 200px;
}

/* ── Capsule Navigation and Dock Shadows ─────────────────────── */
.shadow-app {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
}

.shadow-dock {
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

.nav-fixed-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

/* ── Authentic Scroll Reveal & Micro-Interactions ─────────────── */
:root, .ikan2-theme {
  --nav-clearance: 112px;
}
@media (max-width: 1023px) {
  :root, .ikan2-theme {
    --nav-clearance: 84px;
  }
}

.site-page-below-nav {
  padding-top: var(--nav-clearance, 112px) !important;
}

.site-container,
.ikan-container {
  width: 100%;
  max-width: 1100px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}
@media (min-width: 768px) {
  .site-container,
  .ikan-container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* Scroll reveal initial state and active state */
.reveal, .about-reveal, [data-reveal] {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.reveal-in,
.about-reveal.is-in,
[data-reveal].reveal-in {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .about-reveal, [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Card hover and interactive transforms */
.interactive-card,
.service-card,
.assessment-card,
.program-card,
.team-card,
.calc-band,
.site-card,
.about-story-card,
.about-stat {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

.interactive-card:hover,
.service-card:hover,
.assessment-card:hover,
.program-card:hover,
.team-card:hover,
.about-story-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08) !important;
}

/* Buttons active/press state */
button,
.btn,
.btn-nav-primary,
.btn-nav-secondary,
.info-button,
.calc-hero__cta,
.motion-press {
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:active,
.btn:active,
.btn-nav-primary:active,
.btn-nav-secondary:active,
.info-button:active,
.calc-hero__cta:active,
.motion-press:active {
  transform: scale(0.97) !important;
}

