/* oruk.css: Oruk Lab's layout. Colours come only from theme.css's roles (no colour is named here, no theme selector):
   where a part looks different between themes, the difference is a role. Layouts: two columns from 1100px, one column
   from 640px (the journey band scrolls inside its own box), the phone layout below 640px (16px gutters, 44px targets,
   nothing scrolls sideways). */

/* ---- The page ------------------------------------------------------------------------------------------------------- */
.oruk-page { --oruk-gutter: 40px; --oruk-header: 72px; --oruk-width: min(100% - 2 * var(--oruk-gutter), 1240px); }
@media (max-width: 639px) { .oruk-page { --oruk-gutter: 16px; --oruk-header: 60px; } }
.oruk-page [hidden] { display: none !important; }
.oruk-page :where(h1, h2, h3) { max-width: none; }
.oruk-page :where(p) { margin: 0; }
.oruk-page .site-header { min-height: var(--oruk-header); padding-inline: max(var(--oruk-gutter), calc((100% - 1240px) / 2)); }
.oruk-page .header-actions { gap: 10px; }
.oruk-page main { overflow-x: clip; }
.oruk-loading, .oruk-screen, .oruk-layout { width: var(--oruk-width); margin-inline: auto; }
.oruk-screen { display: grid; gap: 48px; padding: 40px 0 56px; }
.oruk-layout { padding: 0 0 56px; }
.oruk-footer { display: block; padding: 22px var(--oruk-gutter) 28px; text-align: center; }
.oruk-footer-line { color: var(--text-dim); font-size: 0.9rem; }
.oruk-help { color: var(--text-dim); font-size: 0.92rem; line-height: 1.45; }
.oruk-mono { font-family: var(--mono); letter-spacing: 0.06em; }
/* A text link is a 44px target too (styles.css gives .text-button its height; a link needs a box to take it). */
.oruk-page a.text-button { display: inline-flex; align-items: center; }
/* A text button that waits (a Desk call or a run is going on) looks like it: dim, no underline. */
.oruk-page .text-button:disabled { color: var(--text-dim); text-decoration-color: transparent; cursor: default; }
.oruk-section-title { margin: 0 0 4px; font-size: 1.5rem; line-height: 1.1; }
.oruk-card { position: relative; border: var(--ol) solid var(--edge); border-radius: var(--r-lg); color: var(--text); background: var(--surface); box-shadow: var(--pop) var(--pop) 0 var(--edge); padding: 24px; min-width: 0; }
/* The approval card: the sky edge says "an exact step, nothing runs without you". */
.oruk-card.oruk-approval { border-color: var(--focus); }
.oruk-card :where(h2, h3) { margin: 0; }
.oruk-sign { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- The header ------------------------------------------------------------------------------------------------------ */
.oruk-lessons { gap: 0.4rem; }
.oruk-switcher { display: inline-flex; }
.oruk-switcher[hidden] { display: none; }
.oruk-select {
  min-height: 44px; max-width: 14rem; padding: 0 40px 0 16px; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--pill);
  color: var(--text); background-color: var(--surface); box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge);
  font: 800 0.95rem/1 var(--display); text-overflow: ellipsis; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: right 20px center, right 14px center; background-size: 6px 6px; background-repeat: no-repeat;
}
.oruk-account { position: relative; }
.oruk-account > summary { list-style: none; }
.oruk-account > summary::-webkit-details-marker { display: none; }
/* Account is the header's last control, so its menu opens from its right edge, inside the window at every width (the
   shared .suite-nav rule hangs the Lab's Tools menu 54px past its button from 1024px, styles.css). */
.oruk-page .oruk-account > .oruk-account-menu { right: 0; left: auto; width: min(16rem, calc(100vw - 2 * var(--oruk-gutter))); padding: 12px; gap: 8px; }
.oruk-account-email { color: var(--text-dim); font-size: 0.85rem; overflow-wrap: anywhere; }
.oruk-menu-button { display: none; width: 44px; height: 44px; padding: 0; border: var(--ol-thin) solid var(--control-edge); border-radius: 50%; color: var(--text); background: var(--surface); box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge); place-items: center; }
.oruk-menu-lines, .oruk-menu-lines::before, .oruk-menu-lines::after { display: block; width: 18px; height: 3px; border-radius: 2px; background: currentColor; content: ""; position: relative; }
.oruk-menu-lines::before { position: absolute; top: -6px; }
.oruk-menu-lines::after { position: absolute; top: 6px; }
@media (max-width: 639px) {
  .oruk-page .wordmark strong { font-size: 15px; }
  /* Lessons shows its icon only; its word stays for screen readers (the link keeps its name). */
  .oruk-lessons > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .oruk-lessons { width: 44px; padding: 0; }
  .oruk-switcher, .oruk-account, .oruk-apps { display: none; }
  .oruk-menu-button:not([hidden]) { display: inline-grid; }
}

/* ---- Banner (errors, the recording) ------------------------------------------------------------------------------------- */
.oruk-banner { border-bottom: var(--ol) solid var(--rule); background: var(--surface); }
.oruk-banner[data-kind="offline"], .oruk-banner[data-kind="signed_out"] { border-bottom-color: var(--danger); }
.oruk-banner-inner { width: var(--oruk-width); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 0; }
.oruk-banner-text { flex: 1 1 18rem; font-weight: 700; }
.oruk-banner-action { min-height: 44px; }
.oruk-replay-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.oruk-speeds { display: flex; gap: 8px; }
.oruk-speed { position: relative; min-height: 44px; padding: 0 14px; }
.oruk-scrub { width: min(16rem, 100%); min-height: 44px; accent-color: var(--accent); }

/* ---- Loading (S0) ------------------------------------------------------------------------------------------------------ */
.oruk-loading { padding: 28px 0 40px; }
.oruk-loading-line { color: var(--text-dim); font-weight: 700; margin-bottom: 28px; }
.oruk-stations-loading .oruk-station-mark { border-color: var(--divider); }

