/* Classification: Public */
:root {
  --bg: #f4f1ea;
  --surface: #fbfaf6;
  --surface-2: #ebe7dc;
  --text: #2d3833;
  --muted: #5d6b64;
  --accent: #4f6f61;
  --accent-soft: #dfe7e1;
  --line: #d9d3c5;
  --warn: #8a5a2b;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171c1a;
    --surface: #1e2522;
    --surface-2: #26302c;
    --text: #dde5e0;
    --muted: #a3b1aa;
    --accent: #9cc0ae;
    --accent-soft: #2a3a33;
    --line: #34413b;
    --warn: #e0b07a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 var(--font);
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }
pre { background: var(--surface-2); padding: 1rem; border-radius: var(--radius); overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 64rem; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; max-width: 64rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 650; color: var(--text); text-decoration: none; letter-spacing: 0.01em; }
.brand svg { width: 28px; height: 28px; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
nav.main a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--accent); }

main { padding: 2.5rem 0 3rem; }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.2; margin: 0 0 0.6rem; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; line-height: 1.3; margin: 2.6rem 0 0.6rem; font-weight: 620; }
h3 { font-size: 1.1rem; margin: 1.8rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.3rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.updated { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.8rem; }
.answer { font-size: 1.05rem; }
.answer strong:first-child { color: var(--text); }

.hero { display: grid; gap: 1.5rem; }
.hero img { border-radius: var(--radius); border: 1px solid var(--line); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin: 1.2rem 0;
}
.card > :last-child { margin-bottom: 0; }
.note { background: var(--accent-soft); border-color: transparent; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.grid .card { margin: 0; }
.card h3 { margin-top: 0; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }

.table-scroll { overflow-x: auto; margin: 1rem 0 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps > li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0.1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 0.9rem; }

details { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
details summary { cursor: pointer; font-weight: 600; padding: 0.4rem 0; }

.sources { font-size: 0.92rem; color: var(--muted); }
.sources li { overflow-wrap: anywhere; }

footer.site { border-top: 1px solid var(--line); padding: 1.8rem 0 2.4rem; font-size: 0.9rem; color: var(--muted); }
footer.site .wrap { max-width: 64rem; }
footer.site ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
footer.site a { color: var(--muted); }

/* Sorter tool */
.drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop p { margin: 0.4rem 0; }
.field { margin: 1rem 0; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field .hint { font-size: 0.88rem; color: var(--muted); margin: 0.3rem 0 0; }
input[type="text"], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}
textarea { font-family: var(--mono); font-size: 0.85rem; min-height: 9rem; line-height: 1.5; }
input:focus, textarea:focus, select:focus, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-label { cursor: pointer; }
.file-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.status { color: var(--muted); font-size: 0.95rem; min-height: 1.6em; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; }
.chips li { background: var(--accent-soft); color: var(--text); border-radius: 999px; padding: 0.15rem 0.75rem; font-size: 0.88rem; margin: 0; }
.chips li b { color: var(--accent); margin-left: 0.3rem; }
.path { font-family: var(--mono); font-size: 0.82rem; overflow-wrap: anywhere; }
.tag-src { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.warn { color: var(--warn); }
.hidden { display: none !important; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
