/* 新爱算 OpenWrt 镜像中心 — XAS green on white, grey and black. */
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --green: #19AB4A;
  --green-ink: #0B7A33;
  --green-wash: #E9F6EE;
  --black: #000;
  --ink: #2B2B2B;
  --steel: #6B6B6B;
  --mist: #A8A8A8;
  --rule: #DADADA;
  --line: #EBEBEB;
  --canvas: #F2F2F2;
  --white: #FFF;
  --font: "Barlow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --r-panel: 6px;
  --r-control: 4px;
  --r-led: 1px;
  --rail: 220px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/1.6 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--green-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--black); margin: 0; font-weight: 600; line-height: 1.3; }
h1 { font-size: 26px; letter-spacing: -0.01em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 8px; }
dl, dd { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
::selection { background: var(--green-wash); }
[hidden] { display: none !important; }

/* boot */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--steel); }
.boot-leds, .leds { display: flex; gap: 6px; }
.boot-leds i, .leds i { width: 12px; height: 12px; border-radius: var(--r-led); background: var(--rule); }
.boot-leds i { animation: led 1.2s infinite; }
.boot-leds i:nth-child(2) { animation-delay: .1s } .boot-leds i:nth-child(3) { animation-delay: .2s } .boot-leds i:nth-child(4) { animation-delay: .3s } .boot-leds i:nth-child(5) { animation-delay: .4s } .boot-leds i:nth-child(6) { animation-delay: .5s }
@keyframes led { 0%, 100% { background: var(--rule); } 40% { background: var(--green); } }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); background: var(--white); }
.login-side { background: var(--canvas); border-right: 1px solid var(--rule); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-side .rack { display: grid; gap: 10px; max-width: 420px; margin: 40px 0; }
.rack-unit { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 14px; height: 44px; padding: 0 16px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-control); }
.rack-unit b { font-weight: 600; color: var(--black); font-size: 14px; }
.rack-unit span { font-size: 12px; color: var(--steel); }
.rack-unit .led { width: 12px; height: 12px; }
.login-side .rack .rack-unit:nth-child(1) .led { animation: lit 0.4s .15s both; }
.login-side .rack .rack-unit:nth-child(2) .led { animation: lit 0.4s .45s both; }
.login-side .rack .rack-unit:nth-child(3) .led { animation: lit 0.4s .75s both; }
@keyframes lit { from { background: var(--rule); } to { background: var(--green); } }
.login-side h1 { font-size: 34px; font-weight: 700; max-width: 12em; }
.login-side .lead { color: var(--steel); max-width: 30em; margin-top: 12px; }
.login-main { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-main form { display: grid; gap: 16px; }
.login-main .brand { margin-bottom: 36px; }
.login-note { margin-top: 18px; font-size: 12.5px; color: var(--steel); }
.version-tag { font-size: 12px; color: var(--mist); }

/* brand */
.brand { display: flex; align-items: center; gap: 10px; color: var(--black); }
.brand:hover { text-decoration: none; }
.mark { width: 36px; height: 36px; border-radius: var(--r-control); background: var(--green); color: var(--white); display: grid; place-items: center; font: 700 13px/1 var(--font); letter-spacing: .02em; flex: none; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text b { font-size: 15px; font-weight: 700; }
.brand-text small { font-size: 12px; color: var(--steel); }

/* shell */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--white); border-right: 1px solid var(--rule); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.rail .brand { padding: 20px 18px 18px; border-bottom: 1px solid var(--line); }
.nav { padding: 10px 10px; display: grid; gap: 2px; overflow-y: auto; flex: 1; align-content: start; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-control); color: var(--ink); font-size: 14px; }
.nav a:hover { background: var(--canvas); text-decoration: none; }
.nav a.on { background: var(--green-wash); color: var(--black); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }
.nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.nav svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }
.rail-foot { border-top: 1px solid var(--line); padding: 14px 18px; font-size: 12.5px; color: var(--steel); display: grid; gap: 6px; }
.rail-foot .who { color: var(--black); font-weight: 600; font-size: 13.5px; }
.rail-foot .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.topbar { display: none; }
/* The content area follows the window width (no fixed maximum): lists, tables and
   forms use all the space next to the rail. */
.content { padding: 28px 32px 56px; width: 100%; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--steel); margin-top: 4px; }
.node-banner { background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--green); border-radius: var(--r-control); padding: 8px 12px; margin-bottom: 16px; font-size: 13px; color: var(--steel); }
.node-banner b { color: var(--black); font-weight: 600; }

