/* Codex reset history - single stylesheet, no frameworks */
:root {
  --ink: #14181f;
  --ink-soft: #4a5262;
  --line: #dfe3ea;
  --bg: #f6f7f9;
  --card: #ffffff;
  --accent: #2f5597;
  --accent-soft: #e8eefb;
  --ok: #1f7a45;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* header */
.site-head { background: #14181f; color: #fff; padding: 28px 0 24px; }
.site-head h1 { margin: 0 0 6px; font-size: 1.9rem; line-height: 1.2; letter-spacing: -0.01em; }
.lede { margin: 0; color: #c6ccd8; max-width: 46ch; }

main { padding: 20px 0 8px; }
section { margin: 0 0 22px; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }

/* status panel - first screen */
.status {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
}
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-k { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.stat-v { font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.stat-n { font-size: .85rem; color: var(--ink-soft); }
.stat:first-child .stat-v { color: var(--ok); }
.status-foot { margin: 14px 0 0; font-size: .82rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 10px; }

/* download */
.dl {
  background: var(--accent-soft);
  border: 1px solid #cfdcf6;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.dl h2 { margin: 0 0 2px; font-size: 1.05rem; }
.dl p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 8px;
  white-space: nowrap;
}
.btn:hover, .btn:focus { background: #24437a; }

/* table */
.history { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.scroll-hint { display: none; font-size: .82rem; color: var(--ink-soft); margin: 0 0 10px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
thead th {
  text-align: left;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  background: var(--accent);
  padding: 10px 12px;
  white-space: nowrap;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .92rem; }
tbody tr:nth-child(even) { background: #fafbfd; }
.c-date { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.c-src a { color: var(--accent); text-decoration: none; word-break: break-all; }
.c-src a:hover { text-decoration: underline; }
.table-foot { margin: 12px 0 0; font-size: .82rem; color: var(--ink-soft); }

/* prose sections */
.who, .how, .faq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.who p, .how p { margin: 0 0 10px; color: #2b3242; }
.who ul, .how ol { margin: 0; padding-left: 20px; }
.who li, .how li { margin-bottom: 8px; color: #2b3242; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: #2b3242; }

.site-foot { padding: 18px 0 30px; color: var(--ink-soft); font-size: .85rem; }
.site-foot p { margin: 0; }

/* mobile */
@media (max-width: 720px) {
  .site-head h1 { font-size: 1.55rem; }
  .status-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .stat:last-child { border-bottom: 0; padding-bottom: 0; }
  .stat-v { font-size: 1.3rem; }
  .dl { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; text-align: center; }
  .scroll-hint { display: block; }
}


/* ---- added for the single-page build ---- */
.article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.article > h2:first-child { margin-top: 0; }
.article h2 { font-size: 1.2rem; margin: 26px 0 10px; }
.article h3 { font-size: 1rem; margin: 0 0 2px; }
.article p { margin: 0 0 12px; color: #2b3242; }
.article ul, .article ol { margin: 0 0 14px; padding-left: 22px; }
.article li { margin-bottom: 6px; color: #2b3242; }
.article code {
  background: #eef1f6;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  word-break: break-word;
}
.article pre.code {
  background: #14181f;
  color: #e6ebf3;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: .85rem;
  line-height: 1.5;
}
.article pre.code code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 1em;
  white-space: pre;
}
.article .table-scroll { margin: 0 0 14px; }
.article table thead th { font-size: .74rem; }
.dl-inline { margin: 18px 0 6px; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid #cfdcf6;
}
.btn-ghost:hover, .btn-ghost:focus { background: #dfe8fa; }

@media (max-width: 720px) {
  .article { padding: 18px 16px; }
  .article table { min-width: 640px; }
  .dl-actions { width: 100%; }
  .dl-actions .btn { flex: 1 1 100%; }
}

@media print {
  body { background: #fff; }
  .site-head, .dl, .site-foot, .scroll-hint, .status { display: none !important; }
  .article, .history, .who, .how, .faq { border: 0; padding: 0; }
  .article table, table { min-width: 0; font-size: 10.5px; }
  .table-scroll { overflow: visible; }
  thead th { color: #000; background: #e8eefb; }
}
