/*===============================================*\
|| TerraLoc theme layer                           ||
|| Loaded after style.css, overrides base tokens. ||
|| Faces: day (Landeskarte) / night (Field)       ||
|| Rules: amber is live, ochre is ascent.         ||
|| Tokens mirror shared/design/terraloc-tokens.css||
|| Reasoning: docs/design-direction.md            ||
\*===============================================*/

/* ============ 1. Fonts ============ */
/*
 * FOUR FAMILIES, ALL SELF HOSTED, ALL OFL. No third party request on any
 * page load, which is what docs/design-direction.md asks for and what the
 * coming-soon page's Google Fonts link was only ever a placeholder for.
 *
 *   Bricolage Grotesque   display   variable, opsz 12..96, wght 200..800
 *   Archivo               body      variable, wght 100..900
 *   IBM Plex Mono         data      static 600
 *
 * Instrument Sans and Geist Mono were declared here for a direction the tokens
 * never finished moving to: the body and the mono stack below still resolve to
 * Archivo and Plex Mono, so neither face was ever asked for. Both are gone,
 * along with Inter, which the framework's own stylesheet was using for
 * tooltips and buttons.
 *
 * The two variable faces carry their real axes, so font-optical-sizing does
 * its job on a display line and one file covers every weight. Licences sit
 * next to the woff2 in each directory.
 *
 * Subsets are latin and latin-ext. Cyrillic, Greek and Vietnamese are not
 * shipped: add the subset file and a matching @font-face when a language
 * needs them, rather than paying for them on every page now.
 */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/BricolageGrotesque/bricolagegrotesque-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/BricolageGrotesque/bricolagegrotesque-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(../fonts/Archivo/archivo-100-900-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(../fonts/Archivo/archivo-100-900-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/PlexMono/plexmono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/PlexMono/plexmono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/PlexMono/plexmono-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/PlexMono/plexmono-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ============ 2. TerraLoc tokens ============ */
/* GENERATED from shared/design/tokens.php by scripts/sync_shared.php.
   Do not edit by hand: adding or changing a token regenerates this block.
   ---- BEGIN GENERATED: tokens ---- */
/* Day face: the brand. A Landeskarte sheet. */
:root,
[data-bs-theme=light] {
  --tl-paper:           #F3F2EC;
  --tl-paper-deep:      #EFEDE2;
  --tl-panel:           #FAF9F4;
  --tl-white:           #FFFFFF;
  --tl-ink:             #23281F;
  --tl-muted:           #5C6253;
  --tl-dim:             #8B8F80;
  --tl-hairline:        #DFDCCB;
  --tl-hairline-strong: #C9C5B2;
  --tl-accent:          #46603C;
  --tl-accent-ink:      #F3F2EC;
  --tl-accent-hover:    #2E4228;
  --tl-accent-2:        #7A8F6A;
  --tl-accent-3:        #ADBCA0;
  --tl-accent-dim:      #C3CDB8;
  --tl-cta:             #C86B3F;
  --tl-cta-ink:         #F3F2EC;
  --tl-cta-hover:       #A8512E;
  --tl-sage:            #9FB08A;
  --tl-night:           #14180F;
  --tl-night-ink:       #C9CDBD;
  --tl-night-bright:    #F3F2EC;
  --tl-night-line:      #2C3625;
  --tl-night-dim:       #6E7663;
  --tl-night-muted:     #8A937E;
  --tl-night-card:      #1B2114;
  --tl-night-line-2:    #3A4730;
  --tl-night-line-3:    #4A5839;
  --tl-brand-green:     #46603C;
  --tl-live:            #C86B3F;
  --tl-live-bg:         #F4E2D6;
  --tl-terra:           #A9743E;
  --tl-climb:           #C07818;
  --tl-descend:         #2074B0;
  --tl-level:           #90968C;
  --tl-success:         #1F7A47;
  --tl-success-bg:      #DCEBE2;
  --tl-warning:         #9C4A1B;
  --tl-warning-bg:      #F4E1D6;
  --tl-danger:          #A32219;
  --tl-danger-bg:       #F5DCD9;
  --tl-info:            #2F6488;
  --tl-info-bg:         #DCE7EF;
  --tl-contour:         #C6A67A;
  --tl-contour-index:   #A46A3F;
  --tl-forest:          #D7E0C6;
  --tl-water:           #C6DAE6;
  --tl-water-edge:      #4D7EA8;
  --tl-trail:           #9A8A6A;
  --tl-rock:            #8E7A62;
  --tl-snow:            #FCFCFA;
  --tl-accent-rgb:      70, 96, 60;
  --tl-cta-rgb:         200, 107, 63;
  --tl-live-rgb:        200, 107, 63;
  --tl-ink-rgb:         35, 40, 31;
  --tl-paper-rgb:       243, 242, 236;
  --tl-brand-green-rgb: 70, 96, 60;
  --tl-success-rgb:     31, 122, 71;
  --tl-warning-rgb:     156, 74, 27;
  --tl-danger-rgb:      163, 34, 25;
  --tl-info-rgb:        47, 100, 136;
  --tl-muted-rgb:       92, 98, 83;
  --tl-radius:    8px;
  --tl-radius-sm: 6px;
  --tl-radius-lg: 12px;
  --tl-radius-xl: 14px;
  --tl-lift:      0 1px 2px rgba(0, 0, 0, .05), 0 6px 20px rgba(0, 0, 0, .08);
  --tl-lift-lg:   0 2px 6px rgba(0, 0, 0, .06), 0 18px 48px rgba(0, 0, 0, .12);
}

/* Night face: a functional accommodation, not a second brand. */
[data-bs-theme=dark] {
  --tl-paper:           #15150F;
  --tl-paper-deep:      #0F0F0A;
  --tl-panel:           #1C1C15;
  --tl-white:           #24241C;
  --tl-ink:             #EDEBE2;
  --tl-muted:           #A0A093;
  --tl-dim:             #6F6F64;
  --tl-hairline:        #2F2F26;
  --tl-hairline-strong: #3F3F33;
  --tl-accent:          #9FB08A;
  --tl-accent-ink:      #14180F;
  --tl-accent-hover:    #B9C7A6;
  --tl-accent-2:        #7A8F6A;
  --tl-accent-3:        #ADBCA0;
  --tl-accent-dim:      #3E4A32;
  --tl-cta:             #E08A57;
  --tl-cta-ink:         #14180F;
  --tl-cta-hover:       #EFA378;
  --tl-sage:            #9FB08A;
  --tl-night:           #14180F;
  --tl-night-ink:       #C9CDBD;
  --tl-night-bright:    #F3F2EC;
  --tl-night-line:      #2C3625;
  --tl-night-dim:       #6E7663;
  --tl-night-muted:     #8A937E;
  --tl-night-card:      #1B2114;
  --tl-night-line-2:    #3A4730;
  --tl-night-line-3:    #4A5839;
  --tl-brand-green:     #9FB08A;
  --tl-live:            #E08A57;
  --tl-live-bg:         #33200F;
  --tl-terra:           #D0955A;
  --tl-climb:           #E8963A;
  --tl-descend:         #4FA0DC;
  --tl-level:           #868C82;
  --tl-success:         #4FC98C;
  --tl-success-bg:      #16301F;
  --tl-warning:         #E08A57;
  --tl-warning-bg:      #33200F;
  --tl-danger:          #F0796C;
  --tl-danger-bg:       #341715;
  --tl-info:            #7FB3D5;
  --tl-info-bg:         #152532;
  --tl-contour:         #4A4436;
  --tl-contour-index:   #6E5B3C;
  --tl-forest:          #26311F;
  --tl-water:           #1B3038;
  --tl-water-edge:      #2B4A56;
  --tl-trail:           #4E4634;
  --tl-rock:            #5A5140;
  --tl-snow:            #2A2A22;
  --tl-accent-rgb:      159, 176, 138;
  --tl-cta-rgb:         224, 138, 87;
  --tl-live-rgb:        224, 138, 87;
  --tl-ink-rgb:         237, 235, 226;
  --tl-paper-rgb:       21, 21, 15;
  --tl-brand-green-rgb: 159, 176, 138;
  --tl-success-rgb:     79, 201, 140;
  --tl-warning-rgb:     224, 138, 87;
  --tl-danger-rgb:      240, 121, 108;
  --tl-info-rgb:        127, 179, 213;
  --tl-muted-rgb:       160, 160, 147;
}
/* ---- END GENERATED: tokens ---- */

/* ---- sport colours ----
   GENERATED from shared/sports/definitions/*.php by scripts/sync_shared.php.
   Do not edit by hand: adding a sport regenerates this block.
   ---- BEGIN GENERATED: sports ---- */
:root, [data-bs-theme=light], [data-bs-theme=dark] {
  --tl-sport-hike:           #0E7A46;
  --tl-sport-sightseeing:    #9370C4;
  --tl-sport-nordic_walking: #5C8A72;
  --tl-sport-running:        #D4674A;
  --tl-sport-trail_run:      #C0396B;
  --tl-sport-via_ferrata:    #6F7F1A;
  --tl-sport-climbing:       #8A3F7A;
  --tl-sport-bike:           #1D5BD8;
  --tl-sport-e_bike:         #A63FBE;
  --tl-sport-inline_skate:   #DA54B0;
  --tl-sport-swim:           #0E7B7B;
  --tl-sport-pool_swim:      #007BD9;
  --tl-sport-kayak:          #985858;
  --tl-sport-ski_tour:       #2E7FB5;
  --tl-sport-alpine_ski:     #2C3E91;
  --tl-sport-kite:           #6B3FC4;
  --tl-sport-surf:           #5AC8D8;
  --tl-sport-transition:     #8B968E;
}
/* ---- END GENERATED: sports ---- */

/* ---- surfaces ----
   What the ground is like, in the three answers an athlete is actually asking
   for. OSM's own surface vocabulary runs to about thirty values and we showed
   them one to one: a day came back as eight rows all meaning "not asphalt",
   which is a taxonomy, not an answer. Track/SurfaceMatcher groups them, and
   fills the gaps from the road class.

   Coloured as the ground gets harder, earth to tarmac, so a line reads as a
   gradient without anyone consulting a key. Deliberately not the sport
   palette: a surface-coloured line has to be legible as a different kind of
   fact.

   THREE HUES, NOT THREE SHADES. The first set was #7A5230 and #A88A5A for
   natural and gravel: two steps of one muted brown, which asks a reader to
   judge lightness on a 3px line over a mottled hillside. They are a red earth
   and a warm amber now, and paved has left the greys for a cool slate, so the
   three differ in hue before they differ in anything else.

   ONE SET FOR BOTH FACES, on purpose. The basemap is the athlete's own choice
   (Topo, Terrain, Dark, Satellite) and has nothing to do with the site theme,
   so a line that reads only on a light face is wrong half the time. These are
   mid-tone and saturated, which is what survives both a pale topo and a dark
   hillshade.
*/
:root, [data-bs-theme=light], [data-bs-theme=dark] {
  --tl-surface-natural: #A0522D;
  --tl-surface-gravel:  #D19A3E;
  --tl-surface-paved:   #5A6B78;
  --tl-surface-unknown: #9A9788;
}



/* ============ 3. Bootstrap core mapping ============ */
:root,
[data-bs-theme=light] {
  /*
     Bootstrap's "primary" is overwhelmingly buttons, so it takes the CTA
     orange; links keep the green through --bs-link-color below. That is the
     split the landing mockup draws: green is what you click through, orange is
     what the page is asking you to do.
  */
  --bs-primary: var(--tl-cta);
  --bs-primary-rgb: var(--tl-cta-rgb);
  --bs-primary-text-emphasis: var(--tl-cta-hover);
  --bs-primary-bg-subtle: var(--tl-live-bg);
  --bs-primary-border-subtle: var(--tl-cta);

  /*
   * Semantic states. Without these, .bg-warning and its 800-odd siblings across
   * the three plugins render in stock Bootstrap, and Bootstrap's warning is an
   * amber a shade off --tl-live: a colour reserved for "this athlete is out
   * there right now" was appearing on validation notices.
   */
  --bs-success: var(--tl-success);
  --bs-success-rgb: var(--tl-success-rgb);
  --bs-success-text-emphasis: var(--tl-success);
  --bs-success-bg-subtle: var(--tl-success-bg);
  --bs-success-border-subtle: var(--tl-success);
  --bs-warning: var(--tl-warning);
  --bs-warning-rgb: var(--tl-warning-rgb);
  --bs-warning-text-emphasis: var(--tl-warning);
  --bs-warning-bg-subtle: var(--tl-warning-bg);
  --bs-warning-border-subtle: var(--tl-warning);
  --bs-danger: var(--tl-danger);
  --bs-danger-rgb: var(--tl-danger-rgb);
  --bs-danger-text-emphasis: var(--tl-danger);
  --bs-danger-bg-subtle: var(--tl-danger-bg);
  --bs-danger-border-subtle: var(--tl-danger);
  --bs-info: var(--tl-info);
  --bs-info-rgb: var(--tl-info-rgb);
  --bs-info-text-emphasis: var(--tl-info);
  --bs-info-bg-subtle: var(--tl-info-bg);
  --bs-info-border-subtle: var(--tl-info);
  --bs-secondary: var(--tl-muted);
  --bs-secondary-rgb: var(--tl-muted-rgb);
  --bs-secondary-text-emphasis: var(--tl-ink);
  --bs-secondary-bg-subtle: var(--tl-paper-deep);
  --bs-secondary-border-subtle: var(--tl-hairline);

  --bs-body-bg: var(--tl-paper);
  --bs-body-bg-rgb: var(--tl-paper-rgb);
  --bs-body-color: var(--tl-ink);
  --bs-body-color-rgb: var(--tl-ink-rgb);
  --bs-emphasis-color: #0E100C;
  --bs-secondary-color: var(--tl-muted);
  --bs-secondary-bg: var(--tl-paper-deep);
  --bs-tertiary-color: var(--tl-dim);
  --bs-tertiary-bg: #EEEDE5;

  --bs-heading-color: var(--tl-ink);
  --bs-border-color: var(--tl-hairline);
  --bs-border-color-translucent: rgba(var(--tl-ink-rgb), 0.1);

  --bs-link-color: var(--tl-accent);
  --bs-link-color-rgb: var(--tl-accent-rgb);
  --bs-link-hover-color: var(--tl-accent-hover);

  --bs-focus-ring-color: rgba(var(--tl-accent-rgb), 0.25);
  --bs-code-color: #A9436B;
}

[data-bs-theme=dark] {
  --bs-primary: var(--tl-cta);
  --bs-primary-rgb: var(--tl-cta-rgb);
  --bs-primary-text-emphasis: #FFB7A6;
  --bs-primary-bg-subtle: #33170F;
  --bs-primary-border-subtle: var(--tl-accent-dim);

  /*
   * Semantic states. Without these, .bg-warning and its 800-odd siblings across
   * the three plugins render in stock Bootstrap, and Bootstrap's warning is an
   * amber a shade off --tl-live: a colour reserved for "this athlete is out
   * there right now" was appearing on validation notices.
   */
  --bs-success: var(--tl-success);
  --bs-success-rgb: var(--tl-success-rgb);
  --bs-success-text-emphasis: var(--tl-success);
  --bs-success-bg-subtle: var(--tl-success-bg);
  --bs-success-border-subtle: var(--tl-success);
  --bs-warning: var(--tl-warning);
  --bs-warning-rgb: var(--tl-warning-rgb);
  --bs-warning-text-emphasis: var(--tl-warning);
  --bs-warning-bg-subtle: var(--tl-warning-bg);
  --bs-warning-border-subtle: var(--tl-warning);
  --bs-danger: var(--tl-danger);
  --bs-danger-rgb: var(--tl-danger-rgb);
  --bs-danger-text-emphasis: var(--tl-danger);
  --bs-danger-bg-subtle: var(--tl-danger-bg);
  --bs-danger-border-subtle: var(--tl-danger);
  --bs-info: var(--tl-info);
  --bs-info-rgb: var(--tl-info-rgb);
  --bs-info-text-emphasis: var(--tl-info);
  --bs-info-bg-subtle: var(--tl-info-bg);
  --bs-info-border-subtle: var(--tl-info);
  --bs-secondary: var(--tl-muted);
  --bs-secondary-rgb: var(--tl-muted-rgb);
  --bs-secondary-text-emphasis: var(--tl-ink);
  --bs-secondary-bg-subtle: var(--tl-paper-deep);
  --bs-secondary-border-subtle: var(--tl-hairline);

  --bs-body-bg: var(--tl-paper);
  --bs-body-bg-rgb: var(--tl-paper-rgb);
  --bs-body-color: var(--tl-ink);
  --bs-body-color-rgb: var(--tl-ink-rgb);
  --bs-emphasis-color: #FFFFFF;
  --bs-secondary-color: var(--tl-muted);
  --bs-secondary-bg: var(--tl-paper-deep);
  --bs-tertiary-color: var(--tl-dim);
  --bs-tertiary-bg: var(--tl-panel);

  --bs-heading-color: var(--tl-ink);
  --bs-border-color: var(--tl-hairline);
  --bs-border-color-translucent: rgba(var(--tl-ink-rgb), 0.1);

  --bs-link-color: var(--tl-accent);
  --bs-link-color-rgb: var(--tl-accent-rgb);
  --bs-link-hover-color: var(--tl-accent-hover);
  --bs-focus-ring-color: rgba(var(--tl-accent-rgb), 0.25);
}


/* ============ 4. Typography ============ */
:root,
[data-bs-theme=light],
[data-bs-theme=dark] {
  /*
     The landing mockup sets Archivo for body and IBM Plex Mono for data, with
     Bricolage Grotesque for display. Body was Instrument Sans and mono was
     Geist Mono, which is why the page read as a near miss rather than the
     design: the letterforms were wrong everywhere at once. Both faces are
     already shipped under assets/fonts, so this is a pointer change, not a
     download.
  */
  --bs-body-font-family: "Archivo", Helvetica, Arial, sans-serif;
  --tl-font-body: "Archivo", Helvetica, Arial, sans-serif;
  --tl-font-display: "Bricolage Grotesque", "Archivo", Helvetica, Arial, sans-serif;
  --tl-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* EVERY BUTTON ON THE SITE WAS SET IN INTER. style.css carries the framework's
     own typography and this theme resets the variables it uses, but it reset
     --bs-body-font-family and not --bs-btn-font-family, which style.css sets to
     Inter on .btn and which nothing else touched. So the one font the design
     system does not contain was the one on every call to action, and Inter was
     downloaded on every page to draw it. */
  --bs-btn-font-family: var(--tl-font-body);
  --bs-tooltip-font-family: var(--tl-font-body);
  --bs-popover-font-family: var(--tl-font-body);

  /* ---- page rhythm ----
     One pair of values for every TerraLoc page, so the distance from the
     navbar to the first heading is the same on Activities, Rankings, Clubs,
     Compete and the newsroom. Fluid rather than stepped: a clamp() covers
     390px to 1600px without a breakpoint, which is what the old mixture of
     py-4 py-xl-5, pb-5 and hand-written paddings was trying and failing to
     do. Top is deliberately tighter than bottom: the navbar already gives
     the header air above it, the footer gives none below.
     Read by .tl-page in plugins/terraloc/assets/css/tl-ui.css.
  */
  --tl-page-top:    clamp(1.5rem, 2.8vw, 2.5rem);
  --tl-page-bottom: clamp(2.5rem, 5vw, 4.5rem);

  /* ---- the page gutter ----
     One distance from the viewport edge, for the navbar and for every page
     under it, so the logo and the first heading share a left edge. The site
     had four: the app bar took the full --bs-gutter-x and fell back to
     1.5rem (24px), .container-fluid took half of the template's 1.875rem
     (15px), the Compete hero took the full inherited 1.875rem (30px), and the
     newsroom sat in a centred .container (78px at 1440). 2rem is what the
     mockups measure at 1440.
  */
  --tl-page-gutter: clamp(1rem, 2.3vw, 2rem);
}

/* ------------------------------------------------------------------
   The page frame

   The stock template carries a bare element rule, section { padding:
   7.5rem 0 }, which is right for a marketing page and 120px of dead
   space at the top of an app page. Every TerraLoc page was overriding it
   on its own: py-4 py-xl-5 here, pb-5 there, padding: 28px 0 60px in a
   plugin stylesheet, and three pages not overriding it at all. That is
   why the gap between the navbar and the first heading was 28px, 40px or
   120px depending on which page you were on.

   section.tl-page outranks the bare selector (0,1,1 against 0,0,1), so
   one class on the page root settles it for the whole site and the
   framework rule is left intact for the stock CMS pages that still want
   it. Map pages, which bleed to the viewport edges, take .tl-page-flush
   instead.
   ------------------------------------------------------------------ */

.tl-page {
  padding-top: var(--tl-page-top);
  padding-bottom: var(--tl-page-bottom);
}

/* Full-bleed: the track, live, explore and planner stages own the whole
   viewport under the navbar and paint their own edges. */
.tl-page-flush {
  padding-top: 0;
  padding-bottom: 0;
}

/* The page is full width with a gutter, which is what the mockups draw: a
   centred .container put the newsroom 78px in while Activities sat at 15px,
   and no page lined up with the logo above it. Scoped to our own page roots,
   so the stock CMS pages keep Bootstrap's own containers. */
.tl-page > .container,
.tl-page > .container-fluid,
.tl-page-flush > .container,
.tl-page-flush > .container-fluid {
  max-width: none;
  padding-left: var(--tl-page-gutter);
  padding-right: var(--tl-page-gutter);
}

body { font-family: var(--bs-body-font-family); }

/* Display is Bricolage Grotesque, mixed case, with the optical size axis let
   off its leash at large sizes. The first direction pushed Archivo's width
   axis to 125% and shouted in uppercase; this one gets its character from the
   face instead, which is why the accent had to arrive at the same time. */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--tl-font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.08;
}
h1, .h1, h2, .h2 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

.lead { color: var(--tl-muted); }

/* Every number a user reads is mono and tabular. */
table, .table, .badge, .pagination, time {
  font-variant-numeric: tabular-nums;
}
code, kbd, pre, samp { font-family: var(--tl-font-mono); }

/* THE LAST FOUR PLACES THE FRAMEWORK'S OWN TYPEFACES REACHED THE PAGE.

   style.css sets .tooltip and .popover in Inter and .font-heading in
   Instrument Sans, on the classes themselves rather than through a variable,
   so resetting --bs-tooltip-font-family above does not reach them. Tooltips
   are used on the planner, the profile, the activity page and throughout
   tlcomp, so Inter was being downloaded to draw them; .font-heading is on the
   stock tags page.

   With these four, nothing on the site asks for Inter or Instrument Sans any
   more, which is what made it safe to delete both families. */
.tooltip,
.popover,
.font-base { font-family: var(--tl-font-body); }

.font-heading { font-family: var(--tl-font-display); }


/* ============ 5. Components ============ */
.btn {
  --bs-btn-font-weight: 700;
  --bs-btn-border-radius: var(--tl-radius);
}
.btn-primary {
  --bs-btn-bg: var(--tl-accent);
  --bs-btn-border-color: var(--tl-accent);
  --bs-btn-color: var(--tl-accent-ink);
  --bs-btn-hover-bg: var(--tl-accent-hover);
  --bs-btn-hover-border-color: var(--tl-accent-hover);
  --bs-btn-hover-color: var(--tl-accent-ink);
  --bs-btn-active-bg: var(--tl-accent-hover);
  --bs-btn-active-border-color: var(--tl-accent-hover);
  --bs-btn-active-color: var(--tl-accent-ink);
  --bs-btn-disabled-bg: var(--tl-accent);
  --bs-btn-disabled-border-color: var(--tl-accent);
  --bs-btn-disabled-color: var(--tl-accent-ink);
}

/*
  THE OUTLINE VARIANTS, WHICH THE THEME NEVER CLAIMED.

  .btn-primary was mapped to the tokens and .btn-outline-primary was not, so
  it kept the vivid green style.css inherited from the fork, a colour that is
  nowhere in this palette. Every outline button on the site filled with it on
  hover, and where a page also set its own hover text colour, the result was
  the accent green on that green. The planner's Share and Download were the
  pair that showed it.

  Outline means quiet until you reach for it: accent text on the page's own
  ground, filling with the accent when hovered.

  style.css carried that same green in forty-nine other places, and it no
  longer carries it anywhere: every one of them reads --tl-accent or
  --tl-accent-rgb now, so this file is the only thing that decides what the
  brand colour is. Which is what the template was always supposed to mean.
*/
.btn-outline-primary {
  --bs-btn-color: var(--tl-accent);
  --bs-btn-border-color: var(--tl-accent);
  --bs-btn-bg: transparent;
  --bs-btn-hover-bg: var(--tl-accent);
  --bs-btn-hover-border-color: var(--tl-accent);
  --bs-btn-hover-color: var(--tl-accent-ink);
  --bs-btn-active-bg: var(--tl-accent-hover);
  --bs-btn-active-border-color: var(--tl-accent-hover);
  --bs-btn-active-color: var(--tl-accent-ink);
  --bs-btn-disabled-color: var(--tl-dim);
  --bs-btn-disabled-border-color: var(--tl-hairline-strong);
  --bs-btn-focus-shadow-rgb: var(--tl-accent-rgb);
}

.btn-outline-secondary {
  --bs-btn-color: var(--tl-ink);
  --bs-btn-border-color: var(--tl-hairline-strong);
  --bs-btn-bg: transparent;
  --bs-btn-hover-bg: var(--tl-paper-deep);
  --bs-btn-hover-border-color: var(--tl-hairline-strong);
  --bs-btn-hover-color: var(--tl-ink);
  --bs-btn-active-bg: var(--tl-paper-deep);
  --bs-btn-active-border-color: var(--tl-hairline-strong);
  --bs-btn-active-color: var(--tl-ink);
  --bs-btn-disabled-color: var(--tl-dim);
  --bs-btn-disabled-border-color: var(--tl-hairline);
}

/* Cards: hairline, near-square, no heavy shadow. */
.card {
  --bs-card-bg: var(--tl-panel);
  --bs-card-border-color: var(--tl-hairline);
  --bs-card-border-radius: var(--tl-radius);
  --bs-card-inner-border-radius: calc(var(--tl-radius) - 1px);
  --bs-card-cap-bg: transparent;
}
.shadow    { box-shadow: var(--tl-lift) !important; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, .06) !important; }  /* not ink: it inverts on the night face */
.shadow-lg { box-shadow: var(--tl-lift-lg) !important; }

