/* yourheiness.com — theme_01 Editorial Split-Column Reference */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #18181b;
  --accent: #1d4ed8;
  --muted: #52525b;
  --line: #e4e0d8;
  --ok: #0f766e;
  --warn: #b45309;
  --bad: #b91c1c;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---- disclosure banner (above the fold) ---- */
.disclosure {
  background: #fef3c7;
  border-bottom: 1px solid #fbbf24;
  color: #713f12;
  font-size: .9rem;
  padding: .6rem 1rem;
  text-align: center;
}
.disclosure a { color: #92400e; font-weight: 600; }

/* ---- header ---- */
.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 2rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem 1.5rem;
}
.site-head .brand { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; }
.site-head .tag { color: var(--muted); font-style: italic; }
.site-head .meta { margin-left: auto; color: var(--muted); font-size: .85rem; }

/* ---- split layout: sticky TOC rail + workbench column ---- */
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
.toc {
  position: sticky;
  top: 1rem;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}
.toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin: .3rem 0; font-size: .92rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

main { min-width: 0; }
section { margin-bottom: 3rem; scroll-margin-top: 1rem; }
section > h2 { border-bottom: 2px solid var(--ink); padding-bottom: .3rem; }
.lede { color: var(--muted); font-size: 1.05rem; }

/* ---- workbench cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin: 1rem 0;
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem 1.2rem; }
label.field { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .25rem; }
label.field input, label.field select, label.field textarea {
  font: inherit;
  color: var(--ink);
  padding: .45rem .55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
label.check { display: flex; gap: .55rem; align-items: flex-start; padding: .3rem 0; font-size: .92rem; }
label.check input { margin-top: .3rem; accent-color: var(--accent); }
label.check em { color: var(--muted); font-style: normal; font-size: .8rem; }
.error { color: var(--bad); font-size: .88rem; min-height: 1.2em; margin: .4rem 0 0; }
.note { color: var(--muted); font-size: .85rem; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .7rem 1rem;
  margin: .8rem 0;
}
.metrics div { background: #fafaf8; border: 1px solid var(--line); border-radius: 6px; padding: .55rem .7rem; }
.metrics dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.metrics dd { margin: 0; font-family: var(--serif); font-size: 1.15rem; }
.ok { color: var(--ok); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }

svg { width: 100%; height: auto; display: block; background: #fbfaf7; border: 1px solid var(--line); border-radius: 6px; }
.svg-t { font-family: var(--sans); font-size: 12px; fill: var(--muted); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: .8rem 0; }
th, td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
th { background: #f4f1ea; font-family: var(--serif); }
.row-ok td { background: #f0fdfa; }
.row-miss td { background: #fff7ed; }

.json-preview {
  background: #18181b;
  color: #e7e5e4;
  padding: .8rem 1rem;
  border-radius: 6px;
  font-size: .8rem;
  overflow-x: auto;
  max-height: 220px;
}
#p-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: .8rem 0; }
button {
  font: inherit;
  padding: .5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button.secondary { background: transparent; color: var(--accent); }
#p-receipt { font-family: ui-monospace, monospace; font-size: .78rem; color: var(--muted); word-break: break-all; }

/* ---- reference sections ---- */
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.ref-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; }
.ref-card h3 { font-size: 1.05rem; }

/* ---- footer ---- */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem 2rem;
  color: var(--muted);
  font-size: .88rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: center;
}
.site-foot a { color: var(--ink); }

/* ---- print: float plan only ---- */
@media print {
  .disclosure, .toc, nav, #p-actions, .site-head .meta { display: none !important; }
  .layout { display: block; }
  body { background: #fff; }
  .card { border: none; }
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .site-head { padding: 1rem; }
}
