/*
 * 3306 ID — one stylesheet for every page the identity host renders.
 * Rules and reasons live in docs/3306-id-design.md. Short version: the same
 * black / paper / 1px-rule language as 3306.ai, square corners, no shadows,
 * and the accent colour only on the brand dot and the focus ring.
 *
 * Fixed Chinese headings use one same-origin 900-weight WOFF2 subset.
 */
@font-face {
  font-family: "3306 ID Serif";
  src: url("/id-assets/fonts/id-serif-900.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  unicode-range: U+3000-303F, U+3400-9FFF, U+FF01-FF60;
}
:lang(zh):is(h1, h2, h3, .num, .wm) {
  font-family: "3306 ID Serif", var(--serif);
  font-weight: 900;
}
:root {
  color-scheme: light;
  --ink: #0a0a0a;
  --paper: #fff;
  --black: #000;
  --grey: #555;
  --soft: #d9d9d9;
  --line: rgba(255, 255, 255, 0.18);
  --dim: #a9a9a9;
  --faint: #8a8a8a;
  --accent: #485bfb;
  --warn: #ffd54a;
  --bad: #b42318;
  --pad: clamp(16px, 3.2vw, 44px);
  --latin: Charter, "Bitstream Charter", Cambria, "Noto Serif";
  --cjk: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", "Microsoft YaHei",
    "PingFang SC";
  --serif: var(--latin), var(--cjk), serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
:lang(zh) {
  --cjk: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", "Microsoft YaHei",
    "PingFang SC";
}
:lang(zh-Hant) {
  --cjk: "Songti TC", "Noto Serif CJK TC", "Source Han Serif TC", "Microsoft JhengHei", "PingFang TC";
}
/* Japanese and Korean: serifs that really have a heavy cut first (Noto/Source Han Black, Hiragino
   Mincho W6, Yu Mincho Demibold, Nanum Myeongjo ExtraBold). Without one, fall to a heavy gothic
   (Hiragino Sans W9, Apple SD Gothic Neo Heavy) rather than a light Mincho such as AppleMyungjo. */
:lang(ja) {
  --cjk: "Noto Serif CJK JP", "Source Han Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "Hiragino Sans",
    "Yu Gothic", Meiryo;
}
:lang(ko) {
  --cjk: "Noto Serif CJK KR", "Source Han Serif KR", "Nanum Myeongjo", "Apple SD Gothic Neo", "Malgun Gothic";
}
/* --serif is recomputed wherever a language is declared, so a Chinese app name on a Korean page
   (<bdi lang="zh">) is set in the Chinese face, whole, instead of borrowing glyphs. */
:root,
[lang] {
  --serif: var(--latin), var(--cjk), serif;
}
bdi[lang],
dd[lang],
span[lang] {
  font-family: var(--serif);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--serif);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1;
  min-width: 0;
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p,
dd {
  overflow-wrap: anywhere;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  text-wrap: balance;
  word-break: keep-all;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mono,
code,
pre,
time {
  font-family: var(--mono);
}
[hidden] {
  display: none !important;
}

/* ── top bar and footer ─────────────────────────────────────────── */
.top,
footer {
  background: var(--black);
  color: var(--paper);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.top {
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex: none;
}
.logo {
  width: 24px;
  height: 24px;
}
.wm {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.idtag {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  padding: 4px 4px 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.top nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  font: 12.5px/1.3 var(--mono);
  min-width: 0;
}
.top nav a,
footer a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
}
.top nav a:hover,
footer a:hover {
  color: var(--paper);
  text-decoration: underline;
}
details.lang {
  position: relative;
}
details.lang summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 11px;
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}
details.lang summary::-webkit-details-marker {
  display: none;
}
details.lang summary::after {
  content: "+";
  margin-left: 9px;
  color: var(--faint);
}
details.lang[open] summary::after {
  content: "–";
}
details.lang[open] summary,
details.lang summary:hover {
  border-color: var(--paper);
}
details.lang div {
  position: absolute;
  z-index: 5;
  right: 0;
  top: calc(100% + 6px);
  min-width: 148px;
  background: var(--black);
  border: 1px solid var(--paper);
}
details.lang div a {
  display: block;
  padding: 10px 14px;
}
details.lang div a + a {
  border-top: 1px solid var(--line);
}
details.lang div a:hover,
details.lang div a[aria-current] {
  background: var(--paper);
  color: var(--black);
  text-decoration: none;
}
footer {
  min-height: 68px;
  padding-block: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font: 11.5px/1.6 var(--mono);
  letter-spacing: 0.02em;
  color: var(--faint);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

/* ── shared pieces ──────────────────────────────────────────────── */
.kicker {
  margin: 0 0 22px;
  font: 12px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.kicker i,
.doclang i {
  font-style: normal;
  margin: 0 0.6em;
  opacity: 0.5;
}
h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(32px, 3.5vw, 56px);
  line-height: 1.16;
  letter-spacing: 0;
}
h2 {
  margin: 0 0 18px;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3;
}
.lede {
  margin: 22px 0 0;
  max-width: 30em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--grey);
}
.fine,
.hint {
  margin: 14px 0 0;
  font: 11.5px/1.7 var(--mono);
  letter-spacing: 0.02em;
  color: var(--grey);
}
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 24px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 600 15px/1.3 var(--serif);
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.12s,
    color 0.12s;
  -webkit-appearance: none;
  appearance: none;
}
button:hover,
.btn:hover {
  background: var(--paper);
  color: var(--ink);
}
.secondary {
  background: transparent;
  color: var(--ink);
}
.secondary:hover {
  background: var(--ink);
  color: var(--paper);
}
.wide {
  width: 100%;
  margin-top: 22px;
}
.stack .wide + .wide {
  margin-top: 10px;
}
.stack .hint {
  margin-top: 8px;
}
.copy {
  flex: none;
  min-height: 0;
  padding: 5px 9px;
  background: transparent;
  color: inherit;
  border-color: currentColor;
  font: 500 10.5px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.textbtn {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 400 14px/1.4 var(--serif);
  letter-spacing: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.textbtn:hover {
  background: none;
  color: var(--grey);
}
label,
.label,
dt {
  display: block;
  margin: 20px 0 8px;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
dt {
  margin: 0;
}
dd {
  margin: 0;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 13px 14px;
  font: 15px/1.4 var(--mono);
  -webkit-appearance: none;
  appearance: none;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-offset: 0;
  outline-width: 3px;
}
textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.7;
}
/* Self-drawn checkbox: 18px square, 1px rule, filled black with a white tick. */
input[type="checkbox"] {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0 10px 0 0;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--paper) center / 12px 12px no-repeat;
  vertical-align: -3px;
  cursor: pointer;
}
input[type="checkbox"]:checked {
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2l2.6 2.6L10 3.4' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E");
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: default;
}
/* One disclosure style everywhere: small monospace caps with a +/– marker, no system triangle. */
summary {
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
:where(details:not(.lang)) > summary {
  padding: 12px 0;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
:where(details:not(.lang)) > summary::before {
  content: "+";
  display: inline-block;
  width: 1.5em;
  font-weight: 400;
}
:where(details[open]:not(.lang)) > summary::before {
  content: "\2013";
}
/* Short inputs keep a width that matches what goes in them. */
input.short {
  max-width: 120px;
}
/* A rejected value: 2px error-colour border, and the focus ring takes the same colour so the
   field never reads as an ordinary focused input. The reason is always written under it (.err). */
input[data-invalid],
textarea[data-invalid],
select[data-invalid] {
  border: 2px solid var(--bad);
  padding: 12px 13px;
}
input[data-invalid]:focus,
textarea[data-invalid]:focus,
select[data-invalid]:focus {
  outline: 2px solid var(--bad);
  outline-offset: 2px;
}
.err {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bad);
}
.labelrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin: 20px 0 8px;
}
.labelrow label {
  margin: 0;
}
.labelrow a {
  font-size: 13.5px;
}
select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230a0a0a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
input[autocomplete="one-time-code"] {
  max-width: 280px;
  padding: 14px 16px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-align: left;
}
input[autocomplete="one-time-code"][data-invalid] {
  padding: 13px 15px;
}
.file-choice {
  position: relative;
  display: inline-flex;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 13px;
}
.file-choice:hover {
  background: var(--ink);
  color: var(--paper);
}
.file-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-choice:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.client {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.client > div {
  min-width: 0;
}
.client b {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.tile {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tag {
  display: inline-block;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}
.tag.warn {
  margin-top: 5px;
  padding: 1px 7px;
  background: var(--warn);
  color: var(--ink);
}
.tag.state {
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.tag.state.off {
  border-style: dashed;
  color: var(--grey);
}
.tag.state.sus {
  background: var(--ink);
  color: var(--paper);
}
.strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 30px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}
.alt {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 16px;
  font-size: 14px;
}
.alt a:hover {
  color: var(--grey);
}
.or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 34px 0 14px;
  font: 500 11px/1.5 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--soft);
}
.providers {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border: 1px solid var(--ink);
}
.providers .btn {
  min-height: 46px;
  padding: 10px 8px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.providers .btn + .btn {
  border-left: 1px solid var(--ink);
}
.providers .btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.cap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 13px 14px;
  border: 1px solid var(--ink);
}
.cap .lb {
  flex: 1 0 100%;
  font: 500 11px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.cap .em {
  flex: 1;
  min-width: 0;
  font: 14.5px/1.5 var(--mono);
  overflow-wrap: anywhere;
}
.cap form {
  margin: 0;
}
h2.label {
  margin: 30px 0 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}
.ledger {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  counter-reset: row;
}
.ledger li {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--soft);
  font-size: 16px;
}
.ledger li::before {
  counter-increment: row;
  content: counter(row, decimal-leading-zero);
  font: 12px/1 var(--mono);
  color: var(--grey);
}
.decide {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 10px;
}
.kv {
  margin-bottom: 22px;
}
.kvh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  color: var(--grey);
}
.kvh .copy {
  color: var(--ink);
}
.kv code,
.secret {
  display: block;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}
.secret {
  border-width: 2px;
  font-weight: 700;
}
.empty {
  margin: 28px 0 0;
  padding: 56px 24px;
  border: 1px dashed var(--ink);
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  color: var(--grey);
}

/* ── split: context on black, work on paper ─────────────────────── */
main.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.lead {
  display: flex;
  justify-content: flex-end;
  background: var(--black);
  color: var(--paper);
}
.work {
  display: flex;
  justify-content: flex-start;
}
.lead > .in,
.work > .in {
  width: 100%;
  max-width: 620px;
  padding: clamp(44px, 11vh, 124px) clamp(24px, 5.2vw, 76px) clamp(48px, 9vh, 96px);
}
.work > .in {
  max-width: 580px;
}
.lead h1 {
  font-size: clamp(30px, 3.1vw, 46px);
  overflow-wrap: break-word;
}
.lead h1 bdi {
  display: inline-block;
  max-width: 100%;
}
.lead .kicker,
.lead dt {
  color: var(--faint);
}
.lead .lede {
  color: var(--dim);
}
.lead .fine {
  color: var(--faint);
}
.lead .client {
  margin-top: 34px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lead .tile {
  border-color: rgba(255, 255, 255, 0.5);
}
.lead .tag {
  color: var(--dim);
}
.lead .tag.warn {
  padding: 2px 8px;
  border: 1px solid var(--warn);
  background: none;
  color: var(--warn);
}
.caution {
  margin: 20px 0 0;
  padding: 1px 0 1px 15px;
  border-left: 3px solid var(--warn);
  font-size: 14.5px;
  line-height: 1.75;
  color: #e4e4e4;
}
.lead .facts {
  margin: 0;
}
.lead .client + .facts {
  margin-top: 0;
}
.caution + .facts {
  margin-top: 26px;
  border-top: 1px solid var(--line);
}
.lead .facts > div {
  display: grid;
  grid-template-columns: 10.5em minmax(0, 1fr);
  gap: 4px 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.lead .facts dt {
  padding-top: 2px;
}
.lead .facts dd {
  font-size: 15px;
  line-height: 1.6;
  color: #ededed;
}
.plain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain li + li {
  margin-top: 5px;
}
.lead .btn {
  background: var(--paper);
  color: var(--black);
  border-color: var(--paper);
}

/* ── sheet: console, grants, guide ──────────────────────────────── */
main.sheet {
  width: 100%;
  max-width: 1208px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 92px) var(--pad) 104px;
}
.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}
.head .kicker {
  margin-bottom: 14px;
}
.item {
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--ink);
}
.fine + .item {
  margin-top: 18px;
  border-top: 1px solid var(--soft);
}
.apphead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.facts.cols {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr) minmax(0, 2fr);
  margin: 22px 0;
  border-top: 1px solid var(--soft);
  border-bottom: 1px solid var(--soft);
}
.facts.cols > div {
  padding: 15px 20px 17px 0;
  min-width: 0;
}
.facts.cols > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--soft);
}
.facts.cols dd {
  margin-top: 9px;
}
.idline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.idline code {
  font-size: 14px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.num {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
}
.errs {
  font: 12.5px/1.7 var(--mono);
}
.errs span {
  display: block;
}
.errs time,
.grant time {
  color: var(--grey);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  padding: 0 0 1px 1px;
}
.actions > * {
  margin: 0 0 -1px -1px;
}
.actions form {
  display: flex;
}
.actions button,
.actions .btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.actions form:last-child button {
  color: var(--bad);
}
.actions form:last-child button:hover {
  background: var(--bad);
  border-color: var(--bad);
  color: var(--paper);
  position: relative;
}
.grant {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 18px 32px;
}
.grant form {
  margin: 0;
}
.grant button {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13.5px;
}
.facts.pair {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 14px 28px;
  margin: 0;
}
.facts.pair dd {
  margin-top: 6px;
  font-size: 15px;
}
.facts.pair time {
  font-size: 13px;
}

/* ── guide ──────────────────────────────────────────────────────── */
.manual {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(32px, 5.5vw, 84px);
  align-items: start;
}
.toc {
  position: sticky;
  top: 28px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}
.toc .kicker {
  margin-bottom: 12px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  border-top: 2px solid var(--ink);
}
.toc li {
  border-bottom: 1px solid var(--soft);
}
.toc ol a {
  display: grid;
  grid-template-columns: 2.5em minmax(0, 1fr);
  align-items: baseline;
  padding: 10px 0;
  font-size: 14.5px;
  line-height: 1.45;
  text-decoration: none;
}
.toc ol a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  font: 11.5px/1 var(--mono);
  color: var(--grey);
}
.toc ol a:hover {
  text-decoration: underline;
}
.doclang {
  margin: 18px 0 0;
  font: 12px/1.5 var(--mono);
  letter-spacing: 0.04em;
}
.doclang a {
  color: var(--grey);
}
.doclang a[aria-current] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.doc {
  min-width: 0;
  max-width: 800px;
}
.doc header {
  padding-bottom: 30px;
  border-bottom: 2px solid var(--ink);
}
.doc header h1 {
  margin-bottom: 22px;
}
.doc header p:not(.kicker) {
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
  color: #2b2b2b;
}
.doc section {
  padding: 40px 0 18px;
  border-bottom: 1px solid var(--ink);
  scroll-margin-top: 16px;
}
.doc h2 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.3;
}
.doc .no::before {
  content: "§";
  margin-right: 0.2em;
}
.doc .no {
  flex: none;
  font: 400 13px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--grey);
}
.doc p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.9;
}
.doc ul,
.doc ol {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  border-top: 1px solid var(--soft);
}
.doc li {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--soft);
  line-height: 1.85;
}
.doc li > span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.doc ul li::before {
  content: "—";
  font-family: var(--mono);
  color: var(--grey);
}
.doc ol {
  counter-reset: step;
}
.doc ol li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font: 13px/1 var(--mono);
  color: var(--grey);
}
figure.code {
  margin: 4px 0 24px;
  background: var(--ink);
  color: #ededed;
  min-width: 0;
}
figure.code figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 18px;
  border-bottom: 1px solid var(--line);
  font: 500 11px/1.5 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
