:root {
  color-scheme: light;
  --bg: #f7f7f0;
  --page-background:
    linear-gradient(135deg, rgba(33, 82, 91, 0.12), transparent 28%),
    linear-gradient(315deg, rgba(138, 75, 36, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(247, 247, 240, 0.86) 52%, rgba(238, 241, 231, 0.9)),
    var(--bg);
  --panel: rgba(255, 255, 255, 0.82);
  --panel-soft: rgba(255, 255, 255, 0.68);
  --panel-strong: #ffffff;
  --ink: #182026;
  --heading: #172025;
  --muted: #3d484f;
  --subtle: #647078;
  --line: rgba(24, 32, 38, 0.12);
  --line-strong: rgba(24, 32, 38, 0.16);
  --primary: #21525b;
  --primary-channel: 33, 82, 91;
  --primary-ink: #ffffff;
  --accent: #8a4b24;
  --accent-channel: 138, 75, 36;
  --blue: var(--primary);
  --shadow: 0 14px 34px rgba(24, 32, 38, 0.08);
  --shadow-lift: 0 22px 54px rgba(24, 32, 38, 0.12);
  --focus-ring: 0 0 0 3px rgba(var(--primary-channel), 0.16);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  background: var(--page-background);
  color: var(--ink);
  font-family: var(--font);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 32, 38, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 32, 38, 0.025) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 72%);
}

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

.app-shell {
  width: min(1320px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 0 0 42px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  border: 1px solid rgba(24, 32, 38, 0.1);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 34px rgba(24, 32, 38, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--heading);
  font-weight: 760;
  text-decoration: none;
}

.mark {
  display: grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(93, 72, 49, 0.24);
  border-radius: var(--radius);
  background: #f0dfc2;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    0 6px 16px rgba(24, 32, 38, 0.08);
  color: var(--primary);
  font-size: 0.9rem;
}

.brand-mark {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  color: var(--heading);
  font-size: 0.98rem;
  font-weight: 780;
  line-height: 1.1;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 720;
  line-height: 1.1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nav-link[aria-current="page"],
.nav-link:hover,
.nav-link:focus-visible {
  border-color: rgba(var(--primary-channel), 0.38);
  outline: none;
  box-shadow: var(--focus-ring);
  transform: translateY(-1px);
}

.app-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-top: 22px;
  border: 1px solid rgba(var(--primary-channel), 0.12);
  border-radius: var(--radius);
  padding: 28px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.28) 52%),
    linear-gradient(180deg, rgba(var(--primary-channel), 0.08), rgba(255, 255, 255, 0.06));
  box-shadow: var(--shadow);
}

.app-header-mark {
  display: block;
  width: clamp(82px, 12vw, 118px);
  height: clamp(82px, 12vw, 118px);
  overflow: hidden;
  align-self: start;
  border: 1px solid rgba(93, 72, 49, 0.24);
  border-radius: var(--radius);
  background: #f0dfc2;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 16px 36px rgba(24, 32, 38, 0.1);
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 860px;
  margin-bottom: 14px;
  color: var(--heading);
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.lede {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.header-actions,
.download-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-weight: 740;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--primary);
  outline: none;
  box-shadow: var(--focus-ring);
  transform: translateY(-1px);
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(var(--primary-channel), 0.2);
}

.button.full-width {
  width: 100%;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: 0 12px 30px rgba(24, 32, 38, 0.05);
}

.summary-strip > div {
  display: grid;
  gap: 6px;
  min-height: 96px;
  align-content: center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68)),
    var(--panel);
}

.label {
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 780;
  text-transform: uppercase;
}

.summary-strip strong {
  line-height: 1.3;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.34fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.workspace.decision-workspace {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

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

.wizard-stepper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.step-button {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  font-weight: 760;
  text-align: left;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.58) inset;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.step-button span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--primary);
  font-size: 0.78rem;
}

.step-button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(var(--primary-channel), 0.16);
}

.step-button:hover,
.step-button:focus-visible {
  border-color: rgba(var(--primary-channel), 0.38);
  outline: none;
  box-shadow: var(--focus-ring);
  transform: translateY(-1px);
}