/* ---- The Dot strip (DESIGN §3) --------------------------------------------------------------------------------------------- */
/* The strip is a bar: the surface tone, not the page's. */
.oruk-strip { position: sticky; z-index: 19; top: var(--oruk-header); border-bottom: var(--ol) solid var(--rule); background: var(--surface); }
.oruk-strip-inner { width: var(--oruk-width); margin-inline: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; min-height: 64px; padding: 10px 0; }
.oruk-orb { position: relative; display: grid; place-items: center; width: 24px; height: 24px; }
.oruk-orb::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; opacity: 0; }
/* The working orb has an ink centre, so it differs from the hollow rings by shape, not by colour alone. */
.oruk-orb[data-orb="pulse"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--edge); }
.oruk-orb[data-pulse="on"]::after { animation: oruk-ring 1.8s ease-out infinite; }
@keyframes oruk-ring { from { opacity: 0.9; scale: 0.7; } to { opacity: 0; scale: 1.35; } }
.oruk-orb .oruk-sign { width: 14px; height: 14px; stroke-width: 3; }
.oruk-strip-words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.oruk-strip-headline { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.01em; }
.oruk-strip-line { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; color: var(--text); background: transparent; font: 600 1rem/1.35 var(--display); text-align: left; cursor: pointer; }
.oruk-strip-line-static { cursor: default; }
.oruk-strip-line-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oruk-strip-chevron { display: none; font-weight: 800; }
.oruk-strip-sub { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--text-dim); font-size: 0.86rem; }
.oruk-strip-meta { font-variant-numeric: tabular-nums; font-weight: 700; }
.oruk-strip-overlay { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; color: var(--text-dim); font-size: 0.9rem; }
.oruk-strip-reconnect { min-height: 44px; }
.oruk-strip-actions { display: flex; align-items: center; gap: 10px; }
.oruk-strip-button { min-height: 44px; padding: 0 18px; font-size: 0.95rem; white-space: nowrap; }
@media (max-width: 639px) {
  .oruk-strip-inner { min-height: 72px; gap: 0 10px; padding: 8px 0; }
  .oruk-orb { align-self: start; margin-top: 3px; }
  .oruk-strip-words { display: grid; gap: 0; }
  .oruk-strip-line { min-height: 44px; align-items: center; }
  .oruk-strip-chevron { display: inline; }
  .oruk-strip-line-static .oruk-strip-line-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
  .oruk-strip-line-static { min-height: 0; padding: 2px 0 4px; font-size: 0.95rem; }
  /* One line of meta (the app and the clock) stays on the phone; where Dot runs is in the rail. */
  .oruk-strip-host { display: none; }
  .oruk-strip-actions { align-self: start; }
  .oruk-strip-button:is([data-action="activity"], [data-action="how_to_start"]) { display: none; }
  .oruk-strip-button { padding: 0 14px; }
}

