/* MaxHuman Ops: dashboard and sign-in styles. Manrope (self-hosted, as on
   maxhuman.ai), a warm grey page, one soft canvas, rounded cards with hairline
   borders, large light numerals, small uppercase labels, teal as the single
   accent. Spacing scale: 4 8 12 16 20 24 32 40. Controls are 44px tall
   (48px on the sign-in pages); inputs and buttons always share a height. */
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin-var.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin-ext-var.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --page: #e8e8e5; --canvas: #fbfbfa; --card: #f4f3f0; --white: #fff;
  --line: #e6e5e1; --line-2: #d9d8d3;
  --ink: #141414; --ink-2: #3a3a38; --muted: #8a8984; --faint: #bdbcb7;
  --teal: #0c4244; --teal-2: #145659; --teal-soft: #dce7e6; --lavender: #d5c7ff;
  --good: #1e7a55; --good-soft: #e0efe6;
  --warn: #b7791f; --warn-soft: #f5ead3;
  --bad: #c0392b; --bad-soft: #f7e0db;
  --run: #6d3fd8; --run-soft: #ebe4fb;
  --r-xl: 28px; --r-lg: 18px; --r-md: 12px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 16px 48px rgba(20, 20, 20, 0.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font-size: 14px; line-height: 1.45; background: var(--page); }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.label { font-size: 10.5px; line-height: 1; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.m0 { margin: 0; }

/* ---------------------------------------------------------------- shell */
.shell { max-width: 1520px; margin: 0 auto; padding: 20px; }
.app { background: var(--canvas); border-radius: var(--r-xl); box-shadow: var(--shadow); display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - 40px); }