figure.code .copy {
  color: #ededed;
  border-color: rgba(255, 255, 255, 0.4);
}
figure.code .copy:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
figure.code pre {
  margin: 0;
  padding: 16px 20px 18px 0;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.85;
  white-space: pre;
  tab-size: 4;
  counter-reset: line;
}
figure.code .l::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 3.4em;
  margin-right: 1.3em;
  text-align: right;
  color: #6f6f6f;
  -webkit-user-select: none;
  user-select: none;
}
.tabbar {
  display: flex;
  flex-wrap: wrap;
  padding: 40px 0 0 1px;
  border-bottom: 1px solid var(--ink);
}
.tabbar button {
  min-height: 40px;
  margin: 0 0 -1px -1px;
  padding: 8px 18px;
  background: var(--paper);
  color: var(--ink);
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.06em;
}
.tabbar button[aria-pressed="true"],
.tabbar button:hover {
  background: var(--ink);
  color: var(--paper);
}
.tabbar:not([hidden]) ~ section {
  padding-top: 30px;
}
.swatches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 6px 0 14px;
  border: 1px solid var(--ink);
}
.sw {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 34px 16px 18px;
  font: 500 11px/1.5 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}
.sw.dark {
  background: var(--black);
  color: var(--faint);
}
.sw img,
.signin {
  display: block;
  max-width: 100%;
  height: auto;
}
.doc details {
  border-bottom: 1px solid var(--soft);
}
.doc summary {
  padding: 12px 0;
  cursor: pointer;
  font: 500 12px/1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.doc details figure.code {
  margin-bottom: 16px;
}

/* ── home ───────────────────────────────────────────────────────── */
.band {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}
.hero {
  background: var(--black);
  color: var(--paper);
  padding: clamp(56px, 13vh, 150px) var(--pad) clamp(40px, 8vh, 84px);
}
.hero .kicker {
  color: var(--faint);
  margin-bottom: 30px;
}
.hero h1 {
  max-width: 100%;
  font-size: clamp(40px, 6.2vw, 96px);
  line-height: 1.1;
}
.hero .lede {
  margin-top: 32px;
  max-width: 35em;
  font-size: clamp(16px, 1.35vw, 20px);
  color: var(--dim);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}
.hero .btn {
  background: var(--paper);
  color: var(--black);
  border-color: var(--paper);
}
.hero .btn:hover {
  background: transparent;
  color: var(--paper);
}
.hero .btn.secondary {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.5);
}
.hero .btn.secondary:hover {
  background: var(--paper);
  color: var(--black);
}
.specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  padding-left: 0;
  margin: clamp(48px, 9vh, 96px) 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font: 12px/1.6 var(--mono);
  letter-spacing: 0.06em;
  color: var(--faint);
}
.blk {
  padding: clamp(52px, 10vh, 112px) var(--pad);
  border-bottom: 1px solid var(--ink);
}
.blk:last-child {
  border-bottom: 0;
}
h2.sec {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 54px);
  font-weight: 900;
  line-height: 1.2;
}
.steps3 {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 40px 0 0;
  padding: 0;
  counter-reset: step;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.steps3 li {
  padding: 22px 28px 36px 0;
}
.steps3 li + li {
  padding-left: 28px;
  border-left: 1px solid var(--ink);
}
.steps3 li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font: 13px/1 var(--mono);
  color: var(--grey);
}
.steps3 h3 {
  margin: 44px 0 0;
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 700;
  line-height: 1.35;
}
/* One plain line under the three steps: registration takes effect at once. */
.steps3 + .instant {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}
.more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-top: 30px;
}
.more .links {
  font-size: 15px;
  gap: 8px 28px;
}
.band.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px clamp(32px, 6vw, 96px);
  align-items: end;
}
.band.pair .lede {
  margin: 0 0 26px;
  color: #2b2b2b;
}

