html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* ---------------------------------------------------------------------------
   BRAND PALETTE

   Two scales derived from the logo: the icon green #008a1a — hsl(131, 100%, 27%)
   — and the wordmark ink #00001a — hsl(240, 100%, 5%). Both source colors are
   fully saturated endpoints, so each extends into a scale by holding the hue and
   walking lightness. The ink scale desaturates through its midtones on purpose:
   carrying 100% saturation into the mid greys turns them visibly purple, which
   reads as a bug rather than as a brand.

   These are raw, theme-independent tokens. Nothing styles against them directly
   — the [data-bs-theme] blocks below map them onto Bootstrap's variables, which
   is what the components actually consume.
   --------------------------------------------------------------------------- */
:root {
  --tl-green-50:  #e8f7ea;
  --tl-green-100: #c6ecca;
  --tl-green-200: #97dba1;
  --tl-green-300: #63c674;
  --tl-green-400: #33b04c;
  --tl-green-500: #00a020;
  --tl-green-600: #008a1a; /* brand — logo icon */
  --tl-green-700: #007316;
  --tl-green-800: #005c12;
  --tl-green-900: #00450d;

  --tl-ink-50:  #f5f6f9;
  --tl-ink-100: #e9ebf1;
  --tl-ink-200: #d2d5e0;
  --tl-ink-300: #aeb3c6;
  --tl-ink-400: #7b819b;
  --tl-ink-500: #545a78;
  --tl-ink-600: #3a3f5a;
  --tl-ink-700: #262a41;
  --tl-ink-800: #14172b;
  --tl-ink-900: #00001a; /* brand — logo text */

  /* Semantic accents chosen to sit beside the green rather than fight it.
     Info is a teal-blue, not a true blue: a blue close to the green's value
     makes "info" and "primary" hard to tell apart at badge size. Danger is
     held at roughly the green's lightness so a profit/loss pair reads as two
     equals instead of one shouting over the other. */
  --tl-danger:  #d0342c;
  --tl-warning: #e0a100;
  --tl-info:    #0e6e8c;
}

/* ---------------------------------------------------------------------------
   LIGHT THEME

   Body text is ink-800, not the pure #00001a: at this font size the full-strength
   ink is harsh over a full page. #00001a is kept for emphasis, where its weight
   is the point.

   Links use green-700 rather than the brand green-600. The brand green clears AA
   on white at 4.52:1, but the page background is a tinted off-white, which erodes
   that margin — green-700 keeps it comfortably above the line.
   --------------------------------------------------------------------------- */
