/*
 * Daring Tiger
 *
 * Everything here is read off the logo:
 *   ink, white and the amber #d87010;
 *   Jost, the face of the wordmark, for display type, spaced capitals for labels;
 *   the divider under the wordmark (hairline, diamond, hairline) as the one ornament;
 *   hard corners, no curves, no shadows.
 * Inter carries the running text. Greys are black thinned on white.
 *
 * Layout: the home page is the centred lockup. Every other page hangs on one axis
 * at a third of the measure: terms left of it, statements right of it. The diamond
 * of the rule sits on that axis.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-medium.woff2") format("woff2");
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jost-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/jost-medium.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --white: #ffffff;
  --ink: #141414;
  --amber: #d87010;
  --grey: #5c5c5c;
  --hair: #dcdcdc;
  --text: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --page: min(70rem, calc(100% - 2 * var(--pad)));
  /* Where statements begin. Zero while the page is one column. */
  --axis: 0%;
  --caps: 0.16em;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  height: 100%;
  hyphens: manual;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

img {
  max-width: 100%;
  border: 0;
}

h1,
h2,
p,
ul,
address {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

/* Links in running text: ink with an amber hairline that turns to ink. */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 160ms var(--ease);
}

a:hover {
  text-decoration-color: var(--ink);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 2;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--white);
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: var(--caps);
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.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;
}

/* ---------- Menu: the capitals of the wordmark ---------- */

.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(1.1rem, 3vw, 2.25rem);
  view-transition-name: menu;
}

.menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  /* The tracking adds space after the last letter. Give the same before the first. */
  padding-left: var(--caps);
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: var(--caps);
  text-transform: uppercase;
  text-decoration: none;
}

/* Hover: a hairline drawn from the left. */
.menu a::after {
  content: "";
  position: absolute;
  left: var(--caps);
  right: var(--caps);
  bottom: 9px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 260ms var(--ease);
}

.menu a:hover::after {
  transform: scaleX(1);
}

/* The page you are on: the diamond of the logo under its name. */
.menu a[aria-current="page"]::after {
  left: 50%;
  right: auto;
  bottom: 6px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  transform: rotate(45deg);
  transition: none;
}

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: var(--page);
  margin-inline: auto;
  padding-top: max(1rem, env(safe-area-inset-top));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  margin-left: -3px;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: var(--caps);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: block;
  flex: none;
  width: 36px;
  height: 36px;
}

.brand-mark img {
  display: block;
  width: 36px;
  height: 36px;
}

/* ---------- Footer ---------- */

.foot {
  width: var(--page);
  margin-inline: auto;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--hair);
  view-transition-name: foot;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
  padding: 0.6rem 0;
  font-size: 0.8125rem;
  color: var(--grey);
}

.legal .year {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration-color: transparent;
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}

.legal a:hover,
.legal a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: var(--amber);
}

/* ---------- Home: the lockup, the sentence, the three doors ---------- */

.home main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The artwork carries white above the head. More room below sets the lockup in the optical middle. */
  padding: 0 var(--pad) clamp(2rem, 9vh, 5.5rem);
}

.lockup {
  --logo: min(34rem, 88vw, 62vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.lockup h1 {
  position: relative;
  width: var(--logo);
  min-width: 15rem;
}

.lockup img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--white);
}

