/* The site's own layer. Tokens are the brand skill's, for a page that stands outside the product.

   White, light grey and black. Structure comes from light grey cards on white, with no outlines. The only color on
   a page is in a topic's icon and in the product's own screens: no green is the page's. The page shows the logo and
   product screens drawn in light mode, so it stays light for every viewer, which is the brand skill's rule until the
   one for dark is chosen. Body text is 16px, as tg-web sets long-form text. */
:root {
  color-scheme: light;
  --tg-page: #ffffff;
  --tg-card: #eeeeee;
  --tg-elevated: #f7f7f7;
  --tg-text: #212121;
  --tg-body: #424242;
  --tg-text-2: #616161;
  --tg-text-3: #9e9e9e;
  --tg-divider: #e0e0e0;
  --tg-button: #f7f7f7;
  --tg-button-hover: #eeeeee;
  --tg-button-active: #e0e0e0;
  --tg-radius-chip: 4px;
  --tg-radius-control: 6px;
  --tg-radius-card: 8px;
  --tg-radius-panel: 10px;
  --top: 60px;
  --bar: 0px;
  --measure: 680px;
  --wide: 880px;
  --step: 44px;
}
body:has(.bar) {
  --bar: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top) + 16px);
}

body {
  margin: 0;
  padding-bottom: var(--bar);
  background: var(--tg-page);
  color: var(--tg-body);
  line-height: 1.6;
}

a {
  color: var(--tg-text);
  text-decoration: underline;
  text-decoration-color: var(--tg-divider);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: var(--tg-text);
}
code {
  font: 500 0.875em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--tg-text);
}
h1 {
  margin: 14px 0 0;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--tg-text);
}
.lead {
  max-width: var(--measure);
  margin: 12px 0 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--tg-text);
}
.kind,
.reader {
  padding: 2px 8px;
  border-radius: var(--tg-radius-chip);
  background: var(--tg-elevated);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--tg-text-2);
  white-space: nowrap;
}

/* ---- The site's bar ---- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--top);
  padding: 0 32px;
  background: var(--tg-page);
  border-bottom: 1px solid var(--tg-divider);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
/* The wordmark is the brand's file, set by its height only. */
.brand svg {
  display: block;
  height: 18px;
  width: auto;
}
.site {
  padding-left: 16px;
  border-left: 1px solid var(--tg-divider);
  font-size: 14px;
  font-weight: 550;
  line-height: 20px;
  color: var(--tg-text-2);
}
.top-end {
  display: flex;
  align-items: center;
  gap: 20px;
}
.top-end a {
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  color: var(--tg-text-2);
}
.top-end a:hover {
  color: var(--tg-text);
}
.all-topics {
  display: none;
}

/* ---- Search ---- */

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--tg-radius-card);
  background: var(--tg-elevated);
}
.search:focus-within {
  background: var(--tg-page);
  box-shadow: inset 0 0 0 1.5px var(--tg-text);
}
.search > svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--tg-text-3);
}
.search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--tg-text);
}
.search input::placeholder {
  color: var(--tg-text-3);
}
.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 6;
  min-width: 320px;
  padding: 6px;
  border-radius: var(--tg-radius-panel);
  background: var(--tg-page);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px var(--tg-divider);
}
.results a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--tg-radius-control);
  text-decoration: none;
}
.results a:hover,
.results a:focus {
  background: var(--tg-elevated);
  outline: none;
}
.results b {
  display: block;
  font-size: 14px;
  font-weight: 550;
  line-height: 20px;
  color: var(--tg-text);
}
.results span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--tg-text-2);
}
.results p {
  margin: 0;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--tg-text-2);
}
/* ---- The first page ---- */

/* The list of topics is beside it, as it is beside every page, so the page itself is short: its headline, where
   to start (one card each for someone new, someone leading a team and someone setting up a workspace), and what most
   readers come to do. */
/* It opens with a card as a topic's page does, a little taller: the headline and its line, and the product's window
   coming in beside them. Without a screen (site/site.yaml, `opening`) it opens with the headline alone, lower down. */
