:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-strong: #eef3fa;
  --surface: #ffffff;
  --ink: #121826;
  --ink-soft: #526071;
  --ink-faint: #758195;
  --line: #dbe2ec;
  --line-strong: #b9c6d8;
  --accent: #155eef;
  --accent-strong: #0c46c8;
  --accent-soft: #eaf1ff;
  --mint: #0a8f62;
  --mint-soft: #e7f7f0;
  --amber: #a85b00;
  --amber-soft: #fff4dc;
  --red: #c92a2a;
  --red-soft: #fff0f0;
  --shadow: 0 20px 50px rgb(24 39 75 / 10%);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --z-header: 20;
  --z-dialog: 40;
  --z-toast: 50;
  --font-ui: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-serif: "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f141c;
  --bg-soft: #151c26;
  --bg-strong: #1b2532;
  --surface: #111821;
  --ink: #f2f5f8;
  --ink-soft: #b2bdca;
  --ink-faint: #8794a5;
  --line: #2b3747;
  --line-strong: #445369;
  --accent: #6d9dff;
  --accent-strong: #8db2ff;
  --accent-soft: #182c55;
  --mint: #54d3a5;
  --mint-soft: #17382d;
  --amber: #ffc46a;
  --amber-soft: #3a2d16;
  --red: #ff7b7b;
  --red-soft: #3d2024;
  --shadow: 0 24px 60px rgb(0 0 0 / 36%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  transition: transform 160ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  min-height: 72px;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 0 28px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
}

.topnav {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.nav-button {
  position: relative;
  min-width: 54px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.nav-button::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 3px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.nav-button:hover,
.nav-button.is-active {
  color: var(--ink);
}

.nav-button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px;
}

.button,
.icon-button,
.text-button,
.choice-button,
.sample-tab,
.skill-select-button,
.table-action,
.demo-button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.button svg,
.icon-button svg,
.text-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.button-large {
  min-height: 52px;
  padding-inline: 26px;
  font-size: 16px;
}

.button-full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-soft);
}

.icon-button:hover,
.icon-button.is-selected {
  border-color: var(--line);
  background: var(--bg-soft);
  color: var(--accent);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 4px;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.app-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  max-width: 1600px;
  margin: 0 auto;
}

.progress-rail {
  position: sticky;
  top: 72px;
  height: calc(100dvh - 72px);
  align-self: start;
  border-right: 1px solid var(--line);
  padding: 44px 24px 28px;
  background: var(--bg);
}

.progress-rail ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  min-height: 94px;
  color: var(--ink-faint);
}

.progress-step:not(:last-child)::after {
  position: absolute;
  top: 33px;
  bottom: 3px;
  left: 13px;
  width: 2px;
  background: var(--line);
  content: "";
}

.progress-step.is-current {
  color: var(--accent);
}

.progress-step.is-complete {
  color: var(--mint);
}

.progress-step.is-current::after,
.progress-step.is-complete::after {
  background: currentColor;
}

.step-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.progress-step strong,
.progress-step small {
  display: block;
}

.progress-step strong {
  margin-top: 1px;
  font-size: 15px;
}

.progress-step small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.progress-meter {
  position: absolute;
  right: 24px;
  bottom: 28px;
  left: 24px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.meter-track,
.confidence-track {
  overflow: hidden;
  height: 7px;
  margin: 8px 0;
  border-radius: 99px;
  background: var(--line);
}

.meter-track span,
.confidence-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease-out;
}

.main-canvas {
  min-width: 0;
}

section {
  scroll-margin-top: 88px;
}

.chooser-section,
.comparison-section,
.sample-studio,
.evidence-section {
  padding: 42px 54px;
}

.chooser-section {
  padding-bottom: 28px;
}

.section-heading {
  margin-bottom: 24px;
}

.heading-with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h1,
.section-heading h2,
.studio-intro h2,
.evidence-header h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.25;
  text-wrap: balance;
}

.section-heading h1 {
  font-size: clamp(28px, 3vw, 42px);
}

.section-heading h2,
.studio-intro h2,
.evidence-header h2 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.section-heading p,
.studio-intro p,
.evidence-header p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.choice-board {
  border-top: 1px solid var(--line);
}

