/* GuardMyContract · Midnight Blue home page components (loaded on the home page only, after app.css).
   Tokens only: no colour, radius or font literal that app.css does not define. The final state is the default; the "hidden until played" looks apply only
   under html.js-motion (set by static/motion.js when motion is allowed), so without JavaScript or with reduced motion the page shows everything. */

/* ---------- Hero ---------- */
.pub-hero .hm-line { display: block; padding-bottom: .06em; overflow: hidden; }
.pub-hero .hm-line > span { display: inline-block; }
.hm-notice { display: inline-block; width: 3px; height: .78em; margin-left: .1em; vertical-align: -.02em; border-radius: 2px; background: var(--color-warning-accent); box-shadow: 0 0 18px color-mix(in srgb, var(--color-warning-accent) 55%, transparent); transform-origin: top; }
.hm-hero-stage { min-width: 0; }
@keyframes hm-rise-line { from { transform: translateY(108%); } }
@keyframes hm-fade-up { from { opacity: 0; transform: translateY(16px); } }
@keyframes hm-draw-down { from { transform: scaleY(0); } }
@keyframes hm-stage-in { from { opacity: 0; transform: translateY(28px) scale(.975); } }
@media (prefers-reduced-motion: no-preference) {
  .pub-hero .hm-line > span { animation: hm-rise-line 900ms var(--ease-out) backwards; }
  .pub-hero .hm-line > .d1 { animation-delay: 210ms; } .pub-hero .hm-line > .d2 { animation-delay: 300ms; } .pub-hero .hm-line > .d3 { animation-delay: 390ms; }
  .pub-hero .hm-hero-stage { animation: hm-stage-in 1000ms var(--ease-out) 420ms backwards; }
  .hm-notice { animation: hm-draw-down 700ms var(--ease-in-out) 1.15s backwards; }
}

