/* Be Vietnam Pro 400 — vietnamese */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/bevietnampro-400-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Be Vietnam Pro 400 — latin */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/bevietnampro-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Be Vietnam Pro 500 — vietnamese */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/bevietnampro-500-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Be Vietnam Pro 500 — latin */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/bevietnampro-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Be Vietnam Pro 700 — vietnamese */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/bevietnampro-700-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* Be Vietnam Pro 700 — latin */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/bevietnampro-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono 500 — vietnamese */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/jetbrainsmono-500-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* JetBrains Mono 500 — latin */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/jetbrainsmono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono 700 — vietnamese */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/jetbrainsmono-700-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* JetBrains Mono 700 — latin */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/jetbrainsmono-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* dedung.com v2 — a plate on a casing. Tokens and reasoning: docs/261125-design-brief-v2.md.
   The page is the device's casing (ground); the content is the rating label stuck on it (plate).
   Every colour is a role. `mark` (pine) is allowed only on a source mark, a link, the focus ring and
   an exact match. danger/warning/caution are the manual's own signal words and nothing else. */

:root {
  --ground: #e8ecee;
  --plate: #ffffff;
  --sheet: var(--plate);
  --tint: #f4f6f7;
  --ink: #0f1417;
  --ink-quiet: #56616a;
  --rule: #c5cdd3;
  --mark: #1c5940;
  --unknown: #7a4a0f;

  --danger: #b3261e;
  --warning: #b44700;
  --caution: #7a5c00;
  --caution-bar: #ffd43b;

  --rail: 9.5rem;
  --measure: 34rem;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --body: "Be Vietnam Pro", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis-weight: none;
}

::selection { background: #cfe3d8; color: var(--ink); }

/* The plate: a ruled label stuck on the casing. */
.sheet {
  max-width: 64rem;
  margin: clamp(1rem, 4vw, 3.5rem) auto;
  padding: clamp(1.5rem, 4.5vw, 3.5rem);
  background: var(--sheet);
  border: 1px solid var(--rule);
}

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wordmark a { color: var(--ink); text-decoration: none; }
.wordmark a:hover { color: var(--mark); }

.note {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-quiet);
}

/* Label margin + one column of prose. */
main > section,
.site-foot {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 0 2.5rem;
  padding: 2.25rem 0;
}

main > section + section { border-top: 1px solid var(--rule); }
main > section:first-child { padding-top: 2.75rem; }

.rail,
h2 {
  margin: 0;
  padding-top: 0.45rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-quiet);
}

h1 {
  margin: 0 0 1.15rem;
  max-width: 24ch;
  text-wrap: balance;
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.col { max-width: var(--measure); }

.lead {
  margin: 0 0 1rem;
  max-width: var(--measure);
  color: var(--ink-quiet);
}

main p { margin: 0 0 1rem; }
main p:last-child { margin-bottom: 0; }

main ul { margin: 0 0 1rem; padding-left: 1.15rem; }
main li { margin-bottom: 0.3rem; }

/* The signature: three marks, learned once, then carried by every fact on the site. */
.key {
  max-width: var(--measure);
  margin: 2rem 0 0;
  padding: 1.1rem 1.25rem 1.25rem;
  background: var(--tint);
  border: 1px solid var(--rule);
}

/* Sentence case: tracked capitals crowd Vietnamese diacritics and read as a template label. */
.key-title,
.risk-title {
  margin: 0 0 0.7rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}

.key dl { margin: 0; }

.key-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0 0.9rem;
  padding: 0.4rem 0;
}

.key-row + .key-row { border-top: 1px solid rgba(22, 33, 28, 0.07); }

.key-row dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.key-row dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-quiet);
}

.mark {
  flex: none;
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
}

.mark-source { background: var(--mark); }
.mark-inferred { border: 1.5px solid var(--ink-quiet); }
.mark-unknown { width: 0.9em; height: 2px; border-radius: 1px; background: var(--unknown); }

/* The scope and the risk key are one shape: a part table, not a row of cards. The risk key has no
   colour: the word carries the level, because the accent here means "this fact has a source". */
.scope,
.risk { margin: 0; }

.scope-row,
.risk-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
}

.scope-row:first-child,
.risk-row:first-child { padding-top: 0; border-top: 0; }