/* ── upstream hand-off page on the main origin (no top bar) ─────── */
main.bridge {
  min-height: 100vh;
  padding: 20px var(--pad);
  background: var(--black);
  color: var(--paper);
}
main.bridge .brand {
  display: flex;
  margin: 0 0 26px;
}
.bridge-line {
  margin: 0;
  font: 12.5px/1.7 var(--mono);
  letter-spacing: 0.04em;
  color: var(--dim);
}

/* ── narrow screens ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  main.split {
    display: block;
  }
  .lead > .in,
  .work > .in {
    max-width: none;
    padding: 34px 20px 32px;
  }
  .work > .in {
    padding-bottom: 56px;
  }
  .lead .client {
    margin-top: 24px;
    padding: 14px 0;
  }
  .manual {
    display: block;
  }
  .toc {
    position: static;
    max-height: none;
    margin-bottom: 40px;
  }
  .facts.cols,
  .grant,
  .band.pair,
  .steps3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts.cols > div + div,
  .steps3 li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--soft);
  }
  .steps3 li + li {
    border-top-color: var(--ink);
  }
  .steps3 li {
    padding: 18px 0 24px;
  }
  .steps3 h3 {
    margin-top: 14px;
  }
  .grant {
    align-items: start;
  }
  .band.pair {
    align-items: start;
  }
}
@media (max-width: 640px) {
  .nav-console {
    display: none;
  }
  .top {
    min-height: 58px;
  }
  footer {
    display: block;
  }
  footer .links {
    margin-top: 8px;
  }
  h1 {
    font-size: clamp(27px, 7.6vw, 36px);
  }
  .hero h1 {
    font-size: clamp(34px, 10.5vw, 46px);
  }
  .doc h2 {
    font-size: 23px;
    gap: 12px;
  }
  .doc header p:not(.kicker) {
    font-size: 16.5px;
  }
  .doc li {
    grid-template-columns: 2.1em minmax(0, 1fr);
  }
  figure.code pre {
    font-size: 12px;
  }
  figure.code .l::before {
    width: 2.6em;
    margin-right: 1em;
  }
  .lead .facts > div {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts.pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .swatches {
    grid-template-columns: minmax(0, 1fr);
  }
  .providers .btn {
    font-size: 13.5px;
  }
}
@media (max-width: 420px) {
  .nav-docs {
    display: none;
  }
  .decide {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ── registration, review and long-form guide pieces (docs/3306-id-design.md §9) ── */
.subnav {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 8px;
  padding: 0 0 1px 1px;
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.04em;
}
.subnav a {
  margin: 0 0 -1px -1px;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  text-decoration: none;
}
.subnav a[aria-current],
.subnav a:hover {
  background: var(--ink);
  color: var(--paper);
}
.part {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 12px clamp(28px, 5vw, 72px);
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--ink);
}
.part > header h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}
.part > header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--grey);
}
.part > div > label:first-child,
.part > div > .label:first-child,
.part > div > .duo:first-child label {
  margin-top: 0;
}
.duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 20px;
}
.status {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--ink);
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status.unverified {
  background: var(--warn);
  border-color: var(--warn);
}
.status.verified,
.status.suspended {
  background: var(--ink);
  color: var(--paper);
}
.status.suspended {
  border-color: var(--bad);
}
.status.suspended {
  background: var(--bad);
}
.next {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  border-left-width: 4px;
  font-size: 15px;
  line-height: 1.7;
}
table.grid {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
  font-size: 14.5px;
  line-height: 1.6;
}
.scroll {
  overflow-x: auto;
  margin: 0 0 24px;
}
table.grid th {
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--ink);
  text-align: left;
  white-space: nowrap;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
table.grid td {
  padding: 13px 16px 13px 0;
  border-bottom: 1px solid var(--soft);
  vertical-align: top;
}
table.grid td.k,
table.grid code {
  font: 13px/1.6 var(--mono);
  white-space: nowrap;
}
table.grid .old {
  color: var(--grey);
  text-decoration: line-through;
}
.check {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}
.check li {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--soft);
}
.check li::before {
  content: attr(data-state);
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.08em;
  color: var(--grey);
}
.check li.done::before {
  color: var(--ink);
  font-weight: 700;
}
.record {
  display: grid;
  grid-template-columns: 6em minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  font: 13px/1.6 var(--mono);
}
.record + .record {
  border-top: 0;
}
.record span:first-child {
  color: var(--grey);
  letter-spacing: 0.08em;
}
.record b {
  font-weight: 400;
  overflow-wrap: anywhere;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font: 13px/1.5 var(--mono);
}
.chips li {
  padding: 5px 10px;
  border: 1px solid var(--soft);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 28px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.stats > div {
  padding: 16px 18px 18px 0;
}
.stats > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--soft);
}
.shot {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 8px 0 8px;
  border: 1px dashed var(--ink);
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
figure.fig {
  margin: 0 0 24px;
}
figure.fig figcaption {
  font: 11.5px/1.6 var(--mono);
  color: var(--grey);
}
.lead .report {
  display: inline-block;
  margin-top: 18px;
  font: 11.5px/1.5 var(--mono);
  color: var(--faint);
}
.purpose {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--grey);
}
@media (max-width: 860px) {
  .part,
  .duo {
    grid-template-columns: minmax(0, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .check li,
  .record {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}


.books {display:grid;gap:6px;margin:0 0 18px}
.part > div, .doc, .manual > *, .head > div {min-width:0}
.part summary, .report summary {cursor:pointer; padding:12px 0; overflow-wrap:anywhere}
.part button, .part + form button {margin-top:10px}
.part .record button {margin:0}
.part .tile img {width:100%;height:100%;object-fit:contain}
.part .part {display:block;border:0;padding:12px 0}
.part .part header {display:none}
.books a, .part td, .head h1, .stats .num {overflow-wrap:anywhere}
.doc .scroll table {min-width:580px}
.lead .purpose {color:var(--dim)}
.lead .report[open] {display:block}
button:disabled {opacity:.45;cursor:default}
@media (min-width:861px) {
  main.split {grid-template-columns:minmax(0,.98fr) minmax(0,1.02fr)}
}
@media (max-width:360px) {
  .lead h1 {font-size:27px}
}
@media (max-width:640px) {
  .apphead {flex-wrap:wrap}
  .lead > .in {padding-top:24px;padding-bottom:24px}
  .lead .client {padding-block:12px;margin-top:16px}
  .lead .facts > div {grid-template-columns:minmax(75px,31%) minmax(0,1fr);gap:8px;padding-block:9px}
  .lead .caution {margin-block:12px}
}
.head + .subnav, .next + .subnav {margin-top:20px}
#icon-preview {margin-top:20px}
#scope table {min-width:540px}
#scope input[name^="purpose_"] {min-width:180px}
#credentials table, .review-sheet table {min-width:660px}
.part td time {white-space:nowrap}
.toc-desktop {min-width:0}
.toc-desktop > .toc {max-height:calc(100vh - 64px);overflow-y:auto}
.toc-mobile {display:none}
.books [aria-current] {font-weight:bold;text-decoration-thickness:2px}
@media (max-width:860px) {
  .toc-desktop {display:none}
  .toc-mobile {display:block;border-bottom:1px solid var(--ink);margin-bottom:18px}
  .toc-mobile > summary {padding:10px 0;cursor:pointer;font:13px var(--mono)}
}

/* ── user-facing pages: home, sign-in, consent, status, grants (M8 user side) ── */

/* Home: headline in two semantic halves. Chinese and Japanese have no spaces to break at, so each
   half stays on one line and the size is clamped so the longest half fits a 320px screen. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 32px clamp(28px, 5vw, 76px);
  align-items: start;
}
.hero h1 .ln,
.lead h1 .ln {
  display: block;
}
:is(:lang(zh), :lang(ja)) :is(.hero, .lead) h1 .ln {
  white-space: nowrap;
}
:lang(zh-Hant) :is(.hero, .lead) h1 {
  font-feature-settings: "halt";
}
.hero-grid h1 {
  font-size: clamp(38px, 5.4vw, 80px);
}
.hero-grid:lang(zh) h1 {
  font-size: clamp(40px, 4.4vw, 68px);
}
.hero-grid:lang(ja) h1 {
  font-size: clamp(32px, 3.6vw, 56px);
}
.hero-grid .specs {
  grid-column: 1 / -1;
  margin-top: 16px;
}
/* The drawn consent sample: its top rule sits on the headline's first line (kicker 18px + 30px). */
.sample {
  justify-self: end;
  width: 100%;
  max-width: 380px;
  margin-top: 48px;
  padding: 20px 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.sample-k {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  font: 500 11px/1.5 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.sample .client {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sample .tile {
  border-color: rgba(255, 255, 255, 0.5);
}
.sample .client b {
  font-size: 17px;
}
.sample .tag {
  color: var(--dim);
}
.sample-h {
  margin: 16px 0 2px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--dim);
}
.sample-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.sample-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.sample-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--paper);
  color: var(--black);
  font: 600 14px/1.3 var(--serif);
  letter-spacing: 0.04em;
}
/* Protocol endpoints, under "For developers". */
.endpoints {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 12px clamp(28px, 5vw, 72px);
  margin-top: 36px;
}
.endpoints h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}
.endpoints dl {
  margin: 0;
  border-top: 2px solid var(--ink);
}
.endpoints dl > div {
  display: grid;
  grid-template-columns: 12em minmax(0, 1fr);
  gap: 4px 18px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--soft);
}
.endpoints code {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

/* Split pages: the form column is 460px against the centre line, and the pane always closes on
   a ruled line of the platform's own links. */
main.split {
  min-height: calc(100vh - 132px);
}
.work > .in {
  display: flex;
  flex-direction: column;
}
.work .body {
  flex: 1 0 auto;
}
.footline {
  display: flex;
  flex-wrap: wrap;
  margin: 48px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
  font: 11.5px/1.7 var(--mono);
  letter-spacing: 0.02em;
  color: var(--grey);
}
.footline a {
  text-decoration: none;
}
.footline a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footline a + a::before {
  content: "\00b7";
  display: inline-block;
  margin: 0 0.8em;
  color: var(--grey);
}
@media (min-width: 861px) {
  main.split {
    grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  }
  .work > .in {
    max-width: calc(460px + 2 * clamp(32px, 4vw, 66px));
    padding-inline: clamp(32px, 4vw, 66px);
    padding-bottom: 28px;
  }
}
.work h2 {
  margin-bottom: 16px;
}
.facts3 {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.facts3 li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font: 12.5px/1.6 var(--mono);
  letter-spacing: 0.04em;
  color: var(--dim);
}
.lead h1 .ln:lang(ja) {
  font-size: clamp(26px, 2.6vw, 38px);
}
.lead h1 bdi.host {
  overflow-wrap: anywhere;
}
.devhost {
  display: block;
  margin-top: 10px;
  font: 500 12px/1.5 var(--mono);
  letter-spacing: 0.08em;
  color: var(--dim);
}
.facts .devhost {
  display: inline;
  margin: 0;
  color: var(--faint);
}
.work .devhost {
  display: inline;
  margin: 0 0 0 0.5em;
  color: var(--grey);
}

/* "About this app": folded on phones, laid open (summary hidden) on wider screens by script. */
.lead details.more {
  border-bottom: 1px solid var(--line);
}
.lead .caution + details.more {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.lead details.more > summary {
  padding: 14px 0;
  color: var(--dim);
}
@media (min-width: 861px) {
  .lead details.more[open] > summary {
    display: none;
  }
}
.lead details.more .facts > div:last-child {
  border-bottom: 0;
}
.lead .desc {
  margin: 0 0 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.75;
  color: #e4e4e4;
}
.lead .desc + .desc {
  padding-top: 0;
  border-top: 0;
}
.said {
  display: block;
  margin-bottom: 2px;
  font: 500 10.5px/1.6 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}
.lead .said {
  color: var(--faint);
}
.lead details.more .report {
  display: block;
  margin: 0 0 14px;
}

/* Sign-in forms. */
.sentto {
  margin: -4px 0 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--grey);
}
.sentto b {
  font-weight: 600;
  color: var(--ink);
}
.sentto a {
  white-space: nowrap;
}
/* One-time code: wide-set digits, and a placeholder that says how many. */
input.otp {
  font-size: 20px;
  letter-spacing: 0.24em;
}
input.otp::placeholder {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.resend {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--soft);
}
.resend .hint {
  margin: 0 0 12px;
}
.resend > label:first-of-type {
  margin-top: 0;
}
.resend button {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 13.5px;
}
.agree {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--grey);
}
.agree a {
  color: var(--ink);
}
.alt + .alt {
  margin-top: 10px;
}
.more-ways {
  justify-content: flex-start;
  padding-top: 14px;
  border-top: 1px solid var(--soft);
}

/* Consent: whom the information goes to, then the list, then the agreement line. */
.work h2.subject {
  margin: 28px 0 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.ledger + .agree {
  margin: -8px 0 16px;
}

/* Status pages: label, reason, a copyable code line (not a box), then the way out. */
.reason {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.6;
}
.errcode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  font: 12.5px/1.6 var(--mono);
  color: var(--grey);
}
.errcode code {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.errcode .copy {
  color: var(--ink);
}
.work .cap + form,
.work .cap + .ledger {
  margin-top: 0;
}

/* Reports: the weakest line on the page until opened. */
.report > summary {
  color: var(--grey);
}
.lead .report > summary {
  color: var(--faint);
}
.report-form {
  margin: 4px 0 8px;
  padding: 4px 16px 16px;
  border: 1px solid var(--ink);
}
.report-form textarea {
  min-height: 80px;
}
.report-form button {
  margin-top: 16px;
}
.lead .report-form {
  border-color: rgba(255, 255, 255, 0.4);
}
.lead .report-form label {
  color: var(--faint);
}
.lead .report-form select,
.lead .report-form textarea {
  border-color: rgba(255, 255, 255, 0.55);
  background-color: var(--black);
  color: var(--paper);
}
.lead .report-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E");
}
.lead .report-form button {
  background: var(--paper);
  color: var(--black);
  border-color: var(--paper);
}
.lead .report-form button:hover {
  background: transparent;
  color: var(--paper);
}

/* Authorized apps: badge | four facts | actions at the row end. */
.grant {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2.2fr) auto;
  align-items: start;
}
.facts.quad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  margin: 0;
}
.facts.quad dd {
  margin-top: 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.facts.quad time {
  font-size: 13px;
  color: var(--grey);
  white-space: nowrap;
}
.row-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}
.row-end .report[open] {
  width: min(340px, 100%);
}