/* Segmented control (hero steps, calculator) */
.hm-seg { display: inline-flex; padding: 3px; border: 1px solid var(--color-border); border-radius: 11px; background: color-mix(in srgb, var(--color-navy) 70%, transparent); }
.hm-seg button { display: inline-flex; align-items: center; gap: .45rem; min-height: 34px; padding: .3rem .8rem; border: 0; border-radius: 8px; background: transparent; color: var(--color-text-muted); font: inherit; font-size: var(--text-sm); font-weight: 550; cursor: pointer; transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.hm-seg button .mono { color: var(--color-text-muted); font-size: var(--text-2xs); }
.hm-seg button:active { transform: scale(.97); }
.hm-seg button[aria-pressed="true"], .hm-seg button[aria-checked="true"] { background: var(--color-navy-2); color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.hm-seg button[aria-pressed="true"] .mono { color: var(--color-link); }
@media (hover: hover) { .hm-seg button:hover { color: var(--color-text); } }
.mono { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .04em; text-transform: uppercase; }
.st-ctl { flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 14px; }
.st-ctl { display: none; } .st-ctl.on { display: flex; }
.st-cap { min-height: 3.1em; margin: 10px 0 0; color: var(--color-text-2); font-size: var(--text-md); line-height: 1.5; }

/* ---------- The contract stage ---------- */
.hm-hero-stage, .lc-stage { container-type: inline-size; }
.st { border: 1px solid var(--color-border-strong); border-radius: var(--radius-xl); background: linear-gradient(180deg, var(--color-surface), var(--color-bg-soft)); box-shadow: var(--shadow-lg); overflow: hidden; color: var(--color-text); }
.st-bar { display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; border-bottom: 1px solid var(--color-border); color: var(--color-text-muted); }
.st-bar .mono { font-size: var(--text-2xs); }
/* One discreet label on the fictional demos (the full "fictional data" context stays in the accessible name and the caption). */
.st-example { display: inline-flex; align-items: center; padding: .05rem .45rem; border: 1px solid var(--color-border); border-radius: var(--radius-full); color: var(--color-text-muted); font-size: var(--text-2xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; }
.dc-panel { position: relative; }
.dc-example { position: absolute; top: 14px; right: 14px; }
.st-dots { display: inline-flex; gap: 5px; } .st-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--color-navy-2); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.st-state { margin-left: auto; color: var(--color-link); white-space: nowrap; }
.st-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 18px; padding: 18px; }
.st-doc, .st-data { position: relative; min-width: 0; }
.st-doc { display: flex; flex-direction: column; }
.st-title { margin: 0 0 .55rem; color: var(--color-text-muted); font-size: var(--text-2xs); }
.st-drop { position: absolute; inset: 0 0 38px; display: grid; place-content: center; justify-items: center; gap: .5rem; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); color: var(--color-text-muted); font-size: var(--text-sm); opacity: 0; transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
.st-drop svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st-paper { position: relative; flex: 1; isolation: isolate; overflow: hidden; padding: 16px 16px 18px; border-radius: var(--radius-md); background: var(--color-paper); color: var(--color-paper-ink); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .75); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out); }
.st-meta { display: block; margin-bottom: .55rem; color: var(--color-paper-ink); opacity: .8; font-size: var(--text-2xs); }
.st-h { margin: 0 0 .7rem; color: var(--color-paper-strong); font-size: var(--text-sm); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; } /* a <p>: the values it computed to as an h3 inside .pub */
.st-ln { display: block; height: 5px; margin: 0 0 7px; border-radius: 3px; background: var(--color-paper-line); }
.w94 { width: 94%; } .w88 { width: 88%; } .w91 { width: 91%; } .w82 { width: 82%; } .w90 { width: 90%; } .w46 { width: 46%; }
.st-cl { margin: 0 0 8px; font-size: var(--text-xs); line-height: 1.55; color: var(--color-paper-ink); }
.st-cl b { color: var(--color-paper-strong); font-weight: 650; }
.st-paper mark { position: relative; background: transparent; color: var(--color-paper-strong); font-weight: 600; white-space: nowrap; }
.st-paper mark::after { content: ""; position: absolute; inset: -1px -2px; z-index: -1; border-radius: 3px; background: color-mix(in srgb, var(--color-primary) 25%, transparent); box-shadow: inset 0 -1.5px 0 var(--color-primary); transform-origin: left; transition: transform 520ms var(--ease-out); }
.st-paper mark.hl1::after { transition-delay: 150ms; } .st-paper mark.hl2::after { transition-delay: 450ms; } .st-paper mark.hl3::after { transition-delay: 750ms; }
.st-scan { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 88%, color-mix(in srgb, var(--color-primary) 35%, transparent) 99%, var(--color-link) 100%); transform: translateY(-100%); }
.st-chip { display: flex; align-items: center; gap: .55rem; margin-top: 10px; padding: .45rem .65rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-navy) 55%, transparent); color: var(--color-text-2); font-size: var(--text-sm); transition: opacity 400ms var(--ease-out) 350ms, transform 400ms var(--ease-out) 350ms; }
.st-chip svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--color-link); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.st-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-chip em { margin-left: auto; padding-left: .5rem; color: var(--color-success); font-size: var(--text-2xs); font-style: normal; white-space: nowrap; }
.st-fields { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.st-field { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l p" "v v"; align-items: baseline; gap: 1px .6rem; min-height: 50px; padding: .55rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-navy) 40%, transparent); }
.st-fl { grid-area: l; color: var(--color-text-muted); font-size: var(--text-xs); }
.st-fp { grid-area: p; color: var(--color-link); font-size: var(--text-2xs); font-style: normal; transition: opacity 400ms var(--ease-out) 500ms; }
.st-fv { grid-area: v; font-size: var(--text-md); font-weight: 600; transition: opacity 450ms var(--ease-out) 250ms, transform 450ms var(--ease-out) 250ms; }
.st-field:nth-child(2) .st-fv, .st-field:nth-child(2) .st-fp { transition-delay: 400ms, 400ms, 650ms; } .st-field:nth-child(3) .st-fv { transition-delay: 550ms; } .st-field:nth-child(4) .st-fv { transition-delay: 700ms; }
.st-sk { grid-area: v; align-self: center; width: 62%; height: 7px; border-radius: 4px; background: var(--color-navy-2); opacity: 0; transition: opacity 250ms var(--ease-out); }
.st-action { position: relative; display: flex; gap: .8rem; margin-top: 8px; padding: .75rem .9rem .75rem 1.1rem; border: 1px solid var(--color-warning-border); border-radius: var(--radius-lg); background: var(--color-warning-bg); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.st-bar2 { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--color-warning-accent); }
.st-action .mono { display: block; color: var(--color-warning); font-size: var(--text-2xs); }
.st-action b { display: block; margin: .15rem 0; font-size: var(--text-base); letter-spacing: -.01em; }
.st-sub { display: block; color: var(--color-text-2); font-size: var(--text-sm); }

/* Rulers: today, the notice line (amber) and the end of the term. */
.hm-rl { --pad: 34px; position: relative; height: 96px; margin: 14px var(--pad) 0; }
.hm-track { position: absolute; left: 0; right: 0; top: 52px; height: 2px; border-radius: 2px; background: var(--color-border-strong); }
.hm-fill { position: absolute; left: 0; top: 0; height: 100%; width: 42.5%; border-radius: 2px; background: linear-gradient(90deg, var(--color-primary), var(--color-link) 60%, var(--color-warning-accent)); transform-origin: left; transition: transform 900ms var(--ease-in-out); }
.hm-pin { position: absolute; top: 0; bottom: 0; left: var(--x, 0%); width: 0; transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out); }
.hm-pin::after { content: ""; position: absolute; left: -8px; top: 47px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--color-link); background: var(--color-bg); }
.hm-pin.today::after { background: var(--color-link); } .hm-pin.end::after { border-color: var(--color-text-2); }
.hm-pin.notice::after { border-color: var(--color-warning-accent); background: var(--color-warning-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-warning-accent) 18%, transparent), 0 0 16px color-mix(in srgb, var(--color-warning-accent) 50%, transparent); }
.hm-pin.notice::before { content: ""; position: absolute; left: -.5px; top: 14px; width: 1px; height: 72px; background: linear-gradient(180deg, transparent, var(--color-warning-accent) 25%, var(--color-warning-accent) 75%, transparent); transform-origin: 50% 53px; transition: transform 600ms var(--ease-out) 900ms; }
.hm-lab { position: absolute; left: 0; bottom: 50px; transform: translateX(-50%); display: grid; justify-items: center; gap: 1px; white-space: nowrap; line-height: 1.2; }
.hm-lab em { color: var(--color-text-muted); font-size: var(--text-2xs); font-style: normal; letter-spacing: .06em; text-transform: uppercase; }
.hm-lab b { font-size: var(--text-xs); font-weight: 600; }
.hm-pin.notice .hm-lab em { color: var(--color-warning); }
.hm-pin.today .hm-lab { top: 62px; bottom: auto; }
.x0 { --x: 0%; } .x42 { --x: 42.5%; } .x81 { --x: 81.25%; }
.hm-ticks { position: absolute; left: 0; right: 0; top: 62px; height: 20px; }
.hm-ticks i { position: absolute; top: 0; transform: translateX(-50%); color: var(--color-text-muted); font-size: var(--text-2xs); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.hm-ticks i::before { content: ""; position: absolute; left: 50%; top: -10px; width: 1px; height: 6px; background: var(--color-border-strong); }

/* Stage states: hidden until played, only with motion (class s1..s4 is added by home.js; the final look is the default). */
.js-motion .st:not(.s1) .st-drop { opacity: 1; }
.js-motion .st:not(.s1) .st-paper { opacity: 0; transform: translate(-26px, 18px) rotate(-1.6deg); }
.js-motion .st:not(.s1) .st-chip { opacity: 0; transform: translateY(6px); }
.js-motion .st.s1 .st-drop { opacity: 0; transform: scale(.97); }
.js-motion .st.s1 .st-scan { animation: st-scan 1100ms var(--ease-in-out) 250ms both; }
@keyframes st-scan { 0% { opacity: 1; transform: translateY(-100%); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } }
.js-motion .st:not(.s2) .st-paper mark::after { transform: scaleX(0); }
.js-motion .st:not(.s2) .st-fv { opacity: 0; transform: translateY(6px); }
.js-motion .st:not(.s2) .st-fp { opacity: 0; }
.js-motion .st:not(.s2) .st-sk { opacity: 1; }
.js-motion .st:not(.s3) .hm-rl { opacity: .35; }
.js-motion .st:not(.s3) .hm-pin { opacity: 0; transform: translateY(8px); }
.js-motion .st:not(.s3) .hm-fill { transform: scaleX(0); }
.js-motion .st:not(.s3) .hm-pin.notice::before { transform: scaleY(0); }
.js-motion .st .hm-rl { transition: opacity 400ms var(--ease-out); }
.js-motion .st .hm-pin.today { transition-delay: 100ms; } .js-motion .st .hm-pin.notice { transition-delay: 700ms; } .js-motion .st .hm-pin.end { transition-delay: 1000ms; }
.js-motion .st:not(.s4) .st-action { opacity: 0; transform: translateY(14px); }
.js-motion .st.s4 .hm-pin.notice::after { animation: st-ring 1300ms var(--ease-out) 500ms 1 both; }
@keyframes st-swap { from { opacity: 0; } }
@keyframes st-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-warning-accent) 65%, transparent), 0 0 16px color-mix(in srgb, var(--color-warning-accent) 50%, transparent); } 100% { box-shadow: 0 0 0 16px transparent, 0 0 16px color-mix(in srgb, var(--color-warning-accent) 50%, transparent); } }