/* panels */
.panel { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-panel); }
.panel + .panel, .panel + .grid, .grid + .panel, .stack > * + * { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 15px; }
.panel-head .hint { font-size: 12.5px; color: var(--steel); }
.panel-body { padding: 16px 18px; }
.panel-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.grid > .panel { margin-top: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.grid.aside { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
/* side-by-side forms keep their save bar at the bottom edge */
.grid > form.panel { display: flex; flex-direction: column; }
.grid > form.panel > .panel-body { flex: 1; }
.muted { color: var(--steel); }
.small { font-size: 12.5px; }
.empty { padding: 32px 18px; text-align: center; color: var(--steel); }
.empty b { display: block; color: var(--black); font-weight: 600; margin-bottom: 4px; font-size: 15px; }

/* LEDs */
.led { display: inline-block; width: 9px; height: 9px; border-radius: var(--r-led); background: var(--white); border: 1.5px solid var(--mist); flex: none; vertical-align: middle; }
.led.ok { background: var(--green); border-color: var(--green); }
.led.run { background: var(--green); border-color: var(--green); animation: blink 1.1s steps(2, start) infinite; }
.led.bad { background: var(--black); border-color: var(--black); }
.led.wait { background: var(--white); border-color: var(--green); }
@keyframes blink { 50% { background: var(--white); } }
.status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 500; color: var(--black); }
.status.quiet { color: var(--steel); font-weight: 400; }
/* a status sentence (not a one-word state) wraps on narrow screens */
.status.wrap { white-space: normal; align-items: flex-start; }
.status.wrap .led { margin-top: 6px; }

/* the build line: six rack segments */
.line { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.seg { position: relative; border: 1px solid var(--rule); border-radius: var(--r-control); background: var(--white); padding: 10px 10px 9px; min-height: 74px; display: grid; align-content: space-between; gap: 6px; }
.seg .n { font-size: 11.5px; color: var(--steel); display: flex; align-items: center; justify-content: space-between; }
.seg .n .led { width: 10px; height: 10px; }
.seg .t { font-size: 13px; color: var(--black); font-weight: 500; line-height: 1.35; }
.seg .d { font-size: 12px; color: var(--steel); }
.seg.done { border-color: var(--green); background: var(--green-wash); }
.seg.current { border: 2px solid var(--green); padding: 9px 9px 8px; }
.seg.failed { background: var(--black); border-color: var(--black); }
.seg.failed .t, .seg.failed .n, .seg.failed .d { color: var(--white); }
.seg.failed .led { border-color: var(--white); background: var(--black); }
.hero { padding: 20px 22px 22px; }
.hero-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.hero-title { font-size: 28px; font-weight: 700; color: var(--black); line-height: 1.15; }
.hero-meta { display: flex; gap: 20px; flex-wrap: wrap; color: var(--steel); font-size: 13px; margin-top: 6px; }
.hero-meta b { color: var(--black); font-weight: 600; }
.clock { font-size: 34px; font-weight: 600; color: var(--black); line-height: 1; letter-spacing: -0.01em; text-align: right; }
.clock small { display: block; font-size: 12px; font-weight: 400; color: var(--steel); letter-spacing: 0; margin-top: 6px; }
.idle { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.idle .line .seg { min-height: 54px; }

/* readout strip */
/* Dividers are drawn on each cell's left and top edge and clipped by the frame, so
   the lines stay correct for any number of columns. */
.readout { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-panel); overflow: hidden; }
.readout > div { padding: 12px 16px; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); }
.readout dt { font-size: 12px; color: var(--steel); }
.readout dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; color: var(--black); display: flex; align-items: center; gap: 8px; }
.readout dd small { font-size: 12px; font-weight: 400; color: var(--steel); }