/* Client secret, shown once. */
.meta {
  margin: 0 0 20px;
  font: 12px/1.6 var(--mono);
  letter-spacing: 0.06em;
  color: var(--grey);
  overflow-wrap: anywhere;
}
.meta bdi[lang] {
  font-family: var(--mono);
}
.caution.light {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink);
}
.pair-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.pair-actions > * {
  width: 100%;
}
.confirm {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--warn);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  main.split {
    min-height: 0;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-grid h1 {
    font-size: clamp(34px, 9vw, 60px);
  }
  .hero-grid:lang(zh) h1 {
    font-size: clamp(26px, 8.4vw, 72px);
  }
  .hero-grid:lang(ja) h1 {
    font-size: clamp(20px, 7vw, 60px);
  }
  .sample {
    display: none;
  }
  .endpoints {
    grid-template-columns: minmax(0, 1fr);
  }
  .grant {
    grid-template-columns: minmax(0, 1fr);
  }
  .row-end {
    align-items: flex-start;
  }
  /* Phones: kicker, heading and badge first; the form is reached within the first screen. */
  .lead > .in {
    padding: 24px 20px;
  }
  .work > .in {
    padding: 24px 20px 28px;
  }
  .lead .kicker {
    margin-bottom: 14px;
  }
  .lead .client {
    margin-top: 16px;
    padding: 12px 0;
  }
  .lead .caution {
    margin: 12px 0 0;
    font-size: 13.5px;
    line-height: 1.7;
  }
  .lead .caution + details.more {
    margin-top: 14px;
  }
  .lead details.more > summary {
    padding: 11px 0;
  }
  .lead h1 .ln:lang(ja) {
    font-size: clamp(20px, 6.6vw, 34px);
  }
  .facts3 {
    margin-top: 20px;
  }
  .work .strip {
    margin-bottom: 18px;
  }
  .work h2 {
    margin-bottom: 12px;
    font-size: 22px;
  }
  .work label {
    margin: 16px 0 6px;
  }
  .work h2.subject {
    margin-top: 20px;
    font-size: 15px;
  }
  .work .ledger li {
    padding: 10px 0;
  }
  .footline {
    margin-top: 36px;
  }
}
@media (max-width: 640px) {
  .endpoints dl > div {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  /* The account box: label and "switch" share the top line, the address gets a line of its own. */
  .cap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
  }
  .cap .lb {
    grid-column: 1;
    grid-row: 1;
  }
  .cap form {
    grid-column: 2;
    grid-row: 1;
  }
  .cap .em {
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
  }
  .facts.quad {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 420px) {
  .pair-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 390px) {
  .cta .btn {
    flex: 1 1 100%;
  }
}

/* ── unverified apps: the platform's label outweighs the self-described name (M7-3) ── */
.client .tag.warn {
  margin-top: 0;
  padding: 3px 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.client .claimed {
  display: inline-block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* ── M8 merged: docs ── */

/* ── public documents: datelines, sub-headings, stacked tables, sequence, button misuse ── */
.doc p.meta .nw {
  white-space: nowrap;
}
.doc p.meta,
.doc header p.meta:not(.kicker) {
  margin: 0 0 20px;
  font: 500 12px/1.6 var(--mono);
  letter-spacing: 0.06em;
  color: var(--grey);
}
.doc h3 {
  margin: 34px 0 12px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.4;
  scroll-margin-top: 16px;
}
.doc .chapter {
  padding: 30px 0 18px;
}
.doc .chapter > h3:first-child,
.doc section > h2 + h3 {
  margin-top: 8px;
}
.doc p code,
.doc li code,
.doc td code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
.doc table.grid td.k,
.doc table.grid td code {
  white-space: normal;
}
.doc table.grid td.k {
  white-space: nowrap;
}
.doc .lbl {
  display: block;
  margin: 0 0 6px;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.doc p.lbl {
  margin: 28px 0 10px;
}
.doc .steps strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.4;
}
.doc .steps p {
  margin: 0 0 10px;
  line-height: 1.8;
}
.doc .steps p:last-child {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--soft);
  font-size: 15px;
  color: #2b2b2b;
}
.doc .onward {
  border-bottom: 0;
}
.doc .seq {
  margin: 6px 0 26px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.doc .seq-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--ink);
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}
.doc .seq-head span {
  padding: 10px 6px;
}
.doc .seq-body {
  position: relative;
}
.doc .seq .life {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px solid var(--soft);
}
.doc .seq .l1 {
  left: 16.6667%;
}
.doc .seq .l2 {
  left: 50%;
}
.doc .seq .l3 {
  left: 83.3333%;
}
.doc .seq ol {
  position: relative;
  margin: 0;
  padding: 10px 0 14px;
  border: 0;
  counter-reset: hop;
}
.doc .seq li {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding: 10px 0 8px;
  border: 0;
  line-height: 1.5;
}
.doc .seq li::before {
  content: none;
}
.doc .seq .hop {
  display: none;
}
.doc .seq .wire {
  position: relative;
  grid-row: 2;
  height: 9px;
  border-top: 1px solid var(--ink);
  margin-top: 4px;
}
.doc .seq .wire::after {
  content: "";
  position: absolute;
  top: -5px;
  right: 0;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  transform: rotate(45deg);
}
.doc .seq .back .wire::after {
  right: auto;
  left: 0;
  transform: rotate(-135deg);
}
.doc .seq .what {
  grid-row: 1;
  justify-self: center;
  padding: 0 8px;
  background: var(--paper);
  font: 12.5px/1.6 var(--mono);
  text-align: center;
}
.doc .seq .w12 .wire,
.doc .seq .w12 .what {
  grid-column: 2 / 4;
}
.doc .seq .w23 .wire,
.doc .seq .w23 .what {
  grid-column: 4 / 6;
}
.doc .seq .w13 .wire,
.doc .seq .w13 .what {
  grid-column: 2 / 6;
}
.doc .swatches {
  grid-template-columns: 1fr 1fr;
}
.doc .swatches .sw:nth-child(n + 3) {
  border-top: 1px solid var(--ink);
}
.doc .sw span {
  text-transform: none;
  letter-spacing: 0.04em;
}
.doc .donts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 24px;
  border: 1px solid var(--ink);
}
.doc .dont {
  margin: 0;
  padding: 26px 14px 14px;
  text-align: center;
}
.doc .dont + .dont {
  border-left: 1px solid var(--ink);
}
.doc .dont div {
  display: grid;
  place-items: center;
  height: 64px;
  overflow: hidden;
}
.doc .dont img {
  display: block;
  max-width: 100%;
}
/* An SVG <img> keeps its proportions inside any box, so the stretch is drawn with a transform. */
.doc .dont.stretch img {
  width: 150px;
  height: auto;
  transform: scaleX(1.44);
}
.doc .dont.recolour img {
  height: auto;
  filter: sepia(1) saturate(6) hue-rotate(300deg);
}
/* The outline is redrawn on the rounded shape, so the example reads as a pill button, not a clipped one. */
.doc .dont.rounded img {
  height: auto;
  border: 1.5px solid var(--ink);
  border-radius: 24px;
}
.doc .dont figcaption {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--soft);
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.08em;
  color: var(--grey);
  text-decoration: line-through;
  text-decoration-color: var(--ink);
}
@media (max-width: 860px) {
  .doc .scroll {
    overflow-x: visible;
  }
  .doc .scroll table.grid {
    display: block;
    min-width: 0;
  }
  .doc table.grid thead {
    display: none;
  }
  .doc table.grid tbody,
  .doc table.grid tr,
  .doc table.grid td {
    display: block;
  }
  .doc table.grid tr {
    padding: 12px 0 14px;
    border-bottom: 1px solid var(--ink);
  }
  .doc table.grid td {
    padding: 4px 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .doc table.grid td::before {
    content: attr(data-label);
    display: block;
    font: 500 11px/1.6 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey);
  }
  .doc table.grid td.k {
    white-space: normal;
    font-size: 14.5px;
    font-weight: 700;
  }
}
@media (max-width: 640px) {
  .doc .seq-head,
  .doc .seq .life,
  .doc .seq .wire {
    display: none;
  }
  .doc .seq ol {
    padding: 0;
  }
  .doc .seq li {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--soft);
  }
  .doc .seq li:last-child {
    border-bottom: 0;
  }
  .doc .seq .hop {
    display: block;
    margin-bottom: 3px;
    font: 500 11px/1.6 var(--mono);
    letter-spacing: 0.08em;
    color: var(--grey);
  }
  .doc .seq .what {
    display: block;
    padding: 0;
    text-align: left;
    font-size: 13px;
  }
  .doc .swatches,
  .doc .donts {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc .swatches .sw + .sw {
    border-top: 1px solid var(--ink);
  }
  .doc .dont + .dont {
    border-left: 0;
    border-top: 1px solid var(--ink);
  }
}

