/* Troqo website. Teal = work, amber = credits. One reading column, generous whitespace. */
/* Fonts served by the site itself (latin subset, variable weights; SIL Open Font License, see /fonts/). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500 600; font-display: swap; src: url(/fonts/space-grotesk-latin.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2"); }
:root {
  --bg: #f5f6f4;
  --panel: #ffffff;
  --fg: #172026;
  --muted: #5a6670;
  --line: #d3d9dc;
  --work: #0d7a70;
  --work-soft: #e1f0ec;
  --credit: #a85d07;
  --credit-soft: #f6ead8;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101518; --panel: #182025; --fg: #e3e9ec; --muted: #98a5ad; --line: #34404a;
    --work: #45c3b4; --work-soft: #15302d; --credit: #eaa34f; --credit-soft: #33281a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
a { color: var(--work); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--work); outline-offset: 2px; }
code, pre { font-family: var(--mono); font-size: 0.88em; }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
:not(pre) > code { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }

.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
header.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; min-height: 60px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
/* Elements hidden with the hidden attribute stay hidden, whatever display their class sets (tabs, notices). */
[hidden] { display: none !important; }
/* On a phone the navigation wraps: a header that stays pinned would take a fifth of the screen. */
@media (max-width: 640px) { header.top { position: static; } }
.brand { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand svg { width: 26px; height: 26px; }
nav { display: flex; gap: 6px 20px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
nav a:hover, nav a[aria-current="page"] { color: var(--fg); }

main { display: grid; gap: 72px; padding-block: 56px 80px; }
section { display: grid; gap: 20px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw, 56px); letter-spacing: -0.02em; max-width: 18ch; }
h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.01em; }
h3 { font-size: 18px; }
p { margin: 0; max-width: 66ch; }
.lead { font-size: 19px; color: var(--muted); max-width: 60ch; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.hero { display: grid; gap: 24px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--panel); }
.btn.primary { background: var(--work); border-color: var(--work); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #071512; } }

.ticker { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 14px; color: var(--muted); }
.ticker b { font-family: var(--mono); font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }

.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.rules li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.rules li p { color: var(--muted); font-size: 15px; }

figure { margin: 0; display: grid; gap: 10px; }
.diagram { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; overflow-x: auto; }
.diagram img { display: block; width: 100%; height: auto; margin: 0 auto; }
.diagram img[src*="architecture"] { max-width: 560px; }
/* On a phone, wide diagrams keep a readable size and scroll sideways inside their frame. */
@media (max-width: 640px) {
  .diagram { padding: 12px; }
  .diagram img[src*="exchange"], .diagram img[src*="lifecycle"] { width: 820px; max-width: none; }
}
figcaption { color: var(--muted); font-size: 14px; max-width: 70ch; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.split > * { min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: grid; gap: 10px; min-width: 0; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 14px; }
.steps li { padding-left: 4px; }
.steps li > p { margin-bottom: 8px; }

.tablewrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kind { display: inline-block; font-family: var(--mono); font-size: 13px; background: var(--work-soft); color: var(--work); padding: 2px 8px; border-radius: 999px; }
.price { font-family: var(--mono); color: var(--credit); font-weight: 500; white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: grid; gap: 2px; }
.stat b { font-family: var(--mono); font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.chart svg { width: 100%; height: auto; display: block; }
.empty { color: var(--muted); padding: 18px; }
tr.sub td { color: var(--muted); font-size: 14px; }
.model { font-family: var(--mono); font-size: 13px; }
.note { font-size: 14px; color: var(--muted); }

.doc { display: grid; gap: 16px; max-width: 820px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); max-width: none; }
.doc h2 { margin-top: 28px; }
.doc h3 { margin-top: 12px; }
.doc table { font-size: 14px; }
.doc blockquote { margin: 0; padding: 10px 16px; border-left: 3px solid var(--work); background: var(--work-soft); border-radius: 0 8px 8px 0; }
.doc ul, .doc ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }

footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Prompt picker */
.prompts { display: grid; gap: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; font-weight: 600; font-size: 15px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; margin-bottom: -1px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--work); }
.tabs button:hover { color: var(--fg); }
.prompt-panel { display: grid; gap: 12px; }
.prompt-box { position: relative; }
.prompt-box pre { margin: 0; padding-top: 52px; white-space: pre-wrap; word-break: break-word; }
.prompt-box .copy { position: absolute; top: 10px; right: 10px; padding: 6px 12px; font-size: 14px; cursor: pointer; }

/* Legal notice: fields the publisher still has to fill in. */
.fill { background: var(--credit-soft); color: var(--fg); padding: 0 4px; border-radius: 4px; font-weight: 500; }
.doc h2.part { font-size: 1.9rem; margin-top: 2.4em; }
/* Single-column grids: a long line of code scrolls inside its block instead of widening the page. */
main, section, .hero, figure, .doc, .doc ul, .doc ol, .steps, .card, .prompts, .prompt-panel, .stat { grid-template-columns: minmax(0, 1fr); }
pre { max-width: 100%; }
:not(pre) > code { overflow-wrap: anywhere; }