/* notices */
.notices { display: grid; gap: 8px; }
.notice { background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--black); border-radius: var(--r-control); padding: 9px 12px; font-size: 13px; color: var(--black); }
.notice.ok { border-left-color: var(--green); }
.notice.soft { border-left-color: var(--mist); color: var(--ink); }
.problems { margin: 6px 0 0; padding-left: 18px; }
.problems li { margin: 2px 0; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; font-weight: 500; color: var(--steel); background: #FAFAFA; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: #FAFAFA; }
td.num, th.num { text-align: right; }
td .sub, .cell-sub { display: block; font-size: 12px; color: var(--steel); }
td.actions { text-align: right; white-space: nowrap; }
td.actions > * + * { margin-left: 6px; }
td.nowrap { white-space: nowrap; }
.strong { color: var(--black); font-weight: 600; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-control); border: 1px solid var(--rule); background: var(--white); color: var(--black); font: 500 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--mist); text-decoration: none; }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--white); }
.btn.primary:hover { background: #15983F; border-color: #15983F; }
.btn.dark { background: var(--black); border-color: var(--black); color: var(--white); }
.btn.danger { color: var(--black); border-color: var(--black); }
.btn.danger:hover { background: var(--black); color: var(--white); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--green-ink); padding: 0 8px; }
.btn.ghost:hover { background: var(--green-wash); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.field { display: grid; gap: 5px; align-content: start; }
.field > span { font-size: 12.5px; color: var(--steel); font-weight: 500; }
.field > span b { color: var(--black); font-weight: 600; }
.field small { font-size: 12px; color: var(--steel); }
/* an input with a helper button beside it */
.field .with-action { display: flex; gap: 8px; }
.field .with-action input { flex: 1; min-width: 0; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--black); box-shadow: inset 3px 0 0 var(--black); }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--r-control); background: var(--white); color: var(--black); font: 400 14px/1.4 var(--font);
}
textarea { height: auto; min-height: 96px; padding: 8px 10px; font-family: var(--mono); font-size: 12.5px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
input[readonly] { background: var(--canvas); color: var(--steel); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
fieldset { border: 0; margin: 0; padding: 0; }
.section { padding: 18px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section > h3 { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section > h3 small { font-weight: 400; color: var(--steel); font-size: 12.5px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 8px 0; }
.check input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--green); flex: none; }
.check b { color: var(--black); font-weight: 500; display: block; }
.check span { font-size: 12.5px; color: var(--steel); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.choice { border: 1px solid var(--rule); border-radius: var(--r-control); padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; align-content: start; background: var(--white); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { color: var(--black); font-weight: 600; font-size: 13.5px; }
.choice span { font-size: 12px; color: var(--steel); }
.choice:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--green-wash); }
.choice:has(input:focus-visible) { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: #FAFAFA; border-radius: 0 0 var(--r-panel) var(--r-panel); flex-wrap: wrap; }
.form-foot > :last-child { margin-left: auto; }
/* long forms keep the save bar in reach */
.form-foot.sticky { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -1px 0 var(--line); }

/* chips / tabs */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--rule); background: var(--white); color: var(--ink); font: 500 13px/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { border-color: var(--black); background: var(--black); color: var(--white); }
.chip small { font-weight: 400; opacity: .7; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--steel); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--black); text-decoration: none; }
.tabs a.on { color: var(--black); border-bottom-color: var(--green); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 3px; font-size: 11.5px; font-weight: 600; background: var(--canvas); color: var(--ink); white-space: nowrap; }
.tag.green { background: var(--green-wash); color: var(--green-ink); }
.tag.black { background: var(--black); color: var(--white); }

/* downloads */
.dl-group { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-panel); }
.dl-group + .dl-group { margin-top: 16px; }
.dl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dl-head h2 { font-size: 18px; }
.dl-head .meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--steel); margin-top: 4px; }
.dl-head .meta b { color: var(--black); font-weight: 600; }
.files { display: grid; }
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.file:last-child { border-bottom: 0; }
.file .label { color: var(--black); font-weight: 600; }
.file .name { font-size: 12px; color: var(--steel); word-break: break-all; }
.file .size { font-size: 13px; color: var(--steel); text-align: right; white-space: nowrap; }
.hash { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--steel); background: transparent; border: 0; padding: 0; cursor: pointer; }
.hash:hover { color: var(--green-ink); }
.hash svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.hash .full { display: none; }
.older { padding: 4px 0; }
.older summary { padding: 10px 18px; cursor: pointer; color: var(--green-ink); font-weight: 500; list-style: none; }
.older summary::-webkit-details-marker { display: none; }