/* ── M8 merged: review ── */

/* ── admin desk (src/lib/id/review-ui.ts) ───────────────────────── */
.top nav .desk {
  padding: 4px 8px;
  border: 1px solid var(--line);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.top nav .langlink {
  padding: 7px 11px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.top nav .langlink:hover {
  border-color: var(--paper);
  text-decoration: none;
}
.review-sheet .head .status {
  margin-bottom: 6px;
}
.review-sheet .owner {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 14px 0 0;
  font-size: 15px;
}
.review-sheet .owner .mono {
  font-size: 13px;
  color: var(--grey);
  overflow-wrap: anywhere;
}
.review-sheet .next + .next {
  margin-top: 8px;
}
.review-sheet .next[role="alert"] {
  margin: 20px 0 0;
  border-color: var(--bad);
}
.review-sheet .next.appeal-note {
  border-left-width: 8px;
  font-weight: 700;
}
.review-sheet .next a {
  color: inherit;
}
.review-sheet .subnav .n {
  margin-left: 6px;
  opacity: 0.72;
}
.review-sheet .subnav.filters {
  margin: 0 0 18px;
}
.review-sheet .stats {
  margin-top: 28px;
}
.review-sheet .stats .label {
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 8px;
}
.review-sheet .stats .num {
  display: block;
  font-size: 30px;
}
.review-sheet .stats .num.nil {
  font: 400 15px/2 var(--mono);
  color: var(--grey);
}
.review-sheet .scroll {
  margin-bottom: 0;
}
.review-sheet .swipe {
  display: none;
  margin: 6px 0 0;
  text-align: right;
  font: 11.5px/1.5 var(--mono);
  letter-spacing: 0.06em;
  color: var(--grey);
}
.review-sheet table.grid td {
  overflow-wrap: anywhere;
}
.review-sheet table.grid td.k {
  overflow-wrap: normal;
}
.review-sheet table.grid td.k time {
  font-size: inherit;
}
.review-sheet .sub {
  display: block;
  margin-top: 2px;
  font: 12px/1.5 var(--mono);
  color: var(--grey);
  overflow-wrap: anywhere;
}
.review-sheet .gone {
  color: var(--grey);
}
.review-sheet code.raw {
  font: 12px/1.5 var(--mono);
}
/* reports: open first, handled rows greyed */
.review-sheet table.reports tr.done td {
  color: var(--grey);
}
.review-sheet table.reports td.ops {
  white-space: nowrap;
}
.review-sheet table.reports td.ops form {
  display: inline;
  margin: 0 0 0 14px;
}
.review-sheet table.reports td.ops button {
  min-height: 0;
  margin: 0;
  padding: 6px 12px;
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.04em;
}
.review-sheet table.reports td.ops .state {
  margin-left: 14px;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* reports and appeals on the app page: appeals carry a heavy rule */
.review-sheet table.feedback tr.appeal td {
  font-weight: 700;
}
.review-sheet table.feedback tr.appeal td:first-child {
  padding-left: 14px;
  box-shadow: inset 4px 0 0 var(--ink);
}
.review-sheet table.feedback .tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--ink);
  color: var(--paper);
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.review-sheet .uris {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  gap: 2px 12px;
}
.review-sheet .uris + .uris {
  margin-top: 8px;
}
.review-sheet .uris span {
  grid-row: 1 / span 12;
  font: 500 11.5px/1.9 var(--mono);
  letter-spacing: 0.08em;
  color: var(--grey);
}
.review-sheet .uris code {
  grid-column: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* brand details: field / current value, one column of values */
.review-sheet table.info {
  min-width: 0;
  table-layout: fixed;
}
.review-sheet table.info th:first-child,
.review-sheet table.info td.f {
  width: 11.5em;
}
.review-sheet table.info td.f {
  font: 500 12px/1.9 var(--mono);
  letter-spacing: 0.04em;
  color: var(--grey);
}
.review-sheet table.info img {
  display: block;
  border: 1px solid var(--ink);
}
/* action */
.review-sheet dl.reason {
  margin: 0 0 8px;
}
.review-sheet dl.reason dt {
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.review-sheet dl.reason dd {
  margin: 6px 0 0;
  font-size: 17px;
  font-weight: 700;
}
.review-sheet .verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.review-sheet .verdict button {
  min-height: 48px;
  margin: 0;
  padding: 11px 26px;
}
.review-sheet .verdict .danger {
  border-color: var(--bad);
  color: var(--bad);
}
.review-sheet .verdict .danger:hover {
  background: var(--bad);
  color: var(--paper);
}
.review-sheet .consequence {
  flex: 1 1 260px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--grey);
}
.review-sheet .part > div > .consequence {
  margin-top: 14px;
}
.review-sheet form + form .verdict {
  margin-top: 36px;
}
.review-sheet .pager {
  margin: 24px 0 0;
}
.review-sheet .part .hint:first-child {
  margin-top: 0;
}
@media (max-width: 860px) {
  .review-sheet .scroll {
    border-right: 1px solid var(--ink);
  }
  .review-sheet .swipe {
    display: block;
  }
  /* Credentials and domains never scroll sideways either: one card per row, label above value. */
  .review-sheet .scroll:has(table.stack) {
    border-right: 0;
    overflow-x: visible;
  }
  .review-sheet table.stack,
  .review-sheet table.stack tbody,
  .review-sheet table.stack tr,
  .review-sheet table.stack td {
    display: block;
    width: auto;
    min-width: 0;
  }
  .review-sheet table.stack thead {
    display: none;
  }
  .review-sheet table.stack tr {
    padding: 10px 0 12px;
    border-bottom: 1px solid var(--ink);
  }
  .review-sheet table.stack td {
    padding: 3px 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .review-sheet table.stack td.k {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .review-sheet table.stack td::before {
    content: attr(data-label);
    display: block;
    font: 500 11px/1.6 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey);
  }
  /* Brand details never scroll sideways: one block per field, label above value. */
  .review-sheet .scroll:has(table.info) {
    border-right: 0;
    overflow-x: visible;
  }
  .review-sheet table.info,
  .review-sheet table.info tbody,
  .review-sheet table.info tr,
  .review-sheet table.info td {
    display: block;
    width: auto;
  }
  .review-sheet table.info thead {
    display: none;
  }
  .review-sheet table.info tr {
    padding: 14px 0 12px;
    border-bottom: 1px solid var(--soft);
  }
  .review-sheet table.info td {
    padding: 0;
    border: 0;
  }
  .review-sheet table.info td.f {
    width: auto;
    padding: 0 0 6px;
    font: 500 11px/1.7 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .review-sheet .verdict button {
    flex: 1 0 100%;
  }
  .review-sheet .uris {
    grid-template-columns: minmax(0, 1fr);
  }
  .review-sheet .uris span {
    grid-row: auto;
  }
  .review-sheet .uris code {
    grid-column: 1;
  }
}

/* ── M8 merged: console ── */

/* ── developer console: apps, credentials, domains, verification status (registration-ui.ts) ──
 * Appended after platform.css. Everything is scoped to .sheet or to console-only classes;
 * global buttons, inputs, details and checkboxes are left to platform.css. */

/* page rhythm and navigation */
.sheet .head .kicker a {color: inherit; text-decoration: none}
.sheet .head .kicker a:hover {text-decoration: underline; text-underline-offset: 3px}
.sheet .head h1 a, .sheet .apphead h2 a {color: inherit; text-decoration: none}
.sheet .head > .status {margin-bottom: 8px}
.sheet .subnav {margin: 22px 0 8px}
.sheet .subnav a {color: var(--ink); background: var(--paper)}
.sheet .subnav a[aria-current] {background: var(--ink); color: var(--paper)}
.sheet .subnav a:hover {background: var(--ink); color: var(--paper)}
.sheet .subnav.spy {
  position: sticky; top: 0; z-index: 5;
  margin: 18px 0 0; padding: 10px 0 11px 1px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.sheet .part {scroll-margin-top: 72px}
.sheet .fine.owner {margin: 14px 0 0}
.sheet .fine.instant {margin: 18px 0 0; font-size: 13px; color: var(--ink)}
.sheet .part > header h2 {overflow-wrap: anywhere}

/* next-step bar */
.sheet .next {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 20px; margin: 18px 0 0;
}
.sheet .next > span {flex: 1 1 26em; min-width: 0; overflow-wrap: anywhere}
.sheet .next a {flex: none; font-weight: 700; color: var(--ink); text-underline-offset: 4px}
.sheet .next.bad {border-left-color: var(--bad)}
.sheet .next.bad b {font-weight: 700}

/* fields */
.sheet .fld > label {margin: 22px 0 8px}
.sheet .part > div > .fld:first-child > label,
.sheet .part > div > form > div.fld:first-of-type > label,
.sheet .part > div > form > .credfields > div.fld:first-child > label {margin-top: 0}
.sheet .credfields > fieldset.types + .fld > label {margin-top: 26px}
.sheet .fld .opt {
  margin-left: 6px; padding: 0 6px;
  border: 1px solid var(--soft);
  font: 400 11px/1.6 var(--mono); letter-spacing: 0.02em; text-transform: none; color: var(--grey);
}
.sheet .help {
  margin: 8px 0 0; max-width: 42em;
  font: 400 13.5px/1.65 var(--serif); letter-spacing: 0; color: var(--grey);
  overflow-wrap: anywhere;
}
.sheet .part textarea {max-width: 640px}
.sheet input.w-s, .sheet select.w-s {max-width: 240px}
.sheet input.w-m, .sheet select.w-m {max-width: 400px}
.sheet input.w-l, .sheet select.w-l {max-width: 560px}
.sheet input.w-code {width: 240px; max-width: 100%}
.sheet .duo {gap: 0 24px; max-width: 760px}
.sheet .duo > div {min-width: 0}
.sheet .part > div > .duo:first-child .fld > label {margin-top: 0}
.sheet fieldset.orgonly {
  margin: 30px 0 0; padding: 0 0 0 18px; min-width: 0;
  border: 0; border-left: 2px solid var(--ink);
}
.sheet fieldset.orgonly > legend {float: left; width: 100%; margin: 0; padding: 0}
.sheet fieldset.orgonly > legend + .fld > label {clear: both; padding-top: 6px; margin-top: 0}
.sheet fieldset.orgonly[hidden] {display: none}
.sheet .fixed {margin: 0 0 4px; font-size: 15px; line-height: 1.6}
.sheet .fixed .label {margin: 0 0 6px}

/* one action row per section: rule above, button aligned with the fields */
.sheet .act {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px;
  margin: 28px 0 0; padding: 24px 0 0;
  border-top: 1px solid var(--ink);
}
.sheet .act button, .sheet .act .btn {margin: 0}
.sheet .act form {display: flex; margin: 0}
.sheet .act .why {flex: 1 1 18em; margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--grey)}
.sheet .submitrow {
  display: grid; grid-template-columns: 232px minmax(0, 1fr);
  gap: 12px clamp(28px, 5vw, 72px); padding: 28px 0 0;
}
.sheet .submitrow button {min-width: 12em}

/* custom checkbox: terms and data scopes (18px square, native input kept for a11y) */
.sheet label.tick {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 30px 0 0; max-width: 40em;
  font: 400 15px/1.6 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink);
  cursor: pointer;
}
.sheet label.tick a {color: inherit; text-underline-offset: 3px}
.sheet label.tick input[type="checkbox"],
.sheet .scopes input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  display: inline-block; flex: none;
  width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper) no-repeat center / 12px 12px;
  cursor: pointer; vertical-align: middle; accent-color: auto;
}
.sheet label.tick input[type="checkbox"]:checked,
.sheet .scopes input[type="checkbox"]:checked {
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 6.2l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E");
}
.sheet .scopes input[type="checkbox"]:disabled {opacity: 0.4; cursor: default}

/* icon picker: 64px tile, hidden native control, text button and file name */
.c-vh {
  position: absolute !important; width: 1px !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.sheet .iconpick {display: flex; align-items: flex-start; gap: 20px; margin-top: 26px}
.sheet #icon-preview {margin: 0}
.sheet .iconpick .tile {width: 64px; height: 64px; font-size: 26px}
.sheet .iconpick .tile img {object-fit: cover}
.sheet .iconpick .tile small {
  padding: 4px; text-align: center;
  font: 500 10px/1.3 var(--mono); letter-spacing: 0.04em; color: var(--grey);
}
.sheet .iconpick-main {min-width: 0; flex: 1}
.sheet .iconpick-main > .label {margin: 0 0 8px}
.sheet .pickrow {display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px}
.sheet label.pick {
  margin: 0; min-height: 40px; padding: 8px 16px;
  font: 600 14px/1.3 var(--serif); letter-spacing: 0.02em; text-transform: none; color: var(--ink);
}
.sheet label.pick:hover {background: var(--ink); color: var(--paper)}
.sheet .c-vh:focus-visible + label.pick {outline: 2px solid var(--accent); outline-offset: 2px}
.sheet .filename {min-width: 0; font: 12.5px/1.5 var(--mono); color: var(--grey); overflow-wrap: anywhere}

/* what users will see: a small sign-in pane in the section's left column */
.sheet .pv {margin: 26px 0 0; max-width: 300px}
.sheet .pv figcaption {
  margin: 0 0 8px;
  font: 500 11px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey);
}
.sheet .pv-screen {padding: 16px 16px 18px; background: var(--black); color: var(--paper)}
.sheet .pv-k {
  margin: 0 0 10px;
  font: 500 10px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
}
.sheet .pv-h {margin: 0; font: 900 19px/1.28 var(--serif); color: var(--paper); overflow-wrap: anywhere}
.sheet .pv-h b {font-weight: 900; color: var(--paper)}
/* a host in the title sits on its own line, a size down, so an ordinary host is never cut mid-word */
.sheet .pv-h b[data-mode="host"] {display: block; margin-top: 2px; font-size: 16px; line-height: 1.35}
.sheet .pv-app {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.sheet .pv-app .tile {width: 36px; height: 36px; border-color: var(--paper); font-size: 16px}
.sheet .pv-meta {display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0}
.sheet .pv-name {font-size: 14px; font-weight: 700; overflow-wrap: anywhere}
.sheet .pv-claimed {font-size: 13px; color: #e4e4e4; overflow-wrap: anywhere}
.sheet .pv-tag {font: 500 10px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim)}
.sheet .pv-tag.warn {padding: 1px 6px; background: var(--warn); color: var(--ink); font-weight: 700}
.sheet .pv-note {margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--grey)}

/* notification addresses, each verified on its own */
.sheet .contacts {list-style: none; margin: 14px 0 0; padding: 0; max-width: 640px; border-top: 1px solid var(--soft)}
.sheet .contacts li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 11px 0; border-bottom: 1px solid var(--soft);
}
.sheet .contacts code {flex: 1 1 14em; min-width: 0; font: 13px/1.5 var(--mono); overflow-wrap: anywhere}
.sheet .contacts .st {font: 500 11.5px/1.5 var(--mono); letter-spacing: 0.03em; color: var(--grey)}
.sheet .contacts .st.ok {color: var(--ink); font-weight: 700}
.sheet .contacts .cv {display: flex; flex-wrap: wrap; gap: 8px 12px; flex-basis: 100%}
.sheet .contacts form {display: flex; margin: 0}
.sheet .contacts form + form input {border-right: 0}
.sheet .part button.small, .sheet button.small {min-height: 38px; margin: 0; padding: 7px 14px; font-size: 13.5px}
.sheet input.w-code6 {
  width: 8.5em; min-height: 38px; padding: 6px 10px;
  font-size: 14px; letter-spacing: 0.22em;
}

/* app type picker */
.sheet fieldset.types {margin: 0 0 6px; padding: 0; border: 0; min-width: 0}
.sheet fieldset.types > legend {margin: 0 0 8px; padding: 0}
.sheet .typegrid {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 760px}
.sheet label.type {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  margin: 0; padding: 14px 14px 16px;
  border: 1px solid var(--ink);
  font: 400 14px/1.55 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink);
  cursor: pointer;
}
.sheet label.type + label.type {border-left: 0}
.sheet label.type:has(input:checked) {outline: 2px solid var(--ink); outline-offset: -2px; z-index: 1}
.sheet label.type input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 3px;
  border: 1px solid var(--ink); border-radius: 0; background: var(--paper); background-clip: content-box;
}
.sheet label.type input:checked {background-color: var(--ink)}
.sheet label.type b {display: block; font-size: 15px; font-weight: 700}
.sheet label.type small {display: block; margin-top: 4px; font-size: 13px; line-height: 1.55; color: var(--grey)}
.sheet .uricheck {
  margin: 10px 0 0; padding: 10px 14px; max-width: 640px; list-style: none;
  border: 1px solid var(--bad); border-left-width: 3px;
  font: 12.5px/1.6 var(--mono); color: var(--bad); overflow-wrap: anywhere;
}
.sheet [data-for][hidden], .sheet .uricheck[hidden] {display: none}

