:root {
  --page: #f7f4ec;
  --surface: #fffdf8;
  --surface-muted: #f0ead9;
  --text: #1d1a14;
  --muted: #6f6656;
  --line: #e3dcc8;
  --accent: #0f6e63;
  --accent-dark: #0a4640;
  --accent-soft: #e3efec;
  --accent-warm: #a1660d;
  --danger: #9a3a34;
  --code-bg: #18140f;
  --code-text: #efe8d8;
  --shadow: 0 1px 2px rgba(29, 26, 20, 0.04), 0 12px 28px -18px rgba(29, 26, 20, 0.22);
  --shadow-hover: 0 2px 4px rgba(29, 26, 20, 0.05), 0 20px 36px -18px rgba(29, 26, 20, 0.28);
  --font-serif: ui-serif, "New York", Georgia, Cambria, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, ui-sans-serif,
    system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(1200px 480px at 88% -10%, rgba(15, 110, 99, 0.07), transparent 60%),
    var(--page);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

::selection {
  background: rgba(15, 110, 99, 0.22);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px max(20px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 236, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 7px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 13px 7px 11px;
  background: var(--surface);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-warm);
}

main {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 8px 0 64px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-warm);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 2rem + 2.6vw, 4.2rem);
  line-height: 1.04;
}

h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.25;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

p {
  letter-spacing: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 48px;
  padding: 52px 0 40px;
  border-bottom: 1px solid var(--line);
}

.lede {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  border-radius: 9px;
  padding: 0 20px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  border: 1px solid var(--accent-dark);
  background: var(--accent-dark);
  color: #fff8ec;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-dark);
  background: var(--surface);
  transform: translateY(-1px);
}

.hero-visual {
  position: relative;
  height: 260px;
}

.id-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.id-card-back {
  top: 6px;
  left: 24px;
  width: min(360px, calc(100% - 24px));
  opacity: 0.72;
  transform: rotate(-4deg);
}

.id-card-front {
  top: 78px;
  left: 0;
  transform: rotate(2.5deg);
}

.id-dot {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
}

.id-dot[data-tone="live"] {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.id-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.id-text strong {
  font-size: 0.95rem;
}

.id-text code {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.id-badge {
  margin-left: auto;
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.metrics,
.demo-layout,
.surface-grid {
  display: grid;
  gap: 14px;
}

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

.metrics div,
.panel,
.surface-card,
.timeline-item,
.notice {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.metrics div {
  padding: 18px 20px;
}

.metrics span,
label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metrics strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.35;
}

.demo-layout {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: stretch;
  margin: 30px 0;
}

.panel {
  padding: 24px;
  box-shadow: var(--shadow);
}

.section {
  margin-top: 44px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.index {
  flex: none;
  padding-top: 2px;
  color: var(--line);
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

select,
button {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

select {
  padding: 0 12px;
  color: var(--text);
  background: var(--surface);
}

button {
  margin-top: 4px;
  padding: 0 16px;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff8ec;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

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

button:focus-visible,
select:focus-visible,
a:focus-visible,
pre:focus-visible {
  outline: 3px solid rgba(15, 110, 99, 0.28);
  outline-offset: 2px;
}

.policy {
  min-height: 76px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.output-panel {
  min-width: 0;
}

pre {
  min-height: 304px;
  max-height: 420px;
  margin: 0;
  overflow: auto;
  border-radius: 9px;
  padding: 18px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

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

.surface-card,
.timeline-item {
  padding: 20px;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.surface-card:hover,
.timeline-item:hover {
  border-color: transparent;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.surface-card p,
.timeline-item p,
.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.62;
}

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

.period {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin-bottom: 12px;
  border-radius: 20px;
  padding: 3px 11px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

tbody tr:last-child td {
  border-bottom: 0;
}

code {
  border-radius: 6px;
  padding: 2px 5px;
  background: var(--surface-muted);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.notice {
  margin-top: 44px;
  padding: 24px;
  border-color: rgba(154, 58, 52, 0.25);
  background: linear-gradient(180deg, rgba(154, 58, 52, 0.05), var(--surface) 60%);
}

.notice h2 {
  margin-bottom: 10px;
  color: var(--danger);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer-meta span:first-child {
  font-family: var(--font-serif);
  color: var(--text);
  font-weight: 600;
}

.site-footer-credit {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-footer-credit:hover {
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}

@media (max-width: 900px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .nav {
    justify-content: start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .hero-visual {
    height: 220px;
    max-width: 420px;
  }

  .metrics,
  .demo-layout,
  .surface-grid,
  .timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100vw - 24px, 1160px);
    padding-top: 4px;
  }

  .topbar {
    padding: 14px;
  }

  .nav a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hero {
    padding-top: 28px;
  }

  .lede {
    font-size: 1rem;
  }

  .hero-visual {
    height: 200px;
  }

  .id-card {
    padding: 14px 16px;
  }

  .panel,
  .notice {
    padding: 18px;
  }

  .site-footer {
    padding: 22px 0 32px;
  }
}
