:root {
  --ink: #1c1917;
  --muted: #6b625a;
  --paper: #f7f1e7;
  --panel: #fffaf1;
  --line: #decfb9;
  --accent: #b45309;
  --accent-dark: #7c2d12;
  --green: #166534;
  --yellow: #a16207;
  --red: #991b1b;
  --shadow: 0 18px 50px rgba(77, 49, 22, .12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(180,83,9,.08), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(124,45,18,.10), transparent 30%),
    var(--paper);
}

button, input, textarea { font: inherit; }
button {
  border: 0;
  background: var(--accent-dark);
  color: white;
  padding: .8rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(124,45,18,.16);
}
button:hover { transform: translateY(-1px); }
button.ghost {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}
button.danger { color: var(--red); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: .88;
  margin: .2rem 0 1rem;
  letter-spacing: -.07em;
}
.lede { max-width: 760px; font-size: 1.25rem; line-height: 1.55; color: #453a31; }
.eyebrow {
  margin: 0 0 .35rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 800;
  color: var(--accent);
}
.score-card {
  align-self: end;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px 36px 2px 2px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.score-card span, .score-card small { display: block; color: #d9c9b5; }
.score-card strong { display: block; font-size: 3.4rem; letter-spacing: -.07em; margin: .25rem 0; }

.layout {
  max-width: 1180px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .8fr);
  gap: 1rem;
}
.panel {
  background: rgba(255,250,241,.86);
  border: 1px solid var(--line);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.wide { grid-column: 1 / -1; }
.section-heading, .button-row, .meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
h2 { margin: 0 0 1rem; font-size: 1.8rem; letter-spacing: -.04em; }
label { display: block; color: #3f342b; font-weight: 700; margin: 1rem 0; }
input, textarea {
  width: 100%;
  margin-top: .45rem;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  padding: .85rem;
  border-radius: 2px;
  line-height: 1.45;
}
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; }
.field-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.privacy, footer { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .88rem; }

.checklist { display: grid; gap: .7rem; }
.check-item {
  border: 1px solid var(--line);
  padding: .8rem;
  background: #fffdf8;
}
.check-item strong { display: block; }
.check-item span { color: var(--muted); font-size: .92rem; }
.check-item.pass { border-left: 6px solid var(--green); }
.check-item.warn { border-left: 6px solid var(--yellow); }
.check-item.fail { border-left: 6px solid var(--red); }
.fluff-meter { margin-top: 1.2rem; }
.meter { height: 10px; border: 1px solid var(--line); background: #efe1cc; }
.meter span { display: block; height: 100%; width: 0%; background: var(--accent); transition: width .2s ease; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}
.card {
  min-height: 180px;
  background: #fffdf8;
  border: 1px solid var(--line);
  padding: 1rem;
  position: relative;
}
.card h3 { margin: 0 0 .7rem; font-size: 1.05rem; }
.card p { color: #473b31; line-height: 1.45; }
.card .tag { font-family: ui-sans-serif, system-ui, sans-serif; font-size: .72rem; color: var(--accent); font-weight: 800; text-transform: uppercase; }
.empty-state { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; }

.matrix {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  border: 1px solid var(--line);
  overflow-x: auto;
}
.matrix-cell {
  min-height: 145px;
  padding: .85rem;
  border-right: 1px solid var(--line);
  background: #fffdf8;
}
.matrix-cell:last-child { border-right: 0; }
.matrix-cell strong { display: block; margin-bottom: .45rem; color: var(--accent-dark); }
.matrix-cell p { margin: 0; line-height: 1.4; color: #473b31; }

.brief-panel textarea { min-height: 320px; }
footer { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem 3rem; }

@media (max-width: 900px) {
  .hero, .layout { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .section-heading, .button-row { align-items: stretch; flex-direction: column; }
}