[data-bs-theme="light"] {
  --bs-body-bg: #f2f3f7;
  --bs-body-bg-rgb: 242, 243, 247;
  --bs-secondary-bg: var(--tl-ink-100);
  --bs-tertiary-bg: var(--tl-ink-50);
  --bs-body-color: var(--tl-ink-800);
  --bs-body-color-rgb: 20, 23, 43;
  --bs-emphasis-color: var(--tl-ink-900);
  --bs-secondary-color: rgba(84, 90, 120, 0.75);
  --bs-border-color: var(--tl-ink-200);
  --bs-border-color-translucent: rgba(0, 0, 26, 0.14);

  --bs-primary: var(--tl-green-600);
  --bs-primary-rgb: 0, 138, 26;
  --bs-primary-text-emphasis: var(--tl-green-800);
  --bs-primary-bg-subtle: var(--tl-green-50);
  --bs-primary-border-subtle: var(--tl-green-200);

  /* Success is the brand green by design. In a trading journal green already
     means profit, so letting the brand carry that meaning reinforces the domain
     instead of introducing a second, competing green. */
  --bs-success: var(--tl-green-600);
  --bs-success-rgb: 0, 138, 26;
  --bs-success-text-emphasis: var(--tl-green-800);
  --bs-success-bg-subtle: var(--tl-green-50);
  --bs-success-border-subtle: var(--tl-green-200);

  --bs-danger: var(--tl-danger);
  --bs-danger-rgb: 208, 52, 44;
  --bs-danger-text-emphasis: #8f1c17;
  --bs-danger-bg-subtle: #fbeae9;
  --bs-danger-border-subtle: #f0b7b3;

  --bs-warning: var(--tl-warning);
  --bs-warning-rgb: 224, 161, 0;
  --bs-warning-text-emphasis: #8a6200;
  --bs-warning-bg-subtle: #fdf4e0;
  --bs-warning-border-subtle: #f5d99a;

  --bs-info: var(--tl-info);
  --bs-info-rgb: 14, 110, 140;
  --bs-info-text-emphasis: #0a4a5e;
  --bs-info-bg-subtle: #e4f1f6;
  --bs-info-border-subtle: #a9d3e1;

  --bs-secondary: var(--tl-ink-500);
  --bs-secondary-rgb: 84, 90, 120;
  --bs-secondary-text-emphasis: var(--tl-ink-700);
  --bs-secondary-bg-subtle: var(--tl-ink-100);
  --bs-secondary-border-subtle: var(--tl-ink-200);

  --bs-light: var(--tl-ink-50);
  --bs-light-rgb: 245, 246, 249;
  --bs-dark: var(--tl-ink-900);
  --bs-dark-rgb: 0, 0, 26;

  --bs-link-color: var(--tl-green-700);
  --bs-link-color-rgb: 0, 115, 22;
  --bs-link-hover-color: var(--tl-green-800);
  --bs-link-hover-color-rgb: 0, 92, 18;

  --bs-heading-color: var(--tl-ink-900);
  --bs-code-color: var(--tl-green-800);
  --bs-highlight-bg: var(--tl-green-100);
  --bs-focus-ring-color: rgba(0, 138, 26, 0.3);

  /* Validation state is its own token set — it does not follow --bs-success/--bs-danger. */
  --bs-form-valid-color: var(--tl-green-700);
  --bs-form-valid-border-color: var(--tl-green-600);
  --bs-form-invalid-color: #b02a23;
  --bs-form-invalid-border-color: var(--tl-danger);
}

/* ---------------------------------------------------------------------------
   DARK THEME

   Surfaces are built from the ink hue rather than neutral grey, so the dark UI
   still reads as the same brand. The brand green is too dark to carry text on
   these surfaces, so text and links step up to green-400/300 — but the *fill*
   colors (--bs-primary-rgb and friends) deliberately stay at the brand value,
   because filled badges and buttons put white on top of them and a lighter green
   would drop that pairing below AA. Fills stay dark, glyphs get lighter.
   --------------------------------------------------------------------------- */
[data-bs-theme="dark"] {
  --bs-body-bg: #0a0b18;
  --bs-body-bg-rgb: 10, 11, 24;
  --bs-secondary-bg: var(--tl-ink-800);
  --bs-tertiary-bg: #1a1e33;
  --bs-body-color: var(--tl-ink-200);
  --bs-body-color-rgb: 210, 213, 224;
  --bs-emphasis-color: var(--tl-ink-50);
  --bs-secondary-color: rgba(174, 179, 198, 0.75);
  --bs-border-color: #2c3149;
  --bs-border-color-translucent: rgba(245, 246, 249, 0.15);

  --bs-primary: var(--tl-green-600);
  --bs-primary-rgb: 0, 138, 26;
  --bs-primary-text-emphasis: var(--tl-green-300);
  --bs-primary-bg-subtle: #042c0d;
  --bs-primary-border-subtle: var(--tl-green-800);

  --bs-success: var(--tl-green-600);
  --bs-success-rgb: 0, 138, 26;
  --bs-success-text-emphasis: var(--tl-green-300);
  --bs-success-bg-subtle: #042c0d;
  --bs-success-border-subtle: var(--tl-green-800);

  --bs-danger: var(--tl-danger);
  --bs-danger-rgb: 208, 52, 44;
  --bs-danger-text-emphasis: #f2938c;
  --bs-danger-bg-subtle: #3a0f0c;
  --bs-danger-border-subtle: #8f1c17;

  --bs-warning: var(--tl-warning);
  --bs-warning-rgb: 224, 161, 0;
  --bs-warning-text-emphasis: #f0c65a;
  --bs-warning-bg-subtle: #3a2900;
  --bs-warning-border-subtle: #8a6200;

  --bs-info: var(--tl-info);
  --bs-info-rgb: 14, 110, 140;
  --bs-info-text-emphasis: #7cc2d8;
  --bs-info-bg-subtle: #06212b;
  --bs-info-border-subtle: #0a4a5e;

  --bs-secondary: var(--tl-ink-400);
  --bs-secondary-rgb: 123, 129, 155;
  --bs-secondary-text-emphasis: var(--tl-ink-300);
  --bs-secondary-bg-subtle: var(--tl-ink-800);
  --bs-secondary-border-subtle: var(--tl-ink-700);

  --bs-light: var(--tl-ink-50);
  --bs-light-rgb: 245, 246, 249;
  --bs-dark: var(--tl-ink-900);
  --bs-dark-rgb: 0, 0, 26;

  --bs-link-color: var(--tl-green-400);
  --bs-link-color-rgb: 51, 176, 76;
  --bs-link-hover-color: var(--tl-green-300);
  --bs-link-hover-color-rgb: 99, 198, 116;

  --bs-heading-color: var(--tl-ink-50);
  --bs-code-color: var(--tl-green-300);
  --bs-highlight-bg: var(--tl-green-900);
  --bs-focus-ring-color: rgba(51, 176, 76, 0.35);

  /* Validation text sits on the dark surface, so it takes the lifted variants. */
  --bs-form-valid-color: var(--tl-green-300);
  --bs-form-valid-border-color: var(--tl-green-500);
  --bs-form-invalid-color: #f2938c;
  --bs-form-invalid-border-color: var(--tl-danger);
}

