@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Manrope:wght@400;500;600&family=Newsreader:ital,opsz,wght@1,6..72,400&display=swap');

:root {
  --ink: #f1f2ed;
  --muted: #9ea5a0;
  --dim: #69706c;
  --line: #333936;
  --paper: #101312;
  --panel: #151917;
  --signal: #d8ff55;
  --mono: 'DM Mono', monospace;
  --sans: 'Manrope', sans-serif;
  --serif: 'Newsreader', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); letter-spacing: 0; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 20; padding: 10px 14px; background: var(--signal); color: #101312; font: 500 12px var(--mono); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.prompt-header { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 14px 28px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; text-decoration: none; }
.brand-mark { width: 40px; aspect-ratio: 1; display: grid; place-items: center; background: var(--signal); color: #111411; font: 500 13px var(--mono); }
.brand strong, .brand small { display: block; }
.brand strong { font: 600 12px var(--sans); }
.brand small { margin-top: 2px; color: var(--muted); font: 400 8px var(--mono); }
.header-status { display: flex; align-items: center; gap: 14px; color: var(--muted); font: 400 10px var(--mono); }
.status-dot { width: 6px; height: 6px; background: var(--signal); box-shadow: 0 0 12px rgba(216,255,85,.7); }
.back-link { justify-self: end; color: var(--ink); font: 400 10px var(--mono); text-decoration: none; border-bottom: 1px solid var(--dim); padding-bottom: 5px; }

main { width: min(1480px, 100%); margin: 0 auto; }
.prompt-intro { min-height: 610px; display: grid; grid-template-columns: 120px minmax(0, 1fr) 330px; gap: 44px; align-items: end; padding: 92px 48px 64px; border-bottom: 1px solid var(--line); }
.intro-index { align-self: start; writing-mode: vertical-rl; transform: rotate(180deg); color: var(--dim); font: 400 10px var(--mono); }
.eyebrow { margin: 0 0 28px; color: var(--muted); font: 400 10px var(--mono); }
h1 { margin: 0; max-width: 760px; font-size: clamp(68px, 9vw, 142px); font-weight: 400; line-height: .78; }
h1 em { color: var(--signal); font-family: var(--serif); font-weight: 400; }
.lede { max-width: 610px; margin: 48px 0 0; color: #c2c7c3; font-size: 16px; line-height: 1.75; }
.source-facts { margin: 0; border-top: 1px solid var(--line); }
.source-facts div { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.source-facts dt { color: var(--dim); font: 400 9px var(--mono); }
.source-facts dd { margin: 0; font: 400 10px var(--mono); }

.prompt-section { padding: 70px 48px; }
.section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 28px; }
.section-heading span, .provenance > span { color: var(--dim); font: 400 10px var(--mono); }
h2 { margin: 10px 0 0; font-size: 34px; font-weight: 500; }
.prompt-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.prompt-actions button, .prompt-actions a { min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 500 10px var(--mono); text-decoration: none; cursor: pointer; }
.prompt-actions button { border-color: var(--signal); background: var(--signal); color: #111411; }
.prompt-actions button:disabled { border-color: var(--line); background: var(--line); color: var(--muted); cursor: wait; }
.prompt-actions button:not(:disabled):hover, .prompt-actions a:hover { filter: brightness(1.14); }
.viewer { border: 1px solid var(--line); background: var(--panel); }
.viewer-bar { min-height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); font: 400 9px var(--mono); }
.viewer-bar span:last-child { color: var(--signal); }
pre { max-height: 720px; margin: 0; overflow: auto; padding: 30px; color: #dce0dc; font: 300 12px/1.75 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }

.provenance { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 44px; align-items: start; padding: 64px 48px 86px; border-top: 1px solid var(--line); }
.provenance p { max-width: 680px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.provenance a { align-self: center; color: var(--ink); font: 400 10px var(--mono); text-decoration: none; border-bottom: 1px solid var(--dim); padding-bottom: 5px; }
footer { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 28px; border-top: 1px solid var(--line); color: var(--muted); font: 400 9px var(--mono); }
footer a { color: var(--ink); text-decoration: none; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }

@media (max-width: 900px) {
  .prompt-header { grid-template-columns: 1fr auto; }
  .header-status { display: none; }
  .prompt-intro { min-height: auto; grid-template-columns: 1fr; padding: 72px 24px 48px; }
  .intro-index { display: none; }
  .source-facts { margin-top: 10px; }
  .prompt-section { padding: 54px 24px; }
  .provenance { grid-template-columns: 1fr; gap: 24px; padding: 48px 24px 64px; }
  .provenance a { justify-self: start; }
}

@media (max-width: 620px) {
  .prompt-header { padding: 12px 16px; }
  .brand small { display: none; }
  .back-link { max-width: 92px; text-align: right; line-height: 1.4; }
  h1 { font-size: 64px; }
  .lede { margin-top: 34px; font-size: 14px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .prompt-actions { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .prompt-actions button { grid-column: 1 / -1; }
  pre { max-height: 620px; padding: 22px 16px; font-size: 10px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
