/* theechoframework.com
 *
 * One stylesheet. No framework, no build step, no JavaScript.
 *
 * The palette below is parsed out of this :root block by build.js at build
 * time and published on /media-kit/, so the documented palette is by
 * definition the palette that ships. Rename a token and the media kit shows a
 * gap rather than a stale colour. Keep the "--c-" prefix and one token per
 * line for that reason.
 */

:root {
  --c-ink: #0a0b0d;
  --c-ink-soft: #363c45;
  --c-muted: #5b6472;
  --c-line: #e4e7ec;
  --c-line-soft: #eef0f4;
  --c-canvas: #ffffff;
  --c-paper: #f6f7f9;
  --c-accent: #3b2bf5;
  --c-accent-deep: #2a1cc4;
  --c-accent-wash: #eeecfe;
  --c-on-accent: #ffffff;

  --f-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: 1120px;
  --shell-narrow: 760px;
  --r: 14px;
  --r-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-ink: #f2f4f7;
    --c-ink-soft: #c3c9d2;
    --c-muted: #99a2b0;
    --c-line: #262b33;
    --c-line-soft: #1c2027;
    --c-canvas: #0a0b0d;
    --c-paper: #12151a;
    --c-accent: #9a8dff;
    --c-accent-deep: #b7adff;
    --c-accent-wash: #191a3a;
    --c-on-accent: #0a0b0d;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* The masthead is sticky, so an in-page jump would otherwise land with the
 * heading hidden underneath it. Every contents link on this site depends on
 * this line. */
[id] { scroll-margin-top: 90px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--c-canvas);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "cv05" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 620; line-height: 1.15; letter-spacing: -0.021em; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.25em; }
li { margin: 0 0 0.4em; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: 3rem 0; }

a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--c-accent-deep); }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-ink);
  color: var(--c-canvas);
  padding: 0.7rem 1rem;
  z-index: 60;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ shell */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}
.shell--narrow { max-width: var(--shell-narrow); }

.section { padding: 4.5rem 0; }
.section--lead { padding-top: 3.5rem; }
.section--tight { padding: 2.75rem 0; }
.section--tint { background: var(--c-paper); }
.section + .section--tint,
.section--tint + .section { border-top: 1px solid var(--c-line-soft); }

/* ----------------------------------------------------------------- header */

.draftbar {
  background: var(--c-ink);
  color: var(--c-canvas);
  font-size: 13px;
  padding: 0.6rem 0;
}
.draftbar strong { font-weight: 650; margin-right: 0.6rem; }

.masthead {
  border-bottom: 1px solid var(--c-line);
  background: color-mix(in srgb, var(--c-canvas) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.masthead__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 66px;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--c-ink);
  text-decoration: none;
  font-weight: 680;
  letter-spacing: -0.02em;
  font-size: 16px;
  white-space: nowrap;
}
.wordmark__rings {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--c-accent);
  position: relative;
  flex: none;
}
.wordmark__rings::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--c-accent);
}
.masthead__nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.masthead nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.masthead nav a {
  color: var(--c-ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
}
.masthead nav a:hover { color: var(--c-ink); }
.masthead nav a[aria-current="page"] { color: var(--c-accent); }

@media (max-width: 860px) {
  .masthead { position: static; }
  .masthead__in { padding-top: 0.85rem; padding-bottom: 0.85rem; }
  .masthead__nav { width: 100%; }
}

/* ---------------------------------------------------------------- crumbs */

.crumbs {
  font-size: 13.5px;
  color: var(--c-muted);
  padding: 1.1rem 0 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.crumbs a { color: var(--c-muted); text-decoration: none; }
.crumbs a:hover { color: var(--c-ink); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: 0.45; }

/* ------------------------------------------------------------------ type */

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin: 0 0 1rem;
  font-weight: 500;
}
.eyebrow--muted { color: var(--c-muted); }

.display {
  font-size: clamp(2.4rem, 6.2vw, 4.15rem);
  line-height: 1.03;
  letter-spacing: -0.034em;
  font-weight: 650;
  margin: 0 0 1.3rem;
  max-width: 17ch;
}
.display--sm {
  font-size: clamp(2rem, 4.4vw, 2.85rem);
  letter-spacing: -0.028em;
  max-width: 22ch;
}
.display--wide { max-width: 26ch; }

.lede {
  font-size: clamp(1.08rem, 1.9vw, 1.32rem);
  line-height: 1.55;
  color: var(--c-ink-soft);
  max-width: 62ch;
  margin: 0 0 1.4rem;
}

.h2 {
  font-size: clamp(1.5rem, 2.9vw, 2rem);
  letter-spacing: -0.026em;
  margin: 0 0 1.15rem;
}
.h3 {
  font-size: 1.15rem;
  letter-spacing: -0.018em;
  font-weight: 620;
  margin: 0 0 0.55rem;
}
.muted { color: var(--c-muted); }
.small { font-size: 14.5px; }

.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.15em; }
.prose > .h3 { margin-top: 2.4rem; }
.prose > .h2 { margin-top: 3rem; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.78rem 1.25rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 560;
  text-decoration: none;
  line-height: 1;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { background: var(--c-accent-deep); color: var(--c-on-accent); }
.btn--ghost { border-color: var(--c-line); color: var(--c-ink); background: var(--c-canvas); }
.btn--ghost:hover { border-color: var(--c-ink); color: var(--c-ink); }
.btn--sm { padding: 0.55rem 0.9rem; font-size: 14px; }
.btn__arrow { font-size: 1.1em; line-height: 0; position: relative; top: 0.03em; }

.btnrow { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------------ grid */

.grid { display: grid; gap: 1.15rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); } }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }

