:root {
  --ink: #17211b;
  --muted: #637068;
  --forest: #174b38;
  --forest-soft: #2d6550;
  --paper: #f4f1e9;
  --surface: #fffdf8;
  --line: #d9d4c8;
  --accent: #d89b43;
  --danger: #a44232;
}

* { box-sizing: border-box; }

body.studio-shell {
  min-height: 100vh;
  margin: 0;
  display: block;
  color: var(--ink);
  background: var(--paper);
}

.topbar {
  min-height: 68px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .94);
  gap: 3rem;
}

.brand { color: var(--ink); letter-spacing: .13em; text-decoration: none; white-space: nowrap; }
.brand span { margin-left: 1rem; color: var(--muted); font-size: 1rem; letter-spacing: .035em; }
.language { margin-left: auto; color: var(--forest); text-decoration: none; white-space: nowrap; }

.discovery-layout {
  width: 100%;
  min-height: calc(100vh - 68px);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(270px, 34%) minmax(0, 1fr);
}

.journey-panel {
  padding: clamp(2rem, 5vw, 5rem);
  color: #f7f4eb;
  background: var(--forest);
}

.journey-panel .eyebrow { color: #b9d4c6; }
.journey-panel h1 { margin: .5rem 0 1rem; font-size: clamp(2.2rem, 4vw, 4.4rem); }
.journey-panel .lede { margin: 0 0 2.5rem; color: #dce8e1; font-size: 1.05rem; }
.journey-panel .disclosure { margin-top: 3rem; color: #bfd1c7; font-size: .82rem; line-height: 1.5; }

.progress-list { margin: 0; padding: 0; display: grid; gap: .2rem; list-style: none; }
.progress-list li { padding: .8rem 0; display: flex; align-items: center; gap: .9rem; color: #a9c1b5; border-bottom: 1px solid rgba(255,255,255,.12); }
.progress-list li span { width: 2rem; font-family: ui-monospace, monospace; font-size: .78rem; }
.progress-list li.active { color: white; font-weight: 700; }
.progress-list li.complete { color: #d5e8de; }

.form-panel { min-width: 0; padding: clamp(2rem, 5vw, 5rem); background: var(--surface); }
#discovery-form { width: min(860px, 100%); margin: 0 auto; }
.form-step { margin: 0; padding: 0; border: 0; display: none; }
.form-step.active { display: block; }
.form-step legend { width: 100%; margin-bottom: 2rem; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(1.8rem, 3vw, 2.8rem); }

.profile-grid { display: grid; gap: .85rem; }
.profile-card { padding: 1.1rem 1.2rem; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf6; cursor: pointer; }
.profile-card:hover { border-color: var(--forest-soft); }
.profile-card:has(input:checked) { border-color: var(--forest); box-shadow: 0 0 0 2px rgba(23,75,56,.13); background: #f2f7f3; }
.profile-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-mark { width: 18px; height: 18px; border: 2px solid var(--forest-soft); border-radius: 50%; }
.profile-card:has(input:checked) .radio-mark { border: 5px solid var(--forest); }
.profile-card strong, .profile-card small { grid-column: 3; }
.profile-card small { color: var(--muted); line-height: 1.45; }
.mono { font-family: ui-monospace, monospace; color: var(--forest); font-size: .8rem; }

.field-grid, .score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field-grid label, .score-grid label { min-width: 0; display: grid; gap: .55rem; font-weight: 700; }
.field-grid .wide { grid-column: 1 / -1; }
.field-help { margin: -1.2rem 0 1.5rem; color: var(--muted); line-height: 1.55; }
input, select, textarea { width: 100%; padding: .78rem .85rem; border: 1px solid #bdb8ac; border-radius: 8px; color: var(--ink); background: white; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(45,101,80,.2); border-color: var(--forest-soft); }
input[type="range"] { padding: .4rem 0; accent-color: var(--forest); }

.form-actions { margin-top: 2.5rem; padding-top: 1.25rem; display: flex; align-items: center; gap: 1rem; border-top: 1px solid var(--line); }
.step-count { margin-left: auto; color: var(--muted); }
.button { padding: .78rem 1.2rem; border: 1px solid var(--forest); border-radius: 8px; font: inherit; font-weight: 750; cursor: pointer; }
.button.primary { color: white; background: var(--forest); }
.button.secondary { color: var(--forest); background: transparent; }
.button:hover { filter: brightness(.94); }

.consent { margin-top: 1.5rem; display: flex; align-items: flex-start; gap: .75rem; line-height: 1.5; }
.consent input { width: auto; margin-top: .25rem; }

@media (max-width: 880px) {
  .discovery-layout { grid-template-columns: 1fr; }
  .journey-panel { padding: 2rem; }
  .journey-panel h1 { font-size: 2.5rem; }
  .progress-list { grid-template-columns: repeat(5, 1fr); }
  .progress-list li { display: grid; gap: .2rem; font-size: .72rem; }
  .journey-panel .disclosure { margin-top: 1.5rem; }
}

@media (max-width: 620px) {
  .topbar { padding: 0 1rem; }
  .brand span { display: none; }
  .form-panel { padding: 1.5rem 1rem 2rem; }
  .field-grid, .score-grid { grid-template-columns: 1fr; }
  .field-grid .wide { grid-column: auto; }
  .profile-card { grid-template-columns: auto 1fr; }
  .profile-card strong, .profile-card small { grid-column: 2; }
  .form-actions { flex-wrap: wrap; }
}
