:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5b6475;
  --line: #dfe3ea;
  --surface: #ffffff;
  --wash: #f6f7fa;
  --accent: #5b4df5;
  --accent-hover: #4638dc;
  --accent-soft: #efedff;
  --focus: #1167d8;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--wash);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 4%, rgba(91, 77, 245, 0.09), transparent 31rem),
    var(--wash);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 22px 0;
}

.site-header > a:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

main {
  width: min(100% - 32px, 760px);
  min-height: calc(100vh - 166px);
  margin: 0 auto;
}

.search-view {
  padding: clamp(64px, 12vh, 130px) 0 80px;
}

.search-intro {
  max-width: 670px;
  margin-bottom: 34px;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 7vw, 4.6rem);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.search-intro p,
.result-lede {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.55;
}

.search-form {
  position: relative;
}

.search-form label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.9rem;
  font-weight: 720;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input[type="search"] {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid #c9cfda;
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.05rem;
  box-shadow: 0 10px 35px rgba(23, 32, 51, 0.06);
}

input[type="search"]::placeholder {
  color: #8a91a0;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.search-row .btn {
  min-height: 58px;
}

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

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  border-color: #c7ccd6;
  background: var(--surface);
  color: var(--ink);
}

.status-line {
  min-height: 24px;
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.search-results {
  margin: 8px 0 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(23, 32, 51, 0.1);
  list-style: none;
}

.search-results button {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 13px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.search-results button:hover,
.search-results button:focus-visible {
  background: var(--accent-soft);
}

.search-results span {
  font-weight: 700;
}

.result-panel {
  padding: 54px 0 88px;
}

.journey,
.research-card,
.compact-state {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(23, 32, 51, 0.08);
}

.journey h1,
.research-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2.25rem, 7vw, 4.25rem);
}

.back-link {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.state-label {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.start-link {
  margin-top: 24px;
}

.journey section {
  margin-top: 46px;
}

.journey details {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.journey details:first-of-type {
  margin-top: 34px;
}

summary {
  font-weight: 750;
  cursor: pointer;
}

details > :last-child {
  margin-bottom: 0;
}

.steps {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: path;
}

.steps li {
  position: relative;
  min-height: 42px;
  margin: 0 0 18px;
  padding: 0 0 18px 48px;
  border-bottom: 1px solid var(--line);
  counter-increment: path;
}

.steps li:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.steps li::before {
  content: counter(path);
  position: absolute;
  top: -3px;
  left: 0;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 800;
}

.steps p {
  margin-bottom: 5px;
  font-weight: 680;
  line-height: 1.45;
}

.steps small,
.trust-note,
.success-signal {
  color: var(--muted);
  line-height: 1.5;
}

.trust-note {
  max-width: 560px;
  margin: 20px 0;
  font-size: 0.9rem;
}

.success-signal {
  margin: 15px 0 0;
}

.draft-notice {
  max-width: 560px;
  margin: 20px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--wash);
}

.draft-notice p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}


.source-list {
  padding-left: 20px;
}

.field-list,
.gate-list,
.review-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.gate-list li::marker {
  color: #c66b1f;
}

.review-list {
  max-width: 620px;
  margin-top: 18px;
}

.source-list li {
  margin: 10px 0;
}

.source-list a {
  color: var(--accent-hover);
}

.site-footer {
  display: flex;
  width: min(100% - 32px, 980px);
  align-items: center;
  gap: 18px;
  margin: 0 auto;
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a {
  color: inherit;
}

.complexity-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcff;
}

.complexity-panel h2 {
  margin-bottom: 8px;
  text-transform: capitalize;
}

.complexity-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.complexity-panel dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(56px, auto));
  gap: 10px;
  margin: 0;
}

.complexity-panel dl div {
  min-width: 56px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  text-align: center;
}

.complexity-panel dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.complexity-panel dd {
  margin: 2px 0 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.comparison-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.comparison-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.comparison-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

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

@media (max-width: 580px) {
  .site-header {
    padding-top: 16px;
  }

  .site-header > a:last-child {
    display: none;
  }

  .search-view {
    padding-top: 48px;
  }

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

  .search-row .btn {
    min-height: 52px;
  }

  .search-results button {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .result-panel {
    padding-top: 30px;
  }

  .journey,
  .research-card,
  .compact-state {
    padding: 24px 20px;
    border-radius: 14px;
  }

  .back-link {
    margin-bottom: 34px;
  }

  .complexity-panel {
    grid-template-columns: 1fr;
  }

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

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