:root {
  color-scheme: dark;
  --bg: #020202;
  --board: #070707;
  --panel: #101010;
  --panel-2: #151515;
  --chalk: #f4f4f0;
  --chalk-soft: #cecec8;
  --chalk-faint: rgba(243, 240, 229, 0.1);
  --muted: #9a9a94;
  --line: rgba(243, 240, 229, 0.24);
  --line-strong: rgba(243, 240, 229, 0.48);
  --yellow: #f4f4f0;
  --green: #d8d8d2;
  --red: #f4f4f0;
  --cyan: #e8e8e0;
  --pink: #c8c8c0;
  --focus: #ffffff;
  --shadow: rgba(0, 0, 0, 0.45);
  --chalk-shadow: 0 0 1px rgba(255,255,255,0.5), 0 0 12px rgba(255,255,255,0.08);
  --actions-safe-gap: env(safe-area-inset-bottom, 0px);
  --content-bottom-mobile: 138px;
  --content-bottom-wide: 128px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: clip;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--chalk);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: clip;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 24px),
    linear-gradient(145deg, #010101 0%, #080808 48%, #010101 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.3;
  background-image:
    repeating-linear-gradient(7deg, transparent 0 14px, rgba(255,255,255,0.026) 14px 15px, transparent 15px 31px),
    repeating-linear-gradient(101deg, transparent 0 41px, rgba(255,255,255,0.022) 41px 42px, transparent 42px 83px);
  background-size: 180px 140px, 260px 220px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 86%, transparent);
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
  max-width: 100%;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app {
  min-height: 100vh;
  min-height: 100svh;
  padding: 8px;
}

.shell {
  position: relative;
  width: min(1240px, 100%);
  min-height: calc(100vh - 28px);
  margin: 0 auto;
  border: 2px solid rgba(243,240,229,0.34);
  border-radius: 8px;
  background:
    repeating-linear-gradient(-2deg, transparent 0 17px, rgba(255,255,255,0.018) 17px 18px, transparent 18px 38px),
    linear-gradient(160deg, rgba(255,255,255,0.035), transparent 32%),
    var(--board);
  box-shadow:
    0 24px 80px var(--shadow),
    inset 0 0 0 1px rgba(255,255,255,0.07),
    inset 0 0 60px rgba(0,0,0,0.45);
  overflow: hidden;
}

.shell::before,
.shell::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.shell::before {
  inset: 10px;
  border: 1px dashed rgba(243,240,229,0.16);
  border-radius: 7px;
}

.shell::after {
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255,255,255,0.03) 18.2%, transparent 18.5% 100%),
    linear-gradient(0deg, transparent 0 64%, rgba(255,255,255,0.02) 64.2%, transparent 64.5% 100%);
  opacity: 0.42;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 14px 14px 10px;
  border-bottom: 1px dashed var(--line);
  background:
    repeating-linear-gradient(96deg, transparent 0 20px, rgba(255,255,255,0.022) 20px 21px, transparent 21px 42px),
    rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(8px);
}

.topbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

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

.chalk-mark {
  width: 36px;
  height: 36px;
  border: 2px solid var(--chalk);
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
  box-shadow: var(--chalk-shadow), inset 0 0 0 1px rgba(255,255,255,0.08);
  transform: rotate(-4deg);
}

.chalk-mark::before,
.chalk-mark::after {
  position: absolute;
  content: "";
  background: var(--chalk);
}

.chalk-mark::before {
  width: 4px;
  height: 4px;
  top: 11px;
  left: 10px;
  border-radius: 50%;
  box-shadow: 11px 0 0 var(--chalk);
}

.chalk-mark::after {
  width: 13px;
  height: 2px;
  left: 11px;
  bottom: 10px;
  transform: rotate(-2deg);
}

.brand-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 850;
  color: var(--chalk);
  text-shadow: var(--chalk-shadow);
}

.brand-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.step-counter {
  padding: 7px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--chalk);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  transform: rotate(1deg);
}

.progress-track {
  height: 8px;
  margin-top: 12px;
  border: 1px solid rgba(243,240,229,0.32);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,0.26);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.11) 0 5px, transparent 5px 11px),
    linear-gradient(90deg, var(--chalk-soft), var(--chalk));
  transition: width 180ms ease;
}

.content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px 14px calc(var(--content-bottom-mobile) + var(--actions-safe-gap));
}