.choice-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.choice-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 4px;
  font-weight: 700;
}

.choice-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 13px;
}

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

.choice-button {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.choice-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.choice-button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice-button.is-selected::after {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  content: "✓";
  font-size: 10px;
}

.chooser-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  padding-top: 18px;
}

.choice-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.recommendation-band {
  display: grid;
  grid-template-columns: 104px minmax(180px, 1.1fr) minmax(240px, 1.2fr) 150px minmax(180px, .9fr) auto;
  gap: 24px;
  align-items: center;
  margin: 0 36px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  padding: 20px 22px;
  box-shadow: 0 12px 30px rgb(24 39 75 / 5%);
}

.rank-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.rank-label,
.eyeline,
.dialog-kicker,
.selector-label,
.mode-label,
.audit-stamp,
.rank-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rank-label {
  color: var(--accent);
  font-weight: 800;
}

.rank-number {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 30px;
  line-height: 1.1;
}

.recommend-main .eyeline {
  margin: 0;
  color: var(--ink-faint);
}

.recommend-main h2 {
  margin: 2px 0 4px;
  font-size: 25px;
  letter-spacing: -.025em;
}

.recommend-main p:last-child,
.caveat-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.reason-list {
  display: grid;
  gap: 6px;
}

.reason-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
}

.reason-item::before {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  content: "✓";
  font-size: 10px;
  font-weight: 800;
}

.confidence-block,
.caveat-block {
  min-width: 0;
}

.confidence-block > span,
.caveat-block > span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.confidence-block strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.confidence-block small {
  color: var(--ink-faint);
  font-size: 10px;
}

.caveat-block {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.comparison-section {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-note {
  display: none;
  margin-bottom: 8px;
  color: var(--ink-faint);
  font-size: 12px;
}

.comparison-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  scrollbar-color: var(--line-strong) transparent;
}

.comparison-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  vertical-align: top;
  text-align: left;
}

.comparison-table tr:last-child td,
.comparison-table tr:last-child th {
  border-bottom: 0;
}

.comparison-table th:last-child,
.comparison-table td:last-child {
  border-right: 0;
}

.comparison-table thead th {
  position: relative;
  background: var(--bg);
  font-size: 13px;
}

.comparison-table thead th:first-child,
.comparison-table tbody th {
  width: 154px;
}

.comparison-table thead th.is-recommended {
  box-shadow: inset 0 4px 0 var(--accent);
}

.tool-head {
  display: grid;
  gap: 7px;
}

.tool-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tool-head strong {
  font-size: 15px;
  line-height: 1.25;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.compare-toggle {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.compare-toggle.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.comparison-table tbody th {
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.comparison-table tbody td {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
}

.status-chip::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-chip.good {
  background: var(--mint-soft);
  color: var(--mint);
}

.status-chip.scoped {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-chip.blocked {
  background: var(--red-soft);
  color: var(--red);
}

.security-cell {
  display: grid;
  gap: 8px;
}

.table-action {
  justify-self: start;
  min-height: 36px;
  padding: 4px 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.table-action:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stars {
  color: var(--amber);
  letter-spacing: 1px;
}

.audit-stamp {
  margin: 12px 0 0;
  color: var(--ink-faint);
}

.sample-studio {
  border-top: 10px solid var(--bg-soft);
}

.studio-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 26px;
}

.sample-disclosure {
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  padding: 12px 16px;
  color: var(--ink-soft);
  font-size: 12px;
}

.sample-disclosure strong,
.sample-disclosure span {
  display: block;
}

.sample-disclosure strong {
  color: var(--amber);
}

.studio-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 610px;
  border: 1px solid var(--line);
}

.skill-selector {
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 18px;
}

.selector-label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-faint);
}

#skill-selector-list {
  display: grid;
  margin-bottom: 18px;
}

.skill-select-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 8px 6px;
  text-align: left;
}

.skill-select-button:hover {
  background: var(--surface);
}