/* ---- The journey band (DESIGN §7) ---------------------------------------------------------------------------------------- */
.oruk-journey { padding: 18px 0 8px; }
.oruk-band { display: grid; gap: 10px; }
.oruk-band-kicker { margin: 0; }
.oruk-stations { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.oruk-stations:has(> li:nth-child(8):last-child) { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.oruk-station { position: relative; display: grid; align-content: start; justify-items: center; gap: 6px; min-width: 0; }
/* The line between stations runs behind their marks. */
.oruk-station::before { content: ""; position: absolute; z-index: 0; top: 23px; left: calc(-50% + 18px); right: calc(50% + 18px); height: var(--ol-thin); background: var(--divider); }
.oruk-station:first-child::before { display: none; }
.oruk-station-head { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 6px 2px 2px; border: 0; border-radius: var(--r); color: var(--text); background: transparent; text-align: center; cursor: pointer; }
.oruk-station-head[aria-expanded="true"] { background: var(--surface); }
.oruk-station-mark { display: grid; place-items: center; width: 32px; height: 32px; border: var(--ol-thin) dotted var(--control-edge); border-radius: 50%; color: var(--text); background: var(--bg); }
.oruk-station-name { font-size: 0.86rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.oruk-station-state { color: var(--text-dim); font: 700 0.72rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.oruk-station[data-state="answered"] .oruk-station-mark, .oruk-station[data-state="done"] .oruk-station-mark { border: var(--ol-thin) solid var(--edge); color: var(--on-picked); background: var(--picked); box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge); }
/* "Dot is here": a lime halo with an ink edge, so it reads on paper too. */
.oruk-station[data-state="here"] .oruk-station-mark { border: var(--ol-thin) solid var(--edge); box-shadow: 0 0 0 4px var(--accent), 0 0 0 6px var(--edge); }
.oruk-station[data-state="here"][data-pulse="on"] .oruk-station-mark { animation: oruk-here 1.8s ease-in-out infinite; }
@keyframes oruk-here { 50% { box-shadow: 0 0 0 7px var(--accent), 0 0 0 9px var(--edge); } }
.oruk-station[data-state="waiting"] .oruk-station-mark { border: var(--ol-thin) solid var(--focus); }
.oruk-station-badge { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--on-picked); background: var(--focus); font: 800 0.8rem/1 var(--display); }
.oruk-station:is([data-state="not_needed"], [data-state="later"]) .oruk-station-mark { border-style: dashed; border-color: var(--text-dim); color: var(--text-dim); }
.oruk-station[data-state="not_needed"] .oruk-station-name { color: var(--text-dim); }
.oruk-station .oruk-station-mark .oruk-sign { width: 16px; height: 16px; }
.oruk-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.oruk-step { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; color: var(--text); background: transparent; cursor: pointer; }
.oruk-step-dot { display: grid; place-items: center; width: 18px; height: 18px; border: var(--ol-thin) solid var(--control-edge); border-radius: 50%; background: transparent; }
.oruk-step-dot .oruk-sign { width: 12px; height: 12px; stroke-width: 3; }
.oruk-step[data-state="working"] .oruk-step-dot { border-color: var(--picked); background: linear-gradient(90deg, var(--picked) 50%, transparent 50%); }
.oruk-step[data-state="done"] .oruk-step-dot { border-color: var(--picked); color: var(--on-picked); background: var(--picked); }
.oruk-step[data-state="waiting"] .oruk-step-dot { border-color: var(--focus); color: var(--on-picked); background: var(--focus); }
.oruk-step-q { font: 800 0.72rem/1 var(--display); }
.oruk-step:is([data-state="skipped"], [data-state="failed"]) .oruk-step-dot { border-style: dashed; border-color: var(--text-dim); color: var(--text-dim); }
.oruk-pop { display: grid; gap: 8px; padding: 14px 18px; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--r); background: var(--surface); }
.oruk-pop-question { font-weight: 800; }
.oruk-pop-answer { color: var(--text); }
.oruk-pop-rows { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.oruk-pop-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: 36px; }
.oruk-pop-title { font-weight: 700; }
.oruk-pop-state { color: var(--text-dim); font: 700 0.75rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.oruk-pop-reason { color: var(--text-dim); font-size: 0.9rem; }
.oruk-pop-failed { font-weight: 700; }
/* The step's title is the link to its finding. */
.oruk-pop-link { min-height: 36px; font-size: 1rem; font-weight: 700; text-align: left; }
.oruk-count { color: var(--text-dim); font-size: 0.95rem; }
.oruk-planline { color: var(--text-dim); font-size: 0.95rem; }
.oruk-planline-phone, .oruk-band-phone { display: none; }
.oruk-journey[data-frozen="on"] .oruk-station[data-state="here"] .oruk-station-mark { animation: none; box-shadow: 0 0 0 4px var(--text-dim), 0 0 0 6px var(--edge); }
@media (min-width: 640px) and (max-width: 1099px) {
  .oruk-stations { grid-template-columns: repeat(9, 124px); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
  .oruk-stations:has(> li:nth-child(8):last-child) { grid-template-columns: repeat(8, 124px); }
  .oruk-station { scroll-snap-align: start; }
}
@media (max-width: 639px) {
  .oruk-journey { padding: 14px 0 4px; }
  .oruk-band { display: none; }
  .oruk-band-phone { display: grid; gap: 8px; }
  .oruk-planline-phone { display: block; margin-top: 8px; }
  .oruk-phone-step { font-weight: 800; }
  .oruk-segments { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .oruk-segments li { flex: 1; height: 10px; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--pill); }
  .oruk-segments li:is([data-state="answered"], [data-state="done"]) { border-color: var(--picked); background: var(--picked); }
  .oruk-segments li[data-state="here"] { border-color: var(--edge); background: var(--accent); }
  .oruk-segments li[data-state="waiting"] { border-color: var(--focus); background: var(--focus); }
  .oruk-segments li:is([data-state="not_needed"], [data-state="later"]) { border-style: dashed; border-color: var(--text-dim); }
  .oruk-phone-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; }
  .oruk-see { min-height: 44px; }
}
.oruk-journey-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.oruk-list-head { display: flex; align-items: center; gap: 10px; }
.oruk-list-name { flex: 1; font-weight: 800; }
.oruk-journey-list .oruk-pop { margin-top: 8px; }
.oruk-journey-list .oruk-pop-question { display: none; }
.oruk-journey-list .oruk-pop-link { min-height: 44px; }

/* ---- Two columns: the ask slot and the findings, the rail -------------------------------------------------------------- */
.oruk-columns { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 24px; align-items: start; margin-top: 16px; }
.oruk-column { display: grid; gap: 28px; min-width: 0; }
.oruk-rail { display: grid; gap: 22px; min-width: 0; }
@media (max-width: 1099px) { .oruk-columns { grid-template-columns: minmax(0, 1fr); } }
.oruk-ask { display: grid; gap: 18px; scroll-margin-top: calc(var(--oruk-header) + 90px); }
.oruk-ask:empty { display: none; }
.oruk-receipt { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 700; box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge); }

/* ---- The decision card (DESIGN §5) ------------------------------------------------------------------------------------- */
.oruk-question, .oruk-approval, .oruk-finished { padding: 26px 28px; box-shadow: var(--pop-lg) var(--pop-lg) 0 var(--edge); scroll-margin-top: calc(var(--oruk-header) + 90px); }
.oruk-ask-head { display: flex; align-items: center; gap: 10px; }
.oruk-ask-kicker { flex: 1; margin: 0; }
.oruk-ask-film { min-height: 44px; font-size: 0.95rem; white-space: nowrap; }
.oruk-ask-title { margin: 10px 0 6px; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.06; }
/* The page focuses the heading after a scroll; the ring shows only for keyboard focus. */
.oruk-ask-title:focus:not(:focus-visible), .oruk-connect-title:focus:not(:focus-visible) { outline: none; }
.oruk-why { color: var(--text-dim); font-size: 1.02rem; margin-bottom: 20px; }
.oruk-glyph { display: inline-grid; flex: none; place-items: center; width: 34px; height: 34px; border: var(--ol-thin) solid var(--edge); border-radius: 50%; color: var(--on-picked); background: var(--picked); box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge); rotate: -5deg; }
.oruk-glyph .lv-icon { width: 74%; height: 74%; }
.oruk-glyph path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.oruk-glyph .lv-ink, .oruk-glyph .lv-line { stroke-width: 3; }
.oruk-glyph .lv-tube-ink { stroke-width: 7; }
.oruk-glyph .lv-core { stroke: var(--picked); stroke-width: 3; }
.oruk-glyph .lv-shape { stroke-width: 3; }
.oruk-glyph .lv-paper { fill: currentColor; stroke-width: 3; }
.oruk-glyph .lv-spark { stroke-width: 2.4; }
.oruk-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; margin: 14px 0 18px; }
.oruk-options[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oruk-question[data-words="yes"] .oruk-options { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.oruk-option { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 6px; min-width: 0; }
.oruk-option-pick {
  position: relative; grid-column: 1; grid-row: 1; display: grid; align-content: start; gap: 10px; padding: 12px 12px 14px; border: var(--ol) solid var(--control-edge); border-radius: var(--r);
  color: var(--text); background: var(--surface); box-shadow: var(--pop) var(--pop) 0 var(--edge); cursor: pointer; text-align: left;
  transition: transform var(--t-press) var(--ease), box-shadow var(--t-press) var(--ease);
}
.oruk-option[data-recommended="yes"] .oruk-option-pick { padding-top: 22px; }
/* An option's "Open in Product" sits inside the option's border, under its words (it is a link beside the radio, so a
   click on it never picks the option): the pick spans the link's row and leaves room for it at its bottom. */
.oruk-option[data-link="yes"] .oruk-option-pick { grid-row: 1 / 3; padding-bottom: 58px; }
.oruk-option-open { grid-column: 1; grid-row: 2; position: relative; z-index: 2; align-self: end; justify-self: start; margin: 0 0 8px 12px; min-height: 44px; font-size: 0.95rem; }
.oruk-option[data-checked="yes"] .oruk-option-open { color: var(--on-picked); text-decoration-color: var(--on-picked); }
.oruk-option > .oruk-open-note { grid-column: 1; grid-row: 3; }
@media (hover: hover) { .oruk-option-pick:hover { transform: translate(-1px, -1px); box-shadow: calc(var(--pop) + 1px) calc(var(--pop) + 1px) 0 var(--edge); } }
.oruk-option[data-checked="yes"] .oruk-option-pick { border-color: var(--edge); color: var(--on-picked); background: var(--picked); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.oruk-option[data-checked="yes"] :is(.oruk-option-detail, .oruk-option-numlabel) { color: var(--on-picked); }
.oruk-option[data-checked="yes"] .oruk-basis { border-color: var(--on-picked); color: var(--on-picked); background: transparent; }
.oruk-option[data-checked="yes"] .oruk-basis[data-basis="measured"] { color: var(--picked); background: var(--on-picked); }
/* The picture's corner tag sits half over the dark still: on a picked option it keeps a solid sticker, never see-through. */
.oruk-option[data-checked="yes"] .oruk-picture > .oruk-basis { background: var(--picked); }
.oruk-option[data-checked="yes"] .oruk-picture > .oruk-basis[data-basis="measured"] { background: var(--on-picked); }
.oruk-option-pick:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.oruk-option-picture .oruk-picture-frame { border-width: var(--ol-thin); }
@media (min-width: 900px) { .oruk-options[data-count="3"] .oruk-still .lesson-stage { aspect-ratio: 4 / 3; } }
.oruk-option-words { display: grid; gap: 4px; }
.oruk-option-label { font-size: 1.12rem; font-weight: 800; line-height: 1.15; }
.oruk-option-detail { color: var(--text-dim); font-size: 0.95rem; line-height: 1.35; }
.oruk-option-number { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.oruk-option-number strong { font-size: 1.35rem; letter-spacing: -0.02em; }
.oruk-option-numlabel { color: var(--text-dim); }
.oruk-option-words .oruk-basis { justify-self: start; margin-top: 2px; }
.oruk-option-tick { position: absolute; top: -10px; right: -10px; display: none; place-items: center; width: 28px; height: 28px; border: var(--ol-thin) solid var(--edge); border-radius: 50%; color: var(--on-picked); background: var(--picked); box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge); }
.oruk-option[data-checked="yes"] .oruk-option-tick { display: grid; }
.oruk-recommends {
  position: absolute; z-index: 2; top: -13px; left: 14px; padding: 4px 10px; border: var(--ol-thin) solid var(--edge); border-radius: var(--pill);
  color: var(--on-accent); background: var(--accent); box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge);
  font: 700 0.72rem/1.15 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; rotate: -3deg; pointer-events: none;
}
.oruk-question[data-words="yes"] .oruk-option { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: none; align-items: center; }
.oruk-question[data-words="yes"] .oruk-option-pick { grid-row: auto; padding-bottom: 14px; }
.oruk-question[data-words="yes"] .oruk-option-open { grid-column: 2; grid-row: auto; margin: 0; align-self: center; }
.oruk-question[data-words="yes"] .oruk-option-words { grid-template-columns: minmax(0, 1fr); }
.oruk-fold, .oruk-how { margin: 6px 0; }
:is(.oruk-fold, .oruk-how) > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; cursor: pointer; text-decoration: underline 3px var(--link-line); text-underline-offset: 0.3em; }
:is(.oruk-fold, .oruk-how) > summary::marker { content: ""; }
:is(.oruk-fold, .oruk-how) > summary::-webkit-details-marker { display: none; }
/* The open/close mark: a plus in a small ring, a minus when open (never underlined with the words). */
:is(.oruk-fold, .oruk-how) > summary::before { content: "+"; display: inline-grid; flex: none; place-items: center; width: 22px; height: 22px; border: var(--ol-thin) solid var(--control-edge); border-radius: 50%; font: 800 0.95rem/1 var(--display); }
:is(.oruk-fold, .oruk-how)[open] > summary::before { content: "−"; }
.oruk-fold > :not(summary) { margin-top: 8px; }
.oruk-checked { margin: 8px 0; }
.oruk-checked-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.oruk-checked-label { color: var(--text-dim); font-weight: 700; font-size: 0.95rem; }
.oruk-pill { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 14px; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--pill); color: var(--text); background: var(--surface); font: 700 0.9rem/1.2 var(--display); cursor: pointer; }
.oruk-pill-static { cursor: default; border-style: dashed; }
.oruk-field-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 8px; font-weight: 800; }
.oruk-textarea, .oruk-input {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: var(--ol) solid var(--control-edge); border-radius: var(--r);
  color: var(--text); background: var(--surface); box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge); font: 600 1rem/1.4 var(--display); resize: vertical;
}
.oruk-textarea::placeholder, .oruk-input::placeholder { color: var(--text-dim); opacity: 1; }
.oruk-textarea[aria-invalid="true"], .oruk-input[aria-invalid="true"] { border-color: var(--danger); }
.oruk-text-answer { margin: 6px 0 4px; }
.oruk-ask-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 18px; }
/* "I don't know, Dot decides" stands above the actions, so the phone's sticky dock holds Continue alone. */
.oruk-ask-alt { margin-top: 10px; }
.oruk-continue { min-width: 14rem; }
.oruk-ask-status { min-height: 1.4em; margin-top: 8px; font-weight: 700; }
.oruk-ask-status[data-tone="error"] { color: var(--danger); }
.oruk-footnote { margin-top: 6px; color: var(--text-dim); font-size: 0.9rem; }
@media (max-width: 899px) and (min-width: 640px) { .oruk-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .oruk-question, .oruk-approval, .oruk-finished { padding: 18px 16px; }
  .oruk-options, .oruk-options[data-count="2"] { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  /* On a phone the options keep their words and numbers (the number's tag beside it); the three pictures would push
     Continue a screen away. */
  .oruk-option-picture { display: none; }
  .oruk-option-words { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .oruk-option-label, .oruk-option-detail { flex-basis: 100%; }
  /* Each option's one-line detail shows on the recommended option and the one picked; the others keep label and number. */
  .oruk-option:not([data-recommended="yes"]):not([data-checked="yes"]) .oruk-option-detail { display: none; }
  .oruk-option-words .oruk-basis { margin-top: 0; }
  .oruk-option[data-link="yes"] .oruk-option-pick { padding-bottom: 46px; }
  .oruk-option-open { margin-bottom: 4px; }
  .oruk-ask-film { display: none; }
  .oruk-continue { min-width: 0; flex: 1 1 100%; }
  /* While the card is on screen its Continue stays at the bottom of the screen (DESIGN §2.2). */
  .oruk-question .oruk-ask-actions { position: sticky; z-index: 3; bottom: 0; margin: 14px -16px 0; padding: 12px 16px; border-top: var(--ol-thin) solid var(--divider); background: var(--surface); }
}

/* ---- Approvals (DESIGN §5.3) --------------------------------------------------------------------------------------------- */
.oruk-approval-area { display: grid; gap: 16px; }
.oruk-approval-area > .oruk-picture { max-width: 420px; }
.oruk-rows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 22px; margin: 0; }
.oruk-rows dt { color: var(--text-dim); font-weight: 700; }
.oruk-rows dd { margin: 0; overflow-wrap: anywhere; }
.oruk-rows dd[data-quote="yes"] { padding-left: 12px; border-left: var(--ol-thin) solid var(--text-dim); white-space: pre-line; }
.oruk-quote-caption { margin: 0; color: var(--text-dim); font-size: 0.86rem; }
.oruk-code { color: var(--text-dim); font-size: 0.92rem; }
.oruk-code strong, .oruk-code-value { color: var(--text); font-family: var(--mono); letter-spacing: 0.08em; }
.oruk-password-row { display: grid; gap: 6px; max-width: 26rem; }
.oruk-password-row .oruk-field-label { margin: 0; }
.oruk-progress { font-weight: 700; }
.oruk-progress:empty { display: none; }
.oruk-off, .oruk-recover, .oruk-expired, .oruk-official-line { font-weight: 700; }
.oruk-steps-progress { display: grid; gap: 4px; margin: 0; padding-left: 1.2em; }
.oruk-steps-progress:empty { display: none; }
.oruk-steps-progress li[data-done="yes"] { color: var(--text-dim); }
.oruk-proposals { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.oruk-proposal { display: grid; gap: 6px; padding: 14px 16px; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--r); }
.oruk-proposal-what { font-weight: 800; }
.oruk-proposal-lines { margin: 0; padding-left: 1.1em; }
.oruk-proposal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.oruk-proposal-choice, .oruk-chip, .oruk-change-option { position: relative; min-height: 44px; padding: 0 18px; cursor: pointer; }
:is(.oruk-proposal-choice, .oruk-chip, .oruk-change-option, .oruk-speed)[aria-pressed="true"] { padding-right: 0.8rem; padding-left: 1.75rem; }
:is(.oruk-proposal-choice, .oruk-chip, .oruk-change-option, .oruk-speed)[aria-pressed="true"]::before { top: 50%; left: 0.75rem; }
/* Change's chooser is a radio group (aria-checked): the same picked sticker and tick as a pressed chip (theme.css 11). */
.oruk-change-option[aria-checked="true"] {
  padding-right: 0.8rem; padding-left: 1.75rem;
  border-color: var(--edge); color: var(--on-picked); background: var(--picked); font-weight: 800;
  transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge);
}
.oruk-change-option[aria-checked="true"]::before {
  content: ""; position: absolute; top: 50%; left: 0.75rem; width: 0.32em; height: 0.6em;
  border: solid currentColor; border-width: 0 0.15em 0.15em 0; transform: translateY(-65%) rotate(45deg);
}
/* A proposal Desk already holds a decision for: the picked one stays as the sticker, the other one rests. */
.oruk-proposal-choice[aria-disabled="true"] { cursor: default; }
.oruk-proposal-choice[aria-disabled="true"]:not([aria-pressed="true"]) { border-style: dashed; box-shadow: none; }
@media (max-width: 639px) { .oruk-rows { grid-template-columns: minmax(0, 1fr); gap: 2px; } .oruk-rows dd { margin-bottom: 8px; } }

