/* Darkroom: the look every page shares. Base.astro loads it after the kit CSS and before square.css (which goes last).
   An ink page that holds light paper: the kit's "inverse" tokens are the paper, so each sheet is .paper.ground-inverse. */
@font-face { font-family: "Jost"; src: url("/fonts/Jost-var.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Cascadia Mono"; src: url("/fonts/cascadia-mono.woff2") format("woff2"); font-display: swap; }

:root {
  --p-bg: #111114; --p-surface: #1d1d20; --p-ink: #ffffff; --p-muted: #b3b3b8;
  --p-accent: #ffffff; --p-accent-ink: #111114; --p-action: #ffffff; --p-action-ink: #111114;
  --p-inv-bg: #fafafa; --p-inv-surface: #f1f1f2; --p-inv-ink: #111114; --p-inv-muted: #55555c;
  --p-inv-accent: #111114; --p-inv-accent-ink: #fafafa; --p-inv-action: #111114; --p-inv-action-ink: #fafafa;
  --font-display: "Jost", "Segoe UI", Arial, sans-serif;
  --font-text: "Segoe UI", Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --display-weight: 500; --display-tracking: -0.02em; --display-tracking-xl: -0.03em;
  --violet: #8038ff; --green: #00d639;
  /* the page is ink, so native scrollbars and controls render dark; the paper sheets flip back to light below */
  color-scheme: dark;
  /* fallback fonts are scaled to the web font's x-height, so the Jost swap doesn't reflow headings */
  font-size-adjust: from-font;
}
.ground-inverse { color-scheme: light; }

/* product names: "proto" in the text colour, the brackets in the product colour, on ink and on paper alike */
/* the .pname form outranks the kit's `.menu-col a span` (muted, small), which would otherwise grey the brackets */
.br--typd, .pname .br.br--typd { color: #3B5BFF; }
.br--post, .pname .br.br--post { color: #FF5A1F; }
.br--code, .pname .br.br--code { color: #8038FF; }
.br--docs, .pname .br.br--docs { color: #00D639; }
.menu-col a > .pname, .menu-col a > .pname .br { font-size: inherit; font-weight: inherit; }
.menu-col a > .pname { color: inherit; font-size: inherit; font-weight: inherit; }
/* desktop Solutions panel: the names stack in a centred column under the centred nav, at heading size in the wordmark face */
@media (min-width: 1024px) {
  .nav--centre .nav__menu .menu-col { grid-column: 1 / -1; justify-items: center; }
  .nav--centre .nav__menu .menu-col a { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); }
}

.nav__logo img { height: 26px; width: auto; }
/* a word underlined in the proto[typd] blue (the home headline's "your") */
.u-typd { text-decoration: underline 0.07em #3B5BFF; text-underline-offset: 0.12em; text-decoration-skip-ink: none; }

/* Solutions is a button that only opens its menu: the kit's own chevron button would be a second, redundant target */
.nav__item:has(> [data-nav-expand]) > .nav__expand { display: none; }
/* padding and size come from the kit's .nav__link, so only the button's own defaults are reset here */
button.nav__link { background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav__item.is-expanded > .nav__link .chev { transform: rotate(180deg); }

/* the paper: flat, square, one neutral shadow at most (none here) */
.paper { background: var(--bg); color: var(--ink); border-radius: var(--r-lg); }
.paper .ground-inverse, .paper { --line: color-mix(in oklab, var(--ink) 14%, transparent); }
.rule { display: block; height: 2px; width: 100%; background: var(--rule, var(--ink)); }
.rule--typd { --rule: #3B5BFF; } .rule--post { --rule: #FF5A1F; } .rule--code { --rule: var(--violet); } .rule--docs { --rule: var(--green); }
.paper img.wm { height: auto; }

/* hero: the field guide as a cover */
.hero--split .hero__media.paper { background: var(--bg); display: flex; flex-direction: column; padding: var(--s-7); gap: var(--s-6); }
.cover__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.cover__top .t-label { color: var(--muted); }
/* the cover's label: a violet tab hanging off the rule */
.cover__rule { position: relative; }
.cover__tab { position: absolute; right: 0; top: 2px; background: var(--violet); color: #fff; font: 500 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px 9px; }
.cover__title { margin-top: auto; font: var(--display-weight) clamp(40px, 4.4vw, 64px)/1.02 var(--font-display); letter-spacing: var(--display-tracking-xl); max-width: 11ch; }
.cover__line { font-size: var(--t-lead); line-height: 1.45; color: var(--ink); max-width: 30ch; margin: 0; }
.cover__foot { display: flex; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--muted); }
/* desktop split heroes: words and picture sized to their content and centred together in the screen, so a tall
   monitor doesn't leave them pinned to the top over an empty half-screen */
@media (min-width: 1024px) {
  .hero--split .hero-text.hero__grid { grid-template-rows: auto; align-content: center; align-items: center; }
  .hero--split .hero__grid > .hero__text { height: auto; }
}
/* the home hero's cover is a link to the post, sized to its content beside the words rather than the whole screen */
.hero--split .hero__media.hero__cover { height: auto; flex: 0 0 auto; gap: var(--s-5); padding: var(--s-6); color: var(--ink); text-decoration: none; }
.hero__cover .cover__title { margin-top: var(--s-4); font-size: clamp(32px, 3vw, 44px); }
.hero__cover:hover .cover__title { text-decoration: underline 2px; text-underline-offset: 0.15em; }
.hero__fact { font-size: var(--t-small); color: var(--muted); margin: var(--s-5) 0 0; }

/* sheets: one page per product, one per field guide */
.sheets { align-items: stretch; row-gap: var(--s-6); }
.sheet { display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-7); }
.sheet .t-card { font: var(--display-weight) clamp(26px, 2.1vw, 30px)/1.2 var(--font-display); letter-spacing: var(--display-tracking); max-width: 22ch; margin: 0; }
.sheet__link { margin-top: auto; }
/* a post card is its share image, as one link */
.post-card { display: block; }
.post-card img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); transition: outline-color 150ms; outline: 2px solid transparent; outline-offset: 4px; }
@media (hover: hover) { .post-card:hover img { outline-color: var(--ink); } }
.sec-link { margin-top: var(--s-6); }
@media (max-width: 639px) { .sheet, .hero--split .hero__media.paper { padding: var(--s-5); } }

/* The kit's dev guard (system.js) outlines bracketed text for the design checker. Product names and code samples
   are bracketed by design, so the live site never shows that outline; the checker still reads <html data-placeholders>. */
[data-placeholder] { outline: none; }

/* The kit holds a section to exactly its screens on a desktop, and the hero to one screen everywhere: right for a
   fixed design, wrong for a live site, where a new post or a longer answer would run under the next section.
   Every section here (and the footer) is as tall as its content, at every width, so no screen-sized gaps open below short sections. */
main > :is(section, .section):not(.hero, .section--hero), footer.closing { height: auto; min-height: 0; }
@media (max-width: 639px) {
  main > :is(.hero, .section--hero) { height: auto; min-height: 100svh; }
  /* its columns size to their content too, so the paper cover is never squeezed and clipped */
  main > :is(.hero, .section--hero) > .wrap, main > :is(.hero, .section--hero) > .wrap > .hero-text { height: auto; }
  main > :is(.hero, .section--hero) .hero__media { flex: 0 0 auto; height: auto; }
}

/* The kit's arrow style puts an arrow on every .btn, but an arrow says "this takes you somewhere".
   Only links go somewhere; buttons that act in place (cookie choices, form steps & sends, copy) get none. */
html[data-buttons="arrow"] :is(button, input):is(.btn--primary, .btn--secondary)::after { content: none; }

/* FAQ questions: a touch larger, underlined in the page's product colour (.faq--code violet, .faq--docs green). */
.faq .faq__item > h3 { font-size: calc(var(--t-lead) * 1.2); line-height: 1.35; text-decoration: underline 2px var(--faq-accent, currentColor); text-underline-offset: 0.3em; }
.faq > .faq__item { gap: var(--s-3); }
.faq--code { --faq-accent: #8038ff; }
.faq--docs { --faq-accent: #00d639; }

/* The kit hides a menu word's inline chevron in the phone sheet and draws its own .nav__expand button instead.
   Solutions is the toggle itself (that button is hidden above), so its own chevron stays, at the row's end. */
.nav.is-open .nav__link[data-nav-expand] { width: 100%; justify-content: space-between; }
.nav.is-open .nav__link[data-nav-expand] .chev { display: block; width: 16px; height: 16px; }

/* Phones: the footer's three link columns share one row, so Company doesn't open a second, mostly empty row. */
@media (max-width: 639px) { .closing__links .footer__col { grid-column: auto / span 4; } }

/* phone film crop: each film's content fills the frame height between x 12% and 88%; phones show just that (frame aspect 1463:1080; video 100/76.19 = 131.25% wide, offset -11.9/76.19 = -15.62% left) */
@media (max-width: 639px) {
  figure.film.film--wide, figure.film.hero__film { aspect-ratio: 1463 / 1080; overflow: hidden; }
  figure.film.film--wide .film__video, figure.film.hero__film .film__video { inset: 0 auto auto -15.62%; max-width: none; width: 131.25%; height: 100%; }
}

/* Large desktops: a hero film takes seven columns (6-12) instead of six, still ending on the right line */
@media (min-width: 1440px) { .hero--split .hero__grid > .hero__media:has(> .hero__film) { grid-column: 6 / span 7; } }
