@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT,WONK@0,9..144,300..900,0..100,0..1;1,9..144,300..900,0..100,0..1&family=Crimson+Pro:ital,wght@0,300..900;1,300..900&family=IBM+Plex+Mono:ital,wght@0,400;0,500;1,400&display=swap");

:root {
  --paper: #f4ede0;
  --paper-deep: #ece3d1;
  --ink: #1b1914;
  --ink-soft: #3a352c;
  --tan: #a08f72;
  --tan-soft: #c9bda4;
  --ox: #7d2b1e;
  --ox-deep: #5a1f16;
  --rule: #1b1914;
  --max: 1180px;
  --serif-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --serif-body: "Crimson Pro", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--serif-body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 55% at 15% 0%, rgba(125, 43, 30, 0.05), transparent 60%),
    radial-gradient(ellipse 60% 45% at 100% 100%, rgba(26, 25, 20, 0.06), transparent 60%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11  0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0.28 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.55;
}

body > * {
  position: relative;
  z-index: 2;
}

::selection {
  background: var(--ox);
  color: var(--paper);
}

a {
  color: var(--ox);
  text-decoration: none;
  background-image: linear-gradient(var(--ox), var(--ox));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 92%;
  transition: background-size 0.25s ease, color 0.2s ease, transform 0.15s ease;
}

a:hover {
  color: var(--ox-deep);
  background-size: 100% 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ox);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

main,
footer,
header {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  padding-top: 1rem;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 0;
}

.brand {
  display: block;
  padding: 1.35rem 0 1rem;
  border-top: 3px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background-image: none;
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: clamp(2.35rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.site-header nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
}

.site-header nav {
  padding: 0.8rem 0 0.95rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-header nav a {
  background-image: none;
  color: var(--ink);
}

.site-header nav a:hover {
  color: var(--ox);
}

main {
  padding-bottom: 1rem;
}

section {
  padding: 1.35rem 0;
}

.hero {
  padding: 2rem 0 1.3rem;
}

.hero-card {
  padding: 0 0 1.35rem;
  border-bottom: 1px solid var(--rule);
}

.hero-card,
.content-card,
.tool-card,
.result-card,
.faq-item,
.callout,
.link-card {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.hero-card {
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.hero-card h1,
.section-title,
.content-card h2,
.content-card h3,
.link-card h3,
.faq-item h3,
.legal h2,
.legal h3,
figure figcaption {
  margin: 0 0 0.75rem;
  font-family: var(--serif-display);
  font-variation-settings: "opsz" 144, "SOFT" 35, "WONK" 0;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--ink);
}

.hero-card h1 {
  font-size: clamp(2.3rem, 5.3vw, 4.4rem);
}

.hero-card p.lead,
.section-intro,
.content-card p,
.faq-item p,
.legal p,
.legal li,
.card-list li,
.step-list li,
.feature-list li,
.link-card p,
.helper,
.muted {
  color: var(--ink-soft);
}

.hero-card p.lead {
  margin: 0;
  max-width: 42ch;
  font-size: 1.16rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding-top: 0.55rem;
  border-top: 2px solid var(--rule);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif-display);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1;
}

.section-heading h2 em {
  font-style: italic;
  color: var(--ox);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.section-heading .rule {
  border-top: 1px solid var(--rule);
  align-self: center;
  height: 1px;
}

.section-heading .chapter {
  color: var(--ink-soft);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.tool-card,
.content-card,
.link-card,
.result-card,
.faq-item {
  padding: 1.3rem 1.45rem;
}

.tool-card {
  padding: 0;
  background: var(--paper-deep);
}

.tool-layout {
  display: grid;
  gap: 0;
}

.tool-layout.split {
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr);
}

.tool-layout.split > :first-child {
  padding: 1.5rem 1.6rem;
  border-right: 1px solid var(--rule);
}

.tool-layout.split > :last-child,
.tool-layout.compact > :first-child,
.tool-layout.stacked > :first-child {
  padding: 1.5rem 1.6rem;
}

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

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-top: 0.9rem;
}

label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

input,
select,
textarea,
button {
  width: 100%;
  font: inherit;
}

input,
select,
textarea {
  color: var(--ink);
  background-color: transparent;
  border: 1px solid rgba(27, 25, 20, 0.14);
  border-radius: 0;
  padding: 0.8rem 0.9rem;
}

textarea {
  min-height: 180px;
  resize: vertical;
  font-family: var(--serif-body);
  font-size: 1.08rem;
  line-height: 2rem;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(2rem - 1px),
    rgba(27, 25, 20, 0.12) calc(2rem - 1px),
    rgba(27, 25, 20, 0.12) 2rem
  );
  background-position: 0 0.55rem;
}

textarea::placeholder,
input::placeholder {
  color: var(--tan);
  font-style: italic;
}

button,
.button-link {
  cursor: pointer;
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-image: none;
}

button:hover,
.button-link:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.button-row > * {
  flex: 1 1 180px;
}

.button-row button:last-child {
  background: var(--ox);
  border-color: var(--ox);
  color: var(--paper);
}

.button-row button:last-child:hover {
  background: var(--ox-deep);
  border-color: var(--ox-deep);
}

.button-link.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.stat-grid,
.preview-grid {
  display: flex;
  flex-direction: column;
}

.stat {
  padding: 0.65rem 0;
  border-bottom: 1px dotted rgba(27, 25, 20, 0.25);
}

.stat:last-child {
  border-bottom: 0;
}

.stat:first-child {
  padding-top: 0;
  padding-bottom: 1rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(27, 25, 20, 0.35);
}

.stat h3,
.result-card h3,
.faq-item h3,
figure figcaption {
  margin-bottom: 0.35rem;
}

.stat h3,
.result-card h3 {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.stat p,
.result-card p,
.result-line {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif-display);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.stat:first-child p {
  font-size: clamp(3.8rem, 9vw, 6.2rem);
  font-weight: 300;
  line-height: 0.9;
}

.result-card {
  padding: 1rem 1.15rem;
}

.centered {
  display: grid;
  place-items: center;
  min-height: 280px;
}

.qr-output {
  min-width: 256px;
  min-height: 256px;
  display: grid;
  place-items: center;
}

.file-list {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
}

.feature-list,
.link-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card-list,
.step-list {
  margin: 0;
  padding-left: 0;
}

.card-list,
.step-list,
.feature-list {
  list-style: none;
}

.card-list li,
.feature-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.6rem;
  border-bottom: 1px dotted rgba(27, 25, 20, 0.22);
}

.card-list li:last-child,
.feature-list li:last-child {
  border-bottom: 0;
}

.card-list li::before,
.feature-list li::before {
  content: "¶";
  position: absolute;
  left: 0;
  top: 0.55rem;
  color: var(--ox);
  font-family: var(--serif-display);
  font-variation-settings: "opsz" 144, "SOFT" 80, "WONK" 1;
}

.step-list {
  counter-reset: step;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0.7rem 0 0.7rem 3rem;
  border-bottom: 1px solid rgba(27, 25, 20, 0.15);
}

.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.8rem;
  color: var(--ox);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.step-list li:last-child {
  border-bottom: 0;
}

.callout {
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--ox);
  background: rgba(125, 43, 30, 0.06);
}