.skill-select-button.is-selected {
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.skill-logo {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.skill-select-button strong,
.skill-select-button small {
  display: block;
}

.skill-select-button strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-select-button small {
  color: var(--ink-faint);
  font-size: 10px;
}

.skill-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

.skill-state-dot.blocked {
  background: var(--red);
}

.studio-stage {
  min-width: 0;
  background: var(--surface);
}

.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 12px 0 22px;
}

.sample-tabs {
  display: flex;
  min-width: 0;
  gap: 24px;
}

.sample-tab {
  position: relative;
  background: transparent;
  color: var(--ink-soft);
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 700;
}

.sample-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--accent);
  content: "";
  opacity: 0;
}

.sample-tab.is-selected {
  color: var(--accent);
}

.sample-tab.is-selected::after {
  opacity: 1;
}

.preview-actions {
  display: flex;
}

.preview-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
}

.preview-meta strong,
.preview-meta span {
  display: block;
}

.preview-meta strong {
  font-size: 15px;
}

.preview-meta span:not(.mode-label) {
  color: var(--ink-faint);
  font-size: 12px;
}

.mode-label {
  color: var(--accent);
}

.preview-frame {
  overflow: auto;
  min-height: 470px;
  margin: 0 22px;
  border: 1px solid var(--line);
  background: #e9edf3;
  padding: 20px;
}

.preview-frame[data-width="mobile"] #preview-panel {
  max-width: 390px;
  min-height: 640px;
  margin: 0 auto;
}

.preview-result {
  min-height: 45px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding: 11px 22px;
  color: var(--ink-soft);
  font-size: 12px;
}

/* Sample primitives */
.demo-surface {
  min-height: 430px;
  overflow: hidden;
  background: #fff;
  color: #172033;
  box-shadow: 0 12px 36px rgb(40 50 70 / 14%);
  font-family: var(--font-ui);
}

.demo-surface * {
  box-sizing: border-box;
}

.demo-button {
  min-height: 36px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 750;
}

.demo-button:hover,
.demo-button[aria-pressed="true"] {
  transform: translateY(-1px);
  filter: brightness(.95);
}

.demo-top {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
}

.demo-brand {
  font-weight: 850;
  letter-spacing: -.025em;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.demo-body {
  padding: 20px;
}

.demo-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid currentColor;
}

.demo-kpi {
  min-width: 0;
  border-right: 1px solid currentColor;
  padding: 14px;
}

.demo-kpi:last-child {
  border-right: 0;
}

.demo-kpi span,
.demo-kpi strong {
  display: block;
}

.demo-kpi span {
  font-size: 10px;
  opacity: .65;
}

.demo-kpi strong {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 16px;
  margin-top: 16px;
}

.demo-panel {
  border: 1px solid currentColor;
  padding: 14px;
}

.demo-panel h3 {
  margin: 0 0 12px;
  font-size: 12px;
}

.demo-chart {
  display: flex;
  height: 108px;
  align-items: flex-end;
  gap: 7px;
  border-bottom: 1px solid currentColor;
  padding: 0 6px;
}

.demo-chart i {
  flex: 1;
  min-width: 7px;
  background: currentColor;
  opacity: .8;
}

.demo-chart i:nth-child(1) { height: 22%; }
.demo-chart i:nth-child(2) { height: 42%; }
.demo-chart i:nth-child(3) { height: 34%; }
.demo-chart i:nth-child(4) { height: 62%; }
.demo-chart i:nth-child(5) { height: 51%; }
.demo-chart i:nth-child(6) { height: 79%; }
.demo-chart i:nth-child(7) { height: 92%; }

.demo-list {
  display: grid;
  gap: 0;
}

.demo-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-bottom: 1px solid currentColor;
  padding: 9px 0;
  font-size: 10px;
}

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

.booking-hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 320px;
}

.booking-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.booking-copy h3 {
  max-width: 430px;
  margin: 0;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.15;
}

.booking-copy p {
  max-width: 420px;
  margin: 14px 0 22px;
  font-size: 12px;
  opacity: .72;
}

.booking-calendar {
  display: grid;
  align-content: center;
  padding: 26px;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.date-grid .demo-button {
  min-width: 0;
  padding-inline: 5px;
}

.portfolio-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 330px;
}

.portfolio-title {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
}