.home-note {
  /* The artwork ends in white. The sentence moves up into it, under the divider. */
  margin-top: calc(var(--logo) * -0.105);
  max-width: 21em;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(1.25rem, 0.95rem + 1.3vw, 1.75rem);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.lockup nav {
  margin-top: clamp(1rem, 3vh, 1.75rem);
}

.home .foot {
  border-top: 0;
}

/* ---------- Inner pages ---------- */

.sheet {
  flex: 1;
  width: var(--page);
  margin-inline: auto;
  padding-top: clamp(2.75rem, 9vh, 6.5rem);
  padding-bottom: clamp(4rem, 12vh, 8rem);
}

.sheet h1,
.tagline {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.5rem, 1.2rem + 5.6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.022em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* The divider of the logo. One per page, under the title, diamond on the axis. */
.rule {
  position: relative;
  height: 1px;
  margin: clamp(1.75rem, 4.5vw, 3rem) 0 0;
  border: 0;
  background: var(--amber);
  color: var(--amber);
  overflow: visible;
}

.rule::before,
.rule::after {
  content: "";
  position: absolute;
  top: 50%;
}

/* A white field around the diamond, as in the logo. */
.rule::before {
  left: calc(var(--axis) - 0.7rem);
  width: calc(11px + 1.4rem);
  height: 11px;
  margin-top: -5px;
  background: var(--white);
}

.rule::after {
  left: calc(var(--axis) + 2px);
  width: 8px;
  height: 8px;
  margin-top: -4px;
  background: var(--amber);
  transform: rotate(45deg);
}

.axis,
.clause {
  margin-left: var(--axis);
}

/* Term and statement */

.clause {
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-top: 1px solid var(--hair);
}

.rule + .clause,
.rule + .stage-note + .entries > li:first-child,
.rule + .entries > li:first-child {
  border-top: 0;
}

.term {
  margin-bottom: 0.7rem;
  font-family: var(--display);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.body > * + * {
  margin-top: 0.9rem;
}

.prose,
.contact,
address {
  max-width: 40rem;
  font-size: 1rem;
  font-style: normal;
  line-height: 1.65;
}

.prose {
  text-wrap: pretty;
}

.stand {
  font-size: 0.8125rem;
  color: var(--grey);
}

.lede {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.4;
}

/* ---------- Thesis ---------- */

.thesis .core {
  position: relative;
  margin: 0 0 clamp(3.25rem, 7vw, 4.5rem);
  max-width: 16em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 1.15rem + 4.6vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.026em;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.thesis .phrase {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
  text-decoration: underline dotted var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.thesis .phrase:hover,
.thesis .phrase:focus-visible,
.thesis .phrase.open {
  z-index: 4;
  text-decoration-style: solid;
}

.thesis .phrase:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.thesis .bubble {
  display: none;
  position: absolute;
  z-index: 6;
  left: 0;
  top: 100%;
  margin-top: 0.55rem;
  padding: 0.4rem 0.55rem;
  background: var(--ink);
  color: var(--amber);
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .thesis .phrase:hover .bubble,
  .thesis .phrase:focus-visible .bubble {
    display: block;
  }
}

.thesis .phrase.open .bubble {
  display: block;
}

.tagline span {
  display: block;
}

.thesis .formula {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.35rem, 5.85vw, 4.75rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.thesis .formula .step {
  display: inline-block;
  white-space: nowrap;
}

.thesis .formula .arr {
  color: var(--amber);
}

.thesis .formula .human {
  font-weight: 400;
  font-size: 0.78em;
  letter-spacing: -0.02em;
}

@media (max-width: 43.6875rem) {
  .thesis .formula {
    font-size: clamp(2.55rem, 11.5vw, 3.6rem);
    white-space: normal;
  }

  .thesis .formula .step {
    display: block;
  }

  .thesis .formula .step + .step {
    margin-top: 0.04em;
  }
}

.sheet h1.motto {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
  font-size: clamp(1.1rem, 5.6vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: wrap;
}

.motto-line {
  display: contents;
}

.motto .word,
.motto-rest {
  padding: 0.62em 0;
  border-top: 1px solid var(--hair);
}

.motto-line:first-child > * {
  border-top: 0;
}

.motto .word {
  padding-right: 0.55em;
  color: var(--amber);
  font-weight: 500;
}

.motto-rest {
  min-width: 0;
}

/* ---------- Portfolio ---------- */

.entries > li {
  border-top: 1px solid var(--hair);
}

.entries {
  border-bottom: 1px solid var(--hair);
}

.entries > li {
  position: relative;
  padding: clamp(0.95rem, 1.8vw, 1.35rem) 0;
}

.entries .head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 0.75rem;
  text-decoration: none;
}

.entries .name {
  font-family: var(--display);
  font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.85rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-transform: none;
  text-decoration: none;
}

/* The link covers the card. The name stays ordinary text, so nothing underlines it. */
.entries > li > a.card {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
}

.entries > li > a.card:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}

.entries .what {
  min-width: 0;
  margin-top: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--grey);
  transition: color 160ms var(--ease);
}

/* An arrow that leaves the site, drawn from two hairlines and a diagonal. */
.entries .go {
  align-self: center;
  position: relative;
  width: 0.8rem;
  height: 0.8rem;
  border-top: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
  transition: transform 260ms var(--ease), border-color 160ms var(--ease);
}

.entries .go::before {
  content: "";
  position: absolute;
  right: -1.5px;
  top: -1.5px;
  width: 1.5px;
  height: calc(141.4% + 1.5px);
  background: var(--ink);
  transform-origin: 100% 0;
  transform: rotate(45deg);
  transition: background-color 160ms var(--ease);
}

/* A linked card warms slightly, and the hairline under it draws in amber. */
.entries > li:has(> a.card):hover,
.entries > li:has(> a.card:focus-visible) {
  background: color-mix(in srgb, var(--amber) 8%, var(--white));
}

.entries > li:has(> a.card)::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 420ms var(--ease);
  pointer-events: none;
}

.entries > li:has(> a.card):hover::after,
.entries > li:has(> a.card:focus-visible)::after {
  transform: scaleX(1);
}

.entries > li:has(> a.card):hover .what,
.entries > li:has(> a.card:focus-visible) .what {
  color: var(--ink);
}

.entries > li:has(> a.card):hover .go,
.entries > li:has(> a.card:focus-visible) .go {
  border-color: var(--amber);
  transform: translate(3px, -3px);
}

.entries > li:has(> a.card):hover .go::before,
.entries > li:has(> a.card:focus-visible) .go::before {
  background: var(--amber);
}

/* The stages of a company: eight segments, like a loading bar. Black is
   reached, amber is the stage it is in, the hairline grey is still ahead. */
.stage-note {
  margin: clamp(1.1rem, 2vw, 1.6rem) 0 0.35rem var(--axis);
  max-width: 38rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--grey);
}

.stage-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-top: 0.45rem;
  position: relative;
}

.stages {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
  flex: 1 1 9rem;
  min-width: 8rem;
  margin: 0;
  padding: 0;
  list-style: none;
  cursor: help;
}

.entries .stage-line:hover,
.entries .stage-line:focus-within {
  z-index: 4;
}

.stages:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

.stages li {
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 4px solid var(--hair);
  overflow: hidden;
}

.stages .done {
  border-top-color: var(--ink);
}

.stages .now {
  border-top-color: var(--amber);
}

.now-name {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- Login ---------- */

.form {
  display: flex;
  flex-direction: column;
  max-width: 24rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

.field + .field {
  margin-top: 1.6rem;
}

.field label {
  display: block;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--caps);
  text-transform: uppercase;
}

.field input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.4;
  caret-color: var(--amber);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.field input:hover {
  box-shadow: 0 1px 0 var(--ink);
}

/* Focus: the line under the field doubles and turns amber. */
.field input:focus-visible {
  outline: none;
  border-bottom-color: var(--amber);
  box-shadow: 0 2px 0 var(--amber);
}

.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--white) inset;
}