article.first:not(:has(.topic-opening)) {
  padding-top: 72px;
}
article.first h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
article.first .lead {
  margin-top: 14px;
  font-weight: 450;
  color: var(--tg-text-2);
}
article.first .topic-opening {
  min-height: 344px;
}
article.first .topic-words h1 {
  font-size: 40px;
}
article.first .topic-words .lead {
  font-size: 17px;
}
article.first .group {
  margin-top: 56px;
}
/* The page for an address that is no page: the first page's headline and line, and one link back. */
article.first.missing .lead {
  max-width: 34em;
}
.missing-home {
  margin-top: 28px;
  font-weight: 500;
}
article.first .topic-opening + .group {
  margin-top: 48px;
}
.group.to-start {
  max-width: var(--wide);
}
.group.to-start h2 {
  margin-bottom: 14px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 164px;
  padding: 20px;
  border-radius: 12px;
  background: var(--tg-elevated);
  text-decoration: none;
  transition: background-color 120ms ease-out;
}
.card:hover {
  background: var(--tg-card);
}
.card .tile {
  margin-bottom: 10px;
}
.tile svg {
  display: block;
  width: 32px;
  height: 32px;
}
.card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tg-text);
}
.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tg-text-2);
}
.card.start {
  min-height: 0;
  padding-bottom: 24px;
}
/* A card on the first page opens with the drawing its topic's page opens with, whole: the box has the drawing's own
   proportions, so nothing of it is cut but what the drawing itself lets run past its edge. It reaches the card's edges,
   and the card's corners cut it. */
.card.start:has(.card-drawing) {
  overflow: hidden;
}
.card-drawing {
  display: block;
  margin: -20px -20px 10px;
  aspect-ratio: 7 / 4;
}
.card-drawing > svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* Cards with drawings stand three across for as long as a card holds its words, whatever the window: two across leaves
   the third alone under two large drawings. Narrower than that they stand one to a row and without the drawings, or
   three of them would put a screen's height between the first card and the last. The page's column is what counts,
   as for the card the page opens with. */
.cards.drawn {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@container (max-width: 660px) {
  .cards.drawn {
    grid-template-columns: minmax(0, 1fr);
  }
  .cards.drawn .card-drawing {
    display: none;
  }
}
/* Whom a card on the first page is for: the mark a page's kind has, on the card's grey. */
.card.start .reader {
  align-self: flex-start;
  margin-bottom: 8px;
  background: var(--tg-page);
}
/* ---- The foot of every page ---- */

/* Under the page, in the page's own column: never under the list of topics. */
.foot {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  width: calc(100% - 96px);
  max-width: var(--wide);
  margin: 96px auto 0;
  padding: 0 0 56px;
  font-size: 14px;
  line-height: 20px;
  color: var(--tg-text-2);
}
.foot::before {
  content: "";
  flex: 0 0 100%;
  height: 1px;
  margin-bottom: 16px;
  background: var(--tg-divider);
}
.foot p {
  margin: 0;
}
.foot nav {
  display: flex;
  gap: 20px;
}
.foot nav a {
  text-decoration: none;
  color: var(--tg-text-2);
}
.foot nav a:hover {
  color: var(--tg-text);
}

/* ---- The search field and the topics down the left edge of the window, and the page beside them ---- */

.frame {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
}
/* The window's left edge, under the bar, for the whole height of the window. The search field stays where it is and
   the list under it scrolls by itself. What the field finds can be wider than the column, so the column cuts nothing
   that comes out of it: only the list scrolls. */
.side {
  position: sticky;
  top: var(--top);
  z-index: 4;
  grid-row: 1 / span 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--top) - var(--bar));
  /* 44px: the search field stands where the page's first line does. */
  padding: 44px 0 0 32px;
  border-right: 1px solid var(--tg-divider);
}
.side .search {
  flex: none;
  width: auto;
  margin-right: 24px;
}
.side .results {
  right: auto;
  width: 360px;
}
/* The page keeps its width and stands in the middle of the room beside the list: in a wide window the room that is
   left over is on both sides of it. */
main {
  min-width: 0;
  padding: 0 48px;
}

.topics {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 28px;
  padding: 0 24px 48px 0;
  font-size: 14px;
  line-height: 20px;
}
.topics ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.topics a {
  text-decoration: none;
  color: var(--tg-text-2);
}
.topics a:hover {
  color: var(--tg-text);
}
/* The topics are listed under their groups. */
.topics .group-name {
  display: block;
  margin: 32px 0 4px;
  font-size: 12px;
  font-weight: 550;
  line-height: 16px;
  color: var(--tg-text-3);
}
.topics .topic-group:first-child .group-name {
  margin-top: 0;
}
/* The groups of features are one block: they stand closer to each other than to the groups before and after them. */
.topics .of-features + .of-features .group-name {
  margin-top: 12px;
}
/* A topic's name, in a group of features with its icon before it. A name that takes two lines keeps the icon beside
   its first. */
