/*
 * The feel of every public Morrow page: loaded after instrument.css on the instrument views, the
 * record and proof pages (/r/...), the documents and the 404 page, so they all answer a hand the
 * same way the front page does.
 *
 *   - one header: the wordmark, the one way to check a domain, a light/dark switch (static/feel.js);
 *   - presses that give a little, focus rings that are always visible, rows and cards that lift
 *     under the pointer;
 *   - numbers that count up once and bars that grow once, when they scroll into view;
 *   - rows that arrive with a short stagger;
 *   - a crisp "Copied" when something is copied, and a line that says what changed since your
 *     last visit (real data only, kept in this browser).
 *
 * Every animation runs a fixed number of times (never infinite) and everything here stops under
 * prefers-reduced-motion (the block at the end). Transform and opacity only, so nothing reflows.
 */

/* ── the header's light/dark switch and the "check a domain" link on server pages ── */
.i-theme, .ins .i-theme { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2) !important; background: var(--bg-2) !important; color: var(--muted) !important; font: 12px var(--mono) !important; letter-spacing: .04em; cursor: pointer; transition: transform 90ms ease-out, border-color 120ms ease-out, color 120ms ease-out; }
.i-theme[hidden] { display: none; }
.i-theme:hover { color: var(--text) !important; border-color: var(--text) !important; }
.i-theme-ic { width: 12px; height: 12px; border: 1px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); flex: none; }
a.i-cmd-link { text-decoration: none; min-width: 200px; }
a.i-cmd-link .t { color: var(--muted); }
@media (max-width: 560px) {
  .i-theme-t { display: none; }
  .ins .i-theme { padding: 0 11px; }
  a.i-cmd-link { min-width: 0; }
  /* the instrument's header: the dial and the switch on one line, the command bar the full width under them */
  .i-top-right { flex-wrap: wrap; }
  .i-dial ~ .i-cmd-btn { flex: 1 1 100%; order: 3; }
  .i-dial ~ .i-theme { margin-left: auto; }
}

/* ── the footer, the same on every page ── */
.i-foot-in a { text-underline-offset: 3px; }
.i-foot-in a:hover { color: var(--text); }
.conn-line { max-width: var(--max); margin: -16px auto 0; padding: 0 var(--gutter) 28px; font: 12px var(--mono); color: var(--dim); }
.conn-line:empty { display: none; }

/* ── presses, focus, lift ── */
.ins .i-btn, .ins .btn, .ins .i-cmd-btn, .ins .oopsBtn, .ins .i-dial button, .i-theme { transition: transform 90ms ease-out, background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out; }
.ins .i-btn:active, .ins .btn:active, .ins .i-cmd-btn:active, .ins .oopsBtn:active, .ins .i-dial button:active, .i-theme:active { transform: scale(.975); }
.ins a:focus-visible, .ins button:focus-visible, .ins select:focus-visible, .ins summary:focus-visible, .ins textarea:focus-visible, .ins input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) {
  .ins .i-table tbody tr, .ins .cg-list li, .ins .nr-list li, .ins .feel-lift, .ins .rec .facts tbody tr, .ins .rec .history tbody tr { transition: background-color 120ms ease-out, transform 160ms ease-out; }
  .ins .i-table tbody tr:hover td, .ins .rec .facts tbody tr:hover td, .ins .rec .history tbody tr:hover td { background: var(--bg-2); }
  .ins .cg-list li:hover, .ins .nr-list li:hover { background: var(--bg-2); }
  .ins .feel-lift:hover { transform: translateY(-2px); background: var(--bg-2); }
  .ins .reading, .ins.doc .matrix-row { transition: background-color 120ms ease-out; }
  .ins .reading:hover, .ins.doc .matrix-row:hover { background: var(--bg-2); }
}

/* ── tabular figures wherever a number is read ── */
[data-count], .ins .num, .ins .reading dd, .ins .i-table td, .ins .rec .meta dd, .ins .rec .facts .value { font-variant-numeric: tabular-nums; }

