/* ==========================================================================
   Proof — design tokens
   ========================================================================== */

:root {
  /* Paper & ink */
  --paper: #fbfaf7;
  --paper-sunk: #f4f2ec;
  --sheet: #ffffff;
  --ink: #14161c;
  --ink-2: #565d6b;
  --ink-3: #8a909c;
  --rule: #e7e3da;
  --rule-soft: #f1eee7;

  /* Registration accents — each one means exactly one thing */
  --cyan: #0e93c4;           /* working / live */
  --cyan-deep: #076a90;
  --cyan-wash: #e4f2f9;
  --magenta: #ce2069;        /* needs you */
  --magenta-wash: #fbe9f1;
  --leaf: #177c52;           /* published */
  --leaf-wash: #e5f2eb;

  /* Elevation */
  --sheet-shadow: 0 1px 2px rgba(20, 22, 28, .05), 0 10px 28px -16px rgba(20, 22, 28, .28);
  --sheet-shadow-lift: 0 2px 4px rgba(20, 22, 28, .06), 0 20px 44px -20px rgba(20, 22, 28, .34);
  --pop-shadow: 0 24px 70px -24px rgba(20, 22, 28, .42);

  /* Type */
  --display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --topbar-h: 60px;
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.021em;
  line-height: 1.1;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--cyan-wash); }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ==========================================================================
   Registration mark (the logo glyph, and the motif)
   ========================================================================== */

.regmark { display: block; }
.regmark circle, .regmark line { stroke: currentColor; fill: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--paper-sunk); border-color: #d9d4c8; }
.btn:active { transform: translateY(1px); }

.btn--ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ink:hover { background: #262a33; border-color: #262a33; }

.btn--publish { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.btn--publish:hover { background: #146a46; border-color: #146a46; }

.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--paper-sunk); color: var(--ink); }

.btn--lg { padding: 12px 20px; font-size: 15px; border-radius: 10px; }
.btn--sm { padding: 6px 11px; font-size: 13px; border-radius: 7px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--paper-sunk); color: var(--ink); }
.icon-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ==========================================================================
   Status pills — one hue per state, used everywhere identically
   ========================================================================== */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .07em; text-transform: uppercase;
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

.pill--working   { background: var(--cyan-wash);    color: var(--cyan-deep); }
.pill--needsyou  { background: var(--magenta-wash); color: var(--magenta); }
.pill--ready     { background: #fdf3e0;             color: #9a6a10; }
.pill--published { background: var(--leaf-wash);    color: var(--leaf); }
.pill--paused    { background: var(--paper-sunk);   color: var(--ink-3); }

.pill--working .dot { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  height: var(--topbar-h);
  padding: 0 18px;
  background: rgba(251, 250, 247, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 700;
  font-size: 18px; letter-spacing: -0.03em;
}
.brand .regmark { color: var(--ink); }
.brand:hover .regmark { color: var(--cyan); }
.brand .regmark { transition: color .2s ease; }

.topbar__sep { width: 1px; height: 22px; background: var(--rule); flex: none; }

.switcher {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 8px;
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; cursor: pointer;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em;
}
.switcher:hover { background: var(--paper-sunk); border-color: var(--rule); }
.switcher .swatch { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.switcher .caret { color: var(--ink-3); }

.topbar__spacer { flex: 1; }

.urlchip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 6px 0 10px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--sheet);
  font-family: var(--mono); font-size: 11px; text-transform: none; letter-spacing: 0;
  color: var(--ink-2);
}
.urlchip .live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-wash);
  animation: pulse 1.8s ease-in-out infinite;
}

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(140deg, #2f3440, #14161c);
  color: #fff; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  flex: none;
}

/* ==========================================================================
   Home
   ========================================================================== */

.page { max-width: 1240px; margin: 0 auto; padding: 34px 26px 90px; }

.page__head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.page__head h1 { font-size: 34px; letter-spacing: -0.035em; }
.page__head p { color: var(--ink-2); font-size: 15px; margin-top: 6px; }

.eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center; gap: 9px;
}
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--rule); }