/* ---- Help cards ---------------------------------------------------------------------------------------------------------- */
.oruk-help-card { display: grid; gap: 10px; }
.oruk-help-card h3 { font-size: 1.3rem; }
.oruk-problem { border-color: var(--danger); }
.oruk-numbered { display: grid; gap: 12px; margin: 0; padding-left: 1.3em; }
.oruk-numbered > li::marker { font-weight: 800; }
.oruk-command { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; margin-top: 6px; }
.oruk-code-block { margin: 0; padding: 12px 14px; overflow-x: auto; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--r); color: var(--text); background: var(--bg); font: 700 0.85rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.oruk-copy { min-height: 44px; padding: 0 18px; }
@media (max-width: 639px) { .oruk-command { grid-template-columns: minmax(0, 1fr); } .oruk-copy { justify-self: start; } }

/* ---- Connect Dot (DESIGN §9) --------------------------------------------------------------------------------------------- */
.oruk-connect { display: grid; gap: 12px; }
.oruk-connect-title { font-size: 1.45rem; line-height: 1.12; }
.oruk-connect-steps .oruk-step-title { display: block; margin-bottom: 6px; font-weight: 800; }
.oruk-code-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.oruk-code-input { width: 12.5rem; font-family: var(--mono); font-size: 1.15rem; letter-spacing: 0.12em; text-transform: uppercase; }
.oruk-connect-only { font-weight: 700; }
.oruk-key-ended { color: var(--danger); font-weight: 800; }