.scope dt { font-size: 0.9375rem; font-weight: 700; }

.risk dt { font-size: 0.9375rem; font-weight: 500; }
.risk-high dt { font-weight: 700; }

.scope dd,
.risk dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-quiet);
}

.risk-key { margin: 1.5rem 0 0; }

a {
  color: var(--mark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { text-underline-offset: 0.3em; }

:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus-visible {
  left: 1rem;
  top: 1rem;
  z-index: 2;
  padding: 0.5rem 0.75rem;
  background: var(--sheet);
  border: 1px solid var(--mark);
}

.next { margin: 0; }

.site-foot {
  margin-top: 0.5rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
}

.site-foot .rail { padding-top: 0; }

.site-foot p {
  margin: 0 0 0.3rem;
  font-size: 0.875rem;
  color: var(--ink-quiet);
}

/* Guide page (docs/261114-guide-page-brief.md): procedure typography on the same sheet. */
.guide-list { list-style: none; padding: 0; }
.guide-list li { margin-bottom: 0.6rem; }
.device { color: var(--ink-quiet); font-size: 0.9375rem; }

.facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; margin: 1.25rem 0 0.75rem; }
.facts dt { font-size: 0.875rem; color: var(--ink-quiet); }
.facts dd { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-weight: 500; }

.models { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; padding: 0; font-family: var(--mono); font-weight: 700; font-size: 1.5rem; }
.models li { margin: 0; }
.label-read { margin: 1rem 0; }
/* The source line here holds a long manual quote, so at 390px the flex row squeezes the date span
   into a one-character column. As a block the mark stays on the first line with the link and the
   date wraps as ordinary text. */
.label-read .src { display: block; }
.label-read .src .mark { margin-right: 0.5rem; }
.label-read p:last-child { margin-bottom: 0; }

/* A recall goes above everything (brief decision 9, law audit S4): a box the eye cannot skip,
   drawn with the ink rule the rest of the sheet uses, not with alarm colour. */
.recall {
  margin: 1.4rem 0 0;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--ink);
  border-left-width: 4px;
}
.recall-label {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.recall .do { font-weight: 500; }
/* The read day is one token, inside parentheses so a wrap before it does not leave a separator
   dangling at the start of a line, and an iso date is never cut at a hyphen. */
.recall .src { flex-wrap: wrap; }
.recall .src-when { white-space: nowrap; }
.recall p:last-child { margin-bottom: 0; }

.fine-line { font-size: 0.875rem; color: var(--ink-quiet); overflow-wrap: anywhere; }
.risk-level { font-size: 1.0625rem; }
.risk-level-high, .stop { font-weight: 700; border-left: 3px solid var(--ink); padding-left: 0.9rem; }
.stop { margin: 0.6rem 0 0; color: var(--ink); }

.procedure { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.procedure > li { position: relative; margin: 0 0 1.6rem; counter-increment: step; }
.procedure > li:last-child { margin-bottom: 0; }
.procedure .do { margin: 0 0 0.25rem; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -2.5rem;
  width: 2rem;
  text-align: right;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
}

.src {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-quiet);
  overflow-wrap: anywhere;
}
.src .mark { position: relative; top: 0.05em; }
.expect { margin: 0.5rem 0 0.2rem; }
.needs .src, .warnings .src { margin-top: 0.15rem; }
.warnings { list-style: none; padding: 0; }

.remedies { margin: 0; }
.remedy { margin-bottom: 1.4rem; }
.remedy:last-child { margin-bottom: 0; }
.remedy dt { font-weight: 700; margin-bottom: 0.25rem; }
.remedy dd { margin: 0; }
.manual + .manual { margin-top: 1.4rem; }

/* One margin becomes a stack. */
@media (max-width: 44rem) {
  .sheet {
    margin: 0;
    border-width: 0 0 1px;
    padding: 1.5rem 1.25rem 1rem;
  }

  main > section,
  .site-foot {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 1.75rem 0;
  }

  main > section:first-child { padding-top: 2rem; }

  .rail,
  h2 {
    padding-top: 0;
    margin-bottom: 0.55rem;
    font-size: 0.875rem;
  }

  h1 { font-size: clamp(1.9rem, 7vw, 2.5rem); }

  .key-row,
  .scope-row,
  .risk-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .key-row { padding: 0.55rem 0; }

  .steps > li { padding-left: 2rem; }
  .steps > li::before { left: 0; width: 1.5rem; text-align: left; font-size: 1.25rem; }
  .models { font-size: 1.4rem; }
}

/* ---- the rating label: the search that is the first screen ---- */

main > section.finder { display: block; padding-bottom: 1.5rem; }
main > section.verdict-block { display: block; }
.finder h1 { margin: 0 0 1.1rem; max-width: 26ch; font-size: clamp(1.25rem, 1.05rem + 1vw, 1.6rem); line-height: 1.25; }

.label {
  max-width: 40rem;
  border: 2px solid var(--ink);
  background: var(--plate);
}

/* The label's printed cell: small-caps mono caption over one large field. */
.label-cell { padding: 0.7rem 1rem 1rem; }

.label-cap {
  display: block;
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

.label-row { display: flex; gap: 0.6rem; align-items: stretch; }

.label-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.label-input::placeholder { color: var(--ink-quiet); opacity: 0.55; font-weight: 500; }
.label-input:focus-visible { outline-offset: 4px; }

.label-go {
  flex: none;
  padding: 0 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--plate);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.label-go:hover { background: var(--mark); border-color: var(--mark); }

.label-hint { margin: 0.7rem 0 0; font-size: 0.9375rem; color: var(--ink-quiet); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the verdict ---- */

.verdict { margin: 0 0 1.25rem; font-size: 1.125rem; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.verdict .code { font-size: 1.25rem; }
.verdict-exact { color: var(--mark); }
.verdict-near { color: var(--unknown); }
.verdict-none { color: var(--ink); }
.verdict .glyph { font-family: var(--mono); }

.code {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

mark {
  background: #ffe9a8;
  color: var(--ink);
  padding: 0 0.05em;
  border-bottom: 2px solid var(--unknown);
}

.finds { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.finds li { margin: 0 0 0.9rem; }
.finds .src { margin: 0.15rem 0 0; }
.finds .lang { font-family: var(--mono); font-size: 0.8125rem; text-transform: uppercase; color: var(--ink-quiet); }
.sub { margin: 1.25rem 0 0.5rem; font-size: 0.9375rem; font-weight: 700; color: var(--ink-quiet); }
.near-list { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.near-list li { margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; align-items: baseline; }

/* ---- brands by kind: a plain text list, never logos ---- */

.brands { list-style: none; margin: 0 0 0.9rem; padding: 0; }
.brands li { margin: 0 0 0.35rem; }
.brands-note { font-size: 0.875rem; color: var(--ink-quiet); }

/* ---- the device page: the plate, the doc lines, the maker's model list ---- */

.device-links { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.device-links li { margin: 0 0 0.4rem; }

.plate { display: flex; flex-wrap: wrap; max-width: 40rem; margin: 0; border: 2px solid var(--ink); background: var(--plate); }
.plate-cell { flex: 1 1 8rem; padding: 0.6rem 1rem 0.8rem; border-right: 1px solid var(--rule); }
.plate-cell:first-child { flex: 2 1 12rem; }
.plate-cell:last-child { border-right: 0; }
.plate dt { font-family: var(--mono); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-quiet); }
.plate dd { margin: 0.2rem 0 0; font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.plate dd.code { font-size: 1.75rem; }
.plate-back { margin: 0.8rem 0 0; font-size: 0.9375rem; }
.doc-line .mark { margin-right: 0.5rem; }
/* .src is a flex row elsewhere; here the date must wrap as ordinary text (same fix as .label-read). */
.finds .src, .col > .src { display: block; }
.col > .src .mark { margin-right: 0.5rem; }

.model-list { list-style: none; padding: 0; margin: 0; columns: 12rem; column-gap: 1.5rem; }
.model-list li { margin: 0 0 0.35rem; break-inside: avoid; }
.model-list .count { display: block; font-size: 0.8125rem; color: var(--ink-quiet); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 44rem) {
  .label-input { font-size: 1.75rem; }
  .label-row { flex-direction: column; }
  .label-go { padding: 0.65rem 1rem; }
  .finder { padding-bottom: 1rem; }
}
