:root {
  color-scheme: dark;
  --bg: #090d16;
  --bg-elevated: #0e1422;
  --surface: #121a2b;
  --surface-subtle: #162035;
  --surface-hover: #1b2740;
  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --ink-muted: #94a3b8;
  --ink-dim: #64748b;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.24);
  --navy: #003087;
  --blue: #0070ba;
  --blue-bright: #3898ff;
  --blue-hover: #0080d6;
  --blue-soft: rgba(0, 112, 186, 0.16);
  --blue-border: rgba(56, 152, 255, 0.34);
  --amber-bg: rgba(217, 119, 6, 0.14);
  --amber-ink: #fcd34d;
  --amber-border: rgba(245, 158, 11, 0.34);
  --green-bg: rgba(16, 185, 129, 0.14);
  --green-ink: #6ee7b7;
  --green-border: rgba(16, 185, 129, 0.32);
  --red-bg: rgba(239, 68, 68, 0.14);
  --red-ink: #fca5a5;
  --red-border: rgba(239, 68, 68, 0.34);
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius-lg: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

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

button {
  cursor: pointer;
}

a {
  color: var(--blue-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

#app {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

#app.intro-mode {
  display: block;
}

#app.intro-mode aside,
#app.intro-mode #appHeader {
  display: none;
}

#app.intro-mode main {
  padding: 0;
  max-width: none;
}

aside {
  background: var(--bg-elevated);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

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

.brand:hover {
  text-decoration: none;
}

.brand small {
  display: block;
  color: var(--blue-bright);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--blue), var(--navy));
  border: 1px solid rgba(56, 152, 255, 0.35);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  flex-shrink: 0;
}

.mark.sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 15px;
}

nav {
  display: grid;
  gap: 3px;
}

nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  min-height: 40px;
  transition: background 160ms ease, color 160ms ease;
}

nav button:hover {
  background: var(--surface);
  color: var(--ink);
}

nav button.active {
  background: var(--blue-soft);
  color: var(--ink);
  font-weight: 600;
}

nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: var(--blue-bright);
}

nav button.active .icon {
  color: var(--blue-bright);
}

.aside-foot {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--line);
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

.aside-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.45;
}

main {
  min-width: 0;
  width: 100%;
  padding: 26px clamp(20px, 3.5vw, 52px) 72px;
  background: var(--bg);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.header-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 29px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  word-break: break-word;
}

h2 {
  margin: 0 0 10px;
  font-size: 18.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

p {
  margin: 0 0 12px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

p:last-child {
  margin-bottom: 0;
}

.view-stage {
  transition: opacity 160ms ease;
}

.view-stage.loading-dim {
  opacity: 0.72;
}

.view-enter {
  animation: viewIn 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Introduction Page */
.intro-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px clamp(18px, 3.5vw, 44px) 72px;
}

.intro-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.intro-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.intro-brand:hover {
  text-decoration: none;
}

.intro-brand small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-bright);
}

.intro-brand strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.intro-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.intro-hero {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(28px, 4.5vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: center;
}

.intro-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}

.intro-headline {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 750;
  color: var(--ink);
  margin: 0 0 16px;
}

.intro-sub {
  font-size: clamp(15.5px, 1.5vw, 18px);
  line-height: 1.58;
  color: var(--ink-muted);
  max-width: 560px;
  margin: 0 0 26px;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.intro-visual-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.intro-visual-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Custom SVG Draw & Stage Motion */
.svg-draw {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: drawOutline 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes drawOutline {
  to {
    stroke-dashoffset: 0;
  }
}

.svg-pop-1 {
  opacity: 0;
  animation: stagePop 260ms ease-out 0.12s forwards;
}

.svg-pop-2 {
  opacity: 0;
  animation: stagePop 260ms ease-out 0.24s forwards;
}

.svg-pop-3 {
  opacity: 0;
  animation: stagePop 260ms ease-out 0.36s forwards;
}

@keyframes stagePop {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.journey-panel {
  margin-top: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 32px);
}

.journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.journey-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-bright);
}

.journey-svg-wrap {
  width: 100%;
  margin: 4px 0 20px;
}

.journey-svg {
  width: 100%;
  height: auto;
  display: block;
}

.journey-flow-line {
  stroke-dasharray: 6 6;
  animation: flowDash 18s linear infinite;
}

@keyframes flowDash {
  to {
    stroke-dashoffset: -240;
  }
}

.journey-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: gentlePulse 3.2s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%,
  100% {
    opacity: 0.92;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

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

.journey-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: border-color 180ms ease, transform 180ms ease;
}

.journey-step:hover {
  border-color: var(--blue-border);
  transform: translateY(-1px);
}

.journey-step-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.journey-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue-bright);
  display: grid;
  place-items: center;
}

.journey-step small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--blue-bright);
  text-transform: uppercase;
}

.journey-step h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
}

.journey-step p {
  font-size: 13.5px;
  color: var(--ink-muted);
}

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