.form-error {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
}

.form-error:not(:empty) {
  margin-top: 1.4rem;
  padding-left: 1.25rem;
}

.form-error:not(:empty)::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.725em;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  background: var(--amber);
  transform: rotate(45deg);
}

.form button {
  width: 100%;
  min-height: 52px;
  margin-top: 1.9rem;
  padding: 0.85rem 1.25rem 0.85rem calc(1.25rem + var(--caps));
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: var(--caps);
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.form button:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.form button:active {
  background: var(--white);
  border-color: var(--ink);
  color: var(--ink);
}

.form button:disabled,
.form button:disabled:hover {
  background: var(--white);
  border-color: var(--ink);
  color: var(--ink);
  cursor: wait;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 34rem) {
  /* The tiger alone stands for the name; the name stays for screen readers. */
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .legal {
    gap: 0 1.1rem;
  }
}

@media (max-width: 22.5rem) {
  :root {
    --caps: 0.1em;
  }

  .menu {
    gap: 0 0.8rem;
  }

  .menu a {
    font-size: 0.75rem;
  }
}

/* ---------- Two columns: terms left of the axis, statements right ---------- */

@media (min-width: 60rem) {
  :root {
    --axis: 33.3333%;
  }

  .clause {
    display: grid;
    grid-template-columns: 1fr 2fr;
    margin-left: 0;
  }

  .clause > .body {
    grid-column: 2;
  }

  .term {
    margin: 0;
    padding-right: 2rem;
    /* Sit on the first baseline of the statement. */
    line-height: 1.65rem;
  }

  .sheet h1.motto {
    grid-template-columns: 1fr 2fr;
    font-size: clamp(2rem, 1rem + 1.9vw, 2.6rem);
  }

  .entries .head {
    display: grid;
    grid-template-columns: 1fr minmax(0, 2fr) 0.8rem;
    column-gap: 0;
    row-gap: 0;
  }

  .entries .name {
    min-width: 0;
    padding-right: 1.5rem;
  }

  .entries .what {
    grid-column: 2;
    padding-right: 1rem;
    margin-top: 0;
    font-size: 1.0625rem;
  }

  .entries .go {
    grid-column: 3;
    grid-row: 1;
    margin-left: 0;
  }

  .entries .meta,
  .entries .stage-line {
    margin-left: var(--axis);
  }
}

/* ---------- Motion ---------- */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 240ms;
  animation-timing-function: var(--ease);
}

