/* Nythra components — every value comes from tokens.css. Loaded after it. */
*, *::before, *::after { box-sizing: border-box; }
html:not([data-theme="light"]) { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body { margin: 0; background: var(--surface-0); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 24px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(h1, h2, h3, h4, p, figure) { margin: 0; }
::selection { background: var(--ink); color: var(--surface-0); }
:where(.hero, .h1, .h2, .h3, .h4) { color: var(--ink); }
.eyebrow { text-transform: uppercase; color: var(--ink-subtle); }
.ny-dim { color: var(--ink-subtle); }
.ny-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ny-icon { flex: none; }

/* preview helpers */
.ny-stage { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-6); }
.ny-stack { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); }
.ny-cap { font: 400 11px/16px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); }

/* Logo: inline vector, filled with currentColor (ink follows the theme; white/black force a fixed ink) */
.ny-logo { display: inline-block; flex: none; max-width: 100%; height: auto; overflow: visible; fill: currentColor; color: var(--ink); vertical-align: middle; }
.ny-logo--white { color: #fff; }
.ny-logo--black { color: #000; }

/* Kbd */
.ny-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-2); color: var(--ink-muted); font: 500 11px/1 var(--font-mono); letter-spacing: 0.02em; }

/* Button */
.ny-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-5); border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--ink); font: 500 14px/1 var(--font-sans); letter-spacing: -0.005em; white-space: nowrap; text-decoration: none; cursor: pointer; outline: none; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.ny-btn:focus-visible { box-shadow: var(--focus-ring); }
.ny-btn:active { transform: translateY(1px); }
.ny-btn[disabled], .ny-btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.ny-btn--sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: 13px; }
.ny-btn--lg { height: var(--control-lg); padding: 0 var(--space-6); font-size: 15px; }
.ny-btn--pill { border-radius: var(--radius-full); }
.ny-btn--primary { background: var(--action); color: var(--on-action); }
.ny-btn--primary:hover { background: var(--action-hover); }
.ny-btn--secondary { border-color: var(--line-strong); color: var(--ink); }
.ny-btn--secondary:hover { background: var(--surface-2); }
.ny-btn--ghost { color: var(--ink-muted); }
.ny-btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.ny-btn--accent { background: var(--accent); color: var(--on-accent); }
.ny-btn--accent:hover { background: var(--accent-hover); }
.ny-btn--link { height: auto; padding: 0; border-radius: var(--radius-xs); color: var(--ink); }
.ny-btn--link:hover { color: var(--ink-muted); }
.ny-btn--link .ny-icon { transition: transform var(--dur-fast) var(--ease-out); }
.ny-btn--link:hover .ny-icon { transform: translateX(3px); }
.ny-btn .ny-kbd { background: transparent; border-color: currentColor; color: inherit; opacity: 0.72; }
.ny-btn__spin { animation: ny-spin 0.9s linear infinite; }
@keyframes ny-spin { to { transform: rotate(360deg); } }

/* Badge */
.ny-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--space-2); border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-muted); font: 500 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.ny-badge--sans { font-family: var(--font-sans); letter-spacing: 0.02em; text-transform: none; }
.ny-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ny-badge--outline { background: transparent; border-color: var(--line-strong); }
.ny-badge--accent, .ny-badge--critical { background: var(--accent-soft); color: var(--accent); }
.ny-badge--high { background: var(--high-soft); color: var(--high); }
.ny-badge--medium { background: var(--medium-soft); color: var(--medium); }
.ny-badge--low { background: var(--low-soft); color: var(--low); }
.ny-badge--success { background: var(--high-soft); color: var(--ink); }

/* Input */
.ny-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ny-field__label { font: 500 13px/16px var(--font-sans); color: var(--ink); }
.ny-field__hint { display: flex; align-items: center; gap: 6px; font: 400 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-field__hint--error { color: var(--critical); }
.ny-input { display: flex; align-items: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-1); color: var(--ink); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.ny-input:hover { border-color: var(--ink-subtle); }
.ny-input:focus-within { border-color: var(--ink); box-shadow: var(--focus-ring); }
.ny-input--invalid, .ny-input--invalid:hover { border-color: var(--critical); }
.ny-input--disabled { opacity: 0.5; }
.ny-input--multi { align-items: flex-start; height: auto; padding: 10px var(--space-3); }
.ny-input__fx { flex: none; font: 400 13px/20px var(--font-mono); color: var(--ink-subtle); user-select: none; }
.ny-input__el { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font: 400 14px/20px var(--font-sans); resize: vertical; }
.ny-input--mono .ny-input__el { font-family: var(--font-mono); font-size: 13px; }
.ny-input__el::placeholder { color: var(--ink-subtle); opacity: 1; }

/* Card */
.ny-card { position: relative; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) 0; border-top: 1px solid var(--line-subtle); color: var(--ink); }
.ny-card--raised { padding: var(--space-6); border-top: 0; border-radius: var(--radius-lg); background: var(--surface-2); }
.ny-card--interactive { padding-inline: var(--space-4); border-radius: var(--radius-lg); cursor: pointer; transition: background var(--dur-base) var(--ease-out); }
.ny-card--interactive:hover { background: var(--surface-1); }
.ny-card--interactive:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ny-card--halo { overflow: hidden; }
.ny-card--halo::before { content: ""; position: absolute; inset: 0; background: var(--halo); pointer-events: none; }
html[data-theme="light"] .ny-card--halo::before { display: none; }
.ny-card > * { position: relative; }
.ny-card__head { display: flex; flex-direction: column; gap: var(--space-2); }
.ny-card__title { color: var(--ink); }
.ny-card__body { font: 400 14px/22px var(--font-sans); color: var(--ink-muted); }
.ny-card__foot { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--line-subtle); font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }

/* Tabs */
.ny-tabs { display: inline-flex; align-items: center; }
.ny-tab { display: inline-flex; align-items: center; gap: var(--space-2); border: 0; background: transparent; color: var(--ink-muted); font: 500 13px/1 var(--font-sans); cursor: pointer; outline: none; transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.ny-tab:hover { color: var(--ink); }
.ny-tab:focus-visible { box-shadow: var(--focus-ring); }
.ny-tab__count { font: 500 11px/1 var(--font-mono); color: var(--ink-subtle); }
.ny-tabs--segment { gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--surface-1); }
.ny-tabs--segment .ny-tab { height: 30px; padding: 0 var(--space-4); border-radius: var(--radius-full); }
.ny-tabs--segment .ny-tab[aria-selected="true"] { background: var(--surface-3); color: var(--ink); }
.ny-tabs--underline { gap: var(--space-6); border-bottom: 1px solid var(--line); }
.ny-tabs--underline .ny-tab { height: 40px; margin-bottom: -1px; border-bottom: 2px solid transparent; border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.ny-tabs--underline .ny-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Terminal */
.ny-term { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-2); color: var(--ink); font: 400 13px/20px var(--font-mono); }
.ny-term__bar { display: flex; align-items: center; gap: var(--space-3); height: 36px; padding: 0 var(--space-4); color: var(--ink-subtle); font: 500 12px/16px var(--font-mono); }
.ny-term__dots { display: none; }
.ny-term__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.ny-term__meta { margin-left: auto; }
.ny-term__body { display: flex; flex-direction: column; padding: var(--space-3) 0; overflow: auto; outline: none; }
.ny-term__body:focus-visible { box-shadow: inset var(--focus-ring); }
.ny-line { flex: none; width: 100%; min-width: max-content; display: grid; grid-template-columns: 20px 1fr; padding: 0 var(--space-4); white-space: pre; }
.ny-line--n { grid-template-columns: 32px 20px 1fr; }
.ny-line__n { padding-right: var(--space-2); text-align: right; color: var(--ink-subtle); }
.ny-line__m { color: var(--ink-subtle); user-select: none; }
.ny-line__t { color: var(--ink-muted); }
.ny-line--cmd .ny-line__t { color: var(--ink); }
.ny-line--dim .ny-line__t { color: var(--ink-subtle); }
.ny-line--ok .ny-line__t { color: var(--ink); }
.ny-line--err .ny-line__t { color: var(--critical); }
.ny-line--warn .ny-line__t { color: var(--medium); }
.ny-line--hunk .ny-line__t, .ny-line--hunk .ny-line__m { color: var(--low); }
.ny-line--add { background: var(--success-soft); }
.ny-line--add .ny-line__t { color: var(--ink); }
.ny-line--add .ny-line__m { color: var(--success); }
.ny-line--del { background: var(--critical-soft); }
.ny-line--del .ny-line__t { color: var(--ink); }
.ny-line--del .ny-line__m { color: var(--critical); }

