:root {
  color-scheme: light;
  --ink: #28241f;
  --muted: #766e64;
  --muted-2: #9e958a;
  --paper: #f7f3eb;
  --surface: #fffcf7;
  --surface-2: #f0eadf;
  --line: #ded6ca;
  --line-soft: #eae3d9;
  --orange: #d95f35;
  --orange-deep: #a63f22;
  --orange-soft: #f7ded2;
  --sage: #4d7663;
  --sage-soft: #dde8df;
  --blue: #4d6f83;
  --blue-soft: #dce8ed;
  --shadow: 0 18px 55px rgba(69, 53, 36, 0.09);
  --shadow-small: 0 8px 24px rgba(69, 53, 36, 0.08);
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --sidebar: 300px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 0%, rgba(217, 95, 53, 0.08), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

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

button,
label[for],
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
label[tabindex]:focus-visible {
  outline: 3px solid rgba(77, 111, 131, 0.28);
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.96);
  backdrop-filter: blur(18px);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 20px 17px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px 11px 11px 3px;
  background: var(--ink);
  color: #fff8ed;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-style: italic;
  letter-spacing: -1px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.brand small {
  margin-top: -2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--muted-2);
  background: white;
}

.sidebar-close,
.menu-button {
  display: none;
}

.overall-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  margin: 1px 16px 16px;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.progress-ring {
  --progress: 0deg;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--orange) var(--progress), #ddd5c8 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  position: relative;
}