.nav { --bs-nav-link-hover-color: var(--tl-accent); }
.nav-pills {
  --bs-nav-pills-link-active-bg: var(--tl-accent);
  --bs-nav-pills-link-active-color: var(--tl-accent-ink);
}
.navbar {
  --bs-navbar-hover-color: var(--tl-accent);
  --bs-navbar-active-color: var(--tl-accent);
}

/*
  A MENU LABEL DOES NOT WRAP.

  Route Planner joined the bar as a top level item and at 1280 it broke over
  two lines, which made that one item taller than the rest and threw the whole
  row out of alignment: the other six sat on one baseline and it sat across
  two. Competitions would have done the same a little further down.

  A name in a menu is one word to the reader even when it is two words long,
  and a bar that is too full is a bar that should collapse, which this one
  already does at the large breakpoint. So the labels hold their line and the
  hamburger takes over when there is genuinely no room.
*/
.navbar-nav .nav-link {
  white-space: nowrap;
}
.dropdown-menu {
  --bs-dropdown-bg: var(--tl-panel);
  --bs-dropdown-border-color: var(--tl-hairline);
  --bs-dropdown-border-radius: var(--tl-radius);
  --bs-dropdown-link-hover-color: var(--tl-accent);
  --bs-dropdown-link-hover-bg: rgba(var(--tl-accent-rgb), 0.07);
  --bs-dropdown-link-active-color: var(--tl-accent);
  --bs-dropdown-link-active-bg: rgba(var(--tl-accent-rgb), 0.1);
  box-shadow: var(--tl-lift);
}

