/* Theo Notes website. Two inks (teal, orange) on one stock. Self-hosted fonts only. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin-wght.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --stock: light-dark(#E3EEEA, #0C262D);
  --ink: light-dark(#0F3B46, #F6EEDA);
  --ink-soft: light-dark(#3F636B, #B9C9C6);
  --spot: #E8602C;
  --spot-text: light-dark(#B5380B, #FF8F57);
  --spot-dark-ink: #08222A;
  --band: light-dark(#12505E, #164A57);
  --band-ink: #FBF6E8;
  --band-soft: #CFE0DC;
  --rule: light-dark(#0F3B46, #F6EEDA);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --section: clamp(4rem, 9vw, 7.5rem);
}


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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  scrollbar-color: var(--spot) var(--stock);
}

body {
  margin: 0;
  background: var(--stock);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--spot); color: var(--spot-dark-ink); }
:focus-visible { outline: 3px solid var(--spot-text); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; max-width: 54ch; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--spot); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }

code, pre { font-family: var(--mono); }
:not(pre) > code { font-size: 0.88em; font-weight: 500; background: color-mix(in srgb, var(--ink) 10%, transparent); padding: 0.08em 0.35em; border-radius: 4px; }

.wrap { width: min(100%, 74rem); margin-inline: auto; }
.top, section, .page, .foot { padding-inline: var(--gutter); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--ink); color: var(--stock); padding: 0.6rem 1rem; border-radius: 6px; }
.skip:focus { top: 1rem; }

/* Header */
.top { padding-block: 1rem; }
.top__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; }
.brand img { border-radius: 9px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.nav a { display: inline-block; padding: 0.5rem 0.65rem; font-weight: 600; text-decoration: none; border-radius: 6px; }
.nav a:hover { background: var(--spot); color: var(--spot-dark-ink); }

/* Shared: stamp, arrow links, tags */
.stamp {
  display: inline-flex; flex-direction: column; gap: 0.15rem; margin: 0;
  padding: 0.55rem 1.1rem; border: 3px solid var(--spot-text); border-radius: 8px;
  outline: 2px solid var(--spot-text); outline-offset: 3px;
  color: var(--spot-text); font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em;
  transform: rotate(-3deg);
}
.stamp strong { font-size: 1.6rem; font-weight: 800; line-height: 1.05; }
.stamp span { font-size: 0.8rem; font-weight: 700; }

.arrow { font-weight: 700; text-decoration-color: var(--spot); }
.arrow::after {
  content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-left: 0.45em;
  border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor;
  transform: translateY(-0.06em) rotate(45deg); transition: transform 200ms var(--ease);
}
.arrow:hover::after { transform: translate(0.2em, -0.06em) rotate(45deg); }

.tag { font-weight: 700; color: var(--spot-text); }
.wiki { font-weight: 600; text-decoration: underline; text-decoration-color: var(--spot); text-decoration-thickness: 3px; text-underline-offset: 0.18em; }

/* Hero */
.hero { padding-top: clamp(1.5rem, 5vw, 4rem); }
.hero__grid { display: grid; gap: 2rem; align-items: end; }
.hero h1 {
  font-size: clamp(2.7rem, 9.4vw, 6rem); font-weight: 800; line-height: 0.96; letter-spacing: -0.035em;
  max-width: 12ch; margin-bottom: 1.5rem;
}
.mark {
  color: var(--spot-dark-ink); padding: 0 0.14em; margin-inline: -0.06em;
  background: linear-gradient(var(--spot), var(--spot)) no-repeat left center / 100% 92%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: wipe 1000ms var(--ease) 300ms backwards;
}
@keyframes wipe { from { background-size: 0% 92%; } }

.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.5; max-width: 36ch; margin-bottom: 1.75rem; }
.hero__status { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-bottom: 1.5rem; padding-left: 0.25rem; }
.hero__note { margin: 0; font-weight: 600; color: var(--ink-soft); }
.hero__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 0; max-width: none; }