/* Hero: the current job, live */
.bench {
  display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.05fr);
  gap: 0;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--sheet-shadow);
  overflow: hidden;
  margin-bottom: 44px;
}
.bench { min-height: 408px; }
.bench__left { padding: 26px 28px 24px; display: flex; flex-direction: column; min-width: 0; }
.bench__title { font-size: 27px; letter-spacing: -0.03em; margin: 14px 0 10px; text-wrap: balance; }
.bench__meta { color: var(--ink-2); font-size: 14.5px; }
.bench__stream {
  margin: 20px 0 0; padding: 14px 16px;
  background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 10px;
  font-size: 14px; color: var(--ink-2); min-height: 76px;
}
.bench__stream b { color: var(--ink); font-weight: 600; }
.bench__actions { margin-top: auto; padding-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.bench__right { border-left: 1px solid var(--rule); background: var(--paper-sunk); position: relative; overflow: hidden; }

.tally { display: flex; gap: 22px; margin-top: 18px; flex-wrap: wrap; }
.tally__item { display: flex; align-items: baseline; gap: 7px; }
.tally__n { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.tally__l { font-size: 13px; color: var(--ink-2); }

/* Product sheets */
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 18px; margin-top: 18px; }

.sheet {
  display: block; text-decoration: none; color: inherit;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--sheet-shadow);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
}
.sheet:hover { transform: translateY(-3px); box-shadow: var(--sheet-shadow-lift); }
.sheet__thumb { height: 148px; border-bottom: 1px solid var(--rule); background: var(--paper-sunk); position: relative; }
.sheet__body { padding: 15px 17px 17px; }
.sheet__name { font-size: 17.5px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.sheet__domain { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.sheet__foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.sheet__srcs { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--ink-3); font-size: 12.5px; }

.sheet--new {
  display: grid; place-content: center; justify-items: center; gap: 10px;
  min-height: 260px; text-align: center; padding: 24px;
  border-style: dashed; border-color: #d8d3c6; background: transparent; box-shadow: none;
}
.sheet--new:hover { background: var(--sheet); transform: translateY(-3px); }
.sheet--new h3 { font-size: 16.5px; }
.sheet--new p { color: var(--ink-2); font-size: 13.5px; max-width: 24ch; }
.sheet--new .plus {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: 20px; line-height: 1;
}

/* Ledger of published work */
.ledger { margin-top: 18px; border-top: 1px solid var(--rule); }
.ledger__row {
  display: grid; grid-template-columns: 108px 1fr auto auto;
  gap: 16px; align-items: center;
  padding: 13px 4px; border-bottom: 1px solid var(--rule-soft);
}
.ledger__row:hover { background: var(--sheet); }
.ledger__when { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.ledger__what { font-size: 14.5px; }
.ledger__who { font-size: 13px; color: var(--ink-3); }

/* ==========================================================================
   Workspace — rail / thread / preview
   ========================================================================== */

.workspace {
  display: grid;
  grid-template-columns: 268px minmax(400px, 1fr) minmax(440px, 44%);
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

/* --- Rail --- */
.rail {
  border-right: 1px solid var(--rule);
  background: var(--paper);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.rail__head { padding: 16px 16px 10px; display: flex; align-items: center; justify-content: space-between; }
.rail__head h2 { font-size: 14px; letter-spacing: -0.01em; font-family: var(--body); font-weight: 600; }
.rail__list { overflow-y: auto; padding: 4px 10px 14px; flex: 1; }

.convo {
  width: 100%; text-align: left; display: block;
  padding: 11px 12px; margin-bottom: 3px;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
.convo:hover { background: var(--paper-sunk); }
.convo[aria-current="true"] { background: var(--sheet); border-color: var(--rule); box-shadow: 0 1px 2px rgba(20,22,28,.05); }
.convo__title { font-size: 14px; font-weight: 500; letter-spacing: -0.008em; margin-bottom: 6px; }
.convo[aria-current="true"] .convo__title { font-weight: 600; }
.convo__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.convo__time { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }

.rail__foot { padding: 12px; border-top: 1px solid var(--rule); }
.rail__foot .btn { width: 100%; justify-content: center; }

.rail__sources { padding: 14px 16px; border-top: 1px solid var(--rule); }
.source { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13px; color: var(--ink-2); }
.source svg { flex: none; color: var(--ink-3); }
.source .ok { margin-left: auto; color: var(--leaf); }

/* --- Thread --- */
.thread { display: flex; flex-direction: column; overflow: hidden; background: var(--paper); }

.thread__head {
  padding: 15px 26px 13px;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 12px;
  background: var(--paper);
}
.thread__head h1 { font-size: 18px; letter-spacing: -0.022em; }
.thread__head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

.thread__scroll { flex: 1; overflow-y: auto; padding: 26px 26px 10px; scroll-behavior: smooth; }
.thread__inner { max-width: 660px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

.daymark { display: flex; align-items: center; gap: 12px; color: var(--ink-3); }
.daymark::before, .daymark::after { content: ""; height: 1px; flex: 1; background: var(--rule); }

.msg { display: flex; gap: 12px; }
.msg--you { justify-content: flex-end; }
.msg--you .msg__body {
  background: var(--ink); color: #fff;
  padding: 11px 15px; border-radius: 14px 14px 4px 14px;
  max-width: 78%; font-size: 14.5px;
}
.msg--you .msg__body a { color: #9fdcf3; }

.msg--proof .msg__mark { flex: none; color: var(--ink-3); padding-top: 2px; }
.msg--proof .msg__body { font-size: 15px; color: var(--ink); max-width: 100%; }
.msg--proof .msg__body p + p { margin-top: 11px; }
.msg--proof strong { font-weight: 600; }

/* the little "what it's doing" trace — technical detail, folded away */
.trace {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 5px 10px 5px 8px;
  background: var(--sheet); border: 1px solid var(--rule-soft); border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  cursor: pointer;
}
.trace:hover { border-color: var(--rule); color: var(--ink-2); }
.trace__lines {
  margin-top: 8px; padding: 10px 13px;
  background: #f7f6f2; border: 1px solid var(--rule-soft); border-radius: 9px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.85; color: var(--ink-2);
  text-transform: none; letter-spacing: 0;
}
.trace__lines[hidden] { display: none; }

.typing { display: inline-flex; gap: 4px; align-items: center; height: 20px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: bounce 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .14s; }
.typing i:nth-child(3) { animation-delay: .28s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* --- The signature: proof slip --- */
.slip {
  position: relative;
  margin-top: 14px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: var(--sheet-shadow);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  animation: slip-in .42s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes slip-in {
  from { opacity: 0; transform: translateY(8px) rotate(-.35deg); }
  to { opacity: 1; transform: none; }
}
.slip__head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px dashed var(--rule);
}
.slip__no { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }
.slip__head .regmark { color: var(--cyan); }
.slip__head .spacer { flex: 1; }

.slip__body { padding: 14px 16px 4px; }
.slip__body h4 { font-size: 15.5px; letter-spacing: -0.015em; margin-bottom: 10px; }
.changes { list-style: none; margin: 0; padding: 0; }
.changes li {
  position: relative; padding-left: 22px; margin-bottom: 7px;
  font-size: 14px; color: var(--ink-2);
}
.changes li::before {
  content: ""; position: absolute; left: 6px; top: 8px;
  width: 5px; height: 5px; border-radius: 1px; background: var(--cyan);
}
.changes li b { color: var(--ink); font-weight: 600; }

.slip__code {
  margin: 12px 0 0; padding: 12px 14px;
  background: #f7f6f2; border-top: 1px solid var(--rule-soft);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.75; color: var(--ink-2);
  white-space: pre; overflow-x: auto;
}
.slip__code[hidden] { display: none; }
.slip__code .add { color: var(--leaf); }
.slip__code .del { color: var(--magenta); }
.slip__code .file { color: var(--ink); font-weight: 500; }

.slip__foot {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px 14px;
}
.slip__foot .spacer { flex: 1; }
.slip__note { font-size: 12.5px; color: var(--ink-3); padding: 0 16px 14px; }

.slip--kept { border-color: #cfe6da; }
.slip--undone { opacity: .55; border-style: dashed; }
.slip--kept .slip__head .regmark { color: var(--leaf); }

/* A question from Proof — big, unmissable, plain choices */
.ask {
  margin-top: 14px; padding: 16px 18px;
  background: var(--magenta-wash);
  border: 1px solid #f3cddd; border-radius: var(--radius);
}
.ask h4 { font-size: 15px; margin-bottom: 4px; }
.ask p { font-size: 14px; color: #7c2c50; }
.ask__options { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ask__options .btn { background: var(--sheet); border-color: #f0c4d6; }
.ask__options .btn:hover { background: #fff; border-color: var(--magenta); }

/* --- Composer --- */
.composer { padding: 12px 26px 22px; background: linear-gradient(to top, var(--paper) 62%, transparent); }
.composer__inner { max-width: 660px; margin: 0 auto; }

.suggests { display: flex; gap: 7px; margin-bottom: 10px; flex-wrap: wrap; }
.suggest {
  padding: 6px 12px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 999px;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
  transition: border-color .14s ease, color .14s ease, transform .12s ease;
}
.suggest:hover { border-color: var(--cyan); color: var(--cyan-deep); }
.suggest:active { transform: translateY(1px); }
.suggest[disabled] { opacity: .4; cursor: default; }

.composer__box {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--sheet-shadow);
  padding: 12px 12px 10px 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.composer__box:focus-within { border-color: #c8c2b4; box-shadow: var(--sheet-shadow-lift); }
.composer__box textarea {
  width: 100%; border: 0; background: transparent; resize: none;
  font-size: 15px; line-height: 1.5; max-height: 160px;
}
.composer__box textarea:focus { outline: none; }
.composer__box textarea::placeholder { color: var(--ink-3); }
.composer__row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.composer__row .spacer { flex: 1; }
.composer__hint { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: .05em; }

/* ==========================================================================
   Preview pane
   ========================================================================== */

.preview {
  background: var(--paper-sunk);
  border-left: 1px solid var(--rule);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.preview__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
  background: rgba(244, 242, 236, .8);
  backdrop-filter: blur(8px);
}
.preview__bar .spacer { flex: 1; }

.segmented { display: inline-flex; padding: 2px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 9px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; border-radius: 7px;
  padding: 5px 11px; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.preview__stage {
  flex: 1; position: relative; overflow: hidden;
  display: grid; place-items: start center;
  padding: 20px;
}
.preview__stage[data-device="phone"] { place-items: center; }

.viewport {
  position: relative;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden auto;
  box-shadow: var(--sheet-shadow-lift);
  width: 100%; height: 100%;
  scrollbar-width: thin;
}
.viewport--static { overflow: hidden; }
.sizer { position: relative; width: 100%; }
.canvas { position: absolute; top: 0; left: 0; }
.preview__stage[data-device="phone"] .viewport {
  width: 340px; height: min(680px, 100%);
  border-radius: 26px; border: 8px solid #1b1e25;
  box-shadow: 0 28px 60px -26px rgba(20,22,28,.55);
}

.canvas { transform-origin: top left; will-change: transform; }

/* Registration reticle — rings the region that just changed */
.reticle {
  position: absolute; pointer-events: none; z-index: 5;
  border: 1px solid var(--cyan);
  background: rgba(14, 147, 196, .07);
  opacity: 0;
  transition: opacity .25s ease, left .5s cubic-bezier(.2,.8,.3,1), top .5s cubic-bezier(.2,.8,.3,1),
              width .5s cubic-bezier(.2,.8,.3,1), height .5s cubic-bezier(.2,.8,.3,1);
}
.reticle::before, .reticle::after {
  content: ""; position: absolute; background: var(--cyan);
}
.reticle::before { left: -5px; right: -5px; top: 50%; height: 1px; opacity: .5; }
.reticle::after { top: -5px; bottom: -5px; left: 50%; width: 1px; opacity: .5; }
.reticle.is-on { opacity: 1; }
.reticle__tag {
  position: absolute; top: -21px; left: -1px;
  background: var(--cyan); color: #fff;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 3px; white-space: nowrap;
}

/* preview used as a thumbnail on the home page */
.bench__right .preview__stage { position: absolute; inset: 0; padding: 24px 24px 0; }
.bench__right .viewport { border-radius: 8px 8px 0 0; }
.sheet__thumb .preview__stage { height: 100%; padding: 0; }
.sheet__thumb .viewport { border: 0; border-radius: 0; box-shadow: none; }

.preview__foot {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-top: 1px solid var(--rule);
  background: var(--paper);
}
.preview__foot .spacer { flex: 1; }
.preview__state { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.preview__state .mono { color: var(--ink-3); }

/* Preview building — the empty state has a job */
.building {
  position: absolute; inset: 0; z-index: 8;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  background: rgba(244, 242, 236, .92); backdrop-filter: blur(3px);
  text-align: center; padding: 30px;
}
.building h4 { font-size: 16px; }
.building p { font-size: 13.5px; color: var(--ink-2); max-width: 32ch; }
.building__bar { width: 190px; height: 3px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.building__bar i { display: block; height: 100%; width: 40%; background: var(--cyan); animation: crawl 1.4s ease-in-out infinite; }
@keyframes crawl { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

/* ==========================================================================
   Modal, sheet, toast
   ========================================================================== */

.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 22, 28, .34);
  backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 24px;
  animation: fade .18s ease both;
}
.scrim[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(520px, 100%);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--pop-shadow);
  padding: 26px 28px 24px;
  animation: rise .24s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal h2 { font-size: 22px; letter-spacing: -0.03em; margin-bottom: 8px; }
.modal p { color: var(--ink-2); font-size: 14.5px; }
.modal__foot { display: flex; gap: 10px; margin-top: 22px; }
.modal__foot .spacer { flex: 1; }

.golive { margin: 20px 0 0; padding: 14px 16px; background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 10px; }
.golive .changes li::before { background: var(--leaf); }

.toast-wrap {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  background: var(--ink); color: #fff;
  border-radius: 11px; box-shadow: var(--pop-shadow);
  font-size: 14px;
  animation: toast-in .28s cubic-bezier(.2,.8,.3,1) both;
}
.toast .tick { color: #6fe0aa; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.toast.is-out { animation: toast-out .22s ease both; }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ==========================================================================
   Connect flow
   ========================================================================== */

.setup { max-width: 640px; margin: 0 auto; padding: 46px 24px 90px; }
.steps { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.steps__item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.steps__n {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--rule); background: var(--sheet);
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
}
.steps__item[data-state="current"] { color: var(--ink); font-weight: 600; }
.steps__item[data-state="current"] .steps__n { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps__item[data-state="done"] .steps__n { background: var(--leaf-wash); border-color: #bfe0cf; color: var(--leaf); }
.steps__line { flex: 1; height: 1px; background: var(--rule); }

.step[hidden] { display: none; }
.step h1 { font-size: 30px; letter-spacing: -0.035em; text-wrap: balance; }
.step > p.lede { color: var(--ink-2); font-size: 15.5px; margin-top: 10px; margin-bottom: 26px; max-width: 46ch; }

.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field .help { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.input {
  width: 100%; padding: 11px 14px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px;
  font-size: 15px;
}
.input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-wash); }

/* --- starting points ----------------------------------------------------- */
.setup--wide { max-width: 1000px; }

.suggest-line {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 20px; padding: 11px 14px;
  background: var(--cyan-wash); border-radius: 10px;
  font-size: 14px; color: var(--cyan-deep);
}
.suggest-line b { font-weight: 600; }

.starters { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }

.starter {
  display: flex; flex-direction: column; text-align: left;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px;
  overflow: hidden; cursor: pointer; padding: 0;
  box-shadow: var(--sheet-shadow);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s cubic-bezier(.2,.7,.3,1);
}
.starter:hover { transform: translateY(-2px); box-shadow: var(--sheet-shadow-lift); }
.starter[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink), var(--sheet-shadow-lift); }

.starter__thumb { height: 186px; border-bottom: 1px solid var(--rule); background: var(--paper-sunk); position: relative; }
.starter__thumb .preview__stage { position: absolute; inset: 0; padding: 0; }
.starter__thumb .viewport { border: 0; border-radius: 0; box-shadow: none; }
.starter__pick {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--sheet); border: 1px solid var(--rule);
  display: grid; place-items: center; color: transparent;
}
.starter[aria-pressed="true"] .starter__pick { background: var(--ink); border-color: var(--ink); color: #fff; }

.starter__body { padding: 15px 17px 17px; }
.starter__name { font-family: var(--display); font-size: 17.5px; font-weight: 600; letter-spacing: -0.02em; }
.starter__blurb { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.starter__best { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; font-style: italic; }
.starter__list { list-style: none; margin: 12px 0 0; padding: 0; }
.starter__list li { position: relative; padding-left: 19px; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.starter__list li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 5px; height: 5px; border-radius: 1px; background: var(--leaf); }
.starter__tech {
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--rule);
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); line-height: 1.6;
}
.starter__tech summary { cursor: pointer; letter-spacing: .06em; text-transform: uppercase; }
.starter__tech p { margin-top: 7px; text-transform: none; letter-spacing: 0; }

/* --- what GitHub will be asked for --------------------------------------- */
.perms { padding: 20px 22px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; }
.perms__head { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.perms__list { list-style: none; margin: 0; padding: 0; }
.perms__list li {
  display: flex; align-items: baseline; gap: 12px;
  position: relative; padding: 8px 0 8px 20px;
  font-size: 14.5px; border-bottom: 1px solid var(--rule-soft);
}
.perms__list li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 5px; height: 5px; border-radius: 1px; background: var(--cyan); }
.perms__list .mono { margin-left: auto; color: var(--ink-3); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.perms__foot { font-size: 13.5px; color: var(--ink-2); margin-top: 14px; }

.granted__row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; margin-bottom: 10px;
  background: var(--leaf-wash); border: 1px solid #bfe0cf; border-radius: 10px;
  font-size: 13.5px; color: #1c5c41;
}
.granted__row svg { flex: none; }
.granted__row .btn { margin-left: auto; }

/* --- who keeps the work -------------------------------------------------- */
.keeps { display: grid; gap: 12px; }
.keep-opt {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 18px 20px; background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 12px; cursor: pointer;
}
.keep-opt:hover { border-color: #d5cfc1; }
.keep-opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.keep-opt__check {
  width: 20px; height: 20px; border-radius: 50%; flex: none; margin-top: 2px;
  border: 1px solid #cfcabc; display: grid; place-items: center; color: transparent;
}
.keep-opt[aria-pressed="true"] .keep-opt__check { background: var(--ink); border-color: var(--ink); color: #fff; }
.keep-opt__t { display: block; font-size: 15.5px; font-weight: 600; }
.keep-opt__s { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 5px; }

.done-card {
  margin-top: 26px; padding: 22px 24px;
  background: var(--leaf-wash); border: 1px solid #bfe0cf; border-radius: 12px;
}
.done-card h3 { font-size: 19px; margin-bottom: 6px; }
.done-card p { font-size: 14.5px; color: #1c5c41; }

.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  padding: 9px 14px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--sheet); font-size: 14px; cursor: pointer;
}
.choice[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }

.repos { border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); overflow: hidden; }
.repo {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 16px; border: 0; border-bottom: 1px solid var(--rule-soft);
  cursor: pointer; background: transparent; width: 100%; text-align: left;
}
.repo:last-child { border-bottom: 0; }
.repo:hover { background: var(--paper); }
.repo__check {
  width: 19px; height: 19px; border-radius: 6px; flex: none;
  border: 1px solid #cfcabc; display: grid; place-items: center; color: transparent;
}
.repo[aria-pressed="true"] .repo__check { background: var(--ink); border-color: var(--ink); color: #fff; }
.repo__name { display: block; font-size: 14.5px; font-weight: 500; }
.repo__meta { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }
.repo__kind {
  margin-left: auto; padding: 3px 9px; border-radius: 999px;
  background: var(--paper-sunk); font-size: 11.5px; color: var(--ink-2); white-space: nowrap;
}

.detected { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; margin-bottom: 12px; }
.detected__icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--cyan-wash); color: var(--cyan-deep); flex: none; }
.detected__icon[data-done="true"] { background: var(--leaf-wash); color: var(--leaf); }
.detected__t { display: block; font-size: 14.5px; font-weight: 500; }
.detected__s { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.detected .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.step__foot { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.step__foot .spacer { flex: 1; }

.aside-note {
  margin-top: 26px; padding: 14px 16px;
  border-left: 2px solid var(--rule); color: var(--ink-2); font-size: 13.5px;
}
.aside-note b { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 232px 1fr; }
  .preview { position: fixed; inset: var(--topbar-h) 0 0 auto; width: min(560px, 92vw); z-index: 50;
             box-shadow: var(--pop-shadow); transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.3,1); }
  .preview.is-open { transform: none; }
  .preview-toggle { display: inline-flex !important; }
  .bench { grid-template-columns: 1fr; }
  .bench__right { border-left: 0; border-top: 1px solid var(--rule); height: 300px; }
}
.preview-toggle { display: none; }

@media (max-width: 820px) {
  .page { padding: 26px 16px 70px; }
  .page__head h1 { font-size: 28px; }
  .bench__title { font-size: 23px; }
  .topbar__sep, .topbar > span:not(.topbar__spacer):not(.urlchip) { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .rail { position: fixed; inset: var(--topbar-h) auto 0 0; width: 262px; z-index: 45;
          transform: translateX(-100%); transition: transform .26s ease; box-shadow: var(--pop-shadow); }
  .rail.is-open { transform: none; }
  .rail-toggle { display: inline-flex !important; }
  .page__head { flex-direction: column; align-items: flex-start; }
  .ledger__row { grid-template-columns: 1fr auto; }
  .ledger__when, .ledger__who { grid-column: 1 / -1; }
  .topbar .urlchip { display: none; }
}
.rail-toggle { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