.portfolio-title h3 {
  margin: 0;
  font-size: clamp(34px, 6vw, 76px);
  line-height: .98;
  letter-spacing: -.06em;
}

.portfolio-work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 1px;
}

.work-block {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid currentColor;
  padding: 14px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.work-block strong {
  font-size: 13px;
}

.work-block span {
  font-size: 10px;
  opacity: .65;
}

/* Per-candidate sample worlds */
.sample-uiux.demo-surface {
  background: #f8fafc;
  color: #1e3a8a;
}

.sample-uiux .demo-top {
  background: #1e40af;
  color: #fff;
}

.sample-uiux .demo-button {
  border-color: #1e40af;
  background: #fff;
  color: #1e40af;
}

.sample-uiux .demo-button[aria-pressed="true"] {
  background: #1e40af;
  color: #fff;
}

.sample-uiux.sample-booking {
  background: #fdf2f8;
  color: #831843;
}

.sample-uiux.sample-booking .demo-top {
  background: #ec4899;
}

.sample-uiux.sample-booking .booking-calendar {
  background: #fbcfe8;
}

.sample-uiux.sample-portfolio {
  background: #fdf2f8;
  color: #831843;
}

.sample-uiux.sample-portfolio .portfolio-work {
  background: #0891b2;
  color: #831843;
}

.sample-uiux.sample-portfolio .work-block:nth-child(2),
.sample-uiux.sample-portfolio .work-block:nth-child(3) {
  background: #ec4899;
  color: #fff;
}

.sample-impeccable.demo-surface {
  background: #0d1a2b;
  color: #f4f1e8;
  font-family: var(--font-mono);
}

.sample-impeccable .demo-top {
  border-bottom: 4px solid #f0bd2f;
}

.sample-impeccable .demo-brand::before {
  margin-right: 8px;
  color: #f0bd2f;
  content: "●";
}

.sample-impeccable .demo-button {
  border-color: #f0bd2f;
  background: #f0bd2f;
  color: #0d1a2b;
}

.sample-impeccable .demo-kpis,
.sample-impeccable .demo-panel {
  border-color: #426181;
}

.sample-impeccable .demo-chart i:nth-child(odd) {
  color: #f0bd2f;
}

.sample-impeccable.sample-booking {
  background: #f2efe5;
  color: #23382e;
  font-family: var(--font-serif);
}

.sample-impeccable.sample-booking .demo-top {
  border-color: #a7462e;
  font-family: var(--font-ui);
}

.sample-impeccable.sample-booking .booking-copy {
  border-right: 1px solid #647467;
}

.sample-impeccable.sample-booking .booking-copy h3 {
  font-weight: 500;
}

.sample-impeccable.sample-booking .booking-calendar {
  background: #dbe2d5;
  font-family: var(--font-ui);
}

.sample-impeccable.sample-booking .demo-button {
  border-color: #23382e;
  background: transparent;
  color: #23382e;
}

.sample-impeccable.sample-booking .demo-button[aria-pressed="true"] {
  background: #a7462e;
  color: #fff;
}

.sample-impeccable.sample-portfolio {
  background: #ef3327;
  color: #111;
  font-family: var(--font-ui);
}

.sample-impeccable.sample-portfolio .portfolio-title {
  border-right: 7px solid #111;
}

.sample-impeccable.sample-portfolio .portfolio-title h3 {
  font-weight: 900;
  text-transform: uppercase;
}

.sample-impeccable.sample-portfolio .portfolio-work {
  background: #111;
}

.sample-impeccable.sample-portfolio .work-block {
  background: #f1e846;
  color: #111;
}

.sample-impeccable.sample-portfolio .work-block:nth-child(2),
.sample-impeccable.sample-portfolio .work-block:nth-child(3) {
  background: #fff;
}

.sample-anthropic.demo-surface {
  background: #f7f5ef;
  color: #162b3d;
}

.sample-anthropic .demo-top {
  border-bottom: 1px solid #162b3d;
}

.sample-anthropic .demo-brand {
  font-family: var(--font-serif);
  font-size: 18px;
}

.sample-anthropic .demo-button {
  border-color: #155eef;
  background: transparent;
  color: #155eef;
}

.sample-anthropic .demo-button[aria-pressed="true"] {
  background: #155eef;
  color: #fff;
}

.sample-anthropic .demo-kpis {
  position: relative;
  border: 0;
  border-top: 1px solid #162b3d;
  border-bottom: 1px solid #162b3d;
}

.sample-anthropic .demo-kpi {
  border-color: #162b3d;
}

.sample-anthropic.sample-booking {
  background: #f6f2e7;
  color: #4b321f;
}

.sample-anthropic.sample-booking .booking-copy {
  position: relative;
}

.sample-anthropic.sample-booking .booking-copy::after {
  position: absolute;
  right: -42px;
  bottom: 40px;
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border: 1px solid #bb3d2f;
  border-radius: 50%;
  color: #bb3d2f;
  content: "八月";
  font-family: var(--font-serif);
  font-size: 18px;
}

.sample-anthropic.sample-booking .booking-calendar {
  background: #e7ddca;
}

.sample-anthropic.sample-portfolio {
  background: #f5f4ef;
  color: #20252a;
}

.sample-anthropic.sample-portfolio .portfolio-title h3 {
  font-family: var(--font-serif);
  font-weight: 500;
}

.sample-anthropic.sample-portfolio .portfolio-work {
  transform: rotate(-1deg);
  background: #20252a;
}

.sample-anthropic.sample-portfolio .work-block {
  background: #d9e7ff;
}

.sample-anthropic.sample-portfolio .work-block:nth-child(2) { background: #f4c7b8; }
.sample-anthropic.sample-portfolio .work-block:nth-child(3) { background: #dbe8c1; }
.sample-anthropic.sample-portfolio .work-block:nth-child(4) { background: #f2e5a7; }

.sample-uiskills.demo-surface {
  background: #fff;
  color: #172033;
}

.sample-uiskills .demo-top {
  border-bottom: 1px solid #d9e0e8;
}

.sample-uiskills .demo-button {
  border-color: #155eef;
  border-radius: 7px;
  background: #fff;
  color: #155eef;
}

.sample-uiskills .demo-button[aria-pressed="true"] {
  background: #155eef;
  color: #fff;
}

.sample-uiskills .demo-kpis,
.sample-uiskills .demo-panel {
  border-color: #d9e0e8;
}

.sample-uiskills .demo-kpi,
.sample-uiskills .demo-list-row {
  border-color: #d9e0e8;
}

.sample-uiskills.sample-booking .booking-calendar {
  background: #f2f6fb;
}

.sample-uiskills.sample-portfolio .portfolio-work {
  gap: 10px;
  background: #fff;
  padding: 12px;
}

.sample-uiskills.sample-portfolio .work-block {
  border-color: #d9e0e8;
  border-radius: 8px;
  background: #f6f8fb;
}

.sample-superdesign.demo-surface {
  background: #fff;
  color: #000;
}

.sample-superdesign .demo-top {
  border-bottom: 1px solid #000;
}

.sample-superdesign .demo-button {
  border-color: #000;
  border-radius: 10px;
  background: #000;
  color: #fff;
}

.sample-superdesign .demo-kpis {
  gap: 10px;
  border: 0;
}

.sample-superdesign .demo-kpi,
.sample-superdesign .demo-panel {
  border: 1px solid #000;
  border-radius: 12px;
  box-shadow: 4px 4px 0 #000;
}

.sample-superdesign.sample-booking .booking-calendar {
  margin: 18px;
  border: 1px solid #000;
  border-radius: 16px;
  box-shadow: 6px 6px 0 #000;
}

.sample-superdesign.sample-portfolio .portfolio-work {
  gap: 12px;
  background: #fff;
  padding: 14px;
}

.sample-superdesign.sample-portfolio .work-block {
  border-radius: 14px;
  box-shadow: 4px 4px 0 #000;
}

.sample-superdesign.sample-portfolio .work-block:nth-child(2),
.sample-superdesign.sample-portfolio .work-block:nth-child(3) {
  background: #000;
  color: #fff;
}

.preview-frame[data-width="mobile"] .demo-top {
  align-items: flex-start;
  flex-direction: column;
  padding-block: 12px;
}

.preview-frame[data-width="mobile"] .demo-kpis,
.preview-frame[data-width="mobile"] .demo-grid,
.preview-frame[data-width="mobile"] .booking-hero,
.preview-frame[data-width="mobile"] .portfolio-hero {
  grid-template-columns: 1fr;
}

.preview-frame[data-width="mobile"] .demo-kpi {
  border-right: 0;
  border-bottom: 1px solid currentColor;
}

.preview-frame[data-width="mobile"] .demo-kpi:last-child {
  border-bottom: 0;
}

.preview-frame[data-width="mobile"] .sample-anthropic.sample-booking .booking-copy::after {
  display: none;
}

.evidence-section {
  border-top: 10px solid var(--bg-soft);
  padding-bottom: 54px;
}

.evidence-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.evidence-body {
  margin-top: 24px;
}

.evidence-body[hidden] {
  display: none;
}

.evidence-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 12px;
}

.evidence-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

.legend-dot.community { background: var(--amber); }
.legend-dot.analysis { background: var(--accent); }

.source-list {
  border-top: 1px solid var(--line-strong);
}

.source-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  padding: 12px 4px;
}

.source-type {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.source-type.fact { color: var(--mint); }
.source-type.community { color: var(--amber); }
.source-type.analysis { color: var(--accent); }

.source-item strong,
.source-item small {
  display: block;
}

.source-item strong {
  font-size: 13px;
}

.source-item small {
  color: var(--ink-faint);
  font-size: 11px;
}

.source-item a {
  font-size: 12px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.limits-note {
  margin-top: 20px;
  border-left: 3px solid var(--line-strong);
  padding: 4px 0 4px 16px;
}

.limits-note strong,
.limits-note p {
  display: block;
  margin: 0;
}

.limits-note p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 18px 32px;
  color: var(--ink-faint);
  font-size: 12px;
}

.footer p {
  margin: 0;
}

.footer div {
  display: flex;
  gap: 18px;
}

.dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgb(9 17 29 / 62%);
}

.dialog-wide {
  width: min(1060px, calc(100vw - 32px));
}

.preview-dialog {
  width: min(1220px, calc(100vw - 28px));
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}

.dialog-header h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.dialog-kicker {
  color: var(--accent);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px 22px;
}

.tour-dialog #tour-content,
#security-content,
.method-list,
#compare-dialog-content {
  padding: 24px;
}

.tour-illustration {
  display: grid;
  min-height: 180px;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 54px;
}

.tour-dialog h2 {
  margin: 0 0 6px;
}

.tour-dialog p {
  margin: 0;
  color: var(--ink-soft);
}

.security-summary {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: start;
}

.security-score {
  border: 1px solid var(--line);
  padding: 16px;
  text-align: center;
}

.security-score strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 34px;
}

