:root {
  --bg: #050806;
  --surface: #0b110d;
  --surface-2: #101914;
  --surface-3: #16211b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-green: rgba(47, 231, 132, 0.24);
  --ink: #f2f5f2;
  --ink-2: #cad4cd;
  --muted: #95a59b;
  --green: #00BF63;
  --green-bright: #2FE784;
  --green-ink: #03130a;
  --green-wash: rgba(47, 231, 132, 0.1);
  --amber: #f1c46f;
  --amber-wash: rgba(241, 196, 111, 0.13);
  --blue: #aec4ff;
  --blue-wash: rgba(140, 170, 255, 0.12);
  --danger: #ffb4a8;
  --radius: 22px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  --sans: "Space Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --li-font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 96px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { max-width: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-bright); text-underline-offset: 3px; }
p { margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--sans); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--green-bright); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--green-bright); color: var(--green-ink); font-weight: 700;
  padding: 12px 16px; border-radius: 12px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Brand */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; min-height: 44px;
}
.brand-mark { flex: none; display: block; width: 29px; height: 32px; object-fit: contain; }
.brand-word { font-weight: 600; font-size: 1.22rem; letter-spacing: -0.04em; line-height: 1; }
.brand-word em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: 0; color: var(--green-bright); }

/* Layout */
.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 14px 0 10px; }
.masthead-for { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; }
.masthead-for strong { color: var(--ink-2); font-weight: 700; }

/* Sticky section bar */
.bar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5, 8, 6, 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.bar-inner { display: grid; gap: 4px; padding: 6px 0 9px; }
.bar-links { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.bar-link {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 0 6px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.94rem; letter-spacing: -0.01em;
  white-space: nowrap;
}
.bar-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.bar-link[aria-current] { color: var(--green-bright); background: var(--green-wash); }
.bar-progress { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.bar-track { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-count { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-2); white-space: nowrap; }
.fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--green-bright)); transition: width 0.4s ease; }

/* Hero */
main.shell:focus { outline: none; }
.hero { padding: 28px 0 8px; display: grid; gap: 22px; }
.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--green-bright); margin-bottom: 12px;
}
.hero-title { font-size: clamp(2.05rem, 8.6vw, 3.7rem); line-height: 1.04; letter-spacing: -0.04em; text-wrap: pretty; }
.hero-title .serif { font-size: 1.1em; letter-spacing: -0.02em; }
.hero-lead { margin-top: 14px; color: var(--ink-2); font-size: 1.1rem; line-height: 1.5; max-width: 34rem; }