.reference-note {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
}

.example-list {
  display: grid;
  gap: 0;
  margin: 0.85rem 0 0;
  border-top: 1px solid rgba(27, 25, 20, 0.18);
}

.example-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dotted rgba(27, 25, 20, 0.24);
}

.example-row:last-child {
  border-bottom: 0;
}

.example-label {
  color: var(--ox);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.example-text {
  color: var(--ink-soft);
}

.next-step {
  border-left: 3px solid var(--ox);
  background: rgba(125, 43, 30, 0.06);
}

.next-step .eyebrow {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ox);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hub-kicker {
  margin: 0 0 0.8rem;
  color: var(--ox);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.faq-grid {
  display: grid;
  gap: 1rem;
}

.faq-item h3 {
  font-size: 1.25rem;
}

.faq-item p {
  margin: 0;
}

.page-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.25fr 1fr;
}

.link-card {
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.link-card h3 {
  font-size: 1.32rem;
}

.link-card p {
  margin: 0;
}

a.link-card:hover,
.link-card:hover {
  background: rgba(125, 43, 30, 0.05);
  color: var(--ox);
  transform: translateY(-1px);
}

.legal {
  padding-bottom: 1rem;
}

.legal .content-card > :first-child,
.content-card > :first-child,
.link-card > :first-child {
  margin-top: 0;
}

.legal .content-card > :last-child,
.content-card > :last-child,
.link-card > :last-child {
  margin-bottom: 0;
}

.legal h2,
.content-card h2 {
  font-size: 1.6rem;
  margin-top: 1.5rem;
}

.legal h2:first-of-type,
.content-card h2:first-of-type {
  margin-top: 0;
}

.legal h3,
.content-card h3 {
  font-size: 1.28rem;
  margin-top: 1.25rem;
}

.legal ul,
.legal ol,
.content-card ul:not(.card-list):not(.feature-list),
.content-card ol:not(.step-list) {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.legal li,
.content-card li {
  margin-bottom: 0.5rem;
}

.site-footer {
  padding: 2.5rem 0 3.2rem;
  border-top: 3px double var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--ink-soft);
}

.site-footer p {
  margin: 0;
  max-width: 38ch;
}

.site-footer nav {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-footer nav a {
  background-image: none;
  color: var(--ink);
}

.site-footer nav a:hover {
  color: var(--ox);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tab-button {
  width: auto;
}

.tab-button.active {
  background: var(--ox);
  color: var(--paper);
  border-color: var(--ox);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

@media (max-width: 960px) {
  .tool-layout.split,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .tool-layout.split > :first-child {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .site-header nav {
    gap: 0.8rem 1rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 17px;
  }

  main,
  footer,
  header {
    width: min(100% - 1.5rem, var(--max));
  }

  .site-header {
    padding-top: 0.45rem;
    border-bottom: 0;
  }

  .site-header nav {
    display: none;
  }

  .brand {
    padding: 0.35rem 0 0.3rem;
    border-top: 0;
    border-bottom: 0;
    font-size: clamp(2.15rem, 12vw, 3.25rem);
    line-height: 0.92;
    white-space: normal;
  }

  .hero {
    padding-top: 0.55rem;
  }

  .hero-card {
    padding-bottom: 1rem;
  }

  .hero-card p.lead {
    font-size: 1.05rem;
  }

  .hero-meta {
    gap: 0.6rem;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
  }

  .section-heading .rule,
  .section-heading .chapter {
    display: none;
  }

  .tool-card,
  .content-card,
  .link-card,
  .result-card,
  .faq-item {
    padding: 1.15rem 1.2rem;
  }

  .tool-layout.split > :first-child,
  .tool-layout.split > :last-child,
  .tool-layout.compact > :first-child,
  .tool-layout.stacked > :first-child {
    padding: 1.2rem;
  }

  textarea {
    min-height: 300px;
  }

  .button-row > * {
    flex: 1 1 0;
  }

  .example-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition: none !important;
  }
}
