@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #050505;
  --ink: #f4f4f4;
  --muted: #a6a6a6;
  --line: rgba(255,255,255,.18);
  --line-strong: rgba(255,255,255,.42);
  --panel: rgba(0,0,0,.68);
  --soft: rgba(255,255,255,.035);
  --bad: #ff5a3d;
  --mono: GeistMono, 'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, Monaco, 'Liberation Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--mono); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
main { position: relative; min-height: 100vh; padding: 20px 40px 30px; isolation: isolate; }
.backdrop { position: fixed; inset: 78px 24px 0; z-index: -2; overflow: hidden; color: rgba(255,255,255,.105); font-size: 13px; line-height: 1.7; font-weight: 500; letter-spacing: .01em; pointer-events:none; }
.backdrop p { width: 1700px; margin: 0 0 2px; white-space: nowrap; }
.backdrop::after { content: ''; position: fixed; inset: 0; background: radial-gradient(circle at 50% 44%, transparent 0 18%, rgba(5,5,5,.35) 38%, rgba(5,5,5,.82) 78%), linear-gradient(180deg, rgba(5,5,5,.16), rgba(5,5,5,.9)); }
.topbar, footer { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.topbar { min-height: 54px; }
.wordmark, nav a, .text-button, .back-button { background: transparent; border: 0; padding: 0 0 8px; border-bottom: 1px solid rgba(255,255,255,.25); color: var(--ink); cursor: pointer; }
.wordmark { font-size: 16px; letter-spacing: -.04em; line-height: 1; }
nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: flex-end; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
nav a.active, nav a:hover, .wordmark:hover { border-bottom-color: white; }
.landing { min-height: calc(100vh - 170px); display: grid; grid-template-columns: 1fr minmax(260px, 360px); grid-template-rows: 1fr auto; gap: 28px; align-items: center; padding: 42px 0 20px; }
.hero-block { grid-column: 1 / 2; align-self: center; max-width: 930px; }
.kicker, .section-label, .card-meta, .save-state, .fact-grid span, .ledger-grid span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 16px 0 18px; font-size: clamp(76px, 14vw, 176px); line-height: .76; letter-spacing: -.095em; font-weight: 800; text-transform: uppercase; text-wrap: balance; }
.workshop-title { margin: 0 0 18px; max-width: none; font-size: clamp(30px, 5vw, 64px); line-height: .92; letter-spacing: -.075em; font-weight: 800; text-transform: uppercase; }
.hero-copy, .project-hero p { max-width: 760px; color: rgba(255,255,255,.78); font-size: clamp(17px, 1.75vw, 24px); line-height: 1.48; letter-spacing: -.035em; }
.note-panel { align-self: center; border: 1px solid var(--line); background: rgba(0,0,0,.56); padding: 22px; min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end; }
.note-panel span { color: var(--muted); font-size: 11px; letter-spacing: .12em; font-weight: 800; }
.note-panel p { margin: 18px 0 0; color: rgba(255,255,255,.83); line-height: 1.58; font-size: 15px; }
.project-intro { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.landing-actions { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
h2 { margin: 7px 0 0; max-width: 820px; font-size: clamp(30px, 5vw, 68px); line-height: .92; letter-spacing: -.075em; font-weight: 800; }
.system-strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); background: rgba(0,0,0,.52); }
.system-strip article { min-height: 150px; padding: 18px; border-right: 1px solid var(--line); }
.system-strip article:last-child { border-right: 0; }
.system-strip span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.system-strip h3 { margin: 18px 0 8px; font-size: 23px; line-height: .92; letter-spacing: -.055em; text-transform: uppercase; }
.system-strip p { margin: 0; color: rgba(255,255,255,.68); line-height: 1.5; font-size: 14px; }
.workshop-ledger, .living-ledger, .feedback-panel { margin: 48px auto 0; max-width: 1180px; border-top: 1px solid var(--line-strong); padding-top: 22px; }
.ledger-panel { display: grid; grid-template-columns: minmax(0, .92fr) minmax(260px, .62fr); gap: 24px; align-items: end; margin-bottom: 20px; }
.ledger-panel.compact { grid-template-columns: 1fr; max-width: 880px; margin-left: 0; }
.ledger-panel h2, .feedback-panel h2 { margin-top: 8px; font-size: clamp(30px, 5vw, 64px); }
.ledger-panel p, .feedback-panel p { margin: 0; color: rgba(255,255,255,.74); line-height: 1.58; }
.ledger-grid, .fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ledger-grid article, .fact-grid article, .feedback-form, .iteration-log { border: 1px solid var(--line); background: rgba(0,0,0,.58); padding: 18px; }
.ledger-grid p, .fact-grid p { margin: 12px 0 0; color: rgba(255,255,255,.75); line-height: 1.55; }
.text-button, .back-button { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.card-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card { min-height: 260px; border: 1px solid var(--line); background: var(--panel); padding: 20px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.project-card.live { cursor: pointer; }
.project-card.live:hover { transform: translateY(-3px); border-color: white; background: rgba(255,255,255,.045); }
.card-meta { display: flex; justify-content: space-between; gap: 14px; }
.card-meta b { color: white; font-weight: 800; }
.project-card h3, .principles h3, .constitution-box h3, .intent-box h3 { margin: 28px 0 10px; font-size: clamp(26px, 3.4vw, 46px); line-height: .9; letter-spacing: -.07em; text-transform: uppercase; }
.project-card p, .principles p, .quiet { color: rgba(255,255,255,.72); line-height: 1.58; margin: 0; }
.card-action { margin-top: 18px; display: flex; align-items: center; gap: 8px; color: white; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.project-page { padding: 42px 0 30px; }
.back-button { margin-bottom: 34px; }
.project-hero { max-width: 1060px; margin: 0 auto 42px; text-align: left; }
.project-hero h1 { font-size: clamp(70px, 15vw, 188px); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 auto 52px; max-width: 1180px; }
.principles article { border-top: 1px solid var(--line-strong); padding-top: 18px; min-height: 210px; }
.principles span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.principles h3 { font-size: clamp(23px, 3vw, 38px); margin-top: 18px; }
.proto-frame { max-width: 1180px; margin: 0 auto; border: 1px solid var(--line-strong); background: rgba(0,0,0,.78); padding: 22px; }
.proto-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 22px; }
.proto-header h2 { font-size: clamp(28px, 4.8vw, 56px); max-width: 820px; }
.save-state { border: 1px solid var(--line); padding: 8px 10px; color: #bdbdbd; }
.save-state.saved { color: #050505; background: white; }
.proto-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 20px; }
.proto-stack { display: flex; flex-direction: column; gap: 20px; }
.constitution-box, .intent-box, .product-scraper { border: 1px solid var(--line); background: rgba(255,255,255,.025); padding: 18px; }
.constitution-box h3, .intent-box h3, .product-scraper h3 { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.field span, .receipt span, .total-strip span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
input, textarea { width: 100%; border: 1px solid var(--line); background: rgba(0,0,0,.62); color: white; padding: 12px 11px; outline: none; border-radius: 0; }
input:focus, textarea:focus { border-color: white; }
textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.button-row button, .lock-box button { border: 1px solid white; background: white; color: black; padding: 11px 13px; cursor: pointer; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.button-row .ghost { background: transparent; color: white; border-color: var(--line); }
.intent-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.receipt { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.receipt div { min-height: 82px; border: 1px solid rgba(255,255,255,.12); padding: 12px; background: rgba(0,0,0,.45); }
.receipt b { display: block; margin-top: 7px; line-height: 1.35; font-size: 13px; }
.total-strip { margin: 16px 0; border: 1px solid white; padding: 15px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.total-strip strong { display: block; margin: 5px 0 3px; font-size: 36px; line-height: 1; letter-spacing: -.07em; }
.total-strip small { color: rgba(255,255,255,.62); }
.verdict { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid white; padding: 8px 10px; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; min-width: 120px; }
.verdict.pass { background: white; color: black; }
.verdict.fail { background: var(--bad); color: black; }
.lock-box { border-top: 1px solid var(--line); padding-top: 16px; }
.lock-box h4 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: -.02em; }
.lock-box ul { margin: 0 0 16px; padding-left: 18px; color: rgba(255,255,255,.72); line-height: 1.7; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 16px; color: rgba(255,255,255,.78); line-height: 1.45; }
.check-row input { width: auto; margin-top: 3px; }
.packet-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.packet-tools button, .lock-box button { border: 1px solid white; background: white; color: black; padding: 11px 13px; cursor: pointer; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.packet-tools .ghost { background: transparent; color: white; border-color: var(--line); }
.lock-box button:disabled, .packet-tools button:disabled { opacity: .42; cursor: not-allowed; }
.packet { max-height: 300px; overflow: auto; border: 1px solid rgba(255,255,255,.18); background: #050505; padding: 14px; color: rgba(255,255,255,.82); font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.loaded-flag, .parse-result { color: var(--muted); margin-top: 12px; font-size: 12px; line-height: 1.45; }
.parse-result { border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.45); padding: 12px; color: rgba(255,255,255,.72); }
.feedback-panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; }
.feedback-panel > div:first-child { align-self: start; }
.feedback-form textarea { min-height: 150px; }
.iteration-log { grid-column: 1 / -1; }
.iteration-log ol { margin: 14px 0 0; padding-left: 20px; color: rgba(255,255,255,.74); line-height: 1.65; }
footer { margin-top: 50px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.48); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 900px) {
  main { padding: 18px 20px 26px; }
  .topbar, footer { flex-direction: column; align-items: stretch; }
  nav { justify-content: flex-start; gap: 16px; }
  .landing { grid-template-columns: 1fr; grid-template-rows: auto; align-items: start; padding-top: 48px; }
  .note-panel { min-height: auto; }
  .project-intro, .landing-actions { align-items: flex-start; flex-direction: column; }
  .card-grid, .principles, .proto-grid, .system-strip, .ledger-panel, .ledger-grid, .fact-grid, .feedback-panel { grid-template-columns: 1fr; }
  .system-strip article { border-right: 0; border-bottom: 1px solid var(--line); }
  .system-strip article:last-child { border-bottom: 0; }
  .project-card { min-height: 220px; }
  h1 { font-size: clamp(62px, 22vw, 120px); }
  .project-hero h1 { font-size: clamp(58px, 20vw, 120px); }
  .receipt { grid-template-columns: 1fr; }
  .total-strip, .proto-header { flex-direction: column; align-items: stretch; }
}
