:root {
  color-scheme: light;
  --bg: #f3f3f1;
  --surface: #ffffff;
  --surface-muted: #e9e9e6;
  --line: #b8b8b2;
  --line-strong: #686864;
  --text: #171715;
  --muted: #62625d;
  --soft: #85857f;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0;
}

body.design-info-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
.button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  text-decoration: none;
}

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

button:hover,
.button:hover {
  background: var(--surface-muted);
}

button.primary:hover,
.button.primary:hover {
  background: #33332f;
}

.prototype-notice {
  border-bottom: 1px solid var(--line-strong);
  background: #dededa;
  color: #373733;
  font-size: 13px;
  padding: 7px 20px;
  text-align: center;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner,
.page-shell,
.footer-inner {
  margin: 0 auto;
  max-width: var(--max);
  padding-left: 24px;
  padding-right: 24px;
}

.header-main {
  align-items: center;
  display: flex;
  min-height: 68px;
}

.brand {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 700;
  margin-right: 30px;
  text-decoration: none;
}

.brand small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

.main-nav {
  align-items: stretch;
  align-self: stretch;
  display: flex;
  flex: 1;
  gap: 2px;
}

.nav-item {
  align-items: stretch;
  display: flex;
  position: relative;
}

.nav-item > a,
.nav-item > button {
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  min-height: 68px;
  padding: 0 12px;
  text-decoration: none;
}

.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu {
  display: block;
}

.nav-menu {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: none;
  left: 0;
  margin-top: -1px;
  min-width: 250px;
  padding: 8px;
  position: absolute;
  top: 100%;
}

.nav-menu a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
}

.nav-menu a:hover {
  background: var(--surface-muted);
}

.header-action {
  margin-left: 14px;
  white-space: nowrap;
}

.design-info-button {
  border-radius: 50%;
  flex: 0 0 36px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  height: 36px;
  margin-left: 12px;
  min-height: 36px;
  padding: 0;
  width: 36px;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  padding: 18px 0 6px;
}

.breadcrumb a {
  text-decoration: none;
}

.page-shell {
  padding-bottom: 100px;
}

.hero,
.page-heading {
  border-bottom: 1px solid var(--line-strong);
  padding: 48px 0 42px;
}

.eyebrow,
.status,
.meta-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  font-size: 38px;
  line-height: 1.25;
  margin-bottom: 18px;
  max-width: 850px;
}

h2 {
  font-size: 25px;
  line-height: 1.35;
  margin-bottom: 16px;
}

h3 {
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.lede {
  color: #3f3f3a;
  font-size: 18px;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.public-evidence-note {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  max-width: 850px;
  padding-top: 14px;
}

.public-evidence-note strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.public-evidence-note p {
  color: var(--muted);
  margin: 0;
}

.content-section {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(210px, 0.75fr) minmax(0, 2.25fr);
  padding: 42px 0;
  scroll-margin-top: 90px;
}

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

.section-body {
  min-width: 0;
}

.section-body > :last-child {
  margin-bottom: 0;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 14px;
}

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

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

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

.panel,
.product-row,
.question-row,
.readiness-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}

.panel a,
.product-row a {
  font-weight: 600;
}

.placeholder {
  align-items: center;
  background: repeating-linear-gradient(-45deg, #ededeb, #ededeb 9px, #e3e3df 9px, #e3e3df 18px);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 180px;
  padding: 20px;
  text-align: center;
}

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

.tag,
.state-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  padding: 3px 9px;
}

.state-chip.confirmed {
  background: #deded9;
  border-color: #777770;
}

.state-chip.partial {
  background: #f2f2ef;
  border-style: dashed;
}

.state-chip.missing {
  background: #fff;
  border-color: #33332f;
}

.data-table {
  border-collapse: collapse;
  width: 100%;
}

.data-table th,
.data-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--surface-muted);
  font-size: 13px;
}

.data-table tbody tr:hover {
  background: #ededeb;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.table-scroll .data-table {
  min-width: 680px;
}

.simple-list {
  margin: 0;
  padding-left: 20px;
}

.simple-list li + li {
  margin-top: 7px;
}

.path-flow {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.path-step {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 110px;
  padding: 15px;
  position: relative;
}

.path-step:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -9px;
  top: 40%;
  z-index: 2;
}

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

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.field input,
.field select,
.field textarea {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  min-height: 42px;
  padding: 9px 10px;
  width: 100%;
}

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