.step-button.is-active span {
  background: var(--primary-ink);
  color: var(--primary);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)),
    var(--panel);
  box-shadow: var(--shadow);
}

.wizard-card,
.selection-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.wizard-step {
  display: grid;
  gap: 16px;
}

.wizard-step[hidden] {
  display: none;
}

.generated-visual {
  --visual-accent: var(--primary);
  --visual-soft: rgba(var(--primary-channel), 0.08);
  display: grid;
  grid-template-columns: minmax(136px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--visual-accent) 25%, var(--line));
  border-radius: var(--radius);
  padding: 10px;
  background:
    linear-gradient(90deg, var(--visual-soft), rgba(255, 255, 255, 0.62));
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.045);
}

.generated-visual svg {
  display: block;
  width: 100%;
  min-height: 88px;
}

.generated-visual .imagegen-sprite {
  width: 100%;
}

.generated-visual .visual-bg {
  fill: rgba(255, 255, 255, 0.68);
  stroke: color-mix(in srgb, var(--visual-accent) 18%, transparent);
}

.mascot-shadow {
  fill: rgba(24, 32, 38, 0.1);
}

.mascot-ear,
.mascot-body,
.mascot-face {
  fill: color-mix(in srgb, var(--visual-accent) 9%, white);
  stroke: var(--visual-accent);
  stroke-width: 4;
}

.mascot-face {
  fill: #f8fbfa;
}

.mascot-trunk,
.mascot-smile,
.mascot-tusk,
.prop-line {
  fill: none;
  stroke: var(--visual-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.mascot-eye,
.prop-dot {
  fill: var(--visual-accent);
}

.prop-fill {
  fill: color-mix(in srgb, var(--visual-accent) 12%, white);
  stroke: var(--visual-accent);
  stroke-linejoin: round;
  stroke-width: 4;
}

.visual-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.visual-copy strong {
  color: var(--heading);
  font-size: 0.98rem;
  line-height: 1.2;
}

.visual-copy span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.visual-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.visual-chip-row span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--visual-accent) 24%, transparent);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--visual-accent);
  font-size: 0.7rem;
  font-weight: 780;
}

.step-visual-banner {
  min-height: 104px;
}

.branch-visual {
  grid-template-columns: minmax(126px, 0.34fr) minmax(0, 1fr);
  min-height: 98px;
  padding: 8px;
}

.branch-visual svg {
  min-height: 78px;
}

.branch-image-visual {
  display: grid;
  grid-template-columns: minmax(184px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--radius);
  padding: 12px;
  background: linear-gradient(90deg, rgba(var(--accent-channel), 0.1), rgba(255, 255, 255, 0.68));
}

.branch-sprite-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 92px));
  gap: 7px;
  align-items: center;
  justify-content: start;
}

.imagegen-sprite {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(93, 72, 49, 0.24);
  border-radius: var(--radius);
  background-repeat: no-repeat;
  background-size: var(--sprite-bg-width, 300%) var(--sprite-bg-height, 300%);
  background-position: var(--sprite-x) var(--sprite-y);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.branch-sprite-cell {
  aspect-ratio: 1;
  width: 100%;
  max-width: 92px;
  min-height: 0;
}

.step-sprite-cell {
  aspect-ratio: 1;
  min-height: 90px;
}

.boundary-sprite-cell {
  aspect-ratio: 1;
  width: 58px;
}

.wizard-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.wizard-controls .button {
  min-width: 132px;
}

.wizard-controls .button[hidden] {
  display: none;
}

.panel-heading {
  display: grid;
  gap: 2px;
}

.panel-heading.split {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 740;
}

label.full {
  grid-column: 1 / -1;
}

.field-relevance {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(var(--primary-channel), 0.2);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(var(--primary-channel), 0.06);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 560;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.62) inset;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: var(--focus-ring);
}

.panel-divider {
  height: 1px;
  background: var(--line);
}

.small-copy,
.status-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.status-message {
  min-height: 1.4em;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.32fr);
  gap: 12px;
  margin-top: 16px;
}