/* ---- Findings (DESIGN §6) ----------------------------------------------------------------------------------------------- */
.oruk-findings { display: grid; gap: 22px; }
.oruk-empty { color: var(--text-dim); }
.oruk-finding, .oruk-phase-card { scroll-margin-top: calc(var(--oruk-header) + 90px); }
.oruk-finding[data-fresh="yes"], .oruk-phase-card[data-fresh="yes"] { animation: oruk-in 240ms var(--ease) both; }
@keyframes oruk-in { from { opacity: 0; translate: 0 -10px; } }
.oruk-finding-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.oruk-finding-kicker { flex: 1 1 12rem; margin: 0; }
.oruk-time { color: var(--text-dim); font: 700 0.82rem/1 var(--mono); }
.oruk-new { padding: 3px 10px; border: var(--ol-thin) solid var(--edge); border-radius: var(--pill); color: var(--on-accent); background: var(--accent); font: 700 0.72rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.oruk-earlier { padding: 2px 10px; border: var(--ol-thin) dotted var(--text-dim); border-radius: var(--pill); color: var(--text-dim); font: 700 0.72rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.oruk-finding[data-earlier="yes"] { box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge); }
.oruk-finding-question { margin: 12px 0 14px; color: var(--text-dim); font-size: 1.05rem; font-weight: 700; }
/* The lesson's highlighted word, as the theme writes its one highlight word (theme.css section 20): lime with an ink
   shadow on night, a lime sticker with an ink edge on paper. */
.oruk-hl { padding: 0 0.12em; border-radius: 0.22em; color: var(--hl-fg); background: var(--hl-bg); box-shadow: 0 0 0 var(--ol-thin) var(--hl-edge); text-shadow: 0.05em 0.05em 0 var(--hl-shadow); }
.oruk-finding-body { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: 22px; align-items: start; }
.oruk-finding-body[data-picture="no"] { grid-template-columns: minmax(0, 1fr); }
.oruk-finding-words { display: grid; gap: 10px; align-content: start; min-width: 0; }
.oruk-finding-headline { font-size: 1.32rem; line-height: 1.16; }
.oruk-verdict { display: inline-flex; justify-self: start; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--pill); font-weight: 800; font-size: 0.92rem; }
.oruk-numbers { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.oruk-number { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.oruk-number-figure { font-variant-numeric: tabular-nums; }
.oruk-number-display { font-size: 1.55rem; letter-spacing: -0.02em; }
.oruk-number-label { color: var(--text-dim); }
.oruk-number .oruk-basis { align-self: center; }
.oruk-so { font-weight: 700; }
.oruk-unsure { color: var(--text-dim); }
.oruk-finding-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin-top: 14px; padding-top: 8px; border-top: var(--ol-thin) solid var(--divider); }
.oruk-finding-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.oruk-open, .oruk-film-open { min-height: 44px; font-size: 0.98rem; }
.oruk-open-note { margin: 0; color: var(--text-dim); font-size: 0.86rem; line-height: 1.35; }
/* "How Dot checked": its summary is the check chip (the theme colours it by data-check: filled when the server saw the
   run, dashed when it did not); the rows inside are the receipts. */
.oruk-how { margin: 0; }
.oruk-how > summary { padding: 3px 12px 3px 6px; border-radius: var(--pill); font: 700 0.76rem/1.2 var(--display); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; }
.oruk-how > summary::before { border-color: currentColor; }
.oruk-how[open] { flex-basis: 100%; }
.oruk-how-rows { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 1.1em; color: var(--text-dim); }
.oruk-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text-dim); }
.oruk-who strong { color: var(--text); }
.oruk-who-change { min-height: 44px; font-size: 0.95rem; }
.oruk-change { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.oruk-change[hidden] { display: none; }
.oruk-change-save { min-height: 44px; }
.oruk-change-status:empty { display: none; }
.oruk-phase-card { display: grid; gap: 10px; border-style: solid; }
.oruk-phase-answer { font-size: 1.45rem; line-height: 1.14; }
.oruk-phase-next { color: var(--text-dim); font-weight: 700; }
.oruk-more { justify-self: start; }
@media (max-width: 639px) {
  .oruk-card { padding: 18px 16px; }
  .oruk-finding-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .oruk-finding-headline { font-size: 1.2rem; }
}

/* ---- Pictures: the films' still frames ------------------------------------------------------------------------------ */
.oruk-picture { position: relative; margin: 0 0 12px; }
.oruk-picture-frame { overflow: hidden; border: var(--ol) solid var(--edge); border-radius: var(--r); background: var(--screen); }
.oruk-picture[data-empty="yes"] { display: none; }
/* The picture's basis hangs over its bottom edge like a sticker, so it never covers the picture's own labels. */
.oruk-picture > .oruk-basis { position: absolute; z-index: 6; right: 12px; bottom: 0; translate: 0 50%; background: var(--surface); box-shadow: var(--pop-sm) var(--pop-sm) 0 var(--edge); }
.oruk-still :is(.lesson-frame, .lesson-stage) { --lp-strip: 8px; }
.oruk-still .lesson-stage { aspect-ratio: 16 / 9; }
.oruk-still .lesson-caption { display: none; }
/* On a phone a picture of people or of a list needs a taller frame than 16:9 to keep every row in view. */
@media (max-width: 639px) { .oruk-picture:is([data-kind="people"], [data-kind="list"], [data-kind="flow"]) .oruk-still .lesson-stage { aspect-ratio: 4 / 3; } }
.oruk-still .lesson-scene { opacity: 1; visibility: visible; }
.oruk-basis { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--pill); font: 700 0.72rem/1.2 var(--display); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }

/* ---- The rail -------------------------------------------------------------------------------------------------------- */
.oruk-rail-card { display: grid; gap: 12px; padding: 20px; }
.oruk-rail-title { font-size: 1.12rem; }
/* On a phone "Your direction" and "Dot on your Mac" are folds (DESIGN §2.2): the heading is the 44px summary. */
.oruk-rail-fold { display: block; padding-block: 8px; }
.oruk-rail-fold[open] { padding-bottom: 18px; }
.oruk-rail-fold > :not(summary) { margin-top: 12px; }
.oruk-rail-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; list-style: none; cursor: pointer; }
.oruk-rail-summary::-webkit-details-marker { display: none; }
.oruk-rail-summary::after { content: "+"; display: inline-grid; flex: none; place-items: center; width: 26px; height: 26px; border: var(--ol-thin) solid var(--control-edge); border-radius: 50%; font: 800 1rem/1 var(--display); }
.oruk-rail-fold[open] > .oruk-rail-summary::after { content: "−"; }
.oruk-direction-rows { grid-template-columns: minmax(0, 1fr); gap: 0; }
.oruk-direction-rows dt { margin-top: 8px; font-size: 0.85rem; }
.oruk-direction-rows dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.oruk-rules-tag { padding: 1px 8px; border: var(--ol-thin) dashed var(--text-dim); border-radius: var(--pill); color: var(--text-dim); font: 700 0.7rem/1.3 var(--mono); letter-spacing: 0.04em; }
.oruk-change-direction { justify-self: start; min-height: 44px; }
.oruk-research { margin: 0; color: var(--text-dim); font-size: 0.85rem; }
.oruk-research > summary, p.oruk-research { display: flex; align-items: center; gap: 8px; }
.oruk-research > summary { cursor: pointer; }
.oruk-research-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.oruk-research[data-doing="no"] .oruk-research-dot { background: var(--accent, currentColor); }
.oruk-research-list { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.oruk-research-list li { display: grid; gap: 2px; overflow-wrap: anywhere; }
.oruk-note .oruk-textarea { margin-bottom: 6px; }
.oruk-note .quiet-action { margin-top: 8px; }
.oruk-mac-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.oruk-mac { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.oruk-mac-dot { width: 12px; height: 12px; margin-top: 6px; border: var(--ol-thin) solid var(--text-dim); border-radius: 50%; }
.oruk-mac[data-fresh="yes"] .oruk-mac-dot { border-color: var(--edge); background: var(--accent); }
.oruk-mac[data-ended="yes"] .oruk-mac-dot { border-style: dashed; }
.oruk-mac-seen { font-weight: 700; overflow-wrap: anywhere; }
.oruk-disconnect { min-height: 44px; font-size: 0.92rem; }
.oruk-macs .oruk-connect { margin-top: 6px; box-shadow: none; padding: 16px; }

/* ---- Welcome, composer, list, examples ------------------------------------------------------------------------------------ */
.oruk-welcome { display: grid; gap: 18px; padding-top: 12px; }
.oruk-welcome-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: center; }
.oruk-welcome-words { display: grid; gap: 18px; }
.oruk-welcome-picture { display: grid; gap: 10px; }
.oruk-welcome-picture .oruk-picture { rotate: 1.2deg; }
.oruk-welcome-picture .oruk-picture-frame { box-shadow: var(--pop-lg) var(--pop-lg) 0 var(--edge); }
.oruk-welcome-caption { font-size: 0.88rem; }
@media (max-width: 1099px) { .oruk-welcome-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; } .oruk-welcome-picture { max-width: 34rem; } .oruk-welcome-picture .oruk-picture { rotate: none; } }
.oruk-welcome-title { font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: 1; max-width: 15ch; }
.oruk-lead { max-width: 42rem; color: var(--text-dim); font-size: 1.22rem; line-height: 1.4; }
.oruk-welcome-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 14px 0 6px; padding: 0; list-style: none; }
.oruk-welcome-card { display: grid; gap: 8px; align-content: start; }
.oruk-welcome-card-title { font-size: 1.25rem; line-height: 1.15; }
.oruk-welcome-actions { margin-top: 6px; }
.oruk-notice { padding: 12px 16px; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--r); font-weight: 700; }
.oruk-examples { display: grid; gap: 14px; scroll-margin-top: calc(var(--oruk-header) + 16px); }
.oruk-example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 6px 0 0; padding: 0; list-style: none; }
.oruk-example { display: grid; gap: 8px; align-content: start; }
.oruk-example[data-focus="yes"] { outline: 3px solid var(--focus); outline-offset: 4px; }
.oruk-example-kind { margin: 0; }
.oruk-example-name { font-size: 1.3rem; }
.oruk-example-idea { color: var(--text-dim); }
.oruk-example-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 6px; }
.oruk-not-recorded { white-space: nowrap; }
.oruk-films { min-height: 44px; font-size: 0.95rem; }
.oruk-watch, .oruk-try { min-height: 44px; padding: 0 16px; font-size: 0.95rem; }
.oruk-composer { justify-self: center; width: min(100%, 860px); display: grid; gap: 14px; padding: 30px 32px; box-shadow: var(--pop-lg) var(--pop-lg) 0 var(--edge); }
.oruk-composer-title { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.02; }
.oruk-composer-form { display: grid; gap: 18px; }
/* An empty slot (or one whose every child is hidden) takes no row, so the help line is not followed by a gap; the
   form's own row gap is the space before its button. */
