:root {
  --ink: #1c1917;
  --paper: #fbf8f4;
  --orange: #f57c00;
  --orange-ink: #8a3b00;
  --muted: #6f675f;
  --faint: #948c84;
  --line: #e6e0d6;
  --card: #ffffff;
  --secondary: #f3eee6;
  --column: 40rem;
  color-scheme: light;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

svg {
  width: 16px;
  height: 16px;
  flex: none;
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
.project-name,
.brief-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kicker,
.eyebrow {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-ink);
}

.eyebrow {
  margin-bottom: 8px;
}

.lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-word {
  height: 22px;
  width: auto;
}

/* Sign in */

#cover {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}

.cover-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: 100vh;
  padding: 48px;
  background: #1c1917;
  color: #fbf8f4;
  overflow: hidden;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(255, 255, 255, 0.28) 0.5px, transparent 0.6px);
  background-size: 4px 4px;
}

.cover-brand .brand,
.cover-copy,
.rules {
  position: relative;
}

.cover-copy {
  max-width: 34rem;
}

.eyebrow-light {
  color: rgba(251, 248, 244, 0.55);
  margin-bottom: 18px;
}

.cover-brand h1 {
  margin: 0;
  font-size: clamp(2.7rem, 4.4vw, 3.7rem);
  line-height: 1.05;
  color: #fbf8f4;
}

.cover-lead {
  margin: 22px 0 0;
  max-width: 28rem;
  color: rgba(251, 248, 244, 0.72);
  font-size: 1.05rem;
  line-height: 1.6;
}

.rules {
  color: rgba(251, 248, 244, 0.5);
  font-size: 0.92rem;
}

.rules p {
  margin: 0 0 6px;
}

.cover-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 28px;
  background: var(--paper);
}

.brand-mobile {
  display: none;
  margin: 0 auto 28px;
}

.auth-card {
  width: min(100%, 24rem);
  margin: 0 auto;
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 2.6rem;
  line-height: 1.1;
}

.auth-card .lead {
  margin: 0 0 32px;
}

.auth-card .kicker {
  margin-bottom: 14px;
}

/* Workspace shell */

.shell {
  display: flex;
  height: 100vh;
  min-height: 100vh;
  background: var(--paper);
}

.nav {
  width: 248px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 14px 14px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.nav-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  border: 1px dashed #ddd4c8;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}

.nav-new:hover {
  background: var(--secondary);
  color: var(--ink);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
}

.nav-link.is-current {
  background: var(--secondary);
  color: var(--ink);
  font-weight: 500;
}

.nav-chevron {
  margin-left: auto;
}

.nav-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-user-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nav-user-text strong,
.nav-user-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-text strong {
  font-size: 0.88rem;
  font-weight: 600;
}

.nav-user-text small {
  color: var(--faint);
  font-size: 0.75rem;
}

.sign-out {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--faint);
  padding: 6px;
  border-radius: 8px;
}

.sign-out:hover {
  color: var(--ink);
  background: var(--secondary);
}

.shell-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

.workspace-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 40px 18px;
  background: rgba(251, 248, 244, 0.92);
  backdrop-filter: blur(10px);
}

.workspace-bar h1 {
  margin: 6px 0 0;
  font-size: 2.4rem;
  line-height: 1;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--faint);
}

.search input {
  width: 9rem;
  border: 0;
  background: transparent;
  min-height: 38px;
  padding: 0;
}

.search input:focus {
  outline: none;
}