.optional-requirements {
  border: 1px solid var(--line-strong);
}

.optional-requirements > summary {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style-position: inside;
  padding: 16px;
}

.optional-requirements > summary span {
  color: var(--muted);
  font-size: 13px;
  padding-left: 20px;
}

.optional-requirements[open] > summary {
  border-bottom: 1px solid var(--line);
}

.optional-group {
  padding: 20px 16px;
}

.optional-group + .optional-group {
  border-top: 1px solid var(--line);
}

.review-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 32px 0 16px;
}

.review-toolbar h1 {
  margin: 0;
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.map-controls input,
.map-controls select {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  min-height: 40px;
  padding: 7px 10px;
}

.map-controls input {
  min-width: 280px;
}

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

.readiness-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 28px;
}

.readiness-summary .panel strong {
  display: block;
  font-size: 28px;
}

.readiness-list {
  display: grid;
  gap: 12px;
}

.readiness-card {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1.4fr 0.7fr;
}

.readiness-card p {
  margin-bottom: 5px;
}

.site-footer {
  background: #dededa;
  border-top: 1px solid var(--line-strong);
  padding: 36px 0 80px;
}

.footer-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.2fr repeat(3, 1fr);
}

.footer-links a {
  display: block;
  margin: 6px 0;
  text-decoration: none;
}

.prototype-switcher {
  align-items: center;
  background: #181816;
  border: 1px solid #fff;
  border-radius: 6px;
  bottom: 16px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
  color: #fff;
  display: flex;
  gap: 8px;
  left: 50%;
  padding: 6px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 40;
}

.back-to-top {
  bottom: 18px;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 18px;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 39;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.design-info-overlay {
  background: rgba(23, 23, 21, 0.22);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 160ms ease;
  z-index: 55;
}

.design-info-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.design-info-drawer {
  background: var(--surface);
  border-left: 1px solid var(--line-strong);
  bottom: 0;
  max-width: 100%;
  overflow-y: auto;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(100%);
  transition: transform 180ms ease;
  width: 440px;
  z-index: 56;
}

.design-info-drawer.open {
  transform: translateX(0);
}

.design-info-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
}

.design-info-head h2 {
  margin: 4px 0 0;
}

.design-info-head button {
  font-size: 18px;
  min-height: 36px;
  min-width: 36px;
  padding: 0;
}

.design-info-body {
  padding: 10px 0 24px;
}

.design-info-row,
.design-info-sections {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.design-info-row p,
.design-section-note p {
  margin: 4px 0 0;
}

.design-section-note {
  padding-top: 14px;
}

.prototype-switcher button {
  background: #181816;
  border-color: #777;
  color: #fff;
  min-height: 34px;
  min-width: 38px;
  padding: 4px 10px;
}

.switcher-label {
  min-width: 210px;
  text-align: center;
}

.empty-state {
  background: #fff;
  border: 1px dashed var(--line-strong);
  margin: 48px 0;
  padding: 40px;
  text-align: center;
}

@media (max-width: 900px) {
  .main-nav,
  .header-action {
    display: none;
  }

  .design-info-button {
    margin-left: auto;
    margin-right: 8px;
  }

  .main-nav.open {
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: block;
    left: 0;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    padding: 8px 16px 90px;
    position: absolute;
    right: 0;
    top: 68px;
  }

  .main-nav.open .nav-item {
    display: block;
  }

  .main-nav.open .nav-item > a,
  .main-nav.open .nav-item > button {
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 8px;
    width: 100%;
  }

  .main-nav.open .nav-menu {
    border: 0;
    display: block;
    padding: 0 0 8px 18px;
    position: static;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .grid-3,
  .path-flow,
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .path-step:not(:last-child)::after {
    display: none;
  }

  .readiness-card {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .page-shell,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 30px;
  }

  .hero,
  .page-heading {
    padding: 34px 0 30px;
  }

  .content-section {
    gap: 14px;
    grid-template-columns: 1fr;
    padding: 32px 0;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid,
  .readiness-summary,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .path-flow {
    grid-template-columns: 1fr;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .readiness-card {
    grid-template-columns: 1fr;
  }

  .review-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-controls input,
  .map-controls select {
    min-width: 100%;
    width: 100%;
  }

  .prototype-switcher {
    bottom: 8px;
    width: calc(100% - 16px);
  }

  .back-to-top {
    bottom: 62px;
    right: 8px;
  }

  .switcher-label {
    flex: 1;
    min-width: 0;
  }
}