.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

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

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

.branch-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)),
    var(--panel-soft);
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.04);
}

.branch-card.is-active {
  border-color: rgba(var(--primary-channel), 0.36);
  background: rgba(var(--primary-channel), 0.06);
}

.branch-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.branch-heading h3 {
  margin: 8px 0 6px;
}

.branch-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.42;
}

.branch-count {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 760;
  white-space: nowrap;
}

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

.profile-option {
  display: grid;
  gap: 7px;
}

.profile-primary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  column-gap: 10px;
  align-content: start;
  align-items: start;
  width: 100%;
}

.profile-mini-visual {
  grid-row: 1 / 4;
  width: 54px;
  height: 54px;
  margin-bottom: 0;
  background-color: #f3ead8;
}

.profile-option.is-selected .profile-primary {
  border-color: rgba(var(--primary-channel), 0.64);
  box-shadow: 0 0 0 2px rgba(var(--primary-channel), 0.08);
}

.quick-picks button {
  min-height: 76px;
  cursor: pointer;
  border: 1px solid rgba(36, 93, 122, 0.25);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(var(--primary-channel), 0.08);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 760;
  text-align: left;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.58) inset;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.quick-picks button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.quick-picks button:hover,
.quick-picks button:focus-visible {
  border-color: rgba(var(--primary-channel), 0.38);
  outline: none;
  box-shadow: var(--focus-ring);
  transform: translateY(-1px);
}

.quick-picks .profile-toggle {
  min-height: 36px;
  border-color: rgba(var(--primary-channel), 0.24);
  padding: 7px 10px;
  background: var(--panel);
  color: var(--primary);
  font-size: 0.74rem;
  text-align: center;
}

.quick-picks .profile-toggle[aria-pressed="true"] {
  background: rgba(var(--primary-channel), 0.1);
  color: var(--primary);
}

.quick-picks .profile-toggle:disabled {
  cursor: default;
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
  opacity: 1;
}

.profile-title,
.profile-copy {
  display: block;
  grid-column: 2;
}

.profile-title {
  font-size: 0.88rem;
  line-height: 1.18;
}

.profile-copy {
  margin-top: 5px;
  font-size: 0.74rem;
  font-weight: 560;
  line-height: 1.35;
}

.profile-meta {
  display: inline-flex;
  grid-column: 2;
  width: fit-content;
  margin-top: 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 0.68rem;
  font-weight: 760;
  opacity: 0.82;
}

.profile-summary,
.package-preview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.profile-summary strong,
.package-preview strong {
  color: var(--ink);
}

.profile-summary button {
  justify-self: start;
}

.core-process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 8px;
}

.core-process-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 18px rgba(24, 32, 38, 0.035);
}

.core-process-card > span {
  display: grid;
  gap: 3px;
}

.core-process-card strong {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.2;
}

.core-process-card small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.28;
}

.core-process-sprite {
  aspect-ratio: 1;
  width: 54px;
  min-width: 54px;
}

.quick-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.context-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.context-details summary {
  cursor: pointer;
  padding: 13px 14px;
  color: var(--ink);
  font-weight: 780;
}

.context-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.context-details .field-grid,
.context-details .download-stack,
.context-details .small-copy,
.context-details .request-preview {
  margin: 14px;
}

.request-preview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.request-preview pre {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(24, 32, 38, 0.04);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.download-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: start;
}

.download-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62)),
    var(--panel-soft);
  box-shadow: 0 12px 30px rgba(24, 32, 38, 0.045);
}

.download-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), rgba(var(--primary-channel), 0.18));
}

.download-card .panel-heading {
  padding-bottom: 2px;
}

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

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

.preview-metrics.compact {
  min-width: min(100%, 380px);
}