/* Finding */
.ny-finding { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) 0; border-top: 1px solid var(--line-subtle); }
.ny-finding__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ny-finding__id { margin-right: var(--space-2); font: 500 12px/16px var(--font-mono); letter-spacing: 0.04em; color: var(--ink-muted); }
.ny-finding__summary { font: 400 14px/22px var(--font-sans); color: var(--ink-muted); }
.ny-finding__proof .ny-term { background: var(--surface-2); }
.ny-finding__foot { display: flex; align-items: center; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line-subtle); font: 500 13px/20px var(--font-sans); }
.ny-finding__status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); }
.ny-finding__status--ok { color: var(--ink); }
.ny-finding__status--alert { color: var(--critical); }
.ny-finding__status--wait { color: var(--ink-subtle); }
.ny-finding__ref { font: 400 12px/16px var(--font-mono); color: var(--ink-subtle); }

/* Steps */
.ny-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-8) var(--space-8); margin: 0; padding: 0; list-style: none; }
.ny-step { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) 0 0; border-top: 1px solid var(--line); }
.ny-step__n { display: inline-flex; font: 500 12px/16px var(--font-mono); letter-spacing: 0.06em; color: var(--ink-subtle); }
.ny-step__body { font: 400 14px/22px var(--font-sans); color: var(--ink-muted); }

/* Table */
.ny-table-wrap { position: relative; overflow: auto; }
.ny-table { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; font: 400 14px/20px var(--font-sans); color: var(--ink); }
.ny-table th, .ny-table td { padding: 14px var(--space-4); border-bottom: 1px solid var(--line-subtle); text-align: left; vertical-align: middle; }
.ny-table thead th { font: 500 11px/16px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); }
.ny-table tbody tr:last-child > * { border-bottom: 0; }
.ny-table .ny-rowhead { font-weight: 400; color: var(--ink-muted); }
.ny-table .ny-col--c { text-align: center; }
.ny-table .ny-col--hl { background: var(--surface-1); }
.ny-table th:first-child, .ny-table td:first-child { padding-left: 0; }
.ny-table thead th { border-bottom-color: var(--line); }
.ny-table thead .ny-col--hl { color: var(--ink); }
.ny-yes { display: inline-flex; color: var(--ink); }
.ny-no { display: inline-flex; color: var(--ink-subtle); }

/* Nav */
.ny-nav { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line-subtle); background: var(--surface-0); }
.ny-nav__in { display: flex; align-items: center; gap: var(--space-8); max-width: var(--content-max); height: var(--nav-h); margin: 0 auto; padding: 0 var(--space-6); }
.ny-nav__brand { display: inline-flex; align-items: center; gap: var(--space-3); border-radius: var(--radius-xs); outline: none; }
.ny-nav__brand:focus-visible { box-shadow: var(--focus-ring); }
.ny-nav__links { display: flex; align-items: center; gap: var(--space-6); }
.ny-nav__link { border-radius: var(--radius-xs); color: var(--ink-muted); font: 500 14px/20px var(--font-sans); text-decoration: none; outline: none; transition: color var(--dur-fast) var(--ease-out); }
.ny-nav__link:hover, .ny-nav__link.is-current { color: var(--ink); }
.ny-nav__link:focus-visible { box-shadow: var(--focus-ring); }
.ny-nav__actions { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ===================== product layer: the pentest console ===================== */
/* severity colour channel: --sev is consumed as text colour or fill; the severity name is always printed beside it */
.ny-sev--critical { --sev: var(--accent); --sev-fill: var(--accent); }
/* everything below critical is a neutral ramp (text = ink tones, fill = ink at falling opacity), as in Codex */
.ny-sev--high { --sev: var(--high); --sev-fill: var(--ink); }
.ny-sev--medium { --sev: var(--medium); --sev-fill: color-mix(in srgb, var(--ink) 62%, transparent); }
.ny-sev--low { --sev: var(--low); --sev-fill: color-mix(in srgb, var(--ink) 38%, transparent); }
.ny-sev--info { --sev: var(--ink-subtle); --sev-fill: color-mix(in srgb, var(--ink) 20%, transparent); }

/* layout helpers */
.ny-page { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-8) var(--space-10) var(--space-16); }
.ny-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-6); align-items: start; }
.ny-cols--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ny-cols--toc { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-10); }
.ny-cols--rail { grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-10); }
.ny-cols--risk { grid-template-columns: 340px minmax(0, 1fr); align-items: stretch; }
.ny-cols > * { min-width: 0; }
.ny-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.ny-toolbar__grow { flex: 1 1 240px; }
.ny-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.ny-section-head h2 { color: var(--ink); }
.ny-list { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.ny-page > .ny-tabs--segment { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.ny-grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4); }

.ny-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--surface-0); }
.ny-main { min-width: 0; }

/* PageHeader */
.ny-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) var(--space-6); }
.ny-pagehead__text { flex: 1 1 420px; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.ny-pagehead__eyebrow { font: 500 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-pagehead__title { font-size: 24px; line-height: 32px; letter-spacing: -0.02em; }
.ny-pagehead__desc { max-width: 46em; font: 400 14px/22px var(--font-sans); color: var(--ink-muted); }
.ny-pagehead__actions { flex: none; margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }

.ny-stat--critical .ny-stat__value { color: var(--accent); }
.ny-stat--high .ny-stat__value { color: var(--high); }
.ny-stat--success .ny-stat__value { color: var(--ink); }
.ny-meter { display: flex; flex-direction: column; gap: 6px; }
.ny-meter__row { display: flex; justify-content: space-between; font: 400 13px/16px var(--font-sans); color: var(--ink-muted); }
.ny-meter__val { font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); }
.ny-meter__track { height: 6px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.ny-meter__fill { height: 100%; border-radius: var(--radius-full); background: var(--ink); }
.ny-meter--critical .ny-meter__fill { background: var(--accent); }
.ny-meter--high .ny-meter__fill { background: var(--high); }
.ny-meter--medium .ny-meter__fill { background: var(--medium); }
.ny-meter--low .ny-meter__fill { background: var(--low); }


/* SeverityBar */
.ny-sevbar { display: flex; flex-direction: column; gap: var(--space-3); }
.ny-sevbar__bar { display: flex; gap: 2px; height: 8px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.ny-sevbar__seg { flex-basis: 0; min-width: 4px; background: var(--sev-fill, var(--sev)); }
.ny-sevbar__legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: var(--space-3); }
.ny-sevbar__item { display: flex; flex-direction: column; gap: 2px; }
.ny-sevbar__name { font: 400 12px/16px var(--font-sans); color: var(--ink-muted); }
.ny-sevbar__count { font: 500 22px/28px var(--font-sans); font-variant-numeric: tabular-nums; color: var(--sev); }
.ny-sevbar__range { font: 400 11px/16px var(--font-mono); color: var(--ink-subtle); }

/* SeverityChart: stacked columns over time */
.ny-chart { gap: var(--space-5); padding: 0; border: 0; background: transparent; }
.ny-chart__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.ny-chart__sub { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-chart__legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.ny-chart__key { display: inline-flex; align-items: center; gap: 6px; font: 400 12px/16px var(--font-sans); color: var(--ink-muted); }
.ny-chart__key::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--sev-fill, var(--sev)); }
.ny-chart__plot { display: flex; align-items: stretch; gap: var(--space-3); height: 208px; }
.ny-chart__col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.ny-chart__stack { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; border-bottom: 1px solid var(--line); }
.ny-chart__seg { display: block; min-height: 3px; border-radius: 2px; background: var(--sev-fill, var(--sev)); }
.ny-chart__x { padding-top: var(--space-2); text-align: center; font: 400 11px/16px var(--font-mono); color: var(--ink-subtle); }

/* Select, Segmented, Checkbox */
.ny-select { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.ny-select__label { font: 500 13px/16px var(--font-sans); color: var(--ink); }
.ny-select__el { appearance: none; height: var(--control-md); padding: 0 var(--space-8) 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-1); color: var(--ink); font: 400 14px/20px var(--font-sans); cursor: pointer; outline: none; transition: border-color var(--dur-fast) var(--ease-out); }
.ny-select__el:hover { border-color: var(--ink-subtle); }
.ny-select__el:focus-visible { border-color: var(--ink); box-shadow: var(--focus-ring); }
.ny-select__el:disabled { opacity: 0.5; cursor: not-allowed; }
.ny-select__chev { position: absolute; right: var(--space-3); bottom: 13px; color: var(--ink-subtle); pointer-events: none; }
.ny-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-1); }
.ny-seg__opt { height: 32px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); font: 500 13px/1 var(--font-sans); cursor: pointer; outline: none; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.ny-seg__opt:hover { color: var(--ink); }
.ny-seg__opt[aria-checked="true"] { background: var(--surface-3); color: var(--ink); }
.ny-seg__opt:focus-visible { box-shadow: var(--focus-ring); }
.ny-seg__opt[disabled] { opacity: 0.4; cursor: not-allowed; }
.ny-check { position: relative; display: flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; }
.ny-check__el { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.ny-check__box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-1); color: transparent; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.ny-check:hover .ny-check__box { border-color: var(--ink-subtle); }
.ny-check__el:checked + .ny-check__box { background: var(--action); border-color: var(--action); color: var(--on-action); }
.ny-check__el:focus-visible + .ny-check__box { box-shadow: var(--focus-ring); }
.ny-check__el:disabled + .ny-check__box { opacity: 0.4; }
.ny-check__text { display: flex; flex-direction: column; gap: 2px; }
.ny-check__label { font: 500 14px/22px var(--font-sans); color: var(--ink); }
.ny-check__hint { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }

@keyframes ny-pulse { 50% { opacity: 0.25; } }


/* CodeBlock, ReportSection, Toc */
.ny-code { overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-2); }
.ny-code__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); height: 40px; padding: 0 var(--space-2) 0 var(--space-4); border-bottom: 1px solid var(--line-subtle); background: var(--surface-1); font: 500 12px/16px var(--font-mono); color: var(--ink-subtle); }
.ny-code__copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); font: 500 12px/1 var(--font-sans); cursor: pointer; outline: none; }
.ny-code__copy:hover { background: var(--surface-3); color: var(--ink); }
.ny-code__copy:focus-visible { box-shadow: var(--focus-ring); }
.ny-code__pre { margin: 0; padding: var(--space-4); overflow: auto; font: 400 13px/20px var(--font-mono); color: var(--ink); outline: none; }
.ny-code__pre:focus-visible { box-shadow: inset var(--focus-ring); }
.ny-rsec { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) 0; border-bottom: 1px solid var(--line-subtle); scroll-margin-top: var(--space-6); }
.ny-rsec__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.ny-rsec__title { color: var(--ink); }
.ny-rsec__body { display: flex; flex-direction: column; gap: var(--space-4); font: 400 15px/26px var(--font-sans); color: var(--ink-muted); }
.ny-rsec__body ul:not(.ny-trace), .ny-rsec__body ol:not(.ny-trace) { margin: 0; padding-left: var(--space-5); }
.ny-rsec__body strong { font-weight: 500; color: var(--ink); }
.ny-toc { position: sticky; top: var(--space-6); display: flex; flex-direction: column; gap: 2px; padding-left: var(--space-4); border-left: 1px solid var(--line); }
.ny-toc .ny-cap { margin-bottom: var(--space-2); }
.ny-toc__link { padding: 4px 0; border-radius: var(--radius-xs); color: var(--ink-muted); font: 400 13px/20px var(--font-sans); text-decoration: none; outline: none; }
.ny-toc__link:hover, .ny-toc__link.is-current { color: var(--ink); }
.ny-toc__link:focus-visible { box-shadow: var(--focus-ring); }


.ny-opts { display: grid; grid-template-columns: minmax(0, 1fr) !important; gap: 0; border-top: 1px solid var(--line-subtle); }
.ny-opt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: var(--space-4) 0 var(--space-4) 32px; border: 0; border-bottom: 1px solid var(--line-subtle); border-radius: 0; background: transparent; color: var(--ink-muted); text-align: left; cursor: pointer; outline: none; transition: color var(--dur-fast) var(--ease-out); }
.ny-opt::before { content: ""; position: absolute; left: 0; top: 19px; width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 50%; }
.ny-opt:hover { color: var(--ink); }
.ny-opt:focus-visible { box-shadow: var(--focus-ring); }
.ny-opt[aria-checked="true"] { color: var(--ink); }
.ny-opt[aria-checked="true"]::before { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3.5px var(--surface-0); }
.ny-opt__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ny-opt__title { font: 500 14px/20px var(--font-sans); }
.ny-opt__meta { font: 400 11px/16px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-subtle); }
.ny-opt__desc { font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }



/* Breadcrumb */
.ny-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; padding: 0; list-style: none; font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-crumbs li { display: inline-flex; align-items: center; gap: var(--space-2); }
.ny-crumbs a { border-radius: var(--radius-xs); color: var(--ink-muted); text-decoration: none; outline: none; }
.ny-crumbs a:hover { color: var(--ink); }
.ny-crumbs a:focus-visible { box-shadow: var(--focus-ring); }
.ny-crumbs [aria-current] { color: var(--ink); }

.ny-msg--user { align-items: flex-end; }
.ny-msg--user .ny-msg__meta { flex-direction: row-reverse; }
.ny-msg--user .ny-msg__content { max-width: 80%; padding: var(--space-3) var(--space-5); border-radius: var(--radius-xl) var(--radius-xs) var(--radius-xl) var(--radius-xl); background: var(--surface-3); }
.ny-msg--bot .ny-msg__content { color: var(--ink-muted); }
.ny-msg--bot .ny-msg__content strong { font-weight: 500; color: var(--ink); }

/* EmptyState */
.ny-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-12) var(--space-6); text-align: center; }
.ny-empty__icon { display: inline-flex; color: var(--ink-subtle); }
.ny-empty__desc { max-width: 34em; font: 400 14px/22px var(--font-sans); color: var(--ink-muted); }
.ny-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-2); }

/* Pagination */
.ny-pager { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.ny-pager__info { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-pager__btns { display: flex; gap: var(--space-2); }

/* Dialog */
.ny-dlg { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: var(--space-6); background: var(--overlay); }
.ny-dlg--inline { position: absolute; }
.ny-dlg__panel { display: flex; flex-direction: column; gap: var(--space-4); width: 100%; max-width: 480px; padding: var(--space-6); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: var(--surface-1); box-shadow: var(--shadow-pop); outline: none; }
.ny-dlg__desc { font: 400 14px/22px var(--font-sans); color: var(--ink-muted); }
.ny-dlg__body { display: flex; flex-direction: column; gap: var(--space-4); }
.ny-dlg__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-3); padding-top: var(--space-2); }

/* chat layout + tab panel helpers */
.ny-panel { display: flex; flex-direction: column; gap: var(--space-8); }
.ny-chat { display: flex; flex-direction: column; height: 100vh; min-height: 560px; }
.ny-chat__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-10); border-bottom: 1px solid var(--line-subtle); }
.ny-chat__log { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-8) var(--space-10); }
.ny-chat__col { display: flex; flex-direction: column; gap: var(--space-8); }
.ny-chat__dock { padding: var(--space-4) var(--space-10) var(--space-6); border-top: 1px solid var(--line-subtle); background: var(--surface-0); }

/* ===================== Codex-style console skin ===================== */
/* Sidebar: quiet, text-first, tasks listed under the primary action */
.ny-side { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: var(--space-4); height: 100vh; padding: var(--space-4) var(--space-3); background: var(--surface-1); overflow-y: auto; }
.ny-side__brand { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3) var(--space-3); border-radius: var(--radius-sm); outline: none; }
.ny-side__brand:focus-visible { box-shadow: var(--focus-ring); }
.ny-side__action .ny-btn { width: 100%; justify-content: flex-start; }
.ny-side__search { display: flex; align-items: center; gap: var(--space-2); height: var(--control-sm); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-1); color: var(--ink-subtle); font: 400 13px/1 var(--font-sans); cursor: pointer; outline: none; }
.ny-side__search:hover { border-color: var(--line-strong); }
.ny-side__search:focus-visible { box-shadow: var(--focus-ring); }
.ny-side__searchtxt { flex: 1; text-align: left; }
.ny-side__nav { display: flex; flex-direction: column; gap: var(--space-5); min-height: 0; }
.ny-side__section { display: flex; flex-direction: column; gap: 1px; }
.ny-side__label { padding: var(--space-1) var(--space-3); font: 500 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-side__item { display: flex; align-items: center; gap: var(--space-3); height: 34px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--ink); font: 400 14px/20px var(--font-sans); text-decoration: none; outline: none; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.ny-side__item:hover { background: var(--surface-2); }
.ny-side__item.is-current { background: var(--surface-3); }
.ny-side__item:focus-visible { box-shadow: var(--focus-ring); }
.ny-side__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ny-side__badge { font: 400 12px/16px var(--font-mono); color: var(--ink-subtle); }
.ny-side__dot { flex: none; width: 8px; height: 8px; margin: 0 4px; border-radius: 50%; background: var(--ink-subtle); }
.ny-side__dot--running { background: var(--ink); animation: ny-pulse 1.4s ease-in-out infinite; }
.ny-side__dot--completed { background: var(--ink-subtle); }
.ny-side__dot--failed { background: var(--critical); }
.ny-side__foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-3); }
.ny-side__org { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-3); font: 400 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-side__orgname { font: 500 13px/20px var(--font-sans); color: var(--ink); }