/* ── bars grow in once (static/feel.js sets the width when the bar is in view) ── */
.ins .bar .seg { transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.ins .bar .seg:nth-child(2) { transition-delay: 60ms; } .ins .bar .seg:nth-child(3) { transition-delay: 120ms; }
.ins .bar .seg:nth-child(4) { transition-delay: 180ms; } .ins .bar .seg:nth-child(5) { transition-delay: 240ms; }
.ins .bar .seg:nth-child(6) { transition-delay: 300ms; }
.ins .spark .tick { transition: height .6s cubic-bezier(.2, .7, .2, 1); }

/* ── rows arrive with a short stagger, once per render ── */
.ins .cg-list li, .ins .nr-list li, .ins .i-table tbody tr, .ins .feel-rows > *, .ins .rec .facts tbody tr, .ins .rec .history tbody tr, .ins .rec .algo { animation: feel-row .32s ease-out 1 both; }
.ins .cg-list li:nth-child(2), .ins .nr-list li:nth-child(2), .ins .i-table tbody tr:nth-child(2), .ins .feel-rows > :nth-child(2), .ins .rec .facts tbody tr:nth-child(2), .ins .rec .history tbody tr:nth-child(2), .ins .rec .algo:nth-child(2) { animation-delay: 35ms; }
.ins .cg-list li:nth-child(3), .ins .nr-list li:nth-child(3), .ins .i-table tbody tr:nth-child(3), .ins .feel-rows > :nth-child(3), .ins .rec .facts tbody tr:nth-child(3), .ins .rec .history tbody tr:nth-child(3), .ins .rec .algo:nth-child(3) { animation-delay: 70ms; }
.ins .cg-list li:nth-child(4), .ins .nr-list li:nth-child(4), .ins .i-table tbody tr:nth-child(4), .ins .feel-rows > :nth-child(4), .ins .rec .facts tbody tr:nth-child(4), .ins .rec .history tbody tr:nth-child(4), .ins .rec .algo:nth-child(4) { animation-delay: 105ms; }
.ins .cg-list li:nth-child(5), .ins .nr-list li:nth-child(5), .ins .i-table tbody tr:nth-child(5), .ins .feel-rows > :nth-child(5), .ins .rec .facts tbody tr:nth-child(5), .ins .rec .history tbody tr:nth-child(5), .ins .rec .algo:nth-child(5) { animation-delay: 140ms; }
.ins .cg-list li:nth-child(6), .ins .nr-list li:nth-child(6), .ins .i-table tbody tr:nth-child(6), .ins .feel-rows > :nth-child(6), .ins .rec .facts tbody tr:nth-child(6), .ins .rec .history tbody tr:nth-child(6), .ins .rec .algo:nth-child(6) { animation-delay: 175ms; }
.ins .cg-list li:nth-child(n+7), .ins .nr-list li:nth-child(n+7), .ins .i-table tbody tr:nth-child(n+7), .ins .feel-rows > :nth-child(n+7), .ins .rec .facts tbody tr:nth-child(n+7), .ins .rec .history tbody tr:nth-child(n+7), .ins .rec .algo:nth-child(n+7) { animation-delay: 210ms; }
@keyframes feel-row { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* vendor check results: a longer, deliberate stagger, worst first as the report orders them */
.ins #vr-list tbody tr { animation-duration: .4s; }
.ins #vr-list tbody tr:nth-child(2) { animation-delay: 90ms; } .ins #vr-list tbody tr:nth-child(3) { animation-delay: 180ms; }
.ins #vr-list tbody tr:nth-child(4) { animation-delay: 270ms; } .ins #vr-list tbody tr:nth-child(5) { animation-delay: 360ms; }
.ins #vr-list tbody tr:nth-child(n+6) { animation-delay: 450ms; }
/* a row that is only a note under the row above it arrives with it */
.ins #vr-list tbody tr.vr-note { animation: none; }

/* ── "Copied": the button answers in place, once ── */
.ins .is-copied, .ins .is-copied:hover { background: var(--ok) !important; border-color: var(--ok) !important; color: var(--on-solid) !important; animation: feel-pop .26s cubic-bezier(.2, .8, .2, 1) 1; }
@keyframes feel-pop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: none; } }
.feel-copy-say { font: 12px var(--mono); color: var(--ok); margin-left: 8px; }