.search:focus-within {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.workspace-body {
  padding: 8px 40px 48px;
}

.workspace-lead {
  max-width: 40rem;
  margin: 0 0 28px;
}

.notice {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.invite-panel {
  max-width: 40rem;
  margin: 0 0 36px;
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.invite-panel h2,
.project-group {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.project-group {
  margin: 28px 0 8px;
}

.invite-form {
  display: grid;
  gap: 12px;
}

.invite-scope {
  margin: 0;
  padding: 0;
  border: 0;
}

.invite-scope legend {
  margin-bottom: 10px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.35rem;
}

.invite-scope .choice-grid {
  margin-bottom: 4px;
}

.invite-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.invite-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.invite-list small {
  display: block;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.project-card,
.new-card {
  position: relative;
  min-height: 228px;
  border-radius: 16px;
  background: var(--card);
}

.project-card {
  border: 1px solid var(--line);
}

.project-open {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 48px;
  text-decoration: none;
  color: inherit;
}

.swatch {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  margin-bottom: 22px;
  background: linear-gradient(160deg, #fff7ee, #f6d7b0);
}

.project-card:nth-child(3n + 2) .swatch {
  background: linear-gradient(160deg, #fffdf8, #f3e6cf);
}

.project-card:nth-child(3n) .swatch {
  background: linear-gradient(160deg, #fff4ea, #f8c9a2);
}

.project-card h2,
.project-name {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
}

.project-org {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-org.is-empty {
  color: var(--faint);
}

.project-progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-track {
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: #ece7df;
  overflow: hidden;
}

.progress-track span,
#progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--orange);
}

.project-meta,
.progress-label {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 0.8rem;
}

.danger-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 0.78rem;
  padding: 4px;
}

.danger-btn:hover {
  color: #9f2d2d;
}

.new-card {
  border: 1px dashed #ddd4c8;
  background: transparent;
}

.new-card button {
  width: 100%;
  min-height: 228px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
}

.new-card strong {
  font-weight: 500;
  color: var(--ink);
}

.new-card small {
  max-width: 16rem;
  text-align: center;
  color: var(--faint);
}

.new-plus {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  border: 1px dashed #ddd4c8;
  border-radius: 10px;
  font-size: 1.2rem;
}

.search-empty {
  margin-top: 18px;
}

/* Workbook */

.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  min-height: 0;
}

.spine {
  width: 288px;
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.back-link:hover {
  color: var(--ink);
}

.spine .kicker {
  margin-bottom: 8px;
}

.spine .project-name {
  font-size: 1.35rem;
}

.spine .project-org {
  margin-bottom: 18px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 7px 8px;
  text-align: left;
  color: var(--muted);
}

.step:hover {
  background: rgba(243, 238, 230, 0.7);
  color: var(--ink);
}

.step .num {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--secondary);
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 600;
}

.step .label {
  font-size: 0.92rem;
}

.step.is-current {
  background: var(--secondary);
  color: var(--ink);
  font-weight: 500;
}

.step.is-current .num {
  background: var(--ink);
  color: var(--paper);
}

.step.is-done:not(.is-current) .num {
  background: var(--orange);
  color: var(--ink);
}

.step-brief {
  margin-top: 8px;
}

.spine-foot {
  margin-top: auto;
  padding-top: 18px;
}

.keep {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.keep summary {
  cursor: pointer;
}

.keep-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
}

.text-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--orange-ink);
  text-decoration: none;
}

.frame {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid transparent;
}

.frame-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-pill,
.save-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.88rem;
}

.ghost-pill {
  color: var(--ink);
}

.save-pill {
  margin: 0;
  color: var(--muted);
}

.sheet-scroll {
  flex: 1;
  overflow: auto;
  padding: 12px 28px 48px;
}

.column {
  width: min(100%, var(--column));
  margin: 0 auto;
}

.chapter > .kicker {
  display: none;
}

.chapter h2 {
  margin: 8px 0 12px;
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.chapter .lead {
  margin: 0 0 36px;
  max-width: 38rem;
}

.why-note {
  margin: -12px 0 18px;
  max-width: 40rem;
}

.why-note p {
  margin: 0 0 12px;
}

.why-note a {
  font-weight: 500;
  color: var(--orange-ink);
}

.film {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 28px;
  border-radius: 16px;
  overflow: hidden;
  background: #1c1917;
}

.film iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.group {
  margin: 0 0 36px;
}

.group h3 {
  margin: 0 0 16px;
  font-size: 1.7rem;
}

.group-lead {
  margin: -8px 0 16px;
  color: var(--muted);
}

.pace-note {
  margin: -18px 0 28px;
  max-width: 38rem;
  color: var(--muted);
}

.choices + .pace-note {
  margin-top: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}

.field > span {
  font-size: 0.9rem;
  font-weight: 500;
}

.field > span em,
.field small {
  font-style: normal;
  font-weight: 400;
  color: var(--faint);
}

.field small {
  margin-top: -4px;
  font-size: 0.82rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: transparent;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #b7afa6;
}

.field.featured textarea {
  min-height: 140px;
}

.choices {
  border: 0;
  margin: 0 0 8px;
  padding: 0;
}

.choices legend {
  margin-bottom: 12px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.7rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice {
  position: relative;
  display: block;
}

.choice[hidden] {
  display: none;
}

.choice input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}

.choice-body {
  display: block;
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.choice-body strong {
  display: block;
  margin-bottom: 6px;
}

.choice-body small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.choice:hover .choice-body {
  border-color: #d9d0c4;
}

.choice input:checked + .choice-body {
  border-color: var(--orange);
  background: #fff8f1;
}

.choice input:focus-visible + .choice-body {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.shape-note {
  color: var(--muted);
}

.add {
  border: 0;
  background: none;
  padding: 0;
  color: var(--orange-ink);
  font-weight: 500;
}

.empty {
  color: var(--faint);
}

.roadmap-chip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.roadmap-chip strong {
  display: block;
  font-weight: 600;
}

.roadmap-chip p {
  margin: 4px 0 0;
  color: var(--muted);
}

.roadmap-chip .add {
  flex: none;
  margin-top: 2px;
}

.roadmap-timeline {
  --timeline-ink: #121820;
  --timeline-cream: #f1e2c8;
  margin: 0;
  padding: 28px 26px 22px;
  border: 1px solid #e0d0b6;
  border-radius: 20px;
  background: var(--timeline-cream);
  color: var(--timeline-ink);
}

.roadmap-timeline.is-empty {
  padding: 26px 24px;
}

.roadmap-empty {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 18px;
  align-items: start;
  min-height: 88px;
}

.roadmap-empty p {
  margin: 4px 0 0;
  color: var(--muted);
}

.roadmap-empty-line {
  position: relative;
  display: block;
  width: 2px;
  min-height: 72px;
  border-radius: 2px;
  background: #e4d4c2;
}

.roadmap-empty-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e4d4c2;
}

.roadmap-track {
  position: relative;
  margin: 0;
  padding: 4px 0 4px 36px;
  list-style: none;
}

.roadmap-track::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 18px;
  width: 2px;
  background: #f57c00;
}

.roadmap-release {
  position: relative;
  margin: 0;
  padding: 0 0 32px;
}

.roadmap-release:last-child {
  padding-bottom: 4px;
}

.roadmap-release::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f57c00;
  box-shadow: 0 0 0 5px var(--timeline-cream, #f1e2c8);
}

.roadmap-period {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a3b00;
}

.roadmap-release-title {
  margin: 0 0 12px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #121820;
}

.roadmap-epics {
  margin: 0;
  padding: 0;
  list-style: none;
}

.roadmap-epic {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.roadmap-epic-name {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: #121820;
}

.roadmap-epic-detail {
  margin: 4px 0 0;
  color: var(--muted);
}

.roadmap-epic-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 10px;
  flex: none;
}

.roadmap-release-num {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.roadmap-release-num input {
  width: 3.2rem;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.brief-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.brief-timeline li {
  position: relative;
  margin: 0;
  padding: 12px 0 12px 22px;
  border-top: 1px solid var(--line);
}

.brief-timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f57c00;
}

.brief-timeline .kicker {
  margin-bottom: 6px;
}

@media (max-width: 720px) {
  .roadmap-epic,
  .roadmap-chip {
    flex-direction: column;
  }

  .roadmap-epic-tools {
    justify-content: flex-start;
  }
}

.card {
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-index {
  margin: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.remove {
  border: 0;
  background: none;
  color: var(--faint);
  padding: 0;
}

.remove:hover {
  color: #9f2d2d;
}

.pager {
  border-top: 1px solid var(--line);
  padding: 14px 28px;
}

.pager-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pager .btn {
  border: 0;
  background: transparent;
  min-height: 0;
  padding: 6px 0;
  font-weight: 500;
}

.pager .btn-ghost {
  color: var(--muted);
}

.pager .btn-primary {
  color: var(--orange-ink);
}

.pager .btn:disabled,
.pager .btn[hidden] {
  opacity: 0.35;
}

#workbook.is-wide {
  width: min(100%, 72rem);
}

.tabs,
.horizon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
}

.tab.is-current {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 16px;
}

.budget-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  margin: 18px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.budget-total strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
}

.budget-total span {
  color: var(--muted);
}

.benefit-lines {
  margin: 18px 0 0;
  padding: 4px 18px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.benefit-lines .group-lead {
  margin: 12px 0 8px;
}

.cost-month-lead {
  margin-top: 28px;
}

.product {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.product-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
}

.product-toggle {
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--ink);
}

.product-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.45rem;
}

.product-meta {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.product-body {
  padding: 0 16px 16px;
}

.break-even {
  margin: 16px 0 0;
  padding: 16px 18px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.break-even h3 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}

.break-even svg {
  display: block;
  width: 100%;
  height: auto;
}

.break-even .axis {
  stroke: var(--line);
  stroke-width: 1;
}

.break-even .cost-line {
  stroke: #121820;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.break-even .benefit-line {
  stroke: #f57c00;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.break-even .guide {
  stroke: #121820;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.break-even circle {
  fill: #f57c00;
  stroke: none;
}

.break-even .tick {
  fill: var(--muted);
  font-size: 9px;
}

.product-graph svg {
  display: block;
  width: 100%;
  height: auto;
}

.product-graph .axis {
  stroke: var(--line);
  stroke-width: 1;
}

.product-graph .rise,
.product-graph circle {
  stroke: var(--orange);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.product-graph circle {
  fill: var(--orange);
  stroke: none;
}

.product-graph .guide {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.product-graph .tick {
  fill: var(--muted);
  font-size: 8px;
}

.product-graph polyline.rise {
  fill: none;
}

.month-set {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.month-set legend {
  padding: 0;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

@media (min-width: 640px) {
  .month-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 880px) {
  .month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.month-cell {
  margin: 0;
  gap: 6px;
}

.month-cell > span {
  color: var(--orange-ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.month-cell input {
  min-height: 40px;
  padding: 8px 10px;
}

.month-money {
  min-height: 1.1em;
  margin-top: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.month-money strong {
  color: var(--ink);
  font-weight: 600;
}

.product-caption {
  margin: 4px 0 16px;
  color: var(--muted);
}

.product-caption strong {
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.product-sales {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-sales input[type="range"] {
  flex: 1;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #f57c00;
}

.product-sales input[type="text"],
.product-sales input:not([type="range"]) {
  width: 6.5rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.chart-card {
  padding: 16px 16px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.chart-card h3 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}

.chart-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-card .axis {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-card .tick {
  fill: var(--muted);
  font-size: 9px;
}

.chart-card .income-line,
.chart-card .profit-line {
  stroke: #f57c00;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-card .cost-line {
  stroke: #121820;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-card .guide {
  stroke: #121820;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.swatch-income,
.swatch-cost {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.swatch-income {
  background: var(--orange);
}

.swatch-cost {
  background: var(--ink);
  margin-left: 8px;
}

.break-even .swatch-cost {
  background: #121820;
}

.forecast-lead {
  margin: 0 0 16px;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.budget-table th,
.budget-table td {
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.budget-table th:first-child,
.budget-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
}

.budget-table th {
  color: var(--muted);
  font-weight: 500;
}

.budget-table .neg,
.vat-line .neg {
  color: var(--orange-ink);
}

.vat-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.vat-line small {
  color: var(--faint);
  font-weight: 400;
}

.vat-line strong {
  font-variant-numeric: tabular-nums;
}

.field.money input {
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  font-weight: 500;
}

.btn-primary {
  background: var(--orange);
  color: var(--ink);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.check input {
  width: auto;
  accent-color: var(--orange);
}

.form-error {
  margin: -8px 0 12px;
  color: var(--orange-ink);
  font-size: 0.88rem;
}

.quiet {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.quiet a {
  color: var(--ink);
  text-underline-offset: 3px;
  text-decoration-color: var(--orange);
}

dialog {
  width: min(100% - 32px, 28rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: #fff;
  color: var(--ink);
}

dialog h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

dialog p {
  margin: 0;
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

dialog::backdrop {
  background: rgba(28, 25, 23, 0.35);
}

.print-only {
  display: none;
}

.brief-hero,
.brief-section,
.pull {
  margin: 0 0 22px;
}

.brief-title {
  margin: 6px 0;
  font-size: 2.4rem;
}

.brief-meta,
.brief-copy,
.brief-foot {
  color: var(--muted);
}

.brief-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.linkish {
  border: 0;
  background: none;
  color: var(--orange-ink);
  padding: 0;
}

.still {
  color: var(--faint);
}

.tag {
  color: var(--orange-ink);
  font-weight: 600;
}

.mini,
.stage-block,
.func-row,
.pull {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feel {
  display: block;
  margin: 0 0 22px;
}

.feel-ends {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 500;
}

.feel input[type="range"] {
  width: 100%;
  margin: 10px 0 4px;
  accent-color: var(--orange);
  background: transparent;
}

.feel-readout {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.quiz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz {
  position: relative;
  display: block;
  min-width: 0;
}

.quiz input {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
  margin: 0;
}

.quiz-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.quiz-body strong {
  font-size: 0.95rem;
}

.quiz-body small {
  color: var(--muted);
  line-height: 1.4;
}

.quiz input:checked + .quiz-body {
  border-color: var(--orange);
  background: #fff8f1;
}

.quiz input:focus-visible + .quiz-body {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.picture {
  display: block;
  height: 112px;
  border-radius: 12px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.picture-people {
  background: linear-gradient(160deg, #f6d7b0, #c9845a 58%, #1c1917);
}

.picture-people::before,
.picture-people::after {
  content: "";
  position: absolute;
}

.picture-people::before {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f7efe2;
  left: 22px;
  top: 22px;
}

.picture-people::after {
  width: 64px;
  height: 40px;
  border-radius: 36px 36px 10px 10px;
  background: #fff7ee;
  left: 12px;
  bottom: 10px;
}

.picture-graphic {
  background: #1c1917;
}

.picture-graphic::before,
.picture-graphic::after {
  content: "";
  position: absolute;
}

.picture-graphic::before {
  width: 72px;
  height: 72px;
  background: var(--orange);
  left: 16px;
  top: 16px;
}

.picture-graphic::after {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fbf8f4;
  right: 18px;
  bottom: 14px;
}

.picture-line {
  background:
    linear-gradient(#1c1917, #1c1917) 24px 78px / 90px 2px no-repeat,
    linear-gradient(#1c1917, #1c1917) 24px 36px / 2px 56px no-repeat,
    radial-gradient(circle at 70% 40%, transparent 16px, #1c1917 17px, #1c1917 18px, transparent 19px),
    #f7efe2;
}

.picture-mono {
  background: linear-gradient(135deg, #f4f1ec 0 40%, #8a847c 40% 62%, #1c1917 62%);
}

.picture-quiet {
  background: #f7f3ec;
}

.picture-quiet::before {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  background: var(--orange);
  right: 22px;
  bottom: 22px;
}

.picture-object {
  background: radial-gradient(circle at 50% 48%, #f6d7b0 0 28px, #c9845a 29px 46px, #1c1917 47px);
}

.specimen {
  display: block;
  min-height: 4.6rem;
  margin-bottom: 8px;
  line-height: 1.25;
  color: var(--ink);
}

.specimen-editorial {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.55rem;
}

.specimen-plain {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 1.15rem;
  padding-top: 0.6rem;
}

.specimen-traditional {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.15rem;
  padding-top: 0.35rem;
}

.specimen-warm {
  font-family: Nunito, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  padding-top: 0.45rem;
}

.specimen-geometric {
  font-family: Outfit, sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  padding-top: 0.45rem;
}

.specimen-technical {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 0.92rem;
  padding-top: 0.7rem;
}

@media (max-width: 980px) {
  #cover {
    grid-template-columns: 1fr;
  }

  .cover-brand {
    display: none;
  }

  .brand-mobile {
    display: flex;
  }

  .shell {
    height: auto;
    min-height: 100vh;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-user {
    margin-top: 0;
  }

  .workspace {
    flex-direction: column;
  }

  .spine {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
  }

  .steps {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .step {
    width: auto;
    flex: none;
  }

  .spine-foot {
    display: none;
  }

  .frame {
    min-height: 70vh;
  }

  .grid-2,
  .grid-3,
  .choice-grid,
  .cols,
  .chart-grid,
  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .workspace-bar,
  .workspace-body,
  .frame-bar,
  .sheet-scroll,
  .pager {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: white !important;
  }

  .nav,
  .spine,
  .frame-bar,
  .pager,
  .no-print {
    display: none !important;
  }

  .shell,
  .workspace,
  #app,
  .frame,
  .sheet-scroll {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  .chapter {
    display: none !important;
  }

  #chapter-brief.chapter {
    display: block !important;
  }

  .print-only {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
  }

  .print-only img {
    width: 150px;
  }

  .pull,
  .mini,
  .func-row,
  .stage-block,
  .brief-timeline li {
    break-inside: avoid;
  }
}
