:root {
  --ink: #07111f;
  --navy: #0b1526;
  --muted: #647084;
  --line: #e4e8ef;
  --panel: #f6f7f9;
  --soft: #eef5f8;
  --gold: #c39a4b;
  --accent: #103d5d;
  --danger: #b42318;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  --shadow-tight: 0 12px 34px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(16, 61, 93, 0.08) 0, rgba(16, 61, 93, 0) 34%),
    radial-gradient(circle at 82% 10%, rgba(195, 154, 75, 0.09) 0, rgba(195, 154, 75, 0) 32%),
    linear-gradient(180deg, #fbfcfd 0%, #f1f4f7 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero, .workbench, .card, .deck-shell {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  text-align: center;
  padding: clamp(16px, 2.4vw, 26px) clamp(16px, 2.8vw, 32px) clamp(22px, 3vw, 34px);
  margin-bottom: 24px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(16, 61, 93, 0.07), rgba(195, 154, 75, 0.08) 46%, rgba(255, 255, 255, 0) 66%),
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(248, 250, 252, 0.78));
  pointer-events: none;
}

.hero-copy, .hero-panel {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  justify-items: center;
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

h2, h3, p {
  margin: 0;
}

.brand-lockup {
  width: min(1120px, 100%);
  margin: -8px 0 6px;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-logo {
  display: block;
  width: 100%;
  aspect-ratio: 3.2 / 1;
  object-fit: cover;
  object-position: center;
}

.hero h2 {
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: 0;
}

.subtitle {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
  margin-top: 0;
}

.hero-panel {
  border: 1px solid rgba(7, 17, 31, 0.08);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.08);
}

.hero-panel-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero-panel-top strong {
  color: var(--ink);
}

.hero-lines {
  display: grid;
  gap: 10px;
}

.hero-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.hero-lines b {
  font-size: 18px;
}

.hero-lines span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.input-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.input-toolbar div {
  display: grid;
  gap: 3px;
}

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

.input-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.reset-btn {
  color: #8a2d1b;
}

.resume-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-tight);
}

.resume-bar div {
  display: grid;
  gap: 3px;
}

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

.resume-bar span {
  color: var(--muted);
  font-size: 13px;
}

.card {
  position: relative;
  padding: 28px;
  margin-bottom: 20px;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(16, 61, 93, 0.75), rgba(195, 154, 75, 0.7), rgba(16, 61, 93, 0));
  opacity: 0.8;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.card h2 {
  font-size: 24px;
  margin-bottom: 18px;
}

textarea, input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  padding: 16px;
  outline: none;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

textarea:focus, input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(16, 61, 93, 0.08);
}

.optional-detail {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfd;
}

.optional-detail label {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.optional-detail textarea {
  min-height: 92px;
  resize: vertical;
}

.brand-studio {
  padding: 0;
}

.brand-studio::before {
  display: none;
}

.brand-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
  gap: 26px;
  padding: 28px;
}

.mode-picks {
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  margin: 18px 0;
}

.brand-mode {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

.brand-mode.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

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

.brand-color,
.brand-extra {
  display: grid;
  gap: 8px;
}

.brand-color span,
.brand-extra span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.brand-color div {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
}

.brand-color input[type="color"] {
  width: 46px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.brand-color input:not([type="color"]),
.brand-extra input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.brand-extra {
  margin-top: 14px;
}

.brand-preview {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  display: grid;
  grid-template-rows: 9% 1fr 8%;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.08);
}

.preview-content {
  display: grid;
  align-content: center;
  gap: 14px;
}

.preview-content > span {
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-content h3 {
  font-size: clamp(24px, 2.6vw, 38px);
  letter-spacing: 0;
}

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

.preview-panels div {
  border: 1px solid;
  border-radius: 12px;
  padding: 12px;
}

.preview-panels b {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

.preview-panels p,
.preview-muted {
  font-size: 12px;
  line-height: 1.35;
}

.helper {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 10px 22px rgba(7, 17, 31, 0.16);
}

.range-value {
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 4px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--ink);
}

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

.radio-card {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  background: #fff;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.radio-card.active {
  background: var(--soft);
  border-color: var(--accent);
  color: var(--accent);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.btn.primary {
  background: linear-gradient(135deg, #07111f, #10233d);
  color: #fff;
  box-shadow: 0 16px 32px rgba(7, 17, 31, 0.22);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.btn.gold {
  background: #fff8ea;
  color: #8a5b00;
  border: 1px solid #ead7a8;
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #ffd3d3;
  background: #fff2f2;
  color: var(--danger);
  border-radius: 18px;
  font-weight: 750;
  margin-top: 18px;
}

.workbench {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 28px;
  row-gap: 24px;
  align-items: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 251, 0.94)),
    rgba(255, 255, 255, 0.94);
  color: var(--ink);
  padding: 28px;
  margin-bottom: 24px;
  overflow: hidden;
}

.workbench > * {
  position: relative;
  z-index: 1;
}

.workbench::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 61, 93, 0.1), rgba(195, 154, 75, 0.08) 42%, rgba(255, 255, 255, 0)),
    radial-gradient(circle at 92% 8%, rgba(16, 61, 93, 0.08), rgba(16, 61, 93, 0) 28%);
  pointer-events: none;
}