/* Text utilities need the lighter green/red on dark surfaces, but the matching
   bg-* utilities must NOT move — they are white-on-fill. Re-pointing the rgb
   token inside the text utility only lets the two diverge without forking any
   markup. */
[data-bs-theme="dark"] .text-primary { --bs-primary-rgb: 51, 176, 76; }
[data-bs-theme="dark"] .text-success { --bs-success-rgb: 51, 176, 76; }
[data-bs-theme="dark"] .text-danger  { --bs-danger-rgb: 242, 147, 140; }
[data-bs-theme="dark"] .text-warning { --bs-warning-rgb: 240, 198, 90; }
[data-bs-theme="dark"] .text-info    { --bs-info-rgb: 124, 194, 216; }

/* ---------------------------------------------------------------------------
   COMPONENT REMAPPING

   Bootstrap 5.3's compiled CSS bakes literal hex into each component's local
   variables — `.btn-primary` sets `--bs-btn-bg: #0d6efd` outright and never
   reads `--bs-primary`. Without an SCSS build step the only way to move those
   components onto the brand palette is to restate their variable blocks here.
   Everything below is a re-point, not a redesign: no geometry, spacing, or
   typography changes, so existing markup keeps its current shape.
   --------------------------------------------------------------------------- */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--tl-green-600);
  --bs-btn-border-color: var(--tl-green-600);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tl-green-700);
  --bs-btn-hover-border-color: var(--tl-green-800);
  --bs-btn-focus-shadow-rgb: 0, 138, 26;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--tl-green-800);
  --bs-btn-active-border-color: var(--tl-green-900);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--tl-green-600);
  --bs-btn-disabled-border-color: var(--tl-green-600);
}

.btn-outline-primary {
  --bs-btn-color: var(--tl-green-700);
  --bs-btn-border-color: var(--tl-green-600);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tl-green-600);
  --bs-btn-hover-border-color: var(--tl-green-600);
  --bs-btn-focus-shadow-rgb: 0, 138, 26;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--tl-green-700);
  --bs-btn-active-border-color: var(--tl-green-700);
  --bs-btn-disabled-color: var(--tl-green-700);
  --bs-btn-disabled-border-color: var(--tl-green-600);
}

.btn-success {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--tl-green-600);
  --bs-btn-border-color: var(--tl-green-600);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tl-green-700);
  --bs-btn-hover-border-color: var(--tl-green-800);
  --bs-btn-focus-shadow-rgb: 0, 138, 26;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--tl-green-800);
  --bs-btn-active-border-color: var(--tl-green-900);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--tl-green-600);
  --bs-btn-disabled-border-color: var(--tl-green-600);
}