/* Stat: plain numbers, no tiles */
.ny-statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-6); }
.ny-stat { display: flex; flex-direction: column; gap: 2px; }
.ny-stat__label { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-stat__value { font: 500 28px/36px var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.ny-stat__hint { font: 400 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-stat--critical .ny-stat__value { color: var(--accent); }
.ny-stat--high .ny-stat__value { color: var(--high); }
.ny-stat--success .ny-stat__value { color: var(--ink); }

/* RiskScore: flat */
.ny-risk { display: flex; flex-direction: column; gap: var(--space-3); }
.ny-risk__label { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-risk__score { display: flex; align-items: baseline; gap: var(--space-2); }
.ny-risk__num { font: 500 56px/56px var(--font-sans); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--ink); }
.ny-risk__of { font: 400 16px/24px var(--font-mono); color: var(--ink-subtle); }
.ny-risk__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.ny-risk__delta { font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }
.ny-risk__comp { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line-subtle); }
.ny-risk__note { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }

/* RunCard: a flat task row, like Codex's task list */
.ny-run { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-lg); transition: background var(--dur-fast) var(--ease-out); }
.ny-run:hover { background: var(--surface-1); }
.ny-run__ico { display: inline-flex; margin-top: 3px; color: var(--ink-subtle); }
.ny-run--running .ny-run__ico, .ny-run--running .ny-run__state { color: var(--ink); }
.ny-run--completed .ny-run__ico, .ny-run--completed .ny-run__state { color: var(--ink-muted); }
.ny-run--failed .ny-run__ico, .ny-run--failed .ny-run__state { color: var(--critical); }
.ny-run__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ny-run__name { font: 500 15px/22px var(--font-sans); letter-spacing: -0.005em; color: var(--ink); }
.ny-run__meta { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-run__state { margin-right: var(--space-2); font-weight: 500; color: var(--ink-muted); }
.ny-run__targets { font: 400 12px/18px var(--font-mono); color: var(--ink-subtle); overflow-wrap: anywhere; }
.ny-run__note { margin-top: var(--space-1); font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }
.ny-run__note span { margin-right: var(--space-2); color: var(--ink-subtle); }
.ny-run__side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.ny-run__counts { display: flex; align-items: center; gap: var(--space-3); min-height: 22px; }
.ny-count { display: inline-flex; align-items: baseline; gap: 4px; font: 500 13px/20px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--sev); }
.ny-count__k { font-size: 11px; opacity: 0.75; }
.ny-run__none { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-run__actions { display: flex; gap: var(--space-1); }

/* FindingList: hairline rows, severity as dot + word */
.ny-flist { container-type: inline-size; }
.ny-flist__row { display: grid; grid-template-columns: 76px 104px minmax(0, 1fr) minmax(0, 160px) 92px; align-items: center; gap: var(--space-4); padding: 12px var(--space-4); border-bottom: 1px solid var(--line-subtle); color: var(--ink); text-decoration: none; outline: none; }
.ny-flist__row--head { padding-top: 8px; padding-bottom: 8px; font: 500 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-flist__row.is-link { cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.ny-flist__row.is-link:hover { background: var(--surface-1); }
.ny-flist__row.is-link:focus-visible { box-shadow: inset var(--focus-ring); }
.ny-flist__id { font: 500 12px/16px var(--font-mono); color: var(--ink-subtle); }
.ny-flist__sev { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/20px var(--font-sans); color: var(--sev); }
.ny-flist__sev::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--sev-fill, var(--sev)); }
.ny-flist__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ny-flist__title { font: 500 14px/20px var(--font-sans); color: var(--ink); }
.ny-flist__meta { font: 400 12px/16px var(--font-mono); color: var(--ink-subtle); overflow-wrap: anywhere; }
.ny-flist__asset { font: 400 12px/18px var(--font-mono); color: var(--ink-muted); overflow-wrap: anywhere; }
@container (max-width: 760px) {
  .ny-flist__row { grid-template-columns: auto 1fr auto; gap: var(--space-1) var(--space-4); }
  .ny-flist__row--head { display: none; }
  .ny-flist__main { grid-column: 1 / -1; order: 4; }
  .ny-flist__asset { grid-column: 1 / -1; order: 5; }
}

/* ProjectCard: a flat row */
.ny-proj { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) 140px 150px 16px; align-items: center; gap: var(--space-6); padding: var(--space-4); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; outline: none; transition: background var(--dur-fast) var(--ease-out); }
.ny-proj:hover { background: var(--surface-1); }
.ny-proj:focus-visible { box-shadow: var(--focus-ring); }
.ny-proj__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ny-proj__name { font: 500 15px/22px var(--font-sans); color: var(--ink); }
.ny-proj__target { font: 400 12px/18px var(--font-mono); color: var(--ink-subtle); overflow-wrap: anywhere; }
.ny-proj__sev { display: flex; flex-direction: column; gap: 6px; }
.ny-proj__sev .ny-sevbar__bar { height: 6px; }
.ny-proj__nums { font: 400 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-proj__score { display: flex; align-items: baseline; gap: var(--space-2); }
.ny-proj__score .ny-risk__num { font-size: 24px; line-height: 28px; }
.ny-proj__level { font: 400 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-proj__last { display: flex; flex-direction: column; font: 400 13px/18px var(--font-sans); color: var(--ink-muted); }
.ny-proj__last span { font-size: 12px; color: var(--ink-subtle); }
.ny-proj__go { color: var(--ink-subtle); }

/* FormSection: label column + controls, hairline between groups (settings-page rhythm) */
.ny-fsec { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-4) var(--space-10); padding: var(--space-6) 0; border-top: 1px solid var(--line-subtle); }
.ny-fsec__head { display: flex; gap: var(--space-3); }
.ny-fsec__n { font: 500 12px/22px var(--font-mono); color: var(--ink-subtle); }
.ny-fsec__title { font: 500 15px/22px var(--font-sans); color: var(--ink); }
.ny-fsec__desc { margin-top: 2px; font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-fsec__body { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.ny-fsec__body > .ny-cols { gap: var(--space-4); }
.ny-sum { position: sticky; top: var(--space-6); gap: var(--space-4); }
.ny-sum__title { font: 500 14px/20px var(--font-sans); color: var(--ink); }
.ny-kv { display: flex; flex-direction: column; margin: 0; }
.ny-kv__row { display: flex; justify-content: space-between; gap: var(--space-4); padding: 10px 0; border-bottom: 1px solid var(--line-subtle); font: 400 13px/20px var(--font-sans); }
.ny-kv__row:last-child { border-bottom: 0; }
.ny-kv__row dt { color: var(--ink-subtle); }
.ny-kv__row dd { margin: 0; text-align: right; color: var(--ink); overflow-wrap: anywhere; }
.ny-kv__v--critical { color: var(--accent) !important; }
.ny-kv__v--success { color: var(--ink) !important; }
.ny-sum__list { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--line-subtle); }
.ny-sum__list ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }
.ny-sum__list li { display: flex; gap: var(--space-2); }
.ny-sum__list li::before { content: "\2192"; color: var(--ink-subtle); }
.ny-sum__actions { display: flex; flex-direction: column; gap: var(--space-2); }
.ny-sum__actions .ny-btn { width: 100%; }

/* AgentTrace: open list, hairlines only */
.ny-trace { container-type: inline-size; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ny-trace__ev { display: grid; grid-template-columns: 56px 92px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: 10px var(--space-3); border-bottom: 1px solid var(--line-subtle); border-radius: var(--radius-md); font: 400 14px/20px var(--font-sans); }
.ny-trace__ev:last-child { border-bottom: 0; }
.ny-trace__t { font: 400 12px/16px var(--font-mono); color: var(--ink-subtle); }
.ny-trace__agent { font: 400 12px/16px var(--font-mono); color: var(--ink-muted); }
.ny-trace__txt { color: var(--ink); overflow-wrap: anywhere; }
.ny-trace__st { display: inline-flex; align-items: center; gap: 6px; font: 500 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-trace__ev--running .ny-trace__st { color: var(--ink); }
.ny-trace__ev--proved .ny-trace__st { color: var(--ink); font-weight: 600; }
.ny-trace__ev--done .ny-trace__st { color: var(--ink-subtle); }
.ny-trace__ev--blocked .ny-trace__st { color: var(--ink-muted); }
.ny-trace__ev--proved { background: var(--surface-2); border-bottom-color: transparent; }

@container (max-width: 620px) {
  .ny-trace__ev { grid-template-columns: auto 1fr auto; gap: 2px var(--space-3); }
  .ny-trace__txt { grid-column: 1 / -1; order: 4; }
  .ny-trace__st { grid-column: 3; grid-row: 1; justify-self: end; }
}

/* Composer: the Codex prompt box. Text on top, pills and a round send button underneath */
.ny-composer { display: flex; flex-direction: column; gap: var(--space-3); width: 100%; }
.ny-composer__box { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-3) var(--space-3) var(--space-5); border: 1px solid transparent; border-radius: var(--radius-2xl); background: var(--surface-3); transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.ny-composer__box:focus-within { box-shadow: var(--focus-ring); }
.ny-composer__input { width: 100%; min-height: 56px; max-height: 240px; padding: 4px var(--space-2) 4px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 16px/26px var(--font-sans); resize: none; }
.ny-composer__input::placeholder { color: var(--ink-subtle); opacity: 1; }
.ny-composer__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.ny-composer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.ny-composer__send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-full); background: var(--action); color: var(--on-action); cursor: pointer; outline: none; transition: background var(--dur-fast) var(--ease-out); }
.ny-composer__send:hover { background: var(--action-hover); }
.ny-composer__send:focus-visible { box-shadow: var(--focus-ring); }
.ny-composer__send[disabled] { background: var(--surface-3); color: var(--ink-subtle); cursor: not-allowed; }
.ny-composer__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ny-chip { height: 32px; padding: 0 var(--space-4); border: 1px solid transparent; border-radius: var(--radius-full); background: var(--surface-2); color: var(--ink-muted); font: 400 13px/1 var(--font-sans); cursor: pointer; outline: none; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.ny-chip:hover { background: var(--surface-3); color: var(--ink); }
.ny-chip:focus-visible { box-shadow: var(--focus-ring); }
.ny-composer__hint { font: 400 12px/16px var(--font-sans); color: var(--ink-subtle); text-align: center; }
.ny-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-3); border: 1px solid transparent; border-radius: var(--radius-full); color: var(--ink-muted); font: 400 13px/1 var(--font-sans); cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.ny-pill:hover { background: var(--high-soft); color: var(--ink); }
.ny-pill:focus-within { box-shadow: var(--focus-ring); }
.ny-pill__chev { color: var(--ink-subtle); }
.ny-pill__el { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }

/* Messages: no avatars, no names on the assistant side beyond a quiet label */
.ny-msg { display: flex; flex-direction: column; gap: var(--space-2); max-width: 100%; }
.ny-msg__meta { display: flex; align-items: baseline; gap: var(--space-3); font: 400 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-msg__meta strong { font: 500 13px/16px var(--font-sans); color: var(--ink-muted); }
.ny-msg__content { display: flex; flex-direction: column; gap: var(--space-4); font: 400 15px/26px var(--font-sans); color: var(--ink); }
.ny-msg__content p { color: inherit; }
.ny-msg--user { align-items: flex-end; }
.ny-msg--user .ny-msg__meta { flex-direction: row-reverse; }
.ny-msg--user .ny-msg__content { max-width: 80%; padding: var(--space-3) var(--space-5); border-radius: var(--radius-xl); background: var(--surface-3); }
.ny-msg--bot .ny-msg__content { color: var(--ink-muted); }
.ny-msg--bot .ny-msg__content strong { font-weight: 500; color: var(--ink); }

/* Tabs: plain text variant (Codex home: "Tasks / Code reviews") */
.ny-tabs--plain { gap: var(--space-5); }
.ny-tabs--plain .ny-tab { height: 32px; padding: 0; border-radius: var(--radius-xs); color: var(--ink-subtle); font: 500 15px/1 var(--font-sans); }
.ny-tabs--plain .ny-tab:hover { color: var(--ink-muted); }
.ny-tabs--plain .ny-tab[aria-selected="true"] { color: var(--ink); }

/* Codex layouts: launch column, reading column, task split view, action bar */
.ny-home { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-16) var(--space-10) var(--space-16); }
.ny-home__title { text-align: left; color: var(--ink); font: 600 32px/40px var(--font-sans); letter-spacing: -0.025em; }
.ny-home__list { display: flex; flex-direction: column; gap: var(--space-4); }
.ny-home__listhead { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 0 var(--space-4); }
.ny-readcol { display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-8) var(--space-10) var(--space-16); }
.ny-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ny-task { display: flex; flex-direction: column; height: 100vh; min-height: 560px; }
.ny-task__bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding: 0 var(--space-10); border-bottom: 1px solid var(--line-subtle); }
.ny-task__title { font: 500 15px/20px var(--font-sans); color: var(--ink); }
.ny-task__sub { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-task__actions { display: flex; align-items: center; gap: var(--space-2); }
.ny-task__panes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ny-task__pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ny-task__pane + .ny-task__pane { border-left: 1px solid var(--line-subtle); }
.ny-task__scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-6); }
.ny-task__dock { flex: none; padding: var(--space-3) var(--space-6) var(--space-5); }
.ny-task__tabs { flex: none; padding: var(--space-3) var(--space-6) 0; }
.ny-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--line-subtle); background: var(--surface-0); }
.ny-bar__txt { font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }
.ny-bar__act { display: flex; gap: var(--space-2); }