.workbench::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -205px;
  top: -220px;
  border: 1px solid rgba(195, 154, 75, 0.12);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.workbench-top {
  display: contents;
}

.workbench-top > div:first-child {
  grid-column: 1;
  grid-row: 1;
}

.workbench small {
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.workbench h2 {
  font-size: clamp(28px, 3vw, 40px);
  margin: 0;
  letter-spacing: 0;
}

.workbench p {
  color: var(--muted);
  max-width: 560px;
}

.mode-switch {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  display: inline-flex;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 247, 250, 0.86);
  box-shadow: inset 0 1px 0 #fff, 0 12px 28px rgba(15, 23, 42, 0.055);
  backdrop-filter: blur(18px);
}

.mode-switch button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 17px 30px;
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
  min-width: 174px;
}

.mode-switch button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.workbench-actions {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(128px, auto));
  gap: 10px;
  align-items: center;
  justify-content: start;
  margin-top: 0;
}

.workbench-actions .btn {
  min-height: 48px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
}

.icon-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  color: var(--ink);
}

.icon-btn:hover {
  border-color: #cdd5e1;
  box-shadow: var(--shadow-tight);
}

.gold-icon {
  color: #8a5b00;
  background: #fff8ea;
  border-color: #ead7a8;
}

.svg-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-note {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.report-nav {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  margin: -8px 0 18px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.report-nav button {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.report-nav button:hover {
  color: var(--ink);
  border-color: #cdd5e1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.insight {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fcfcfd;
  margin-top: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.insight h3, .profile h3, .tier h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.body-text, li {
  color: #334155;
  line-height: 1.5;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.profile {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fcfcfd;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.profile-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.diagram {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, #fff, #f8fafc);
}

.diagram-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.diagram-actions span {
  color: var(--muted);
  font-size: 13px;
}

.diagram-image, .slide-preview {
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-tight);
  overflow: visible;
}

.diagram-image img, .slide-preview img {
  display: block;
  width: 100%;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
}

.slide-preview img {
  aspect-ratio: 16 / 9;
}

.diagram-image img {
  aspect-ratio: 16 / 9;
}

.diagram-image figcaption, .slide-preview figcaption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 8px;
}

.section-slide-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.slide-mini {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.slide-mini img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
}

.slide-mini figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.deck-shell {
  padding: 24px;
  margin-bottom: 24px;
}

.deck-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.deck-kicker {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 7px;
}

.deck-toolbar h2 {
  font-size: 28px;
  margin-bottom: 6px;
}

.deck-toolbar p {
  color: var(--muted);
  line-height: 1.45;
}

.deck-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deck-stage {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
}

.deck-frame {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: var(--shadow-tight);
}

.deck-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 10px;
  background: #07111f;
}

.deck-frame figcaption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-top: 10px;
}

.deck-arrow {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.deck-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.95), rgba(16, 61, 93, 0.9)),
    #07111f;
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  padding: 30px;
}

.deck-placeholder p {
  color: #cbd5e1;
}

.deck-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 2px 2px;
}

.deck-thumbs button {
  flex: 0 0 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 7px;
  text-align: left;
  cursor: pointer;
}

.deck-thumbs button.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 61, 93, 0.08);
}

.deck-thumbs img, .deck-thumbs span {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 8px;
  background: #f4f7fa;
  color: var(--accent);
  font-weight: 950;
}

.deck-thumbs small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  grid-template-rows: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: rgba(246, 247, 249, 0.96);
  backdrop-filter: blur(22px);
  padding: 18px;
}

.deck-fullscreen-top {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  color: var(--ink);
}