/* Narrow container: the two stage columns stack. */
@container (max-width: 560px) {
  .st-body { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
  .st-doc .st-ln, .st-doc .st-meta { display: none; }
  .st-paper { padding: 12px; flex: none; } .st-h { margin-bottom: .45rem; }
  .st-fields { grid-template-columns: 1fr 1fr; gap: 6px; }
  .st-field { min-height: 46px; padding: .45rem .6rem; } .st-fv { font-size: var(--text-sm); }
  .hm-rl { --pad: 30px; height: 88px; margin-top: 8px; }
  .hm-track { top: 46px; } .hm-pin::after { top: 41px; } .hm-pin.notice::before { top: 8px; } .hm-lab { bottom: 44px; } .hm-pin.today .hm-lab { top: 56px; }
  .st-action { padding: .6rem .8rem .6rem 1rem; } .st-sub { display: none; }
}

/* ---------- Lifecycle story ---------- */
.lc { border-top: 1px solid var(--color-border); }
.lc-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.lc-steps { position: relative; margin: 0; padding: 0 0 0 34px; list-style: none; }
.lc-steps::before { content: ""; position: absolute; left: 7px; top: 8%; bottom: 8%; width: 1px; background: var(--color-border-strong); }
.lc-steps::after { content: ""; position: absolute; left: 7px; top: 8%; width: 1px; height: 84%; background: linear-gradient(180deg, var(--color-link), var(--color-warning-accent)); transform-origin: top; transform: scaleY(var(--prog, 1)); transition: transform 700ms var(--ease-out); }
.lc-step { position: relative; display: flex; flex-direction: column; justify-content: center; gap: .6rem; min-height: 64vh; }
.lc-step::before { content: ""; position: absolute; left: -34px; top: calc(50% - 40px); width: 15px; height: 15px; border: 1px solid var(--color-border-strong); border-radius: 50%; background: var(--color-bg); transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.js-motion .lc-step { opacity: .38; transition: opacity 500ms var(--ease-out); } .js-motion .lc-step.active { opacity: 1; }
.lc-step.active::before { border-color: var(--color-link); background: var(--color-link); box-shadow: 0 0 0 5px var(--color-primary-50); }
.lc-step[data-step="4"].active::before { border-color: var(--color-warning-accent); background: var(--color-warning-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-warning-accent) 18%, transparent); }
.lc-step .mono { color: var(--color-link); }
.lc-step h3 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.lc-step p { max-width: 30em; margin: 0; color: var(--color-text-2); }
.lc-stage { position: sticky; top: 96px; }
.lc .pub-principle { margin-top: clamp(24px, 4vw, 44px); }
/* Lifecycle layouts. Desktop (above 1000 px): steps left, the sticky stage right (above). The phone layout applies below 700 px, and also on
   short landscape screens up to 1000 px wide, where a sticky stage would not fit the height. */
.lc-mini { display: none; }
/* Tablet (700-1000 px wide, at least 640 px tall): the desktop composition, compact. The stage stays in its column, sticky under the header,
   and shows each step's state as on desktop; it releases at the end of the grid, before the principle note. */
@media (min-width: 700px) and (max-width: 1000px) and (min-height: 640px) {
  .lc-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 28px; }
  .lc-stage { top: 84px; }
  .lc-steps { padding-left: 28px; }
  .lc-step { min-height: 58vh; }
  .lc-step::before { left: -28px; }
  .lc-step h3 { font-size: 1.6rem; }
  .lc-step p { font-size: var(--text-md); }
}
/* Phones: one column. Each step carries its own small visual right under its text (the same sample contract and components as the stage),
   so the text is never covered and the visual always belongs to the step above it. No sticky element, nothing hidden until scrolled,
   no swiping, and the same with or without script. The rail dot of the step in view still lights up (home.js, IntersectionObserver). */