.role-summary {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.role-summary h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.role-summary p {
  font-size: 13.5px;
  color: var(--ink-muted);
}

.intro-footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ink-dim);
  font-size: 12.5px;
  padding: 14px 4px 0;
  border-top: 1px solid var(--line);
}

/* Focused Consumer & Manufacturer Home */
.focus-home {
  max-width: 920px;
}

.focus-question-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.5vw, 36px);
  margin-bottom: 24px;
}

.focus-question-card h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.focus-question-card p {
  font-size: 15.5px;
  color: var(--ink-muted);
  max-width: 640px;
  margin-bottom: 20px;
}

.route-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.route-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  color: var(--ink);
  text-align: left;
  transition: background 150ms ease;
}

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

.route-row:hover {
  background: var(--surface-subtle);
}

.route-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.route-row-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.route-row-text span {
  display: block;
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* Refined Product List (Explore & Demand) */
.product-list {
  display: grid;
  gap: 12px;
}

.product-row-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transition: border-color 160ms ease, background 160ms ease;
}

.product-row-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.product-row-main {
  min-width: 0;
  flex: 1;
}

.product-row-main h3 {
  margin: 8px 0 5px;
  font-size: 16.5px;
}

.product-row-main p {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
}

.product-row-aside {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.product-row-stat {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.product-row-stat strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
}

.product-row-stat span {
  font-size: 12px;
  color: var(--ink-muted);
}

#account {
  position: relative;
  flex-shrink: 0;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  min-height: 38px;
  max-width: 240px;
  transition: border-color 150ms ease, background 150ms ease;
}

.profile-btn:hover {
  border-color: var(--blue-bright);
  background: var(--surface-subtle);
}

.profile-btn span.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 232px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.profile-menu[hidden] {
  display: none;
}

.profile-menu-meta {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ink-muted);
}

.profile-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
}

.profile-menu button:hover {
  background: var(--surface-hover);
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber-ink);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
}

#notice:not(:empty),
#modalNotice:not(:empty) {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: #bfdbfe;
  animation: viewIn 160ms ease-out;
}

#notice.error:not(:empty),
#modalNotice.error:not(:empty) {
  background: var(--red-bg);
  border-color: var(--red-border);
  color: var(--red-ink);
}

#notice.success:not(:empty),
#modalNotice.success:not(:empty) {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green-ink);
}

button.primary,
button.secondary,
button.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button.primary {
  background: var(--blue);
  border: 1px solid var(--blue-bright);
  color: #ffffff;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  min-height: 42px;
  transition: background 150ms ease, transform 120ms ease;
}

button.primary:hover:not(:disabled) {
  background: var(--blue-hover);
}

button.primary:active:not(:disabled),
button.secondary:active:not(:disabled) {
  transform: scale(0.985);
}

button.secondary {
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  min-height: 42px;
  transition: background 150ms ease, border-color 150ms ease, transform 120ms ease;
}

button.secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: rgba(148, 163, 184, 0.4);
}

button.secondary.active-choice {
  background: var(--blue-soft);
  border-color: var(--blue-bright);
  color: #dbeafe;
  font-weight: 600;
}

button.text-button {
  background: transparent;
  border: 0;
  color: var(--blue-bright);
  font-weight: 600;
  padding: 8px 10px;
  min-height: 38px;
}

button.text-button:hover:not(:disabled) {
  text-decoration: underline;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: 22px;
}

.hero h2 {
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.hero p {
  font-size: 15px;
  max-width: 700px;
  color: var(--ink-muted);
}

.hero.compact {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  margin: 22px 0 12px;
  font-size: 16px;
  font-weight: 650;
  color: var(--ink-secondary);
}

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

.action-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 136px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.action-card:hover {
  border-color: var(--blue-border);
  background: var(--surface-subtle);
  transform: translateY(-1px);
}

.action-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue-bright);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.action-card strong {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.action-card span {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.45;
}

.action-card b {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-bright);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.toolbar {
  display: flex;
  gap: 12px;
  margin: 0 0 18px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar input {
  flex: 1 1 260px;
  min-width: 0;
}

.toolbar select {
  flex: 0 1 230px;
  width: auto;
  min-width: 190px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 195px;
  transition: border-color 160ms ease, background 160ms ease;
}

.card:hover {
  border-color: var(--line-strong);
}

.card p {
  font-size: 14px;
  color: var(--ink-muted);
  flex: 1;
}

.card .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

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

.stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--blue-border);
  background: var(--blue-soft);
  color: #93c5fd;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge.demo {
  background: var(--amber-bg);
  color: var(--amber-ink);
  border-color: var(--amber-border);
}

.badge.success {
  background: var(--green-bg);
  color: var(--green-ink);
  border-color: var(--green-border);
}

.badge.muted-badge {
  background: var(--surface-subtle);
  color: var(--ink-muted);
  border-color: var(--line-strong);
}

.badge.danger {
  background: var(--red-bg);
  color: var(--red-ink);
  border-color: var(--red-border);
}

.muted {
  color: var(--ink-muted);
  font-size: 13px;
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 400;
}