/* log */
.log { background: #0F0F0F; color: #D8D8D8; font: 12px/1.55 var(--mono); padding: 12px 14px; max-height: 460px; overflow: auto; white-space: pre-wrap; word-break: break-all; border-radius: 0 0 var(--r-panel) var(--r-panel); margin: 0; }
.log .err { color: #fff; background: #3a3a3a; }
.log .stage { color: #6fd58f; }
.report { background: var(--canvas); border-radius: var(--r-control); padding: 12px; font: 12px/1.55 var(--mono); white-space: pre-wrap; max-height: 360px; overflow: auto; margin: 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; font-size: 13.5px; }
.kv dt { color: var(--steel); }
.kv dd { margin: 0; color: var(--black); word-break: break-word; }
.bar { height: 8px; background: var(--canvas); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); }
.bar.full > i { background: var(--black); }

/* dialogs & toasts */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .38); display: grid; place-items: center; padding: 16px; z-index: 50; }
.dialog { background: var(--white); border-radius: var(--r-panel); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 18px 60px rgba(0, 0, 0, .25); }
.dialog.wide { width: min(860px, 100%); }
.dialog-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-body { padding: 16px 18px; overflow: auto; display: grid; gap: 14px; }
.dialog-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #FAFAFA; border-radius: 0 0 var(--r-panel) var(--r-panel); }
.x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--steel); cursor: pointer; padding: 2px 6px; }
.secret { font-family: var(--mono); font-size: 13px; background: var(--canvas); border: 1px dashed var(--mist); padding: 10px 12px; border-radius: var(--r-control); word-break: break-all; color: var(--black); user-select: all; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: var(--black); color: var(--white); padding: 10px 14px; border-radius: var(--r-control); font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); display: flex; gap: 10px; align-items: flex-start; }
.toast.ok::before { content: ""; width: 9px; height: 9px; background: var(--green); margin-top: 6px; flex: none; border-radius: var(--r-led); }
.toast.err { background: var(--white); color: var(--black); border: 2px solid var(--black); }
.spin { width: 14px; height: 14px; border: 2px solid var(--rule); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--steel); }

/* responsive */
/* Wide windows: a little more breathing room, and the full SHA256 where there is space. */
@media (min-width: 1600px) {
  .content { padding: 32px 40px 64px; }
  .hash .short { display: none; }
  .hash .full { display: inline; }
}
@media (max-width: 1100px) {
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.split, .grid.aside { grid-template-columns: minmax(0, 1fr); }
  .readout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 40; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .shell.menu-open .rail { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30; }
  .topbar .menu { border: 1px solid var(--rule); background: var(--white); border-radius: var(--r-control); height: 34px; width: 38px; display: grid; place-items: center; cursor: pointer; }
  .topbar .menu svg { width: 18px; height: 18px; stroke: var(--black); fill: none; stroke-width: 1.8; }
  .content { padding: 18px 16px 48px; }
  .grid.two, .grid.three, .form-grid, .form-grid.three { grid-template-columns: minmax(0, 1fr); }
  .line { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-side { display: none; }
  .login-main { padding: 40px 20px; }
  .idle { grid-template-columns: minmax(0, 1fr); }
  .hero-title { font-size: 22px; }
  .clock { text-align: left; font-size: 28px; }
  .file { grid-template-columns: minmax(0, 1fr) auto; }
  .file .size { display: none; }
  table.responsive thead { display: none; }
  table.responsive tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px 14px; border-bottom: 1px solid var(--line); gap: 2px 12px; }
  table.responsive td { border: 0; padding: 0; }
  table.responsive td[data-label]:not(.lead-cell)::before { content: attr(data-label) "："; color: var(--steel); font-size: 12px; }
  table.responsive td.lead-cell { grid-column: 1 / -1; }
  table.responsive td.actions { grid-column: 1 / -1; text-align: left; padding-top: 6px; white-space: normal; }
  table.responsive td.actions > * { margin: 4px 6px 0 0; }
  .section > h3 { display: block; }
  .section > h3 small { display: block; margin-top: 4px; }
}
@media (max-width: 520px) {
  .line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { font-size: 22px; }
  .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-foot > .muted { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* app shell additions */
.main-wrap { min-width: 0; display: flex; flex-direction: column; }
#view:focus { outline: none; }
.kv .sub, .readout .sub { display: block; font-size: 12px; color: var(--steel); }
.choice[aria-disabled="true"] { cursor: not-allowed; background: var(--canvas); }
.choice[aria-disabled="true"] b { color: var(--steel); }
.choice[aria-disabled="true"] .strong { color: var(--black); font-size: 12px; }
.login-note code { white-space: nowrap; }
#view > * + * { margin-top: 16px; }