@media (max-width: 699px), (max-width: 1000px) and (max-height: 639px) {
  .lc-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lc-stage { display: none; }
  .lc-steps { padding-left: 30px; }
  .lc-step { justify-content: flex-start; min-height: 0; padding: 26px 0 8px; }
  .lc-step::before { left: -30px; top: 30px; }
  .js-motion .lc-step { opacity: 1; }
  .lc-step h3 { font-size: 1.6rem; }
  .lc-mini { container-type: inline-size; position: relative; display: block; margin-top: 14px; padding: 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-xl); background: linear-gradient(180deg, var(--color-surface), var(--color-bg-soft)); box-shadow: var(--shadow-md); color: var(--color-text); }
  .lc-mini > .st-example { display: table; margin: 0 0 10px auto; }
  .lc-mini .st-paper { padding: 12px 12px 4px; }
  /* The paper paragraphs keep the stage's look, not the step paragraph's (colour and spacing). */
  .lc-mini .st-paper .st-h { max-width: none; margin: 0 0 .5rem; color: var(--color-paper-strong); }
  .lc-mini .st-paper .st-cl { max-width: none; margin: 0 0 8px; color: var(--color-paper-ink); }
  .lc-mini .hm-rl { --pad: 30px; margin-top: 4px; }
}
.st-fp { white-space: nowrap; } /* "P. 2" stays on one line next to a wrapped field label */