/* ── since your last visit (static/feel.js, real data kept in this browser only) ── */
.feel-since { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 16px; padding: 8px 12px; border: 1px solid var(--line); border-left: 2px solid var(--ok); background: var(--bg-2); font-size: 14px; color: var(--muted); max-width: none; animation: feel-row .32s ease-out 1 both; }
.feel-since[hidden] { display: none; }
.feel-since[data-tone="same"] { border-left-color: var(--line-2); }
.feel-since-k { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.feel-since b { color: var(--text); font-weight: 500; }
.feel-new { display: inline-block; margin-left: 6px; padding: 0 5px; font: 500 10px/18px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-solid); background: var(--ok); vertical-align: 1px; }

/* ── reduced motion: nothing moves, everything is where it ends up ── */
@media (prefers-reduced-motion: reduce) {
  .ins .cg-list li, .ins .nr-list li, .ins .i-table tbody tr, .ins .feel-rows > *, .ins .rec .facts tbody tr, .ins .rec .history tbody tr, .ins .rec .algo,
  .ins .is-copied, .feel-since, .ins .rec .seal, .ins .rec .proof-status, .ins .rec .seal-v { animation: none !important; }
  .ins .bar .seg, .ins .spark .tick, .i-theme, .ins .i-btn, .ins .btn, .ins .i-cmd-btn, .ins .oopsBtn, .ins .i-dial button, .ins .feel-lift { transition: none !important; }
  .ins .i-btn:active, .ins .btn:active, .ins .i-cmd-btn:active, .ins .oopsBtn:active, .ins .i-dial button:active, .i-theme:active, .ins .feel-lift:hover { transform: none; }
}

/* ── One language for every public page ─────────────────────────────────────────────────────────
 * The front page's story set the shapes (static/home-story.css); this layer carries them to every
 * view that loads feel.css: the instrument views, the record and proof pages, the documents and the
 * 404 page. Tokens only (instrument.css): the system font stack, rounded generous shapes, the type
 * scale, and the safe and warn colours that meet AA in both themes. Nothing here animates: colour,
 * border and background changes are instant, presses and lifts move by transform only.
 */

/* the header: translucent over the page, a pill for each control */
.ins .i-top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); }
.ins .i-top-in { min-height: 64px; }
.ins .i-mark { font: 700 13px var(--sans); letter-spacing: .32em; }
.ins .i-mark::before { border-radius: 2px; }
.ins .i-cmd-btn { border-radius: var(--r-pill); font: 14px var(--sans); }
.ins .i-cmd-btn kbd { border-radius: 6px; }
.i-theme, .ins .i-theme { border-radius: var(--r-pill); font: 13px var(--sans) !important; letter-spacing: 0; padding: 0 14px; }
.i-theme-ic { border-radius: 50%; }
.ins .i-dial { border-radius: var(--r-pill); overflow: hidden; font: 13px var(--sans); }
.ins .i-dial button { padding: 6px 12px; }
.ins .i-conn { font: 13px var(--sans); }

/* the footer */
.ins .i-foot { margin-top: 56px; }
.ins .i-foot-in { font: 13px var(--sans); gap: 10px 22px; padding: 32px var(--gutter) 44px; }

/* the view's one line: a headline, in the story's type */
.ins .i-say { font-size: clamp(24px, 2.7vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -.025em; max-width: 34ch; margin: 8px 0 32px; }
.ins .i-say::before, .ins .i-say::after { content: none; }
.ins .i-eyebrow { font: 600 12px var(--sans); letter-spacing: .2em; }
.ins .i-h1 { font-weight: 700; letter-spacing: -.04em; }
.ins .i-h2 { font-weight: 650; letter-spacing: -.02em; }
.ins .i-big { font-weight: 650; letter-spacing: -.03em; }
.ins .i-status { font: 14px var(--sans); }
.ins .i-fine { font-size: 13.5px; }

/* panels: rounded surfaces with a quiet label, not ruled boxes */
.ins .ch { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); margin: 0 0 20px; overflow: hidden; }
.ins .ch-head { padding: 14px 20px; border-bottom: 1px solid var(--line); font: 600 12px var(--sans); letter-spacing: .16em; color: var(--dim); }
.ins .ch-head::before { border-radius: 50%; }
.ins .ch-body { padding: 20px; }
.ins .i-empty { border-radius: var(--r-md); }