.btn-outline-success {
  --bs-btn-color: var(--tl-green-700);
  --bs-btn-border-color: var(--tl-green-600);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tl-green-600);
  --bs-btn-hover-border-color: var(--tl-green-600);
  --bs-btn-focus-shadow-rgb: 0, 138, 26;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--tl-green-700);
  --bs-btn-active-border-color: var(--tl-green-700);
  --bs-btn-disabled-color: var(--tl-green-700);
  --bs-btn-disabled-border-color: var(--tl-green-600);
}

.btn-danger {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--tl-danger);
  --bs-btn-border-color: var(--tl-danger);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #b02a23;
  --bs-btn-hover-border-color: #8f1c17;
  --bs-btn-focus-shadow-rgb: 208, 52, 44;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #8f1c17;
  --bs-btn-active-border-color: #741511;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--tl-danger);
  --bs-btn-disabled-border-color: var(--tl-danger);
}

.btn-outline-danger {
  --bs-btn-color: #b02a23;
  --bs-btn-border-color: var(--tl-danger);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tl-danger);
  --bs-btn-hover-border-color: var(--tl-danger);
  --bs-btn-focus-shadow-rgb: 208, 52, 44;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #8f1c17;
  --bs-btn-active-border-color: #8f1c17;
  --bs-btn-disabled-color: #b02a23;
  --bs-btn-disabled-border-color: var(--tl-danger);
}

.btn-info, .btn-outline-info {
  --bs-btn-focus-shadow-rgb: 14, 110, 140;
}

.btn-info {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--tl-info);
  --bs-btn-border-color: var(--tl-info);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0b586f;
  --bs-btn-hover-border-color: #0a4a5e;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0a4a5e;
  --bs-btn-active-border-color: #083c4c;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--tl-info);
  --bs-btn-disabled-border-color: var(--tl-info);
}

.btn-outline-info {
  --bs-btn-color: var(--tl-info);
  --bs-btn-border-color: var(--tl-info);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tl-info);
  --bs-btn-hover-border-color: var(--tl-info);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0a4a5e;
  --bs-btn-active-border-color: #0a4a5e;
  --bs-btn-disabled-color: var(--tl-info);
  --bs-btn-disabled-border-color: var(--tl-info);
}

.btn-secondary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--tl-ink-500);
  --bs-btn-border-color: var(--tl-ink-500);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tl-ink-600);
  --bs-btn-hover-border-color: var(--tl-ink-700);
  --bs-btn-focus-shadow-rgb: 84, 90, 120;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--tl-ink-700);
  --bs-btn-active-border-color: var(--tl-ink-800);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--tl-ink-500);
  --bs-btn-disabled-border-color: var(--tl-ink-500);
}

.btn-outline-secondary {
  --bs-btn-color: var(--tl-ink-600);
  --bs-btn-border-color: var(--tl-ink-300);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--tl-ink-500);
  --bs-btn-hover-border-color: var(--tl-ink-500);
  --bs-btn-focus-shadow-rgb: 84, 90, 120;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--tl-ink-600);
  --bs-btn-active-border-color: var(--tl-ink-600);
  --bs-btn-disabled-color: var(--tl-ink-400);
  --bs-btn-disabled-border-color: var(--tl-ink-300);
}

