/* MissDisgrace.com — theme_11 "Terracotta Workshop Guide". Zero external fonts/CDNs. */
:root {
  --bg: #fbf7f4;
  --surface: #ffffff;
  --ink: #271c19;
  --accent: #c2410c;
  --accent-soft: #fdeee4;
  --muted: #6b5b53;
  --line: #e7ded6;
  --good: #3f7d4e;
  --warn: #a16207;
  --bad: #b3261e;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(1000px 480px at 85% -10%, rgba(194,65,12,0.06), transparent 60%),
    radial-gradient(800px 400px at 5% 0%, rgba(107,91,83,0.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--accent); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.hero { max-width: 1080px; margin: 0 auto; padding: 48px 24px 8px; text-align: center; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0; letter-spacing: -0.01em; font-weight: 700;
}
.hero .accent { color: var(--accent); }
.hero p { color: var(--muted); max-width: 660px; margin: 12px auto 0; }

.progress-wrap { max-width: 560px; margin: 22px auto 0; }
.progress-bar {
  height: 10px; background: var(--line); border-radius: 999px; overflow: hidden;
  border: 1px solid #ded2c8;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #e0703a);
  border-radius: 999px; transition: width .35s ease;
}
.progress-fill.full { background: var(--good); }
#progress-label { display: block; margin-top: 6px; font-size: 0.8rem; }

.tabs {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  max-width: 1080px; margin: 24px auto 0; padding: 0 24px;
}
.tab {
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 18px; font-size: 0.9rem; cursor: pointer;
  font-family: var(--sans);
  transition: color .15s, border-color .15s, background .15s;
}
.tab:hover { color: var(--ink); border-color: var(--accent); }
.tab.active { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.tab.done::after { content: " ✓"; color: var(--good); }
.tab.active.done::after { color: #fff; }

main { max-width: 1080px; margin: 24px auto 64px; padding: 0 24px; }
.tabpane { display: none; }
.tabpane.active { display: block; }

.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 16px;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: 0 1px 2px rgba(39,28,25,0.04);
}
.card h3 {
  margin: 0 0 14px; font-size: 1.02rem; letter-spacing: 0.01em;
  font-family: var(--serif); font-weight: 700;
}
.card h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 8px; vertical-align: 2px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
button {
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 9px 16px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  font-family: var(--sans);
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); font-weight: 500; }
button.ghost:hover { border-color: var(--accent); }
select {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; font-size: 0.88rem; font-family: var(--sans);
}

.grid-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
label { display: block; font-size: 0.82rem; color: var(--muted); }
input, select, textarea {
  width: 100%; margin-top: 5px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  font-size: 0.92rem; font-family: var(--sans);
}
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

.out {
  background: #fdfaf8; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; font-size: 0.88rem; overflow-x: auto; min-height: 2.4em;
}
.out table { border-collapse: collapse; width: 100%; font-size: 0.82rem; }
.out th, .out td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.out th:first-child, .out td:first-child { text-align: left; }
.out th { color: var(--muted); font-weight: 600; }
.out tr.best td { color: var(--good); font-weight: 600; }
.out tr.fail td { color: var(--bad); }
.out tr.pass td { color: var(--good); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: #fdfaf8; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat .k { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat .v { font-size: 1.15rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v.bad { color: var(--bad); }
.stat .v.warn { color: var(--warn); }
.stat .v.good { color: var(--good); }
.stat .v.accent { color: var(--accent); }

.chart { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; overflow-x: auto; }
.chart svg { display: block; min-width: 480px; }

.muted { color: var(--muted); }
.report-md { background: #fdfaf8; border: 1px solid var(--line); border-radius: 10px; padding: 14px; white-space: pre-wrap; font-size: 0.82rem; }
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }
.good-text { color: var(--good); }
.accent-text { color: var(--accent); }

.verdict-badge {
  display: inline-block; font-weight: 700; font-size: 1.3rem;
  padding: 6px 18px; border-radius: 999px; letter-spacing: 0.02em;
}
.verdict-FLIP { background: var(--accent); color: #fff; }
.verdict-HOLD { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.verdict-SELL-LOW { background: #f3e8e4; color: var(--muted); border: 1px solid var(--line); }
.verdict-PARK { background: #efe9e4; color: var(--muted); border: 1px solid var(--line); }

.band-strong { color: var(--good); font-weight: 600; }
.band-moderate { color: var(--warn); font-weight: 600; }
.band-thin { color: var(--accent); font-weight: 600; }
.band-dormant { color: var(--bad); font-weight: 600; }

.foot {
  max-width: 1080px; margin: 0 auto; padding: 28px 24px 48px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
  text-align: center;
}
.foot p { margin: 6px 0; }

@media (max-width: 640px) {
  .hero { padding-top: 32px; }
  .card { padding: 16px; }
}
