/* Rootwall — site stylesheet
   One file for every hand-written page. Base type size is set once, at :root,
   and everything else is expressed in rem, so changing one number below
   rescales the whole site proportionally — including the measure. */

:root {
  --ink:        #17171a;
  --ink-soft:   #4a4a52;
  --ink-faint:  #74747e;
  --paper:      #fbfaf8;
  --panel:      #f2f0ec;
  --rule:       #dcd9d2;
  --accent:     #7a2f1e;
  --measure:    34rem;
  --tile-hover: #efece6;
  --tile-lift:  rgba(23,23,26,0.16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #e8e6e1;
    --ink-soft:  #b2afa8;
    --ink-faint: #86837c;
    --paper:     #16161a;
    --panel:     #1e1e23;
    --rule:      #33333a;
    --accent:    #d98b72;
    --tile-hover: #26262d;
    --tile-lift:  rgba(255,255,255,0.16);
  }
}

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

/* THE ONE NUMBER. Everything scales from here. */
html {
  font-size: 20px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

a { color: var(--accent); }

/* ---------- masthead ---------- */

.masthead { margin-bottom: 3rem; }

.wordmark {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: var(--ink);
}
.wordmark a { color: inherit; text-decoration: none; }

h1 {
  font-size: 1.65rem;
  line-height: 1.32;
  font-weight: 600;
  margin: 0 0 1rem;
  letter-spacing: -0.008em;
}

.standfirst {
  font-size: 1.06rem;
  color: var(--ink-soft);
  margin: 0;
}

.docmeta {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  margin: 1.4rem 0 0;
}

/* ---------- sections ---------- */

section { margin-top: 3.25rem; }

h2 {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

p { margin: 0 0 1.05rem; }
p:last-child { margin-bottom: 0; }

/* Justified prose. Hyphenation is not optional with justification —
   without it a serif face at this measure opens rivers of white space.
   Headings, tables, metadata and the footer stay ranged left. */
p,
ol.numbered > li,
ul.plain > li,
ol.steps > li,
.statement,
.standfirst {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.docmeta,
.entry-head,
.cite,
footer p,
.summary p.tail,
th, td {
  text-align: left;
  hyphens: manual;
}
td.amount, th.amount { text-align: right; }

strong { font-weight: 650; color: var(--ink); }

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

ol.numbered {
  list-style: none;
  counter-reset: n;
  padding: 0;
  margin: 0;
}
ol.numbered > li {
  counter-increment: n;
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 1.15rem;
}
ol.numbered > li:last-child { margin-bottom: 0; }
ol.numbered > li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: 0.16em;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain > li {
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 1.05rem;
}
ul.plain > li:last-child { margin-bottom: 0; }
ul.plain > li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink-faint);
}

.lede-term { font-weight: 650; }

/* The single idea the page turns on. Uses the same accent as the
   numbering, so the eye lands on it before it reads anything else. */
.key { color: var(--accent); }
.key strong { color: inherit; }
p.key {
  font-size: 1.06rem;
  line-height: 1.5;
  margin: 1.6rem 0 0;
}

/* ---------- pull statement ---------- */

.statement {
  border-left: 2px solid var(--accent);
  padding: 0.1rem 0 0.1rem 1.35rem;
  margin: 1.6rem 0;
  font-size: 1.08rem;
  line-height: 1.5;
}

/* ---------- the one-line answer, given to reader and machine alike ---------- */

.definition {
  font-size: 1.28rem;
  line-height: 1.36;
  color: var(--ink);
  margin: 2.1rem 0 0;
  text-align: left;
  hyphens: manual;
}
/* Only the name and the one word the sentence turns on take the accent. */
.definition strong { font-weight: 650; }
.definition .hl { color: var(--accent); }

/* The argument, stated before the headline: why the calling company
   defending the connection is the whole of it. */
.thesis { margin: 1.5rem 0 0; }
.thesis p { margin: 0 0 1rem; }
.thesis p.key { margin: 1.3rem 0 0; font-size: 1.04rem; }
.thesis-tail {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* The machine-readable invitation sits above the headline, so it is
   deliberately quieter than the prose it introduces. */
.panel.machine { margin: 0 0 0.4rem; }
.panel.machine p { font-size: 0.92rem; }
/* The prompt to paste into an assistant, with a copy button that only
   appears if the script runs. Set on the paper ground so it lifts off
   the panel behind it. */
.ask {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  padding: 0.95rem 1.05rem;
  margin: 1rem 0 1.1rem;
}
.ask-q {
  flex: 1 1 auto;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: left;
  hyphens: manual;
  overflow-wrap: anywhere;
}
.copy {
  flex: 0 0 auto;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0.36rem 0.7rem;
  cursor: pointer;
  line-height: 1;
}
.copy:hover,
.copy:focus-visible,
.copy.done { background: var(--accent); color: var(--paper); }

@media (max-width: 32rem) {
  .ask { flex-direction: column; align-items: stretch; }
  .copy { align-self: flex-start; }
}

/* One-click hand-off to an assistant, with the question already in the URL.
   Each button carries an empty .ai-mark slot: drop a monochrome brand SVG in as
   a background-image there if you ever license one, and nothing else changes. */
.ask-lead { margin: 0 0 0.7rem; font-size: 0.9rem; }

/* A row of square tiles, one per assistant, each holding that company's own
   monochrome mark. Marks are mounted as a CSS mask rather than an image, so the
   shape takes the colour of the tile it sits in — one file covers light mode,
   dark mode and the inverted hover state, with no white/black variants needed.
   A tile with no --mark yet falls back to its name in small type. */
.ai-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.2rem;
}
.ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--rule);
  border-radius: 0.7rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.54rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  transition: transform 0.18s cubic-bezier(.2,.7,.3,1), background-color 0.18s ease,
              border-color 0.16s ease, box-shadow 0.16s ease;
}
/* Lifts toward the reader rather than inverting: the ground lightens a step,
   the tile rises 2px and casts a soft shadow. A full colour flip at this size
   reads as a button; this reads as a card you can pick up. */