/* Outline buttons carry ink text on a light surface; on dark that inverts. */
[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-success {
  --bs-btn-color: var(--tl-green-400);
  --bs-btn-border-color: var(--tl-green-600);
  --bs-btn-disabled-color: var(--tl-green-400);
}

[data-bs-theme="dark"] .btn-outline-danger {
  --bs-btn-color: #f2938c;
  --bs-btn-disabled-color: #f2938c;
}

[data-bs-theme="dark"] .btn-outline-info {
  --bs-btn-color: #7cc2d8;
  --bs-btn-disabled-color: #7cc2d8;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  --bs-btn-color: var(--tl-ink-300);
  --bs-btn-border-color: var(--tl-ink-600);
  --bs-btn-disabled-color: var(--tl-ink-500);
}

/* Sign in with Microsoft. Deliberately off-palette: provider buttons borrow the
   provider's own colour so they are recognisable at a glance, and the
   brand-green outline read as "our" action rather than Microsoft's. Fill is
   Microsoft's communication blue #0078d4 (white on it is 4.5:1); the outline
   text steps down to #0067b8 so it clears AA on the tinted page as well as on
   the white card. */
.btn-outline-microsoft {
  --bs-btn-color: #0067b8;
  --bs-btn-border-color: #0078d4;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0078d4;
  --bs-btn-hover-border-color: #0078d4;
  --bs-btn-focus-shadow-rgb: 0, 120, 212;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #005a9e;
  --bs-btn-active-border-color: #005a9e;
  --bs-btn-disabled-color: #0067b8;
  --bs-btn-disabled-border-color: #0078d4;
}

[data-bs-theme="dark"] .btn-outline-microsoft {
  --bs-btn-color: #6cb8f6;
  --bs-btn-disabled-color: #6cb8f6;
}

/* Nav pills, links, progress bars and form controls each hardcode the old blue
   the same way the buttons do. */
.nav-pills {
  --bs-nav-pills-link-active-bg: var(--tl-green-600);
}

.progress {
  --bs-progress-bar-bg: var(--tl-green-600);
}

.list-group {
  --bs-list-group-active-bg: var(--tl-green-600);
  --bs-list-group-active-border-color: var(--tl-green-600);
  --bs-list-group-action-active-bg: var(--bs-secondary-bg);
}

.pagination {
  --bs-pagination-color: var(--bs-link-color);
  --bs-pagination-hover-color: var(--bs-link-hover-color);
  --bs-pagination-focus-color: var(--bs-link-hover-color);
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(0, 138, 26, 0.25);
  --bs-pagination-active-bg: var(--tl-green-600);
  --bs-pagination-active-border-color: var(--tl-green-600);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--tl-green-400);
}

.form-check-input:checked {
  background-color: var(--tl-green-600);
  border-color: var(--tl-green-600);
}

.form-check-input:focus {
  border-color: var(--tl-green-400);
}

.form-range::-webkit-slider-thumb { background-color: var(--tl-green-600); }
.form-range::-moz-range-thumb { background-color: var(--tl-green-600); }

/* Focus ring. The old rule hardcoded a white inner halo, which vanished against
   the dark theme's background — using the body background keeps the ring legible
   in both themes. */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--bs-body-bg), 0 0 0 0.25rem var(--bs-focus-ring-color);
}

/* Sticky footer. The footer used to be absolutely positioned against a `min-height: 100%` html with a
   fixed 60px body margin reserving its space — that only works while the footer is exactly one line tall,
   so it clipped as soon as its contents wrapped. A flex column keeps the footer at the bottom on short
   pages and lets it grow to whatever height it needs on narrow ones. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > footer {
  margin-top: auto;
}

/* Logos with black lettering disappear on the dark background, so each has a -dark copy with only the
   lettering turned white. An invert filter would have done it without the extra files, but it also moves the
   brand green and purple; the copies keep those exact. */
.logo-for-dark { display: none; }
[data-bs-theme="dark"] .logo-for-light { display: none; }
[data-bs-theme="dark"] .logo-for-dark { display: inline; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Info icon that reveals a field-help tooltip on hover/focus. */
.field-help {
  cursor: help;
}

/* Cookie-consent banner: pinned to the bottom of the viewport until a choice is made. Uses Bootstrap theme
   variables so it follows light/dark. z-index sits below the modal (1055) so "Manage preferences" overlays it. */
.cookie-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}
/* Rendered Markdown on the public /Docs pages. Bootstrap styles the app's own markup, but the HTML that
   comes out of Markdig carries no classes, so headings, tables and code need spacing here. Everything uses
   Bootstrap theme variables so the docs follow the light/dark toggle like the rest of the site. */
.docs-content h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.docs-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.docs-content h3 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.docs-content p,
.docs-content li {
  line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
  margin-bottom: 1rem;
}

.docs-content blockquote {
  border-left: 3px solid var(--bs-border-color);
  padding-left: 1rem;
  color: var(--bs-secondary-color);
}

.docs-content code {
  background-color: var(--bs-tertiary-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}

.docs-content pre {
  background-color: var(--bs-tertiary-bg);
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
}

.docs-content pre code {
  background-color: transparent;
  padding: 0;
}

/* Wide comparison tables must scroll inside the article rather than widening the page. */
.docs-content .table-wrapper,
.docs-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border-collapse: collapse;
}

