/* ==========================================================================
   untitledprojects.work
   Built to Apple's Human Interface Guidelines (see README "Design system").
   - Type: Inter + Heebo (Hebrew). One scale, tokens below, nothing off-scale.
   - Spacing: 8px step. Every gap is a multiple of --s.
   - Targets: every interactive element has a ≥44×44px hit region.
   - Contrast: every text pair checked ≥4.5:1 in light and dark.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand: one colour means "interactive" */
  --brand: #0066CC;            /* 5.39:1 on --bg */
  --brand-ink: #FFFFFF;        /* 5.57:1 on --brand */
  --eyebrow: #8944AB;          /* 5.84:1 — labels only, never interactive */

  /* Per-project accents (decoration: glows, bullet tints) */
  --c-yalkut: #0066CC;
  --c-focus: #0C5E5C;

  /* Neutrals */
  --bg: #FBFBFD;
  --bg-tint: #F2F2F5;
  --surface: #FFFFFF;
  --text: #1D1D1F;             /* 16.3:1 */
  --text-2: #5E5E63;           /* 6.2:1 on bg, 5.8:1 on tint */
  --hairline: rgb(0 0 0 / 0.08);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.04), 0 24px 64px rgb(0 40 100 / 0.14);
  --nav-bg: rgb(251 251 253 / 0.72);
  --done: #248A3D;

  /* Type scale — Apple iOS steps (12–34) + two display steps */
  --t-caption: 12px;  --lh-caption: 16px;
  --t-footnote: 13px; --lh-footnote: 18px;
  --t-subhead: 15px;  --lh-subhead: 20px;
  --t-body: 17px;     --lh-body: 25px;   /* prose leading; UI rows use 22px */
  --t-title3: 20px;   --lh-title3: 28px;
  --t-title1: 28px;   --lh-title1: 34px;
  --t-large: 34px;    --lh-large: 41px;
  --t-display: 48px;  --lh-display: 52px;
  --t-hero: 64px;     --lh-hero: 68px;

  /* Spacing — 8px step */
  --s: 8px;
  --gutter: calc(var(--s) * 2);
  --section: calc(var(--s) * 10);

  /* Radii */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", "Heebo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4BA3FF;          /* 7.47:1 on bg */
    --brand-ink: #06223F;      /* 6.1:1 on brand */
    --eyebrow: #DA8FFF;        /* 8.76:1 */
    --c-yalkut: #4BA3FF;
    --c-focus: #5CC8BC;
    --bg: #0B0B0D;
    --bg-tint: #141417;
    --surface: #1C1C1E;
    --text: #F5F5F7;           /* 18.1:1 */
    --text-2: #A1A1A6;         /* 7.6:1 on bg, 6.6:1 on surface */
    --hairline: rgb(255 255 255 / 0.1);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 24px 64px rgb(0 0 0 / 0.5);
    --nav-bg: rgb(11 11 13 / 0.72);
    --done: #30D158;
  }
}