/* ----------------------------------------------------------------- cards */

.card {
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 1.5rem;
  background: var(--c-canvas);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.card--link { text-decoration: none; color: inherit; transition: border-color 0.16s ease; }
.card--link:hover { border-color: var(--c-ink); color: inherit; }
.card__meta {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.card__title { font-size: 1.06rem; font-weight: 620; letter-spacing: -0.017em; line-height: 1.3; }
.card p { margin: 0; color: var(--c-ink-soft); font-size: 15px; }
.card__more { margin-top: auto; padding-top: 0.6rem; font-size: 14px; color: var(--c-accent); font-weight: 540; }

/* --------------------------------------------------------------- pillars */

.pillars { display: grid; gap: 1.15rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pillars { grid-template-columns: minmax(0, 1fr); } }

.pillar {
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 1.6rem 1.4rem 1.4rem;
  background: var(--c-canvas);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.16s ease;
}
.pillar:hover { border-color: var(--c-ink); color: inherit; }
.pillar__letter {
  font-size: 2.5rem;
  font-weight: 660;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--c-accent);
  margin-bottom: 0.75rem;
}
.pillar__name { font-size: 1.12rem; font-weight: 640; letter-spacing: -0.02em; margin-bottom: 0.35rem; }
.pillar__q { font-size: 14.5px; color: var(--c-ink-soft); margin: 0; }
.pillar__step {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--c-line-soft);
}

/* ------------------------------------------------------- machine-readable */

/* The EAV block. Deliberately styled like a record rather than like copy,
 * because that is exactly the distinction chapter 3 draws. */
.eav {
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  background: var(--c-paper);
  padding: 0.35rem 1.35rem;
  margin: 0 0 1.5rem;
}
.eav dl { margin: 0; display: grid; grid-template-columns: minmax(140px, 210px) minmax(0, 1fr); }
.eav dt,
.eav dd {
  margin: 0;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--c-line-soft);
  font-size: 15px;
}
.eav dt {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding-right: 1rem;
  align-self: center;
}
.eav dd { color: var(--c-ink); }
.eav dl > dt:last-of-type,
.eav dl > dd:last-of-type { border-bottom: 0; }
@media (max-width: 620px) {
  .eav dl { grid-template-columns: minmax(0, 1fr); }
  .eav dt { padding-bottom: 0; border-bottom: 0; }
  .eav dd { padding-top: 0.2rem; }
}

.mono { font-family: var(--f-mono); font-size: 0.92em; }

/* Swatch colours come from the stylesheet itself via an inline background, so
 * there is no second copy of a hex value anywhere to fall out of step. */
.swatch {
  display: inline-block;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 4px;
  border: 1px solid var(--c-line);
  vertical-align: -0.25rem;
  margin-right: 0.55rem;
}
.copyblock {
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 1.3rem 1.4rem;
  background: var(--c-paper);
  margin: 0 0 1.15rem;
}
.copyblock__label {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.copyblock p:last-child { margin-bottom: 0; }

/* "to supply" chip. Loud on purpose: an unsupplied fact must look unsupplied. */
.tbc {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  border: 1px dashed var(--c-muted);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
}
.tbc--block { display: block; width: fit-content; margin: 0.2rem 0; }

.chip {
  display: inline-block;
  font-size: 13px;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--c-accent-wash);
  color: var(--c-accent-deep);
  font-weight: 520;
}
.chip--plain { background: var(--c-paper); color: var(--c-muted); }
.chiprow { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0 0 1rem; }

/* -------------------------------------------------------------------- qa */

/* Every reference section is a question with a declarative first line, so a
 * retrieval system can lift the answer without the heading for context. */
.qa { border-top: 1px solid var(--c-line); padding: 2.2rem 0 0; margin: 0 0 2.2rem; }
.qa:first-of-type { border-top: 0; padding-top: 0; }
.qa > .h2 { margin-bottom: 0.9rem; }
.qa__lead { font-size: 1.06rem; color: var(--c-ink); max-width: 66ch; }