::view-transition-group(menu),
::view-transition-group(foot) {
  animation-duration: 320ms;
  animation-timing-function: var(--ease);
}

@keyframes draw {
  from {
    clip-path: inset(-1rem 100% -1rem 0);
  }

  to {
    clip-path: inset(-1rem 0 -1rem 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rule {
    animation: draw 700ms var(--ease) 80ms both;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .stages li {
    border-top-style: dotted;
  }

  .stages .done,
  .stages .now {
    border-top-style: solid;
  }

  .stages .now {
    border-top-color: Highlight;
  }

  .form button,
  .field input {
    border: 1px solid ButtonText;
  }

  .rule,
  .rule::after,
  .menu a::after,
  .form-error:not(:empty)::before {
    background: CanvasText;
  }

  .rule::before {
    background: Canvas;
  }

  .motto .word {
    color: CanvasText;
  }
}

@media print {
  .skip,
  .menu,
  .form button {
    display: none;
  }

  .rule {
    animation: none;
  }
}

/* ---------- Portfolio: sort, tier key, and the one status line ---------- */

.key {
  position: relative;
  margin: 0 0 0.35rem var(--axis);
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--grey);
}

.key + .stage-note {
  margin-top: 0;
  margin-bottom: clamp(0.85rem, 1.6vw, 1.15rem);
}

.key .tier-label {
  color: var(--ink);
}

.tip {
  position: relative;
  cursor: help;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--hair);
  text-underline-offset: 0.18em;
}

/* The bubble hangs off the whole line, so a name at the right edge stays on the page. */
.key .tip,
.entries .meta .tip {
  position: static;
}

.tip:hover,
.tip:focus-visible {
  text-decoration-color: var(--amber);
  color: var(--ink);
}

.tip:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.tip::after,
.stages:hover::after,
.stages:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 6;
  left: 0;
  top: calc(100% + 0.4rem);
  width: max-content;
  max-width: min(22rem, 100%);
  padding: 0.4rem 0.55rem;
  background: var(--ink);
  color: var(--white);
  font-family: var(--text);
  font-size: 0.75rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  pointer-events: none;
}

.tip::after {
  display: none;
}

.tip:hover::after,
.tip:focus-visible::after {
  display: block;
}

.sorter {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin: 0 0 clamp(0.35rem, 1vw, 0.6rem) var(--axis);
}

.sorter[hidden] {
  display: none;
}

.sorter .sep {
  color: var(--grey);
}

.sorter button {
  padding: 0.15rem 0 0.2rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--display);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--grey);
  cursor: pointer;
}

.sorter button[aria-pressed="true"] {
  border-bottom-color: var(--amber);
  color: var(--ink);
}

.sorter button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.entries .meta {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--grey);
  /* Clicks pass through to the card link. The tier name keeps its own pointer. */
  pointer-events: none;
}

.entries .stage-line {
  z-index: 2;
  pointer-events: none;
}

.entries .meta .tip,
.entries .stages {
  pointer-events: auto;
}

.entries .dia,
.entries .tier-text,
.entries .rev1 {
  color: var(--ink);
}

.entries .dia {
  letter-spacing: 0.08em;
}