/* narrow: the shell measures itself (AppShell adds .is-narrow at <= 960px, or collapseAt) so previews and embeds collapse by their own width */
.ny-shell.is-narrow { grid-template-columns: minmax(0, 1fr); }
.ny-shell.is-narrow .ny-side { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; height: auto; padding: var(--space-3) var(--space-4); border-right: 0; border-bottom: 1px solid var(--line-subtle); overflow: visible; }
.ny-shell.is-narrow .ny-side__search, .ny-shell.is-narrow .ny-side__label, .ny-shell.is-narrow .ny-side__org { display: none; }
/* phone strip: Settings stays reachable as an icon at the end of the first row */
.ny-shell.is-narrow .ny-side__foot { order: 2; margin: 0 0 0 auto; flex-direction: row; }
.ny-shell.is-narrow .ny-side__foot .ny-side__item { padding: 0 var(--space-3); }
.ny-shell.is-narrow .ny-side__foot .ny-side__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ny-shell.is-narrow .ny-side__nav { order: 3; }
.ny-shell.is-narrow .ny-side__nav { flex-direction: row; flex: 1 1 100%; min-width: 0; max-width: 100%; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; }
.ny-shell.is-narrow .ny-side__nav::-webkit-scrollbar { display: none; }
.ny-shell.is-narrow .ny-side__section + .ny-side__section { display: none; }
.ny-shell.is-narrow .ny-side__section { flex-direction: row; gap: var(--space-1); }
.ny-shell.is-narrow .ny-side__item { flex: none; }
.ny-shell.is-narrow .ny-page { padding: var(--space-6) var(--space-4) var(--space-12); }
.ny-shell.is-narrow .ny-home { padding: var(--space-10) var(--space-4) var(--space-12); }
.ny-shell.is-narrow .ny-readcol { padding: var(--space-6) var(--space-4) var(--space-12); }
.ny-shell.is-narrow .ny-cols, .ny-shell.is-narrow .ny-cols--toc, .ny-shell.is-narrow .ny-cols--rail, .ny-shell.is-narrow .ny-cols--risk, .ny-shell.is-narrow .ny-cols--even { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
.ny-shell.is-narrow .ny-sum, .ny-shell.is-narrow .ny-toc { position: static; }
.ny-shell.is-narrow .ny-toc { flex-direction: row; flex-wrap: wrap; gap: var(--space-4); padding: 0 0 var(--space-3); border-left: 0; border-bottom: 1px solid var(--line); }
.ny-shell.is-narrow .ny-toc .ny-cap { flex: 1 1 100%; margin: 0; }
.ny-shell.is-narrow .ny-opts { grid-template-columns: minmax(0, 1fr) !important; }
.ny-shell.is-narrow .ny-fsec { grid-template-columns: minmax(0, 1fr); }
.ny-shell.is-narrow .ny-run { grid-template-columns: 20px minmax(0, 1fr); }
.ny-shell.is-narrow .ny-run__side { grid-column: 2; align-items: flex-start; }
.ny-shell.is-narrow .ny-proj { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3) var(--space-4); }
.ny-shell.is-narrow .ny-proj__sev, .ny-shell.is-narrow .ny-proj__last { grid-column: 1 / -1; }
.ny-shell.is-narrow .ny-proj__go { display: none; }
.ny-shell.is-narrow .ny-task, .ny-shell.is-narrow .ny-chat { height: auto; }
.ny-shell.is-narrow .ny-task__panes { grid-template-columns: minmax(0, 1fr); }
.ny-shell.is-narrow .ny-task__bar { padding: 0 var(--space-4); }
.ny-shell.is-narrow .ny-task__pane + .ny-task__pane { border-left: 0; border-top: 1px solid var(--line-subtle); }
.ny-shell.is-narrow .ny-chat__head, .ny-shell.is-narrow .ny-chat__log, .ny-shell.is-narrow .ny-chat__dock { padding-left: var(--space-4); padding-right: var(--space-4); }
@media (prefers-reduced-motion: reduce) { .ny-side__dot--running, .ny-btn__spin { animation: none; } }
/* outside the shell (embeds, previews): stack the generic layouts on small viewports */
@media (max-width: 720px) {
  .ny-cols, .ny-cols--toc, .ny-cols--rail, .ny-cols--risk, .ny-cols--even { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .ny-sum, .ny-toc { position: static; }
  .ny-opts { grid-template-columns: minmax(0, 1fr) !important; }
  .ny-fsec { grid-template-columns: minmax(0, 1fr); }
}

.ny-tabs--plain { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ny-tabs--plain::-webkit-scrollbar { display: none; }
.ny-tabs--plain .ny-tab { flex: none; white-space: nowrap; }

.ny-home__listhead { min-width: 0; }
.ny-home__listhead > .ny-tabs { flex: 1 1 auto; min-width: 0; }
.ny-home__listhead > a, .ny-home__listhead > .ny-btn { flex: none; white-space: nowrap; }
.ny-shell.is-narrow .ny-home__listhead > a, .ny-shell.is-narrow .ny-home__listhead > .ny-btn { display: none; }
.ny-shell.is-narrow .ny-bar { flex-wrap: wrap; }

/* Nav: on phones the link row collapses and only the actions stay */
@media (max-width: 720px) {
  .ny-nav__in { gap: var(--space-4); padding: 0 var(--space-4); }
  .ny-nav__links { display: none; }
}
@media (max-width: 480px) {
  .ny-nav__actions .ny-btn--secondary { display: none; }
  .ny-nav__actions .ny-kbd { display: none; }
  .ny-nav__brand { gap: var(--space-2); min-width: 0; }
  .ny-nav__brand .ny-logo--mark { height: 24px; width: auto; }
  .ny-nav__brand .ny-logo--wordmark { height: 12px; width: auto; }
}

/* phones outside the AppShell: project rows and page headers stack */
@media (max-width: 720px) {
  .ny-proj { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3) var(--space-4); }
  .ny-proj__sev, .ny-proj__last { grid-column: 1 / -1; }
  .ny-proj__go { display: none; }
  .ny-pagehead { flex-wrap: wrap; }
}

/* one button size inside the console: 32px everywhere a page, task bar, dialog or action bar holds buttons */
.ny-pagehead__actions .ny-btn, .ny-task__actions .ny-btn, .ny-chat__head .ny-btn, .ny-bar__act .ny-btn, .ny-dlg__panel .ny-btn { height: var(--control-sm); padding: 0 var(--space-3); font-size: 13px; }

/* ---- Settings: avatar, usage meter, key/value, data list, nav, drawer ---- */
.ny-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--surface-3); color: var(--ink); font: 500 12px/1 var(--font-sans); letter-spacing: 0.02em; user-select: none; }
.ny-avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.ny-avatar--md { width: 32px; height: 32px; }
.ny-avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.ny-avatar.is-muted { background: transparent; color: var(--ink-subtle); box-shadow: inset 0 0 0 1px var(--line); }