/* Prose inside an answer is capped to a readable measure. Everything that is
 * a component rather than a sentence (tables, card grids, records) runs to the
 * width of its container, because squeezing a four-column grid into a text
 * measure is what makes a wide layout look like a narrow one that went wrong. */
.qa__body > p,
.qa__body > ul:not([class]),
.qa__body > ol { max-width: 68ch; }
.qa__body > .rows,
.qa__body > .termlist { max-width: 900px; }
.qa__body > .eav,
.qa__body > .copyblock { max-width: 760px; }

.toc { margin: 0 0 2.5rem; padding: 0; list-style: none; columns: 2; column-gap: 2rem; }
.toc li { margin: 0 0 0.5rem; break-inside: avoid; }
.toc a { font-size: 15px; }
@media (max-width: 620px) { .toc { columns: 1; } }

/* ----------------------------------------------------------------- lists */

.rows { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.rows > li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--c-line-soft);
  display: flex;
  gap: 1rem;
  align-items: baseline;
}
.rows > li:last-child { border-bottom: 0; }
.rows__k { font-family: var(--f-mono); font-size: 12.5px; color: var(--c-muted); flex: 0 0 190px; }
.rows__v { flex: 1 1 auto; min-width: 0; }
@media (max-width: 620px) {
  .rows > li { flex-direction: column; gap: 0.2rem; }
  .rows__k { flex: none; }
}

/* Nested children sit indented and one step down the type scale, so the
 * hierarchy is structural rather than decorative. */
.subrows { list-style: none; margin: 0.55rem 0 0; padding: 0 0 0 1.4rem; }
.subrows > li { font-size: 14.5px; color: var(--c-ink-soft); margin: 0 0 0.3rem; }

.termlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.termlist > li { border-bottom: 1px solid var(--c-line-soft); padding: 1.05rem 0; }
.termlist > li:last-child { border-bottom: 0; }
.termlist__term { font-weight: 620; letter-spacing: -0.015em; }
.termlist__term a { color: var(--c-ink); text-decoration: none; }
.termlist__term a:hover { color: var(--c-accent); text-decoration: underline; }
.termlist__def { color: var(--c-ink-soft); font-size: 15px; margin: 0.15rem 0 0; }

/* ----------------------------------------------------------------- table */

.tablewrap { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--c-line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--c-line-soft); vertical-align: top; }
th {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  font-weight: 500;
  background: var(--c-paper);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td ul { margin: 0; padding-left: 1.1em; }

/* ----------------------------------------------------------------- empty */

.empty {
  border: 1px dashed var(--c-line);
  border-radius: var(--r);
  padding: 2.4rem 1.8rem;
  text-align: center;
  background: var(--c-paper);
}
.empty .h3 { margin-bottom: 0.45rem; }
.empty p { color: var(--c-muted); max-width: 52ch; margin: 0 auto 1.1rem; }

/* ------------------------------------------------------------------ hero */

.hero { position: relative; overflow: hidden; padding: 5rem 0 4.25rem; }
.hero__rings {
  position: absolute;
  top: 50%;
  right: -180px;
  width: 720px;
  height: 720px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.5;
  background:
    radial-gradient(circle, transparent 0 118px, var(--c-line) 118px 119px, transparent 119px),
    radial-gradient(circle, transparent 0 196px, var(--c-line) 196px 197px, transparent 197px),
    radial-gradient(circle, transparent 0 274px, var(--c-line) 274px 275px, transparent 275px),
    radial-gradient(circle, transparent 0 352px, var(--c-line-soft) 352px 353px, transparent 353px);
}
.hero__in { position: relative; z-index: 1; max-width: 70ch; }
/* .hero__in is a child of .shell rather than the shell itself, so its narrower
 * measure hangs off the shell's left edge instead of re-centring inside it. */
@media (max-width: 900px) { .hero__rings { display: none; } }

.cta {
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  background: var(--c-paper);
  padding: 2.4rem;
  text-align: center;
}
.cta .h2 { margin-bottom: 0.6rem; }
.cta p { color: var(--c-ink-soft); max-width: 56ch; margin: 0 auto 1.4rem; }
.cta .btnrow { justify-content: center; }

/* ---------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--c-line);
  background: var(--c-paper);
  padding: 3.5rem 0 2.5rem;
  font-size: 14.5px;
}
.footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: minmax(0, 1fr); } }
.footer h2 {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  font-weight: 500;
  margin: 0 0 0.9rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 0.45rem; }
.footer a { color: var(--c-ink-soft); text-decoration: none; }
.footer a:hover { color: var(--c-accent); text-decoration: underline; }
.footer__blurb { color: var(--c-muted); max-width: 40ch; }
.footer__base {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 13.5px;
}
