:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1b1f24;
  --muted: #5b6470;
  --line: #dde1e6;
  --accent: #2f6fd6;
  --accent-text: #ffffff;
  --code-bg: #eef1f5;
  --warn-bg: #fff6e0;
  --warn-line: #f0d48a;
  --accent-soft: #e4edfc;
  --visited: #6b4fbb;
  --accent-strong: #2159b8;
  --bad: #d64545;
  --good: #1d7a3e;
}
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --card: #1a1f25;
    --text: #e6e9ed;
    --muted: #9aa4b0;
    --line: #2c333b;
    --accent: #6a9cf0;
    --accent-text: #0d1117;
    --code-bg: #232a32;
    --warn-bg: #2e2716;
    --warn-line: #6b5a24;
    --accent-soft: #1d2a40;
    --visited: #b59cf5;
    --accent-strong: #6a9cf0;
    --bad: #f07070;
    --good: #5cc584;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "Lexend", "Iceblock Emoji", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 640px; margin: 0 auto; padding: 40px 16px 64px; }
header { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
header img { width: 36px; height: 36px; flex: none; }
header h1 { font-size: 1.5rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
a { color: var(--accent); }
a:visited { color: var(--visited); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 18px;
}
ol { padding-left: 1.3em; margin: 0 0 14px; }
li { margin-bottom: 10px; }
.qr { display: flex; justify-content: center; margin: 8px 0 18px; }
.qr svg {
  width: min(280px, 100%);
  height: auto;
  background: #ffffff;
  border-radius: 8px;
  padding: 10px;
}
.cmd {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
code, .cmd pre {
  font: 13px/1.5 "Illinois Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg);
  border-radius: 6px;
}
code { padding: 1px 5px; }
.cmd pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre;
}
button {
  font: inherit;
  font-size: 0.9rem;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmd pre:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 500;
}
a.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.93rem;
}
.hidden { display: none; }
footer { margin-top: 28px; font-size: 0.85rem; color: var(--muted); }
footer a, footer button.link { color: inherit; }
/* Who makes it, and its licence (#129). */
footer p.made { margin: 8px 0 0; }
/* The flag keeps its colours, whatever the theme (#325). */
footer p.made img { vertical-align: -1px; border-radius: 1px; filter: none; forced-color-adjust: none; }
button.link {
  background: none;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}
dialog {
  max-width: min(560px, calc(100vw - 32px));
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
}
dialog > div { padding: 22px; }
dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
dialog h2 { margin-bottom: 14px; }
dialog h3 { font-size: 1rem; margin: 16px 0 6px; }
dialog p { font-size: 0.93rem; }
dialog .close { display: flex; justify-content: flex-end; margin-top: 8px; }
dialog .close button { padding: 8px 16px; }
#install-dialog { max-width: min(720px, calc(100vw - 32px)); }
#install-dialog .landing-section { margin-bottom: 0; }

/* The page without a link in it: what Iceblock is. */
body.landing main { max-width: 1040px; }
body.landing footer { text-align: center; }
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  margin: 8px 0 72px;
}
.hero h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 650;
  margin: 12px 0 18px;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
