/* Two typefaces, both vendored under public/fonts/ with their SIL OFL 1.1
   licences beside them, so the site asks no third party for its letters.

   Basteleur, by Keussel, from the Velvetyne foundry, is a display face --
   Tarot de Marseille by way of Cooper Black -- so it sets headings and the
   name in the header, and nothing longer.

   Its two styles become two weights of one family. Bold is what a heading asks
   for by default; Moonlight is the hairline cut, for anything that asks for
   light. `swap` lets the text show in the fallback while the font arrives,
   rather than leaving a blank where the title should be. */
@font-face {
  font-family: "Basteleur";
  src: url("/fonts/basteleur/Basteleur-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Basteleur";
  src: url("/fonts/basteleur/Basteleur-Moonlight.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* PT Serif, by ParaType, from Google Fonts: everything that is read rather
   than glanced at. The files are Google's "Web" cuts of it, converted to
   WOFF2 as they are (Latin and Cyrillic, about 100 KB a style). A page only
   downloads the styles it uses, so most pages fetch the regular and nothing
   else. Anything set at 550-650 elsewhere in this file lands on the bold. */
@font-face {
  font-family: "PT Serif";
  src: url("/fonts/pt-serif/PTSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("/fonts/pt-serif/PTSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("/fonts/pt-serif/PTSerif-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("/fonts/pt-serif/PTSerif-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #fbfaf8;
  --fg: #1b1a18;
  --muted: #6b6760;
  --line: #e2ded6;
  --accent: #9a3412;
  --card: #ffffff;
  --radius: 10px;

  --font-body: "PT Serif", Georgia, "Times New Roman", serif;
  --font-display: "Basteleur", Georgia, "Times New Roman", serif;

  /* Code, and the six colours a syntax theme needs. Kept with the rest of
     the palette rather than in a vendored theme file, so light and dark are
     decided in one place. */
  --code-bg: #f4f1ec;
  --syntax-comment: #8a8478;
  --syntax-keyword: #9a3412;
  --syntax-string: #3f6212;
  --syntax-literal: #7c2d12;
  --syntax-name: #1e40af;
  --syntax-punct: #6b6760;

  /* Badge tones (UI::Badge): a tinted ground and a darker ink of the same
     hue, so the colour reads without shouting and the text keeps its
     contrast. */
  --tone-neutral-bg: #eeebe5;
  --tone-neutral-fg: #57534c;
  --tone-green-bg: #e6f0d8;
  --tone-green-fg: #3f6212;
  --tone-blue-bg: #e1e9f8;
  --tone-blue-fg: #1e40af;
  --tone-amber-bg: #fbecd2;
  --tone-amber-fg: #92400e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --fg: #eceae4;
    --muted: #9c978c;
    --line: #2c2a25;
    --accent: #f59e6b;
    --card: #1b1a16;

    --code-bg: #1d1c17;
    --syntax-comment: #857f73;
    --syntax-keyword: #f59e6b;
    --syntax-string: #a3c96a;
    --syntax-literal: #f0a882;
    --syntax-name: #9dbbf5;
    --syntax-punct: #9c978c;

    --tone-neutral-bg: #2a2823;
    --tone-neutral-fg: #bdb8ad;
    --tone-green-bg: #25301a;
    --tone-green-fg: #b5d67f;
    --tone-blue-bg: #1c2638;
    --tone-blue-fg: #a8c2f5;
    --tone-amber-bg: #372a16;
    --tone-amber-fg: #f2c27a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--font-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--accent); }

.site-header,
.site-footer,
.content {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}

.site-header__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--fg);
  text-decoration: none;
}

/* The navigation: one list of links (.site-header__links) in a UI::Popover.
   On a narrow screen that is a Menu button and a panel; from 40rem up the
   button goes and the panel is shown in the header as a plain row. The
   panel's display is overridden there on purpose: a closed popover is
   display:none by the browser's own stylesheet, and ours wins. */
.site-header__links { display: flex; flex-direction: column; gap: 0.25rem; }

.site-header__links a {
  color: var(--muted);
  text-decoration: none;
}

.site-header__links a:hover { color: var(--fg); }

.site-header__links a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Narrow: the panel drops from the top right, links set large enough to hit
   with a thumb. */
.site-header__menu {
  inset: 4.5rem 1rem auto auto;
  min-width: 12rem;
}

.site-header__menu .site-header__links a {
  display: block;
  padding: 0.5rem 0.25rem;
  font-size: 1.125rem;
}

@media (min-width: 40rem) {
  .site-header__nav .popover__trigger,
  .site-header__nav .popover__close { display: none; }

  /* Two classes, so it outranks .popover's card look, which comes later in
     this file with the same weight; with one, the row got a border, a
     background and a shadow. */
  .site-header__nav .site-header__menu {
    display: block;
    position: static;
    inset: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
  }

  .site-header__links { flex-direction: row; gap: 1.25rem; }
  .site-header__menu .site-header__links a { display: inline; padding: 0; font-size: inherit; }
}

.content { flex: 1; padding-top: 1rem; padding-bottom: 3rem; }

.site-footer {
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* The rule sits on the inner box so it spans the text, not the gutter; on the
   footer itself it overhung the column by the padding on either side. */
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.625rem;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.site-footer__dot { color: var(--muted); }

img { max-width: 100%; height: auto; }

/* The portrait hangs from the top of the name rather than floating beside
   the middle of the paragraph: centred against a block of three different
   things, it lined up with none of them. */
/* The portrait and the name are one row at every width -- the portrait is
   the name's picture, and on a phone it used to sit alone on a line above
   it. Wide: the portrait hangs beside everything. Narrow: it shrinks, sits
   beside the name, and the lede and links run the full width under both. */
.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "portrait name"
    "portrait lede"
    "portrait social";
  gap: 0.75rem 2rem;
  align-items: start;
}

.hero__portrait {
  grid-area: portrait;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.hero__name { grid-area: name; margin: -0.25rem 0 0; }
.hero__lede { grid-area: lede; margin: 0; }
.hero .social { grid-area: social; margin-top: 0.25rem; }

@media (max-width: 39.99rem) {
  .hero {
    grid-template-areas:
      "portrait name"
      "lede lede"
      "social social";
    column-gap: 1rem;
    align-items: center;
  }

  .hero__portrait { width: 64px; height: 64px; }
  .hero__name { margin: 0; font-size: 1.875rem; }
}

/* Inline SVG icons (UI::Icon): as tall as the text, in its colour. */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  stroke-width: 1.75;
}

/* Links elsewhere (SocialLinks): icon and name, in a row that wraps. The
   muted colour keeps them below the lede; the accent arrives on hover. */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Each item a flex box, so its link is centred in it: as an inline box it
   sat on the line's baseline, a couple of pixels above the text beside the
   list -- visible in the footer, where the icons follow the copyright. */
.social li { display: flex; }

.social__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
}
.social__link:hover { color: var(--accent); }
.social__link:hover span { text-decoration: underline; }

.post__cover {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0 2rem;
}

/* Headings, and the titles that stand in for them on a card. Basteleur has
   no italic and one heavy weight, so a heading is never asked for either. */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 { font-size: 2.25rem; line-height: 1.15; margin: 0 0 0.75rem; }
h2 { font-size: 1.5rem; line-height: 1.25; margin: 2.5rem 0 1rem; }

.lede { font-size: 1.125rem; color: var(--muted); max-width: 34rem; }

.prose { max-width: 36rem; }
.prose p { margin: 1rem 0; }

/* What Markdown emits. Until posts were written in Markdown none of this
   could appear on the site, so none of it had a style; a post is now allowed
   headings, lists, quotes, tables and rules, and each of them has to sit in
   the same measure as the prose around it. */
.prose h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: 1.1875rem; margin: 2rem 0 0.5rem; }
.prose h4 { font-size: 1rem; color: var(--muted); margin: 1.5rem 0 0.5rem; }

.prose ul,
.prose ol { margin: 1rem 0; padding-left: 1.25rem; }
.prose li { margin: 0.35rem 0; }
.prose li > ul,
.prose li > ol { margin: 0.35rem 0; }

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.prose hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose figure { margin: 1.5rem 0; }
.prose figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.prose img { border-radius: var(--radius); }

/* A table is the one thing in a post that may legitimately be wider than the
   measure, so it scrolls on its own rather than widening the page. */
.prose table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th { font-weight: 600; }

.prose code {
  padding: 0.15em 0.35em;
  border-radius: 4px;
  background: var(--code-bg);
  font-size: 0.875em;
}

.prose pre {
  margin: 1.5rem 0;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Inside a block the padding and background belong to the <pre>, not to each
   line of it. */
.prose pre code {
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: inherit;
}

/* Tags: a post's subjects, and the way into the page that lists them.
   Outlined like .button--secondary and sized like .card__footnote, because
   they appear next to both. */
.tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  vertical-align: middle;
}

.meta,
.card__footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.75rem;
}

.tag {
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-decoration: none;
  white-space: nowrap;
}

.tag:hover { color: var(--fg); border-color: var(--muted); }

.tag[aria-current="page"] {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

/* The row of tags above the index is a way to browse, not a footnote, so it
   is given room of its own. */
.tags--browse { display: flex; margin: 1.25rem 0 2rem; }

/* Rouge's token classes, mapped onto the palette. Only the tokens that
   actually turn up in Ruby, shell and config snippets get a colour; the rest
   inherit, which reads better than a rainbow. */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs,
.highlight .cd { color: var(--syntax-comment); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp,
.highlight .kr, .highlight .kv, .highlight .kc { color: var(--syntax-keyword); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc,
.highlight .sd, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx,
.highlight .sr, .highlight .ss { color: var(--syntax-string); }
.highlight .m, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .mo,
.highlight .il, .highlight .no, .highlight .nb { color: var(--syntax-literal); }
.highlight .nc, .highlight .nf, .highlight .nn, .highlight .nt,
.highlight .na, .highlight .vi, .highlight .vg { color: var(--syntax-name); }
.highlight .o, .highlight .p, .highlight .ow { color: var(--syntax-punct); }
.highlight .gd { color: var(--syntax-keyword); }
.highlight .gi { color: var(--syntax-string); }
.highlight .err { color: inherit; }

.meta { color: var(--muted); font-size: 0.875rem; margin-top: 0; }

/* auto-fill, not auto-fit: the empty column is kept, so a lone card takes
   the width two would instead of stretching across the page -- which is what
   /writing looks like with one post, and a card's cover at that size is a
   poster. */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card__inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.card__cover-link { display: block; }

.card__cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.card__title { margin: 0 0 0.5rem; font-size: 1.05rem; }
/* In the text colour: an orange display face at card size looked like a
   warning label. The whole title is the link, so it only needs to say so on
   hover. */
.card__title a { color: var(--fg); text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__body p { margin: 0; color: var(--muted); }
.card__footnote { margin-top: auto; padding-top: 0.75rem; color: var(--muted); font-size: 0.8125rem; }

.button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 550;
  text-decoration: none;
}

.button--primary { background: var(--accent); color: var(--bg); }
.button--secondary { border: 1px solid var(--line); color: var(--fg); }

.error {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.8125rem;
}

/* The home page: the hero, then the two latest posts, then projects. The
   posts have no heading of their own; the section is labelled for screen
   readers, and each card is plainly a post. */
.hero + section { margin-top: 2.5rem; }

/* Projects: a ruled list, one per row. The posts above are already cards;
   three more boxes under them made the page a stack of rectangles, and a
   project is described rather than pictured, so it needs no frame. */
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.row {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

/* The footer draws its own rule a little further down; two in a row read as
   a mistake. */
.row:last-child { border-bottom: 0; padding-bottom: 0; }

/* Name on the left, badge on the right edge of the row. The badge never
   wraps under the name: a long name wraps within its own space instead, so
   the badges line up down the list. */
.row__header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.row__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.25rem;
}

.row__header .badge { flex: none; }

/* The project's own mark, set into the line beside its name. */
.row__title a {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.row__icon {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
}

/* With a screenshot, the row becomes picture and text side by side. The
   picture is a fixed column so the text column starts at the same place in
   every row that has one; on a phone it goes above the text at full width. */
.row--with-preview article {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 1.5rem;
  align-items: start;
}

.row__preview { display: block; }

.row__preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

@media (max-width: 40rem) {
  .row--with-preview article { grid-template-columns: 1fr; gap: 1rem; }
}

.row__title a { color: var(--fg); text-decoration: none; }
.row__title a:hover { color: var(--accent); }

/* What the caller writes under the title (a summary; a role and its dates):
   each paragraph close under the one before, and the links a little further
   down. */
.row__content { margin: 0.375rem 0 0.625rem; }
.row__content > * { margin: 0; }
.row__content > * + * { margin-top: 0.25rem; }

/* The links are what a reader came for, so they are set at reading size,
   not footnote size. */
.row__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  font-size: 0.9375rem;
}

/* UI::Badge. Shaped like a .tag so the two read as one family of label,
   but filled rather than outlined: a tag is a way somewhere, a badge is a
   fact. */
.badge {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--neutral { --badge-bg: var(--tone-neutral-bg); --badge-fg: var(--tone-neutral-fg); }
.badge--green { --badge-bg: var(--tone-green-bg); --badge-fg: var(--tone-green-fg); }
.badge--blue { --badge-bg: var(--tone-blue-bg); --badge-fg: var(--tone-blue-fg); }
.badge--amber { --badge-bg: var(--tone-amber-bg); --badge-fg: var(--tone-amber-fg); }

/* Building blocks placed in a page's or a post's text (Embed, lib/embeds.rb).
   They are the same components the home page uses, and keep that look: the
   .prose rules above style h3, img, ul and li for *writing*, and are more
   specific than a component's own classes, so inside prose they would win --
   a card title pushed down by a heading's margin, a cover with rounded
   corners, a project list indented like bullet points. These give the
   components their own rules back, and nothing else. */
.embed { margin: 1.5rem 0; }

.prose .embed .card__title { margin: 0 0 0.5rem; font-size: 1.05rem; }
.prose .embed .card__cover { border-radius: 0; }

.prose .embed .rows { margin: 0; padding: 0; }
.prose .embed .row { margin: 0; }
.prose .embed .row__title { margin: 0; font-size: 1.25rem; }
.prose .embed .row__content { margin: 0.375rem 0 0.625rem; }
.prose .embed .row__content > * { margin: 0; }
.prose .embed .row__content > * + * { margin-top: 0.25rem; }
.prose .embed .row__links { margin: 0; }
.prose .embed .row__preview img { border-radius: var(--radius); }


/* A block written wrong, in a file edited by hand (publishing refuses them). */
.embed--invalid { color: var(--accent); font-family: ui-monospace, monospace; font-size: 0.875rem; }

/* UI::ArrowLink: a link that moves the reader along. Not underlined -- the
   arrow says it is a link -- and set a step smaller than the text, so it
   reads as navigation. The arrow leans the way it points on hover. */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.9375rem;
  text-decoration: none;
}

.arrow-link .icon { transition: transform 0.15s ease; }
.arrow-link:hover .arrow-link__text { text-decoration: underline; text-underline-offset: 3px; }
.arrow-link--back:hover .icon { transform: translateX(-0.2em); }
.arrow-link--forward:hover .icon { transform: translateX(0.2em); }

@media (prefers-reduced-motion: reduce) {
  .arrow-link .icon { transition: none; }
}

/* The end of a post or a list (BackToWriting): its own navigation, set off
   from the text above by space. Not by a rule: the site footer draws one a
   little further down, and two in a row read as a mistake. */
.page-end {
  margin-top: 2.5rem;
}

/* The design-system page (app/design-system, development only). */
.design-warning {
  padding: 0.75rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
}

.specimen {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.specimen__name { margin: 0 0 0.25rem; font-size: 1.125rem; }
.specimen__name code { font-family: ui-monospace, monospace; font-size: 0.95em; }
.specimen__description { margin: 0 0 1rem; color: var(--muted); }

.specimen:last-child { border-bottom: 0; }

.specimen__example {
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* A component's outer margins belong to the page it sits in, not to this
   frame: without these, every example is padded unevenly by whatever the
   component brings (a button's margin-top, a list's, an h2's). */
.specimen__example > :first-child,
.specimen__example > :first-child > :first-child { margin-top: 0; }
.specimen__example > :last-child,
.specimen__example > :last-child > :last-child { margin-bottom: 0; }
.specimen__row > * { margin: 0; }

.specimen__usage {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--code-bg);
  font-size: 0.8125rem;
}

.specimen__row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
.specimen__icon { display: inline-flex; gap: 0.4em; align-items: center; font-size: 1.25rem; }
.specimen__icon code { font-size: 0.8125rem; color: var(--muted); }
.specimen__image { border-radius: var(--radius); }

.tokens {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.75rem 1.25rem;
}

.token { display: grid; grid-template-columns: auto 1fr; gap: 0 0.75rem; align-items: center; }
.token__swatches { grid-row: span 2; display: flex; }
.token__swatch {
  width: 1.75rem;
  height: 2.5rem;
  border: 1px solid var(--line);
}
.token__swatch:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.token__swatch:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: 0; }
.token__name { font-size: 0.8125rem; }
.token__values { color: var(--muted); font-size: 0.75rem; }

.tokens__others { margin-top: 1.5rem; font-size: 0.875rem; border-collapse: collapse; }
.tokens__others td { padding: 0.25rem 1rem 0.25rem 0; vertical-align: top; }

.type-specimen__display { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; margin: 0; }
.type-specimen__body { font-size: 1.25rem; margin: 0.5rem 0 0; }
.type-specimen { margin-bottom: 2.5rem; }
.specimen__image { display: block; }
.specimen__example > .tags { display: flex; }

/* UI::Popover: the HTML popover attribute, styled. The browser positions and
   layers the panel; this gives it the site's card look and a close button. */
.popover__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.popover__trigger:hover { border-color: var(--muted); }

.popover {
  margin: 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.15);
}

.popover::backdrop { background: rgb(0 0 0 / 0.15); }

.popover__close {
  float: right;
  margin: -0.25rem -0.5rem 0 0.5rem;
  padding: 0.25rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 0;
  cursor: pointer;
}

.popover__close:hover { color: var(--fg); }

/* Icon-only social links (SocialLinks with labels: false): a little closer
   together, and a touch larger, since the icon is all there is to see. */
.social--icons { gap: 0.5rem 0.875rem; }
.social--icons .social__link { font-size: 1.0625rem; }

/* Present for screen readers, absent on screen. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.specimen__stack { display: grid; gap: 1rem; }

/* A lede whose words come from a note arrives as Markdown paragraphs. */
.lede > p { margin: 0; }
.lede > p + p { margin-top: 0.5rem; }