.content > *,
.topbar-row > *,
.brand > *,
.stage > *,
.grid > *,
.form > *,
.field > *,
.side-stack > *,
.stats > *,
.competency-grid > *,
.tools-grid > *,
.rating-row > *,
.tool-row > *,
.actions > * {
  min-width: 0;
}

.actions > span:empty {
  display: none;
}

.chalk-corner {
  position: absolute;
  right: 24px;
  top: 94px;
  z-index: 0;
  width: 110px;
  height: 64px;
  border-top: 2px solid rgba(243,240,229,0.22);
  border-right: 2px solid rgba(243,240,229,0.18);
  transform: rotate(3deg);
}

.chalk-corner::before,
.chalk-corner::after {
  position: absolute;
  content: "";
  background: rgba(244,244,240,0.78);
  transform-origin: center;
}

.chalk-corner::before {
  right: 15px;
  top: 18px;
  width: 38px;
  height: 2px;
  transform: rotate(-21deg);
}

.chalk-corner::after {
  right: 31px;
  top: 1px;
  width: 2px;
  height: 36px;
  transform: rotate(-21deg);
}

.stage {
  display: grid;
  gap: 18px;
}

.copy {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--chalk);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(244,244,240,0.14);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--chalk);
  font-size: 2.15rem;
  line-height: 1;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: var(--chalk-shadow);
}

h2 {
  margin-bottom: 6px;
  font-size: 1.75rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: var(--chalk-shadow);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: var(--chalk-soft);
  font-size: 1.03rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

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

.chalk-line {
  position: relative;
  height: 3px;
  width: 100%;
  background:
    linear-gradient(90deg, transparent, rgba(243,240,229,0.55), rgba(243,240,229,0.1), transparent);
  transform: rotate(-0.3deg);
}

.chalk-line::after {
  position: absolute;
  left: 7%;
  right: 12%;
  top: 2px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(244,244,240,0.42), transparent);
}

.board-panel {
  position: relative;
  border: 1px dashed rgba(243,240,229,0.42);
  border-radius: 8px;
  background:
    repeating-linear-gradient(-5deg, transparent 0 18px, rgba(255,255,255,0.014) 18px 19px, transparent 19px 42px),
    linear-gradient(135deg, rgba(255,255,255,0.045), transparent 40%),
    var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.035),
    inset 0 0 28px rgba(0,0,0,0.28);
}

.board-panel::before {
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border: 1px solid rgba(243,240,229,0.08);
  border-radius: 6px;
  content: "";
}

.panel-pad {
  padding: 16px;
}

.side-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.side-stack {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.page-visual {
  position: relative;
  margin: 0;
  padding: 10px;
  overflow: hidden;
  border-radius: 8px;
  background:
    repeating-linear-gradient(94deg, transparent 0 20px, rgba(255,255,255,0.016) 20px 21px, transparent 21px 42px),
    #000;
}

.page-visual::after {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  content: "";
  border-radius: 7px;
  box-shadow: inset 0 0 42px rgba(0,0,0,0.6);
}

.page-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid rgba(243,240,229,0.22);
  border-radius: 7px;
  background: #000;
  filter: none;
}

.desktop-page-visual {
  display: none;
}

.mobile-page-visual {
  display: block;
}

.side-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.grid.two,
.grid.three {
  grid-template-columns: 1fr;
}

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

.bullet-list li,
.metric,
.reason,
.case-item,
.plan-item,
.solution-item {
  position: relative;
  padding: 12px 12px 12px 38px;
  border: 1px solid rgba(243,240,229,0.24);
  border-radius: 8px;
  background:
    repeating-linear-gradient(94deg, transparent 0 22px, rgba(255,255,255,0.012) 22px 23px, transparent 23px 48px),
    rgba(255,255,255,0.025);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
}

.bullet-list li::before,
.reason::before,
.case-item::before,
.solution-item::before {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 10px rgba(244,244,240,0.1);
}

.bullet-list li:nth-child(2n)::before,
.reason:nth-child(2n)::before,
.case-item:nth-child(2n)::before,
.solution-item:nth-child(2n)::before {
  border-color: var(--cyan);
}

.bullet-list li:nth-child(3n)::before,
.reason:nth-child(3n)::before,
.case-item:nth-child(3n)::before,
.solution-item:nth-child(3n)::before {
  border-color: var(--red);
}

.form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field label {
  color: var(--chalk);
  font-weight: 750;
}

.hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.error {
  min-height: 1.1rem;
  color: #ff9f8d;
  font-size: 0.82rem;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  outline: none;
  color: var(--chalk);
  background:
    linear-gradient(0deg, rgba(255,255,255,0.02), transparent),
    rgba(0, 0, 0, 0.36);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

select {
  appearance: none;
}

input:focus,
textarea:focus,
select:focus,
.choice:focus-visible,
.icon-btn:focus-visible,
.primary:focus-visible,
.secondary:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(244, 244, 240, 0.2);
}

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

.choice {
  min-height: 48px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--chalk);
  text-align: left;
  line-height: 1.35;
  background:
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(255,255,255,0.014) 20px 21px, transparent 21px 43px),
    rgba(255,255,255,0.025);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.choice.active {
  border-color: var(--yellow);
  color: #ffffff;
  background:
    repeating-linear-gradient(-7deg, transparent 0 15px, rgba(255,255,255,0.075) 15px 16px, transparent 16px 33px),
    rgba(255,255,255,0.12);
}

.choice:hover,
.rating-choice:hover,
.tool-choice:hover {
  transform: translateY(-1px) rotate(-0.2deg);
  border-color: rgba(243,240,229,0.54);
}

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

.actions {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: max(8px, var(--actions-safe-gap));
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  width: min(1092px, calc(100% - 16px));
  margin: 0 auto;
  padding: 8px;
  border: 1px dashed rgba(243,240,229,0.22);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.92);
  box-shadow: 0 14px 38px rgba(0,0,0,0.42);
  backdrop-filter: blur(10px);
  align-items: start;
}

.actions > * {
  min-width: 0;
}

.primary,
.secondary,
.icon-btn {
  min-height: 48px;
  border-radius: 8px;
  border: 1px dashed var(--line-strong);
  color: var(--chalk);
  background: rgba(255,255,255,0.03);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.primary {
  padding: 0 18px;
  border-color: rgba(243,240,229,0.34);
  color: rgba(243,240,229,0.58);
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255,255,255,0.08);
  background:
    repeating-linear-gradient(-9deg, rgba(255,255,255,0.025) 0 5px, transparent 5px 12px),
    rgba(255,255,255,0.035);
  box-shadow: 0 14px 38px rgba(0,0,0,0.36), inset 0 0 0 1px rgba(255,255,255,0.06);
}

.primary.is-ready,
.submitted-link {
  border-color: rgba(255,255,255,0.92);
  color: #050505;
  text-shadow: none;
  background:
    repeating-linear-gradient(-9deg, rgba(0,0,0,0.07) 0 5px, transparent 5px 12px),
    rgba(244,244,240,0.94);
  box-shadow: 0 14px 38px rgba(0,0,0,0.38), inset 0 0 0 1px rgba(255,255,255,0.42);
}

.primary.is-waiting,
.primary:disabled {
  border-color: rgba(243,240,229,0.28);
  color: rgba(243,240,229,0.5);
  background:
    repeating-linear-gradient(-9deg, rgba(255,255,255,0.018) 0 5px, transparent 5px 12px),
    rgba(255,255,255,0.025);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.04);
}

.actions .primary {
  grid-column: 1 / -1;
  width: 100%;
}

.actions:has([data-back]) .primary {
  grid-column: 2;
  grid-row: 1;
}

.actions:not(:has([data-back])) .primary {
  grid-column: 1 / -1;
}

.actions .save-state:not(:empty) {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px dashed rgba(243,240,229,0.28);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.9);
  box-shadow: 0 12px 34px rgba(0,0,0,0.36);
}

.secondary,
.icon-btn {
  padding: 0 14px;
  background: rgba(8, 8, 8, 0.9);
  box-shadow: 0 12px 34px rgba(0,0,0,0.36);
}

.icon-btn {
  width: 52px;
  font-size: 1.25rem;
}

.primary:hover,
.secondary:hover,
.icon-btn:hover {
  transform: translateY(-1px) rotate(-0.3deg);
  box-shadow: 0 10px 26px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(255,255,255,0.06);
}

.primary:disabled:hover {
  transform: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.04);
}

.primary:active,
.secondary:active,
.icon-btn:active,
.choice:active,
.rating-choice:active,
.tool-choice:active {
  transform: translateY(0);
}

.save-state {
  align-self: center;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
}

