@font-face {
  font-family: Geist;
  src: url('/fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url('/fonts/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #090909;
  --surface: #111;
  --field: #141414;
  --text: #f3f3f3;
  --muted: #adadad;
  --line: #373737;
  --gutter: clamp(.75rem, 2vw, 2rem);
  --mono: "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding: 1.5rem; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
  font: 400 1rem/1.65 Geist, system-ui, sans-serif;
}
main, .top, footer { width: min(1320px, calc(100% - 2 * clamp(1.25rem, 5vw, 5rem))); margin-inline: auto; }
main { flex: 1; padding-bottom: clamp(3.5rem, 8vw, 7rem); }
.top, footer { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.top { padding: 1.65rem 0; border-bottom: 1px solid var(--line); }
.top > span:first-child { font-size: 1.35rem; font-weight: 500; letter-spacing: -.062em; }
.top sup { font-size: .48em; margin-left: .13em; }
footer { border-top: 1px solid var(--line); padding: 1.35rem 0; }
.mono, footer { color: var(--muted); font: 400 .75rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .02em; }
.hero { padding: clamp(3.25rem, 8vw, 7.25rem) 0 clamp(2.75rem, 6vw, 5.5rem); }
.hero .mono { margin-bottom: 1rem; }
.hero h1 { font-size: clamp(3.15rem, 8vw, 7.35rem); line-height: .98; letter-spacing: -.078em; font-weight: 450; }
.hero h1 + p { margin-top: 1.35rem; max-width: 44ch; }
.hero.narrow { max-width: 31rem; margin-inline: auto; }
.narrow h1 { font-size: clamp(3rem, 7vw, 5.75rem); }
.narrow .stack { margin-top: 2.5rem; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h2, h3 { line-height: 1.13; letter-spacing: -.055em; font-weight: 450; }
h2 { font-size: clamp(1.8rem, 3.6vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.95rem); margin: 3rem 0 1.2rem; }
p { color: var(--muted); }
p + p { margin-top: 1rem; }
strong { font-weight: 450; }
a { color: inherit; text-underline-offset: .25em; }
button, input, textarea { font: inherit; }
button {
  min-height: 2.9rem;
  border: 1px solid var(--text);
  border-radius: .3rem;
  padding: .55rem 1.1rem;
  background: var(--text);
  color: var(--background);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
button:hover { background: #d1d1d1; border-color: #d1d1d1; }
button:disabled { opacity: .55; cursor: wait; }
.secondary { border-color: var(--line); background: transparent; color: var(--text); }
.secondary:hover { background: #222; border-color: #6e6e6e; }
label { display: grid; gap: .55rem; }
input:not([type=radio]), textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: var(--field);
  color: var(--text);
  padding: .8rem .9rem;
}
input::placeholder, textarea::placeholder { color: #979797; }
textarea { resize: vertical; min-height: 6.5rem; }
:where(input, textarea, a, button, summary):focus-visible { outline: 2px solid #e1e1e1; outline-offset: 4px; }
.stack { display: grid; justify-items: start; gap: 1.25rem; }
.stack label { width: 100%; }
.dashboard, .brief { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.dashboard > section { grid-column: 1 / 8; }
.dashboard > .panel { grid-column: 9 / 13; }
.section-top, .project { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; border-bottom: 1px solid var(--line); }
.section-top { padding-bottom: 1.25rem; }
.project { padding: 1.3rem 0; text-decoration: none; }
.project strong { font-size: 1.12rem; }
.project:hover strong { text-decoration: underline; }
.panel { border-top: 1px solid #666; background: var(--surface); padding: clamp(1.25rem, 2.5vw, 2rem); display: grid; gap: 1.1rem; }
.panel h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.panel label { min-width: 0; }
.empty { padding-top: 1.35rem; }
.exit { margin-top: 2.5rem; }
.back { display: inline-block; margin-top: 1.5rem; color: var(--muted); }
.actions, .submit { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.answer { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1.4rem; }
.answer p { margin-top: .5rem; white-space: pre-wrap; }
.brief-nav { grid-column: 1 / 4; position: sticky; top: 1.5rem; }
.brief-nav details { border-top: 1px solid var(--line); }
.brief-nav summary { cursor: pointer; padding: .95rem 0; }
.brief-nav nav { display: grid; }
.brief-nav a {
  text-decoration: none;
  padding: .48rem .65rem;
  border-left: 1px solid transparent;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--muted);
}
.brief-nav a:hover, .brief-nav a[aria-current] { color: var(--text); background: var(--surface); }
.brief-nav a[aria-current] { border-color: var(--text); }
.brief > form { grid-column: 5 / 12; min-width: 0; scroll-margin-top: 1.5rem; }
.brief-meta { min-height: 3rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
#save-status:last-child { margin-left: auto; }
.brief-section { padding: 1.65rem 0 clamp(2.5rem, 5vw, 4rem); }
.brief-section h2 { margin-bottom: 1.35rem; }
.brief-section h2:focus { outline: none; }
.brief-section > p { max-width: 61ch; }
.question { display: grid; gap: .8rem; margin-top: clamp(2.5rem, 5vw, 4.75rem); }
.question label { max-width: 38ch; font-size: clamp(1.13rem, 2vw, 1.4rem); line-height: 1.3; letter-spacing: -.033em; }
.help { max-width: 62ch; font-size: .95rem; }
.question .help + .help { margin-top: 0; }
.submit { border-top: 1px solid var(--line); padding-top: 1.35rem; }
#next, #send { margin-left: auto; }
.scale { border: 0; border-top: 1px solid var(--line); padding: 1.25rem 0 0; margin: 0 0 1.5rem; min-width: 0; }
.scale-endpoints { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; font-size: .95rem; line-height: 1.4; }
.scale-endpoints span:last-child { text-align: right; }
.scale-options { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; margin: .7rem -.1rem .35rem; }
.scale-options::before { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; height: 1px; background: #505050; }
.scale-point { display: grid; place-items: center; position: relative; min-height: 48px; cursor: pointer; }
.scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale-point span {
  display: grid;
  place-items: center;
  width: 2.4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #565656;
  color: var(--muted);
  background: var(--background);
  font: .85rem var(--mono);
}
.scale-point:hover span, .scale-na:hover span { border-color: var(--text); color: var(--text); }
.scale input:checked + span { border-color: var(--text); background: var(--text); color: var(--background); }
.scale input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 3px; }
.scale-na { display: flex; justify-content: flex-end; align-items: center; min-height: 44px; cursor: pointer; }
.scale-na span { padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 2rem; color: var(--muted); font-size: .82rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.error { color: #ffb3b3; }

@media (max-width: 980px) {
  .dashboard > section { grid-column: 1 / 7; }
  .dashboard > .panel { grid-column: 8 / 13; }
  .brief > form { grid-column: 4 / 13; }
}
@media (max-width: 760px) {
  .dashboard > section, .dashboard > .panel, .brief-nav, .brief > form { grid-column: 1 / -1; }
  .dashboard { row-gap: 2.5rem; }
  .top { padding: 1.15rem 0; }
  .top .mono { font-size: .67rem; }
  .brief-nav { position: static; }
  .brief-meta { min-height: 2.7rem; }
  .brief-section { padding-top: 1.15rem; }
  .submit button { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}

.brief-feedback {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  flex-basis: 100%;
  color: var(--muted);
  line-height: 1.5;
}
.brief-feedback:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.brief-feedback:not(:empty) { margin-top: .4rem; padding: .75rem .9rem; background: var(--surface); border-left: 1px solid var(--line); }
.brief-feedback[data-state="success"] { color: var(--text); border-color: var(--muted); }
.brief-feedback[data-state="success"]::before { content: ""; flex: 0 0 .6rem; height: .35rem; border: solid currentColor; border-width: 0 0 1px 1px; transform: translateY(-.15rem) rotate(-45deg); }
.brief-feedback[data-state="error"], .brief-feedback[data-state="save-error"] { color: #ffb3b3; border-color: currentColor; }
.confirmation h1:focus { outline: none; }

.project > a { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: .35rem .8rem; justify-content: space-between; text-decoration: none; }
.project > a:hover strong { text-decoration: underline; }
.project-action { padding: .35rem .6rem; background: transparent; color: var(--muted); border-color: transparent; font-size: .88rem; }
.project-action:hover { background: var(--surface); color: var(--text); border-color: var(--line); }
.project-result { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.project-trash { margin-top: 2rem; }
.project-trash summary { cursor: pointer; }
.sign-in { display: inline-block; margin-top: 1.5rem; }