.rail { position: sticky; top: 20px; align-self: start; height: calc(100vh - 40px); display: flex; flex-direction: column; gap: 40px; padding: 32px 28px 24px; }
.brandmark { display: inline-flex; color: var(--teal); }
.brandmark svg { width: 138px; height: 14px; }
.hello { display: grid; gap: 8px; }
.clock { display: flex; align-items: flex-start; gap: 8px; }
.clock .time { font-size: 32px; font-weight: 400; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.bell { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }
.greet { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.greet strong { display: block; color: var(--ink); font-weight: 600; }
.nav { display: grid; gap: 20px; }
.nav a { display: grid; gap: 4px; text-decoration: none; color: var(--faint); transition: color 0.2s; }
.nav a .t { font-size: 22px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; transition: font-size 0.2s; }
.nav a .s { font-size: 12px; font-weight: 500; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.nav a:hover { color: var(--ink-2); }
.nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"] .t { font-size: 38px; }
.nav a[aria-current="true"] .s { color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; }
.avatar.muted { background: var(--card); color: var(--ink-2); border: 1px solid var(--line); }
.me .who { min-width: 0; flex: 1; line-height: 1.25; }
.me .who strong { display: block; font-size: 13.5px; font-weight: 600; }
.me .who span { font-size: 12px; color: var(--muted); }
.linkbtn { border: 0; background: none; padding: 8px 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.linkbtn:hover { color: var(--ink); }

.main { padding: 28px 28px 56px 0; display: grid; gap: 48px; min-width: 0; align-content: start; }
section { scroll-margin-top: 28px; min-width: 0; }
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 16px; flex-wrap: wrap; }
.sec-h h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; margin: 0; line-height: 1.1; }
.sec-h .sub { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; grid-auto-flow: dense; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card.flat { background: var(--white); }
.span-2 { grid-column: span 2; } .row-2 { grid-row: span 2; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
.card-h .title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-h .title a { text-decoration: none; }
.card-h .title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 9px; line-height: 1; color: var(--ink-2); background: var(--white); white-space: nowrap; }
.tag.bad { color: var(--bad); border-color: transparent; background: var(--bad-soft); }
.tag.good { color: var(--good); border-color: transparent; background: var(--good-soft); }
.headline { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.big { font-size: 52px; font-weight: 300; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.big.sm { font-size: 40px; }
.big small { font-size: 13px; letter-spacing: 0; color: var(--muted); font-weight: 500; margin-left: 8px; }
.delta { font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; line-height: 1; white-space: nowrap; }
.delta.up { background: var(--good-soft); color: var(--good); }
.delta.down { background: var(--bad-soft); color: var(--bad); }
.delta.flat { background: var(--white); color: var(--muted); border: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.stat .v { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.nodata { color: var(--muted); font-size: 13px; line-height: 1.5; }
.latest { display: grid; gap: 6px; font-size: 12.5px; }
.latest a { color: var(--ink-2); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.latest a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* attention list */
.alist { list-style: none; margin: 0; padding: 0; display: grid; overflow: auto; max-height: 468px; margin-right: -8px; padding-right: 8px; }
.alist li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.alist li:first-child { padding-top: 0; }
.alist li:last-child { border-bottom: 0; }
.alist .ic { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--warn); }
.alist .ic.bad { background: var(--bad); }
.alist .w { font-weight: 600; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.alist .y { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 3px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.allclear { display: flex; align-items: center; gap: 10px; color: var(--good); font-weight: 600; }

/* charts (SVG, styled here so the CSP needs no inline styles) */
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: inherit; font-size: 10px; font-weight: 600; fill: var(--muted); }
.chart text.pk { fill: var(--ink); font-weight: 700; }
.chart text.val { fill: var(--ink); font-size: 15px; font-weight: 600; }
.chart text.sub { font-size: 10px; fill: var(--muted); }
.chart .hair { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .stem { stroke: var(--ink-2); stroke-width: 1.2; }
.chart .head { fill: var(--ink); }
.chart .head.zero { fill: var(--faint); }
.chart .stem.hl { stroke: var(--teal); stroke-width: 1.8; }
.chart .head.hl { fill: var(--teal); }
.chart .ring { fill: none; stroke: var(--teal); stroke-width: 1.2; }
.chart .bar-0 { fill: var(--ink); } .chart .bar-1 { fill: #7c7b76; } .chart .bar-2 { fill: #b9b8b2; } .chart .bar-3 { fill: #d6d5d0; }
.chart .s-blocked { fill: var(--warn); } .chart .s-doing { fill: var(--ink); } .chart .s-next { fill: #5d5c58; }
.chart .s-backlog { fill: #a3a29c; } .chart .s-done { fill: #d9d8d3; }
.chart .j-ok { fill: var(--ink); } .chart .j-failed { fill: var(--bad); } .chart .j-stale, .chart .j-waiting { fill: var(--warn); }
.chart .j-running { fill: var(--run); } .chart .j-idle, .chart .j-unknown { fill: none; stroke: var(--faint); stroke-width: 1.5; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 12.5px; align-content: center; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; }
.legend .sw { width: 10px; height: 10px; border-radius: 50%; }
.legend .n { font-weight: 700; font-variant-numeric: tabular-nums; }
.legend .p { color: var(--muted); font-weight: 500; margin-left: 4px; }
.sw.s-blocked { background: var(--warn); } .sw.s-doing { background: var(--ink); } .sw.s-next { background: #5d5c58; } .sw.s-backlog { background: #a3a29c; } .sw.s-done { background: #d9d8d3; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* compact job list */
.jlist { list-style: none; margin: 0; padding: 0; display: grid; }
.jlist li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.jlist li:last-child { border-bottom: 0; padding-bottom: 0; }
.jlist .ic { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.jlist .ic.st-failed { background: var(--bad); } .jlist .ic.st-stale, .jlist .ic.st-waiting { background: var(--warn); }
.jlist .ic.st-running { background: var(--run); } .jlist .ic.st-idle, .jlist .ic.st-unknown { background: none; border: 1.5px solid var(--faint); }
.jlist .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jlist .ago { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 4px 9px; line-height: 1; background: var(--white); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { color: var(--good); background: var(--good-soft); border-color: transparent; }
.chip.failed { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.chip.stale, .chip.waiting { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.chip.running { color: var(--run); background: var(--run-soft); border-color: transparent; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--teal); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #0a3638; }
.btn.ghost { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink-2); }
.btn.danger { background: var(--white); color: var(--bad); border-color: #eccac3; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.field { display: grid; gap: 8px; }
.field > label, .field .lab { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { height: 44px; width: 100%; border: 1px solid var(--line-2); background: #fafaf9; border-radius: var(--r-sm); padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
textarea.input { height: auto; min-height: 92px; padding: 11px 14px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238a8984' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12, 66, 68, 0.12); background: #fff; }
.input::placeholder { color: var(--faint); }

/* ---------------------------------------------------------------- board */
.boardbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.filters button:hover { border-color: var(--ink-2); }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.board { overflow-x: auto; padding-bottom: 8px; }
.cols { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; min-width: min-content; }
.col { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.col.drop { outline: 2px dashed var(--teal); outline-offset: -2px; }
.col h3 { font-size: 12.5px; font-weight: 700; margin: 8px 8px 4px; display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); }
.col h3 .n { font-size: 11.5px; color: var(--muted); font-weight: 600; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.kcard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 8px; cursor: grab; box-shadow: 0 1px 1px rgba(20, 20, 20, 0.02); transition: border-color 0.15s, transform 0.12s; }
.kcard:hover { border-color: var(--line-2); transform: translateY(-1px); }
.kcard .t { font-weight: 600; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.kcard .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 11.5px; color: var(--muted); align-items: center; }
.ws { font-size: 11px; font-weight: 700; color: var(--teal); background: var(--teal-soft); border-radius: 999px; padding: 3px 8px; line-height: 1.2; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.waiting { font-size: 12px; line-height: 1.4; color: var(--ink-2); background: var(--warn-soft); border-radius: 8px; padding: 7px 9px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- tables, lists */
.tablecard { padding: 6px 20px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 13px 14px 13px 0; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-top: 14px; }
tr:last-child td { border-bottom: 0; }
td.job { font-weight: 600; }
td.detail { color: var(--muted); max-width: 420px; font-size: 13px; overflow-wrap: anywhere; }
td.when, td.ago { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.twoup { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .d { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 1px; font-variant-numeric: tabular-nums; }
.timeline .d.rep { visibility: hidden; }
.timeline .x { font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.timeline .w { font-size: 12px; color: var(--muted); margin-top: 3px; }
.wslist, .team { list-style: none; margin: 0; padding: 0; display: grid; }
.wslist li, .team li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.wslist li:last-child, .team li:last-child { border-bottom: 0; }
.wslist .row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.wslist strong { font-weight: 600; font-size: 13.5px; }
.wslist .sub, .team .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.flag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 3px 8px; margin-top: 6px; }
.team li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.team .nm { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.team .nm span { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 12px 2px 0; }

/* ---------------------------------------------------------------- dialogs, toast */
dialog { border: 0; border-radius: 22px; background: var(--white); color: var(--ink); padding: 28px; width: min(480px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(20, 20, 20, 0.35); backdrop-filter: blur(2px); }
dialog form, dialog .stack { display: grid; gap: 18px; }
dialog h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
dialog p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.actions .spacer { margin-right: auto; }
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; z-index: 30; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- sign-in and setup */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth { width: min(1040px, 100%); min-height: 640px; background: var(--white); border-radius: var(--r-xl); padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; box-shadow: var(--shadow); }
.auth-art { position: relative; border-radius: 20px; overflow: hidden; padding: 28px 30px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; isolation: isolate;
  background:
    radial-gradient(55% 45% at 22% 78%, rgba(213, 199, 255, 0.95) 0%, rgba(213, 199, 255, 0) 70%),
    radial-gradient(50% 40% at 82% 88%, rgba(246, 244, 240, 0.9) 0%, rgba(246, 244, 240, 0) 70%),
    radial-gradient(70% 55% at 80% 18%, rgba(28, 110, 114, 0.9) 0%, rgba(28, 110, 114, 0) 70%),
    linear-gradient(165deg, #0c4244 0%, #0f4b4d 40%, #3f6f78 72%, #9d93cf 100%); }
.auth-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 50% 0%, rgba(12, 66, 68, 0) 40%, rgba(12, 66, 68, 0.25) 100%); }
.auth-art .wm { display: inline-flex; color: #fff; }
.auth-art .wm svg { width: 150px; height: 15px; }
.auth-art .kicker { margin: 0; font-size: 14px; font-weight: 500; opacity: 0.9; }
.auth-art .claim { margin: 10px 0 0; font-size: 32px; line-height: 1.12; font-weight: 500; letter-spacing: -0.035em; max-width: 380px; }
.auth-form { padding: 48px 56px; display: flex; align-items: center; }
.auth-inner { width: 100%; max-width: 380px; margin: 0 auto; display: grid; gap: 28px; }
.mark { width: 30px; height: 30px; color: var(--teal); }
.auth form { display: grid; gap: 24px; }
.auth h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.035em; margin: 0; line-height: 1.1; }
.auth .lede { color: var(--muted); font-size: 14.5px; margin: 10px 0 0; line-height: 1.55; }
.auth .lede strong { color: var(--ink); font-weight: 600; }
.auth .fields { display: grid; gap: 18px; }
.auth .input, .auth .btn { height: 48px; }
.auth .btn { width: 100%; font-size: 15px; }
.auth .btn:not(.ghost) { box-shadow: 0 8px 20px rgba(12, 66, 68, 0.18); }
.auth .btn:disabled { box-shadow: none; }
.btnrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.eye:hover { color: var(--ink); background: var(--card); }
.eye svg { width: 20px; height: 20px; }
.eye .off { display: none; }
.eye[aria-pressed="true"] .on { display: none; }
.eye[aria-pressed="true"] .off { display: block; }
.textlink { justify-self: center; border: 0; background: none; padding: 4px; color: var(--teal); font-weight: 600; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.err { margin: -8px 0 0; color: var(--bad); font-size: 13.5px; line-height: 1.45; }
.err:empty { display: none; }
.note { margin: 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--good-soft); color: var(--good); font-size: 13.5px; font-weight: 600; }
.progress { display: grid; gap: 10px; }
.progress .bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.progress .bars span { height: 4px; border-radius: 4px; background: var(--line); transition: background 0.2s; }
.progress .bars span.on { background: var(--teal); }
.stepno { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.rules { list-style: none; margin: -6px 0 0; padding: 0; display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.rules li { display: flex; gap: 9px; align-items: center; }
.rules li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
.rules li.ok { color: var(--good); }
.rules li.ok::before { border-color: var(--good); background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2l2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat; }
.readonly { height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.qrbox { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 18px; align-items: center; background: #fafaf9; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.qr { width: 136px; height: 136px; display: block; image-rendering: pixelated; border-radius: 8px; background: #fff; }
.qrbox .keylab { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.qrbox .key { font-size: 13.5px; font-weight: 700; letter-spacing: 0.05em; line-height: 1.6; overflow-wrap: anywhere; margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.otp { text-align: center; font-size: 24px !important; font-weight: 600; letter-spacing: 0.4em; padding-left: calc(14px + 0.4em) !important; font-variant-numeric: tabular-nums; }
.otp.rc { font-size: 18px !important; letter-spacing: 0.12em; padding-left: 14px !important; text-transform: uppercase; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; background: #fafaf9; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; font-size: 15px; font-weight: 700; letter-spacing: 0.05em; font-variant-numeric: tabular-nums; }
.codeacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; gap: 20px; padding: 24px 20px 0; }
  .hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
  .nav a { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
  .nav a .t, .nav a[aria-current="true"] .t { font-size: 13.5px; font-weight: 600; letter-spacing: 0; }
  .nav a .s { display: none; }
  .nav a[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
  .me { order: -1; margin: 0; padding: 0; border: 0; }
  .brandmark { display: none; }
  .main { padding: 24px 20px 48px; gap: 40px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-art { min-height: 180px; }
  .auth-art .claim { font-size: 24px; }
  .auth-form { padding: 32px 20px 28px; }
  .twoup { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .shell { padding: 0; }
  .app { border-radius: 0; min-height: 100vh; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; } .row-2 { grid-row: auto; }
  .big { font-size: 44px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .auth-page { padding: 0; place-items: stretch; }
  .auth { border-radius: 0; min-height: 100vh; align-content: start; }
  .qrbox { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
}
.nav { scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.auth .qrbox .btn { width: auto; }
