/* Validator guide (validators.html): from the shared page, fonts are the system ones (no third-party requests). */
:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}
/* Layout: one narrow reading column; the command is the hero, the block-height ruler is the one ornament. */
:root {
  --bg: #f3f5f8; --surface: #ffffff; --ink: #14203a; --muted: #56627a; --line: #d6dce6;
  --accent: #0b7a75; --accent-ink: #ffffff; --code-bg: #0f1a30; --code-fg: #d7e6ff; --warn: #9a5b00;
  --cjk: "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans CJK SC", "Noto Sans CJK JP", "Noto Sans CJK KR";
  --display: "Bai Jamjuree", "IBM Plex Sans", "IBM Plex Sans Thai", var(--cjk), system-ui, sans-serif;
  --body: "IBM Plex Sans", "IBM Plex Sans Thai", var(--cjk), system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c1322; --surface: #131d31; --ink: #e5ecf7; --muted: #9aa8c0; --line: #26334d;
  --accent: #3cc7bf; --accent-ink: #062523; --code-bg: #070d18; --code-fg: #d7e6ff; --warn: #f0b45a; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0c1322; --surface: #131d31; --ink: #e5ecf7; --muted: #9aa8c0; --line: #26334d;
  --accent: #3cc7bf; --accent-ink: #062523; --code-bg: #070d18; --code-fg: #d7e6ff; --warn: #f0b45a; color-scheme: dark }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.7; }
.wrap { max-width: 1200px; margin: 0 auto; padding-block: 40px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 40px; }
h1, h2 { font-family: var(--display); text-wrap: balance; line-height: 1.25; margin: 0; }
h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
p { margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ruler { height: 10px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px); border-bottom: 1px solid var(--line); }
header { display: grid; gap: 14px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
select { font: 500 14px var(--body); padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:lang(th) body, :lang(th) .lede { line-height: 1.8; }
.lede { color: var(--muted); font-size: 18px; max-width: 60ch; }
section { display: grid; gap: 14px; min-width: 0; }
label { font-weight: 600; font-size: 14px; }
input { font: 500 16px var(--mono); padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); width: 100%; max-width: 320px; box-sizing: border-box; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmd { background: var(--code-bg); color: var(--code-fg); border-radius: 8px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.cmd pre { margin: 0; font: 14px/1.6 var(--mono); white-space: pre-wrap; word-break: break-all; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button, .btn { font: 600 14px var(--body); border-radius: 6px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-block; }
button.ghost { background: transparent; color: var(--code-fg); border-color: #3a4a6a; }
.copied { font-size: 13px; color: var(--accent); }
.cmd .copied { color: #7fe3dc; }
ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); }
ol.steps li { position: relative; padding: 0 0 18px 22px; }
ol.steps li::before { content: attr(data-n); position: absolute; left: -12px; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); color: var(--accent); font: 600 12px/18px var(--mono); text-align: center; }
ol.steps b { font-weight: 600; }
.small { font-size: 14px; color: var(--muted); }
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.way { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--surface); display: grid; gap: 6px; align-content: start; min-width: 0; }
.way h3 { margin: 0; font: 600 16px var(--display); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl { overflow-x: auto; }
td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-family: var(--mono); white-space: nowrap; color: var(--accent); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 14px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; word-break: break-all; }
.note { border-left: 3px solid var(--warn); padding: 4px 0 4px 14px; display: grid; gap: 6px; }
.note strong { color: var(--warn); }
ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
code { font-family: var(--mono); font-size: .92em; }
.calc { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.calc label { display: grid; gap: 4px; }
.calc input { max-width: 160px; }
.out dd { font-size: 16px; color: var(--accent); font-weight: 500; }
button.outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.way .btn, .way button.outline { justify-self: start; }
dialog { width: min(680px, calc(100% - 24px)); max-height: 88vh; box-sizing: border-box; padding: 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font-family: var(--body); line-height: 1.7; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgb(5 10 20 / .55); }
dialog h3 { font: 600 17px var(--display); margin: 18px 0 10px; }
dialog p { margin: 0 0 8px; }
dialog code { word-break: break-word; background: var(--bg); padding: 1px 4px; border-radius: 4px; }
dialog ol.steps li::before { background: var(--surface); }
.g-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); flex: none; }
.g-body { overflow-y: auto; padding: 14px 20px 20px; min-height: 0; }
.g-head h2 { font-size: 20px; }
details { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; background: var(--bg); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; }
.stepbtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.btn.sm, button.sm { font-size: 13px; padding: 6px 12px; }
.btn.outline { background: transparent; color: var(--accent); }
ol.steps li > .small { margin-top: 4px; }
#w-manual { margin-top: 6px; }
.g-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.g-body .cmd { margin-bottom: 6px; }
.cbox { display: flex; align-items: center; gap: 8px; margin: 6px 0; background: var(--code-bg); border-radius: 6px; padding: 6px 8px; }
.cbox code { flex: 1; min-width: 0; color: var(--code-fg); background: transparent !important; word-break: break-all; font-size: 13px; }
.cbox button.cp { flex: none; font-size: 12px; padding: 4px 10px; background: transparent; color: var(--code-fg); border-color: #3a4a6a; }
.g-body a:not(.btn) { color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
button.tile { display: grid; gap: 4px; text-align: left; padding: 16px; border-radius: 10px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); font: 400 14px var(--body); }
button.tile b { font: 600 16px var(--display); color: var(--ink); }
button.tile span { color: var(--muted); }
button.tile:hover { border-color: var(--accent); }
.warnline { color: var(--warn); }
details.more { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 16px; }
details.more > summary { padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; font: 600 20px var(--mono); color: var(--accent); }
details.more[open] > summary::after { content: "−"; }
details.more > summary h2 { font-size: 17px; }
.more-body { display: grid; gap: 14px; padding-bottom: 16px; min-width: 0; }
.more-body > *, .more-body details, .more-body p { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.more-body code { word-break: break-all; }
details.more { min-width: 0; }
[hidden] { display: none !important; }
.ai-log { display: grid; gap: 10px; }
.ai-log:empty { display: none; }
.ai-msg { padding: 10px 12px; border-radius: 10px; max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.ai-msg.me { background: var(--accent); color: var(--accent-ink); justify-self: end; white-space: pre-wrap; max-width: 88%; }
.ai-msg.bot { background: var(--surface); border: 1px solid var(--line); }
.ai-text { white-space: pre-wrap; margin: 4px 0; }
.ai-text code { background: var(--bg); padding: 1px 4px; border-radius: 4px; }
.ai-box { display: grid; gap: 8px; }
.ai-box textarea { min-height: 84px; font-family: var(--mono); font-size: 13px; }
textarea { width: 100%; box-sizing: border-box; min-height: 150px; font: 14px/1.6 var(--body); padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); resize: vertical; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.row.tight { gap: 8px; }
.facts a { color: var(--accent); }
/* the faucet form in "get ZETAPHY" */
.vf input { max-width: none; flex: 1 1 180px; font-size: 14px; }
.vf-msg { margin: 0; min-height: 1.2em; word-break: break-word; }
.vf-msg.ok { color: var(--ok, #1a7f37); }
.vf-msg.bad { color: var(--bad, #b42318); }

/* topics as tabs (validators.js): a scrollable row on phones */
.vtabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: -16px; scrollbar-width: thin; position: sticky; top: 0; z-index: 2; background: var(--bg); padding-top: 8px; }
.vtabs [role="tab"] { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 14px var(--body); cursor: pointer; white-space: nowrap; }
.vtabs [role="tab"][aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vpanel { display: grid; gap: 28px; min-width: 0; }
.vpanel:focus { outline: none; }
.vpanel:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.tab-lede { margin: 0; font-size: 18px; font-weight: 500; }
/* inside the hub (validators.html?embed): no own header, the hub's dark colours */
html.embed { --bg: #10151f; --surface: #0b0f16; --ink: #e8edf5; --muted: #8e9aae; --line: #1f2836; --accent: #7c6cff; --accent-ink: #ffffff; --warn: #f0b45a; color-scheme: dark; }
html.embed header { display: none; }
html.embed .wrap { max-width: none; padding: 0 4px 16px; gap: 24px; }
html.embed .vtabs { position: static; margin-bottom: -8px; padding-top: 0; }
html.embed dialog.placed { position: absolute; margin: 0 auto; bottom: auto; }
/* wide screens: the topics fit in one or two rows (no sideways scroll); the start topic's two parts side by side */
@media (min-width: 641px) {
  .vtabs { flex-wrap: wrap; overflow: visible; }
}
@media (min-width: 1000px) {
  #p-start { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  #p-start > .tab-lede { grid-column: 1 / -1; }
}

.g-offon { display: grid; grid-template-columns: 1fr; gap: 0; }