/* readouts: small cards */
.ins .readouts { border: 0; gap: 10px; }
.ins .reading { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); padding: 12px 14px; }
.ins .reading dt, .ins .reading .k { font: 600 11px var(--sans); letter-spacing: .12em; }
.ins .reading dd, .ins .reading .v { font: 600 17px var(--sans); letter-spacing: -.01em; }

/* grades: a rounded disc and round chips, tinted with the grade's colour */
.ins .grade { border: 0; border-radius: var(--r-xl); background: color-mix(in srgb, var(--gc, var(--dim)) 15%, var(--bg)); font: 780 64px/1 var(--sans); letter-spacing: -.04em; }
.ins .grade[data-g="A"], .ins .grade[data-g="B"] { background: var(--safe); color: var(--safe-ink); box-shadow: 0 0 0 8px var(--glow); }
.ins .g-chip { border: 0; border-radius: var(--r-pill); min-width: 28px; height: 24px; padding: 0 8px; background: color-mix(in srgb, var(--gc, var(--dim)) 16%, transparent); font: 700 12.5px var(--sans); }

/* the one input and every button */
.ins .i-field { border-radius: var(--r-md); padding: 0 16px; border-color: var(--line-2); }
.ins .i-field input { font: 17px var(--sans); height: 52px; }
.ins .i-field .p { font-family: var(--sans); }
.ins .i-btn { border-radius: var(--r-pill); padding: 0 18px; min-height: 40px; font: 600 14px var(--sans); letter-spacing: 0; }
.ins .i-btn.solid { background: var(--safe) !important; border-color: var(--safe) !important; color: var(--safe-ink) !important; }
.ins .i-btn.solid:hover { filter: none; opacity: .92; }
.ins select.i-btn, .ins textarea.i-btn, .ins input.i-btn { border-radius: var(--r-sm); font-family: var(--sans); }
.ins .fix .i-btn { min-height: 30px; padding: 0 12px; }
.ins pre { border-radius: var(--r-sm); }

/* tables, lists, bars */
.ins .i-table th { font: 600 11px var(--sans); letter-spacing: .12em; }
.ins .i-table .num { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.ins .bar { border: 0; border-radius: var(--r-pill); overflow: hidden; background: var(--bg-3); }
.ins .cg-list .k, .ins .risk-pick label, .ins .hv-dial label { font: 600 11px var(--sans); letter-spacing: .12em; }
.ins .tl-axis, .ins .hv-a0, .ins .hv-a1, .ins .hv-mark b { font-family: var(--sans); }
.ins .risk { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); padding: 18px 20px; }
.ins .i-tl li::before { border-radius: 50%; }

