/* ProofDesk product UI — .ux-profile.md: Stripe reference, WCAG 2.1 AA, warm です・ます voice, Lucide icons.
   Calm long-session workspace: one quiet accent, borders before shadows, status never by colour alone. */
@font-face { font-family: "PD Noto Sans JP"; src: url("/assets/fonts/NotoSansJP-Regular.ttf") format("truetype"); font-display: swap; }
:root {
  --paper: #f5f6f4; --panel: #ffffff; --sunk: #f0f2ef; --ink: #17231f; --ink-2: #33423d; --muted: #56645f; --line: #dbe2de; --line-strong: #b7c3bd; --field-line: #7f8d88;
  --brand: #0d5c4d; --brand-strong: #094538; --brand-soft: #e5efeb; --brand-tint: #f2f7f5;
  --ok: #1d6f46; --ok-bg: #edf6f0; --ng: #b42318; --ng-bg: #fdf1ef; --warn: #8a5a00; --warn-bg: #fbf5e7; --info: #2f5b86; --info-bg: #eff4f9; --neutral: #56645f;
  --gate: #6b4f00; --gate-bg: #fff7df; --gate-line: #e7cf8c;
  --font: "Yu Gothic UI", "Hiragino Sans", "Meiryo", "PD Noto Sans JP", system-ui, sans-serif;
  --mono: "BIZ UDGothic", "Cascadia Mono", "Consolas", "PD Noto Sans JP", monospace;
  --r: 8px; --r-sm: 6px; --row: 36px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --dur-fast: 120ms; --dur: 200ms; --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-overlay: 0 1px 2px rgba(23, 35, 31, .06), 0 18px 48px -16px rgba(23, 35, 31, .28);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.i { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.i-lg { width: 20px; height: 20px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
h1 { font-size: 22px; line-height: 1.4; margin: 0; font-weight: 700; letter-spacing: .005em; }
h2 { font-size: 16px; line-height: 1.5; margin: 0 0 var(--s3); font-weight: 700; }
h3 { font-size: 14px; margin: 0 0 var(--s2); font-weight: 700; }
p { margin: 0 0 var(--s2); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--panel); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto 1fr; height: 100vh; }
.shell.nav-collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.side { grid-row: 1 / span 2; background: #10201b; color: #d7e3de; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; min-height: 60px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.side nav { padding: 4px 8px; }
.side .section { color: #8fa69d; font-size: 12px; padding: 14px 10px 6px; }
.navlink { display: flex; align-items: center; gap: 10px; color: #cfdcd7; text-decoration: none; padding: 8px 10px; border-radius: 6px; min-height: 40px; position: relative; }
.navlink:hover { background: #1b302a; color: #fff; }
.navlink[aria-current=page] { background: #21403a; color: #fff; }
.navlink[aria-current=page]::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: #7fd1b3; }
.navlink .step { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #5f7a71; display: grid; place-items: center; font-size: 11.5px; flex: none; font-weight: 700; }
.navlink.done .step { background: #2e6b58; border-color: #2e6b58; color: #fff; }
.navlink[aria-disabled=true] { opacity: .45; pointer-events: none; }
.side .foot { margin-top: auto; padding: 12px 16px 16px; border-top: 1px solid #22372f; font-size: 12.5px; color: #9fb4ab; }
.side .foot button { background: none; border: 0; color: #cfdcd7; padding: 6px 0; cursor: pointer; display: flex; gap: 8px; align-items: center; min-height: 36px; }
.nav-collapsed .side .label, .nav-collapsed .side .section, .nav-collapsed .side .foot .label { display: none; }
.nav-collapsed .navlink { justify-content: center; }

.topbar { background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s5); min-height: 56px; }
.context { display: flex; align-items: center; gap: var(--s5); min-width: 0; flex: 1; }
.ctx { display: flex; flex-direction: column; min-width: 0; }
.ctx b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28ch; }
.ctx span { font-size: 11.5px; color: var(--muted); }
.lic { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.view { overflow: auto; min-width: 0; }
.view:focus { outline: none; }
.pane .tabs button { padding: 8px 9px; font-size: 13px; }
.pane.right > .ph .btn.small { display: none; }
.page { max-width: 1240px; margin: 0 auto; padding: var(--s5) var(--s5) 64px; }
.page.wide { max-width: none; padding: var(--s4) var(--s5) var(--s4); height: 100%; display: flex; flex-direction: column; }
.pagehead { display: flex; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s4); flex-wrap: wrap; }
.pagehead .titles { flex: 1; min-width: 240px; }
.pagehead .lede { color: var(--muted); margin: 4px 0 0; max-width: 72ch; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- controls */
.btn { appearance: none; border: 1px solid var(--line-strong); background: var(--panel); border-radius: var(--r-sm); padding: 6px 14px; min-height: 36px;
  font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; color: var(--ink);
  white-space: nowrap; }
.btn:hover { background: var(--sunk); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.danger { color: var(--ng); border-color: #e2b8b2; }
.btn.danger.solid { background: var(--ng); color: #fff; border-color: var(--ng); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sunk); }
.btn.icon { padding: 0; width: 36px; justify-content: center; }
.btn .kbd, kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--panel); color: var(--muted); }
.field { margin-bottom: var(--s4); }
.field > label, .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .basis { color: var(--info); font-size: 12px; margin-top: 4px; display: flex; gap: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--field-line); border-radius: var(--r-sm); background: #fff; padding: 7px 10px; min-height: 36px; font-size: 13.5px; }
textarea { min-height: 84px; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 160px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--ng); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s4); }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 var(--s4); }
.search { position: relative; flex: 1; max-width: 360px; }
.search .i { position: absolute; left: 10px; top: 10px; color: var(--muted); }
.search input { padding-left: 32px; }
.toolbar select, .pagehead select { width: auto; max-width: 440px; }
.toolbar { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin-bottom: var(--s3); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s3); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 6px 2px 10px; font-size: 12.5px; background: var(--panel); }
.chip button { border: 0; background: none; cursor: pointer; padding: 2px; display: grid; place-items: center; border-radius: 50%; }

/* ---------------------------------------------------------------- surfaces */
.frame { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.frame + .frame { margin-top: var(--s4); }
.frame > .hd { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.frame > .hd h2 { margin: 0; font-size: 14.5px; flex: 1; }
.frame > .bd { padding: var(--s4); }
.section-gap { height: var(--s4); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #f8faf9; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.data th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
table.data th button:focus-visible { outline: 2px solid var(--brand); }
table.data td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--brand-tint); }
table.data tr.click td:first-child a { font-weight: 600; }
.scroll { overflow: auto; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: var(--s2) var(--s4); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.empty { padding: var(--s6) var(--s4); text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 15px; }
.empty .actions { justify-content: center; margin-top: var(--s3); }
.kv { display: grid; grid-template-columns: minmax(8em, max-content) 1fr; gap: 6px var(--s4); margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); }
.metric { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: var(--panel); }
.metric .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric .n { color: var(--muted); font-size: 12px; }
.metric .f { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.notice { display: flex; gap: 10px; border: 1px solid; border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: var(--s3); font-size: 13px; }
.notice .i { margin-top: 2px; }
.notice.warn { background: var(--warn-bg); border-color: #ead7a6; color: #5b3d00; }
.notice.error { background: var(--ng-bg); border-color: #efc3bd; color: #7a1a11; }
.notice.info { background: var(--info-bg); border-color: #c8d7e7; color: #20405f; }
.notice.ok { background: var(--ok-bg); border-color: #bfdccb; color: #134b30; }
.notice .actions { margin-top: 8px; }
pre.log, pre.code { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.6 var(--mono); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; max-height: 420px; overflow: auto; }
pre.code .ln { color: #8a9893; user-select: none; display: inline-block; width: 3.5em; }
pre.code .hit { background: #e8f4ee; } pre.code .miss { background: #fdecea; }
details.fold > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* status — icon + text, never colour alone */
.st { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.st.pass, .st.ok { color: var(--ok); } .st.fail, .st.ng, .st.unstable { color: var(--ng); }
.st.blocked, .st.inconclusive, .st.warn { color: var(--warn); } .st.not_run, .st.cancelled, .st.interrupted, .st.excluded, .st.neutral { color: var(--neutral); }
.st.info, .st.running { color: var(--info); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; color: var(--ink-2); background: var(--panel); white-space: nowrap; }
.tag.est { border-style: dashed; color: var(--info); }
.tag.ai { border-color: #c9b6e4; color: #5b3b8c; }

/* ---------------------------------------------------------------- gate rail (signature element) */
.rail { display: flex; align-items: stretch; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: var(--s4); }
.rail .stg { flex: 1; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; position: relative; min-width: 0; border-right: 1px solid var(--line); }
.rail .stg:last-child { border-right: 0; }
.rail .stg .t { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.rail .stg .v { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.rail .stg.current { background: var(--info-bg); }
.rail .stg.gate { flex: 0 0 auto; min-width: 168px; background: var(--gate-bg); border-left: 2px solid var(--gate-line); border-right: 2px solid var(--gate-line); }
.rail .stg.gate.open { background: var(--ok-bg); border-color: #a9d3bb; }
.rail .stg.gate.closed .v { color: var(--ng); }
.rail .stg.gate.open .v { color: var(--ok); }
.rail .stg.skipped .v { color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- split pane */
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--left, 300px) 6px minmax(0, 1fr) 6px var(--right, 340px); gap: 0; }
.split.no-right { grid-template-columns: var(--left, 300px) 6px minmax(0, 1fr) 0 0; }
.split.no-left { grid-template-columns: 0 0 minmax(0, 1fr) 6px var(--right, 340px); }
.split.no-left.no-right { grid-template-columns: 0 0 minmax(0, 1fr) 0 0; }
.pane { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.split.no-left > .pane.left, .split.no-right > .pane.right { display: none; }
.pane > .ph { display: flex; align-items: center; gap: var(--s2); padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); min-height: 44px; }
.pane > .ph h2 { margin: 0; font-size: 13.5px; flex: 1; }
.pane > .pb { overflow: auto; flex: 1; min-height: 0; }
.pane > .pb.pad { padding: var(--s4); }
.gutter { cursor: col-resize; position: relative; }
.gutter::after { content: ""; position: absolute; left: 2px; top: 30%; bottom: 30%; width: 2px; border-radius: 2px; background: transparent; }
.gutter:hover::after, .gutter:focus-visible::after { background: var(--line-strong); }
.list { list-style: none; margin: 0; padding: 4px; }
.list li { border-radius: 6px; }
.list button.item { all: unset; box-sizing: border-box; display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; width: 100%; padding: 8px 10px; border-radius: 6px; cursor: pointer; min-height: 44px; }
.list button.item:hover { background: var(--sunk); }
.list button.item[aria-selected=true] { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.list button.item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.list .item .ttl { font-weight: 600; font-size: 13px; grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item .meta { font-size: 12px; color: var(--muted); grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item .lead { grid-row: 1 / span 2; align-self: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.list .item .tail { grid-row: 1 / span 2; grid-column: 3; align-self: center; }
.list .group { font-size: 11.5px; color: var(--muted); padding: 10px 10px 4px; font-weight: 600; }
.tree { font-family: var(--mono); font-size: 12.5px; }
.tree .dir { color: var(--muted); padding: 3px 10px; }

/* compare */
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 0; font: 12px/1.55 var(--mono); }
.diff .col { overflow: auto; border-right: 1px solid var(--line); }
.diff .col:last-child { border-right: 0; }
.diff .hdr { position: sticky; top: 0; background: #f8faf9; border-bottom: 1px solid var(--line); padding: 6px 10px; font-family: var(--font); font-size: 12px; color: var(--muted); }
.diff .l { display: grid; grid-template-columns: 3.2em 1fr; white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 8px 0 0; min-height: 1.55em; }
.diff .l .n { color: #8a9893; text-align: right; padding-right: 8px; user-select: none; }
.diff .l.del { background: #fdecea; } .diff .l.add { background: #e8f4ee; } .diff .l.pad { background: repeating-linear-gradient(45deg, #f6f7f5, #f6f7f5 4px, #fff 4px, #fff 8px); }
.diff .l .n.del::after { content: " −"; } .diff .l .n.add::after { content: " +"; }

/* overlays */
.backdrop { position: fixed; inset: 0; background: rgba(16, 32, 27, .38); z-index: 40; opacity: 0; transition: opacity var(--dur) var(--ease); }
.backdrop.show { opacity: 1; }
.dialog { position: fixed; z-index: 41; left: 50%; top: 18vh; transform: translate(-50%, 6px); width: min(520px, calc(100vw - 32px)); background: var(--panel); border-radius: var(--r);
  box-shadow: var(--shadow-overlay); border: 1px solid var(--line); opacity: 0; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.dialog.show { opacity: 1; transform: translate(-50%, 0); }
.dialog .dh { padding: var(--s4) var(--s5) 0; } .dialog .db { padding: var(--s3) var(--s5); } .dialog .df { padding: var(--s3) var(--s5) var(--s4); display: flex; gap: 8px; justify-content: flex-end; }
.sheet { position: fixed; z-index: 41; right: 0; top: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); box-shadow: var(--shadow-overlay); display: flex; flex-direction: column;
  transform: translateX(16px); opacity: 0; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.sheet.show { transform: none; opacity: 1; }
.sheet .sh { display: flex; align-items: center; gap: 8px; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.sheet .sh h2 { margin: 0; flex: 1; font-size: 16px; }
.sheet .sb { padding: var(--s5); overflow: auto; flex: 1; }
.sheet .sf { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #17231f; color: #fff; border-radius: var(--r-sm); padding: 10px 14px; box-shadow: var(--shadow-overlay); display: flex; gap: 10px; align-items: flex-start; max-width: 420px; font-size: 13px;
  animation: toast-in var(--dur) var(--ease); }
.toast.error { background: #6e1a12; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: var(--s5); text-align: center; background: var(--brand-tint); }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .actions { justify-content: center; margin-top: var(--s3); }
.spin { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sticky-foot { position: sticky; bottom: 0; background: linear-gradient(to top, var(--paper) 70%, rgba(245, 246, 244, 0)); padding: var(--s3) 0 var(--s2); display: flex; gap: 8px; justify-content: flex-end; }
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s5); }
.settings nav { position: sticky; top: var(--s4); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.settings nav a { padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); min-height: 36px; }
.settings nav a:hover { background: var(--sunk); }
.settings section { margin-bottom: var(--s6); scroll-margin-top: var(--s4); }
.danger-zone { border: 1px solid #efc3bd; border-radius: var(--r); padding: var(--s4); background: #fffafa; }
.graph { overflow: auto; background: #fbfcfb; border-top: 1px solid var(--line); }
.graph svg { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s6) var(--s5); }
.auth .brandline { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin-bottom: var(--s5); }
.auth .brandline svg { width: 30px; height: 30px; }
.auth h1 { margin-bottom: var(--s5); }
.bar { height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; }
.tabs button { all: unset; cursor: pointer; padding: 10px 14px; border-bottom: 2px solid transparent; font-weight: 600; font-size: 13.5px; color: var(--muted); white-space: nowrap; scroll-snap-align: start; min-height: 24px; }
.tabs button[aria-selected=true] { color: var(--ink); border-color: var(--brand); }
.tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.cnt { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-left: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
@media (max-width: 1100px) {
  .split { grid-template-columns: var(--left, 260px) 6px minmax(0, 1fr) 0 0; }
  .split > .pane.right, .split > .gutter.gr { display: none; }
  .split.show-right { grid-template-columns: 0 0 minmax(0, 1fr) 6px minmax(280px, 40%); }
  .split.show-right > .pane.left, .split.show-right > .gutter.gl { display: none; }
  .split.show-right > .pane.right, .split.show-right > .gutter.gr { display: flex; }
  .pane.right > .ph .btn.small { display: inline-flex; }
}
@media (max-width: 760px) {
  .shell, .shell.nav-collapsed { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .side { grid-row: auto; flex-direction: row; overflow-x: auto; height: auto; }
  .side .brand { min-height: 48px; padding: 8px 12px; }
  .side .brand .label, .side .section, .side .foot { display: none; }
  .side nav { display: flex; padding: 4px; }
  .navlink { white-space: nowrap; }
  .navlink .label { display: none; }
  .topbar { padding: 8px 16px; flex-wrap: wrap; }
  .context { gap: var(--s3); flex-wrap: wrap; }
  .page, .page.wide { padding: var(--s4) 16px 48px; }
  .row2, .row3, .settings { grid-template-columns: minmax(0, 1fr); }
  .settings nav { position: static; flex-direction: row; overflow-x: auto; }
  .split, .split.no-right, .split.show-right { grid-template-columns: 1fr; grid-template-rows: auto; }
  .split > .gutter { display: none !important; }
  .split > .pane.left { max-height: 40vh; }
  .split > .pane.right { display: flex; }
  .page.wide { height: auto; display: block; }
  .split { display: flex; flex-direction: column; gap: 12px; }
  .pane > .pb { overflow: visible; }
  .split > .pane.left .pb { max-height: 40vh; overflow: auto; }
  .pane.right > .ph .btn.small { display: none !important; }
  .scroll > table.data { min-width: 640px; }
  .metric .v { font-size: 17px; }
  .diff { grid-template-columns: 1fr; }
  .rail { flex-direction: column; }
  .rail .stg { border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .stg.gate { border-left: 0; border-right: 0; border-top: 2px solid var(--gate-line); border-bottom: 2px solid var(--gate-line); }
}
.field-error:empty { display: none; } .field-error { color: #b42318; font-size: 13px; margin-top: 4px; }
input[aria-invalid=true], textarea[aria-invalid=true], select[aria-invalid=true] { border-color: #b42318; }
@media (max-width: 760px) { .kbd-hint { display: none; } }
.u-gap { margin-top: var(--s4); }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-bottom: var(--s4); }
.meter > span { display: block; height: 100%; background: var(--brand); }

/* notices may carry an action; let it wrap inside the box instead of overflowing it */
.notice > div { min-width: 0; }
.notice .btn { white-space: normal; text-align: left; height: auto; min-height: 32px; margin-top: 8px; }
.ctx span { white-space: nowrap; }
@media (max-width: 760px) { .topbar .context { flex-wrap: wrap; row-gap: 6px; column-gap: 16px; } }
@media (max-width: 760px) { .settings nav a { white-space: nowrap; flex: none; } }

/* ---------------------------------------------------------------- web edition: account chip, save state, access key, page records */
.acct { display: flex; align-items: center; gap: var(--s4); flex: none; }
.save { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.save.ok .i { color: var(--ok); }
.save.error { color: var(--ng); font-weight: 600; }
.save.error button { margin-left: 4px; }
.lic { text-decoration: none; white-space: nowrap; min-height: 32px; }
.lic:hover { color: var(--ink); }
.h3 { font-size: 14px; margin: 0 0 var(--s2); }
.keybox { display: block; padding: var(--s3) var(--s4); margin: 4px 0 var(--s2); background: var(--brand-tint); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: 15px; line-height: 1.7; letter-spacing: .04em; word-break: break-all; user-select: all; color: var(--ink); }
.auth.wide { display: block; place-items: initial; padding: 0; }
.auth.wide .page { max-width: 1100px; margin: 0 auto; }
.record-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.record { display: block; width: 100%; height: 420px; border: 0; border-bottom: 1px solid var(--line); background: #fff; }
.record-wrap > .actions { padding: var(--s2) var(--s3); justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 760px) {
  .acct { width: 100%; justify-content: space-between; gap: var(--s3); }
  .record { height: 320px; }
}
table.data .mono, table.data .num { white-space: nowrap; }