.topics .topic {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  font-weight: 500;
}
/* The icon is the topic's own drawing with its color taken out by the build (`withoutColor`): the glyph is painted
   in the color set here and the tile in 12% of it. Grey beside a topic's name, and as dark as the name for the
   topic that is open or pointed at. */
.topics .topic svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--tg-text-3);
}
.topics .topic:hover svg,
.topics .open > .topic svg {
  color: var(--tg-text);
}
.topics .open > .topic {
  color: var(--tg-text);
  font-weight: 600;
}
.topics .open ul {
  margin: 2px 0 10px;
  border-left: 1px solid var(--tg-divider);
}
.topics .open li {
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 1px solid transparent;
}
/* Where the open topic has an icon, its pages hang from the middle of the icon (10px in, less half the rule's own
   width), their titles in line with its name (30px in: the icon and the gap). */
.topics .of-features .open ul {
  margin-left: 9.5px;
}
.topics .of-features .open li {
  padding-left: 19.5px;
}
.topics .open li.here {
  border-left-color: var(--tg-text);
  color: var(--tg-text);
  font-weight: 550;
}

article {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 44px 0 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  line-height: 20px;
  color: var(--tg-text-2);
}
.eyebrow .feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--tg-text);
}
.eyebrow .feature:hover {
  text-decoration: underline;
}
.eyebrow svg {
  width: 20px;
  height: 20px;
}
article h1 {
  max-width: var(--measure);
}

.prose {
  margin-top: 28px;
}
.prose > p,
.prose > ul,
.prose > h2,
.prose > h3 {
  max-width: var(--measure);
}
.prose p {
  margin: 0 0 14px;
}
.prose h2 {
  margin: 52px 0 14px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--tg-text);
}
.prose h3 {
  margin: 32px 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--tg-text);
}
.prose > ul {
  margin: 0 0 14px;
  padding-left: 20px;
}
.prose > ul li {
  margin: 6px 0;
  padding-left: 4px;
}
.prose > ul li::marker {
  color: var(--tg-text-3);
}
.prose strong {
  font-weight: 600;
  color: var(--tg-text);
}

/* A word of the product's interface. */
.ui {
  position: relative;
  font-weight: 600;
  color: var(--tg-text);
  white-space: nowrap;
}
/* A phase of the method, named in the text: the brand's mark for it and then its name, on one line. */
.phase {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--tg-text);
  white-space: nowrap;
  vertical-align: middle;
}
.phase img {
  width: 28px;
  height: 28px;
  margin: -4px 0;
}

/* The page that explains the cycle opens with a card: its title, and under it the five phases in a row. Each phase
   is a white tile with the brand's mark and the phase's name. Plan stands alone, because it comes once. The other
   four share a band, because they are the round that repeats, and the band ends in the sign for going round again.
   The marks are the only color on the page. */
.phases-opening {
  margin-bottom: 40px;
  padding: 36px 36px 32px;
  border-radius: 16px;
  background: var(--tg-elevated);
}
.phases-opening h1 {
  margin-top: 18px;
  max-width: 22ch;
}
.phases-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}
.phases-row > .phase-tile {
  flex: 1 1 104px;
}
.phases-round {
  display: flex;
  flex: 4 1 470px;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.04);
}
.phase-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 104px;
  padding: 18px 16px 14px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--tg-text);
}
.phase-tile img {
  width: 64px;
  height: 64px;
}
.phases-round .phase-tile {
  flex: 1 1 84px;
}
.phases-then,
.phases-again {
  flex: none;
  color: #bdbdbd;
}
.phases-again {
  margin-left: 2px;
}
@media (max-width: 720px) {
  .phases-opening {
    padding: 28px 20px 24px;
  }
  .phase-tile {
    min-width: 84px;
    padding: 14px 10px 12px;
  }
  .phase-tile img {
    width: 44px;
    height: 44px;
  }
}

/* A whole sentence of the product's, quoted by its key, wraps like the text around it. */
.ui.long {
  white-space: normal;
}

/* A page that is not written yet says so. Only a working build has such a page. */
.unwritten {
  max-width: var(--measure);
  margin: 28px 0 0;
  padding: 16px 20px;
  border-radius: var(--tg-radius-panel);
  background: var(--tg-elevated);
  font-size: 15px;
  line-height: 1.5;
  color: var(--tg-text-2);
}