.stats {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.metric {
  padding-left: 14px;
}

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

.metric strong {
  display: block;
  margin-top: 4px;
  color: var(--yellow);
  font-size: 1.5rem;
  text-shadow: 0 0 12px rgba(244,244,240,0.1);
}

.metric:nth-child(3n + 2) strong {
  color: var(--cyan);
}

.metric:nth-child(3n) strong {
  color: var(--green);
}

.forecast {
  display: flex;
  align-items: end;
  gap: 7px;
  height: 160px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background:
    linear-gradient(0deg, rgba(243,240,229,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,240,229,0.05) 1px, transparent 1px);
  background-size: 100% 25%, 12.5% 100%;
  min-width: 0;
  overflow: hidden;
}

.bar {
  flex: 1;
  min-width: 9px;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(243,240,229,0.38);
  background:
    repeating-linear-gradient(-12deg, rgba(255,255,255,0.16) 0 4px, transparent 4px 10px),
    linear-gradient(180deg, var(--chalk), var(--chalk-soft));
  box-shadow: 0 0 14px rgba(244,244,240,0.08);
}

.competency-grid,
.tools-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.rating-row,
.tool-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,0.12);
}

.rating-buttons,
.tool-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

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

.rating-buttons .choice,
.tool-buttons .choice {
  min-height: 40px;
  min-width: 0;
  padding: 8px;
  text-align: center;
}

.rating-options {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.rating-choice,
.tool-choice {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--chalk-soft);
  text-align: left;
  line-height: 1.35;
  background:
    repeating-linear-gradient(92deg, transparent 0 18px, rgba(255,255,255,0.012) 18px 19px, transparent 19px 40px),
    rgba(255,255,255,0.025);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.rating-choice {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
}

.rating-choice span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--yellow);
  font-weight: 900;
}

.rating-choice strong,
.tool-choice strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.35;
}

.rating-choice.active,
.tool-choice.priority-green {
  border-color: rgba(255,255,255,0.82);
  color: var(--chalk);
  background:
    repeating-linear-gradient(-10deg, transparent 0 15px, rgba(255,255,255,0.08) 15px 16px, transparent 16px 32px),
    rgba(255,255,255,0.14);
}

.tool-choice.priority-yellow {
  border-color: rgba(220,220,214,0.7);
  color: var(--chalk);
  background:
    repeating-linear-gradient(-10deg, transparent 0 15px, rgba(220,220,214,0.075) 15px 16px, transparent 16px 32px),
    rgba(220,220,214,0.09);
}

.tool-choice.priority-gray {
  border-color: rgba(243,240,229,0.38);
  color: var(--chalk-soft);
  background: rgba(243,240,229,0.06);
}

.tool-choice span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.priority-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.priority-legend span,
.tool-group-head span {
  padding: 6px 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--chalk-soft);
  font-size: 0.78rem;
  background: rgba(255,255,255,0.03);
}

.tool-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background:
    repeating-linear-gradient(96deg, transparent 0 22px, rgba(255,255,255,0.012) 22px 23px, transparent 23px 44px),
    rgba(255,255,255,0.02);
  min-width: 0;
}