.hero__icon { position: relative; z-index: 2; justify-self: start; width: min(15rem, 62vw); }
.hero__icon img { width: 100%; height: auto; transform: rotate(4deg); }
.dots {
  position: absolute; z-index: -1; inset: -18% -22% -10% -10%;
  background: url("/img/halftone-ink.svg") 0 0 / 11px 11px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(circle at 55% 50%, #000 15%, transparent 68%);
  mask-image: radial-gradient(circle at 55% 50%, #000 15%, transparent 68%);
}
@media (prefers-color-scheme: dark) { .dots { background-image: url("/img/halftone-cream.svg"); opacity: 0.3; } }

@media (min-width: 56rem) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 24rem; }
  .hero__icon { width: 24rem; justify-self: end; margin-bottom: -11rem; }
}

/* Bands: the teal ink, full field */
.band { background: var(--band); color: var(--band-ink); }
.band :focus-visible { outline-color: var(--band-ink); }
.band a { text-decoration-color: var(--spot); }

.band--sheet { margin-top: clamp(2.5rem, 6vw, 4rem); padding: 3.5rem 1.25rem; }
.band__head { max-width: 38rem; margin-bottom: 2.5rem; }
.band__head h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 1rem; }
.band__head p { color: var(--band-soft); margin: 0; }
@media (min-width: 56rem) { .band--sheet { padding-top: 6rem; } }