.form-control, .form-select { --bs-border-color: var(--tl-hairline); border-radius: var(--tl-radius); }
.form-control:focus, .form-select:focus {
  border-color: var(--tl-accent);
  box-shadow: 0 0 0 0.25rem rgba(var(--tl-accent-rgb), 0.15);
}
.form-check-input:checked { background-color: var(--tl-accent); border-color: var(--tl-accent); }
.form-check-input:focus   { border-color: var(--tl-accent); box-shadow: 0 0 0 0.25rem rgba(var(--tl-accent-rgb), 0.15); }

.pagination {
  --bs-pagination-color: var(--tl-muted);
  --bs-pagination-bg: var(--tl-panel);
  --bs-pagination-border-color: var(--tl-hairline);
  --bs-pagination-hover-color: var(--tl-accent);
  --bs-pagination-active-bg: var(--tl-accent);
  --bs-pagination-active-border-color: var(--tl-accent);
  --bs-pagination-active-color: var(--tl-accent-ink);
  --bs-pagination-border-radius: var(--tl-radius);
  font-family: var(--tl-font-mono);
}

.badge.bg-primary, .badge.text-bg-primary {
  background-color: var(--tl-accent) !important;
  color: var(--tl-accent-ink) !important;
}
/* Bootstrap's .bg-* and .text-bg-* read the -rgb triplet, not the colour, so
   mapping --bs-success alone left every status badge in the fork template's
   teal, amber and red. On the semantic states the foreground is paper: light
   on the dark day colours, dark on the lighter night ones. */