.docs-content th,
.docs-content td {
  border: 1px solid var(--bs-border-color);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.docs-content th {
  background-color: var(--bs-tertiary-bg);
}

/* ---------------------------------------------------------------------------
   HOME HERO COPY

   The copy shares its row with the illustration, so it is sized to the
   column rather than the viewport: display-4 reached 56px in a ~520px column
   and left "Journey" alone on the second line. The headline is clamped to
   stay a clear step above the lead (about 2.6:1 at the top end).
   balance evens out the headline's lines; pretty keeps the lead from ending
   on a single word. Both are progressive — browsers without text-wrap
   support just wrap normally.

   The logo fills its column at every width, keeping its aspect ratio. The
   copy under it is inset from the left on wide screens so it sits in from
   the wordmark's edge rather than flush with the panel; on narrow screens
   everything is centred and the inset would only push it off-centre.
   --------------------------------------------------------------------------- */
.hero-logo {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1.75rem;
}

.hero-title {
  font-size: clamp(2.25rem, 1.4rem + 2.4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.25rem;
  line-height: 1.55;
  max-width: 34rem;
  text-wrap: pretty;
}

@media (min-width: 992px) {
  .hero-copy { padding-left: 2.5rem; }
}

@media (max-width: 575.98px) {
  .hero-lead { font-size: 1.125rem; }
}

/* ---------------------------------------------------------------------------
   HOME HERO ILLUSTRATION

   The inline SVG on the landing page draws against these tokens only, so the
   theme swap is two small blocks rather than a second drawing. The panel is
   lifted off the hero's secondary-bg surface in both themes; candles use the
   green-500/400 step rather than the brand fill, which is too dark to read as
   a thin wick on the dark panel.
   --------------------------------------------------------------------------- */
[data-bs-theme="light"] #home-hero {
  --hero-art-panel: #ffffff;
  --hero-art-grid: var(--tl-ink-100);
  --hero-art-muted: var(--tl-ink-200);
  --hero-art-label: var(--tl-ink-500);
  --hero-art-up: var(--tl-green-500);
  --hero-art-down: var(--tl-danger);
  --hero-art-ma: var(--tl-info);
  --hero-art-entry: var(--tl-ink-700);
}

[data-bs-theme="dark"] #home-hero {
  --hero-art-panel: #1f2440;
  --hero-art-grid: #2c3149;
  --hero-art-muted: var(--tl-ink-600);
  --hero-art-label: var(--tl-ink-300);
  --hero-art-up: var(--tl-green-400);
  --hero-art-down: #e5574f;
  --hero-art-ma: #7cc2d8;
  --hero-art-entry: var(--tl-ink-200);
}

.hero-art {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
  font-family: inherit;
}

.hero-art-panel,
.hero-art-card { fill: var(--hero-art-panel); }
.hero-art-grid line { stroke: var(--hero-art-grid); stroke-width: 1; }

.hero-art-up line,
.hero-art-down line { stroke-width: 2; stroke-linecap: round; }
.hero-art-up line { stroke: var(--hero-art-up); }
.hero-art-up rect { fill: var(--hero-art-up); }
.hero-art-down line { stroke: var(--hero-art-down); }
.hero-art-down rect { fill: var(--hero-art-down); }

.hero-art-reward { fill: var(--hero-art-up); fill-opacity: 0.1; }
.hero-art-risk { fill: var(--hero-art-down); fill-opacity: 0.12; }
.hero-art-level { stroke-width: 1.5; stroke-dasharray: 5 4; }
.hero-art-level-target { stroke: var(--hero-art-up); }
.hero-art-level-entry { stroke: var(--hero-art-entry); }
.hero-art-level-stop { stroke: var(--hero-art-down); }