.preview-metrics div {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.preview-metrics span {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: uppercase;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  background: rgba(255, 255, 255, 0.62);
}

.segmented-control button {
  min-height: 42px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 780;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.segmented-control button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.segmented-control button:hover,
.segmented-control button:focus-visible {
  border-color: rgba(var(--primary-channel), 0.34);
  outline: none;
  transform: translateY(-1px);
}

.recommended-pack,
.catalog-panel {
  display: grid;
  gap: 14px;
}

.recommended-pack[hidden],
.catalog-panel[hidden] {
  display: none;
}

.recommended-pack-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.recommended-pack-header h3 {
  margin-bottom: 8px;
}

.recommended-pack-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.context-state {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.86rem;
}

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

.recommended-skill-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(var(--primary-channel), 0.28);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    var(--panel-strong);
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.04);
}

.recommended-skill-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), rgba(var(--primary-channel), 0.18));
}

.recommended-skill-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.46;
}

.recommended-skill-card .selector {
  display: block;
  margin-top: 10px;
}

.why-selected {
  color: var(--primary) !important;
  font-weight: 650;
}

.empty-state {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--panel-soft);
  color: var(--muted);
}

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

.skill-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 216px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)),
    var(--panel-soft);
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.skill-card.is-selected {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.skill-card:hover {
  border-color: rgba(var(--primary-channel), 0.3);
  box-shadow: 0 14px 30px rgba(24, 32, 38, 0.07);
  transform: translateY(-1px);
}

.skill-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.skill-card h3 {
  margin: 0;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.46;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(196, 120, 43, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(var(--accent-channel), 0.08);
  color: #6f3f22;
  font-size: 0.72rem;
  font-weight: 760;
}

.selector {
  color: var(--subtle);
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.toggle {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
}

.skill-card.is-selected .toggle {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.selected-list {
  display: grid;
  gap: 8px;
  max-height: 54vh;
  overflow: auto;
  padding-right: 2px;
}

.selected-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--panel-soft);
}

.selected-item strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.selected-item span {
  color: var(--muted);
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.package-trust {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(var(--primary-channel), 0.24);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(var(--primary-channel), 0.07);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.package-trust p {
  margin: 0;
}

.boundary-trust-visual {
  grid-row: 1 / span 2;
  align-self: start;
}

.boundary-trust-visual + p,
.boundary-trust-visual ~ p {
  grid-column: 2;
}

.mobile-package-dock {
  display: none;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
  }

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

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

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

  .business-type-tree,
  .branch-options {
    grid-template-columns: 1fr;
  }

  .recommended-pack-header {
    grid-template-columns: 1fr;
  }

  .generated-visual svg {
    max-height: 112px;
  }

  .branch-image-visual {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body.mobile-dock-open {
    padding-bottom: 132px;
  }

  .app-shell {
    width: min(100vw - 20px, 680px);
  }

  .app-header,
  .site-header,
    .summary-strip,
    .wizard-stepper,
    .profile-grid,
    .segmented-control,
    .filters,
    .download-grid,
    .skill-grid,
    .field-grid,
    .recommended-skill-card {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.1rem;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .site-nav,
  .header-actions,
  .header-actions > *,
  .download-stack {
    width: 100%;
  }

  .site-nav > * {
    width: 100%;
  }

  .header-actions,
  .download-stack {
    display: grid;
  }

  .wizard-controls {
    display: grid;
  }

  .wizard-controls .button {
    width: 100%;
  }

  .preview-metrics {
    grid-template-columns: 1fr;
  }

  .step-visual-banner,
  .branch-visual {
    min-height: 0;
  }

  .generated-visual,
  .branch-visual,
  .step-visual-banner,
  .branch-image-visual {
    grid-template-columns: minmax(0, 1fr);
  }

  .generated-visual {
    padding: 9px;
  }

  .generated-visual svg {
    min-height: 82px;
  }

  .mobile-package-dock:not([hidden]) {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
    border: 1px solid rgba(var(--primary-channel), 0.32);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(24, 32, 38, 0.16);
  }

  .mobile-package-dock div {
    display: grid;
    gap: 2px;
  }

  .mobile-package-dock span {
    color: var(--subtle);
    font-size: 0.68rem;
    font-weight: 780;
    text-transform: uppercase;
  }

  .mobile-package-dock strong {
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-package-dock .button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
