/* The site's own pages (the landing page, Verge's page and docs, and the not-found page), after
   base.css: the parts no other page of the project shares. Colours, type and line patterns come
   from tokens.css: this file names roles, never values. */
/* The landing's hero: the project's statement, its headline balanced so no width leaves one word on
   a line of its own, over the project's mark. */
.hero-band { position: relative; overflow: hidden; }
.hero { position: relative; padding: 44px 0 52px; }
.hero > :not(.hero-mark) { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(30px, 3.75vw, 48px); line-height: 1.14; margin: 0 0 24px; max-width: 17em; text-wrap: balance; }
.hero .lede { max-width: 30em; }
/* The mark large behind the text's right side, cropped by the band. Its faintness is an opaque mix,
   not opacity, so the ruler passes behind the ring rather than through it (header.js); the ruler at
   half strength. */
.hero-mark { position: absolute; z-index: 0; top: 44%; right: -6%; width: min(560px, 82vw); aspect-ratio: 1; transform: translateY(-50%);
  color: color-mix(in srgb, var(--ink) 8%, var(--page)); pointer-events: none; }
.hero-mark svg { display: block; width: 100%; height: 100%; }
.hero-mark .pm-ruler { opacity: .5; }
.dialface { position: relative; }
/* The dial's script draws a square of up to 480 px; its place is held from the first paint. */
.js .dialface { aspect-ratio: 1; max-width: 480px; margin-inline: auto; }
.dialface svg { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto; }
/* A reading on the dial draws its own focus ring: an outline on an SVG group is not drawn everywhere. */
.dialface .reading { outline: none; }
.dialface .reading .focus { visibility: hidden; }
.dialface .reading:focus-visible .focus { visibility: visible; }
/* The outer scale: ticks up to the reading in ink, the rest faded toward the ring. */
.dialface .tick { stroke: color-mix(in srgb, var(--ink) 35%, var(--ring)); }
.dialface .tick.on { stroke: var(--ink); }
.reading { text-align: center; color: var(--ink-2); font-size: 15px; max-width: 30em; margin: 14px auto 0; }
/* Verge's figure: the dial stands apart without the kit's rule beside it (base.css), its caption
   centred under it. The caption is the figure's last paragraph, which the kit sets as a link. */
.dial-figure { border-left: 0; padding-left: 0; }
.dial-figure p.reading { color: var(--ink-2); font-weight: 400; margin: 14px auto 0; }
/* Beside the text, the dial starts level with the product's name rather than under it: the head is
   one grid, the dial in its right column across the name's row and the text's. */
@media (min-width: 861px) {
  .dial-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gutter); align-items: start; }
  .dial-head > .product-id { grid-column: 1; grid-row: 1; }
  .dial-head > .two { display: contents; }
  .dial-head > .two > :first-child { grid-column: 1; grid-row: 2; }
  .dial-head .dial-figure { grid-column: 2; grid-row: 1 / span 2; }
}

/* A product's row on the landing: its name over its text in the left column, and the column beside
   them level with the name, as Verge's page sets its head. On an ultrawide screen the name takes the
   heading column, as a section's heading does, and the rest the content column (base.css). */
