/* Fonts are served from this site (no third-party requests): Bricolage Grotesque and JetBrains Mono,
   both under the SIL Open Font License 1.1 (fonts/OFL-*.txt). Latin and Latin Extended subsets. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Bare86 website. Colors are the app's own palette (Sources/Bare86UI/Theme/Theme.swift).
   Layout: full-width bands (ground / paper) with a 1120px inner column; the hero pairs the pitch
   with a working debugger window, because the debugger is the product. */
:root {
  color-scheme: light;
  --ground: #eceff1;
  --panel: #f4f6f7;
  --paper: #fbfcfb;
  --raised: #fdfdfd;
  --line: #d3d8dd;
  --line-strong: #b4bbc3;
  --ink: #1a1d21;
  --muted: #50575f;
  --accent: #0b6b5d;
  --accent-hover: #095e52;
  --on-accent: #f6fbfa;
  --accent-tint: #d9ece8;
  --changed: #f6e09a;
  --warn: #835300;
  --warn-tint: #faeecb;
  --win-bar: #e3e7ea;
  --cur-line: #e3f0ec;
  --syn-reg: #7a4700;
  --syn-num: #0b5d88;
  --syn-str: #9e2f1c;
  --syn-dir: #0b6b5d;
  --syn-comment: #6a7179;
  --bp: #b3261e;
  --shadow-win: 0 0 0 1px rgb(26 29 33 / 0.10), 0 24px 48px -12px rgb(26 29 33 / 0.22);

  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.5rem);
  --step-4: clamp(2.3rem, 1.5rem + 3.6vw, 3.6rem);
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #1d2024; --panel: #24282d; --paper: #181b1f; --raised: #2b3036;
    --line: #353b42; --line-strong: #4d555e; --ink: #e3e6ea; --muted: #9ba3ac;
    --accent: #4cc0a9; --accent-hover: #5fcdb6; --on-accent: #0f1a18; --accent-tint: #1f3a35;
    --changed: #5e4f17; --warn: #e2b04f; --warn-tint: #3a3020; --win-bar: #2a2e33; --cur-line: #1d3833;
    --syn-reg: #e8b86a; --syn-num: #7cc3ee; --syn-str: #f29a85; --syn-dir: #6fd3be; --syn-comment: #8a929b;
    --bp: #f2786d;
    --shadow-win: 0 0 0 1px rgb(255 255 255 / 0.08), 0 24px 48px -12px rgb(0 0 0 / 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #1d2024; --panel: #24282d; --paper: #181b1f; --raised: #2b3036;
  --line: #353b42; --line-strong: #4d555e; --ink: #e3e6ea; --muted: #9ba3ac;
  --accent: #4cc0a9; --accent-hover: #5fcdb6; --on-accent: #0f1a18; --accent-tint: #1f3a35;
  --changed: #5e4f17; --warn: #e2b04f; --warn-tint: #3a3020; --win-bar: #2a2e33; --cur-line: #1d3833;
  --syn-reg: #e8b86a; --syn-num: #7cc3ee; --syn-str: #f29a85; --syn-dir: #6fd3be; --syn-comment: #8a929b;
  --bp: #f2786d;
  --shadow-win: 0 0 0 1px rgb(255 255 255 / 0.08), 0 24px 48px -12px rgb(0 0 0 / 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--ui);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--paper);
}
::selection { background: var(--accent-tint); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); font-weight: 750; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
kbd {
  display: inline-block; padding: 0 0.4em; border-radius: 4px; line-height: 1.5;
  background: var(--raised); box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 var(--line-strong);
  font-size: 0.78em; color: var(--ink);
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--paper); padding: 8px 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap {
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}