.badge.bg-success, .badge.bg-warning, .badge.bg-danger, .badge.bg-info,
.text-bg-success, .text-bg-warning, .text-bg-danger, .text-bg-info {
  color: var(--tl-paper) !important;
}
.progress-bar   { background-color: var(--tl-accent); }
.text-primary   { color: var(--tl-accent) !important; }
.bg-primary     { background-color: var(--tl-accent) !important; }
.border-primary { border-color: var(--tl-accent) !important; }
.table { --bs-table-border-color: var(--tl-hairline); }
.modal-content, .offcanvas { background-color: var(--tl-panel); border-color: var(--tl-hairline); }


/* ============ 6. TerraLoc utilities ============ */

/* Display type. Use on marketing headlines and page titles, not body copy. */
.tl-disp {
  font-family: var(--bs-body-font-family);
  font-weight: 800;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.9;
}
.tl-sub {
  font-family: var(--bs-body-font-family);
  font-weight: 750;
  font-stretch: 112%;
  letter-spacing: -0.01em;
}
.tl-mono {
  font-family: var(--tl-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Mono eyebrow with an accent rule in front. */
.tl-eyebrow {
  font-family: var(--tl-font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tl-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5625rem;
}
.tl-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--tl-accent);
}

/* Live marker. Amber only, and it pulses so it reads as "now". */
.tl-live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tl-live);
  vertical-align: middle;
  animation: tl-pulse 2.4s ease-out infinite;
}
.tl-badge-live {
  font-family: var(--tl-font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.3125rem 0.625rem;
  border-radius: var(--tl-radius-sm);
  background: var(--tl-live-bg);
  color: var(--tl-live);
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
}
.tl-badge-live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tl-live);
  animation: tl-pulse 2.4s ease-out infinite;
}
@keyframes tl-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(var(--tl-live-rgb), .5); }
  70%  { box-shadow: 0 0 0 9px rgba(var(--tl-live-rgb), 0); }
  100% { box-shadow: 0 0 0 0   rgba(var(--tl-live-rgb), 0); }
}
@media (prefers-reduced-motion: reduce) {
  .tl-live-dot, .tl-badge-live::before { animation: none; }
}

