/* Round 17 · items 2-10 of Figma 87:549. Founder rule 17.11: ONLY var(--…) from css/tokens.css (generated from the Figma snapshot).
   No literal color, size, spacing, radius or font here: tests/figma-tokens-check.mjs fails on any. Layout keywords, fr and % are layout,
   not design values. Touch targets and the focus ring come from the shared approved classes (.pill, .chip-opt, .chip-btn). */

/* item 2 · the reason above the hand-off button, and the status beside it */
.r17-nextwhy { display: flex; flex-wrap: wrap; align-items: center; gap: var(--r17-space-10); margin: 0; padding: var(--r17-space-10) var(--r17-space-14);
  border-radius: var(--r17-radius-10); background: var(--c-surface-tint-orange); color: var(--c-text-tint-orange);
  font-size: var(--ts-r17-heebo-bold-13-auto-size); font-weight: var(--ts-r17-heebo-bold-13-auto-weight); line-height: var(--ts-r17-heebo-bold-13-auto-lh); }
.r17-nextstatus { margin: 0; padding: var(--r17-space-10) var(--r17-space-14); border-radius: var(--r17-radius-10); background: var(--r17-color-141a2a); color: var(--r17-color-9db8ff);
  font-size: var(--ts-r17-heebo-semibold-13-auto-size); font-weight: var(--ts-r17-heebo-semibold-13-auto-weight); line-height: var(--ts-r17-heebo-semibold-13-auto-lh); }
.bar .r17-nextwhy, .bar .r17-nextstatus { flex: 1 1 100%; }
.bar:has(.r17-nextwhy:not([hidden])), .bar:has(.r17-nextstatus:not([hidden])) { flex-wrap: wrap; }

/* shared */
.r17-ok { color: var(--c-state-ok-on-dark); }
.r17-off { color: var(--r17-color-ffb4a0); }
.r17-fname { margin: 0 0 var(--r17-space-6); color: var(--c-text-secondary); font-size: var(--ts-r17-heebo-regular-14-150-size); line-height: var(--ts-r17-heebo-regular-14-150-lh); overflow-wrap: anywhere; }
.r17-file, .r17-add, .r17-quote { display: grid; gap: var(--r17-space-6); margin-block: var(--space-12); }
.r17-quote { border: var(--r17-stroke-1) solid var(--r17-color-2a2a33); border-radius: var(--r17-radius-16); padding: var(--r17-space-14); min-inline-size: 0; }
.r17-quote legend { font-size: var(--ts-r17-heebo-bold-14-auto-size); font-weight: var(--ts-r17-heebo-bold-14-auto-weight); padding-inline: var(--r17-space-6); }
.r17-pending { margin: var(--space-8) 0; color: var(--r17-color-ffb4a0); font-size: var(--ts-r17-heebo-bold-14-auto-size); font-weight: var(--ts-r17-heebo-bold-14-auto-weight); }
.r17-miss b { display: block; }

/* items 6-7 · old page → new page */
.r17-redir { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); margin-block: var(--space-8); }
.r17-redir .inp { flex: 1 1 12ch; min-inline-size: 0; }
.r17-rowmsg { flex: 1 1 100%; margin: 0; color: var(--r17-color-ffb4a0); font-size: var(--ts-r17-heebo-semibold-13-auto-size); font-weight: var(--ts-r17-heebo-semibold-13-auto-weight); }
.r17-rowmsg:empty { display: none; }

/* item 3 · why so */
.r17-why { margin-top: var(--space-16); padding: var(--r17-space-20); border-radius: var(--r17-radius-16); background: var(--c-surface-card); border: var(--r17-stroke-1) solid var(--r17-color-2a2a33); }
.r17-why h2 { margin: 0; font-size: var(--ts-r17-heebo-extrabold-19-140-size); font-weight: var(--ts-r17-heebo-extrabold-19-140-weight); line-height: var(--ts-r17-heebo-extrabold-19-140-lh); }
.r17-why ul { list-style: none; margin: var(--space-12) 0 0; padding: 0; display: grid; gap: var(--r17-space-10); }
.r17-why-row { display: grid; gap: var(--r17-space-6); padding: var(--r17-space-14); border-radius: var(--r17-radius-10); background: var(--c-surface-sunk); }
.r17-why-row p { margin: 0; font-size: var(--ts-r17-heebo-semibold-15-145-size); font-weight: var(--ts-r17-heebo-semibold-15-145-weight); line-height: var(--ts-r17-heebo-semibold-15-145-lh); overflow-wrap: anywhere; }
.r17-why-row small { color: var(--c-text-muted); font-size: var(--ts-r17-heebo-regular-14-150-size); line-height: var(--ts-r17-heebo-regular-14-150-lh); }
.r17-why-row .r17-updated { color: var(--c-state-ok-on-dark); font-weight: var(--ts-r17-heebo-bold-14-auto-weight); }
.r17-why-row .pill { justify-self: start; }

