:root {
  --bg: #f6efe2;
  --bg-strong: #ead8bb;
  --surface: rgba(255, 250, 243, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --stroke: rgba(19, 42, 51, 0.12);
  --ink: #132a33;
  --muted: #53666d;
  --accent: #0d7772;
  --accent-2: #dd7b2b;
  --danger: #c44b43;
  --ok: #2f7a45;
  --warning: #a86b1f;
  --shadow: 0 24px 70px rgba(19, 42, 51, 0.11);
  --radius: 26px;
  --radius-sm: 18px;
  --font-head: "Segoe UI Variable Display", "Bahnschrift", "Trebuchet MS", sans-serif;
  --font-body: "Segoe UI Variable Text", "Aptos", "Lucida Sans Unicode", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(221, 123, 43, 0.16), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(13, 119, 114, 0.18), transparent 28%),
    linear-gradient(180deg, #f7f1e6 0%, #f4ece0 45%, #efe5d5 100%);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
}

a {
  color: inherit;
}

.backdrop {
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.45;
}

.backdrop-a {
  width: 18rem;
  height: 18rem;
  top: 6rem;
  right: 4rem;
  background: rgba(13, 119, 114, 0.2);
}

.backdrop-b {
  width: 20rem;
  height: 20rem;
  bottom: 5rem;
  left: 2rem;
  background: rgba(221, 123, 43, 0.18);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  backdrop-filter: blur(18px);
  background: rgba(246, 239, 226, 0.72);
  border-bottom: 1px solid rgba(19, 42, 51, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand small {
  display: block;
  color: var(--muted);
}

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--accent), #0f4c5c);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.top-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.layout {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero,
.architecture,
.panel {
  margin-bottom: 1.5rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 1.25rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.card,
.panel {
  border-radius: var(--radius);
}

.hero-copy {
  padding: 2.3rem;
}

.hero-panel {
  padding: 1.4rem;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-head);
}

h1 {
  font-size: clamp(2.4rem, 4.8vw, 4.8rem);
  line-height: 0.96;
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.3rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.08rem;
}

.hero-text,
.section-copy,
.session-description,
.hero-note,
.subtle,
label,
input,
select,
button,
th,
td,
li,
p {
  line-height: 1.55;
}

.hero-text,
.section-copy,
.session-description,
.hero-note,
.subtle {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.4rem 0 1rem;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.15rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), #0d4e61);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(19, 42, 51, 0.12);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 1rem;
}

.panel {
  padding: 1.35rem;
}

.card-grid,
.dashboard-grid,
.privacy-grid,
.detail-grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.span-2 {
  grid-column: span 2;
}

.card {
  padding: 1.15rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.metric {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid rgba(19, 42, 51, 0.08);
}

.metric strong {
  display: block;
  font-size: 1.8rem;
  font-family: var(--font-head);
}

.metric span {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric small {
  display: block;
  margin-top: 0.35rem;
}

.architecture-card {
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.signal-list,
.event-list {
  margin: 0;
  padding-left: 1rem;
}

.signal-list li,
.event-list li {
  margin-top: 0.45rem;
}

.sim-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
}

.simulation-lab {
  margin-bottom: 1rem;
}

.simulation-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.compact-field {
  min-width: 8rem;
}

.compact-field select {
  min-width: 7.5rem;
}

.simulation-banner {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(13, 119, 114, 0.12), rgba(221, 123, 43, 0.12));
  border: 1px solid rgba(19, 42, 51, 0.08);
}

.simulation-banner strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.simulation-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  margin-top: 1rem;
}

.simulation-panel {
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(19, 42, 51, 0.08);
}

.simulation-steps,
.simulation-live-log {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.simulation-step {
  border-radius: 20px;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(19, 42, 51, 0.08);
  background: rgba(255, 255, 255, 0.78);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.simulation-step .stack-label {
  align-items: center;
  margin-bottom: 0.35rem;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.simulation-step p {
  margin: 0.25rem 0 0;
}

.simulation-step small {
  color: var(--muted);
}

.simulation-step.active {
  transform: translateY(-1px);
  border-color: rgba(13, 119, 114, 0.4);
  background: rgba(13, 119, 114, 0.09);
}

.simulation-step.completed {
  border-color: rgba(47, 122, 69, 0.24);
}

.simulation-step.blocked {
  border-color: rgba(196, 75, 67, 0.3);
  background: rgba(196, 75, 67, 0.08);
}

.simulation-step.challenge {
  border-color: rgba(168, 107, 31, 0.3);
  background: rgba(168, 107, 31, 0.08);
}

.simulation-step.skipped {
  opacity: 0.75;
}

.step-index {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  font-size: 0.78rem;
  background: rgba(19, 42, 51, 0.08);
}

.log-entry {
  border-radius: 18px;
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(19, 42, 51, 0.08);
}

.log-entry strong {
  display: block;
  margin-bottom: 0.18rem;
}

.log-entry small {
  color: var(--muted);
  display: block;
  margin-top: 0.25rem;
}

.persona-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.persona-button {
  text-align: left;
  border-radius: 22px;
  border: 1px solid rgba(19, 42, 51, 0.12);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.persona-button.active {
  border-color: rgba(13, 119, 114, 0.55);
  background: rgba(13, 119, 114, 0.08);
  box-shadow: inset 0 0 0 1px rgba(13, 119, 114, 0.22);
}

.persona-button small {
  color: var(--muted);
  display: block;
  margin-top: 0.25rem;
}

.session-summary {
  margin-bottom: 1rem;
}

.session-header,
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.8rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(19, 42, 51, 0.12);
  font-size: 0.82rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(19, 42, 51, 0.06);
  font-size: 0.8rem;
}

.badge.high,
.pill.high {
  color: var(--danger);
}

.badge.medium,
.pill.medium {
  color: var(--warning);
}

.badge.low,
.pill.low {
  color: var(--ok);
}

.layer-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.layer-card {
  border-radius: 22px;
  padding: 0.95rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(19, 42, 51, 0.08);
}

.score-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.6rem 0;
}

.score-bar {
  flex: 1;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(19, 42, 51, 0.08);
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.trace-box,
.chart-box,
.stack-chart {
  min-height: 220px;
}

.trace-box svg,
.chart-box svg {
  width: 100%;
  height: auto;
}

.decision-log {
  display: grid;
  gap: 0.7rem;
}

.decision-item {
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(19, 42, 51, 0.08);
}

.stack-item,
.cluster-card {
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(19, 42, 51, 0.08);
}

.stack-item + .stack-item {
  margin-top: 0.55rem;
}

.stack-label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.stack-track {
  height: 0.72rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(19, 42, 51, 0.08);
}

.stack-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.cluster-grid,
.source-grid {
  display: grid;
  gap: 0.85rem;
}

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

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

.source-card a,
.docs-links a {
  color: var(--accent);
  text-decoration: none;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1rem 0 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.field {
  margin-top: 0.9rem;
}

input,
select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(19, 42, 51, 0.14);
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
}

.search-field {
  min-width: 18rem;
  flex: 1;
}

.table-wrap {
  overflow: auto;
}

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

thead th {
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 0 0.75rem;
}

tbody td {
  padding: 0.9rem 0;
  border-top: 1px solid rgba(19, 42, 51, 0.08);
  vertical-align: top;
}

.row-action {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.sample-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.sample-button {
  border-radius: 999px;
  border: 1px solid rgba(19, 42, 51, 0.12);
  background: rgba(255, 255, 255, 0.84);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}

.privacy-result {
  display: grid;
  gap: 0.8rem;
}

.privacy-stat {
  padding: 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(19, 42, 51, 0.08);
}

.docs-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

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

@media (max-width: 1080px) {
  .hero,
  .sim-grid,
  .simulation-columns,
  .privacy-grid,
  .detail-grid,
  .source-grid,
  .card-grid,
  .dashboard-grid,
  .cluster-grid {
    grid-template-columns: 1fr;
  }

  .layer-breakdown,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0.9rem 1rem;
    align-items: start;
    flex-direction: column;
  }

  .layout {
    width: min(100% - 1rem, 1240px);
    padding-top: 1rem;
  }

  .hero-copy,
  .hero-panel,
  .panel,
  .card {
    padding: 1rem;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .top-nav {
    gap: 0.7rem;
  }

  .docs-links {
    flex-direction: column;
  }
}