/* Ascent figures. Ochre, and only ever this. */
.tl-ascent { color: var(--tl-terra); }

/* Photo plate: a print laid on the map sheet. */
.tl-plate {
  background: var(--tl-white);
  padding: 9px 9px 0;
  box-shadow: var(--tl-lift);
}
.tl-plate-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 2px 10px;
  font-family: var(--tl-font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tl-muted);
}

/* Instrument band. */
.tl-instruments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--tl-hairline);
  border-top: 1px solid var(--tl-hairline);
  border-bottom: 1px solid var(--tl-hairline);
}
.tl-inst { background: var(--tl-paper); padding: 1rem 1.375rem 1.125rem; }
.tl-inst-k {
  font-family: var(--tl-font-mono);
  font-size: 0.5938rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tl-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.tl-inst-v {
  font-family: var(--tl-font-mono);
  font-size: 1.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 0.5rem;
}
.tl-inst-v small { font-size: 0.75rem; color: var(--tl-dim); font-weight: 400; letter-spacing: 0.06em; }

/* Panel: hairline card without the Bootstrap baggage. */
.tl-panel {
  background: var(--tl-panel);
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius);
}

/* Leg rail: sport-coloured blocks sized by time share. Same component at
   three sizes; set the width of each child inline from the leg data. */