.ny-usage { display: flex; flex-direction: column; gap: var(--space-3); }
.ny-usage__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-6); }
.ny-usage__big { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3); }
.ny-usage__num { font: 500 40px/44px var(--font-sans); letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ny-usage__unit { font: 400 14px/20px var(--font-sans); color: var(--ink-muted); }
.ny-usage__of { font: 400 13px/20px var(--font-mono); color: var(--ink-subtle); }
.ny-usage__track { display: flex; gap: 2px; height: 8px; overflow: hidden; border-radius: var(--radius-full); background: var(--surface-3); }
.ny-usage__seg { flex-grow: 0; flex-shrink: 0; min-width: 4px; }
.ny-usage__seg--1 { background: var(--ink); }
.ny-usage__seg--2 { background: color-mix(in srgb, var(--ink) 62%, transparent); }
.ny-usage__seg--3 { background: color-mix(in srgb, var(--ink) 38%, transparent); }
.ny-usage__seg--4 { background: color-mix(in srgb, var(--ink) 20%, transparent); }
.ny-usage__legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; padding: 0; list-style: none; font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }
.ny-usage__legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.ny-usage__key { width: 8px; height: 8px; border-radius: 2px; }
.ny-usage__key--free { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.ny-usage__val { font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.ny-usage__cap { margin: 0; font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-usage.is-low .ny-usage__num { color: var(--accent); }
.ny-usage.is-low .ny-usage__seg--1 { background: var(--accent); }
.ny-usage.is-low .ny-usage__seg--2 { background: color-mix(in srgb, var(--accent) 62%, transparent); }
.ny-usage.is-low .ny-usage__seg--3 { background: color-mix(in srgb, var(--accent) 38%, transparent); }
.ny-usage.is-low .ny-usage__seg--4 { background: color-mix(in srgb, var(--accent) 20%, transparent); }

.ny-defs { container-type: inline-size; margin: 0; }
.ny-defs__row { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: var(--space-4); padding: 10px 0; border-bottom: 1px solid var(--line-subtle); }
.ny-defs__row:first-child { border-top: 1px solid var(--line-subtle); }
.ny-defs dt { font: 400 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-defs dd { margin: 0; font: 400 14px/20px var(--font-sans); color: var(--ink); overflow-wrap: anywhere; }
.ny-defs dd.is-mono { font: 400 13px/20px var(--font-mono); }
@container (max-width: 420px) { .ny-defs__row { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.ny-dlist { container-type: inline-size; }
.ny-dlist__row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: var(--space-4); min-height: 56px; padding: 10px var(--space-4); border-bottom: 1px solid var(--line-subtle); color: var(--ink); outline: none; font: 400 14px/20px var(--font-sans); }
.ny-dlist__row--head { min-height: 0; padding-top: 8px; padding-bottom: 8px; font: 500 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-dlist__row.is-link { cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.ny-dlist__row.is-link:hover { background: var(--surface-1); }
.ny-dlist__row.is-link:focus-visible { box-shadow: inset var(--focus-ring); }
.ny-dlist__row.is-selected { background: var(--surface-2); }
.ny-dlist__row.is-muted .ny-dlist__cell { color: var(--ink-subtle); }
.ny-dlist__cell { min-width: 0; overflow-wrap: anywhere; }
.ny-dlist__cell.is-mono { font: 400 13px/20px var(--font-mono); color: var(--ink-muted); }
.ny-dlist__cell.is-end, .ny-dlist__row--head .is-end { display: flex; justify-content: flex-end; gap: var(--space-2); text-align: right; }
.ny-dlist__stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ny-dlist__who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.ny-dlist__title { font: 500 14px/20px var(--font-sans); color: var(--ink); }
.ny-dlist__meta { font: 400 12px/16px var(--font-mono); color: var(--ink-subtle); overflow-wrap: anywhere; }
@container (max-width: 620px) {
  .ny-dlist__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-4); }
  .ny-dlist__row--head { display: none; }
  .ny-dlist__cell.is-first { flex: 1 1 100%; }
  .ny-dlist__cell:not(.is-first)::before { content: attr(data-label) " "; color: var(--ink-subtle); font-family: var(--font-sans); font-size: 12px; }
  .ny-dlist__cell[data-label=""]::before { display: none; }
  .ny-dlist__cell.is-end { margin-left: auto; }
}

.ny-settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-10); align-items: start; }
.ny-settings__main { display: flex; flex-direction: column; min-width: 0; }
.ny-settings__main > .ny-fsec:first-child { border-top: 0; padding-top: 0; }
.ny-fsec--stack { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.ny-fsec--stack > .ny-fsec__head { flex-direction: column; gap: 2px; }
.ny-setnav { position: sticky; top: var(--space-6); display: flex; flex-direction: column; gap: 2px; }
.ny-setnav__item { display: flex; align-items: center; gap: var(--space-3); height: 34px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--ink-muted); font: 400 14px/20px var(--font-sans); text-decoration: none; outline: none; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.ny-setnav__item:hover { background: var(--surface-2); color: var(--ink); }
.ny-setnav__item.is-current { background: var(--surface-3); color: var(--ink); }
.ny-setnav__item:focus-visible { box-shadow: var(--focus-ring); }
.ny-shell.is-narrow .ny-settings { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
.ny-shell.is-narrow .ny-setnav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4); }
.ny-shell.is-narrow .ny-setnav::-webkit-scrollbar { display: none; }
.ny-shell.is-narrow .ny-setnav__item { flex: none; white-space: nowrap; }
@media (max-width: 720px) {
  .ny-settings { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .ny-setnav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .ny-setnav__item { flex: none; white-space: nowrap; }
}

.ny-note { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-2); color: var(--ink-muted); font: 400 14px/22px var(--font-sans); }
.ny-note > svg { flex: none; margin-top: 3px; color: var(--ink-subtle); }
.ny-note strong { font-weight: 500; color: var(--ink); }
.ny-note--critical > svg { color: var(--accent); }
.ny-note__body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }

.ny-drawer { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; background: var(--overlay); }
.ny-drawer--inline { position: absolute; }
.ny-drawer__panel { display: flex; flex-direction: column; width: 100%; max-width: 480px; height: 100%; border-left: 1px solid var(--line-strong); background: var(--surface-1); box-shadow: var(--shadow-pop); outline: none; }
.ny-drawer__head { flex: none; display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--line-subtle); }
.ny-drawer__titles { flex: 1; min-width: 0; }
.ny-drawer__title { margin: 0; font: 500 16px/24px var(--font-sans); color: var(--ink); overflow-wrap: anywhere; }
.ny-drawer__sub { margin: 0; font: 400 13px/20px var(--font-mono); color: var(--ink-subtle); overflow-wrap: anywhere; }
.ny-drawer__close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); cursor: pointer; }
.ny-drawer__close:hover { background: var(--surface-3); color: var(--ink); }
.ny-drawer__close:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.ny-drawer__body { flex: 1; display: flex; flex-direction: column; gap: var(--space-6); min-height: 0; overflow-y: auto; padding: var(--space-6); }
.ny-drawer__foot { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--line-subtle); }
.ny-drawer__sec { display: flex; flex-direction: column; gap: var(--space-3); }
.ny-drawer__sec > h3 { margin: 0; font: 500 13px/20px var(--font-sans); color: var(--ink-subtle); }
.ny-drawer .ny-btn { height: var(--control-sm); padding: 0 var(--space-3); font-size: 13px; }
@media (max-width: 520px) { .ny-drawer__panel { max-width: none; border-left: 0; } }