.progress-ring::after {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.progress-ring span {
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.overall-card strong,
.overall-card small {
  display: block;
}

.overall-card strong {
  font-size: 14px;
}

.overall-card small:last-child {
  color: var(--muted);
  font-size: 11px;
}

.search-wrap {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 5px;
  margin: 0 16px 10px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.search-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(77, 111, 131, 0.1);
}

.search-wrap input {
  min-width: 0;
  padding: 9px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-wrap kbd,
.shortcut-list kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
}

.filter-group {
  display: flex;
  gap: 6px;
  padding: 0 16px 12px;
}

.filter-chip {
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.stage-navigation {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 11px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.milestone-group {
  margin: 0 0 16px;
}

.milestone-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.milestone-heading span {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.stage-link {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.stage-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.stage-link.is-current {
  background: var(--ink);
  color: #fffaf2;
  box-shadow: var(--shadow-small);
}

.stage-link.is-hidden {
  display: none;
}

.stage-link-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
}

.stage-link.is-current .stage-link-number {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.stage-link.is-complete .stage-link-number {
  border-color: var(--sage);
  background: var(--sage-soft);
  color: var(--sage);
  font-family: inherit;
  font-style: normal;
}

.stage-link.is-current.is-complete .stage-link-number {
  border-color: transparent;
  background: var(--sage);
  color: white;
}

.stage-link-copy {
  min-width: 0;
}

.stage-link-copy strong,
.stage-link-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-link-copy strong {
  color: inherit;
  font-size: 12px;
  font-weight: 650;
}

.stage-link-copy small {
  color: var(--muted-2);
  font-size: 10px;
}

.stage-link.is-current small {
  color: rgba(255, 255, 255, 0.55);
}

.stage-link-progress {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
}

.stage-link.is-current .stage-link-progress {
  color: rgba(255, 255, 255, 0.65);
}

.no-results {
  margin: 30px 15px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 12px 12px 14px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.quiet-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.quiet-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(22px, 4vw, 64px);
  border-bottom: 1px solid rgba(222, 214, 202, 0.72);
  background: rgba(247, 243, 235, 0.88);
  backdrop-filter: blur(18px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb strong {
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.offline-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.offline-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.workspace {
  width: min(1220px, calc(100% - clamp(32px, 7vw, 96px)));
  margin: 0 auto;
  padding: clamp(35px, 5vw, 64px) 0 30px;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, 1.25fr);
  align-items: end;
  gap: clamp(28px, 5vw, 70px);
  margin-bottom: 34px;
}

.welcome-copy h1 {
  max-width: 620px;
  margin: 8px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 53px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.welcome-copy h1 em {
  color: var(--orange);
  font-weight: 400;
}

.welcome-copy p {
  max-width: 550px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.summary-card {
  position: relative;
  display: grid;
  min-height: 132px;
  align-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(69, 53, 36, 0.035);
  overflow: hidden;
}

.summary-card.accent-card {
  background: var(--ink);
  color: #fffaf2;
}

.summary-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.11);
  color: white;
}

.summary-icon.warm {
  background: var(--orange-soft);
  color: var(--orange-deep);
}

.summary-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.summary-card small,
.summary-card strong {
  display: block;
}

.summary-card small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
}

.summary-card.accent-card small {
  color: rgba(255, 255, 255, 0.6);
}

.summary-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.summary-caption {
  color: var(--muted);
  font-size: 9px;
}

.mini-progress {
  height: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
}

.mini-progress span,
.task-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  transition: width 260ms ease;
}

.focus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  align-items: start;
  gap: 18px;
}

.stage-card,
.right-rail section {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stage-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stage-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 27px 22px;
  background:
    linear-gradient(105deg, transparent 62%, rgba(217, 95, 53, 0.06)),
    var(--surface);
}

.stage-identity {
  display: flex;
  min-width: 0;
  gap: 18px;
}

.stage-number {
  display: grid;
  width: 54px;
  height: 61px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #e4c9ba;
  border-radius: 17px 17px 17px 5px;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-style: italic;
}

.stage-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.stage-hero h2 {
  margin: 6px 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 3vw, 31px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.stage-hero p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.secondary-button,
.primary-button,
.task-composer button {
  border: 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.secondary-button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.secondary-button:hover {
  border-color: var(--orange);
  color: var(--orange-deep);
}

.stage-tabs {
  display: flex;
  gap: 22px;
  padding: 0 27px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.stage-tabs button {
  position: relative;
  padding: 13px 2px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.stage-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  content: "";
}

.stage-tabs button[aria-selected="true"] {
  color: var(--ink);
}

.stage-tabs button[aria-selected="true"]::after {
  background: var(--orange);
}

.tab-panel {
  padding: 24px 27px 27px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 12px;
}

.section-heading h3,
.right-rail h3,
.insight-grid h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.task-count,
.saved-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.task-progress {
  height: 4px;
  margin-bottom: 15px;
  border-radius: 10px;
  background: var(--surface-2);
}

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

.task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  min-height: 51px;
  padding: 9px 3px;
  border-bottom: 1px solid var(--line-soft);
}

.task-check {
  position: relative;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid #bcb2a5;
  border-radius: 7px;
  appearance: none;
  background: white;
  cursor: pointer;
}

.task-check:checked {
  border-color: var(--sage);
  background: var(--sage);
}

.task-check:checked::after {
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.task-copy {
  min-width: 0;
}

.task-copy strong,
.task-copy small {
  display: block;
}

.task-copy strong {
  font-size: 12px;
  font-weight: 650;
}

.task-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.task-item.is-done .task-copy strong {
  color: var(--muted);
  text-decoration: line-through;
}

.task-badge,
.time-pill {
  padding: 3px 7px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.task-delete {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  opacity: 0;
}

.task-item:hover .task-delete,
.task-delete:focus-visible {
  opacity: 1;
}

.task-delete:hover {
  background: #fae8e1;
  color: var(--orange-deep);
}

.task-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  margin-top: 16px;
}

.composer-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 10px;
  border: 1px dashed #cfc4b6;
  border-radius: 10px;
  color: var(--orange);
}

.composer-main:focus-within {
  border-style: solid;
  border-color: var(--blue);
}

.composer-main input {
  width: 100%;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.task-composer select {
  padding: 0 27px 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--surface);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.task-composer button {
  padding: 0 13px;
  background: var(--ink);
  color: white;
}

.task-composer button:hover,
.primary-button:hover {
  background: var(--orange-deep);
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 22px;
}

.insight-grid p {
  margin: 9px 0 0;
  color: var(--muted);
}

.concept-card {
  padding: 17px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
}

.hold-back,
.failure-note {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #ead5c7;
  border-radius: var(--radius-sm);
  background: #fdf1e9;
}

.hold-back p,
.failure-note p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.acceptance-card {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-left: 3px solid var(--sage);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  background: var(--sage-soft);
}

.acceptance-card p {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.5;
}

.experiment-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  counter-reset: experiments;
  list-style: none;
}

.experiment-list li {
  position: relative;
  min-height: 40px;
  padding: 10px 12px 10px 43px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  counter-increment: experiments;
}

.experiment-list li::before {
  position: absolute;
  top: 8px;
  left: 10px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  content: counter(experiments);
  font-size: 10px;
  font-weight: 800;
}

.failure-note {
  display: block;
  border-color: var(--line);
  background: var(--surface-2);
}

.right-rail {
  display: grid;
  gap: 14px;
}

.right-rail section {
  padding: 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-small);
}

.next-card p {
  margin: 5px 0 17px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.35;
}

.time-pill {
  background: var(--orange-soft);
  color: var(--orange-deep);
}

.primary-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  background: var(--ink);
  color: white;
}

.notes-card textarea {
  width: 100%;
  min-height: 145px;
  resize: vertical;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background:
    repeating-linear-gradient(
      transparent 0,
      transparent 25px,
      var(--line-soft) 26px
    ),
    #fffefa;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 26px;
}

.notes-card textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(77, 111, 131, 0.1);
}

.notes-card > p {
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 9px;
}

.right-rail .checkpoint-card {
  position: relative;
  border-color: #b84c2b;
  background: var(--orange);
  color: white;
  overflow: hidden;
}

.checkpoint-card::after {
  position: absolute;
  right: -32px;
  bottom: -52px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 16px rgba(255, 255, 255, 0.04),
    0 0 0 34px rgba(255, 255, 255, 0.03);
}

.checkpoint-kicker {
  display: inline-block;
  margin-bottom: 20px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.checkpoint-card h3 {
  position: relative;
  z-index: 1;
  font-size: 20px;
}

.checkpoint-card p {
  position: relative;
  z-index: 1;
  margin: 7px 0 17px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.checkpoint-rule {
  display: block;
  width: 42px;
  height: 2px;
  background: white;
}

.roadmap-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 4px 0;
  color: var(--muted);
  font-size: 10px;
}

.roadmap-footer button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.roadmap-footer button:hover {
  color: var(--orange-deep);
}

.sidebar-scrim {
  display: none;
}

dialog {
  width: min(450px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 100px rgba(34, 28, 22, 0.28);
}

dialog::backdrop {
  background: rgba(40, 36, 31, 0.45);
  backdrop-filter: blur(3px);
}

dialog form {
  padding: 23px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dialog-header h2 {
  margin: 2px 0 0;
  font-family: Georgia, serif;
  font-weight: 500;
}

.shortcut-list {
  display: grid;
  gap: 1px;
  margin: 20px 0;
}

.shortcut-list div {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.shortcut-list dt,
.shortcut-list dd {
  margin: 0;
}

.shortcut-list dd {
  color: var(--muted);
}

.dialog-note {
  margin: 0;
  padding: 11px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 11px 15px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .dashboard-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .welcome-copy p {
    max-width: 700px;
  }
}

@media (max-width: 920px) {
  :root {
    --sidebar: 284px;
  }

  .sidebar {
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(40, 36, 31, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .sidebar-scrim.is-visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    padding: 0 20px;
  }

  .workspace {
    width: min(100% - 36px, 850px);
  }

  .focus-layout {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .checkpoint-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  body {
    background: var(--paper);
  }

  .topbar {
    min-height: 61px;
    padding: 0 13px;
  }

  .breadcrumb {
    min-width: 0;
    flex: 1;
  }

  .breadcrumb span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .offline-badge {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0;
  }

  .workspace {
    width: min(100% - 22px, 600px);
    padding-top: 28px;
  }

  .dashboard-summary {
    gap: 22px;
    margin-bottom: 22px;
  }

  .welcome-copy h1 {
    font-size: 37px;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .summary-card {
    min-height: 118px;
  }

  .summary-card:first-child {
    grid-column: 1 / -1;
    min-height: 105px;
  }

  .stage-hero {
    display: block;
    padding: 20px 18px;
  }

  .stage-identity {
    align-items: flex-start;
    gap: 12px;
  }

  .stage-number {
    width: 44px;
    height: 50px;
    border-radius: 14px 14px 14px 4px;
    font-size: 18px;
  }

  .stage-hero h2 {
    font-size: 24px;
  }

  .secondary-button {
    margin: 16px 0 0 56px;
  }

  .stage-tabs {
    gap: 17px;
    padding: 0 18px;
    overflow-x: auto;
  }

  .stage-tabs button {
    white-space: nowrap;
  }

  .tab-panel {
    padding: 20px 18px 22px;
  }

  .task-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .task-delete {
    display: none;
  }

  .task-composer {
    grid-template-columns: 1fr auto;
  }

  .composer-main {
    grid-column: 1 / -1;
  }

  .task-composer select,
  .task-composer button {
    min-height: 39px;
  }

  .insight-grid,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .checkpoint-card {
    grid-column: auto;
  }

  .roadmap-footer p {
    max-width: 55%;
  }
}

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

@media print {
  .sidebar,
  .topbar,
  .task-composer,
  .roadmap-footer,
  .topbar-actions,
  .secondary-button,
  .next-card,
  .toast {
    display: none !important;
  }

  body {
    background: white;
  }

  .main {
    margin: 0;
  }

  .workspace {
    width: 100%;
    padding: 0;
  }

  .stage-card,
  .right-rail section,
  .summary-card {
    box-shadow: none;
  }
}

.bullet-stack ul,
.detail-list,
.checklist-grid {
  margin: 0;
  padding-left: 20px;
}

.bullet-stack li + li,
.detail-list li + li,
.checklist-grid li + li {
  margin-top: 8px;
}

.blueprint-intro {
  margin-bottom: 18px;
}

.blueprint-intro p {
  max-width: 68ch;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 16px;
}

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

.blueprint-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.feature-block,
.diagram-block {
  grid-column: 1 / -1;
}

.mermaid-host {
  position: relative;
  display: grid;
  min-height: 270px;
  margin-top: 12px;
  overflow: auto;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background:
    linear-gradient(rgba(222, 214, 202, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 214, 202, 0.18) 1px, transparent 1px),
    #fffdfa;
  background-size: 24px 24px;
}

.mermaid-host svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
  padding: 18px;
}

.master-diagram {
  min-height: 420px;
  margin: 0;
}

.master-diagram svg {
  min-width: 760px;
}

.diagram-loading {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.diagram-fallback {
  width: 100%;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #3a352e;
  font: 12px/1.55 Consolas, "Courier New", monospace;
  white-space: pre;
}

.blueprint-block pre,
.master-map pre {
  margin: 10px 0 0;
  overflow: auto;
  color: #3a352e;
  font: 12px/1.55 Consolas, "Courier New", monospace;
  white-space: pre;
}

.blueprint-block .detail-list {
  margin-top: 10px;
  color: var(--muted);
}

.stop-point-card {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #d3c393;
  border-radius: var(--radius-md);
  background: #fff5cb;
}

.stop-point-card span,
.map-card > span {
  color: #846a24;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.master-map {
  margin-top: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 252, 247, 0.72);
  box-shadow: var(--shadow-small);
}

.master-map-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
}

.master-map-heading h2 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.035em;
}

.master-map-heading > p {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.map-card {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.map-card h3 {
  margin: 7px 0;
  font-size: 15px;
}

.map-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.master-map details {
  border-top: 1px solid var(--line);
}

.master-map summary {
  padding: 17px 4px;
  cursor: pointer;
  font-weight: 760;
  list-style-position: inside;
}

.master-map details[open] {
  padding-bottom: 20px;
}

.table-scroll {
  overflow-x: auto;
}

.master-map table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13px;
}

.master-map th,
.master-map td {
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.master-map th {
  background: var(--surface-2);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.glossary-grid div,
.decision-list article {
  padding: 15px;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.glossary-grid dt {
  font-weight: 800;
}

.glossary-grid dd,
.decision-list p {
  margin: 5px 0 0;
  color: var(--muted);
}

.decision-list {
  display: grid;
  gap: 10px;
}

.checklist-grid {
  columns: 2;
  column-gap: 34px;
}

.checklist-grid li {
  break-inside: avoid;
  margin-bottom: 9px;
}

@media (max-width: 1180px) {
  .map-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .blueprint-grid,
  .glossary-grid {
    grid-template-columns: 1fr;
  }

  .mermaid-host {
    min-height: 230px;
  }

  .master-map {
    padding: 20px 16px;
  }

  .master-map-heading {
    display: block;
  }

  .master-map-heading > p {
    margin-top: 10px;
  }

  .map-grid {
    grid-template-columns: 1fr;
  }

  .checklist-grid {
    columns: 1;
  }
}