/* ---------- Deadline calculator ---------- */
.dc { border-top: 1px solid var(--color-border); background: linear-gradient(180deg, var(--color-navy), var(--color-bg)); }
/* Desktop: the interactive example on the left, heading, text and controls on the right (DOM order stays copy first, so phones read the
   heading before the example and the keyboard reaches the controls first). */
.dc-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.dc-copy { order: 2; }
.dc-copy h2 { margin: 0 0 1.2rem; font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -.04em; line-height: 1.05; }
.dc-copy .pub-lead { margin-bottom: 1.8rem; }
.dc-ctl { margin: 0; padding: 0; border: 0; } .dc-ctl legend { margin-bottom: .6rem; padding: 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.dc-fine { margin: 1.4rem 0 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.dc-panel { padding: clamp(18px, 3vw, 32px); border: 1px solid var(--color-border-strong); border-radius: var(--radius-2xl); background: linear-gradient(180deg, var(--color-surface), var(--color-bg-soft)); box-shadow: var(--shadow-lg); }
.dc-f { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem .7rem; }
.dc-p { display: grid; gap: .2rem; padding: .65rem .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--color-navy) 40%, transparent); }
.dc-p .mono { color: var(--color-text-muted); font-size: var(--text-2xs); }
.dc-p b { font-size: clamp(.95rem, 1.7vw, 1.3rem); font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.dc-op { align-self: center; color: var(--color-text-muted); font-size: 1.4rem; }
.dc-res { border-color: var(--color-warning-border); background: var(--color-warning-bg); transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out); }
.dc-res .mono { color: var(--color-warning); }
.dc-res.missed { border-color: var(--color-danger-border); background: var(--color-danger-bg); } .dc-res.missed .mono { color: var(--color-danger-text); }
.dc-res b { display: inline-block; transition: transform 350ms var(--ease-out), opacity 350ms var(--ease-out); } .dc-res b.swap { opacity: 0; transform: translateY(6px); }
.hm-rl.big { --pad: 40px; height: 168px; margin-top: 26px; }
.hm-rl.big .hm-track { top: 92px; } .hm-rl.big .hm-pin::after { top: 87px; } .hm-rl.big .hm-pin.notice::before { top: 40px; height: 100px; transform-origin: 50% 53px; }
.hm-rl.big .hm-lab { bottom: 90px; } .hm-rl.big .hm-pin.today .hm-lab { top: 124px; }
.hm-rl.big .hm-pin.today::before { content: ""; position: absolute; left: -.5px; top: 99px; width: 1px; height: 24px; background: var(--color-border-strong); }
.hm-rl.big .hm-ticks { top: 100px; }
.hm-rl.big .hm-pin { transition: left 700ms var(--ease-in-out); } .hm-rl.big .hm-fill { transition: left 700ms var(--ease-in-out), width 700ms var(--ease-in-out); }
.hm-rl.big.missed .hm-pin.notice::after { border-color: var(--color-danger-text); background: var(--color-danger-text); box-shadow: 0 0 0 4px var(--color-danger-bg); }
.hm-rl.big.missed .hm-pin.notice .hm-lab em { color: var(--color-danger-text); }
.hm-rl.big.missed .hm-pin.notice::before { background: linear-gradient(180deg, transparent, var(--color-danger-text) 25%, var(--color-danger-text) 75%, transparent); }
.dc-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--color-border); }
.dc-verdict p { margin: 0; color: var(--color-text-2); font-size: var(--text-base); }