/* Header */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; font-size: var(--step--1); }
.site-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius); font: 600 var(--step--1)/1 var(--ui); text-decoration: none;
  background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn:hover { color: var(--ink); background: var(--panel); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.btn.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
/* "Coming soon": looks like a button, isn't one (a <span>, so it isn't focusable or clickable). */
.btn.soon { cursor: default; }
.btn.primary.soon:hover { background: var(--accent); }
/* Text for screen readers only. */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.term-fig { margin: 0; min-width: 0; }
.btn .sub { font-weight: 400; opacity: 0.85; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Bands */
.band { padding-block: clamp(56px, 8vw, 96px); }
.band.ground { background: var(--ground); }
.band-head { display: grid; gap: 12px; max-width: 62ch; margin-bottom: 40px; }
.band-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.eyebrow {
  font: 600 0.75rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 72px) clamp(56px, 7vw, 88px); background: var(--ground); overflow: hidden; }
.hero .wrap { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 980px) { .hero .wrap { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.hero-copy { display: grid; gap: 20px; min-width: 0; }
.hero-copy .lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 40ch; }
.hero-copy .fine { font-size: var(--step--1); color: var(--muted); }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.platforms li { font: 500 0.8rem/1 var(--mono); padding: 6px 10px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }

/* The debugger window mock */
.win { min-width: 0; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-win); overflow: hidden; font-size: 13px; }
.win-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--win-bar); border-bottom: 1px solid var(--line); }
.lights { display: flex; gap: 7px; flex: none; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.win-title { display: grid; line-height: 1.25; min-width: 0; }
.win-title b { font-weight: 600; font-size: 13px; }
.win-title span { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--mono); padding: 5px 9px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.win-body { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .win-body { grid-template-columns: minmax(0, 1fr) 200px; } }
.code { margin: 0; padding: 10px 0; overflow-x: auto; font: 400 12.5px/21px var(--mono); counter-reset: ln; }
.code .l { display: block; white-space: pre; padding-right: 16px; }
.code .l::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3.2em; padding-right: 1em; text-align: right; color: var(--line-strong); }
.code .l.bp::before { color: var(--on-accent); background: radial-gradient(circle at 70% 50%, var(--bp) 0 6px, transparent 6.5px); color: transparent; }
.code .l.cur { background: var(--cur-line); box-shadow: inset 3px 0 0 var(--accent); }
.code .l.done { background: color-mix(in srgb, var(--changed) 45%, transparent); }
.k { color: var(--syn-dir); font-weight: 600; }
.r { color: var(--syn-reg); }
.n { color: var(--syn-num); }
.c { color: var(--syn-comment); font-style: italic; }
.lbl { color: var(--ink); font-weight: 600; }
.side { border-top: 1px solid var(--line); background: var(--panel); padding: 12px 14px; display: grid; gap: 12px; align-content: start; }
@media (min-width: 620px) { .side { border-top: 0; border-left: 1px solid var(--line); } }
.side h4 { margin: 0; font: 600 10.5px/1 var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.regs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; margin: 0; font: 400 12px/20px var(--mono); font-variant-numeric: tabular-nums; }
@media (max-width: 619px) { .regs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.regs div { display: flex; justify-content: space-between; gap: 6px; padding: 0 4px; border-radius: 3px; }
.regs dt { color: var(--muted); }
.regs dd { margin: 0; }
.regs .chg { background: var(--changed); }
.flags { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; text-align: center; font: 400 11.5px/1.5 var(--mono); }
.flags span { display: grid; border-radius: 3px; padding: 2px 0; }
.flags small { color: var(--muted); font-size: 10px; }
.flags .chg { background: var(--changed); }
.explain { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 12px 16px 14px; display: grid; gap: 4px; background: var(--paper); font-size: 13px; line-height: 1.5; }
.explain .head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.explain code { color: var(--accent); font-weight: 600; }
.explain .math { font-family: var(--mono); font-size: 12.5px; }
.explain .why { color: var(--muted); }
.hist { grid-column: 1 / -1; display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--win-bar); overflow-x: auto; font: 400 11px/1 var(--mono); color: var(--muted); }
.hist span { flex: none; padding: 5px 8px; border-radius: 4px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.hist span.now { background: var(--accent); color: var(--on-accent); box-shadow: none; }

/* Feature groups */
.groups { display: grid; gap: 40px 48px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.group { display: grid; gap: 12px; align-content: start; min-width: 0; }
.group > p { color: var(--muted); }
.group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.group li { position: relative; padding-left: 1.4rem; line-height: 1.5; }
.group li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.group .tag { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* Spotlight: one feature with a short example */
.spot { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 860px) { .spot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.spot .copy { display: grid; gap: 14px; min-width: 0; }
.spot .copy p { color: var(--muted); }
.card { min-width: 0; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); padding: 18px 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chips li { font: 500 0.78rem/1 var(--mono); padding: 7px 10px; border-radius: 6px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.chips li.pro { box-shadow: inset 0 0 0 1px var(--accent); }
.legend { font-size: var(--step--1); color: var(--muted); }

/* Free and Pro */
.table-scroll { overflow-x: auto; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); background: var(--paper); }
table.plans { width: 100%; min-width: 520px; border-collapse: collapse; font-size: var(--step--1); }
.plans th, .plans td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.plans thead th { font: 600 0.75rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
.plans tbody th { font-weight: 500; }
.plans tbody th small { display: block; color: var(--muted); font-weight: 400; }
.plans td { width: 22%; font-variant-numeric: tabular-nums; }
.plans tr:last-child > * { border-bottom: 0; }
.plans .yes { color: var(--accent); font-weight: 600; }
.plans .part { color: var(--muted); }
.plans .sect th { background: var(--ground); font: 600 0.75rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-block: 9px; }

.price { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: center; margin-top: 32px; }
@media (min-width: 860px) { .price { grid-template-columns: auto minmax(0, 1fr) auto; } }
.price .amount { font: 700 var(--step-4)/1 var(--display); letter-spacing: -0.03em; }
.price .amount small { font: 500 var(--step-0)/1 var(--ui); letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.price ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--muted); }
.price li strong { color: var(--ink); font-weight: 600; }

/* Two-up text blocks */
.split { display: grid; gap: 32px 48px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.split > div { display: grid; gap: 12px; align-content: start; min-width: 0; }
.split p { color: var(--muted); }

/* Teachers page */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; padding: 18px 20px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.steps li::before { content: counter(step); font: 700 var(--step-2)/1 var(--display); color: var(--accent); }
.steps li p { color: var(--muted); font-size: var(--step--1); }
.steps .who { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.term { margin: 0; padding: 16px 18px; border-radius: 10px; background: #15181b; color: #e3e6ea; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; font: 400 12.5px/1.7 var(--mono); white-space: pre; }
.term .p { color: #8a929b; }
.term .ok { color: #7fd9c4; }
.term .no { color: #f2a29a; }
.note { display: grid; gap: 6px; padding: 14px 16px; border-radius: 10px; background: var(--warn-tint); color: var(--ink); font-size: var(--step--1); }
.note strong { color: var(--warn); }
.labs { columns: 2 220px; column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.labs li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; }
.labs li code { flex: none; color: var(--muted); font-size: 0.78em; width: 3.5em; }
.cta { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: 14px; background: var(--accent-tint); }
@media (min-width: 860px) { .cta { grid-template-columns: minmax(0, 1fr) auto; } }
.cta p { color: var(--muted); max-width: 60ch; }
.request-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; color: var(--muted); }
.request-steps strong { color: var(--ink); }
.cta .addr { font: 500 var(--step--1)/1.4 var(--mono); color: var(--ink); user-select: all; }

/* Prose pages */
.prose { max-width: 68ch; display: grid; gap: 16px; }
.prose h1 { font-size: var(--step-3); }
.prose h2 { font-size: var(--step-1); margin-top: 16px; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose .meta { color: var(--muted); font-size: var(--step--1); }
.faq { display: grid; gap: 0; max-width: 72ch; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 4px; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style-position: outside; }
.faq details > div { padding: 0 0 16px; color: var(--muted); display: grid; gap: 10px; }
.faq details > div code { color: var(--ink); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--ground); font-size: var(--step--1); color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding-block: 28px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .code .l.cur { animation: pulse 2.4s ease-in-out 1; }
  @keyframes pulse { 0%, 100% { box-shadow: inset 3px 0 0 var(--accent); } 50% { box-shadow: inset 6px 0 0 var(--accent); } }
}