.tool-group.weak {
  border-color: rgba(255,255,255,0.62);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.tool-group-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.tool-group-head h3 {
  margin: 0;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(244,244,240,0.1);
  overflow-wrap: anywhere;
}

.tool-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.scenario.compact {
  padding: 12px;
  font-size: 0.9rem;
}

.radar-wrap {
  display: grid;
  place-items: center;
  min-height: 280px;
  min-width: 0;
}

.radar {
  width: min(100%, 420px);
  height: auto;
}

.radar text {
  fill: var(--chalk-soft);
  font-size: 11px;
}

.radar .grid-line {
  fill: none;
  stroke: rgba(243,240,229,0.26);
  stroke-dasharray: 4 4;
}

.radar .shape {
  fill: rgba(244,244,240,0.16);
  stroke: var(--yellow);
  stroke-width: 2;
}

.scenario {
  position: relative;
  padding: 16px;
  border: 1px dashed rgba(243,240,229,0.52);
  border-radius: 8px;
  color: var(--chalk-soft);
  background:
    repeating-linear-gradient(-6deg, transparent 0 20px, rgba(255,255,255,0.014) 20px 21px, transparent 21px 43px),
    rgba(0,0,0,0.16);
}

.scenario::before {
  position: absolute;
  left: 12px;
  top: -7px;
  width: 34px;
  height: 12px;
  border-top: 2px solid rgba(244,244,240,0.72);
  content: "";
  transform: rotate(-4deg);
}

.state-shell {
  position: relative;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.loader {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px dashed var(--line);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.submitted-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 1px dashed rgba(255,255,255,0.92);
  border-radius: 8px;
  color: #050505;
  font-weight: 900;
  text-decoration: none;
  background:
    repeating-linear-gradient(-9deg, rgba(0,0,0,0.07) 0 5px, transparent 5px 12px),
    rgba(244,244,240,0.94);
  transition: transform 140ms ease, border-color 140ms ease;
}

.submitted-link:hover {
  transform: translateY(-1px) rotate(-0.3deg);
  border-color: var(--chalk);
}

@media (max-width: 759px) {
  .page-visual {
    margin-top: 2px;
    margin-bottom: 8px;
  }

  .actions .primary {
    min-height: 52px;
  }
}

@media (max-width: 479px) {
  .topbar-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand {
    gap: 8px;
  }

  .brand-title {
    font-size: 0.92rem;
  }

  .brand-subtitle {
    font-size: 0.74rem;
  }

  .step-counter {
    justify-self: start;
    padding: 6px 9px;
    font-size: 0.75rem;
  }

  .content {
    padding-right: 12px;
    padding-left: 12px;
    padding-bottom: calc(150px + var(--actions-safe-gap));
  }

  .panel-pad {
    padding: 14px;
  }

  .primary {
    padding: 0 12px;
    font-size: 0.92rem;
  }

  .page-visual {
    padding: 8px;
  }

  .actions {
    left: 8px;
    right: 8px;
    gap: 8px;
    width: calc(100% - 16px);
  }

  .actions .save-state:not(:empty) {
    padding: 9px 12px;
  }

  .forecast {
    gap: 5px;
    padding: 10px;
  }

  .radar-wrap {
    min-height: 240px;
  }

  .radar {
    width: min(100%, 320px);
  }
}

@media (min-width: 760px) {
  .app {
    padding: 22px;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .shell {
    min-height: calc(100vh - 44px);
  }

  .topbar {
    padding: 18px 22px 12px;
  }

  .content {
    padding: 28px 28px calc(var(--content-bottom-wide) + var(--actions-safe-gap));
  }

  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-page-visual {
    justify-self: center;
    width: min(100%, 620px);
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .actions {
    left: 22px;
    right: 22px;
    bottom: 22px;
    width: min(1196px, calc(100% - 44px));
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    pointer-events: none;
  }

  .actions > * {
    pointer-events: auto;
  }

  .actions .save-state:not(:empty) {
    align-self: center;
    justify-self: center;
    padding: 10px 14px;
    border: 1px dashed rgba(243,240,229,0.28);
    border-radius: 8px;
    background: rgba(8, 8, 8, 0.9);
    box-shadow: 0 12px 34px rgba(0,0,0,0.36);
  }

  .actions .primary {
    grid-column: auto;
    grid-row: auto;
    width: auto;
    min-width: clamp(188px, 24vw, 240px);
    box-shadow: 0 14px 38px rgba(0,0,0,0.38), inset 0 0 0 1px rgba(255,255,255,0.1);
  }

  .actions .secondary,
  .actions .icon-btn {
    background: rgba(8, 8, 8, 0.9);
    box-shadow: 0 12px 34px rgba(0,0,0,0.36);
  }
}

@media (min-width: 960px) and (max-width: 1099px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
    align-items: start;
  }

  .side-stack {
    position: sticky;
    top: 98px;
  }

  .desktop-page-visual {
    display: block;
  }

  .mobile-page-visual {
    display: none;
  }

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

@media (min-width: 760px) and (max-width: 959px) {
  .content {
    padding-bottom: calc(168px + var(--actions-safe-gap));
  }

  .actions {
    left: 22px;
    right: 22px;
    bottom: max(14px, var(--actions-safe-gap));
    width: calc(100% - 44px);
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    border: 1px dashed rgba(243,240,229,0.22);
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 38px rgba(0,0,0,0.42);
    pointer-events: auto;
  }

  .actions:has([data-back]) .primary {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }

  .actions:not(:has([data-back])) .primary {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (min-width: 1100px) {
  h1 {
    font-size: 4.25rem;
  }

  h2 {
    font-size: 3.05rem;
  }

  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    align-items: start;
  }

  .side-stack {
    position: sticky;
    top: 104px;
  }

  .desktop-page-visual {
    display: block;
  }

  .mobile-page-visual {
    display: none;
  }

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

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

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

  .tool-buttons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .shell {
    width: min(1320px, 100%);
  }

  .content {
    padding-right: 34px;
    padding-left: 34px;
  }

  .actions {
    width: min(1276px, calc(100% - 44px));
  }

  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.66fr);
  }
}