/* ---------- Product trio ---------- */
.pt { border-top: 1px solid var(--color-border); }
.pt-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 80px); align-items: center; padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--color-border); }
.pt-row.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } .pt-row.flip .pt-copy { order: 2; }
.pt-row:first-child { padding-top: 0; border-top: 0; }
.pt-copy .mono { color: var(--color-link); }
.pt-copy h3 { margin: 0 0 1rem; font-size: clamp(1.5rem, 2.8vw, 2.1rem); letter-spacing: -.035em; line-height: 1.1; }
.pt-copy p { max-width: 32em; margin: 0; color: var(--color-text-2); }
.pt-ui { min-width: 0; padding: clamp(14px, 2.5vw, 24px); border: 1px solid var(--color-border-strong); border-radius: var(--radius-xl); background: linear-gradient(180deg, var(--color-surface), var(--color-bg-soft)); }
.pt-trace { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; }
.pt-list { display: grid; gap: 6px; align-content: start; margin: 0; padding: 0; list-style: none; }
.pt-list button { display: grid; width: 100%; gap: 1px; padding: .6rem .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-navy) 40%, transparent); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.pt-list button:active { transform: scale(.985); }
.pt-list span { color: var(--color-text-muted); font-size: var(--text-xs); } .pt-list b { font-size: var(--text-md); font-weight: 600; } .pt-list b.miss { color: var(--color-warning); }
.pt-list button[aria-selected="true"] { border-color: var(--color-link); background: var(--color-primary-50); }
@media (hover: hover) { .pt-list button:hover { border-color: var(--color-border-strong); } }
.pt-doc { position: relative; align-self: stretch; min-height: 200px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--color-paper); color: var(--color-paper-ink); }
.pt-doc > .mono { display: block; margin-bottom: .8rem; opacity: .8; font-size: var(--text-2xs); } /* .8: 4.9:1 on the paper surface (AA) */
.pt-doc p { position: absolute; left: 16px; right: 16px; top: 44px; margin: 0; opacity: 0; transform: translateY(8px); visibility: hidden; transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out), visibility 0s linear 350ms; font-size: var(--text-md); line-height: 1.65; }
.pt-doc p.on { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.pt-doc q { quotes: none; } .pt-doc mark { padding: 0 2px; background: color-mix(in srgb, var(--color-primary) 22%, transparent); box-shadow: inset 0 -2px 0 var(--color-primary); color: var(--color-paper-strong); font-weight: 600; }
.pt-doc .miss-p span { display: block; padding: .8rem; border: 1px dashed var(--color-warning); border-radius: var(--radius-sm); background: var(--color-warning-bg); color: var(--color-warning-strong); }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pt-chip { display: inline-flex; align-items: center; gap: .45rem; min-height: 32px; padding: .25rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: color-mix(in srgb, var(--color-navy) 40%, transparent); color: var(--color-text-2); font: inherit; font-size: var(--text-sm); font-weight: 550; cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.pt-chip b { color: var(--color-text-muted); font-size: var(--text-xs); } .pt-chip:active { transform: scale(.97); }
.pt-chip.on { border-color: var(--color-link); background: var(--color-primary-50); color: var(--color-text); }
@media (hover: hover) { .pt-chip:hover { border-color: var(--color-border-strong); color: var(--color-text); } }
.pt-aclist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pt-aclist li { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; padding: .75rem .9rem .75rem 1.1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--color-navy) 40%, transparent); }
.pt-aclist li[hidden] { display: none; }
.pt-aclist li.enter { animation: hm-fade-up 420ms var(--ease-out) backwards; } .pt-aclist li.enter.e1 { animation-delay: 60ms; } .pt-aclist li.enter.e2 { animation-delay: 120ms; } .pt-aclist li.enter.e3 { animation-delay: 180ms; }
.pt-aclist .bar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--color-primary); }
.pt-aclist .urg .bar { background: var(--color-danger-text); } .pt-aclist .soon .bar { background: var(--color-warning-accent); }
.pt-aclist b { display: block; font-size: var(--text-md); } .pt-aclist div span { display: block; color: var(--color-text-muted); font-size: var(--text-xs); } .pt-aclist time { color: var(--color-text-2); }
.pt-rem .hm-rl { --pad: 44px; margin-top: 10px; }
.pt-rem .hm-fill { width: 100%; } .r0 { --x: 0%; } .r1 { --x: 66.7%; } .r2 { --x: 92.2%; } .r3 { --x: 100%; }
.pt-rem .hm-pin.notice .hm-lab { top: 62px; bottom: auto; }
.pt-rem .hm-lab em { color: var(--color-text-2); } .pt-rem .hm-pin.notice .hm-lab em { color: var(--color-warning); }
.pt-cap { margin: 4px 0 0; color: var(--color-text-muted); font-size: var(--text-2xs); }
.js-motion .pt-rem:not(.drawn) .hm-pin { opacity: 0; transform: translateY(8px); } .js-motion .pt-rem:not(.drawn) .hm-fill { transform: scaleX(0); }
.js-motion .pt-rem .hm-fill { transition: transform 1100ms var(--ease-in-out) 200ms; }
.pt-rem .hm-pin:nth-of-type(1) { transition-delay: 300ms; } .pt-rem .hm-pin:nth-of-type(2) { transition-delay: 500ms; } .pt-rem .hm-pin:nth-of-type(3) { transition-delay: 700ms; } .pt-rem .hm-pin:nth-of-type(4) { transition-delay: 900ms; }