.ai:hover,
.ai:focus-visible {
  background: var(--tile-hover);
  border-color: var(--ink-faint);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 6px 18px var(--tile-lift);
}
.ai:active { transform: translateY(0); box-shadow: none; }
/* A tile carrying a real mark shows the mark alone and hides its text label. */
.ai--mark .ai-label { display: none; }
.ai--mark .ai-mark {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  background: currentColor;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
}
.ai-mark { display: none; }

.ai--openai .ai-mark {
  -webkit-mask-image: url("/logos/openai.svg");
          mask-image: url("/logos/openai.svg");
}
.ai--claude .ai-mark {
  -webkit-mask-image: url("/logos/claude.svg");
          mask-image: url("/logos/claude.svg");
}
.ai--copilot .ai-mark {
  -webkit-mask-image: url("/logos/copilot.svg");
          mask-image: url("/logos/copilot.svg");
}
.ai--grok .ai-mark {
  -webkit-mask-image: url("/logos/grok.svg");
          mask-image: url("/logos/grok.svg");
}
.ai--gemini .ai-mark {
  -webkit-mask-image: url("/logos/gemini.svg");
          mask-image: url("/logos/gemini.svg");
}

.masthead h1 { margin-top: 3rem; }

/* ---------- panel ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 1.5rem 1.6rem;
  margin-top: 1.4rem;
}
.panel p:last-child { margin-bottom: 0; }

/* ---------- front page: one-minute summary ---------- */

.summary {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 1.5rem 1.6rem 1.6rem;
  margin-bottom: 1rem;
}
.summary h2 { margin-bottom: 1rem; }
.summary ol.numbered > li { margin-bottom: 0.9rem; font-size: 0.98rem; }
.summary p.tail {
  margin: 1.15rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--ink-faint);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

.price {
  font-size: 1.08rem;
  line-height: 1.5;
  margin: 0 0 1.05rem;
}

/* ---------- front page: call to action ---------- */

.cta { margin-top: 3.5rem; padding-top: 2.25rem; border-top: 1px solid var(--rule); }
.cta a.primary {
  display: inline-block;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--paper);
  background: var(--accent);
  padding: 0.72rem 1.35rem;
  border: 1px solid var(--accent);
}
.cta a.primary:hover,
.cta a.primary:focus { opacity: 0.88; }
.cta .note {
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-top: 1.1rem;
  line-height: 1.55;
}

/* ---------- tables: the fee schedule ---------- */

.tablewrap { overflow-x: auto; margin-top: 1.4rem; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  line-height: 1.45;
}
th, td {
  text-align: left;
  padding: 0.72rem 0.7rem 0.72rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
thead th {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}
td.amount, th.amount {
  text-align: right;
  padding-right: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td.amount { font-weight: 650; }
.basis {
  display: block;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 0.18rem;
}
.nil { color: var(--ink-faint); font-weight: 400; }

/* ---------- version history entries ---------- */

.entry {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.entry:first-of-type { border-top: 1px solid var(--ink-faint); }
.entry-head {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: baseline;
}
.ver { color: var(--accent); font-variant-numeric: tabular-nums; }
.date {
  font-weight: 400;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.tag {
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  padding: 0.08rem 0.42rem;
}
.tag.current { border-color: var(--accent); color: var(--accent); }
.entry p { font-size: 0.95rem; margin-bottom: 0.7rem; }
.entry p:last-child { margin-bottom: 0; }

/* ---------- common questions ---------- */

.qa { margin-top: 2.75rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.qa:first-of-type { border-top: 1px solid var(--ink-faint); }
.qa h3 {
  font-size: 1.1rem;
  line-height: 1.4;
  font-weight: 650;
  margin: 0 0 0.9rem;
  letter-spacing: -0.004em;
}

ol.steps { list-style: none; counter-reset: n; padding: 0; margin: 0; }
ol.steps > li {
  counter-increment: n;
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 0.9rem;
}
ol.steps > li:last-child { margin-bottom: 0; }
ol.steps > li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: 0.16em;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.cite {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.9rem;
}
.cite a { color: var(--ink-faint); }

.toc {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 1.2rem 1.4rem;
  margin-top: 2.5rem;
}
.toc ol {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.86rem;
  margin: 0;
  padding-left: 1.2rem;
}
.toc li { margin-bottom: 0.45rem; }
.toc li:last-child { margin-bottom: 0; }
.toc a { text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--accent); }

/* ---------- colophon ---------- */

footer {
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--ink-faint);
}
footer p { margin: 0 0 0.35rem; }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  html { font-size: 18px; }
  .wrap { padding: 3rem 1.25rem 4rem; }
  h1 { font-size: 1.42rem; }
  .summary { padding: 1.25rem 1.15rem 1.35rem; }
  table { font-size: 0.84rem; }
}