/* Increased Contrast: secondary text becomes primary, hairlines darken */
@media (prefers-contrast: more) {
  :root { --text-2: var(--text); --hairline: rgb(127 127 127 / 0.5); --nav-bg: var(--bg); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--s) * 9);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite { position: absolute; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.icon--sm { width: 16px; height: 16px; }

.container {
  width: 100%;
  max-width: 1128px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
@media (min-width: 480px) { :root { --gutter: calc(var(--s) * 3); } }

.skip-link {
  position: absolute; z-index: 100;
  left: var(--s); top: calc(var(--s) * -8);
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 calc(var(--s) * 2);
  background: var(--brand); color: var(--brand-ink);
  border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { top: calc(env(safe-area-inset-top) + var(--s)); }

.muted { color: var(--text-2); }
.text-brand { color: var(--brand); }

.eyebrow {
  font-size: var(--t-subhead); line-height: var(--lh-subhead);
  font-weight: 600; color: var(--eyebrow);
  margin-bottom: calc(var(--s) * 2);
}

.lead {
  font-size: var(--t-title3); line-height: var(--lh-title3);
  color: var(--text-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s);
  min-height: 44px;
  padding: 0 calc(var(--s) * 2.5);
  border: 0; border-radius: 999px;
  font-size: var(--t-subhead); line-height: var(--lh-subhead); font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s;
}
.btn .icon { width: 20px; height: 20px; }
.btn:active { transform: scale(0.97); }

.btn--primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 20px rgb(0 102 204 / 0.25); }
.btn--primary:hover { box-shadow: 0 10px 28px rgb(0 102 204 / 0.32); }
.btn--tinted { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.btn--tinted:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); }
.btn--lg { min-height: 52px; padding: 0 calc(var(--s) * 3); font-size: var(--t-body); line-height: 22px; }

/* ---------- Navigation: the single floating glass layer ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--hairline); }

.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: calc(var(--s) * 2);
  height: calc(var(--s) * 7);
}

.nav__brand {
  display: inline-flex; align-items: center; gap: calc(var(--s) * 1.5);
  min-height: 44px;
  color: var(--text);
  font-size: var(--t-body); line-height: 22px; font-weight: 600; letter-spacing: -0.01em;
}
.nav__brand .muted { font-weight: 500; }

.nav__links { display: none; gap: var(--s); }
.nav__links a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 calc(var(--s) * 1.5);
  color: var(--text-2); font-size: var(--t-subhead); font-weight: 500;
  border-radius: 999px;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
@media (min-width: 768px) { .nav__links { display: flex; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--s) * 6) 0 calc(var(--s) * 8);
  overflow: hidden;
}

.hero__glow {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(48rem 32rem at 85% 20%, color-mix(in srgb, var(--eyebrow) 14%, transparent), transparent 70%),
    radial-gradient(40rem 32rem at 10% 90%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%);
}

.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--s) * 8); align-items: center;
}
.hero__grid > *, .feature__grid > * { min-width: 0; }

.hero__icon {
  width: 88px; height: 88px;
  margin-bottom: calc(var(--s) * 3);
  filter: drop-shadow(0 12px 24px rgb(0 0 0 / 0.18));
}

.hero__title {
  font-size: var(--t-display); line-height: var(--lh-display);
  font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: calc(var(--s) * 3);
}

.hero .lead { max-width: 34ch; }

.hero__actions {
  display: flex; flex-wrap: wrap; gap: calc(var(--s) * 1.5);
  margin-top: calc(var(--s) * 4);
}

.hero__device { display: flex; justify-content: center; }

@media (min-width: 1024px) {
  .hero { padding: calc(var(--s) * 10) 0 calc(var(--s) * 12); }
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
  .hero__title { font-size: var(--t-hero); line-height: var(--lh-hero); }
}

/* ---------- Phone (generic CSS device) ---------- */
.phone {
  width: min(300px, 100%); aspect-ratio: 9 / 19.5;
  padding: 12px;
  border-radius: 52px;
  background: linear-gradient(145deg, #2a2d31, #121416);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgb(255 255 255 / 0.08);
}

.phone__screen {
  position: relative; height: 100%;
  display: flex; flex-direction: column;
  border-radius: 40px; overflow: hidden;
  /* Wallpaper: soft brand gradient */
  background:
    radial-gradient(120% 60% at 0% 0%, #CFE2FF, transparent 60%),
    radial-gradient(120% 70% at 100% 100%, #EAD7F5, transparent 60%),
    #F4F5FA;
  color: #1D1D1F;
}

.phone__island {
  position: absolute; top: 10px; left: 50%; translate: -50% 0;
  width: 88px; height: 26px; border-radius: 20px; background: #000;
}

.statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px 0; height: 44px;
  font-size: var(--t-footnote); line-height: var(--lh-footnote); font-weight: 600;
}
.statusbar__dots { width: 24px; height: 11px; border-radius: 3px; border: 1.5px solid currentColor; opacity: 0.8; }

.home { flex: 1; display: grid; align-content: start; gap: 16px; padding: 16px 18px 0; }

.widget-date, .upnext {
  display: grid; gap: 2px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgb(255 255 255 / 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 16px rgb(0 0 0 / 0.06);
}
.widget-date small { font-size: var(--t-footnote); line-height: var(--lh-footnote); font-weight: 600; color: #C6304A; text-transform: uppercase; letter-spacing: 0.04em; }
.widget-date b { font-size: var(--t-large); line-height: var(--lh-large); font-weight: 700; letter-spacing: -0.02em; }
.widget-date > span { font-size: var(--t-footnote); line-height: var(--lh-footnote); color: #5E5E63; }

.home__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.app-slot { display: grid; justify-items: center; gap: 6px; }
.app-slot img, .app-slot i {
  width: 100%; max-width: 56px; aspect-ratio: 1;
  border-radius: 13px;
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.12);
}
.app-slot img[src$=".png"] { background: #FDFDF9; }
.app-slot small { font-size: 11px; line-height: 13px; font-weight: 500; color: #1D1D1F; }
.app-slot--empty i {
  display: block;
  border: 1.5px dashed rgb(0 0 0 / 0.28);
  background: rgb(255 255 255 / 0.35);
  box-shadow: none;
}
.app-slot--empty small { color: #5E5E63; }

.home__widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-widget {
  display: grid; gap: 2px; align-content: start;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgb(255 255 255 / 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 16px rgb(0 0 0 / 0.06);
  animation: rise 0.6s var(--ease) both; animation-delay: calc(0.4s + var(--d) * 0.08s);
}
.mini-widget small { font-size: 11px; line-height: 13px; font-weight: 600; color: #0058B0; }
.mini-widget:last-child small { color: #2E7D32; }
.mini-widget b { font-size: var(--t-title3); line-height: var(--lh-title3); font-weight: 700; letter-spacing: -0.01em; }
.mini-widget span { font-size: 11px; line-height: 13px; color: #5E5E63; }

.upnext small { font-size: 11px; line-height: 13px; color: #5E5E63; font-weight: 600; }
.upnext b { font-size: var(--t-subhead); line-height: var(--lh-subhead); font-weight: 600; }
.caret {
  display: inline-block; width: 2px; height: 16px; margin-inline-start: 2px;
  vertical-align: -3px; background: #0066CC; border-radius: 1px;
}

.home__search {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin: 0 auto 10px; padding: 6px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.6);
  font-size: var(--t-footnote); line-height: var(--lh-footnote); font-weight: 600; color: #5E5E63;
}
.home__search .icon { width: 14px; height: 14px; }
.home__indicator { width: 120px; height: 5px; margin: 0 auto 8px; border-radius: 3px; background: rgb(0 0 0 / 0.8); }

/* Hero entrance: device rises once, its contents settle in a stagger */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.phone { animation: rise 0.9s var(--ease) both 0.1s; }
.widget-date, .app-slot, .upnext { animation: rise 0.6s var(--ease) both; animation-delay: calc(0.4s + var(--d) * 0.08s); }

/* ---------- Gradient tiles (Focus's per-tool colours) ---------- */
.g-blue   { background: linear-gradient(135deg, #2196F3, #42A5F5); }
.g-green  { background: linear-gradient(135deg, #43A047, #66BB6A); }
.g-orange { background: linear-gradient(135deg, #F4511E, #FF7043); }
.g-purple { background: linear-gradient(135deg, #673AB7, #7E57C2); }
.g-pink   { background: linear-gradient(135deg, #D81B60, #EC407A); }
.g-teal   { background: linear-gradient(135deg, #00ACC1, #26C6DA); }

.tile {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px; color: #fff;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.12);
}
.tile .icon { width: 26px; height: 26px; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section__head { max-width: 720px; margin-bottom: calc(var(--s) * 6); }
.section__title {
  font-size: var(--t-large); line-height: var(--lh-large);
  font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: calc(var(--s) * 2);
}
@media (min-width: 1024px) {
  :root { --section: calc(var(--s) * 15); }
  .section__title { font-size: var(--t-display); line-height: var(--lh-display); }
}

/* ---------- Project grid ---------- */
.project-grid { display: grid; gap: calc(var(--s) * 2); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px)  { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.project-card {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  height: 100%;
  padding: calc(var(--s) * 3);
  border-radius: var(--r-md);
  background:
    radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--accent, var(--brand)) 12%, transparent), transparent 70%),
    var(--surface);
  color: var(--text);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
a.project-card:active { transform: scale(0.98); }
@media (hover: hover) {
  a.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
}

.project-card__icon {
  width: 56px; height: 56px;
  margin-bottom: calc(var(--s) * 2);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.12);
}
img.project-card__icon[src$=".png"] { background: #FDFDF9; }
.project-card__icon--empty, .project-card__icon--empty i { display: block; }
.project-card__icon--empty {
  border: 2px dashed color-mix(in srgb, var(--text) 25%, transparent);
  box-shadow: none;
  display: grid; place-items: center;
}
.project-card__icon--empty i { width: 2px; height: 24px; border-radius: 1px; background: var(--text-2); }

.project-card__name { font-size: var(--t-title3); line-height: var(--lh-title3); font-weight: 700; letter-spacing: -0.01em; }
.project-card__kind { font-size: var(--t-subhead); line-height: var(--lh-subhead); font-weight: 600; color: var(--text-2); }
.project-card__line { margin-top: var(--s); font-size: var(--t-subhead); line-height: var(--lh-subhead); color: var(--text-2); }
.project-card__domain {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: auto; padding-top: calc(var(--s) * 2);
  font-size: var(--t-footnote); line-height: var(--lh-footnote); font-weight: 600;
  color: var(--brand);
  overflow-wrap: anywhere;
}

.project-card--empty {
  background: transparent;
  border: 1.5px dashed color-mix(in srgb, var(--text) 22%, transparent);
  box-shadow: none;
}

/* ---------- Feature rows ---------- */
.feature { padding: calc(var(--section) * 0.8) 0; }
.feature--tint { background: var(--bg-tint); }
.feature__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--s) * 5); align-items: center; }

.feature__icon {
  width: 56px; height: 56px;
  margin-bottom: calc(var(--s) * 3);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.12);
}
img.feature__icon[src$=".png"] { background: #FDFDF9; }
.is-round { border-radius: 50%; }

.feature__title {
  font-size: var(--t-large); line-height: var(--lh-large);
  font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: calc(var(--s) * 2);
}
.feature__copy > p:not(.eyebrow) { color: var(--text-2); max-width: 52ch; }
.feature__cta { margin-top: calc(var(--s) * 4); }

.checks { display: grid; gap: var(--s); margin-top: calc(var(--s) * 3); }
.checks li {
  position: relative; padding-left: calc(var(--s) * 4);
  font-size: var(--t-subhead); line-height: var(--lh-subhead); font-weight: 500;
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: -2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); }
}

@media (min-width: 1024px) {
  .feature__grid { grid-template-columns: 1fr 1fr; gap: calc(var(--s) * 10); }
  .feature--flip .feature__copy { order: 2; }
  .feature__title { font-size: var(--t-display); line-height: var(--lh-display); }
}

/* ---------- Demo canvas ---------- */
.demo {
  position: relative;
  display: grid; gap: calc(var(--s) * 2);
  padding: calc(var(--s) * 3);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%),
    var(--bg-tint);
  border: 1px solid var(--hairline);
}
.feature--tint .demo { background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%), var(--bg); }
/* Small screens: cards sit straight on the page so nothing gets squeezed */
@media (max-width: 639px) {
  .demo, .feature--tint .demo { padding: 0; background: none; border: 0; }
}
@media (min-width: 640px) { .demo { padding: calc(var(--s) * 5); } }

.card {
  padding: calc(var(--s) * 2.5);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
}

/* Segmented control */
.segmented {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 12px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.segmented--full { display: grid; width: 100%; margin-bottom: calc(var(--s) * 2); }
.segmented button {
  min-height: 44px; padding: 0 var(--s);
  border: 0; border-radius: 9px; background: transparent;
  font-size: var(--t-subhead); line-height: var(--lh-subhead); font-weight: 600;
  color: var(--text-2); cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s, box-shadow 0.25s;
}
.segmented [aria-selected="true"] {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}

/* Checklist rows (shared by both demos) */
.tasklist li + li { border-top: 1px solid var(--hairline); }
.task {
  display: flex; align-items: center; gap: calc(var(--s) * 1.5);
  width: 100%; min-height: 52px; padding: var(--s) 0;
  border: 0; background: none; text-align: start; cursor: pointer;
}
.task__box {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--text) 30%, transparent);
  color: #fff;
  transition: background-color 0.25s var(--ease), border-color 0.25s;
}
.task__box .icon { width: 16px; height: 16px; stroke-width: 3; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.35s var(--ease) 0.05s; }
.task__text b { display: block; font-size: var(--t-body); line-height: 22px; font-weight: 500; transition: color 0.25s; }
.task__text small { display: block; color: var(--text-2); font-size: var(--t-footnote); line-height: var(--lh-footnote); }
.task[aria-pressed="true"] .task__box { background: #248A3D; border-color: #248A3D; }
.task[aria-pressed="true"] .task__box .icon { stroke-dashoffset: 0; }
.task[aria-pressed="true"] b { color: var(--text-2); text-decoration: line-through; }

.chip {
  display: inline-block;
  padding: 2px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-yalkut) 14%, transparent);
  color: var(--text);
  font-size: var(--t-caption); line-height: var(--lh-caption); font-weight: 600;
}
.chip--soft { background: color-mix(in srgb, var(--text) 8%, transparent); }

/* Yalkut demo */
.yk-test__head { display: flex; justify-content: space-between; align-items: flex-start; gap: calc(var(--s) * 2); }
.yk-test__head > div:first-child { display: grid; gap: 4px; justify-items: start; }
.yk-test__head b { font-size: var(--t-title3); line-height: var(--lh-title3); font-weight: 700; }
.yk-test__head small { font-size: var(--t-footnote); line-height: var(--lh-footnote); }
.yk-count {
  display: grid; place-items: center; flex: none;
  min-width: 72px; padding: var(--s) calc(var(--s) * 1.5);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--c-yalkut) 12%, transparent);
}
.yk-count b { font-size: var(--t-large); line-height: var(--lh-large); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.yk-count small { font-size: var(--t-caption); line-height: var(--lh-caption); font-weight: 600; color: var(--text-2); }

.yk-test__label { margin: calc(var(--s) * 2) 0 4px; font-size: var(--t-footnote); line-height: var(--lh-footnote); font-weight: 600; color: var(--text-2); }

.progress { height: 6px; margin-top: var(--s); border-radius: 3px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.progress span { display: block; height: 100%; width: var(--p, 50%); border-radius: inherit; background: linear-gradient(90deg, #0066CC, #3D8BFF); transition: width 0.5s var(--ease); }
[dir="rtl"] .progress span { margin-inline-start: 0; background: linear-gradient(270deg, #0066CC, #3D8BFF); }
.yk-test__progress { margin-top: var(--s); font-size: var(--t-footnote); line-height: var(--lh-footnote); }

.yk-row {
  display: flex; align-items: center; gap: var(--s);
  margin-top: calc(var(--s) * 2); padding-top: calc(var(--s) * 2);
  border-top: 1px solid var(--hairline);
  font-size: var(--t-subhead); line-height: var(--lh-subhead);
}
.yk-row small { margin-inline-start: auto; font-size: var(--t-footnote); line-height: var(--lh-footnote); }

.js [data-js-hidden] { display: none; }
.yk__panel { animation: rise 0.35s var(--ease) both; }

/* Focus demo */
.fx__label { margin-bottom: calc(var(--s) * 1.5); font-weight: 600; }
.fx__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s); }
.fx__grid button {
  display: grid; justify-items: center; gap: var(--s);
  min-height: 44px; padding: calc(var(--s) * 1.5) 4px;
  border: 0; border-radius: var(--r-sm);
  background: transparent; cursor: pointer;
  font-size: var(--t-footnote); line-height: var(--lh-footnote); font-weight: 600;
  color: var(--text-2);
  transition: background-color 0.25s var(--ease), color 0.25s;
}
.fx__grid button .tile { transition: transform 0.3s var(--ease); }
.fx__grid [aria-checked="true"] { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.fx__grid [aria-checked="true"] .tile { transform: scale(1.06); }

.fx__detail {
  margin-top: calc(var(--s) * 2); padding-top: calc(var(--s) * 2);
  border-top: 1px solid var(--hairline);
  min-height: 112px;
}
.fx__detail b { display: block; font-size: var(--t-title3); line-height: var(--lh-title3); font-weight: 700; letter-spacing: -0.01em; }
.fx__detail p { margin-top: 4px; color: var(--text-2); font-size: var(--t-subhead); line-height: var(--lh-subhead); }
.fx__detail.is-new { animation: rise 0.35s var(--ease) both; }

/* ---------- Details ---------- */
.detail-grid { display: grid; gap: calc(var(--s) * 2); }
@media (min-width: 640px)  { .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.detail { padding: calc(var(--s) * 3); }
.detail .icon { width: 28px; height: 28px; color: var(--eyebrow); margin-bottom: calc(var(--s) * 2); }
.detail h3 { font-size: var(--t-body); line-height: 22px; font-weight: 600; margin-bottom: var(--s); }
.detail p { color: var(--text-2); font-size: var(--t-subhead); line-height: var(--lh-subhead); }

/* ---------- Footer ---------- */
.footer {
  padding: calc(var(--s) * 5) 0 calc(var(--s) * 5 + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
}
.footer__inner { display: grid; gap: calc(var(--s) * 2); justify-items: start; }
.footer__brand {
  display: inline-flex; align-items: center; gap: var(--s);
  min-height: 44px; color: var(--text); font-weight: 600;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 0 calc(var(--s) * 3); }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font-size: var(--t-subhead); font-weight: 500; }
.footer__legal { font-size: var(--t-footnote); line-height: var(--lh-footnote); color: var(--text-2); }
@media (min-width: 768px) {
  .footer__inner { grid-template-columns: auto 1fr; align-items: center; }
  .footer__links { justify-content: flex-end; }
  .footer__legal { grid-column: 1 / -1; }
}

/* ---------- Scroll reveal (demo panels only) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px) scale(0.98); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