@media (max-width: 1000px) {
  .dc-grid, .pt-row, .pt-row.flip { grid-template-columns: minmax(0, 1fr); } .pt-row.flip .pt-copy { order: 0; } .dc-copy { order: 0; }
}
@media (max-width: 560px) {
  .pt-trace { grid-template-columns: minmax(0, 1fr); } .pt-doc { min-height: 150px; }
  .st-ctl .hm-seg { width: 100%; } .st-ctl .hm-seg button { flex: 1; justify-content: center; padding-inline: .3rem; } .st-ctl .hm-seg .mono { display: none; }
  .dc-f { gap: .4rem .5rem; } .dc-p { padding: .55rem .7rem; } .hm-rl.big { --pad: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-paper, .st-chip, .st-fv, .st-fp, .st-action, .st-drop { transition: none; }
}
.pub .st .st-h { color: var(--color-paper-strong); }
.badge.err { color: var(--color-danger-text); background: var(--color-danger-bg); }
.pub .pt-copy h3, .pub .lc-step h3 { color: var(--color-text); }

/* ---------- Hero overview (PROTOTYPE for founder review; markup: src/web/pages/home-hero-overview.ts) ----------
   A sample dashboard in the hero, in the application's own language (summary cards, Action Center items), so the hero no longer repeats the
   extraction stage further down. Fictional data, labelled "Sample data". The final state is the default. The motion plays once, CSS only,
   under html.js-motion and prefers-reduced-motion: no-preference: 1 the summary cards settle in, 2 the Action Center items reveal one by one,
   3 the approaching cancellation deadline gets its amber emphasis, 4 the "On track" check draws, 5 the dashboard holds its final state (no loop).
   Only opacity and transform are animated (plus the check's stroke), so nothing moves the layout. */
.ov { border: 1px solid var(--color-border-strong); border-radius: var(--radius-xl); background: linear-gradient(180deg, var(--color-surface), var(--color-bg-soft)); box-shadow: var(--shadow-lg); overflow: hidden; color: var(--color-text); }
.ov-top { display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; border-bottom: 1px solid var(--color-border); color: var(--color-text-muted); }
.ov-top .st-example { white-space: nowrap; }
.ov-kind { margin-left: auto; overflow: hidden; color: var(--color-text-muted); font-size: var(--text-2xs); text-overflow: ellipsis; white-space: nowrap; }
.ov-body { padding: 20px 20px 16px; }
.ov-title { margin: 0; color: var(--color-text); font-size: var(--text-xl); font-weight: 650; letter-spacing: -.025em; line-height: 1.2; }
.ov-lede { margin: .2rem 0 14px; color: var(--color-text-muted); font-size: var(--text-sm); }
.ov-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.ov-k { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .15rem .6rem; min-width: 0; padding: .7rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-md); }
.ov-ic { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-md); background: var(--color-primary-50); color: var(--color-link); }
.ov-ic .i, .ov-ric .i, .ov-fic .i { width: 16px; height: 16px; }
.ov-k.soon .ov-ic { background: var(--color-warning-bg); color: var(--color-warning); }
.ov-k.ok .ov-ic { background: var(--color-success-bg); color: var(--color-success); }
.ov-k dt { display: contents; }
.ov-eb { grid-column: 2; grid-row: 1; color: var(--color-text-muted); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; line-height: 1.3; }
.ov-lb { grid-column: 1 / 3; grid-row: 3; color: var(--color-text-2); font-size: var(--text-xs); line-height: 1.3; }
.ov-k dd { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: .3rem; margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ov-k.soon dd { color: var(--color-warning); }
.ov-check { width: .62em; height: .62em; flex: none; fill: none; stroke: var(--color-success); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; }
.ov-sub { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin: 0 0 .5rem; color: var(--color-text); font-size: var(--text-md); font-weight: 650; }
.ov-n { color: var(--color-text-muted); font-size: var(--text-xs); font-weight: 500; }
.ov-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.ov-row { position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .7rem; padding: .6rem .8rem .6rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.ov-row::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; opacity: 0; }
.ov-row.soon::before { opacity: 1; background: var(--color-warning-bg); box-shadow: inset 0 0 0 1px var(--color-warning-border); }
.ov-accent { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--color-primary); }
.ov-row.soon .ov-accent { background: var(--color-warning-accent); }
.ov-ric { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-md); background: var(--color-primary-50); color: var(--color-link); }
.ov-row.soon .ov-ric { background: color-mix(in srgb, var(--color-warning-accent) 16%, transparent); color: var(--color-warning); }
.ov-what { min-width: 0; }
.ov-meta { display: block; color: var(--color-text-muted); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ov-what b { display: block; margin: .05rem 0; font-size: var(--text-md); font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.ov-row.soon .ov-what b { color: var(--color-warning-strong); }
.ov-ct { display: block; overflow: hidden; color: var(--color-link); font-size: var(--text-xs); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ov-ct span { color: var(--color-text-muted); font-weight: 400; }
.ov-foot { display: flex; align-items: center; gap: .5rem; margin: 12px 0 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.ov-fic { display: inline-grid; color: var(--color-link); }
.ov-cap { min-height: 0; }
@container (max-width: 470px) {
  .ov-body { padding: 16px 14px 14px; }
  .ov-title { font-size: var(--text-lg); }
  .ov-sum { gap: 6px; margin-bottom: 14px; }
  .ov-k { grid-template-columns: minmax(0, 1fr); padding: .55rem .6rem .5rem; }
  .ov-ic { display: none; }
  .ov-eb, .ov-k dd, .ov-lb { grid-column: 1; } .ov-k dd { font-size: 1.4rem; } .ov-lb { font-size: var(--text-2xs); }
  .ov-row { gap: .55rem; padding: .55rem .7rem .55rem .9rem; } .ov-what b { font-size: var(--text-sm); }
  .ov-ric { width: 26px; height: 26px; }
}
/* Phone-width panels: the number and its own label say it all (the uppercase card labels would not fit), and the supplier wraps instead of being cut off. */
@container (max-width: 400px) { .ov-eb { display: none; } .ov-k dd { grid-row: 1; } .ov-lb { grid-row: 2; } .ov-ct { white-space: normal; } }
@container (max-width: 340px) { .ov-kind { display: none; } .ov-ric { display: none; } .ov-row { grid-template-columns: minmax(0, 1fr); } }
@keyframes ov-settle { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes ov-num { from { opacity: 0; transform: translateY(35%); } }
@keyframes ov-row-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ov-fade { from { opacity: 0; } }
@keyframes ov-accent { from { transform: scaleY(0); } }
@keyframes ov-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes ov-draw { from { stroke-dashoffset: 24; } }
@media (prefers-reduced-motion: no-preference) {
  .js-motion .ov-k { animation: ov-settle 600ms var(--ease-out) backwards; }
  .js-motion .ov-k dd .num { display: inline-block; animation: ov-num 700ms var(--ease-out) backwards; }
  .js-motion .ov-k.k1 { animation-delay: 900ms; } .js-motion .ov-k.k1 dd .num { animation-delay: 1000ms; }
  .js-motion .ov-k.k2 { animation-delay: 1000ms; } .js-motion .ov-k.k2 dd .num { animation-delay: 1100ms; }
  .js-motion .ov-k.k3 { animation-delay: 1100ms; } .js-motion .ov-k.k3 dd .num { animation-delay: 1200ms; }
  .js-motion .ov-row { animation: ov-row-in 550ms var(--ease-out) backwards; }
  .js-motion .ov-row.r1 { animation-delay: 1550ms; } .js-motion .ov-row.r2 { animation-delay: 1700ms; } .js-motion .ov-row.r3 { animation-delay: 1850ms; }
  .js-motion .ov-foot { animation: ov-fade 600ms var(--ease-out) 2100ms backwards; }
  .js-motion .ov-row.soon::before { animation: ov-fade 900ms var(--ease-out) 2450ms backwards; }
  .js-motion .ov-row.soon .ov-accent { animation: ov-accent 600ms var(--ease-out) 2450ms backwards; }
  .js-motion .ov-check { animation: ov-pop 400ms var(--ease-out) 3050ms backwards; }
  .js-motion .ov-check path { animation: ov-draw 500ms var(--ease-out) 3150ms backwards; }
}
