/* Advanced Business Financing.
 *
 * 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: THE TRADE KEY.
 *
 * RALEWAY OVER NUNITO, the logo's greens on white with a pale mint tint (the
 * mint of the logo's roundel). The logo's leaf greens, #7ba60d and #9cc925,
 * measure 3.1:1 and 1.95:1 on white, so they are used only where nothing is
 * read off them -- the key's rules and its leaves. Type and buttons take a
 * deeper leaf, #3d6b0f, which is 6.35:1 on white and 5.8:1 on the tint, and
 * white on it for a filled button. The ink is a near-black green, and the
 * muted grey carries the sage of the wordmark, darkened to 5.9:1.
 */

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

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

:root {
  --ink: #1e2a1a;
  --ink-soft: #2c3a27;
  --text: #3c4738;
  --muted: #5c6758;

  --accent: #3d6b0f;
  --accent-deep: #2f5410;
  --accent-wash: #eef5e8;
  --accent-line: #c9e19a;

  --good: #3d6b0f;
  --good-wash: #eef5e8;
  --warn: #8a4a10;

  --paper: #ffffff;
  --card: #ffffff;
  --tint: #f2f7ee;
  --rule: #e1e8dc;
  --rule-firm: #c8d3c1;

  --ask-ink: #cbd8c4;
  --ask-accent: #b3dc4f;

  --shadow: 30, 42, 26;

  --display: "Raleway", system-ui, sans-serif;
  --body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

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

  --radius: 16px;
  --radius-sm: 10px;

  /* The logo's two leaf greens: rules and leaves only, never type. */
  --leaf: #7ba60d;
  --leaf-bright: #9cc925;
}

/* ------------------------------------------------------------------ *
 * THE TRADE KEY -- the band this site has and the skeleton does not.
 *
 * One cell per trade, three across. Each cell is headed by a bright leaf
 * rule and carries a row of six leaves -- the logo's own mark, drawn in CSS
 * -- one per programme in the menu's order, filled where this brand's page
 * for that programme named the trade. So the row reads at a glance as "how
 * much of the site is for me", and the list under it says which.
 * ------------------------------------------------------------------ */
.key {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.key__trade {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--leaf-bright);
  border-radius: var(--radius-sm);
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(var(--shadow), 0.05);
}

.key__trade:target {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px var(--accent-line);
}

.key__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.key__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.key__leaves {
  display: inline-flex;
  gap: 4px;
  flex: none;
}

/* A leaf: two rounded corners and two sharp ones, tilted, which is the
   shape of the mark in the logo. */
.leaf {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 0 100% 0 100%;
  border: 1.5px solid var(--accent-line);
  transform: rotate(-8deg);
}
.leaf.is-on {
  background: linear-gradient(135deg, var(--leaf-bright), var(--leaf));
  border-color: var(--leaf);
}

.key__count {
  margin: 8px 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.key__say {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 0.975rem;
}

.key__progs {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.key__progs li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--rule);
}
.key__progs li:last-child {
  border-bottom: 0;
}
.key__progs a {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.key__progs a:hover {
  text-decoration: underline;
}
.key__progs span {
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}

/* "And more": the one cell with no leaves, on the tint, carrying the way in. */
.key__trade--more {
  background: var(--tint);
  border-top-color: var(--leaf);
}
.key__go {
  margin: auto 0 0;
}

.key__note {
  max-width: 64ch;
  margin: 32px auto 0;
  text-align: center;
  color: var(--muted);
}
.key__note a {
  color: var(--accent);
  font-weight: 700;
}

/* On a programme page the key is only its three trades. */
.key--three {
  margin-top: 36px;
}
.band--tint .key__trade:not(.key__trade--more) {
  background: var(--card);
}

@media (max-width: 1000px) {
  .key {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .key {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 36px;
  }
  .key__trade {
    padding: 22px 20px 18px;
  }
}

/* ---- the shared chrome, painted in this brand's colours ---- */
:root {
  --nav-bg: #ffffff;
  --nav-ink: #1e2a1a;
  --nav-ink-soft: #5c6758;
  --nav-rule: #e1e8dc;
  --nav-hover: #3d6b0f;
  --nav-panel: #ffffff;
  --nav-cta-bg: #3d6b0f;
  --nav-cta-ink: #ffffff;
  --nav-font: var(--display);
  --nav-size: 0.9375rem;
  --nav-weight: 600;
  --nav-track: 0.01em;
  --nav-case: none;

  --foot-bg: #1e2a1a;
  --foot-ink: #bcc8b6;
  --foot-head: #ffffff;
  --foot-rule: #34432f;
  --foot-link: #f3f8ef;
}

/* The application page opens with the form, and on a phone the form comes
   first; the head's full top padding would leave an empty band above it. */
@media (max-width: 760px) {
  .head--form {
    padding-top: 18px;
  }
  .head--form .frame {
    padding: 6px;
  }
}

/* The Terms of Acceptance: one long paragraph, set as a document. */
.legal p {
  max-width: 72ch;
}