.tl-legrail { display: flex; gap: 2px; height: 7px; }
.tl-legrail > * { border-radius: 1px; }
.tl-legrail-lg { height: 40px; }
.tl-legrail-lg > * {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.8125rem;
  border-bottom-width: 3px;
  border-bottom-style: solid;
}

/* ============ 8. Profile ============
   The deck (status band) and the sidebar identity head.

   Both came across from the fork emitting stp-* class names with no stylesheet
   on this side at all: twenty class names, none of them styled, so the profile
   rendered as unformatted divs. The markup is TerraLoc's now, and the parts
   that already exist as components (the eyebrow, the instrument band) are
   reused rather than restated. */

.tl-deck { margin: 0 0 1.75rem; color: var(--tl-ink); }

.tl-deck-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.tl-deck-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Display face, mixed case. The first direction shouted this in Archivo at
   125% width; the resolved one gets its character from Bricolage instead. */
.tl-deck-title {
  font-family: var(--tl-font-display);
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

/* Plan and joining year. Mono, because it is caption under the headline. */
.tl-deck-scope {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  font-family: var(--tl-font-mono);
  font-variant-numeric: tabular-nums;
}
.tl-deck-scope strong {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tl-ink);
}
.tl-deck-scope span {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--tl-dim);
}

.tl-deck-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; flex: 0 0 auto; }