.field-error {
  display: block;
  margin-top: 5px;
  color: var(--red-ink);
  font-size: 13px;
  font-weight: 500;
}

.field-error:empty {
  display: none;
}

label {
  display: block;
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
}

label .req {
  color: var(--blue-bright);
  font-weight: 500;
  margin-left: 4px;
}

label .opt {
  color: var(--ink-dim);
  font-weight: 400;
  margin-left: 4px;
}

label > input,
label > select,
label > textarea {
  margin-top: 6px;
}

form.stack > button {
  justify-self: start;
}

input,
select,
textarea {
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
  font-size: 14px;
  transition: border-color 150ms ease, background 150ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-dim);
}

input:focus,
select:focus,
textarea:focus {
  background: var(--surface);
  border-color: var(--blue-bright);
}

textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

form.stack {
  max-width: 720px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.checkbox input {
  width: auto;
  min-width: 18px;
  height: 18px;
  margin: 0;
}

.wizard {
  max-width: 820px;
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.steps span {
  background: var(--bg-elevated);
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.steps .done {
  color: var(--green-ink);
  background: var(--green-bg);
  border-color: var(--green-border);
}

.steps .current {
  color: #dbeafe;
  background: var(--blue-soft);
  border-color: var(--blue-bright);
  font-weight: 650;
}

.wizard .panel {
  padding: clamp(20px, 3vw, 32px);
}

.review,
.callout {
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 12px 0;
}

.callout.info {
  background: var(--blue-soft);
  border-color: var(--blue-border);
}

.callout.warn {
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.stat {
  display: inline-flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  min-width: 160px;
  font-variant-numeric: tabular-nums;
}

.stat strong {
  font-size: 26px;
  line-height: 1.1;
  color: var(--ink);
}

.stat small {
  color: var(--ink-muted);
  font-size: 12.5px;
  margin-top: 4px;
}

.progress {
  height: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 10px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--blue-bright);
  border-radius: 999px;
  transition: width 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
}

.stage-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--ink-dim);
}

.stage-pill.done {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green-ink);
}

.stage-pill.current {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: #dbeafe;
  font-weight: 600;
}

.list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.list-item:first-child {
  padding-top: 0;
}

.page-actions {
  margin-bottom: 18px;
}

.guide {
  max-width: 820px;
}

.guide ol {
  padding-left: 20px;
}

.guide li {
  margin: 12px 0;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.spec-box {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
  animation: viewIn 220ms ease-out;
}

.spec-box ul {
  margin: 6px 0 12px;
  padding-left: 20px;
  color: var(--ink-secondary);
}

.spec-box li {
  margin: 4px 0;
}

.support-pulse {
  animation: supportFlash 420ms ease-out;
}

@keyframes supportFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 152, 255, 0.45);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(56, 152, 255, 0);
  }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

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

.panel details,
.panel summary {
  cursor: pointer;
}

details.panel summary {
  font-size: 16px;
  font-weight: 650;
  color: var(--ink);
}

details.panel[open] summary {
  margin-bottom: 14px;
}

dialog {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: min(520px, calc(100% - 24px));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: dialogIn 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

dialog::backdrop {
  background: rgba(5, 8, 16, 0.72);
}

.close {
  float: right;
  background: var(--surface-subtle);
  color: var(--ink-muted);
  border: 1px solid var(--line);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.close:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 1024px) {
  #app {
    grid-template-columns: 206px minmax(0, 1fr);
  }
  .intro-hero {
    grid-template-columns: 1fr;
  }
  .product-layout {
    grid-template-columns: 1fr;
  }
  .journey-grid,
  .roles-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  #app {
    display: block;
  }
  aside {
    height: auto;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    display: none;
  }
  .mobile-brand {
    display: inline-flex;
  }
  nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar {
    display: none;
  }
  nav button {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 12px;
    min-height: 36px;
    font-size: 13.5px;
  }
  nav button.active::before {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 0;
    width: auto;
    height: 2px;
  }
  .aside-foot {
    display: none;
  }
  main {
    padding: 18px 16px 64px;
  }
  .action-grid {
    grid-template-columns: 1fr;
  }
  .product-row-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .product-row-aside {
    width: 100%;
    justify-content: space-between;
  }
  .product-row-stat {
    text-align: left;
  }
  .toolbar select {
    flex: 1 1 180px;
  }
  .steps span {
    font-size: 11.5px;
    padding: 8px 4px;
  }
  .journey-svg-wrap {
    display: none;
  }
}

@media (max-width: 640px) {
  .intro-topbar {
    padding-bottom: 18px;
  }
  .intro-nav .text-button {
    display: none;
  }
  .intro-nav button.secondary,
  .intro-nav button.primary {
    padding: 8px 12px;
    min-height: 36px;
    font-size: 13px;
  }
}

@media (max-width: 440px) {
  header {
    gap: 10px;
  }
  .profile-btn {
    max-width: 140px;
    padding: 6px 10px;
  }
  .steps {
    gap: 4px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