.oruk-composer-form > :empty, .oruk-composer-rest-host:not(:has(> :not([hidden]))) { display: none; }
.oruk-composer-form > .oruk-ask-actions { margin-top: 0; }
.oruk-composer-rest { display: grid; gap: 18px; }
.oruk-composer-rest[hidden] { display: none; }
.oruk-filled { font-weight: 700; }
.oruk-field { display: grid; gap: 4px; }
.oruk-field-error { min-height: 1.3em; color: var(--danger); font-weight: 700; }
.oruk-field-error:empty { min-height: 0; }
.oruk-chips { display: flex; flex-wrap: wrap; gap: 12px 10px; }
.oruk-idea { font-size: 1.1rem; field-sizing: content; min-height: 3.4em; max-height: 9em; }
.oruk-composer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; color: var(--text-dim); }
.oruk-composer-change { display: grid; gap: 14px; }
.oruk-list { display: grid; gap: 20px; }
.oruk-list-title { font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.05; }
.oruk-project-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.oruk-project-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.oruk-project-name { font-size: 1.35rem; }
.oruk-project-name a { color: var(--text); }
.oruk-project-actions { display: flex; align-items: center; gap: 16px; }
.oruk-note-page { width: min(100%, 720px); }
@media (max-width: 1099px) { .oruk-example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .oruk-screen { gap: 36px; padding: 24px 0 40px; }
  .oruk-welcome-cards, .oruk-example-grid { grid-template-columns: minmax(0, 1fr); }
  .oruk-lead { font-size: 1.08rem; }
  .oruk-composer { padding: 20px 16px; }
  .oruk-chip { padding: 0 14px; }
}

