/* Valor Business Finance.
 *
 * 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: EYES OPEN, the downside of each programme and
 * the guard against it.
 *
 * BESLEY OVER KUMBH SANS. A sturdy Clarendon-like serif with real weight for
 * the heads -- it reads as conviction rather than polish -- and a clean
 * geometric sans to read by. The palette is a medal's: royal violet (#5b2a91,
 * 9.4:1 on white) for the eyebrows, links and fills, and old gold only where
 * the ground is dark (the apply band, the footer heads, the ribbons in the
 * downside band), because gold on white does not read.
 */

@font-face {
  font-family: "Besley";
  src: url("display.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Kumbh Sans";
  src: url("text.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --ink: #1b1424;
  --ink-soft: #2c2338;
  --text: #3d3548;
  --muted: #5f566b;

  --accent: #5b2a91;
  --accent-deep: #3f1c66;
  --accent-wash: #f1ebf8;
  --accent-line: #d6c4ec;

  --good: #5b2a91;
  --good-wash: #f1ebf8;
  --warn: #8f3a12;

  --paper: #ffffff;
  --card: #ffffff;
  --tint: #f6f3ef;
  --rule: #e7e1e9;
  --rule-firm: #cfc4d6;

  --ask-ink: #cfc6da;
  --ask-accent: #e6c068;

  --shadow: 27, 20, 36;

  --display: "Besley", Georgia, "Times New Roman", serif;
  --body: "Kumbh Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --display-weight: 700;
  --display-track: -0.015em;

  --radius: 12px;
  --radius-sm: 8px;
}

/* ------------------------------------------------------------------ *
 * EYES OPEN -- directly under the front door.
 *
 * Six rows, one per programme: its name (a link to its page), the downside,
 * and the guard. The downside sits on a pale ground with the warm warning
 * colour on its label; the guard sits on violet with a gold ribbon, so the
 * eye goes from what can go wrong to what stops it, left to right, every
 * row. On a phone each row stacks in the same order.
 * ------------------------------------------------------------------ */
.downside {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.downside__row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--card);
  box-shadow: 0 6px 18px rgba(var(--shadow), 0.06);
}

.downside__name {
  padding: 26px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.downside__name a {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}
.downside__name a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.downside__name span {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.downside__risk,
.downside__guard {
  margin: 0;
  padding: 24px 26px;
}

.downside__risk {
  background: var(--tint);
  color: var(--text);
}

.downside__guard {
  background: var(--accent-deep);
  color: #f3eefa;
  position: relative;
}

/* The gold ribbon on the guard's edge: the one gold mark on a light page. */
.downside__guard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--ask-accent);
}

.downside__risk b,
.downside__guard b {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.downside__risk b {
  color: var(--warn);
}

.downside__guard b {
  color: var(--ask-accent);
}

.downside__note {
  max-width: 64ch;
  margin: 32px 0 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .downside__row {
    grid-template-columns: 1fr;
  }
  .downside__name {
    padding: 20px 22px 14px;
  }
  .downside__risk,
  .downside__guard {
    padding: 18px 22px;
  }
}

/* ---- the shared chrome, painted in this brand's colours ---- */
:root {
  --nav-bg: #ffffff;
  --nav-ink: #1b1424;
  --nav-ink-soft: #5f566b;
  --nav-rule: #e7e1e9;
  --nav-hover: #5b2a91;
  --nav-panel: #ffffff;
  --nav-cta-bg: #5b2a91;
  --nav-cta-ink: #ffffff;
  --nav-font: var(--body);
  --nav-size: 0.9375rem;
  --nav-weight: 600;
  --nav-track: 0;
  --nav-case: none;

  --foot-bg: #1b1424;
  --foot-ink: #c4bacf;
  --foot-head: #e6c068;
  --foot-rule: #352b42;
  --foot-link: #f5f1fa;
}

/* 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-size: 1.2rem;
  color: var(--ink);
  margin: 2em 0 0.5em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.5em;
}