/* The sample sheets (always printed on cream paper) */
.sheets { margin: 0; display: grid; gap: 1.5rem; align-items: start; }
.sheets figcaption { color: var(--band-soft); font-size: 0.95rem; margin-top: 0.25rem; }
@media (min-width: 56rem) {
  .sheets { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .sheets figcaption { grid-column: 1 / -1; }
}
.sheet {
  --ink: #0F3B46; --ink-soft: #3F636B; --spot-text: #B5380B;
  background: #FFFDF6; color: var(--ink); border: 2px solid #0F3B46; border-radius: 14px; overflow: hidden;
}
.sheet :focus-visible { outline-color: #B5380B; }
.sheet__bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.9rem; border-bottom: 2px solid var(--ink); font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.sheet__bar i { width: 0.7rem; height: 0.7rem; border: 2px solid var(--ink); border-radius: 50%; }
.sheet__bar span { margin-left: 0.6rem; }

.app { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); }
.app__side { padding: 1rem 0.9rem; box-shadow: inset -1px 0 0 #0F3B46; font-size: 0.9rem; }
.app__label { margin: 0 0 0.5rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.tree li { padding: 0.15rem 0.35rem; border-radius: 5px; }
.tree ul { margin-left: 0.6rem; }
.tree__on > .tag, .tree__on:not(:has(> .tag)) { color: var(--ink); }
.tree li.tree__on { background: #FBD9C6; }
.tree li.tree__on:has(li.tree__on) { background: none; }
.app__note { padding: 1.1rem 1.25rem 1.4rem; font-size: 0.97rem; }
.app__note h3 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.25rem; }
.app__note p { margin-bottom: 0.75rem; }
.app__note ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 0.9rem; }
.app__note table { border-collapse: collapse; width: 100%; max-width: 20rem; font-size: 0.9rem; }
@media (max-width: 30rem) { .app { grid-template-columns: 7.2rem minmax(0, 1fr); } .app__side { padding-inline: 0.55rem; font-size: 0.82rem; } .app__note { padding-inline: 0.9rem; } .app__note h3 { font-size: 1.4rem; } }
.app__note th { background: var(--ink); color: #FFFDF6; text-align: left; padding: 0.3rem 0.6rem; }
.app__note td { border: 1px solid var(--ink); padding: 0.3rem 0.6rem; }

.src { margin: 0; padding: 1rem 1.15rem 1.25rem; overflow-x: auto; font-size: 0.86rem; line-height: 1.7; tab-size: 2; }
.src code { white-space: pre; }
.src__h { font-weight: 800; }
.src__tag { color: var(--spot-text); font-weight: 600; }
.src__link { color: #1B6F80; font-weight: 600; }
.src__dim { color: var(--ink-soft); }

/* Features */
.features { padding-block: var(--section); }
.features h2 { font-size: clamp(2rem, 4.8vw, 3.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; max-width: 20ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.grid { display: grid; gap: 2.5rem 2.25rem; }
.cell { display: flex; flex-direction: column; border-top: 3px solid var(--rule); padding-top: 1.1rem; }
.cell h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 0.5rem; }
.cell p { max-width: 44ch; }
.demo { margin: 1.25rem 0 0; }
.demo--md code { display: block; background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 0.7rem 0.9rem; border-radius: 8px; font-size: 0.9rem; }
.demo--md .src__link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--spot); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.demo__arrow { font-weight: 700; margin-inline: 0.35rem; color: var(--spot-text); }
.tree--mini { font-size: 1rem; }
.tree--mini li { padding: 0.1rem 0; }

.find { display: grid; gap: 0.4rem; }
.find__q { display: block; border: 2px solid var(--ink); border-radius: 999px; padding: 0.3rem 1rem; font-weight: 600; }
.find__hit { padding-left: 1rem; font-size: 0.95rem; }
mark { background: var(--spot); color: var(--spot-dark-ink); padding: 0 0.15em; border-radius: 2px; }

.swatches { display: flex; align-items: center; gap: 0.5rem; }
.sw { width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--ink); }
.sw--1 { background: #FBF6E8; } .sw--2 { background: #12505E; } .sw--3 { background: #E8602C; } .sw--4 { background: #0C262D; }
.aa { margin-left: 0.5rem; font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; letter-spacing: -0.03em; }

.blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.block { display: flex; flex-direction: column; gap: 0.5rem; min-height: 6rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
.block__name { font-family: var(--display); font-weight: 700; font-size: 0.95rem; }
.mini-table { display: grid; grid-template-columns: 1fr 1fr; font-size: 0.82rem; }
.mini-table > * { padding: 0.15rem 0.45rem; border: 1px solid var(--ink); font-style: normal; }
.mini-table b { background: var(--ink); color: var(--stock); }
.mini-callout { font-size: 0.82rem; background: #FBD9C6; color: #08222A; padding: 0.45rem 0.6rem; border-radius: 6px; }
.mini-math { font-family: var(--display); font-size: 1.5rem; font-weight: 600; font-style: italic; }
.mini-flow { width: 100%; height: auto; max-width: 7.5rem; stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mini-flow rect { fill: color-mix(in srgb, var(--spot) 35%, transparent); }
.mini-code code { display: block; font-size: 0.78rem; background: #0A2027; color: #F6EEDA; padding: 0.4rem 0.55rem; border-radius: 6px; overflow-wrap: anywhere; }

@media (min-width: 40rem) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--wide, .cell--full { grid-column: span 2; }
}
@media (min-width: 64rem) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cell--full { grid-column: span 3; }
}

/* Privacy: the orange ink, full field */
.privacy { background: var(--spot); color: var(--spot-dark-ink); padding: 4rem 1.25rem; position: relative; overflow: hidden; }
.privacy :focus-visible { outline-color: var(--spot-dark-ink); }
.privacy a { text-decoration-color: var(--spot-dark-ink); }
.privacy__grid { display: grid; gap: 2.5rem; }
.privacy h2 { font-size: clamp(2.1rem, 5vw, 3.75rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; margin-bottom: 1rem; max-width: 13ch; }
.privacy__lede { position: relative; }
.privacy__lede p { font-size: 1.2rem; max-width: 28ch; }
.lock { margin-top: 1.5rem; width: 6rem; height: auto; }
.lock path:first-child { stroke: var(--spot-dark-ink); }
.lock rect { fill: var(--spot-dark-ink); }
.lock__hole { fill: var(--spot); stroke: none; }
.lock__stem { fill: none; stroke: var(--spot); }
.facts li { border-top: 3px solid var(--spot-dark-ink); padding: 1rem 0 1.5rem; }
.facts h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.35rem; }
.facts p { margin: 0; font-size: 1.1rem; }
.privacy__more { margin: 0; font-size: 1.1rem; }
@media (min-width: 56rem) {
  .privacy__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(2rem, 6vw, 5rem); }
  .privacy__more { grid-column: 2; margin-top: -1.5rem; }
}

/* Import / export */
.import { padding-block: var(--section); }
.import h2 { font-size: clamp(2rem, 4.8vw, 3.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; max-width: 18ch; margin-bottom: 1rem; }
.import__lede { font-size: 1.2rem; max-width: 40ch; margin-bottom: 2.5rem; }
.move { display: grid; gap: 2rem; align-items: start; }
.move h3 { font-size: 1.1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--spot-text); margin-bottom: 0.9rem; }
.tags-list { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }
.tags-list li {
  position: relative; padding: 0.55rem 1.1rem 0.55rem 2.4rem; font-weight: 600;
  border: 2.5px solid var(--rule); border-radius: 6px 20px 20px 6px; background: var(--stock);
}
.tags-list li::before { content: ""; position: absolute; left: 0.8rem; top: 50%; width: 0.7rem; height: 0.7rem; margin-top: -0.35rem; border: 2.5px solid var(--rule); border-radius: 50%; }
.tags-list li:nth-child(odd) { transform: rotate(-0.8deg); }
.tags-list li:nth-child(even) { transform: rotate(0.6deg); }
.move__mid img { width: 4rem; height: 4rem; border-radius: 14px; transform: rotate(-5deg); }
.move__mid { display: none; }
@media (min-width: 52rem) {
  .move { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 2.5rem; }
  .move__mid { display: block; align-self: center; }
}

/* AI band */
.band--ai { padding: 4rem 1.25rem; }
.ai__grid { display: grid; gap: 2.5rem; align-items: center; }
.ai__copy h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.ai__copy p { font-size: 1.15rem; color: var(--band-soft); }
.band :not(pre) > code { background: rgba(251, 246, 232, 0.16); color: var(--band-ink); }
.term { margin: 0; background: #0A2027; border: 2px solid var(--band-ink); border-radius: 14px; overflow: hidden; }
.term figcaption { padding: 0.5rem 1.1rem; border-bottom: 2px solid var(--band-ink); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--band-soft); }
.term pre { margin: 0; padding: 1.1rem 1.2rem 1.3rem; overflow-x: auto; font-size: 0.86rem; line-height: 1.75; color: #F6EEDA; }
.term code { white-space: pre; }
.t-dim { color: #9FBBB6; }
.t-p { color: #FFB08A; font-weight: 700; }
@media (min-width: 60rem) { .ai__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); } }

/* FAQ */
.faq { padding-block: var(--section); }
.faq__grid { display: grid; gap: 2rem; }
.faq h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; max-width: 11ch; }
.faq details { border-top: 3px solid var(--rule); }
.faq details:last-child { border-bottom: 3px solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 0; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.25; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.8rem; font-weight: 600; line-height: 1; color: var(--spot-text); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--spot-text); }
.faq details p { margin: 0 0 1.25rem; max-width: 50ch; }
@media (min-width: 56rem) {
  .faq__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(2rem, 6vw, 5rem); }
  .faq h2 { position: sticky; top: 2rem; align-self: start; }
}

@media (min-width: 40rem) { .band--sheet, .privacy, .band--ai { padding-inline: var(--gutter); } }
@media (min-width: 56rem) { .band--sheet { padding-bottom: 5.5rem; } .privacy, .band--ai { padding-block: 7rem; } }

/* Close + footer */
.close { padding-bottom: var(--section); }
.close__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; padding-top: 2.5rem; border-top: 3px solid var(--rule); }
.close h2 { font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.035em; max-width: 14ch; }
.foot { border-top: 3px solid var(--rule); padding-block: 1.5rem; font-size: 0.95rem; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.foot p { margin: 0; }

/* Privacy / 404 text pages */
.page { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section); }
.page h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.035em; max-width: 14ch; margin-bottom: 1.5rem; }
.page h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.015em; margin: 2.5rem 0 0.6rem; }
.page .lead { max-width: 32ch; }
.page ul.plain { list-style: disc; padding-left: 1.25rem; max-width: 52ch; margin-bottom: 1em; }
.page ul.plain li { margin-bottom: 0.4rem; }
.page--404 { text-align: left; }
.page--404 .stamp { margin-bottom: 2rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mark { animation: none; }
  .arrow::after { transition: none; }
}

@media print {
  .top, .skip { display: none; }
  body { background: #fff; color: #000; }
}