/* item 8 · link preview */
.r17-share { margin-top: var(--space-24); }
.r17-share > .qhead h2 { margin: 0; font-size: var(--ts-r17-heebo-black-26-115-size); font-weight: var(--ts-r17-heebo-black-26-115-weight); line-height: var(--ts-r17-heebo-black-26-115-lh); }
.r17-wa { margin-block: var(--space-12); padding: var(--r17-space-14); border-radius: var(--r17-radius-16); background: var(--r17-color-0f0f14); }
.r17-wa-bubble { max-inline-size: 100%; border-radius: var(--r17-radius-10); background: var(--r17-color-005c4b); padding: var(--r17-space-5); }
.r17-wa-img { display: grid; place-items: end start; min-block-size: 0; aspect-ratio: 1.91 / 1; border-radius: var(--r17-radius-8); background: var(--r17-color-2a3942); color: var(--r17-color-d1d7db); padding: var(--space-8);
  font-size: var(--ts-r17-heebo-regular-12-auto-size); }
.r17-wa-noimg { padding: var(--space-8); border-radius: var(--r17-radius-8); background: var(--r17-color-025144); color: var(--r17-color-ffb4a0); font-size: var(--ts-r17-heebo-bold-13-auto-size); font-weight: var(--ts-r17-heebo-bold-13-auto-weight); }
.r17-wa-meta { display: grid; gap: var(--r17-space-3); padding: var(--space-8); border-radius: var(--r17-radius-6); background: var(--r17-color-025144); margin-top: var(--r17-space-5); }
.r17-wa-meta b { color: var(--r17-color-e9edef); font-size: var(--ts-r17-heebo-bold-14-auto-size); font-weight: var(--ts-r17-heebo-bold-14-auto-weight); overflow-wrap: anywhere; }
.r17-wa-meta span { color: var(--r17-color-aebac1); font-size: var(--ts-r17-heebo-regular-13-auto-size); overflow-wrap: anywhere; }
.r17-wa-meta small { color: var(--r17-color-8696a0); font-size: var(--ts-r17-heebo-regular-12-auto-size); overflow-wrap: anywhere; }
.r17-hyp { background: var(--r17-color-141a2a); }
.r17-hyp .hint { color: var(--r17-color-9db8ff); }

/* item 9 · page title */
.r17-title { margin-top: var(--space-24); }
.r17-where { display: grid; gap: var(--r17-space-6); margin-block: var(--space-12); padding: var(--r17-space-14); border-radius: var(--r17-radius-10); background: var(--c-surface-sunk); }
.r17-where .lbl { margin: 0; }
.r17-tab { margin: 0; color: var(--c-text-secondary); font-size: var(--ts-r17-heebo-regular-14-150-size); overflow-wrap: anywhere; }
.r17-h1 { margin: 0; font-size: var(--ts-r17-heebo-black-20-145-size); font-weight: var(--ts-r17-heebo-black-20-145-weight); line-height: var(--ts-r17-heebo-black-20-145-lh); overflow-wrap: anywhere; }

/* item 10 · assets: kind and place */
.r17-assets { margin-top: var(--space-24); }
.r17-assets-list { list-style: none; margin: var(--space-12) 0; padding: 0; display: grid; gap: var(--r17-space-10); }
.r17-asset { display: grid; gap: var(--space-8); padding: var(--r17-space-14); border-radius: var(--r17-radius-16); background: var(--c-surface-sunk); min-inline-size: 0; }
.r17-asset p { margin: 0; overflow-wrap: anywhere; }

/* phones: the studio's approved rule since round 11 is UI text >= 16px under 900px (styles.css, round12 + run-checks). The 390/320 frames of
   87:549 draw 13-14px here; until the founder decides, phones use the Figma 16px size token (App r17 / Heebo Bold 16) for these texts.
   The breakpoint is the studio's existing one (styles.css), not a new value. */
@media (max-width: 899px) {
  .r17-nextwhy, .r17-nextstatus, .r17-fname, .r17-quote legend, .r17-pending, .r17-rowmsg, .r17-why-row p, .r17-why-row small, .r17-wa-img, .r17-wa-noimg,
  .r17-wa-meta b, .r17-wa-meta span, .r17-wa-meta small, .r17-tab, .r17-why h2 + *, .r17-asset small, .r17-where small { font-size: var(--ts-r17-heebo-bold-16-auto-size); }
}

/* round 17 task 2 · touch targets: the story's language toggle was 40px tall (styles.css). 44px = space/48 - space/4 (Figma tokens) */
.lang .lang-opt, .lang button { min-height: calc(var(--space-48) - var(--space-4)); }

/* round12b check 5 found it at 360: in the "draft" state the save chip ran 4px under "הפרופיל" (pre-existing, timing hid it before).
   Up to 440px the save state is the dot only, no dark pill (live 18.11: the pill covered "Ro" of the logo at 390); the text stays for screen readers. */
@media (max-width: 440px) {
  .status { flex: none; overflow: visible; }
  .status .chip { color: transparent; background: transparent; inline-size: var(--space-12); block-size: var(--space-24); padding: 0; gap: 0; overflow: hidden; display: inline-flex; justify-content: center; align-items: center; }
  .status .chip.s-fail { background: transparent; }
  .topbar #toProfile, .topbar #langBtn, .topbar #demoBtn { padding-inline: var(--space-8); }
  .topbar { gap: var(--space-4); }
  .topbar .brand { flex: none; }   /* the logo never shrinks below itself: at 360 "Robit" ran out of its box under the save dot */
}
/* 19.11: the flow headers (hand-off, profile) also carry the language switch; the brand and the switch keep their size, the name chip shrinks with an ellipsis */
.app-head .brand, .app-head [data-lang-toggle] { flex: none; }
.app-head .me-chip { flex: 0 1 auto; min-width: 0; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