.steps {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
}
.step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; }
.step + .step { border-top: 1px solid var(--line); }
.step-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--green-wash); color: var(--green-bright);
}
.step-text strong { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.step-text span { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.45; margin-top: 2px; }

/* Progress summary and done state */
.summary {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-green); border-radius: var(--radius);
  background: radial-gradient(120% 90% at 100% 0%, rgba(47, 231, 132, 0.12), transparent 60%), var(--surface);
  padding: 22px 20px 20px; box-shadow: var(--shadow);
  align-self: start;
}
.summary-count { font-size: 1.15rem; color: var(--ink-2); }
.summary-count strong { font-size: 2.6rem; line-height: 1; color: var(--ink); font-weight: 600; letter-spacing: -0.04em; margin-right: 2px; }
.summary-track { display: block; height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 14px; }
.summary-sub { margin-top: 10px; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.summary-actions { display: grid; gap: 10px; margin-top: 18px; }

.done { outline: none; }
.done-icon {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: var(--green-bright); color: var(--green-ink); margin-bottom: 16px;
}
.done-title { font-size: 1.75rem; letter-spacing: -0.035em; }
.done-lead { margin-top: 6px; color: var(--ink-2); font-size: 1.05rem; }
.next-title {
  margin-top: 20px; font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--green-bright);
}
.next-list { list-style: none; counter-reset: next; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.next-list li { counter-increment: next; position: relative; padding-left: 38px; color: var(--ink-2); font-size: 0.98rem; line-height: 1.45; }
.next-list li::before {
  content: counter(next); position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
  background: var(--green-wash); color: var(--green-bright); font-family: var(--mono); font-size: 0.74rem; font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; text-decoration: none; text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--green-bright); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn.primary:hover { background: var(--green-bright); border-color: var(--green-bright); }
.btn.secondary { background: rgba(255, 255, 255, 0.03); }
.btn.ghost { background: transparent; }
.btn.tiny { min-height: 36px; padding: 0 12px; font-size: 0.78rem; font-family: var(--mono); border-radius: 10px; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.link-btn {
  background: none; border: 0; padding: 10px 0; min-height: 44px;
  color: var(--green-bright); font-weight: 600; font-size: 0.98rem; text-decoration: underline; text-underline-offset: 4px;
}

/* Parts and groups */
.part { margin-top: 56px; }
.part-head { border-top: 1px solid var(--line); padding-top: 24px; }
.part-kicker { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--green-bright); }
.part-title { font-size: clamp(1.9rem, 6.5vw, 2.6rem); letter-spacing: -0.04em; margin-top: 8px; }
.part-lead { margin-top: 8px; color: var(--muted); font-size: 1rem; max-width: 30rem; }
.part-count {
  display: inline-flex; margin-top: 14px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2);
}
.group { margin-top: 30px; }
.group-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-family: var(--mono); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.group-num {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 0.7rem; letter-spacing: 0;
}
.cards { display: grid; gap: 18px; }