/* ---- Finished (S11) ------------------------------------------------------------------------------------------------------ */
.oruk-finished-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 18px; }
.oruk-finished > .oruk-help { margin-top: 12px; }
.oruk-finished-col { display: grid; gap: 8px; align-content: start; padding-top: 12px; border-top: var(--ol-thin) solid var(--divider); }
.oruk-finished-col h3 { font-size: 1rem; color: var(--text-dim); }
.oruk-guesses { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
/* Each guess: its name on one line, its value and tag under it, so a narrow column never breaks a word letter by letter. */
.oruk-guesses li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; }
.oruk-guess-label { grid-column: 1 / -1; overflow-wrap: break-word; }
.oruk-guesses strong { overflow-wrap: break-word; }
.oruk-decides { display: grid; gap: 2px; justify-items: start; }
.oruk-decides-number { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.oruk-decides-label { font-weight: 700; }
.oruk-desk-done { margin-top: 18px; }
@media (max-width: 899px) { .oruk-finished-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Dialogs and sheets ---------------------------------------------------------------------------------------------------- */
.oruk-dialog { width: min(100% - 32px, 560px); max-height: min(90vh, 56rem); padding: 0; overflow: auto; }
.oruk-dialog-wide { width: min(100% - 32px, 720px); }
#oruk-direction.oruk-dialog-wide { width: min(100% - 32px, 640px); }
.oruk-dialog-head { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 22px; }
.oruk-dialog-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.25rem; line-height: 1.2; }
.oruk-dialog .lab-info-close, .oruk-sheet .lab-info-close { flex: none; width: 44px; height: 44px; padding: 0; cursor: pointer; }
.oruk-dialog-body { display: grid; gap: 14px; padding: 8px 22px 24px; }
.oruk-sheet { inset: 0 0 0 auto; width: min(100%, 440px); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; overflow: auto; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.oruk-drawer-body { gap: 18px; }
.oruk-drawer-foot { position: sticky; bottom: 0; padding: 12px 22px 16px; border-top: var(--ol-thin) solid var(--divider); color: var(--text-dim); background: var(--surface); font-size: 0.9rem; }
.oruk-turn { display: grid; gap: 6px; }
.oruk-turn-head { color: var(--text-dim); font: 700 0.82rem/1.3 var(--mono); letter-spacing: 0.06em; }
.oruk-turn-lines { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.oruk-line { display: grid; grid-template-columns: 3.2rem 28px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 36px; }
.oruk-line-time { color: var(--text-dim); font: 700 0.8rem/1 var(--mono); }
.oruk-line-tile-gap { width: 28px; }
.oruk-line .lab-badge { --badge-size: 26px; transform: none; box-shadow: none; }
.oruk-line-text { overflow-wrap: anywhere; }
.oruk-line[data-ok="no"] .oruk-line-text { color: var(--danger); }
.oruk-line-mark { display: grid; color: var(--text-dim); }
.oruk-line-ms { color: var(--text-dim); font: 700 0.75rem/1 var(--mono); white-space: nowrap; }
.oruk-film-player { min-width: 0; }
.oruk-film-roles h3 { font-size: 1rem; margin-bottom: 4px; }
.oruk-by-hand { font-style: italic; }
.oruk-signin-form { display: grid; gap: 14px; }
.oruk-menu-list { display: grid; gap: 4px; }
.oruk-menu-link { display: flex; align-items: center; min-height: 48px; padding: 0 4px; border: 0; border-bottom: var(--ol-thin) solid var(--divider); color: var(--text); background: transparent; font: 700 1.05rem/1.2 var(--display); text-align: left; text-decoration: none; cursor: pointer; }
.oruk-menu-link[aria-current="page"] { text-decoration: underline 3px var(--link-line); text-underline-offset: 0.3em; }
.oruk-menu-account { display: grid; gap: 10px; margin-top: 12px; }
@media (max-width: 639px) {
  .oruk-sheet-bottom, .oruk-sheet { inset: auto 0 0 0; width: 100%; height: auto; max-height: 86dvh; margin: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .oruk-dialog-body { padding: 6px 16px 22px; }
  .oruk-line { grid-template-columns: 2.8rem 28px minmax(0, 1fr) auto; }
  .oruk-line-ms { display: none; }
}

/* ---- Recording (DESIGN §10) ---------------------------------------------------------------------------------------------- */
.oruk-replay-answer { margin-top: 10px; font-weight: 800; }
.oruk-replay-question .oruk-option-pick { cursor: default; }

/* ---- The small words: never under 12px, in both themes (DESIGN §16) ----------------------------------------------------- */
.oruk-page .kicker, .oruk-basis, .oruk-recommends, .oruk-station-state, .oruk-pop-state, .oruk-new, .oruk-earlier, .oruk-rules-tag, .oruk-how > summary { font-size: max(12px, 0.76rem); }

/* ---- Reduced motion (DESIGN §16): no pulse, no slide-in, no receipt animation ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .oruk-orb[data-pulse="on"]::after, .oruk-station[data-pulse="on"] .oruk-station-mark { animation: none !important; }
  .oruk-finding[data-fresh="yes"], .oruk-phase-card[data-fresh="yes"] { animation: none; }
  .oruk-option-pick { transition: none; }
  .oruk-option[data-checked="yes"] .oruk-option-pick, .oruk-option-pick:hover { transform: none; }
}

/* ---- Do it yourself (byhand.mjs): the card that sends a step to its app or takes it in your words, and your step's card */
.oruk-byhand-host:empty { display: none; }
.oruk-byhand { border-color: var(--focus); margin-bottom: 18px; }
.oruk-byhand .oruk-textarea { width: 100%; margin-top: 6px; }
.oruk-byhand-did ul { margin: 4px 0 8px; padding-left: 1.2em; }
.oruk-byhand-did li { margin: 2px 0; }
.oruk-pop-byhand { justify-self: start; min-height: 44px; }
.oruk-byhand-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 12px; border: var(--ol-thin) solid var(--control-edge); border-radius: var(--pill);
  font: 700 max(12px, 0.8rem)/1.2 var(--display); color: var(--text); background: var(--surface); }
.oruk-apps { position: relative; }
.oruk-apps > summary { list-style: none; }
.oruk-apps > summary::-webkit-details-marker { display: none; }
.oruk-page .oruk-apps > .oruk-apps-menu { right: 0; left: auto; width: min(17rem, calc(100vw - 2 * var(--oruk-gutter))); padding: 12px; gap: 4px; }
.oruk-apps-menu .oruk-menu-list { display: grid; gap: 2px; }

/* ---- The work card, by hand (DESIGN S17, ONE_BUCKET D3) ---- */
.oruk-work { border-color: var(--focus); }
.oruk-work-kicker { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; color: var(--text-dim); font: 700 0.72rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.oruk-work-question { margin: 6px 0 0; font-size: 1.05rem; line-height: 1.35; }
.oruk-work-none { margin: 10px 0 0; }
.oruk-work-then { margin-top: 20px; }
.oruk-work-list { display: grid; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.oruk-work-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 36px; }
.oruk-work-title { flex: 1 1 12rem; }
.oruk-work-count { margin-top: 14px; }