/* ---- Steps ---- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li {
  position: relative;
  margin: 0 0 18px;
  padding-left: var(--step);
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--tg-radius-card);
  background: var(--tg-card);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: var(--tg-text);
  font-variant-numeric: tabular-nums;
}
.steps > li > p {
  max-width: calc(var(--measure) - var(--step));
  margin: 0 0 10px;
}

/* ---- Pictures ---- */

.shot {
  margin: 22px 0 30px;
}
.steps .shot {
  margin-left: calc(-1 * var(--step));
}
.shot a {
  display: block;
  cursor: zoom-in;
  border-radius: var(--tg-radius-panel);
  background: var(--tg-elevated);
}
/* A picture is never shown larger than it was drawn: its size is on the image, and here it is only kept inside its
   column. A whole screen is drawn wider than the page, so it fills the column as it always did. */
.shot img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--tg-radius-panel);
}
/* A part of a screen is drawn at the size it should have (tg-app-preview's --zoom), which is less than the column. Its
   figure is as wide as the picture and stands in line with the text it belongs to, where a whole screen starts at the
   step's number. The caption wraps at the picture's width and never widens the figure. */
.shot.part {
  width: fit-content;
  max-width: 100%;
}
.steps .shot.part {
  margin-left: 0;
}
.shot.part figcaption,
.shot.part .note {
  width: 0;
  min-width: 100%;
}
.shot figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tg-text-2);
}

/* ---- Tables: a reference page's facts ---- */

.table {
  max-width: var(--wide);
  margin: 0 0 22px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
th,
td {
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--tg-divider);
  text-align: left;
  vertical-align: top;
}
th {
  font-size: 13px;
  font-weight: 550;
  color: var(--tg-text-2);
  white-space: nowrap;
}
td:first-child {
  color: var(--tg-text);
}
tr:last-child td {
  border-bottom-color: var(--tg-elevated);
}

/* ---- The other pages of the topic, and the page's foot ---- */

.more {
  max-width: var(--measure);
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--tg-divider);
}
.more h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 550;
  line-height: 20px;
  color: var(--tg-text-2);
}
.more ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.more li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--tg-elevated);
}
.more a {
  font-weight: 500;
}
.checked {
  max-width: var(--measure);
  margin: 28px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tg-text-2);
}

/* ---- A topic's page ---- */

.topic-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topic-head .tile svg {
  width: 40px;
  height: 40px;
}
.topic-head h1 {
  margin: 0;
}
/* A feature's topic opens with its screen. The window comes into a light grey card from the lower right and the card
   cuts it, so the page shows a corner of the product and no more. The card is the grey the pictures are drawn on, so
   the room around the window is the card's own. The picture's width is a share of the card's, so it keeps its place
   and shows the same corner when the card narrows: about the left two thirds of the window, down to its first rows. */
.topic-opening {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 296px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--tg-elevated);
}
.topic-words {
  align-self: center;
  padding: 36px 4px 36px 36px;
}
.topic-words .topic-head {
  display: block;
}
.topic-words h1 {
  margin-top: 18px;
}
.topic-words .lead {
  font-size: 16px;
  font-weight: 450;
  line-height: 1.5;
  color: var(--tg-text-2);
}
.topic-peek {
  position: relative;
}
.topic-peek img {
  position: absolute;
  top: 14px;
  left: 0;
  width: 150%;
  max-width: none;
  height: auto;
}
/* A topic with no screen opens with a drawing: plain white shapes on the card, with the shadow the window has. It fills
   its half from the top left and the card cuts what does not fit, as it cuts a screen. */
.topic-peek > svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.topic-opening + .group {
  margin-top: 40px;
}
/* The card is as wide as the page's column, which a window's width does not tell: beside the list of topics the
   column is narrower than under it. So the card is laid out by its own width. Narrow, its words are smaller; narrower
   still, the words come first and the screen under them. */
article.topic,
article.first {
  container-type: inline-size;
}
@container (max-width: 760px) {
  .topic-words h1,
  article.first .topic-words h1 {
    font-size: 28px;
  }
}
@container (max-width: 600px) {
  .topic-opening {
    display: block;
    min-height: 0;
  }
  .topic-words {
    padding: 24px 24px 0;
  }
  .topic-peek {
    height: 216px;
    margin-top: 12px;
  }
  .topic-peek img {
    top: 0;
    left: -4px;
    width: 165%;
  }
}
.group {
  max-width: 760px;
  margin-top: 44px;
}
.group h2 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 550;
  line-height: 20px;
  color: var(--tg-text-2);
}
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rows li {
  padding: 14px 0;
  border-bottom: 1px solid var(--tg-divider);
}
.rows a {
  font-size: 16px;
  font-weight: 550;
  line-height: 1.4;
  text-decoration: none;
}
.rows a:hover {
  text-decoration: underline;
}
.rows p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tg-text-2);
}

