/* Rootcastle platform: one stylesheet for site, portal and admin. Brand tokens match rootcastle.com (REQ-PF-002).
   CSP forbids inline styles, so every visual rule lives here. */
:root {
  --ink: #0b0d10;
  --ink-2: #3a4049;
  --ink-3: #6b7380;
  --paper: #ffffff;
  --paper-2: #f5f6f8;
  --line: #dfe2e7;
  --blue: #0e3d8a;
  --blue-2: #0a2d66;
  --green: #228b55;
  --red: #b42318;
  --amber: #9a6700;
  --radius: 6px;
  --shell: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--paper-2); min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1.mono { font-size: 1.45rem; }
img, svg { max-width: 100%; height: auto; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 6px 10px; z-index: 10; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Header */
.top { background: #000; color: #fff; }
.top .shell { display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand span { color: #8fb3ef; font-weight: 500; margin-left: 6px; }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; flex: 1; }
.nav a { color: #d6dbe3; text-decoration: none; font-size: .93rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--green); }
.top form { margin: 0; }
.top .who { color: #aab2bf; font-size: .85rem; }
.linkbtn { background: none; border: 0; color: #d6dbe3; cursor: pointer; font: inherit; font-size: .9rem; padding: 0; text-decoration: underline; }

main { padding: 28px 0 56px; }
.foot { border-top: 1px solid var(--line); background: var(--paper); color: var(--ink-3); font-size: .85rem; padding: 20px 0; }
.foot .shell { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Surfaces */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 20px; }
.grid > .panel { margin-bottom: 0; }
.grid { margin-bottom: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead h1 { margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.stat { display: block; text-decoration: none; color: inherit; }
.stat b { display: block; font-size: 2rem; line-height: 1.1; color: var(--blue); }

/* Tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--paper); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; background: var(--paper-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
dl.facts + p, dl.facts + .prose { margin-top: 14px; }

/* Status chips */
.chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.chip-new, .chip-sent, .chip-received { border-color: #b9c9e8; background: #eef3fb; color: var(--blue); }
.chip-won, .chip-valid, .chip-accepted, .chip-published, .chip-completed, .chip-attended { border-color: #b6dcc7; background: #edf7f1; color: var(--green); }
.chip-lost, .chip-revoked, .chip-declined, .chip-spam, .chip-cancelled, .chip-not_found { border-color: #f1c4bf; background: #fdf1f0; color: var(--red); }
.chip-expired, .chip-draft, .chip-archived { border-color: #ecd9a8; background: #fdf8ec; color: var(--amber); }

/* Forms */
form.stack > * + * { margin-top: 14px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.hint { display: block; font-weight: 400; color: var(--ink-3); font-size: .82rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--paper); border: 1px solid #c4c9d1; border-radius: var(--radius); padding: 8px 10px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 2px solid rgba(14, 61, 138, .18); outline-offset: 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > input, .inline > select { width: auto; flex: 1 1 160px; }
.btn { display: inline-block; font: inherit; font-weight: 600; font-size: .92rem; border-radius: var(--radius); padding: 8px 14px; border: 1px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: var(--blue-2); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--blue); }
.btn-ghost:hover { background: #eef3fb; color: var(--blue-2); }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-green:hover { background: #1b7046; }
.btn-danger { background: var(--paper); color: var(--red); border-color: #e3a29b; }
.btn-danger:hover { background: #fdf1f0; color: var(--red); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

/* Messages */
.flash { border: 1px solid #b6dcc7; background: #edf7f1; color: #14532d; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 20px; }
.errors { border: 1px solid #f1c4bf; background: #fdf1f0; color: #7a1a12; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 20px; }
.errors ul { margin: 0; padding-left: 18px; }
.notice { border: 1px solid #ecd9a8; background: #fdf8ec; color: #5c3d00; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 20px; }
.secret { font-family: var(--mono); background: var(--paper-2); border: 1px dashed #9aa3b0; padding: 10px 12px; border-radius: var(--radius); overflow-wrap: anywhere; user-select: all; }
.codes { columns: 2; font-family: var(--mono); padding-left: 20px; }

/* Auth screens */
.authbox { max-width: 440px; margin: 40px auto; }
.qr { background: #fff; padding: 12px; border: 1px solid var(--line); display: inline-block; border-radius: var(--radius); }
.qr svg { display: block; width: 200px; height: 200px; }

/* Catalogue */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 1.02rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--blue); }
.card .meta { font-size: .82rem; color: var(--ink-3); }
.card .price { margin-top: auto; font-weight: 700; }
.thumb { aspect-ratio: 4 / 3; background: var(--paper-2); border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: .85rem; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters a { text-decoration: none; border: 1px solid var(--line); background: var(--paper); padding: 4px 10px; border-radius: 999px; font-size: .88rem; color: var(--ink-2); }
.filters a[aria-current="true"] { border-color: var(--blue); color: var(--blue); background: #eef3fb; }
.specs th { width: 40%; text-transform: none; letter-spacing: 0; font-size: .9rem; }
.prose { max-width: 72ch; }
.prose p:last-child { margin-bottom: 0; }
.hero { background: #000; color: #fff; padding: 40px 0; margin: -28px 0 28px; }
.hero p { color: #c9d1dc; max-width: 64ch; }
.hero a.btn-ghost { background: transparent; color: #fff; border-color: #6c7a90; }

/* Verification */
.verify { max-width: 640px; margin: 0 auto; }
.verdict { font-size: 1.4rem; font-weight: 700; margin: 0 0 12px; }
.verdict-valid { color: var(--green); }
.verdict-revoked, .verdict-not_found { color: var(--red); }
.verdict-expired { color: var(--amber); }

/* Assessment */
.question { border-top: 1px solid var(--line); padding: 16px 0; }
.question:first-of-type { border-top: 0; }
.question p { white-space: pre-line; }
.result-pass { color: var(--green); }
.result-fail { color: var(--red); }

/* Printable documents (quote, certificate) */
.doc { background: #fff; max-width: 820px; margin: 24px auto; padding: 40px; border: 1px solid var(--line); }
.doc header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; border-bottom: 3px solid #000; padding-bottom: 16px; margin-bottom: 24px; }
.doc .mark { font-weight: 800; letter-spacing: .06em; font-size: 1.15rem; }
.doc .mark small { display: block; font-weight: 500; letter-spacing: 0; color: var(--ink-3); font-size: .8rem; }
.cert { text-align: center; }
.cert h1 { font-size: 2rem; margin: 18px 0 6px; }
.cert .holder { font-size: 1.7rem; font-weight: 700; margin: 18px 0; border-bottom: 1px solid var(--line); display: inline-block; padding: 0 24px 6px; }
.cert .scope { color: var(--ink-2); max-width: 60ch; margin: 16px auto; font-size: .92rem; }
.cert footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 32px; text-align: left; font-size: .85rem; }
.cert .qr svg { width: 120px; height: 120px; }
.noprint { text-align: center; margin: 16px; }
/* Printed documents carry the company logo (documents/_brand). */
.doc .mark { display: grid; gap: 2px; text-align: left; }
.doc .mark-logo { position: relative; display: block; width: 190px; height: 62px; overflow: hidden; }
.doc .mark-logo img { position: absolute; top: -66px; left: 0; width: 190px; height: 190px; max-width: none; }
.doc .mark small { color: var(--ink-3); font-size: .78rem; letter-spacing: .02em; }
.doc-meta { text-align: right; }
.doc-meta h1 { margin: 0 0 4px; font-size: 1.5rem; }
.doc-meta p { margin: 0; }
/* Work report (A4 portrait) */
.report .report-title { margin: 0 0 14px; font-size: 1.25rem; }
.report-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0 0 20px; }
.report-facts div { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.report-facts dt { color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.report-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.report h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; margin: 20px 0 6px; color: var(--ink-2); }
.report section p { margin: 0; white-space: pre-line; }
.report table.measure { width: 100%; border-collapse: collapse; font-size: .88rem; }
.report table.measure th, .report table.measure td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; }
.bars { display: grid; gap: 2px; width: 120px; }
.bars i { display: block; height: 5px; width: var(--b); background: #b9c4d0; }
.bars i.after { background: var(--green); }
.result-pass { color: var(--green); }
.result-conditional { color: var(--amber); }
.result-fail { color: var(--red); }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 36px 0 8px; }
.signs div { border-top: 1px solid #000; padding-top: 6px; font-size: .85rem; min-height: 56px; }
.report footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; }
.report footer .qr { display: grid; justify-items: center; gap: 4px; }
.report footer .qr svg { width: 104px; height: 104px; }
.report.is-draft { background-image: repeating-linear-gradient(-35deg, transparent 0 120px, rgba(200, 40, 40, .05) 120px 160px); }
.measure-input input { min-width: 0; width: 100%; }
@media (max-width: 640px) { .report-facts { grid-template-columns: 1fr; } }
@media print {
  body { background: #fff; }
  .noprint, .top, .foot { display: none !important; }
  .doc { border: 0; margin: 0; max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  @page { size: A4; margin: 14mm; }
}

/* Public platform pages (products, quote basket, verification, customer portal) share rootcastle.com's header,
   navigation, footer and type so they read as part of the main site. Values mirror src/styles on the site. */
body.site { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f5f7fa; color: #0b0d10; }
body.site main { padding: 40px 0 80px; }
body.site .shell { max-width: 1232px; padding: 0 24px; }
body.site h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 400; line-height: 1.05; letter-spacing: -.045em; margin-bottom: .5em; }
body.site h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 400; letter-spacing: -.03em; }
body.site h3 { font-weight: 600; }
body.site .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 18px; border-radius: 8px; font-weight: 650; }
body.site .card, body.site .panel { border-radius: 12px; }
body.site input, body.site select, body.site textarea { border-radius: 8px; }
.site-top { background: #fff; border-bottom: 1px solid #dce1e7; }
.site-top__inner { min-height: 86px; display: grid; grid-template-columns: 200px 1fr auto; align-items: center; gap: 24px; }
.site-brand { display: block; width: 190px; height: 62px; overflow: hidden; position: relative; background: #fff; border-radius: 2px; }
.site-brand img { position: absolute; top: -66px; left: 0; width: 190px; height: 190px; max-width: none; }
.site-dock { justify-self: center; display: flex; align-items: center; gap: 3px; padding: 6px; border: 1px solid #dde4eb; border-radius: 15px; background: #f8fafc; box-shadow: 0 5px 18px #1830470a; }
.site-dock__item { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 10px; border-radius: 10px; color: #526274; font-size: .76rem; font-weight: 650; white-space: nowrap; text-decoration: none; }
.site-dock__item svg { flex: none; }
.site-dock__item:hover, .site-dock__item[aria-current="page"] { background: #e6effa; color: #0e3d8a; }
.site-dock__item:focus-visible { outline: 2px solid #0e3d8a; outline-offset: 2px; }
.site-menu { display: none; position: relative; }
.site-menu summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 650; padding: 10px 12px; border: 1px solid #d8e0e8; border-radius: 10px; background: #fff; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu nav { position: absolute; right: 0; top: 48px; z-index: 20; width: min(300px, calc(100vw - 32px)); display: grid; gap: 2px; padding: 12px; background: #fff; border: 1px solid #dce1e7; border-radius: 14px; box-shadow: 0 20px 50px #0b162224; }
.site-menu nav a { padding: 10px 12px; border-radius: 8px; color: #17212c; text-decoration: none; }
.site-menu nav a:hover { background: #e6effa; color: #0e3d8a; }
.site-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; min-height: 50px; border-top: 1px solid #eef1f4; }
.site-sub__nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.site-sub__nav a { display: inline-flex; align-items: center; gap: 6px; padding: 13px 0; color: #59616b; font-size: .88rem; text-decoration: none; border-bottom: 2px solid transparent; }
.site-sub__nav a:hover, .site-sub__nav a[aria-current="page"] { color: #0b0d10; border-bottom-color: #1767d2; }
.site-sub__count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #0e3d8a; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; }
.site-sub__who { display: flex; align-items: center; gap: 12px; font-size: .85rem; }
.site-sub__who form { margin: 0; }
.site-sub__who .who { color: #59616b; }
.site-sub__who .linkbtn { color: #0e3d8a; }
.site-foot { background: #000; color: #fff; }
.site-foot__top { min-height: 220px; display: grid; grid-template-columns: 200px 1fr auto; align-items: center; gap: 48px; }
.site-foot__top p { max-width: 620px; margin: 0; color: #aab1bb; line-height: 1.55; }
.site-brand--foot { flex: none; }
.site-foot__cta { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 18px; background: #fff; color: #0b0d10; font-weight: 700; text-decoration: none; }
.site-foot__cta:hover { background: #e6effa; color: #0e3d8a; }
body.site .site-foot__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; padding: 1.2rem 24px; border-top: 1px solid #242a32; color: #777f89; font-size: 12px; }
.site-foot__bottom a { color: inherit; text-decoration: none; }
.site-foot__bottom a:hover { color: #cce5ff; }
body.site .site-foot__trust { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 20px; padding: 6px 24px 26px; }
.seobility-badge { display: block; width: 88px; height: 88px; overflow: hidden; border-radius: 12px; background: #fff; opacity: .92; }
.seobility-badge:hover, .seobility-badge:focus-visible { opacity: 1; }
.seobility-badge img { display: block; width: 100%; height: 100%; }
.etbis-badge, .cert-badge { display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border: 1px solid currentColor; border-radius: 999px; color: #fff; font-size: .84rem; text-decoration: none; opacity: .86; }
.etbis-badge:hover, .etbis-badge:focus-visible, a.cert-badge:hover, a.cert-badge:focus-visible { opacity: 1; color: #fff; }
@media (max-width: 1180px) {
  .site-dock { display: none; }
  .site-menu { display: block; justify-self: end; }
  .site-top__inner { grid-template-columns: 1fr auto; }
}
@media (max-width: 760px) {
  body.site .site-foot__top { grid-template-columns: 1fr; gap: 24px; padding: 56px 24px; }
  body.site .site-foot__bottom { flex-direction: column; align-items: flex-start; }
  body.site main { padding-top: 28px; }
}
@media print { .site-top, .site-foot { display: none !important; } }

/* Customer sign-in and portal. */
body.site .eyebrow { display: inline-block; margin: 0 0 12px; color: #1767d2; font: 700 11px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.btn-block { width: 100%; }
.btn-small { min-height: 36px !important; padding: 6px 12px !important; font-size: .84rem; }
.field-error { margin: 6px 0 0; color: var(--red); font-size: .85rem; }
input[aria-invalid="true"] { border-color: var(--red); }
.password-field { position: relative; }
.password-field input { padding-right: 76px; }
.password-field__toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); min-height: 32px; padding: 4px 10px; border: 0; border-radius: 6px; background: #eef3fb; color: var(--blue); font: inherit; font-size: .8rem; font-weight: 650; cursor: pointer; }
.password-field__toggle:hover { background: #e0eaf8; }
.portal-auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 440px); gap: clamp(28px, 5vw, 72px); align-items: start; margin: 12px 0 24px; }
.portal-auth__lead { max-width: 560px; color: var(--ink-2); font-size: 1.05rem; line-height: 1.6; }
.portal-features { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.portal-features li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.portal-features strong { display: block; margin-bottom: 2px; }
.portal-features span { color: var(--ink-3); font-size: .92rem; line-height: 1.5; }
.portal-features__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #e6effa; color: var(--blue); }
.portal-features__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.site .portal-auth__card { padding: 28px; border-radius: 16px; box-shadow: 0 18px 50px #0b16220d; }
.portal-auth__card h2 { margin-bottom: 18px; }
.portal-auth__help { margin-top: 20px; border-top: 1px solid var(--line); }
.portal-auth__help details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.portal-auth__help summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.portal-auth__help p { margin: 10px 0 2px; color: var(--ink-2); font-size: .9rem; }
.portal-auth__secure { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; color: var(--ink-3); font-size: .82rem; }
.portal-auth__secure svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.portal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.portal-head h1 { margin-bottom: .2em; }
.portal-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.portal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.portal-stat { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; }
.portal-stat:hover { border-color: #b9c9e8; color: var(--ink); }
.portal-stat__value { font-size: 2rem; line-height: 1; letter-spacing: -.03em; }
.portal-stat__label { color: var(--ink-3); font-size: .86rem; }
.portal-stat--attention { border-color: #b9c9e8; background: #eef3fb; }
.portal-stat--attention .portal-stat__value { color: var(--blue); }
.portal-attention { border-color: #b9c9e8; }
.portal-attention__list { list-style: none; margin: 0; padding: 0; }
.portal-attention__list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.portal-empty { margin: 0; color: var(--ink-3); }
.portal-certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.portal-cert { display: grid; gap: 6px; justify-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); }
.portal-help { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.portal-help > div { display: grid; gap: 4px; }
@media (max-width: 860px) {
  .portal-auth { grid-template-columns: 1fr; }
  .portal-auth__card { order: -1; }
  .portal-features { margin-top: 20px; }
  .portal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
body.site td .mono { white-space: nowrap; }
@media (min-width: 1181px) and (max-width: 1380px) { .site-dock__item span { display: none; } .site-dock__item { padding: 8px 11px; } }