/* credentials: one ruled table; "Manage" opens a panel under its row */
#credentials table.creds {min-width: 0}
.sheet .credbar {display: flex; flex-wrap: wrap; justify-content: flex-end; margin: 0 0 18px}
.sheet details.addcred {width: 100%}
.sheet details.addcred > summary {
  list-style: none; display: flex; width: fit-content; margin: 0 0 0 auto; padding: 8px 16px; min-height: 40px;
  font-size: 14px;
}
.sheet details.addcred > summary::-webkit-details-marker {display: none}
.sheet details.addcred[open] > summary {background: var(--ink); color: var(--paper)}
.sheet .addpanel {
  margin-top: 14px; padding: 22px 0 4px 20px;
  border-left: 3px solid var(--ink);
}
.sheet table.creds {
  width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink);
  font-size: 14.5px; line-height: 1.6;
}
.sheet table.creds th {
  padding: 10px 16px 10px 0; border-bottom: 1px solid var(--ink);
  text-align: left; white-space: nowrap;
  font: 500 11.5px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey);
}
.sheet table.creds tbody {position: relative}
.sheet table.creds tr.row td {padding: 14px 16px 14px 0; border-bottom: 1px solid var(--soft); vertical-align: top}
.sheet table.creds tr.off td {color: var(--grey)}
.sheet .creds .c-name b {display: block; font-weight: 700; overflow-wrap: anywhere}
.sheet .creds .c-name small {display: block; margin-top: 2px; font-size: 13px; color: var(--grey)}
.sheet .creds code {font: 12.5px/1.6 var(--mono); white-space: nowrap}
.sheet .creds .idcell {display: flex; flex-direction: column; align-items: flex-start; gap: 6px}
.sheet .creds .c-key code {display: block}
.sheet .creds em {font: 11px/1.6 var(--mono); font-style: normal; letter-spacing: 0.04em; color: var(--grey)}
.sheet .creds .c-used {font: 12px/1.6 var(--mono); white-space: nowrap}
.sheet .creds td.c-more {width: 84px; padding-right: 0}
.sheet .creds tr.panel td {padding: 0; border: 0}
.sheet .creds details.manage > summary {
  position: absolute; top: 12px; right: 0;
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font: 500 11.5px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
}
.sheet .creds details.manage > summary::-webkit-details-marker {display: none}
.sheet .creds details.manage > summary::before {width: auto}
.sheet .creds details.manage[open] > summary {background: var(--ink); color: var(--paper)}
.sheet .creds details.manage > summary:hover {background: var(--ink); color: var(--paper)}
.sheet .cred-panel {
  margin: 0; padding: 22px 0 30px 20px;
  border-left: 3px solid var(--ink); border-bottom: 1px solid var(--soft);
}
.sheet .cred-panel .meta {
  display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 20px;
  font: 12px/1.6 var(--mono); color: var(--grey);
}
.sheet .cred-panel .meta dt {display: inline; margin: 0 6px 0 0; font: inherit; letter-spacing: 0; text-transform: none}
.sheet .cred-panel .meta dd {display: inline; color: var(--ink)}
.sheet .keys {margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--ink)}
.sheet .keys h3 {margin: 0 0 6px; font-size: 18px; font-weight: 900}
.sheet .keyrow {
  display: grid; grid-template-columns: 15em minmax(0, 1fr); align-items: center; gap: 8px 20px;
  padding: 12px 0; border-bottom: 1px solid var(--soft);
}
.sheet .keyrow form {margin: 0}
.sheet .part .keyrow button {width: 100%; min-height: 40px; margin: 0; padding: 8px 14px; font-size: 13.5px}
.sheet .keyrow p {margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--grey)}
.sheet .keyrow p.bad {color: var(--bad)}