.hero-art-ma { fill: none; stroke: var(--hero-art-ma); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-art-entry-dot { fill: var(--hero-art-panel); stroke: var(--hero-art-entry); stroke-width: 2.5; }

.hero-art-tag text { font-size: 11px; font-weight: 600; text-anchor: middle; fill: #ffffff; }
.hero-art-tag-target rect { fill: var(--hero-art-up); }
.hero-art-tag-entry rect { fill: var(--hero-art-entry); }
.hero-art-tag-entry text { fill: var(--hero-art-panel); }
.hero-art-tag-stop rect { fill: var(--hero-art-down); }

.hero-art-card-title { font-size: 13px; font-weight: 700; fill: var(--bs-emphasis-color); }
.hero-art-card-label { font-size: 12px; fill: var(--hero-art-label); }
.hero-art-card-value { font-size: 20px; font-weight: 700; fill: var(--hero-art-up); }
.hero-art-check circle { fill: var(--hero-art-up); }
.hero-art-check path { fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-art-bar rect { fill: var(--hero-art-muted); }
.hero-art-equity { fill: none; stroke: var(--hero-art-up); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-art-equity-stop { stop-color: var(--hero-art-up); }

/* A slow bob on the two cards is the only motion; it is off entirely for
   anyone who has asked the OS for reduced motion. */
@keyframes hero-art-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-art-float { animation: hero-art-float 6s ease-in-out infinite; }
.hero-art-float-late { animation-delay: -3s; }

@media (prefers-reduced-motion: reduce) {
  .hero-art-float { animation: none; }
}

/* ---------------------------------------------------------------------------
   LAUNCH OFFER

   Meant to be seen: the banner is a dark ink band in the light theme, where it
   is the highest-contrast thing on the page, and a lifted panel with an amber
   edge in the dark theme, where a dark band would disappear. Amber is the one
   accent nothing else on these pages uses, so it reads as "offer" rather than
   as another primary action. The card note and ribbon reuse the same amber.
   --------------------------------------------------------------------------- */
[data-bs-theme="light"] {
  --launch-bg: var(--tl-ink-900);
  --launch-fg: var(--tl-ink-50);
  --launch-muted: var(--tl-ink-200);
  --launch-accent: #f5b82e;
  --launch-edge: transparent;
  --launch-note-bg: #fff6dc;
  --launch-note-fg: #5c4300;
  --launch-note-border: #f0d27a;
}

[data-bs-theme="dark"] {
  --launch-bg: #1a1e33;
  --launch-fg: var(--tl-ink-50);
  --launch-muted: var(--tl-ink-300);
  --launch-accent: #f0c65a;
  --launch-edge: #f0c65a;
  --launch-note-bg: #2e2610;
  --launch-note-fg: #f6dc95;
  --launch-note-border: #6b5418;
}

.launch-offer-banner {
  background: var(--launch-bg);
  color: var(--launch-fg);
  border: 1px solid var(--launch-edge);
  border-left: 6px solid var(--launch-accent);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 24px rgba(0, 0, 26, 0.18);
}

.launch-offer-countdown {
  color: var(--launch-accent);
  min-width: 7rem;
}

.launch-offer-countdown .bi {
  font-size: 2rem;
  line-height: 1;
}

.launch-offer-days {
  display: block;
  margin-top: 0.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.launch-offer-eyebrow {
  color: var(--launch-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.launch-offer-title {
  color: var(--launch-fg);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0.2rem 0 0.4rem;
}

.launch-offer-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.launch-offer-plans strong {
  color: var(--launch-fg);
  font-size: 1.1rem;
}

.launch-offer-regular,
.launch-offer-banner p {
  color: var(--launch-muted);
}

.launch-ribbon {
  display: inline-block;
  background: var(--launch-accent);
  color: var(--tl-ink-900);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.launch-price-note {
  background: var(--launch-note-bg);
  color: var(--launch-note-fg);
  border: 1px solid var(--launch-note-border);
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
}

.launch-ribbon-slot {
  display: block;
  height: 1.625rem; /* the ribbon: 0.75rem text at 1.5 line height, plus 0.25rem padding top and bottom */
}

/* ---- Not-found page (Pages/NotFound) ---------------------------------------
   The magnifying glass drifts gently over the chart, searching for the page.
   Still for anyone who asks for reduced motion. */
.not-found-art { flex-shrink: 0; }

.not-found-glass {
  transform-box: fill-box;
  transform-origin: center;
  animation: not-found-search 3.2s ease-in-out infinite;
}

@keyframes not-found-search {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-4px, -3px) rotate(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .not-found-glass { animation: none; }
}

@media (max-width: 400px) {
  .not-found-art { width: 105px; height: 70px; }
}
