:root {
  --ink: #121514;
  --muted: #66716d;
  --subtle: #8a938f;
  --paper: #f6f7f2;
  --surface: #ffffff;
  --surface-2: #f1f4ee;
  --line: #dfe5dd;
  --line-strong: #c8d1c8;
  --sidebar: #101918;
  --sidebar-soft: #182423;
  --rust: #b2472a;
  --rust-dark: #8e321c;
  --green: #236b46;
  --green-soft: #e7f2e9;
  --gold: #b78b2b;
  --blue: #2f5f7f;
  --danger: #9c2f24;
  --shadow: 0 18px 55px rgba(17, 22, 20, 0.1);
  --radius: 8px;
  --font-ui: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(18, 21, 20, 0.03) 1px, transparent 1px) 0 0 / 76px 76px,
    linear-gradient(0deg, rgba(18, 21, 20, 0.025) 1px, transparent 1px) 0 0 / 76px 76px,
    var(--paper);
  font-family: var(--font-ui);
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.access-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(16, 25, 24, 0.92), rgba(16, 25, 24, 0.75)),
    url("./assets/workshop-room.png") center / cover;
}

.access-screen.hidden {
  display: none;
}

.access-card {
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

.brand-lockup,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: var(--rust);
  font-weight: 850;
}

.brand-lockup strong,
.sidebar-brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.05;
}

.brand-lockup span,
.sidebar-brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-card h1 {
  margin: 28px 0 12px;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 0.98;
}

.access-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.access-form {
  margin-top: 26px;
}

.access-form label,
.plain-label,
.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.access-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.access-row input,
.inline-name,
select,
textarea,
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  outline: none;
}

.access-row input,
.inline-name,
select,
textarea,
input {
  padding: 10px 12px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(35, 107, 70, 0.14);
}

.access-row button,
.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 850;
}

.access-row button,
.primary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  color: #fff;
  background: var(--rust);
  box-shadow: 0 12px 26px rgba(178, 71, 42, 0.22);
}

.primary-button:hover,
.access-row button:hover {
  background: var(--rust-dark);
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
}

.secondary-button,
.ghost-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.secondary-button:hover,
.ghost-button:hover {
  background: var(--surface-2);
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border-color: var(--line-strong);
}

.icon-button:hover {
  background: var(--surface-2);
}

.full {
  width: 100%;
}

