:root {
  --bg: #12140e;
  --bg-raise: #1b1e16;
  --bg-inset: #101209;
  --line: #313628;
  --ink: #f4f1e6;
  --muted: #b7b39d;
  --faint: #8e8b78;
  --gold: #e6b15a;
  --gold-ink: #23190b;
  --pain: #f0a592;
  --pain-bg: #3a241c;
  --req: #b7d7c4;
  --req-bg: #1c2c24;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(230, 177, 90, 0.16), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(224, 122, 95, 0.08), transparent 55%),
    var(--bg);
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: var(--gold-ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 2;
}
.skip:focus { top: 12px; }

.top, main, footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 12px 0 8px;
}

.brand {
  margin: 0 0 4px;
  font-family: Fraunces, Georgia, "Iowan Old Style", serif;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.brand span { color: var(--gold); }

h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.local, footer p, .status, .pane-head span, .hint {
  color: var(--muted);
}

.local { margin: 0; font-size: 0.92rem; text-align: right; }

main {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.pane {
  background: rgba(27, 30, 22, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.paste-pane, .out-pane { padding: 14px; }

.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.pane-head label, .pane-head h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-inset);
  color: var(--ink);
  padding: 12px 14px;
  font: 13.5px/1.45 ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

button {
  font: 600 0.95rem/1 Outfit, ui-sans-serif, system-ui, sans-serif;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}

button.ghost { color: var(--muted); }

button:hover { border-color: var(--gold); }

button:disabled { opacity: 0.45; cursor: not-allowed; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.status { min-height: 1.4em; margin: 10px 2px 0; font-size: 0.92rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

.stat {
  background: var(--bg-inset);
  border-radius: 12px;
  padding: 8px 10px;
}

.stat b {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat.pain b { color: var(--pain); }
.stat.req b { color: var(--req); }
.stat.idea b { color: var(--gold); }

.stat span {
  color: var(--faint);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ideas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card {
  border: 1px solid var(--line);
  border-top: 2px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px 6px;
  background: #161910;
  min-width: 0;
}

.card.pain { border-top-color: #e07a5f; }
.card.req { border-top-color: #7dba96; }
.card.mix { border-top-color: var(--gold); }

.card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.card h3 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pills { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }

.pill {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
}

.pill.pain { background: var(--pain-bg); color: var(--pain); }
.pill.req { background: var(--req-bg); color: var(--req); }

.problem {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.card ol {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 2px;
}

.card li { line-height: 1.3; font-size: 0.88rem; }

.card details { margin-top: 8px; }

.card summary {
  cursor: pointer;
  color: var(--gold);
  font-size: 0.88rem;
}

.quotes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }

.quotes li {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--muted);
}

.kind {
  display: inline-block;
  min-width: 4.2rem;
  margin-right: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.card .copy { margin-top: 8px; min-height: 36px; font-size: 0.85rem; }

.empty {
  margin: 8px 2px 4px;
  color: var(--muted);
  line-height: 1.45;
}

.empty strong { color: var(--ink); font-weight: 600; }

footer { padding: 10px 0 14px; }

@media (min-width: 901px) {
  main { align-items: stretch; }
  .paste-pane { display: flex; flex-direction: column; }
  textarea { flex: 1; min-height: 280px; }
}
footer p { margin: 0; font-size: 0.88rem; }

@media (max-width: 900px) {
  .ideas { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .top { flex-direction: column; align-items: start; padding-top: 20px; }
  .local { text-align: left; }
  main { grid-template-columns: 1fr; }
  textarea { min-height: 220px; }
  .top, main, footer { width: min(1120px, calc(100% - 24px)); }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .actions button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