/* Auth: pre-login frame, large inputs, password rules, one-time code, QR tile, stepper, recovery codes */
.ny-btn--block { width: 100%; }
.ny-input--lg { height: var(--control-lg); padding: 0 var(--space-5); border-radius: var(--radius-full); }
.ny-input--lg .ny-input__el { font-size: 15px; line-height: 24px; }
.ny-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.ny-field__aux { color: var(--ink-muted); font: 500 13px/16px var(--font-sans); text-decoration: none; border-radius: var(--radius-xs); outline: none; }
.ny-field__aux:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ny-field__aux:focus-visible { box-shadow: var(--focus-ring); }
.ny-input__toggle { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: calc(var(--space-2) * -1); border: 0; border-radius: var(--radius-full); background: transparent; color: var(--ink-subtle); cursor: pointer; outline: none; }
.ny-input__toggle:hover { color: var(--ink); }
.ny-input__toggle:focus-visible { box-shadow: var(--focus-ring); }
.ny-input--readonly { background: var(--surface-2); }
.ny-input--readonly .ny-input__el { color: var(--ink-muted); }

.ny-auth { display: flex; flex-direction: column; min-height: 100vh; background: var(--surface-0); color: var(--ink); }
.ny-auth__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: var(--nav-h); padding: 0 var(--space-6); }
.ny-auth__brand { display: inline-flex; align-items: center; gap: var(--space-3); border-radius: var(--radius-xs); outline: none; }
.ny-auth__brand:focus-visible { box-shadow: var(--focus-ring); }
.ny-auth__help { color: var(--ink-muted); font: 400 14px/20px var(--font-sans); }
.ny-auth__main { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--space-8) var(--space-6) var(--space-16); }
.ny-auth__col { display: flex; flex-direction: column; gap: var(--space-6); width: 100%; max-width: 400px; }
.ny-auth__col--wide { max-width: 560px; }
.ny-auth__head { display: flex; flex-direction: column; gap: var(--space-3); }
.ny-auth__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: var(--space-1); border-radius: var(--radius-full); background: var(--surface-2); color: var(--ink); }
.ny-auth__icon--critical { background: var(--accent-soft); color: var(--accent); }
.ny-auth__title { margin: 0; text-wrap: balance; }
.ny-auth__desc { margin: 0; color: var(--ink-muted); font: 400 15px/24px var(--font-sans); text-wrap: pretty; }
.ny-auth__desc strong, .ny-auth__fine strong { color: var(--ink); font-weight: 500; }
.ny-auth__form { display: flex; flex-direction: column; gap: var(--space-4); margin: 0; }
.ny-auth__actions { display: flex; flex-direction: column; gap: var(--space-3); }
.ny-auth__or { display: flex; align-items: center; gap: var(--space-4); color: var(--ink-subtle); font: 400 12px/16px var(--font-sans); }
.ny-auth__or::before, .ny-auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line-subtle); }
.ny-auth__foot { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-1) var(--space-2); color: var(--ink-muted); font: 400 14px/20px var(--font-sans); text-align: center; }
.ny-auth__fine { margin: 0; color: var(--ink-subtle); font: 400 12px/18px var(--font-sans); text-align: center; }
.ny-auth__link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; border-radius: var(--radius-xs); outline: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.ny-auth__link:hover { color: var(--ink-muted); }
.ny-auth__link:focus-visible { box-shadow: var(--focus-ring); }
.ny-auth__link[disabled] { color: var(--ink-subtle); cursor: default; text-decoration: none; }
.ny-auth__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-5); padding: var(--space-6); color: var(--ink-subtle); font: 400 12px/16px var(--font-sans); }
.ny-auth__legal a { color: inherit; text-decoration: none; }
.ny-auth__legal a:hover { color: var(--ink-muted); }
.ny-auth__who { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) 0; border-block: 1px solid var(--line-subtle); }
.ny-auth__who-txt { display: flex; flex-direction: column; min-width: 0; }
.ny-auth__who-name { font: 500 15px/22px var(--font-sans); color: var(--ink); }
.ny-auth__who-sub { font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }
.ny-auth__split { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.ny-auth__split-side { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.ny-auth__key { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.ny-auth__key code { min-width: 0; overflow-wrap: anywhere; font: 400 13px/20px var(--font-mono); color: var(--ink); }
.ny-auth__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-3); counter-reset: s; }
.ny-auth__list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--space-3); color: var(--ink-muted); font: 400 14px/22px var(--font-sans); counter-increment: s; }
.ny-auth__list li::before { content: counter(s); display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border: 1px solid var(--line-strong); border-radius: var(--radius-full); color: var(--ink-subtle); font: 500 11px/1 var(--font-mono); }
.ny-auth__list strong { color: var(--ink); font-weight: 500; }
@media (max-width: 640px) {
  .ny-auth__top { padding: 0 var(--space-4); }
  .ny-auth__main { align-items: flex-start; padding: var(--space-6) var(--space-4) var(--space-12); }
  .ny-auth__split { grid-template-columns: minmax(0, 1fr); }
}