.deck-fullscreen-top span {
  color: var(--muted);
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-full-frame {
  grid-column: 2;
  margin: 0;
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 0;
}

.deck-full-frame img,
.deck-full-frame .deck-placeholder {
  width: min(100%, calc((100vh - 112px) * 16 / 9));
  max-height: calc(100vh - 112px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 90px rgba(15, 23, 42, 0.18);
  background: #fff;
}

.deck-full-arrow {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.deck-full-arrow.left {
  grid-column: 1;
}

.deck-full-arrow.right {
  grid-column: 3;
}

.flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.flow-node {
  position: relative;
  min-height: 172px;
  border-radius: 22px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.055);
}

.flow-node.dark {
  background: linear-gradient(135deg, #07111f, #13243d);
  color: #fff;
}

.flow-node:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 900;
  z-index: 2;
}

.tier-list {
  display: grid;
  gap: 14px;
}

.tier {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fcfcfd;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.035);
}

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

.mini-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  min-height: 100%;
}

.mini-panel h4 {
  margin: 0 0 10px;
}

ul {
  padding-left: 20px;
  margin: 0;
}

li + li {
  margin-top: 8px;
}

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

.forecast-box {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--panel));
  border-radius: 18px;
  padding: 16px;
}

.forecast-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin-top: 14px;
  background: #fff;
}

th, td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
}

th {
  background: var(--panel);
}

.vendor-planner {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fcfcfd;
  padding: 18px;
  margin-top: 18px;
  box-shadow: inset 0 1px 0 #fff;
}

.select-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

select {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.cost-band {
  margin-top: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #07111f, #13243d);
  color: #fff;
  padding: 16px;
}

.edit-panel, .ai-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 16px;
  margin-top: 14px;
}

.ai-panel {
  background: #fffbf2;
  border-color: #ead7a8;
}

.questions-card textarea {
  min-height: 220px;
  resize: vertical;
}

.loading-panel {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-tight);
}

.loading-orbit {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border-radius: 20px;
  background: #fff8ea;
  border: 1px solid #ead7a8;
}

.loading-panel h3 {
  margin-bottom: 4px;
}

.loading-panel p {
  color: var(--muted);
  line-height: 1.4;
}

.loading-bars {
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.45fr;
  gap: 8px;
  margin-top: 14px;
}

.loading-bars span {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #d8c59b);
  animation: pulse 1.2s ease-in-out infinite;
}

.loading-bars span:nth-child(2) {
  animation-delay: 140ms;
}

.loading-bars span:nth-child(3) {
  animation-delay: 280ms;
}

.spinner, .tiny-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.tiny-spinner {
  width: 18px;
  height: 18px;
  border-color: rgba(138, 91, 0, 0.24);
  border-top-color: #8a5b00;
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scaleX(0.92); }
  50% { opacity: 1; transform: scaleX(1); }
}

.hidden {
  display: none !important;
}

@media (max-width: 880px) {
  .hero, .grid, .flow, .tier-main, .forecast-grid, .select-grid, .deck-stage, .brand-editor, .preview-panels {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

  .resume-bar {
    display: grid;
  }

  .input-toolbar {
    display: grid;
  }

  .workbench-top {
    display: contents;
  }

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

  .mode-switch,
  .workbench-actions,
  .workbench-top > div:first-child {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-switch button {
    flex: 1;
  }

  .workbench-actions .btn {
    flex: 1 1 180px;
  }

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

  .deck-toolbar {
    display: grid;
  }

  .deck-controls {
    flex-wrap: wrap;
  }

  .deck-arrow {
    display: none;
  }

  .deck-fullscreen {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .deck-full-frame {
    grid-column: 1 / -1;
  }

  .deck-full-arrow.left,
  .deck-full-arrow.right {
    grid-column: auto;
    justify-self: center;
  }

  .section-head {
    display: block;
  }

  .icon-actions {
    margin-top: 12px;
  }

  .flow-node:not(:last-child)::after {
    content: "v";
    right: 50%;
    top: auto;
    bottom: -15px;
  }

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

  .brand-color-grid {
    grid-template-columns: 1fr;
  }

  .card, .workbench {
    padding: 22px;
    border-radius: 24px;
  }
}

@media (min-width: 881px) and (max-width: 1180px) {
  .workbench-actions {
    grid-template-columns: repeat(3, minmax(0, max-content));
  }

}

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

  .hero, .workbench, .card {
    box-shadow: none;
    break-inside: avoid;
  }

  .icon-actions, .actions, .section-note, .btn, .report-nav, .loading-panel {
    display: none !important;
  }
}