.security-list,
.method-list {
  margin: 0;
}

.security-list li,
.method-list li {
  margin-bottom: 12px;
}

.method-list li {
  padding-left: 8px;
}

.method-list strong,
.method-list span {
  display: block;
}

.method-list span {
  color: var(--ink-soft);
  font-size: 13px;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.compare-card {
  min-width: 0;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 18px;
}

.compare-card h3 {
  margin: 0;
  font-size: 17px;
}

.compare-card dl {
  margin: 16px 0 0;
}

.compare-card dt {
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
}

.compare-card dd {
  margin: 2px 0 0;
  font-size: 12px;
}

.compare-remove {
  margin-top: 14px;
}

.expanded-preview {
  overflow: auto;
  background: #e9edf3;
  padding: 24px;
}

.expanded-preview .demo-surface {
  max-width: 1080px;
  margin: 0 auto;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--z-toast);
  max-width: min(420px, calc(100vw - 48px));
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1220px) {
  .recommendation-band {
    grid-template-columns: 90px 1fr 1.3fr 130px;
  }

  .caveat-block {
    grid-column: 2 / 4;
    border-left: 0;
    padding-left: 0;
  }

  .recommendation-band > .button {
    grid-column: 4;
    grid-row: 2;
  }

  .table-note {
    display: block;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topnav {
    order: 3;
    grid-column: 1 / -1;
    min-height: 50px;
    justify-content: center;
    border-top: 1px solid var(--line);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .progress-rail {
    position: relative;
    top: 0;
    z-index: 1;
    display: flex;
    height: auto;
    align-items: center;
    gap: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 24px;
  }

  .progress-rail ol {
    flex: 1;
    grid-template-columns: repeat(3, 1fr);
  }

  .progress-step {
    min-height: auto;
  }

  .progress-step:not(:last-child)::after,
  .progress-step small,
  .progress-meter .text-button {
    display: none;
  }

  .progress-meter {
    position: static;
    min-width: 124px;
  }

  .chooser-section,
  .comparison-section,
  .sample-studio,
  .evidence-section {
    padding: 36px 28px;
  }

  .choice-row {
    grid-template-columns: 1fr;
  }

  .choice-label {
    padding-bottom: 2px;
  }

  .recommendation-band {
    margin: 0 24px;
  }

  .studio-intro,
  .studio-layout {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .skill-selector {
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #skill-selector-list {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }

  .skill-select-button {
    flex: 0 0 180px;
    border-right: 1px solid var(--line);
  }

  .sample-disclosure {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 62px;
  }

  .brand {
    padding: 0 16px;
    font-size: 17px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .header-actions {
    padding: 0 12px;
  }

  .header-actions .button {
    width: 44px;
    overflow: hidden;
    padding: 0;
    white-space: nowrap;
    text-indent: 100px;
  }

  .header-actions .button svg {
    position: absolute;
  }

  .topnav {
    gap: 6px;
  }

  .progress-rail {
    padding: 12px 16px;
  }

  .progress-step {
    grid-template-columns: 24px 1fr;
    gap: 7px;
  }

  .progress-step strong {
    font-size: 11px;
    line-height: 1.3;
  }

  .step-number {
    width: 24px;
    height: 24px;
  }

  .progress-meter {
    display: none;
  }

  .chooser-section,
  .comparison-section,
  .sample-studio,
  .evidence-section {
    padding: 28px 18px;
  }

  .heading-with-action,
  .evidence-header,
  .preview-meta,
  .studio-toolbar,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .heading-with-action,
  .evidence-header,
  .footer {
    display: flex;
  }

  .choice-options {
    grid-template-columns: 1fr 1fr;
  }

  .choice-button {
    min-height: 52px;
    padding-right: 26px;
  }

  .chooser-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .choice-summary {
    text-align: center;
  }

  .recommendation-band {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 16px;
    margin: 0 12px;
  }

  .rank-block {
    grid-row: 1 / 3;
  }

  .reason-list,
  .confidence-block,
  .caveat-block,
  .recommendation-band > .button {
    grid-column: 1 / -1;
  }

  .recommendation-band > .button {
    grid-row: auto;
  }

  .caveat-block {
    border-left: 0;
  }

  .studio-intro {
    gap: 16px;
  }

  .studio-toolbar {
    display: flex;
    padding: 0 12px 10px;
  }

  .sample-tabs {
    overflow-x: auto;
    gap: 18px;
  }

  .sample-tab {
    flex: 0 0 auto;
  }

  .preview-actions {
    justify-content: flex-end;
  }

  .preview-frame {
    margin: 0 10px;
    padding: 8px;
  }

  .source-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 2px;
  }

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

  .security-summary {
    grid-template-columns: 1fr;
  }

  .booking-hero,
  .portfolio-hero,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .demo-kpis {
    grid-template-columns: 1fr;
  }

  .demo-kpi {
    border-right: 0;
    border-bottom: 1px solid currentColor;
  }

  .demo-kpi:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .topbar,
  .progress-rail,
  .chooser-actions,
  .preview-actions,
  .footer,
  dialog,
  .toast,
  .button,
  .icon-button,
  .text-button,
  .compare-toggle,
  .table-action {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .chooser-section,
  .comparison-section,
  .sample-studio,
  .evidence-section {
    padding: 20px 0;
  }

  .comparison-scroll {
    overflow: visible;
  }

  .comparison-table {
    min-width: 0;
    font-size: 9px;
  }
}