/* Card */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 16px 16px; box-shadow: var(--shadow);
}
.card[data-status="approved"], .card[data-status="scheduled"], .card[data-status="posted"] { border-color: var(--line-green); }
.card:focus-visible { outline-offset: 4px; }
.card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; }
.card-kicker { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.card-title { grid-column: 1 / -1; font-size: 1.22rem; line-height: 1.25; letter-spacing: -0.02em; overflow-wrap: anywhere; }

.badge {
  flex: none; display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.07); color: var(--ink-2);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.badge.pending_review { background: var(--amber-wash); color: var(--amber); }
.badge.approved, .badge.scheduled, .badge.posted { background: var(--green-wash); color: var(--green-bright); }
.badge.edits_requested { background: var(--blue-wash); color: var(--blue); }

.team-note {
  margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border-left: 3px solid var(--green);
  color: var(--ink-2); font-size: 0.95rem; line-height: 1.5;
}
.team-note-label {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green-bright); margin-bottom: 4px;
}
.team-note.updated { border-left-color: var(--green-bright); background: linear-gradient(90deg, rgba(47, 231, 132, 0.08), var(--surface-2)); }
.compare { margin-top: 10px; }
.compare summary {
  display: inline-flex; align-items: center; min-height: 44px; cursor: pointer;
  color: var(--green-bright); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.compare-key { display: flex; gap: 8px; margin: 4px 0 8px; font-family: var(--mono); font-size: 0.7rem; }
.diff { white-space: pre-wrap; background: #070b09; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 0.92rem; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
del { background: rgba(255, 120, 100, 0.16); color: #ffc9c0; text-decoration: line-through; text-decoration-thickness: 1px; border-radius: 3px; padding: 0 2px; }
ins { background: rgba(47, 231, 132, 0.16); color: var(--green-bright); text-decoration: none; border-radius: 3px; padding: 0 2px; }

/* LinkedIn style preview */
.li {
  margin: 16px 0 0; background: #ffffff; color: rgba(0, 0, 0, 0.9);
  border-radius: 12px; overflow: hidden; font-family: var(--li-font); letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.li :focus-visible { outline-color: #0a66c2; }
.li-head { display: flex; gap: 10px; padding: 12px 14px 0; align-items: flex-start; }
.li-avatar {
  flex: none; width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center;
  background: #0f3d27; color: #ffffff; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; letter-spacing: 0;
}
.li-avatar.square { border-radius: 8px; }
img.li-avatar { object-fit: cover; background: #d9dde1; padding: 0; box-sizing: border-box; }
img.li-avatar.square { object-fit: contain; background: #ffffff; padding: 4px; }
.li-meta { min-width: 0; display: grid; line-height: 1.3; }
.li-meta strong { font-size: 0.92rem; font-weight: 600; }
.li-role, .li-time { font-size: 0.76rem; color: #5e5e5e; }
.li-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-time { display: inline-flex; align-items: center; gap: 4px; }
.li-body { padding: 10px 14px 12px; }
.li-text { white-space: pre-wrap; font-size: 0.92rem; line-height: 1.45; overflow-wrap: anywhere; }
.li-more {
  display: inline-flex; align-items: center; min-height: 32px; padding: 2px 0; margin-top: 2px;
  background: none; border: 0; color: #5e5e5e; font-size: 0.9rem; font-family: var(--li-font);
}
.li-more:hover { color: #0a66c2; text-decoration: underline; }
.li .stage { margin: 0; border-radius: 0; }
.li-profile .li-cover { background: linear-gradient(135deg, #c7d6cd, #a7bdb0); overflow: hidden; }
.li-profile .li-cover:empty { aspect-ratio: 4 / 1; }
.li-profile .li-cover img { width: 100%; height: auto; display: block; }
.li-profile-body { padding: 0 16px 16px; }
.li-avatar.big { position: relative; z-index: 1; width: 84px; height: 84px; font-size: 1.5rem; margin-top: -42px; border: 3px solid #ffffff; }
.li-profile.company .li-avatar.big { width: 72px; height: 72px; margin-top: -30px; }
.li-avatar.big.square { border-radius: 10px; }
.li-name { margin-top: 8px; font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.li-headline { margin-top: 4px; font-size: 0.95rem; line-height: 1.4; overflow-wrap: anywhere; }
.li-sub { margin-top: 4px; font-size: 0.82rem; color: #5e5e5e; }
.li-about { padding: 16px 0 4px; }
.li-section { padding: 0 14px; font-size: 1.1rem; font-weight: 600; }
.li-about .li-body { padding-top: 8px; }
.count { margin-top: 8px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.count.over { color: var(--amber); }

/* Image stage and pins */
.stage { position: relative; margin-top: 16px; border-radius: 14px; overflow: hidden; background: var(--surface-2); line-height: 0; }
.stage img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.stage-hint {
  display: none; position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  padding: 7px 12px; border-radius: 999px; background: rgba(5, 8, 6, 0.88); color: var(--green-bright);
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.2; white-space: nowrap; pointer-events: none; z-index: 3;
}
.is-marking .stage { touch-action: none; cursor: crosshair; box-shadow: inset 0 0 0 3px var(--green-bright); }
.is-marking .stage .stage-hint { display: block; }
.is-marking .stage.has-drafts .stage-hint { display: none; }
.pin {
  position: absolute; z-index: 2; width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center; transform: translate(-50%, -50%);
  background: var(--green-bright); color: var(--green-ink); border: 2px solid #050806;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700; line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.box { position: absolute; z-index: 1; border: 2px solid var(--green-bright); background: rgba(47, 231, 132, 0.16); border-radius: 6px; }
.box > .pin { left: 0; top: 0; }
@media (max-width: 639px) {
  .pin { width: 26px; height: 26px; font-size: 0.72rem; }
}
.box.rubber { border-style: dashed; }
.saved-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.saved-notes li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 0.95rem; }
.saved-num {
  flex: none; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
  background: var(--green-bright); color: var(--green-ink); font-family: var(--mono); font-size: 0.74rem; font-weight: 700;
}
.design-note { margin-top: 14px; }
.design-note-label, .thread-title, .picked-label, .mark-title {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.caption { white-space: pre-wrap; overflow-wrap: anywhere; }
.design-note .caption { margin-top: 4px; color: var(--ink-2); }

/* Thread */
.thread { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.thread ol { list-style: none; margin: 4px 0 0; padding: 0; }
.thread-entry { padding: 12px 0 2px; }
.thread-entry + .thread-entry { border-top: 1px solid var(--line); margin-top: 10px; }
.thread-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.thread-meta span:first-child { color: var(--ink); font-weight: 700; }
.tag { padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.open-tag { background: var(--blue-wash); color: var(--blue); }
.done-tag { background: var(--green-wash); color: var(--green-bright); }
.thread-text { margin-top: 6px; color: var(--ink-2); font-size: 0.96rem; overflow-wrap: anywhere; }
.thread-text.muted { color: var(--muted); font-size: 0.9rem; }
.thread-rewrite { margin-top: 4px; color: var(--ink-2); font-size: 0.92rem; padding: 10px 12px; border-radius: 10px; background: #070b09; }
blockquote {
  margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--green-bright);
  background: var(--green-wash); border-radius: 0 10px 10px 0; color: var(--ink); font-size: 0.94rem;
}
.resolution { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--green-wash); color: var(--ink-2); font-size: 0.94rem; }
.resolution strong { color: var(--green-bright); }

/* Decision */
.decision { margin-top: 18px; }
.state-msg {
  padding: 12px 14px; border-radius: 14px; font-size: 0.96rem; line-height: 1.45;
  background: var(--green-wash); color: #dff9eb; border-left: 3px solid var(--green-bright);
}
.state-msg.edits_requested { background: var(--blue-wash); color: #e2e9ff; border-left-color: var(--blue); }
.decision-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.state-msg + .decision-actions { margin-top: 12px; }
.decision-actions .btn { min-height: 54px; font-size: 1.02rem; }

/* Request changes form */
.changes {
  margin-top: 18px; padding: 16px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--line-green);
}
.changes-title { font-size: 1.12rem; letter-spacing: -0.02em; }
.field-label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 0.98rem; }
textarea, input[type="text"], input[type="url"], input[type="password"], input[type="date"], input[type="datetime-local"], select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px;
  background: #060a08; color: var(--ink); font-size: 1rem; line-height: 1.5; font-weight: 400;
}
textarea { resize: vertical; min-height: 96px; }
textarea:focus, input:focus, select:focus { border-color: var(--green-bright); }
textarea::placeholder { color: #7f8f85; }
.hint { margin-top: 8px; color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.picked { margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line-green); }
.picked blockquote { margin-top: 6px; }
.mark { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mark .hint { margin-top: 4px; }
.draft-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.draft-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: start; }
.draft-item .saved-num { margin-top: 10px; }
.draft-item textarea { min-height: 64px; }
.draft-item .link-btn { grid-column: 2; justify-self: start; padding: 4px 0; min-height: 32px; font-size: 0.9rem; }
.toggle { margin-top: 10px; }
.rewrite { margin-top: 2px; }
.rewrite textarea { min-height: 220px; font-size: 0.98rem; }
.changes-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.changes-actions .btn { min-height: 54px; }
.form-error {
  margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 120, 100, 0.12); color: var(--danger); font-weight: 600; font-size: 0.94rem;
}

/* Footer */
.foot { margin: 80px 0 0; padding: 28px 0 calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.foot p { color: var(--muted); font-size: 0.92rem; max-width: 36rem; }
.empty-state { margin-top: 32px; padding: 28px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; }
.batch-head { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.batch-title { font-size: 2rem; margin-bottom: 18px; }

/* Dialog and toast */
.modal {
  width: min(440px, calc(100% - 32px)); padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--line-green); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal::backdrop { background: rgba(2, 4, 3, 0.78); }
.modal h2 { font-size: 1.45rem; letter-spacing: -0.03em; }
.modal p { margin-top: 10px; color: var(--ink-2); }
.modal-actions { display: grid; gap: 10px; margin-top: 20px; }
.modal-actions .btn { min-height: 52px; }
.toaster {
  position: fixed; z-index: 60; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 24px)); transform: translate(-50%, 16px); opacity: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-radius: 16px; background: #effcf4; color: #04140c;
  font-weight: 600; font-size: 0.98rem; line-height: 1.35; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toaster.show { opacity: 1; transform: translate(-50%, 0); }
.toast-action { flex: none; color: #00592e; font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }
.toaster :focus-visible { outline-color: #00592e; }

/* Home and missing link pages */
.solo { width: min(560px, calc(100% - 32px)); margin: 14vh auto 0; }
.solo-title { font-size: clamp(2.4rem, 9vw, 3.4rem); margin: 28px 0 14px; letter-spacing: -0.03em; }
.solo p { color: var(--ink-2); }
.solo p + p { margin-top: 22px; }

/* Admin desk */
.top, .wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.top { padding: 22px 0 12px; display: grid; gap: 8px; }
.top h1 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: 0; }
.wordmark { display: inline-block; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.35rem; letter-spacing: -0.04em; }
.wordmark em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--green-bright); }
.admin .eyebrow { color: var(--muted); margin-bottom: 4px; }
.label, .meta { font-family: var(--mono); color: var(--muted); font-size: 0.78rem; }
.meta { margin: 4px 0 8px; }
.gate, .inbox-card, .client-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.gate { max-width: 420px; padding: 22px; margin-top: 20px; }
label { display: grid; gap: 6px; font-weight: 600; margin: 8px 0; }
.tabs { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.tab { border: 0; background: transparent; min-height: 44px; border-bottom: 2px solid transparent; font-weight: 600; color: var(--muted); }
.tab.on { border-color: var(--green-bright); color: var(--ink); }
.filters { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 14px; }
.inbox-card, .client-block { padding: 16px; margin: 0 0 12px; }
.inbox-card h2, .client-block h2, .import-box h2 { font-size: 1.3rem; margin: 2px 0; }
.client-block h3 { font-size: 1.1rem; margin-top: 18px; }
.client-block h4 { font-size: 1rem; }
.inbox-card textarea, .client-block textarea { margin-top: 8px; }
.section-head, .row-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.section-head { justify-content: space-between; margin-top: 18px; }
.row-actions { margin-top: 12px; }
.pin-stage { position: relative; margin: 10px 0; }
.pin-stage img { width: 100%; border-radius: 12px; display: block; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.import-box textarea { min-height: 220px; font-family: var(--mono); font-size: 0.8rem; }
.item-row { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.link-line { display: flex; gap: 8px; align-items: center; }
.error { color: var(--danger); font-weight: 600; }
.toast { color: var(--green-bright); font-weight: 600; }

@media (min-width: 640px) {
  .shell { width: min(1120px, calc(100% - 48px)); }
  .card { padding: 24px; }
  .summary { padding: 26px; }
  .summary-actions { grid-template-columns: 1fr 1fr; }
  .modal-actions { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .changes { padding: 20px; }
}

@media (min-width: 880px) {
  .bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 0; }
  .bar-links { display: flex; gap: 6px; }
  .bar-link { padding: 0 14px; }
  .bar-progress { width: 280px; padding: 0; }
  .masthead-row { padding: 18px 0 14px; }
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.85fr);
    grid-template-areas: "copy summary" "steps summary";
    gap: 28px 56px; padding-top: 56px; align-items: start;
  }
  .hero-copy { grid-area: copy; }
  .hero > .summary { grid-area: summary; margin-top: 6px; }
  .hero > .steps { grid-area: steps; }
  .summary-actions { grid-template-columns: 1fr; }
}

@media (min-width: 1024px) {
  .part { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; margin-top: 88px; }
  .part-head { position: sticky; top: calc(var(--nav-h) - 16px); align-self: start; }
  .part-body > .group:first-child { margin-top: 0; }
  .group-title { margin-top: 2px; }
  .cards { gap: 22px; }
  .card { padding: 26px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