/* danger styling: delete, revoke, disable */
.sheet button.danger {background: transparent; color: var(--bad); border-color: var(--bad)}
.sheet button.danger:hover:not(:disabled) {background: var(--bad); color: var(--paper)}
.sheet .part.danger {margin-top: 32px; border-top: 1px solid var(--bad)}
.sheet .part.danger > header h2 {color: var(--bad)}
.sheet .part.danger > header p {color: var(--bad)}

/* data scopes */
#scope table.scopes {min-width: 0}
#scope .scopes input[name^="purpose_"] {min-width: 0}
.sheet .scopes td {vertical-align: middle}
.sheet .scopes td.sc {white-space: nowrap; width: 1%}
.sheet .scopes .scopename {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font: 13px/1.4 var(--mono); letter-spacing: 0; text-transform: none; color: var(--ink);
}
.sheet .scopes .scopename input {margin: 0}
.sheet .scopes .scopename code {font: 13px/1.4 var(--mono); text-transform: lowercase}
.sheet .scopes .req {
  margin-left: 10px; padding: 0 6px; border: 1px solid var(--soft);
  font: 11px/1.6 var(--mono); color: var(--grey);
}
.sheet .scopes td.pu {width: 46%}
.sheet .scopes td.pu input {padding: 9px 12px; font-size: 14px}
.sheet .scopes .fixedpurpose {color: var(--grey)}

/* domain verification */
.sheet .domain + .domain {margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--soft)}
.sheet .domain-head {display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px}
.sheet .domain h3 {margin: 0; font: 700 17px/1.4 var(--mono); overflow-wrap: anywhere}
.sheet .dstate {
  padding: 2px 8px; border: 1px dashed var(--ink);
  font: 500 11.5px/1.5 var(--mono); letter-spacing: 0.04em; white-space: nowrap;
}
.sheet .dstate.ok {border-style: solid; background: var(--ink); color: var(--paper)}
.sheet .dstate.bad {border-style: solid; border-color: var(--bad); color: var(--bad)}
.sheet .dstate time {color: inherit}
.sheet .either {margin: 14px 0 0; font: 500 11.5px/1.5 var(--mono); letter-spacing: 0.06em; color: var(--grey)}
.sheet .way {margin-top: 18px; max-width: 760px}
.sheet .way > .label {margin: 0 0 4px; color: var(--ink); font-weight: 700}
.sheet .way > .help {margin: 0 0 10px}
.sheet .record {grid-template-columns: 7.5em minmax(0, 1fr) auto}
.sheet .record b {font-weight: 400; overflow-wrap: anywhere; min-width: 0}

/* verification status */
.sheet .check {max-width: 760px}
.sheet .check li > span {overflow-wrap: anywhere}
.sheet .check a {font-size: 14px; white-space: nowrap; color: var(--ink); text-underline-offset: 3px}
.sheet .part > div > .label:first-child {margin-top: 0}
.sheet .progress {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  margin: 0 0 24px; padding: 14px 16px; max-width: 760px;
  border: 1px dashed var(--ink); font-size: 15px; line-height: 1.6;
}
.sheet .progress.done {border-style: solid; border-left-width: 4px}
.sheet .progress b {font-weight: 700}
/* a filed appeal, read back to its author */
.sheet .fixed.filed {max-width: 760px; margin: 0 0 4px}
.sheet .fixed.filed blockquote {
  margin: 0; padding: 12px 16px; border-left: 1px solid var(--ink);
  font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere;
}
.sheet .check.doms li {grid-template-columns: 7.5em minmax(0, 1fr) auto}
.sheet .check.doms code {overflow-wrap: anywhere}
.sheet .check.doms .k {font: 12.5px/1.6 var(--mono); white-space: nowrap}
.sheet .check.doms .k time {color: inherit}
.sheet .quota {display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 28px 0 0; font: 15px/1.4 var(--mono)}
.sheet .quota .label {margin: 0}
.sheet .quota .num {font-size: 34px; line-height: 1}
.sheet .quota + .help {margin-top: 8px}
.sheet .act form.inline button {min-width: 11em}
.sheet table.grid td.k {font: 12.5px/1.6 var(--mono); white-space: nowrap}
.sheet table.grid td.k time {color: inherit}

/* app list */
.sheet .apphead h2 {margin: 0; overflow-wrap: anywhere}
.sheet .idline + .idline {margin-top: 8px}
.sheet .idline .cname {flex: 0 0 auto; min-width: 6.5em; font-size: 14px; font-weight: 700}
.sheet .num, .sheet .stats .num {font-family: var(--serif); font-weight: 900; font-variant-numeric: lining-nums tabular-nums}
.sheet .start {margin-top: 28px; padding: 32px 28px; border: 1px dashed var(--ink)}
.sheet .start > p {margin: 0; font-size: 19px; line-height: 1.6; max-width: 30em}
.sheet .start .act {margin-top: 22px; padding-top: 0; border-top: 0; gap: 14px 24px}
.sheet .start .textlink {color: var(--ink); text-underline-offset: 4px}
.sheet .empty a {color: var(--ink); white-space: nowrap}