.ny-pw__rules { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-1); }
.ny-pw__meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ny-pw__seg { height: 3px; border-radius: var(--radius-full); background: var(--line); }
.ny-pw__seg.is-on { background: var(--ink-muted); }
.ny-pw__seg.is-on.is-full { background: var(--ink); }
.ny-pw__list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ny-pw__list li { display: flex; align-items: center; gap: var(--space-2); color: var(--ink-subtle); font: 400 13px/20px var(--font-sans); }
.ny-pw__list li.is-met { color: var(--ink); }

.ny-otp { display: grid; grid-template-columns: repeat(var(--otp-n, 6), minmax(0, 1fr)); gap: var(--space-2); }
.ny-otp__box { width: 100%; min-width: 0; height: 56px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-1); color: var(--ink); caret-color: var(--ink); font: 500 22px/1 var(--font-mono); text-align: center; outline: none; }
.ny-otp__box:hover { border-color: var(--ink-subtle); }
.ny-otp__box:focus { border-color: var(--ink); box-shadow: var(--focus-ring); }
.ny-otp--error .ny-otp__box, .ny-otp--error .ny-otp__box:hover { border-color: var(--critical); }
.ny-otp__box:disabled { opacity: 0.5; }

/* A QR code must keep a light ground and dark modules in every theme to stay scannable, so these two are fixed rather than themed */
.ny-qr { display: inline-block; flex: none; padding: var(--space-2); border-radius: var(--radius-lg); background: #fff; color: #000; line-height: 0; }
.ny-qr svg { display: block; fill: currentColor; }

.ny-stepper { display: flex; align-items: center; gap: var(--space-3); margin: 0; padding: 0; list-style: none; color: var(--ink-subtle); font: 500 13px/16px var(--font-sans); }
.ny-stepper__it { display: flex; align-items: center; gap: var(--space-2); }
.ny-stepper__it + .ny-stepper__it::before { content: ""; width: 24px; height: 1px; margin-right: var(--space-1); background: var(--line-strong); }
.ny-stepper__dot { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-full); font: 500 11px/1 var(--font-mono); }
.ny-stepper__it.is-current { color: var(--ink); }
.ny-stepper__it.is-current .ny-stepper__dot { border-color: var(--ink); background: var(--ink); color: var(--on-action); }
.ny-stepper__it.is-done { color: var(--ink-muted); }
.ny-stepper__it.is-done .ny-stepper__dot { border-color: var(--ink-muted); color: var(--ink); }
@media (max-width: 480px) {
  .ny-stepper__label { display: none; }
  .ny-stepper__it.is-current .ny-stepper__label { display: inline; }
}

.ny-codes { display: flex; flex-direction: column; gap: var(--space-4); }
.ny-codes__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-6); margin: 0; padding: var(--space-5); list-style: none; border-radius: var(--radius-lg); background: var(--surface-2); }
.ny-codes__code { color: var(--ink); font: 400 15px/24px var(--font-mono); letter-spacing: 0.04em; }
.ny-codes__code.is-used { color: var(--ink-subtle); text-decoration: line-through; }
.ny-codes__act { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.ny-stackv { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.ny-ml { margin-left: var(--space-2); }

/* ---- Targets: add form, picker and status badge ---- */
.ny-tbadge { gap: 6px; white-space: nowrap; }
.ny-tbadge--pending, .ny-tbadge--ztna { color: var(--ink-muted); }
.ny-tgtform { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.ny-tgtform__one, .ny-tgtform__many { display: flex; flex-direction: column; gap: var(--space-4); }
.ny-tgtform__row { display: flex; align-items: center; gap: var(--space-4); }
.ny-tgtform__switch { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--ink-muted); font: 400 13px/20px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ny-tgtform__switch:hover { color: var(--ink); }
.ny-tgtform__switch:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
.ny-tgtpick { display: flex; flex-direction: column; min-width: 0; }
.ny-tgtpick__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-bottom: var(--space-3); }
.ny-tgtpick__count { font: 400 12px/16px var(--font-sans); color: var(--ink-subtle); }
.ny-tgtpick__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--line-subtle); }
.ny-tgtpick__row .ny-check__hint { font-family: var(--font-mono); font-size: 12px; }
.ny-tgtpick__note { margin: var(--space-3) 0 0; font: 400 12px/18px var(--font-sans); color: var(--ink-subtle); }
.ny-dlist__meta--mono { font-family: var(--font-mono); font-size: 12px; }
button.ny-pill { appearance: none; background: transparent; font-family: var(--font-sans); }
.ny-tcell { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); }
.ny-sum__hint { margin: 0; font: 400 12px/18px var(--font-sans); color: var(--ink-subtle); }
.ny-drawer__text { margin: 0; font: 400 13px/20px var(--font-sans); color: var(--ink-muted); }

.ny-tgtform__line { display: flex; gap: var(--space-3); align-items: flex-start; }
.ny-tgtform__line--end { align-items: flex-end; }
.ny-tgtform__grow { flex: 1 1 0; min-width: 0; }
.ny-tgtlist { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line-subtle); }
.ny-tgtrow { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line-subtle); min-width: 0; }
.ny-tgtrow__main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.ny-tgtrow__name { font: 500 14px/20px var(--font-sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ny-tgtrow__meta { font: 400 12px/16px var(--font-mono); color: var(--ink-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- finding report: inline code, rail, reproduction steps ---- */
.ny-rsec__body code:not(.ny-code__pre code) { padding: 1px 6px; border-radius: var(--radius-xs); background: var(--surface-2); color: var(--ink); font: 400 13px/20px var(--font-mono); overflow-wrap: anywhere; }
.ny-rsec__body h3 { margin: 0; color: var(--ink); font: 500 15px/24px var(--font-sans); }
.ny-rsec__lede { color: var(--ink); font: 400 17px/28px var(--font-sans); }
.ny-rsec__label { margin-top: var(--space-2); }
.ny-rail { position: sticky; top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-8); }
.ny-rail .ny-toc { position: static; }
.ny-rail__meta { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-6); border-top: 1px solid var(--line-subtle); }
.ny-rail__meta .ny-defs__row { grid-template-columns: 84px minmax(0, 1fr); }
.ny-rail__meta .ny-defs__row:first-child { border-top: 0; }
.ny-rail__meta dd { font-size: 13px; }
.ny-refs { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ny-refs li { border-bottom: 1px solid var(--line-subtle); }
.ny-refs li:first-child { border-top: 1px solid var(--line-subtle); }
.ny-refs a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 12px 0; color: var(--ink); font: 400 14px/20px var(--font-sans); text-decoration: none; }
.ny-refs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ny-refs a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
.ny-refs__meta { color: var(--ink-subtle); font: 400 12px/16px var(--font-mono); white-space: nowrap; }
.ny-repro { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.ny-repro__step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-5) 0; border-top: 1px solid var(--line-subtle); }
.ny-repro__step:first-child { border-top: 0; padding-top: 0; }
.ny-repro__n { color: var(--ink-subtle); font: 400 13px/24px var(--font-mono); }
.ny-repro__main { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.ny-repro__title { margin: 0; color: var(--ink); font: 500 15px/24px var(--font-sans); }
.ny-repro__body, .ny-repro__expect { margin: 0; color: var(--ink-muted); font: 400 14px/24px var(--font-sans); }
.ny-repro__expect .ny-cap { display: inline-block; margin-right: var(--space-3); }
.ny-shell.is-narrow .ny-rail { position: static; order: -1; }
.ny-shell.is-narrow .ny-rail__meta { display: none; }
.ny-shell.is-narrow .ny-repro__step { grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-3); }
@media (max-width: 960px) { .ny-rail { position: static; order: -1; } .ny-rail__meta { display: none; } .ny-repro__step { grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-3); } }
.ny-mono-meta { margin: 0; color: var(--ink-subtle); font: 400 13px/20px var(--font-mono); overflow-wrap: anywhere; }
.ny-rsec__body .ny-statgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.ny-rsec__body .ny-stat__value { font-size: 24px; line-height: 32px; }
.ny-rail__meta .ny-btn { align-self: flex-start; padding-left: 0; }
.ny-repro .ny-code__pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ny-shell.is-narrow .ny-rsec__body .ny-statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .ny-rsec__body .ny-statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
