/* Steady Growth Funding.
 *
 * On the ADR-0011 skeleton -- `tools/sitegen/page.css` is the layout. What is
 * here is the palette, the two typefaces, and the one band this site has
 * that the skeleton does not: ONE RUNG AT A TIME.
 *
 * BREE SERIF OVER REDDIT SANS, soil brown on white with an oat tint, and one
 * leaf green that only ever draws: the rails of the ladder, the dot on a
 * rung, the "ready when" mark. The brown (#6e4b1f) is about 7.8:1 on white
 * and carries eyebrows and links; text in green uses the darker #3f6b2a.
 * Bree Serif has one weight, and it is set at that weight everywhere.
 */

@font-face {
  font-family: "Bree Serif";
  src: url("display.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Reddit Sans";
  src: url("text.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --ink: #22190f;
  --ink-soft: #33271a;
  --text: #46392b;
  --muted: #6b5d4c;

  --accent: #6e4b1f;
  --accent-deep: #4e3415;
  --accent-wash: #f6efe3;
  --accent-line: #e3d2b4;

  --good: #3f6b2a;
  --good-wash: #eef5e8;
  --warn: #8a4a10;

  --paper: #ffffff;
  --card: #ffffff;
  --tint: #f7f3ea;
  --rule: #e9e1d2;
  --rule-firm: #d4c6ad;

  --ask-ink: #d9ccb8;
  --ask-accent: #b7dd96;

  --shadow: 34, 25, 15;

  --display: "Bree Serif", Georgia, serif;
  --body: "Reddit Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --display-weight: 400;
  --display-track: -0.005em;

  --radius: 18px;
  --radius-sm: 12px;

  --leaf: #6f9e45;
}

/* ------------------------------------------------------------------ *
 * ONE RUNG AT A TIME -- the band this site has and the skeleton does not,
 * directly under the front door.
 *
 * A ladder, read top to bottom from the first rung: two leaf-green rails
 * run down the left of the list, and each move is a rung across them -- a
 * numbered bar between the rails, then the move itself on a card: a round
 * portrait, what the move is, a "ready when" line, and the programme that
 * fits it with its two published figures. Beside the ladder, set apart, the
 * one programme that is not a rung.
 * ------------------------------------------------------------------ */
.ladder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
  margin: 52px 0 0;
}

.rungs {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* The two rails, the full height of the list. */
.rungs::before,
.rungs::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 3px;
  background: var(--leaf);
}
.rungs::before {
  left: 0;
}
.rungs::after {
  left: 58px;
}

.rung {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 14px 0;
}

/* The rung itself: a bar across the rails with its number on it. */
.rung__n {
  position: relative;
  z-index: 1;
  height: 30px;
  border-radius: 6px;
  background: var(--accent-deep);
  color: #ffffff;
  font-family: var(--display);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rung__card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 22px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: 0 6px 22px rgba(var(--shadow), 0.06);
}

.rung__face {
  margin: 0;
}

.rung__face img {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-wash);
}

.rung__say h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0 0 6px;
}

.rung__say p {
  margin: 0;
  color: var(--text);
  font-size: 0.97rem;
}

.rung__ready {
  margin-top: 10px;
  padding-left: 22px;
  position: relative;
  color: var(--good);
  font-weight: 600;
  font-size: 0.92rem;
}

.rung__ready::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 12px;
  height: 12px;
  border-radius: 0 12px 0 12px;
  background: var(--leaf);
}

.rung__fit {
  background: var(--accent-wash);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.rung__fit a {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--accent-deep);
  text-decoration: none;
  margin: 0 0 6px;
}

.rung__fit a:hover {
  text-decoration: underline;
}

.rung__fit ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rung__fit li {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 2px 10px;
}

/* The one programme that is not a rung, standing beside the ladder. */
.offladder {
  position: sticky;
  top: 24px;
  background: var(--ink);
  color: var(--ask-ink);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.offladder h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  color: #ffffff;
  margin: 0 0 10px;
}

.offladder p {
  margin: 0 0 16px;
  font-size: 0.97rem;
}

.offladder ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.offladder li {
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 600;
  color: #ffffff;
}

.offladder a {
  color: var(--ask-accent);
  font-weight: 700;
  text-decoration: none;
}

.offladder a:hover {
  text-decoration: underline;
}

/* On a programme page: the whole ladder, small, with this rung lit. */
.minirungs {
  list-style: none;
  margin: 22px 0 0;
  padding: 0 0 0 18px;
  border-left: 6px solid var(--leaf);
  max-width: 560px;
}

.minirungs li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.minirungs b {
  min-width: 46px;
  height: 26px;
  border-radius: 5px;
  background: var(--accent-line);
  color: var(--accent-deep);
  font-family: var(--display);
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minirungs a {
  color: var(--text);
  text-decoration: none;
}

.minirungs [aria-current] b {
  background: var(--accent-deep);
  color: #ffffff;
}

.minirungs [aria-current] a {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
}

@media (max-width: 1100px) {
  .ladder {
    grid-template-columns: minmax(0, 1fr);
  }
  .offladder {
    position: static;
  }
  .rung__card {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .rung__face img {
    width: 84px;
    height: 84px;
  }
  .rung__fit {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .rungs::after {
    left: 34px;
  }
  .rung {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
  }
  /* On a phone the portrait tucks in beside the move's name, so the words
     get the card's whole width. */
  .rung__card {
    display: block;
    padding: 16px;
  }
  .rung__face {
    float: left;
    margin: 0 12px 4px 0;
  }
  .rung__face img {
    width: 52px;
    height: 52px;
    border-width: 3px;
  }
  .rung__say h3 {
    min-height: 52px;
    display: flex;
    align-items: center;
  }
  .rung__fit {
    clear: both;
    margin-top: 12px;
  }
}

/* ---- the shared chrome, painted in this brand's colours ---- */
:root {
  --nav-bg: #fbf8f2;
  --nav-ink: #22190f;
  --nav-ink-soft: #6b5d4c;
  --nav-rule: #e9e1d2;
  --nav-hover: #6e4b1f;
  --nav-panel: #fbf8f2;
  --nav-cta-bg: #4e3415;
  --nav-cta-ink: #ffffff;
  --nav-font: var(--body);
  --nav-size: 0.98rem;
  --nav-weight: 600;
  --nav-track: 0;
  --nav-case: none;

  --foot-bg: #22190f;
  --foot-ink: #cdbfa8;
  --foot-head: #fbf6ec;
  --foot-rule: #3d3121;
  --foot-link: #fbf6ec;
}

/* The legal pages: numbered heads inside the prose, set smaller than a
   band's h2 so a long document reads as one document. */
.legal h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 2em 0 0.5em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.5em;
}
