/* Bluecrest Business Capital.
 *
 * 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 RHYTHM OF REPAYMENT.
 *
 * BESLEY OVER REDDIT SANS, royal blue on white with a cool grey tint. Besley
 * is a Clarendon: sturdy, a little old-fashioned, the face of a printed
 * schedule. The blue (#1d4ed8) is 6.7:1 on white, so it carries eyebrows and
 * links; buttons use the deeper #1e40af. It was violet until 12 October 2026,
 * when the operator chose a blue crest for the logo and the site followed.
 */

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

@font-face {
  font-family: "Reddit Sans";
  src: url("text.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --ink: #0f1b3d;
  --ink-soft: #1e2d5c;
  --text: #334063;
  --muted: #56617e;

  --accent: #1d4ed8;
  --accent-deep: #1e40af;
  --accent-wash: #eaf0fe;
  --accent-line: #c7d6fb;

  --good: #1e40af;
  --good-wash: #eaf0fe;
  --warn: #8a3b12;

  --paper: #ffffff;
  --card: #ffffff;
  --tint: #f4f6fb;
  --rule: #e1e6f0;
  --rule-firm: #c5cde0;

  --ask-ink: #c9d3ea;
  --ask-accent: #93b4fd;

  --shadow: 29, 20, 51;

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

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

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

/* ------------------------------------------------------------------ *
 * THE RHYTHM OF REPAYMENT -- the band this site has and the skeleton does
 * not, directly under the front door, and one row of it again on each
 * programme page.
 *
 * Each programme is a row of three: its name and how often it is repaid;
 * four working weeks drawn as twenty small cells with the debit days filled;
 * and what that rhythm means for the business. The strip is the point, so it
 * is drawn plainly -- blue squares on a pale grid -- and a programme whose
 * frequency the sheet does not give draws no squares at all, only a line
 * saying the schedule is in the offer.
 * ------------------------------------------------------------------ */
.rhythm {
  list-style: none;
  margin: 52px 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.rhythm__row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule-firm);
}

.rhythm__name h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 6px;
}
.rhythm__name h3 a {
  color: inherit;
  text-decoration: none;
}
.rhythm__name h3 a:hover {
  color: var(--accent);
}

.rhythm__how {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
}

.rhythm__say {
  margin: 0;
  color: var(--text);
}

/* The four weeks: labels over twenty cells, a gap between each week. */
.beat {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.beat__wk {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
}

.beat__wk b {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.beat__wk i {
  display: block;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--paper);
  border: 1px solid var(--rule-firm);
}

.beat__wk i.on {
  background: var(--accent);
  border-color: var(--accent);
}

/* After a draw: the days the line is in use, shaded rather than marked,
   because the sheet says when it starts costing and not how often it is paid. */
.beat__wk i.used {
  background: var(--accent-line);
  border-color: var(--accent-line);
}

.beat__wk i.draw {
  background: var(--ink);
  border-color: var(--ink);
}

/* A programme with no published frequency: the strip says so in words. */
.beat--fixed {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 16px;
  border: 1px dashed var(--rule-firm);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.92rem;
}

.beat__key {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
}

.beat__key li::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 7px;
  vertical-align: -1px;
  background: var(--k);
  box-shadow: inset 0 0 0 1px var(--rule-firm);
}

.rhythm__note {
  margin: 28px auto 0;
  max-width: 62ch;
  text-align: center;
  color: var(--muted);
}

/* On a programme page the strip stands alone in a row's words column. */
.row__say .beat {
  margin: 22px 0 6px;
}

@media (max-width: 1000px) {
  .rhythm__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 18px 28px;
  }
  .rhythm__say {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .rhythm__row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .beat {
    gap: 6px;
  }
  .beat__wk {
    gap: 2px;
  }
  .beat__wk b {
    font-size: 0.62rem;
    letter-spacing: 0;
  }
}

/* ---- the shared chrome, painted in this brand's colours ---- */
:root {
  --nav-bg: #ffffff;
  --nav-ink: #0f1b3d;
  --nav-ink-soft: #56617e;
  --nav-rule: #e1e6f0;
  --nav-hover: #1d4ed8;
  --nav-panel: #ffffff;
  --nav-cta-bg: #1e40af;
  --nav-cta-ink: #ffffff;
  --nav-font: var(--body);
  --nav-size: 0.95rem;
  --nav-weight: 600;
  --nav-track: 0.01em;
  --nav-case: none;

  --foot-bg: #0f1b3d;
  --foot-ink: #b9c3dc;
  --foot-head: #f4f7fe;
  --foot-rule: #2c3a63;
  --foot-link: #f9fbff;
}

/* The application page opens with the form, and on a phone the form comes
   first, so the head's top padding is taken in. */
@media (max-width: 760px) {
  .head--form {
    padding-top: 18px;
  }
  .head--form .frame {
    padding: 6px;
  }
}

/* The legal pages: numbered heads inside the prose. */
.legal h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
  margin: 2em 0 0.5em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin-bottom: 0.5em;
}
