/* 18JU Workbench — theme_08 Minimalist Magazine Calculator */
:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --ink: #0f172a;
  --accent: #6d28d9;
  --muted: #475569;
  --line: #e2e8f0;
  --serif: Charter, Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
.masthead {
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 1.25rem 2.5rem;
  text-align: center;
  background: var(--surface);
}
.masthead-inner { max-width: 46rem; margin: 0 auto; }
.kicker {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.1;
}
.tagline { color: var(--muted); font-size: 1.05rem; margin: 0; }
main { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
h3 { font-size: 1.05rem; margin: 0 0 0.9rem; color: var(--accent); }
h4 { font-size: 0.95rem; margin: 1.4rem 0 0.5rem; }
p { max-width: 42rem; }
.small { font-size: 0.85rem; color: var(--muted); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
}
.preset {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 0.6rem;
  cursor: pointer;
  font-family: var(--sans);
}
.preset strong { display: block; }
.preset small { color: var(--muted); }
.preset[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(109,40,217,0.18); }
.config-form label { display: block; margin-bottom: 1rem; font-size: 0.92rem; }
.config-form output { float: right; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
.config-form input[type="range"] { width: 100%; margin-top: 0.35rem; accent-color: var(--accent); }
.check { display: flex !important; align-items: center; gap: 0.5rem; }
.check input { accent-color: var(--accent); }
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 0;
}
.metrics div { border-left: 3px solid var(--accent); padding-left: 0.7rem; }
.metrics dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.metrics dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
#tradeoff-chart { width: 100%; height: auto; display: block; }
.chart-note { font-size: 0.82rem; color: var(--muted); }
.rules-table, .ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.rules-table th, .rules-table td,
.ref-table th, .ref-table td {
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.rules-table th, .ref-table th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.decisions { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.decisions li { padding: 0.35rem 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; margin-right: 0.4rem; }
.badge.flag { background: #fef3c7; color: #92400e; }
.badge.pass { background: #dcfce7; color: #166534; }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.9rem; }
.checklist li { padding: 0.3rem 0 0.3rem 1.6rem; position: relative; }
.checklist li::before { content: '☐'; position: absolute; left: 0; color: var(--muted); }
.checklist li.ok::before { content: '☑'; color: var(--accent); }
.export-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.btn {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.btn:hover { background: #5b21b6; }
.receipt {
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 0.8rem;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
details { border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
summary { cursor: pointer; font-weight: 600; }
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  background: var(--surface);
}
.site-footer a { color: var(--accent); }
.fine { font-size: 0.78rem; }
@media (max-width: 40rem) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