a.button.quiet {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}
.landing-section { margin-bottom: 80px; }
.landing-section > h2, .wide > div > h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.landing-section > .lede { margin-bottom: 32px; }
.wide > div > .lede { margin-bottom: 14px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.steps .card { margin: 0; }
.steps h3, .features h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.steps h3::before {
  counter-increment: step;
  content: counter(step) ". ";
  color: var(--accent);
}
.steps p, .features p { color: var(--muted); margin: 0; }
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.features .card { margin: 0; display: flex; flex-direction: column; }
.features .more { margin-top: auto; padding-top: 10px; font-size: 0.92rem; }
.questions { display: grid; gap: 12px; }
.questions .card { margin: 0; padding-top: 14px; padding-bottom: 14px; }
.questions summary { cursor: pointer; font-weight: 600; }
.questions p { color: var(--muted); margin: 10px 0 0; }
.features h3 { margin-top: 12px; }
.icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.icon svg { width: 22px; height: 22px; }
.wide { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; align-items: center; }
.platforms { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
button.platform {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  font-size: 1rem;
  font-weight: 500;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
}
button.platform .logo { height: 30px; width: auto; }
button.platform svg.logo { height: 22px; }
button.platform[aria-selected="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* Diagrams (#1231): each a file of its own, shown through <use>, drawn with its own styles (website/diagrams/diagram.css) in the page's colours and font, so they follow dark mode. Here only where it sits. */
.diagram { width: 100%; height: auto; display: block; color: var(--text); }
.docs-figure { margin: 18px 0; }
.docs-figure .diagram { max-width: 460px; margin: 0 auto; }
/* The app's own pages (#1216): at a phone's size at most, edged as a screen is. */
.docs-shot img { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 18px; }
.docs-shot figcaption { color: var(--muted); font-size: 0.92em; text-align: center; max-width: 460px; margin: 10px auto 0; }

@media (max-width: 820px) {
  .hero, .wide { grid-template-columns: 1fr; }
  .steps, .features { grid-template-columns: 1fr; }
  .hero { margin-bottom: 56px; }
  .landing-section { margin-bottom: 56px; }
}
@media (min-width: 821px) and (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

/* The documentation (#306): its pages listed beside the one shown, or
   above it on a phone. */
body.docs main { max-width: 1040px; }
body.docs header a { color: inherit; text-decoration: none; display: flex; }
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li { margin: 0 0 4px; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.docs-nav a:hover { background: var(--accent-soft); }
.docs-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
/* The pages' groups (#1218): each a heading that opens and closes. */
.docs-group { margin: 0 0 4px; }
.docs-group > summary { cursor: pointer; padding: 6px 10px; border-radius: 8px; font-weight: 600; color: var(--muted); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.docs-group > summary::-webkit-details-marker { display: none; }
.docs-group > summary::marker { content: none; }
.docs-group > summary::after { content: "▸"; transition: transform 0.15s; }
.docs-group[open] > summary::after { transform: rotate(90deg); }
.docs-group > summary:hover { background: var(--accent-soft); }
.docs-group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.docs-group > ul { padding-left: 8px; }
.docs-group-about { color: var(--muted); margin: -4px 0 8px; }
.docs-results .group { color: var(--muted); font-weight: normal; }
/* Search (#966): the box above the pages, what it finds in their place. */
.docs-search { margin: 0 0 12px; }
.docs-search input { width: 100%; box-sizing: border-box; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.docs-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.docs-search-status { margin: 6px 2px 0; color: var(--muted); font-size: 0.9em; }
.docs-search-status:empty { display: none; }
.docs-results { list-style: none; margin: 8px 0 0; padding: 0; }
.docs-nav .docs-results a { padding: 8px 10px; }
.docs-results a:focus { background: var(--accent-soft); outline: none; }
.docs-results .title { display: block; font-weight: 600; }
.docs-results .where { display: block; color: var(--muted); font-size: 0.88em; margin-top: 2px; overflow-wrap: anywhere; }
.docs-results mark { background: var(--accent-soft); color: var(--accent-strong); border-radius: 3px; padding: 0 1px; }
.docs-content h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.docs-content li { margin: 4px 0; }
.docs-content code { font-family: "Illinois Mono", ui-monospace, monospace; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; overflow-wrap: anywhere; }
/* A block's lines keep their shape, and scroll instead. */
.docs-content pre code { overflow-wrap: normal; }
.docs-content pre { background: var(--code-bg); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.docs-content pre code { background: none; padding: 0; }
/* Tables, as the SDK's pages use them; wide ones scroll on a phone. */
.docs-content table { display: block; overflow-x: auto; border-collapse: collapse; margin: 12px 0; font-size: 0.95em; }
.docs-content th, .docs-content td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.docs-content th { font-weight: 600; }
/* What's built, planned, missing or still to decide (/sdk/). */
.status { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 0.82em; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); }
.status.built { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-soft); }
.status.planned { color: var(--muted); }
.status.gap { background: var(--warn-bg); border-color: var(--warn-line); }
.status.open { border-style: dashed; color: var(--visited); border-color: var(--visited); }
@media (max-width: 720px) {
  /* minmax(0, …): never wider than the screen, however long a line of
     code (#615). */
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* The menu folded into a bar above the page: the page first, the list a tap away. */
  .docs-menu > summary { display: flex; align-items: center; gap: 0; white-space: nowrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; list-style: none; font-weight: 600; }
  .docs-menu > summary::-webkit-details-marker { display: none; }
  .docs-menu > summary::after { content: "▾"; margin-left: 8px; transition: transform 0.15s; }
  .docs-menu[open] > summary::after { transform: rotate(180deg); }
  .docs-menu[open] > summary { margin-bottom: 8px; }
  .docs-menu-here { flex: 1; min-width: 0; font-weight: normal; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
  .docs-menu > summary::marker { content: none; }
}
/* Beside the page, the menu's always open: no bar to fold it. */
@media (min-width: 721px) {
  .docs-menu > summary { display: none; }
}
/* The licence's text (#713): as it's written, wrapped to the page. */
.licence-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: "Illinois Mono", ui-monospace, monospace; font-size: 0.85em; background: var(--code-bg); padding: 12px; border-radius: 8px; }
/* The performance page (#968): its charts' colours, validated against
   the card in each mode (four slots, the light ones below 3:1 named on
   the chart and in the table, never by colour alone). */
.performance {
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
}
@media (prefers-color-scheme: dark) {
  .performance {
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
  }
}
.perf-section { margin-top: 28px; }
.perf-chart { position: relative; margin: 8px 0 4px; }
.perf-chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.perf-chart svg:focus { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.perf-chart .grid { stroke: var(--line); stroke-width: 1; }
.perf-chart .budget { stroke: var(--muted); stroke-width: 1; }
.perf-chart .axis { fill: var(--muted); font-size: 12px; }
.perf-chart .label { fill: var(--text); font-size: 12px; }
.perf-chart .leader { stroke: var(--muted); stroke-width: 1; }
.perf-chart .line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.perf-chart .dot { fill: var(--c); stroke: var(--card); stroke-width: 2; }
.perf-chart .cross { stroke: var(--muted); stroke-width: 1; }
.perf-chart .hit { fill: transparent; }
.perf-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; padding: 0; color: var(--text); font-size: 0.9em; }
.perf-legend li { margin: 0; display: flex; align-items: center; gap: 6px; }
.perf-legend .key, .perf-tip .key { display: inline-block; width: 14px; height: 2px; background: var(--c); border-radius: 1px; flex: none; }
.perf-tip { position: absolute; pointer-events: none; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.85em; box-shadow: 0 4px 12px rgb(0 0 0 / 0.12); white-space: nowrap; }
.perf-tip .head { color: var(--muted); margin-bottom: 4px; }
.perf-tip .row { display: flex; align-items: center; gap: 8px; }
.perf-tip strong { color: var(--text); min-width: 4.5em; }
.perf-tip .row span:last-child { color: var(--muted); }
.perf-table summary { cursor: pointer; color: var(--muted); font-size: 0.92em; margin: 4px 0; }
.perf-scroll { overflow-x: auto; }
.performance .docs-content table { display: table; }
.performance td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* A button the docs name, and the way to it, as the app shows them (#1067): each step a chip with its icon, in the text's colour. */
.action-path { display: inline; }
.action-step { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 8px; background: var(--code-bg); white-space: nowrap; font-size: 0.95em; }
.action-step + .action-sep { margin: 0 4px; opacity: 0.7; font-size: 1.3em; line-height: 1; vertical-align: -0.05em; }
strong.action-step { font-weight: 600; }
.mi { font-family: "Iceblock Icons"; font-weight: normal; font-style: normal; font-size: 1.15em; line-height: 1; display: inline-block; -webkit-font-smoothing: antialiased; font-feature-settings: "liga"; }
/* Said to screen readers, not shown. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The performance page's account of how it's measured: closed to begin with. */
.perf-about { margin: 24px 0 0; }
.perf-about > summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); }
/* Beside each chart's title, each measure's latest figure and how it moved: better green, worse red, the arrow and sign saying so too. */
.perf-row { display: flex; gap: 16px; align-items: flex-start; }
.perf-row .perf-chart { flex: 1; min-width: 0; }
.perf-trend { list-style: none; display: flex; flex-direction: column; gap: 10px; width: 200px; flex: none; margin: 34px 0 0; padding: 0; font-size: 0.9em; }
.perf-trend li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; align-items: baseline; }
.perf-trend .name { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .perf-row { flex-direction: column; }
  .perf-trend { width: auto; margin: 0; flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .perf-trend li { display: inline-flex; gap: 6px; }
}
.perf-trend .name { color: var(--muted); }
.perf-trend .move { font-weight: 600; font-size: 0.92em; padding: 0 6px; border-radius: 999px; }
.perf-trend .move.better { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.perf-trend .move.worse { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.perf-trend .move.same { color: var(--muted); }
.perf-none { color: var(--muted); font-style: italic; margin: 8px 0; }
.perf-group { margin: 32px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 1.25em; }
.perf-group:first-of-type { border-top: 0; padding-top: 0; }
/* A key's item in focus (hovered, focused or clicked): the chart's other lines, dots, keys and figures faded. */
.perf-legend li[data-series] { cursor: pointer; border-radius: 6px; }
.perf-legend li[data-series]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.perf-legend li[aria-pressed="true"] { font-weight: 600; }
.perf-chart .faded, .perf-trend .faded { opacity: 0.15; transition: opacity 0.12s; }
.perf-chart .line, .perf-chart .dot, .perf-legend li, .perf-trend li { transition: opacity 0.12s; }
/* The performance page's floating header: where you are, the group and the chart each opening the others. */
.perf-crumbs { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -8px -8px 12px; padding: 8px; background: var(--card, var(--bg)); border-bottom: 1px solid var(--line); font-size: 0.95em; }
.perf-crumbs > a { color: var(--muted); text-decoration: none; }
.perf-crumbs .sep { color: var(--muted); }
.perf-crumbs .crumb { position: relative; }
.perf-crumbs .crumb > button { font: inherit; font-weight: 600; color: var(--text); background: none; border: 1px solid transparent; border-radius: 8px; padding: 2px 8px; cursor: pointer; }
.perf-crumbs .crumb > button:hover, .perf-crumbs .crumb > button[aria-expanded="true"] { border-color: var(--line); background: var(--accent-soft); }
.perf-crumbs .crumb-menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 220px; max-width: 80vw; list-style: none; margin: 0; padding: 4px; background: var(--card, var(--bg)); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15); }
.perf-crumbs .crumb-menu a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.perf-crumbs .crumb-menu a:hover, .perf-crumbs .crumb-menu a:focus-visible { background: var(--accent-soft); }
.perf-crumbs .crumb-menu a[aria-current="true"] { font-weight: 600; color: var(--accent-strong); }
.perf-crumbs .logo { display: none; margin-right: 2px; }
.perf-crumbs.stuck .logo { display: inline-flex; }
.perf-crumbs .logo img { width: 22px; height: 22px; }
/* One line at a phone's width (#1233): each part as long as it can be, then cut with an ellipsis; a page's group left out where it's narrowest. */
@media (max-width: 600px) {
  .perf-crumbs { flex-wrap: nowrap; }
  .perf-crumbs .crumb { min-width: 0; flex: 0 1 auto; }
  .perf-crumbs .crumb > button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .perf-crumbs .sep, .perf-crumbs .logo { flex: none; }
  /* Performance's period gives way too, rather than squeeze the parts to a letter. */
  .perf-crumbs .perf-period { flex: 0 1 auto; min-width: 0; max-width: 38%; }
}
@media (max-width: 480px) {
  .perf-crumbs .crumb-group { display: none; }
}
.perf-crumbs .perf-period { margin-left: auto; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; }
/* The problem-report link on /report/, which is long: broken anywhere rather than run off a phone's screen. */
.report-link code { overflow-wrap: anywhere; }