/* notifications: whole row links to the app */
.sheet table.notices tr {position: relative}
.sheet table.notices td.ev a {color: var(--ink); font-weight: 700; text-decoration: none}
.sheet table.notices td.ev a::after {content: ""; position: absolute; inset: 0}
.sheet table.notices tbody tr:hover td.ev a {text-decoration: underline; text-underline-offset: 3px}
.sheet table.notices tbody tr:hover {outline: 1px solid var(--ink); outline-offset: -1px}
.sheet table.notices td {overflow-wrap: anywhere}

/* ≤1023px: credentials become one block per credential */
@media (max-width: 1023px) {
  .sheet table.creds thead {display: none}
  .sheet table.creds, .sheet table.creds tbody, .sheet table.creds tr, .sheet table.creds td {display: block; width: auto}
  .sheet table.creds tbody {border-bottom: 1px solid var(--soft)}
  .sheet table.creds tr.row td {padding: 4px 0; border: 0}
  .sheet table.creds tr.row td.c-name {padding: 16px 92px 6px 0}
  .sheet table.creds tr.row td.c-more {display: none}
  .sheet table.creds tr.row td[data-label]::before {
    content: attr(data-label); display: block; margin: 6px 0 2px;
    font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey);
  }
  .sheet table.creds tr.row td:last-of-type {padding-bottom: 14px}
  .sheet .creds .idcell {flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px}
  .sheet .creds details.manage > summary {top: 16px}
  .sheet .cred-panel {padding: 18px 0 24px 14px; border-bottom: 0}
  .sheet .creds tr.row td.c-used {padding-bottom: 16px}
}

/* ≤860px: single column parts; scopes become blocks */
@media (max-width: 860px) {
  .sheet .submitrow {grid-template-columns: minmax(0, 1fr)}
  .sheet .submitrow > div:empty {display: none}
  .sheet .pv {max-width: 340px}
  .sheet .typegrid {grid-template-columns: minmax(0, 1fr)}
  .sheet label.type + label.type {border-left: 1px solid var(--ink); border-top: 0}
  .sheet table.scopes thead {display: none}
  .sheet table.scopes, .sheet table.scopes tbody, .sheet table.scopes tr, .sheet table.scopes td {display: block; width: auto}
  .sheet table.scopes tr {padding: 14px 0; border-bottom: 1px solid var(--soft)}
  .sheet table.scopes td, .sheet .scopes td.sc, .sheet .scopes td.pu {width: auto; padding: 3px 0; border: 0; white-space: normal}
  .sheet table.scopes td.pu::before {
    content: attr(data-label); display: block; margin: 8px 0 4px;
    font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey);
  }
  .sheet .keyrow {grid-template-columns: minmax(0, 1fr)}
  .sheet .part .keyrow button {width: auto}
  .sheet .record {grid-template-columns: minmax(0, 1fr) auto}
  .sheet .record > span:first-child {grid-column: 1 / -1}
}

/* ≤640px: ledgers become blocks, sticky nav scrolls sideways instead of wrapping */
@media (max-width: 640px) {
  .sheet .subnav.spy {flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-right: 1px}
  .sheet .subnav.spy::-webkit-scrollbar {display: none}
  .sheet .subnav.spy a {flex: none; white-space: nowrap}
  /* The fade on the right edge says there is more; the last item can scroll fully clear of it. */
  .sheet .subnav.spy {
    padding-right: 40px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
  }
  .sheet .subnav.spy.at-end {-webkit-mask-image: none; mask-image: none}
  /* Console tabs stay on one row: equal-width cells, tighter padding. */
  .sheet .subnav:not(.spy) {flex-wrap: nowrap}
  .sheet .subnav:not(.spy) a {flex: 1 1 auto; min-width: 0; padding: 11px 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis}
  .sheet .part {scroll-margin-top: 64px}
  .sheet table.blocks:not(.scopes) thead {display: none}
  .sheet table.blocks:not(.scopes), .sheet table.blocks:not(.scopes) tbody,
  .sheet table.blocks:not(.scopes) tr, .sheet table.blocks:not(.scopes) td {display: block; width: auto}
  .sheet table.blocks:not(.scopes) tr {padding: 12px 0; border-bottom: 1px solid var(--soft)}
  .sheet table.blocks:not(.scopes) td {padding: 2px 0; border: 0; white-space: normal}
  .sheet table.blocks:not(.scopes) td[data-label]::before {
    content: attr(data-label); display: block; margin: 6px 0 1px;
    font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey);
  }
  .sheet table.blocks td.k {white-space: normal}
  .sheet .iconpick {gap: 14px}
  .sheet .act .why {flex-basis: 100%}
  .sheet .submitrow button {width: 100%}
  .sheet .start {padding: 24px 18px}
  .sheet .start > p {font-size: 17px}
  .sheet .addpanel, .sheet .cred-panel {padding-left: 12px}
  .sheet .contacts form {flex: 1 1 auto}
  .sheet .contacts form + form {flex: 1 1 100%}
  .sheet .contacts form + form input {flex: 1 1 auto; width: auto}
  .sheet .idline .cname {flex-basis: 100%}
  .sheet .num {font-family: var(--serif); font-weight: 900}
}
@media (max-width: 360px) {
  .sheet .iconpick {flex-direction: column}
  .sheet .creds code {white-space: normal; overflow-wrap: anywhere}
}

/* ── M8 final pass after reading the screenshots ── */
.review-sheet .part, .review-sheet .part > div, .review-sheet form, .review-sheet .verdict > * {min-width: 0}
.review-sheet select, .review-sheet input, .review-sheet textarea {max-width: 100%}
.review-sheet dl.reason dd {overflow-wrap: anywhere; word-break: normal}
@media (max-width: 860px) {
  .review-sheet .part {grid-template-columns: minmax(0, 1fr)}
  .review-sheet .scroll {max-width: 100%}
}
/* Phones: the consent decision belongs on the first screen. */
@media (max-width: 640px) {
  .lead > .in {padding-top: 18px; padding-bottom: 6px}
  .lead .kicker {margin-bottom: 10px}
  .lead .client {margin-top: 12px; padding-block: 10px}
  .work > .in {padding-top: 18px}
  .work .cap {padding: 9px 12px}
  .work h2.label {margin-top: 16px; padding-bottom: 8px}
  .work .ledger {margin-bottom: 12px}
  .work .ledger li {padding: 8px 0}
  .work .ledger .said {display: none}
  .work .ledger .purpose {margin-top: 0; font-size: 13px}
}
.review-sheet .next {display: block; overflow-wrap: anywhere}
.review-sheet .next a {font-weight: 400}
.review-sheet .next time {white-space: normal}

.sheet .part {scroll-margin-top: 76px}
@media (max-width: 860px) {
  .review-sheet .scroll > table:not(.info) {min-width: 680px}
  .review-sheet .scroll > table:not(.info) :is(td, th) {word-break: normal; overflow-wrap: normal}
}
@media (max-width: 860px) {
  .review-sheet .scroll > table:not(.info) td:not(:last-child) {white-space: nowrap}
  .review-sheet .scroll > table:not(.info) td:last-child {min-width: 220px}
  .stats > div:nth-child(odd) {padding-left: 0; border-left: 0}
  .stats > div:nth-child(n + 3) {border-top: 1px solid var(--soft)}
}

.review-sheet td.what {white-space: nowrap}
.review-sheet table.reports td.why {min-width: 12em}
/* Japanese system Mincho stops at W6, a step lighter than the other languages' 900 headings;
   a hairline stroke brings the large headings to the same colour without a new font file. */
:lang(ja) :is(h1, .hero h1, .lead h1) {
  -webkit-text-stroke: 0.012em currentColor;
}
/* Korean breaks between words, never inside one; long hosts and addresses may still wrap. */
:lang(ko) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ── positioning (M17): hero sub-lines, selling points, FAQ, footer line ── */
.hero .lede .who {
  display: block;
  margin-bottom: 6px;
  font: 500 11.5px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.hero .lede + .lede {
  margin-top: 18px;
}
/* Japanese headings break between phrases, not inside a katakana word. */
:lang(ja) :is(h2.sec, .points h3, .faq h2, .faq h3) {
  word-break: auto-phrase;
}
.points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 40px 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.points li {
  padding: 24px 28px 32px 0;
  border-bottom: 1px solid var(--ink);
}
.points li:not(:nth-child(3n + 1)) {
  padding-left: 28px;
  border-left: 1px solid var(--ink);
}
.points h3 {
  margin: 0 0 12px;
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 700;
  line-height: 1.35;
}
.points p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #2b2b2b;
}
.faq h2 {
  margin: 0 0 28px;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 900;
  line-height: 1.2;
}
.faq dl {
  margin: 0;
  border-top: 2px solid var(--ink);
}
.faq dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 8px clamp(24px, 4vw, 56px);
  padding: 22px 0;
  border-bottom: 1px solid var(--ink);
}
.faq dt {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
}
.faq dt h3,
.doc .faq dt h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}
.faq dd {
  margin: 0;
}
.faq dd p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: #2b2b2b;
  overflow-wrap: anywhere;
}
.doc .faq h2 {
  font-size: 28px;
  margin-bottom: 20px;
}
.doc .faq dl > div {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.doc .faq {
  border-bottom: 0;
}
footer .about {
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.7;
}
footer .about b {
  font-weight: 700;
  color: var(--paper);
}
.fine.welcome {
  margin: 0 0 14px;
}
.review-sheet table.feedback .tag.report {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
@media (max-width: 860px) {
  .points {
    grid-template-columns: minmax(0, 1fr);
  }
  .points li:not(:nth-child(3n + 1)) {
    padding-left: 0;
    border-left: 0;
  }
  .faq dl > div {
    grid-template-columns: minmax(0, 1fr);
  }
}