@media (min-width: 861px) {
  /* The name's row as tall as the name: a taller column beside them lengthens the text's row. */
  .product-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--gutter); align-items: start; }
  .product-row > .app { grid-column: 1; grid-row: 1; }
  .product-row > .two { display: contents; }
  .product-row > .two > :first-child { grid-column: 1; grid-row: 2; }
  .product-row > .two > :last-child { grid-column: 2; grid-row: 1 / span 2; }
}
@media (min-width: 2000px) {
  .product-row > .app { align-items: start; margin: 0; }
  .product-row > .two { display: grid; grid-column: 2; grid-row: 1; }
  .product-row > .two > :first-child, .product-row > .two > :last-child { grid-column: auto; grid-row: auto; }
}
.app { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.app .plate { width: 58px; height: 58px; border-radius: 13px; }
.app .plate svg { width: 40px; height: 40px; }
/* The app's name heads the Verge section, set as a name rather than a section heading. */
.app .name { font: 600 21px/1.1 var(--font-text); font-stretch: normal; letter-spacing: 0; }
.app p { color: var(--ink-2); font-size: 15px; margin: 0; }
/* Under the list, the verge command behind the term pointed at; verge list when none is. */
.specs-col .console { margin-top: 18px; }
/* A program's name in the list, set as the console below sets it. */
.specs code { font: 500 .88em var(--font-code); font-stretch: var(--code-stretch); }
/* A term shows its command in the console: a solid hair underline in rule, apart from the dotted
   line of a figure that points at its evidence (.ref). landing.js makes the terms; without it they
   are plain words. A term pinned by a click keeps its command in the console. */
.term { text-decoration: underline solid var(--rule); text-decoration-thickness: 1px; text-underline-offset: .22em; cursor: default; }
.term:hover, .term:focus-visible, .term.pinned { text-decoration-color: var(--ink); }
.term.pinned { background: var(--wash); }

/* Verge's Wires: a row for each wire, as the docs below list theirs. Its figures are tickwave
   references that open the stretch of recording they come from, and its recordings sit under the
   text, each a row with the button that opens it, as the measurements page lists them. */
.wire-intro { max-width: 36em; margin: 0 0 22px; }
/* Only scripts underline a figure, so only they get the hint. */
html:not(.js) .wire-hint { display: none; }
.wire-rows { margin: 0; }
.wire-rows > div { display: grid; grid-template-columns: 30% minmax(0, 1fr); padding: 16px 0; border-top: 1px solid var(--hair); }
.wire-rows > div:last-child { border-bottom: 1px solid var(--hair); }
.wire-rows dt { font-weight: 600; }
.wire-rows dd { margin: 0; }
.wire-rows dd > p { margin: 0 0 6px; max-width: 36em; text-wrap: pretty; }
/* A recording's row, set through tickwave's properties, which its sheet reads too: the row is the
   same before and after tickwave.js defines the view. */
.wire-rows tickwave-view { margin: 0; font-size: 15px; --tickwave-summary-padding: 8px 0 0; --tickwave-summary-gap: 2px 24px;
  --tickwave-summary-border-width: 0; --tickwave-summary-background: none; --tickwave-summary-radius: 0;
  --tickwave-title-size: 15px; --tickwave-facts-size: 14px;
  --tickwave-open-button-size: 14px; --tickwave-open-button-padding: 5px 14px; --tickwave-open-button-height: 32px; }
.wire-rows tickwave-view::part(viewer) { background: var(--surface); border: 0; border-radius: 14px; margin: 10px 0 4px; }
tickwave-ref { cursor: help; }
/* Without scripts a recording has no buttons of tickwave's, so the page gives its download link
   under it. */
.recordings .download { margin: 4px 0 0; font-size: 14px; }
@media (max-width: 860px) {
  .wire-rows > div { grid-template-columns: minmax(0, 1fr); }
  .wire-rows dd { margin-top: 4px; }
}

.claim { font: 500 20px/1.5 var(--font-text); max-width: 36em; margin: 0 0 28px; }
/* The Source section's index: a row per repository, its name and language beside what it is. */
.repos-cols, .repos > div { display: grid; grid-template-columns: 30% minmax(0, 1fr); }
.repos-cols { font-size: 13px; font-weight: 500; color: var(--ink-2); padding-bottom: 8px; }
.repos { margin: 0; }
.repos > div { padding: 14px 0; border-top: 1px solid var(--hair); }
.repos dt { padding-right: 16px; }
.repos dt a { display: block; font-weight: 600; text-decoration: none; }
.repos dt a:hover { text-decoration: underline; }
.repos .lang { display: inline-block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.repos .licence { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.repos dd { margin: 0; color: var(--ink-2); font-size: 15px; text-wrap: pretty; }

@media (max-width: 860px) {
  .repos-cols { display: none; }
  .repos > div { grid-template-columns: minmax(0, 1fr); }
  .repos dd { margin-top: 4px; }
}

#tickwave .ways { margin: 22px 0 0; }
/* tickwave's section shows one read from a recording, on a panel as Verge's Figure 1 is, with its
   caption under it. The inset takes no margin of its own, so the panel spaces it. */
#tickwave .product-figure figcaption { font-size: 15px; margin: 12px 0 0; max-width: none; text-wrap: pretty; }
/* tickwave draws the read; without scripts there is nothing to show. */
html:not(.js) #tickwave .product-figure { display: none; }
/* The inset holds its final height from the first paint, through the moment it is defined with
   nothing to size by: its label's lines over the trace. The label, the decoder's, takes one line in
   a panel 470 px wide or more, two down to 311 px, and three below that, in either browser. A flow
   root, so no margin inside it reaches out and moves it as it is defined. */
#tickwave .chart { container-type: inline-size; }
#tickwave tickwave-inset { display: flow-root; height: 138.8px; overflow: clip; }
@container (width < 470px) { #tickwave tickwave-inset { height: 155px; } }
@container (width < 311px) { #tickwave tickwave-inset { height: 171.8px; } }
/* The not-found page: the dial with its edge left flat, beside what to do next. */
.notfound { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; padding: 88px 0 104px; }
.notfound svg { width: 136px; height: 136px; color: var(--ink-2); }
.notfound .lede { text-wrap: pretty; }
.notfound .ways { margin: 8px 0 0; }
@media (max-width: 640px) {
  .notfound { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 48px 0 72px; }
  .notfound svg { width: 96px; height: 96px; }
}

/* Verge's page: its head (base.css), then sections as the landing page's. */
/* What each probe has: features down the side, the two probes across, read from the left. */
.probes th, .probes td { text-align: left; white-space: normal; vertical-align: top; padding: 9px 12px 9px 0; }
.probes thead th { font: 600 15px/1.3 var(--font-text); }
.probes tbody th { font-weight: 400; font-size: 15px; color: var(--ink-2); width: 22%; border-bottom-color: var(--hair); }
.probes td { width: 39%; }
.probes td.no { color: var(--ink-2); }
/* How it works: the chip as a schematic draws it, a ruled package with pin ticks on its edges, the
   host's USB line coming in from the left and the target's wires leaving to the right. */
.arch { display: grid; grid-template-columns: auto minmax(24px, 64px) minmax(0, 1fr) minmax(48px, 120px) auto; align-items: center; }
.arch-end { display: grid; gap: 2px; font-size: 15px; }
.arch-end span { color: var(--ink-2); font-size: 14px; }
.arch-line { height: 1.5px; background: var(--ink); }
.arch-line.wire { height: 24px; background: none; color: var(--series-verge); }
.arch-line.wire svg { width: 100%; height: 100%; display: block; }
.arch-line.wire .down { display: none; }
.chip { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); border: 1.5px solid var(--ink); border-radius: 4px; padding: 30px 22px 20px; }
.chip::before, .chip::after { content: ""; position: absolute; top: 14px; bottom: 14px; width: 6px; background: repeating-linear-gradient(var(--ink) 0 1.5px, transparent 1.5px 14px); }
.chip::before { left: -7.5px; }
.chip::after { right: -7.5px; }
.chip-name { position: absolute; top: 8px; left: 22px; font: 500 12px/1 var(--font-code); color: var(--ink-2); letter-spacing: .04em; }
.core h3 { font: var(--display-weight) 17px/1.2 var(--font-display); font-stretch: var(--display-stretch); margin: 0; }
.core-job { color: var(--ink-2); font-size: 14px; margin: 2px 0 10px; }
.core ul { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.core li { padding: 4px 0; border-top: 1px solid var(--hair); }
.mailbox { position: relative; width: 1px; margin: 0 22px; border-left: 1.5px dashed var(--rule); }
.mailbox span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg); background: var(--page); padding: 0 6px; font: 500 12px/1 var(--font-code); color: var(--ink-2); white-space: nowrap; }
.arch figcaption { grid-column: 1 / -1; margin-top: 18px; }
@media (max-width: 860px) {
  /* The schematic runs top to bottom: the host above, the cores stacked, the target below. */
  .arch { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .arch-line { width: 1.5px; height: 28px; }
  .arch-line.wire { width: 24px; height: 64px; }
  .arch-line.wire .across { display: none; }
  .arch-line.wire .down { display: block; }
  .arch-end { justify-items: center; text-align: center; }
  .chip { justify-self: stretch; grid-template-columns: minmax(0, 1fr); padding: 30px 18px 16px; }
  .chip::before, .chip::after { top: auto; bottom: auto; left: 14px; right: 14px; width: auto; height: 6px; background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 14px); }
  .chip::before { top: -7.5px; }
  .chip::after { bottom: -7.5px; }
  .mailbox { width: auto; height: 1px; margin: 20px 0; border-left: 0; border-top: 1.5px dashed var(--rule); }
  .mailbox span { transform: translate(-50%, -50%); }
  .arch figcaption { justify-self: stretch; }
}
@media (max-width: 520px) {
  /* The landing's head closes up to the first section's line, as a product's head does (base.css). */
  .hero { padding: 16px 0 32px; }
  .hero-mark { right: -22%; }
  .probes tbody th { width: 30%; }
}

.chart tickwave-chart { display: block; }
/* Figure 1 is drawn by a script; without one, Table 1 holds every figure. */
html:not(.js) #measurements figure:has(.chart) { display: none; }
/* Figure 1's plot height, stated once: tickwave's sheet reserves it before the chart is defined. */
#chart { --tickwave-chart-height: 300px; }