.access-form small {
  display: block;
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.access-form small.error {
  color: var(--danger);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.app-shell.locked {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  color: #eef4f0;
  background: var(--sidebar);
}

.sidebar-brand {
  padding: 2px 0 22px;
}

.sidebar-brand span {
  color: #a7b2ad;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #dce5df;
  background: transparent;
  text-align: left;
  font-size: 15px;
  font-weight: 800;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: var(--rust);
}

.sidebar-note {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: var(--sidebar-soft);
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note strong {
  margin-bottom: 8px;
  font-size: 15px;
}

.sidebar-note span {
  color: #b7c3bd;
  font-size: 13px;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: 98px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 380px) auto auto;
  gap: 28px;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px);
}

.top-actions,
.mini-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-button {
  min-height: 38px;
  padding: 0 12px;
}

.top-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.plain-label {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.inline-name {
  max-width: 360px;
  border-color: transparent;
  padding-left: 0;
  background: transparent;
  font-size: 22px;
  font-weight: 850;
}

.inline-name:focus {
  padding-left: 12px;
  background: #fff;
}

.progress-block {
  display: grid;
  gap: 10px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe2db;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.access-pill {
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #cfe2d2;
  border-radius: var(--radius);
  background: var(--green-soft);
}

.access-pill strong,
.access-pill span {
  display: block;
}

.access-pill strong {
  font-size: 14px;
}

.access-pill span {
  margin-top: 2px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.status-dot {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.view {
  display: none;
  padding: 28px;
}

.view.active {
  display: block;
}

.prep-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(320px, 0.8fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading.compact {
  margin-bottom: 18px;
}

.page-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1.02;
}

.page-heading p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.timeline-item {
  position: relative;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.timeline-item.done {
  border-color: #b9d3be;
  background: #f5faf5;
}

.timeline-time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.timeline-item strong {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.24;
}

.timeline-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--rust);
  font-size: 12px;
  font-weight: 850;
}

.timeline-item.done .timeline-dot {
  background: var(--green);
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(390px, 1.1fr) minmax(360px, 1fr) minmax(280px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.panel:not(.steps-panel):not(.prompt-panel):not(.summary-panel):not(.form-panel):not(.output-panel) {
  padding: 18px;
}

.panel-title,
.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-title {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.panel-title svg {
  width: 23px;
  height: 23px;
  stroke: var(--rust);
  stroke-width: 1.8;
  fill: none;
}

.panel h3,
.copy-row h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.copy-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.path-summary {
  min-height: 44px;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 48px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 850;
}

.tab.active {
  color: var(--rust);
  border-bottom-color: var(--rust);
}

.tab-panel {
  display: none;
  padding: 16px;
}

.tab-panel.active {
  display: block;
}

.step-list {
  display: grid;
  gap: 12px;
}

.step-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.step-item.complete {
  border-color: #c4ddc8;
  background: #f6fbf6;
}

.step-check {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #fff;
  background: #fff;
}

.step-item.complete .step-check {
  border-color: var(--green);
  background: var(--green);
}

.step-check svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.step-copy strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.25;
}

.step-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.step-item select {
  min-width: 136px;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.prompt-panel,
.summary-panel,
.output-panel {
  padding: 18px;
}

.framework {
  display: grid;
  gap: 0;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.framework-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.framework-row:last-child {
  border-bottom: 0;
}

.framework-row strong {
  color: var(--rust);
}

.framework-row span {
  color: var(--ink);
  line-height: 1.45;
}

.tip-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  color: #3b3d2f;
  background: #f3eedf;
  line-height: 1.45;
}

.prep-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.prep-item,
.pledge-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--ink);
  line-height: 1.4;
}

.prep-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.prep-item input,
.pledge-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.pledge-row {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #cfe2d2;
  border-radius: var(--radius);
  background: var(--green-soft);
  font-weight: 750;
}

.small-row {
  font-size: 13px;
  font-weight: 700;
}

.rule-list,
.number-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.48;
}

.rule-list li::marker,
.number-list li::marker {
  color: var(--rust);
  font-weight: 850;
}

.deliverable-list,
.offer-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.deliverable-list div,
.offer-stack div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.deliverable-list strong,
.offer-stack strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--rust);
  font-size: 14px;
}

.offer-stack div {
  grid-template-columns: 1fr;
  align-items: start;
}

.offer-stack strong {
  width: auto;
  height: auto;
  display: block;
  color: var(--rust);
  background: transparent;
  font-size: 15px;
}

.deliverable-list span,
.offer-stack span {
  color: var(--muted);
  line-height: 1.4;
}

pre {
  width: 100%;
  min-height: 220px;
  margin: 16px 0 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fbfcf9;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.prompt-card {
  padding: 2px;
}

.summary-panel {
  display: grid;
  gap: 16px;
}

.ring-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
}

.progress-ring {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  background:
    conic-gradient(var(--green) 0deg, var(--line) 0deg);
  font-size: 18px;
  font-weight: 850;
}

.progress-ring::before {
  content: "";
  position: absolute;
}

.ring-row strong,
.ring-row span {
  display: block;
}

.ring-row strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.ring-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.summary-list {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-list div {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary-list div:last-child {
  border-bottom: 0;
}

.summary-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.summary-list dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
}

.workshop-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.form-panel {
  padding: 18px;
}

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

.form-grid.single {
  grid-template-columns: 1fr;
}

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.lab-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(340px, 0.88fr) minmax(390px, 1fr);
  gap: 16px;
  align-items: start;
}

.track-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.track-card h3 {
  margin: 0;
  font-size: 22px;
}

.track-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.track-meta {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.track-meta strong {
  color: var(--rust);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.resource-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.resource-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.resource-card .secondary-button {
  width: fit-content;
}

.facilitator-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.9fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.45;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--sidebar);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  font-weight: 800;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 12px;
  }

  .sidebar-note {
    display: none;
  }

  .dashboard-grid,
  .lab-layout,
  .prep-grid,
  .facilitator-grid {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
  }

  .summary-panel .full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

  .sidebar-brand {
    padding-bottom: 12px;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-item {
    min-height: 44px;
    justify-content: center;
    gap: 8px;
    padding: 0 8px;
    font-size: 12px;
  }

  .topbar,
  .control-grid,
  .two-column,
  .form-grid,
  .resource-grid,
  .summary-panel,
  .top-actions {
    grid-template-columns: 1fr;
  }

  .top-actions {
    display: grid;
  }

  .topbar {
    gap: 16px;
    padding: 18px;
  }

  .view {
    padding: 18px;
  }

  .page-heading {
    display: grid;
  }

  .page-heading h2 {
    font-size: 31px;
  }

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

  .step-item {
    grid-template-columns: 34px 1fr;
  }

  .step-item select {
    grid-column: 2;
    width: 100%;
  }

  .access-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
  }

  .access-screen,
  .sidebar,
  .topbar,
  .page-heading button,
  .toast {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .view {
    display: block;
    padding: 0;
  }

  .view:not(#view-plan) {
    display: none;
  }

  .panel {
    box-shadow: none;
  }
}
