:root {
  --ink: var(--family-navy, #102a43);
  --text: var(--family-ink, #1f2933);
  --muted: var(--family-muted, #52697d);
  --paper: var(--family-warm-paper, #f3efe5);
  --cream: #fffaf0;
  --white: var(--family-white, #ffffff);
  --teal: var(--family-teal, #06717c);
  --teal-bright: var(--family-teal-bright, #2f9e9e);
  --coral: var(--family-coral, #d25f2a);
  --line: rgba(16, 42, 67, 0.18);
  color: var(--text);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 85% 7%, rgba(47, 158, 158, 0.12), transparent 28rem),
    var(--paper);
}

a {
  color: inherit;
}

.site-header {
  min-height: 82px;
  padding: 14px max(5vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 239, 229, 0.94);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 600 22px Newsreader, Georgia, serif;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand i {
  font-style: normal;
  color: var(--teal);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.site-header nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--teal);
}

.hero {
  min-height: 660px;
  padding: 90px max(7vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  gap: 8vw;
  align-items: center;
}

.eyebrow {
  font: 600 12px DM Mono, ui-monospace, monospace;
  letter-spacing: 0.14em;
  color: var(--teal);
}

h1,
h2 {
  font-family: Newsreader, Georgia, serif;
  color: var(--ink);
  margin: 0.2em 0;
  line-height: 0.98;
}

h1 {
  font-size: clamp(58px, 7vw, 104px);
  max-width: 900px;
}

h1 span {
  display: block;
  color: var(--teal);
}

h2 {
  font-size: clamp(42px, 5vw, 70px);
}

.lede {
  font-size: 19px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 680px;
}

.hero-actions,
.key-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  display: inline-flex;
  border: 1px solid var(--ink);
  padding: 13px 19px;
  text-decoration: none;
  font: 650 13px Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.button.primary {
  background: var(--ink);
  color: var(--white);
}

.button.ghost,
.button.inverse {
  background: transparent;
  color: var(--ink);
  border-color: rgba(16, 42, 67, 0.46);
}

.button.danger {
  background: transparent;
  color: #a43e24;
  border-color: rgba(164, 62, 36, 0.55);
}

.button:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

.button.primary:hover:not(:disabled) {
  background: var(--teal);
  color: var(--white);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.evidence-card {
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 18px 18px 0 rgba(16, 42, 67, 0.08);
  padding: 26px;
  transform: rotate(1.2deg);
}

.card-top,
.card-result {
  display: flex;
  justify-content: space-between;
  font: 11px DM Mono, ui-monospace, monospace;
}

.card-top i,
.card-result span {
  color: var(--teal);
  font-weight: 700;
}

.claim {
  border-block: 1px solid var(--line);
  margin: 22px 0;
  padding: 22px 0;
}

.claim small,
.claim p {
  font-family: DM Mono, ui-monospace, monospace;
}

.claim p {
  font-size: 18px;
}

.path {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.path div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.path b {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font: 10px DM Mono, ui-monospace, monospace;
}

.path span {
  font-weight: 700;
  font-size: 12px;
}

.path small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

.path em {
  height: 1px;
  flex: 1;
  background: var(--coral);
  margin: 0 8px;
}

.card-result {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.experiment {
  margin: 0 max(5vw, 24px);
  padding: 18px 24px;
  background: var(--ink);
  color: var(--white);
  display: flex;
  gap: 25px;
  align-items: center;
  font-size: 13px;
}

.experiment strong {
  color: #ffd4c9;
  white-space: nowrap;
}

.explanation,
.workbench-invitation,
.workbench {
  padding: 100px max(7vw, 28px);
}

.explanation > h2,
.workbench-invitation h2 {
  max-width: 850px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 55px;
  border: 1px solid var(--line);
}

.principles article {
  background: var(--paper);
  padding: 35px;
}

.principles article > span {
  font: 12px DM Mono, ui-monospace, monospace;
  color: var(--coral);
}

.principles h3,
.tool-intro h3,
.wizard-step h4,
.subtool h4 {
  font-family: Newsreader, Georgia, serif;
  color: var(--ink);
}

.principles h3 {
  font-size: 23px;
}

.principles p,
.workbench-invitation > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.workbench-invitation {
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.workbench-invitation > p:not(.eyebrow) {
  max-width: 700px;
  font-size: 18px;
}

.workbench-page {
  min-height: calc(100vh - 150px);
}

.workbench {
  color: var(--text);
}

.section-heading {
  max-width: 1160px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.section-heading h1 {
  font-size: clamp(44px, 6vw, 76px);
}

.section-heading > p {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.65;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  max-width: 1160px;
  margin: 48px auto 0;
  border: 1px solid var(--line);
  background: var(--cream);
  min-height: 520px;
  box-shadow: 12px 12px 0 rgba(16, 42, 67, 0.06);
}

.tool-nav {
  padding: 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.tool-nav a {
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  align-items: center;
  border-left: 3px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.tool-nav a:hover {
  color: var(--teal);
  background: rgba(6, 113, 124, 0.06);
}

.tool-nav a.active,
.tool-nav a[aria-current="page"] {
  border-left-color: var(--teal);
  background: rgba(6, 113, 124, 0.1);
  color: var(--ink);
}

.tool-panel {
  padding: 38px;
  max-width: 900px;
  min-width: 0;
}

.tool-intro {
  margin-bottom: 28px;
}

.tool-intro h3 {
  font-size: 30px;
  margin: 0;
}

.tool-intro p,
.wizard-step p,
.vault-warning p {
  color: var(--muted);
  line-height: 1.6;
}

.tool-panel label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font: 600 12px DM Mono, ui-monospace, monospace;
}

.tool-panel textarea,
.tool-panel input {
  width: 100%;
  background: var(--white);
  border: 1px solid rgba(16, 42, 67, 0.28);
  color: var(--text);
  padding: 14px;
  font: 13px DM Mono, ui-monospace, monospace;
  min-width: 0;
}

.tool-panel textarea {
  min-height: 160px;
  resize: vertical;
}

.tool-panel textarea.phrase {
  min-height: 90px;
}

.tool-panel textarea.operation {
  min-height: 220px;
}

.tool-panel pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #071728;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px;
  color: #c9f3f0;
  min-height: 90px;
  font: 12px/1.65 DM Mono, ui-monospace, monospace;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.vault-warning {
  border: 1px solid rgba(210, 95, 42, 0.45);
  border-left: 4px solid var(--coral);
  background: rgba(210, 95, 42, 0.07);
  padding: 18px;
  margin-bottom: 22px;
}

.vault-warning strong,
.wizard-step small {
  color: #a43e24;
}

.vault-warning p {
  margin-bottom: 0;
}

.vault-status,
.operation-help {
  color: var(--muted);
  font: 12px/1.6 DM Mono, ui-monospace, monospace;
}

.subtool {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}

.subtool h4 {
  font-size: 19px;
}

.subtool .button {
  margin-top: 14px;
}

.onboarding {
  max-width: 860px;
}

.wizard-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.wizard-step > b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--teal);
  border-radius: 50%;
  color: var(--teal);
  font: 700 13px DM Mono, ui-monospace, monospace;
}

.wizard-step h4 {
  font-size: 22px;
  margin: 4px 0;
}

.wizard-step textarea,
.wizard-step label {
  margin-top: 14px;
}

.wizard-step small {
  display: block;
  margin-top: 8px;
  font: 12px DM Mono, ui-monospace, monospace;
}

.wizard-step small.valid {
  color: var(--teal);
}

.check {
  display: flex !important;
  align-items: start;
  gap: 10px;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5;
}

.check input {
  width: 20px;
  min-width: 20px;
  height: 20px;
}

.kind-options {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.kind-options button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(16, 42, 67, 0.3);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.kind-options button.active {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.coming-soon {
  border-left: 3px solid var(--coral);
  background: rgba(210, 95, 42, 0.07);
  padding: 25px;
}

.coming-soon span {
  color: #a43e24;
  font: 700 11px DM Mono, ui-monospace, monospace;
}

.not-found {
  min-height: 70vh;
  padding: 100px max(7vw, 28px);
}

.not-found h1 {
  font-size: clamp(48px, 7vw, 82px);
}

footer {
  padding: 28px max(5vw, 24px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 11px DM Mono, ui-monospace, monospace;
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 60px;
  }

  .evidence-card {
    transform: none;
  }

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

  .section-heading {
    display: block;
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .experiment {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .site-header {
    min-height: 68px;
    padding-inline: 16px;
  }

  .brand {
    font-size: 19px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .site-header nav {
    gap: 12px;
  }

  .site-header nav a:first-child {
    display: none;
  }

  h1 {
    font-size: clamp(43px, 14vw, 52px);
  }

  h2 {
    font-size: clamp(38px, 12vw, 48px);
  }

  .hero {
    min-height: auto;
    padding-inline: 20px;
    padding-block: 48px 64px;
    gap: 54px;
  }

  .lede {
    font-size: 17px;
    line-height: 1.55;
  }

  .evidence-card {
    padding: 20px;
    box-shadow: 10px 10px 0 rgba(16, 42, 67, 0.08);
  }

  .experiment {
    margin-inline: 16px;
    padding: 16px;
  }

  .explanation,
  .workbench-invitation,
  .workbench {
    padding: 64px 16px;
  }

  .principles {
    margin-top: 36px;
  }

  .principles article {
    padding: 26px 22px;
  }

  .tool-layout {
    margin-top: 32px;
    width: 100%;
    min-width: 0;
    box-shadow: 6px 6px 0 rgba(16, 42, 67, 0.06);
  }

  .tool-nav {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .tool-nav a {
    min-height: 44px;
    padding: 11px 12px;
  }

  .path span {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .tool-panel {
    padding: 26px 18px;
    overflow: hidden;
  }

  .tool-intro h3 {
    font-size: 26px;
  }

  .tool-panel pre {
    padding: 14px;
    max-width: 100%;
    overflow-x: auto;
  }

  .tool-panel textarea,
  .tool-panel input {
    font-size: 16px;
  }

  .wizard-step {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding-block: 20px;
  }

  .wizard-step > b {
    width: 32px;
    height: 32px;
  }

  .wizard-step h4 {
    font-size: 20px;
  }

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

  .kind-options button {
    text-align: left;
  }

  footer {
    padding-inline: 16px;
    flex-direction: column;
  }
}