/* 3px, not the 10px the port arrived with: square reads as technical kit. */
.tl-deck-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  white-space: nowrap;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--tl-hairline);
  border-radius: var(--tl-radius);
  background: var(--tl-panel);
  color: var(--tl-muted);
  font-family: var(--tl-font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.tl-deck-btn:hover { border-color: var(--tl-dim); color: var(--tl-ink); }
.tl-deck-btn--primary {
  background: var(--tl-accent);
  border-color: var(--tl-accent);
  color: var(--tl-accent-ink);
}
.tl-deck-btn--primary:hover { background: var(--tl-accent-hover); border-color: var(--tl-accent-hover); color: var(--tl-accent-ink); }

/* The instrument band sits flush under the head, so it loses the top margin
   .tl-instruments carries when it stands alone. */
.tl-deck .tl-instruments { margin-top: 1.25rem; }

/* ---- the page itself: full width, sidebar and content on one row ----

   The profile shipped inside a plain .container, which this theme caps at
   1300px, so it stayed boxed while every plugin page went container-fluid. The
   block is JScms core and is shared with other templates, so the width is taken
   off here instead of in the markup: :has(#profileTabContent) scopes all of it
   to the profile page and touches nothing else. */

.container:has(#profileTabContent) {
  max-width: none;
  padding-left: clamp(0.75rem, 2.5vw, 2.5rem);
  padding-right: clamp(0.75rem, 2.5vw, 2.5rem);
  padding-top: 0.5rem;
}

/* style.css gives every <section> 7.5rem of top padding; the deck is the page's
   own header and does not need to start a third of the way down. */
section:has(#profileTabContent) { padding-top: 1.25rem !important; }

/* The block's big "My profile" heading duplicates the deck title right above
   it. Scoped to that one element so a tab's own <h1> is untouched. */
.container:has(#profileTabContent) > .row > [class*="col-"]:last-child > .d-flex:first-child > h1 { display: none; }
.container:has(#profileTabContent) > .row > [class*="col-"]:last-child > .d-flex:first-child { margin-bottom: 1rem !important; }

@media (min-width: 992px) {
  /* One row, always: the content column must never wrap under the sidebar. */
  .container:has(#profileTabContent) > .row { flex-wrap: nowrap; }
  .container:has(#profileTabContent) > .row > [class*="col-"]:first-child {
    flex: 0 0 auto;
    width: clamp(240px, 20vw, 300px);
    max-width: 300px;
  }
  .container:has(#profileTabContent) > .row > [class*="col-"]:last-child {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
  }
}

/* ---- the sidebar is not a card ----
   It arrived wrapped in .card, so the navigation sat in a panel inside a panel.
   It belongs flush on the page, with a hairline under the identity head. */

.card:has(#profile-nav-links) {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}
.card:has(#profile-nav-links) > .card-header {
  background: transparent;
  border-bottom: 1px solid var(--tl-hairline);
  padding: 0.125rem 0.375rem 0.875rem !important;
}
.card:has(#profile-nav-links) > .card-body { padding: 0.5rem 0 0 !important; margin-top: 0 !important; }

/* Group headings: eyebrow voice, not accordion furniture. */
#profile-nav-accordion .accordion-item { background: transparent; border: 0; }
#profile-nav-accordion .accordion-button {
  padding: 0.75rem 0.625rem 0.25rem;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--tl-dim);
  font-family: var(--tl-font-mono);
  font-size: 0.5938rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
#profile-nav-accordion .accordion-button::after { width: 0.75rem; height: 0.75rem; background-size: 0.75rem; opacity: 0.45; }
#profile-nav-accordion .accordion-body { padding: 0 !important; }

/* Nav items: an icon tile and a label, with the accent carrying the current
   one. Square corners, like the rest of the kit. */
#profile-nav-links .nav-item { list-style: none; }
#profile-nav-links .nav-link {
  display: flex;
  align-items: center;
  gap: 0.6875rem;
  padding: 0.5rem 0.625rem;
  margin-bottom: 2px;
  border: 1px solid transparent;
  border-radius: var(--tl-radius);
  color: var(--tl-muted);
  font-weight: 600;
  font-size: 0.8125rem;
}
#profile-nav-links .nav-link:hover { background: var(--tl-paper-deep); color: var(--tl-ink); }
#profile-nav-links .nav-link.active {
  background: rgba(var(--tl-accent-rgb), 0.09);
  color: var(--tl-accent);
  border-color: rgba(var(--tl-accent-rgb), 0.22);
}
#profile-nav-links .nav-link > i {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: var(--tl-radius);
  display: inline-grid;
  place-items: center;
  background: var(--tl-paper-deep);
  color: var(--tl-dim);
  font-size: 0.875rem;
  /* the markup carries me-2 on the icon; the flex gap already spaces it */
  margin-right: 0 !important;
}
#profile-nav-links .nav-link:hover > i { color: var(--tl-ink); }
#profile-nav-links .nav-link.active > i { background: var(--tl-accent); color: var(--tl-accent-ink); }

/* ---- sidebar identity head ---- */

.tl-pf-head { display: flex; align-items: center; gap: 0.75rem; text-align: left; }

.tl-pf-ava { width: 46px; height: 46px; flex: 0 0 auto; margin: 0; }
.tl-pf-ava .avatar-img {
  width: 46px;
  height: 46px;
  border-radius: var(--tl-radius);
  object-fit: cover;
  border: 1px solid var(--tl-hairline);
}
.tl-pf-avaedit {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 22px;
  height: 22px;
  border-radius: var(--tl-radius-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(--tl-accent);
  color: var(--tl-accent-ink);
  font-size: 0.5625rem;
  border: 2px solid var(--tl-paper);
}
.tl-pf-avaload {
  position: absolute;
  inset: 0;
  border-radius: var(--tl-radius);
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  color: var(--tl-white);
}

.tl-pf-who { min-width: 0; display: flex; flex-direction: column; gap: 0.3125rem; }
.tl-pf-name {
  font-family: var(--tl-font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.1;
  color: var(--tl-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The plan pill is the one place a rounded shape is right: it is a token, not
   a panel. Amber is not used here, whatever the plan: that is the live colour. */
.tl-pf-plan {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: 100%;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--tl-hairline);
  border-radius: 999px;
  background: var(--tl-paper-deep);
  font-family: var(--tl-font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tl-muted);
}
.tl-pf-plan .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tl-accent); flex: 0 0 auto; }

@media (max-width: 575.98px) {
  .tl-deck-title { font-size: clamp(1.375rem, 8vw, 1.75rem); }
  .tl-deck-actions { width: 100%; }
}

/* ------------------------------------------------------------------
   THE ACCORDION'S OPEN CHEVRON, WHICH IS A BRAND COLOUR IN A PICTURE.

   A data URI is an opaque string: nothing substitutes a var() into it, and
   the SVG it decodes to is its own document with no access to this one's
   custom properties. So the colour has to be written into the picture, and
   the only place a brand colour may be written is here.

   style.css had the fork's green baked into the dark one and, in the light
   one, fill='var%28--bs-primary%29', which cannot work for exactly that
   reason: it decoded to an SVG asking for a variable that does not exist
   there, so the open chevron was rendered with an invalid fill rather than
   in the brand colour anybody intended.

   Two literals, one per face, because that is what a picture can carry.
   ------------------------------------------------------------------ */

:root,
[data-bs-theme=light] {
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2346603C'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

[data-bs-theme=dark] {
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%239FB08A'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* ------------------------------------------------------------------
   THE "ALSO IN ENGLISH" OFFER ON A PHONE.

   The core's lang-suggest.js prints the sentence, the button and the close
   cross in one flex row. On a phone the row has about 290px for all three,
   so the sentence was squeezed into two lines beside the button and the
   button itself was cut short: "Switch to En". Below 576px it is two rows,
   the sentence beside the cross and the button the width of the card.
   d-flex is Bootstrap's and carries !important.
   ------------------------------------------------------------------ */

@media (max-width: 575.98px) {
  .jscms-lang-suggest > div {
    display: grid !important;
    grid-template-columns: 1fr auto;
    row-gap: .625rem;
  }
  .jscms-lang-suggest .btn { grid-row: 2; grid-column: 1 / -1; }
  .jscms-lang-suggest .btn-close { grid-row: 1; grid-column: 2; }
}

/* While the menu is open the offer steps aside: it sat over the foot of the
   panel, on top of the language switch that does the same job. */
body:has(#navbarCollapse.show) .jscms-lang-suggest { display: none; }

/* ------------------------------------------------------------------
   The beta badge (11.11.2026 to the end of the beta, January 2027)

   A small mono "Beta" after the logo in the app bar, on every page. Here
   and not in the header block because the block is baked into every page
   and this file is loaded by the header with its own timestamp: no page is
   re-baked to add it, and ending the beta is deleting this section. The
   word is the same in German, Italian and Spanish; French writes "Bêta".
   Quiet on purpose: muted on a hairline, never the CTA orange and never
   amber, which means live.
   ------------------------------------------------------------------ */

.tl-appbar .tl-brand::after {
  content: "Beta";
  margin-left: 0.55rem;
  padding: 0.2rem 0.4rem 0.18rem;
  border: 1px solid var(--tl-hairline-strong);
  border-radius: 5px;
  font-family: var(--tl-font-mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--tl-muted);
  white-space: nowrap;
}
:lang(fr) .tl-appbar .tl-brand::after { content: "Bêta"; }

/* Between the burger (below 1200px) and a wide screen, the bar holds the
   logo, the badge, seven menu entries and the actions, and in French and
   Spanish it ran past the window: the Forum entry made a tight bar too
   tight, and the badge added 50px. The menu closes up here instead of the
   bar overflowing; from 1440px it has its full tracking again. html body:
   app-chrome.css is linked after this file on every page. */
@media (min-width: 1200px) and (max-width: 1439.98px) {
  html body .tl-appbar .navbar-nav { gap: 0; }
  html body .tl-appbar .nav-link { padding: .5rem .45rem; font-size: .65rem; letter-spacing: .07em; }
  html body .tl-appbar .nav-link.active::after { left: .45rem; right: .45rem; }
  html body .tl-appbar .nav-link-parent { padding-right: .15rem; }
  html body .tl-appbar .nav-caret-btn { padding: .5rem .3rem .5rem 0; }
  html body .tl-appbar .tl-brand::after { margin-left: .4rem; }
}
@media (min-width: 1200px) and (max-width: 1299.98px) {
  html body .tl-appbar .nav-link { padding: .5rem .35rem; font-size: .62rem; letter-spacing: .03em; }
  html body .tl-appbar .nav-link.active::after { left: .35rem; right: .35rem; }
  html body .tl-appbar .tl-brand-logo { height: 26px; }
}