/* ---- What a reader never sees: a working build only, behind the button in its bar ---- */

.note {
  display: none;
  max-width: var(--measure);
  margin: 14px 0;
  padding: 10px 14px;
  border: 1px dashed #bdbdbd;
  border-radius: var(--tg-radius-card);
  background: var(--tg-page);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--tg-text-2);
}
body:has(#notes:checked) .note {
  display: block;
}
.note b {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-text);
}
.note i {
  font-style: normal;
  color: var(--tg-text-3);
}
.note.made {
  margin: 24px 0 0;
}
.note dl {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 6px 16px;
  margin: 8px 0 2px;
}
.note dt {
  font-weight: 550;
  color: var(--tg-text);
}
.note dd {
  margin: 0;
}
.note ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.note summary {
  cursor: pointer;
}
.note.writer p {
  margin: 6px 0;
  font-size: 13px;
}
.note.behind {
  max-width: 760px;
  margin-top: 72px;
}
.note.behind h3 {
  margin: 16px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-text);
}
.note.behind li {
  margin: 8px 0;
}
.shot .note {
  margin: 8px 0 0;
}
.steps .note {
  max-width: calc(var(--measure) - var(--step));
}
/* With the button on, a page that is only planned is grey wherever it is listed. */
body:has(#notes:checked) .planned,
body:has(#notes:checked) .planned > a,
body:has(#notes:checked) a.planned,
body:has(#notes:checked) .card.planned h3 {
  color: var(--tg-text-3);
}
body:has(#notes:checked) .ui {
  text-decoration: underline dotted var(--tg-text-3);
  text-underline-offset: 4px;
}
body:has(#notes:checked) .ui:hover::after {
  content: attr(data-key);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 3;
  padding: 4px 8px;
  border-radius: var(--tg-radius-card);
  background: var(--tg-text);
  font: 500 12px/16px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #ffffff;
  white-space: nowrap;
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 44px;
  padding: 0 24px;
  background: var(--tg-page);
  border-top: 1px solid var(--tg-divider);
  font-size: 13px;
  line-height: 16px;
}
.bar-name {
  font-weight: 550;
  color: var(--tg-text);
  white-space: nowrap;
}
.bar-dim {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  color: var(--tg-text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-button {
  margin-left: auto;
  cursor: pointer;
}
.bar-button input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.bar-button span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--tg-radius-control);
  background: var(--tg-button);
  font-weight: 550;
  color: var(--tg-text);
  white-space: nowrap;
}
.bar-button:hover span {
  background: var(--tg-button-hover);
}
.bar-button input:checked + span {
  background: var(--tg-button-active);
}
.bar-button input:focus-visible + span {
  outline: 2px solid var(--tg-text);
  outline-offset: 1px;
}

/* ---- Narrower windows ---- */

@media (max-width: 960px) {
  /* The list of topics is not beside the page. The search field stands over the page, and on the first page the list
     comes after the page: "All topics" in the bar leads there. */
  .frame {
    display: flex;
    flex-direction: column;
    padding: 0 20px;
  }
  .side {
    display: contents;
  }
  .side .search {
    order: 0;
    margin: 16px 0 0;
  }
  .side .results {
    right: 0;
    width: auto;
  }
  main {
    order: 1;
    padding: 0;
  }
  .topics {
    display: none;
  }
  .home .topics {
    display: block;
    order: 2;
    overflow: visible;
    margin-top: 56px;
    padding: 0;
  }
  .foot {
    order: 3;
    width: auto;
    margin: 72px 0 0;
    padding-bottom: 48px;
  }
  .all-topics {
    display: block;
  }
  .top {
    padding: 0 20px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  article {
    padding-top: 28px;
  }
  article.first {
    padding-top: 40px;
  }
}
@media (max-width: 640px) {
  article.first h1 {
    font-size: 34px;
  }
  h1 {
    font-size: 28px;
  }
  .lead {
    font-size: 17px;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .card {
    min-height: 0;
  }
  .note dl {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .note dd {
    margin-bottom: 8px;
  }
  .bar {
    padding: 0 12px;
    gap: 10px;
  }
  .bar-dim {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}