/* the command bar */
.ins .i-pal { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.ins .i-pal-back { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ins .i-opt .k { font: 600 10.5px var(--sans); }
.ins .i-main .i-opts { border-radius: 0 0 var(--r-md) var(--r-md); }

/* since your last visit, and the "new" mark */
.feel-since { border-radius: var(--r-md); border-left-width: 1px; }
.feel-since-k { font: 600 11px var(--sans); }
.feel-new { border-radius: var(--r-pill); padding: 0 8px; font: 600 10.5px/18px var(--sans); }

/* the record and proof pages (/r/<domain>, registry.css) */
.ins .rec .record-head { border-bottom-color: var(--line); }
.ins .rec .record-head h1 { font-weight: 700; letter-spacing: -.045em; }
.ins .rec .eyebrow, .ins .rec .meta dt, .ins .rec th, .ins .rec .algo .role, .ins .rec .algo .verdict-line, .ins .rec .seal-k { font-family: var(--sans); font-weight: 600; }
.ins .rec .eyebrow::before { border-radius: 50%; }
.ins .rec .headline { font-weight: 600; letter-spacing: -.02em; }
.ins .rec .pill { border-radius: var(--r-pill); font-family: var(--sans); font-weight: 600; padding: 4px 12px; }
.ins .rec .pill::before { border-radius: 50%; }
.ins .rec .meta { border: 0; gap: 10px; }
.ins .rec .meta dt { border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; background: var(--bg-2); }
.ins .rec .meta dd { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); background: var(--bg-2); font: 600 15px var(--sans); }
.ins .rec .btn { border-radius: var(--r-pill); font: 600 14px var(--sans); letter-spacing: 0; padding: 0 18px; min-height: 42px; }
.ins .rec .actions { font-family: var(--sans); font-size: 14px; }
.ins .rec .actions .btn:first-child { background: var(--safe); border-color: var(--safe); color: var(--safe-ink); }
.ins .rec .actions .btn:first-child:hover { filter: none; opacity: .92; }
.ins .rec .notice, .ins .rec .watch-strip { border: 1px solid var(--line); border-radius: var(--r-lg); }
.ins .rec .panel { border-radius: var(--r-lg); background: var(--bg-2); padding: 0 20px 20px; overflow: hidden; }
.ins .rec .panel > h2 { margin: 0 -20px 16px; padding: 14px 20px; font: 600 12px var(--sans); letter-spacing: .16em; }
.ins .rec .panel > h2::before { border-radius: 50%; }
.ins .rec .algo-grid { border: 0; gap: 12px; }
.ins .rec .algo { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ins .rec .algo h3 { font: 650 16px var(--sans); }
.ins .rec pre { border-radius: var(--r-sm); }
.ins .rec .seal { border-radius: var(--r-lg); border-width: 1px; border-top-width: 1px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--sc) 16%, transparent); font-family: var(--sans); }
.ins .rec .seal-v { font: 750 30px/1.05 var(--sans); }
.ins .rec .proof-status { font-weight: 700; letter-spacing: -.03em; }
.ins .rec .proof-status[data-state="safe"] { color: var(--safe); }
.ins .rec .verify-out { font-family: var(--sans); }

/* the documents (doc.css) */
.ins.doc .eyebrow, .ins.doc .doc-meta b, .ins.doc th, .ins.doc .ops-card small, .ins.doc .matrix-row strong { font-family: var(--sans); font-weight: 600; }
.ins.doc h1 { font-weight: 700; letter-spacing: -.035em; }
.ins.doc .doc-meta, .ins.doc .ops-card, .ins.doc .cta, .ins.doc .flowline, .ins.doc .notice { border-radius: var(--r-lg); }
.ins.doc .notice { border: 1px solid var(--line); }
.ins.doc .btn { border-radius: var(--r-pill); font-weight: 600; padding: 0 18px; min-height: 40px; }
.ins.doc .btn.primary { background: var(--safe); color: var(--safe-ink); border-color: var(--safe); }
.ins.doc code { border-radius: 6px; }

/* the 404 page (oops.css) */
.oopsPage .oops { border-radius: var(--r-xl); background: var(--bg-2); overflow: hidden; box-shadow: var(--shadow-1); }
.oopsPage .oopsHead { padding: 14px 20px; font: 600 12px var(--sans); letter-spacing: .16em; }
.oopsPage .oopsHead > span:first-child::before { border-radius: 50%; }
.oopsPage .oopsBody { padding: 24px 20px; }
.oopsPage .oops h1 { font-weight: 700; letter-spacing: -.035em; }
.oopsPage .oopsSuggest > span, .oopsPage .oopsSuggest small { font-family: var(--sans); }
.oopsPage .oopsBtn { border-radius: var(--r-pill); font-weight: 600; padding: 0 18px; min-height: 40px; }
.oopsPage .oopsBtn.pri { background: var(--safe); color: var(--safe-ink); border-color: var(--safe); }
