/* ==========================================================================
   00-core.css
   Media Site Gen 2: Core platform styles
   Purpose: design tokens,foundations, shared UI systems, layout primitives
   Rules:
   - Platform-owned only
   - No section selectors (no 30-Section BEM blocks)
   - No customer branding values (variables only)

        0)    Design tokens (platform defaults)
        0.5)  Colour schemes
        1)    Reset and base elements
        1.x)  Typography (core)
        2)    Layout primitives (core)
        #)    Component: Breadcrumb
        #)    Content Prose
        #)    Card
        #)    Table
        #)    Menu (Navigation + Action)
        #)    Forms
        #)    Overlays and State Helpers
        #)    Floating Action Button (FAB)
        #)    #
        #)    #
        #)    #


   ========================================================================== */

/* ==========================================================================
   0) Design tokens (platform defaults)
   ========================================================================== */

:root {
  /* Typography */
  /* Customer typography */
  --font-body:
    system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";

  --font-heading: var(--font-body);
  --font-sans:
    system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-loose: 1.7;

  --weight-regular: 500;
  --weight-medium: 600;
  --weight-bold: 700;

  /* Heading sizes */
  --h1: 2.25rem;
  --h2: 1.5rem;
  --h3: 1.25rem;
  --h4: 1.125rem;
  --h5: 1rem;
  --h6: 0.875rem;

  /* Body text */
  --p: 1rem;
  --p-sm: 0.875rem;

  /* Readable line length */
  --measure: 70ch;

  /* Spacing */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radii */
  --radius-none: 0;
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-pill: 999px;
  --radius-button: var(--radius-md);
  --radius-search: var(--radius-pill);
  --radius-hero: var(--radius-lg);
  --radius-card: var(--radius-lg);
  --radius-badge: var(--radius-sm);
  --radius-image: var(--radius-md);


  /* Borders */
  --border-1: 1px solid var(--border);
  --border-2: 2px solid var(--border);

  /* Stronger border for hover and emphasis */
  --border-strong: color-mix(in srgb, var(--text) 25%, var(--border));

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);

  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 260ms;

  /* Layout */
  --container-max: 1440px;
  --container-pad: 1rem;

  /* Core palette (platform defaults only) */
  --surface-1: #f7f7f8;
  --surface-2: #f1f2f4;
  --surface: #ffffff;

  /* Tinted surfaces (selection and chips) */
  --surface-tint: #e1eef3;
  --surface-tint-hover: #eef6f9;
  --surface-tint-strong: #d1eeff;

  --text: #1a1d21;
  --text-muted: #5b636d;
  --text-strong: var(--text);

  --border: #d7dbe0;

  --link: #1471a6;
  --link-hover: #0d567f;

  /* Focus ring */
  --focus: rgba(22, 93, 255, 0.35);

  --primary: var(--link);
  --primary-hover: var(--link-hover);
  --on-primary: var(--surface);

  --danger: #c93636;
  --warning: #b25b00;
  --success: #1b7f3a;
  --info: #0a66c2;

  /* Track colours (optional) */
  --track-professional-development: #7b3fa1;
  --track-research: #1b6fdc;
  --track-education: #1f9d55;

  /* Avatar fallback */
  --avatar-fallback-bg: #667;

  /* Overlays and scrims */
  --overlay-backdrop: rgba(0, 0, 0, 0.45);

  --scrim-0: rgba(0, 0, 0, 0);
  --scrim-10: rgba(0, 0, 0, 0.1);
  --scrim-20: rgba(0, 0, 0, 0.2);
  --scrim-35: rgba(0, 0, 0, 0.35);
  --scrim-40: rgba(0, 0, 0, 0.4);
  --scrim-55: rgba(0, 0, 0, 0.55);
  --scrim-60: rgba(0, 0, 0, 0.6);
  --scrim-65: rgba(0, 0, 0, 0.65);

  /* Media lock */
  --media-lock-scrim: rgba(12, 18, 24, 0.82);

  /* Form control sizing */
  --control-h: 2.5rem;
  --control-pad-x: 0.875rem;
  --control-pad-y: 0.625rem;

  /* Aside and drawer sizing (can be overridden by layout attrs) */
  --sidebar-w: 320px;
  --left-w: 260px;
  --right-w: 320px;
  --drawer-w: 360px;

  /* Menu */
  --menu-gap: var(--space-2);

  /* Hero (defaults for core/master theme) */
  --hero-ink: rgb(40, 69, 87);
  --hero-ink-soft: rgb(91, 120, 139);
  --hero-accent: rgb(255, 219, 74);

  --hero-title-color: rgb(255, 255, 255, 1);
  --hero-summary-color: rgb(255, 255, 255, 1);
  --hero-title-shadow: 0 4px 24px var(--hero-ink);
  --hero-text-shadow: 0 2px 8px var(--hero-ink);

  --hero-slide-bg: var(--hero-ink);

  /* Hero overlay gradients */
  --hero-overlay-bottom-from: rgb(40 69 87 / 0);
  --hero-overlay-bottom-to: rgb(40 69 87 / 1);

  --hero-overlay-side-from: rgb(91 120 139 / 0);
  --hero-overlay-side-mid: rgb(91 120 139 / 0.5);
  --hero-overlay-side-to: rgb(40 69 87 / 1);

  /* Hero button colours */
  --hero-link-primary-bg: var(--surface);
  --hero-link-primary-color: var(--link);
  --hero-link-primary-hover-bg: var(--surface-1);
  --hero-link-primary-hover-color: var(--link-hover);

  /* Theme swatches (default master palette) */
  --theme-1: #407f8e;
  --theme-2: #1b6fdc;
  --theme-3: #0f8a7a;
  --theme-4: #b23b6a;
  --theme-5: #6a4a2b;
  --theme-6: #2f5e9e;
  --theme-color: var(--surface);
}

/* Responsive type scaling */
@media (max-width: 40rem) {
  :root {
    --h1: 1.875rem;
    --h2: 1.5rem;
    --h3: 1.25rem;
  }
}

/* ==========================================================================
   0.5) color themes (semantic surface + text roles)
   Notes:
   - Default values live in :root and match the current platform look.
   ========================================================================== */

/* Status themes (light surfaces tinted by status color) */
.theme--success {
  --surface-1: color-mix(in srgb, var(--success) 10%, white);
  --surface-2: color-mix(in srgb, var(--success) 16%, white);
  --surface: #ffffff;

  --text: var(--text);
  --text-muted: var(--text-muted);
  --text-strong: var(--text);

  --border: color-mix(in srgb, var(--success) 18%, var(--border));

  --link: var(--success);
  --link-hover: color-mix(in srgb, var(--success) 85%, black);

  --focus: color-mix(in srgb, var(--success) 35%, transparent);
}

.theme--warning {
  --surface-1: color-mix(in srgb, var(--warning) 10%, white);
  --surface-2: color-mix(in srgb, var(--warning) 16%, white);
  --surface: #ffffff;

  --text: var(--text);
  --text-muted: var(--text-muted);
  --text-strong: var(--text);

  --border: color-mix(in srgb, var(--warning) 18%, var(--border));

  --link: var(--warning);
  --link-hover: color-mix(in srgb, var(--warning) 85%, black);

  --focus: color-mix(in srgb, var(--warning) 35%, transparent);
}

.theme--danger {
  --surface-1: color-mix(in srgb, var(--danger) 10%, white);
  --surface-2: color-mix(in srgb, var(--danger) 16%, white);
  --surface: #ffffff;

  --text: var(--text);
  --text-muted: var(--text-muted);
  --text-strong: var(--text);

  --border: color-mix(in srgb, var(--danger) 18%, var(--border));

  --link: var(--danger);
  --link-hover: color-mix(in srgb, var(--danger) 85%, black);

  --focus: color-mix(in srgb, var(--danger) 35%, transparent);
}

.theme--info {
  --surface-1: color-mix(in srgb, var(--info) 10%, white);
  --surface-2: color-mix(in srgb, var(--info) 16%, white);
  --surface: #ffffff;

  --text: var(--text);
  --text-muted: var(--text-muted);
  --text-strong: var(--text);

  --border: color-mix(in srgb, var(--info) 18%, var(--border));

  --link: var(--info);
  --link-hover: color-mix(in srgb, var(--info) 85%, black);

  --focus: color-mix(in srgb, var(--info) 35%, transparent);
}

/* Optional helper: apply theme surface + text to a container */
.ui-surface {
  background: var(--surface-1);
  color: var(--text);
}

/* ==========================================================================
   1) Reset and base elements
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--surface-1);
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

button,
a {
  transition: all var(--dur-3) var(--ease-standard);
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus) !important;
  border-radius: var(--radius-xs);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behaviour: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

ul,
ol {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

.list--standard {
  list-style: disc;
  padding-left: 1.25rem;
  /* restores indentation */
  margin: 1rem 0;
}

.list--standard > li {
  margin: 0.25rem 0;
}

ol {
  list-style-position: inside;
}

figure {
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
}

/* ==========================================================================
   1.x Typography (core)
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  font-family: var(--font-heading);
}

h1 {
  font-size: var(--h1);
  font-weight: var(--weight-medium);
}

h2 {
  font-size: var(--h2);
}

h3 {
  font-size: var(--h3);
}

h4 {
  font-size: var(--h4);
}

h5 {
  font-size: var(--h5);
}

h6 {
  font-size: var(--h6);
}

p {
  margin: 0;
  font-size: var(--p);
  line-height: var(--leading-normal);
}

small {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

strong {
  font-weight: var(--weight-bold);
}

em {
  font-style: italic;
}

ul,
ol {
  margin: 0;
  padding-left: 0;
}

li {
  line-height: var(--leading-normal);
}

hr {
  border: none;
  border-top: var(--border-1);
  margin: var(--space-6) 0;
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}

code {
  font-size: 0.92em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15em 0.35em;
  border-radius: var(--radius-sm);
}

pre {
  margin: 0;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: var(--border-1) solid var(--border);
  background: var(--surface);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

blockquote {
  margin: 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

blockquote p {
  color: var(--text-muted);
}

/* ==========================================================================
   2) Layout primitives (core)
   ========================================================================== */

/* Containers */
.container {
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

main .container {
  margin-block: var(--space-8);
}

.container--content {
  max-width: 60rem;
  /* typical single-column reading width */
}

.container--wide {
  max-width: var(--container-max);
  /* typical site max width */
}

.container--content > * {
  margin-bottom: var(--space-8);
}

.container--content > *:first-child {
  margin-top: var(--space-6);
}

/* Layout: Edge-aligned side navigation */

.layout__sidebar {
  overflow: auto;
  /* sidebar scrolls */
  min-height: 0;
  /* important for nested scrolling */
  border-right: 1px solid var(--base-03);
}

.layout--sidebar-edge {
  display: grid;
  grid-template-columns: 1fr;
  /* mobile */
  height: 100vh;
  /* full viewport height */
  overflow: hidden;
}

@media (min-width: 40rem) {
  main .container {
    margin-block: var(--space-10);
  }
}

@media (min-width: 48rem) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

@media (min-width: 64rem) {
  main .container {
    margin-block: var(--space-8);
  }

  .layout--sidebar-edge {
    grid-template-columns: var(--sidebar-width, 18rem) 1fr;
    align-items: start;
  }
}

.layout__sidebar--edge {
  background-color: var(--surface-2);
  /*border-right: 1px solid var(--border);*/
  padding: 1rem;
}

@media (min-width: 64rem) {
  .layout__sidebar--edge {
    position: sticky;
    top: var(--header-height, 0);
    height: 100%;
    overflow-y: auto;
    border-right: var(--border-1);
  }
}

.layout--sidebar-edge .layout__main {
  overflow: auto;
  /* main scrolls */
  min-height: 0;
  /* important for nested scrolling */
  min-width: 0;
  /* prevents content from forcing overflow */
  overflow-y: auto;
  height: 100vh;
}

/* Grids: 2-column, 3-column, 4-column */
:root {
  /* Fixed column counts */
  --grid-cols-1: 1;
  --grid-cols-2: 2;
  --grid-cols-3: 3;
  --grid-cols-4: 4;
  --grid-cols-5: 5;
  --grid-cols-6: 6;

  /* Auto grid minimum column width */
  --grid-auto-min: 16rem;
}

.grid {
  display: grid;
  gap: 1rem;
  /* single explicit gap */
  min-width: 0;
}

.grid--auto {
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, var(--grid-auto-min)), 1fr)
  );
}

.grid--cols {
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
}

.grid--1,
.grid--2,
.grid--3,
.grid--4,
.grid--5,
.grid--6 {
  --grid-cols: var(--grid-cols-1);
}

@media (min-width: 640px) {
  .grid--2 {
    --grid-cols: var(--grid-cols-2);
  }

  .grid--3 {
    --grid-cols: var(--grid-cols-3);
  }

  .grid--4 {
    --grid-cols: var(--grid-cols-2);
  }

  .grid--5 {
    --grid-cols: var(--grid-cols-2);
  }

  .grid--6 {
    --grid-cols: var(--grid-cols-2);
  }
}

@media (min-width: 1024px) {
  .grid--4 {
    --grid-cols: var(--grid-cols-4);
  }

  .grid--5 {
    --grid-cols: var(--grid-cols-5);
  }

  .grid--6 {
    --grid-cols: var(--grid-cols-6);
  }
}

@media (min-width: 1024px) {
  .layout--sidebar-edge .grid--2 {
    --grid-cols: var(--grid-cols-2);
  }

  .layout--sidebar-edge .grid--3 {
    --grid-cols: var(--grid-cols-2);
  }

  .layout--sidebar-edge .grid--4 {
    --grid-cols: var(--grid-cols-2);
  }

  .layout--sidebar-edge .grid--5 {
    --grid-cols: var(--grid-cols-2);
  }

  .layout--sidebar-edge .grid--6 {
    --grid-cols: var(--grid-cols-2);
  }
}

@media (min-width: 1280px) {
  .layout--sidebar-edge .grid--3 {
    --grid-cols: var(--grid-cols-3);
  }

  .layout--sidebar-edge .grid--4 {
    --grid-cols: var(--grid-cols-4);
  }

  .layout--sidebar-edge .grid--5 {
    --grid-cols: var(--grid-cols-5);
  }

  .layout--sidebar-edge .grid--6 {
    --grid-cols: var(--grid-cols-6);
  }
}

.split-panel {
  display: grid;
  gap: var(--space-6);
}

.split-panel__main,
.split-panel__aside {
  min-width: 0;
  /* important for long content */
}

@media (min-width: 1024px) {
  .split-panel {
    align-items: start;

    /* semantic widths */
    --main-col: minmax(0, 2fr);
    --aside-col: minmax(0, 1fr);

    /* default layout */
    grid-template-areas: "main aside";
    grid-template-columns: var(--main-col) var(--aside-col);
  }

  .split-panel__main {
    grid-area: main;
  }

  .split-panel__aside {
    grid-area: aside;
    position: sticky;
    top: var(--space-6);
  }

  /* If you need spacing between columns, prefer gap/column-gap, not nth-child padding */
  .split-panel {
    column-gap: var(--space-6);
  }

  /* VISUAL SWAP (aside on the left) */
  .split-panel--aside-first {
    grid-template-areas: "aside main";
    grid-template-columns: var(--aside-col) var(--main-col);
  }

  /* Width variants (change the variables, not the template) */
  .split-panel--main-wide {
    --main-col: minmax(0, 4fr);
  }

  .split-panel--main-narrow {
    --main-col: minmax(0, 1.5fr);
  }

  .split-panel--aside-wide {
    --aside-col: minmax(0, 2fr);
  }

  .split-panel--aside-narrow {
    --aside-col: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------------
   Component: Breadcrumb
   ------------------------------------------------------------------------ */

.breadcrumb {
  font-size: var(--text-sm);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
}

/* Add forward slash between items */
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--base-04);
  font-weight: var(--weight-regular);
}

/* Links */
.breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb__link:hover {
  text-decoration: underline;
}

/* Current page */
.breadcrumb__item[aria-current="page"] {
  color: var(--text-02);
  font-weight: 500;
}

/* Current page breadcrumb */
.breadcrumb__item[aria-current="page"] {
  font-weight: var(--weight-bold);
  color: var(--text-strong);
}

/* ==========================================================================
   ##) Content Prose
   ========================================================================== */

.content--prose > * + * {
  margin-top: var(--space-4);
}

.content--prose h1 + *,
.content--prose h2 + *,
.content--prose h3 + * {
  margin-top: var(--space-4);
}

.content--prose h1,
.content--prose h2,
.content--prose h3,
.content--prose h4,
.content--prose h5,
.content--prose h6 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.content--prose h1:first-child,
.content--prose h2:first-child,
.content--prose h3:first-child,
.content--prose h4:first-child,
.content--prose h5:first-child,
.content--prose h6:first-child {
  margin-top: 0;
}

.content--prose li + li {
  margin-top: var(--space-2);
}

.content--prose blockquote {
  margin-top: var(--space-5);
}

.content--prose p {
  line-height: var(--leading-loose);
  font-size: var(--text-lg);
}

.content--prose p:not(:last-of-type) {
  margin-bottom: var(--space-6);
}

.content--prose p:not(:last-of-type):has(+ ul) {
  margin-bottom: var(--space-3);
}

.content--prose ul:has(+ p) {
  margin-bottom: var(--space-3);
}

.content--prose section:not(:first-of-type) {
  padding-top: var(--space-8);
}

.content--prose section:not(:last-of-type) {
  padding-bottom: var(--space-8);
}

.content__figure img {
  margin-bottom: var(--space-2);
  border-radius: var(--radius-xs);
}

.content__figure figcaption {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.content--prose .grid {
  gap: var(--space-12);
}

.content--prose .content--prose__emphasis {
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  margin-top: var(--space-4);
}

/* ==========================================================================
   ##) Card
   ========================================================================== */

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

/* Linked card behaviour */
.card--link {
  cursor: pointer;
  transition: all var(--dur-3) var(--ease-standard);
}

.card--link:hover {
  border-color: #cbd5e1;
}

.card--link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Disabled card */
.card--disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Card header (image) */
.card__header {
  position: relative;
  overflow: hidden;
}

.card__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: all var(--dur-3) var(--ease-standard);
}

/*Card body */
.card__body {
  padding: 1rem;
}

.card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Card footer */
.card__footer {
  margin-bottom: auto;
  padding: 0 1rem 1rem;
  margin-top: -0.625rem;
}

.card__meta {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #475569;
}

.card--link:hover .card__title {
  text-decoration: none;
  color: var(--text-strong);
}

/* Reduced motion respect */
@media (prefers-reduced-motion: no-preference) {
  .card {
    transition:
      border-color 0.15s ease,
      box-shadow 0.15s ease;
  }

  .card--link:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
  }

  .card--link:hover .card__image {
    /*transform: scale(1.005);*/
  }
}

/* ------------------------------------------------------------------------
   Component: Table
   ------------------------------------------------------------------------ */

.table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-block: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Header */
.table thead th {
  text-align: left;
  font-weight: 600;
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--base-03, #e5e7eb);
  vertical-align: bottom;
}

/* Body cells */
.table tbody th,
.table tbody td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--base-03, #e5e7eb);
  vertical-align: top;
  text-align: start;
}

/* Row headers (first column) */
.table tbody th[scope="row"] {
  font-weight: 500;
  white-space: nowrap;
}

/* Remove last divider */
.table tbody tr:last-child th,
.table tbody tr:last-child td {
  border-bottom: none;
}

/* Optional: subtle row rhythm (very light, structural only) */
.table tbody tr {
  scroll-margin-top: 4rem;
}

/* Improve readability on narrow viewports */
@media (max-width: 640px) {
  .table thead {
    display: none;
  }

  .table tbody tr {
    display: block;
    padding-block: 0.75rem;
    border-bottom: 1px solid var(--base-03, #e5e7eb);
  }

  .table tbody th,
  .table tbody td {
    display: block;
    padding: 0.25rem 0;
    border: none;
  }

  .table tbody th[scope="row"] {
    font-weight: 600;
  }
}

/* ------------------------------------------------------------------------
   Component: Menu
   ------------------------------------------------------------------------ */
.menu {
  position: absolute;
  background-color: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  width: max-content;
  max-width: 240px;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  z-index: 1;
}

.menu__list a {
  border-radius: 0 !important;
}

.menu__header {
  border-bottom: var(--border-1);
  padding: var(--space-3) var(--space-4);
}

.menu__header h2 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 600;
  line-height: var(--leading-tight);
}

.menu__body--section {
  display: grid;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
  background-color: var(--surface);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: var(--border-1);
}

.menu__body--section > *:not(:last-child) {
  margin-bottom: var(--space-2);
}

.menu__body p {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.menu__footer {
  border-top: var(--border-1);
  padding: var(--space-3) var(--space-4);
}

/* ==========================================================================
   ##) Forms
   ========================================================================== */
/* ==========================================================================
   5) Overlays and state helpers (core)
   ========================================================================== */

/* Prevent background scroll when blocking overlays are open */
body.is-scroll-locked {
  position: fixed;
  top: calc(var(--scroll-lock-top, 0px) * -1);
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  padding-right: var(--scrollbar-width);
  touch-action: none;
}

/* Fallback when inert is not supported (JS toggles body.is-overlay-open) */
body.is-overlay-open [data-app-root] {
}

/* Allow overlays and toasts to remain interactive */
body.is-overlay-open .modal,
body.is-overlay-open .drawer,
body.is-overlay-open .toast-region {
  pointer-events: auto;
}

:root {
  --scrollbar-width: 0px;
}

/* ==========================================================================
   5.x Drawer (off-canvas sidebar) (core)
   ========================================================================== */

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1050;
}

.drawer[aria-hidden="false"] {
  display: block;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0, 0, 0, 0.45);
  border: none;
}

.drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(var(--drawer-w, 360px), 92vw);
  background: var(--surface-2);
  border: var(--border-1) solid var(--border);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  transform: translateX(0);
  transition: transform var(--dur-3) var(--ease-standard);
}

.drawer[data-side="right"] .drawer__panel {
  right: 0;
}

.drawer[data-side="left"] .drawer__panel {
  left: 0;
}

.drawer[aria-hidden="true"][data-side="right"] .drawer__panel {
  transform: translateX(102%);
}

.drawer[aria-hidden="true"][data-side="left"] .drawer__panel {
  transform: translateX(-102%);
}

.drawer__header,
.drawer__body,
.drawer__footer {
  padding: var(--space-4);
}

.drawer__header {
  border-bottom: var(--border-1) solid var(--border);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
  border-bottom: var(--border-1);
  background-color: var(--surface);
}

.drawer__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
}

.drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.drawer__close:hover {
  background: var(--surface-2);
}

.drawer__body {
  overflow: auto;
}

.drawer__body--section {
  box-shadow: var(--shadow-sm);
  background-color: var(--surface);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: var(--border-1);
}

.drawer__body--section:not(:last-child) {
  margin-bottom: var(--space-4);
}

.drawer__body--section > *:not(:last-child) {
  margin-bottom: var(--space-2);
}

.drawer__body--section p {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.drawer__footer {
  border-top: var(--border-1) solid var(--border);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Optional helper: hide drawer trigger on desktop when sidebar exists */
@media (min-width: 64rem) {
  .drawer-trigger--mobile-only {
    display: none;
  }
}

/* ==========================================================================
   ##) Floating Action Button (FAB)
   ========================================================================== */

.system-fab {
  height: 48px;
  width: 48px;
  border: none;
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 10;
}

.system-fab:hover {
  background-color: var(--primary-hover);
  color: var(--on-primary);
}

/* ==========================================================================
   ##) Toast
   ========================================================================== */

.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-4);
  z-index: 1100;
  background-color: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  box-shadow: var(--shadow-sm);
  align-items: center;
}

.toast__icon {
  display: inline-block !important;
}

.toast--danger {
  border-left: 8px solid var(--danger);
}

.toast--danger .toast__icon i::before {
  content: "\f071";
  color: var(--danger);
}

.toast--warning {
  border-left: 8px solid var(--warning);
}

.toast--warning .toast__icon i::before {
  content: "\f06a";
  color: var(--warning);
}

.toast--success {
  border-left: 8px solid var(--success);
}

.toast--success .toast__icon i::before {
  content: "\f058";
  color: var(--success);
}

.toast--info {
  border-left: 8px solid var(--info);
}

.toast--info .toast__icon i::before {
  content: "\f05a";
  color: var(--info);
}

.toast__title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: var(--leading-tight);
}

.toast__message {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  align-items: center;
}

.toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.toast__close:hover {
  background: var(--surface-2);
}

/* ======================================================================
   Modal (core)
   Uses the unified overlay engine: [data-overlay-kind="modal"]
   ====================================================================== */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1060;
  /* above drawer (1050) */
}

.modal[aria-hidden="false"] {
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.45);
  border: none;
}

.modal__panel {
  position: relative;
  width: min(40rem, 92vw);
  max-height: min(80vh, 44rem);
  background: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;

  display: grid;
  grid-template-rows: auto 1fr auto;
}

.modal__header,
.modal__body,
.modal__footer {
  padding: var(--space-4);
}

.modal__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: var(--border-1);
}

.modal__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
}

.modal__desc {
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
}

.modal__close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal__body {
  overflow: auto;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  border-top: var(--border-1);
  background: var(--surface);
}

.modal__footer[hidden] {
  display: none;
}

/* ------Specific modal: Save to list ------ */
.modal__list {
  display: grid;
  gap: var(--space-2);
}

.modal__list-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3);
  border: var(--border-1);
  border-radius: var(--radius-md);
  background: transparent;
  transition: all var(--dur-3) var(--ease-standard);
}

.modal__list-item:hover {
  background-color: var(--surface-1);
}

.modal__choice {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
}

.modal__choice-text {
  display: grid;
  gap: 0.25rem;
}

.modal__choice-title {
  font-weight: 600;
  line-height: 1.2;
}

.modal__choice-meta {
  color: var(--text-muted, #58606a);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.2;
}

.modal__choice input {
  margin: 0;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
}

/* Checked state */
.modal__list-item:has(input[type="checkbox"]:checked) {
  background: #edf6fb;
  border-color: var(--link);
}

/* Optional: slightly strengthen title when selected */
/* .modal__list-item:has(input[type="checkbox"]:checked) .modal__choice-title {
  font-weight: 600;
} */

/* Optional: adjust meta colour when selected */
/* .modal__list-item:has(input[type="checkbox"]:checked) .modal__choice-meta {
  color: var(--text, #1f2937);
} */

/* Hover + checked combined */
/* .modal__list-item:hover:has(input[type="checkbox"]:checked),
.modal__list-item:focus-within:has(input[type="checkbox"]:checked) {
  background: var(--surface-selected-hover, rgba(43, 124, 252, 0.1));
} */

.modal__item-actions {
  display: inline-flex;
  gap: var(--space-3);
  padding-right: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 0s linear 160ms;
}

.modal__new-list {
  margin-top: var(--space-4);
  color: var(--link);
  padding: var(--space-4) var(--space-4);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  transition: all var(--dur-3) var(--ease-standard);
  width: 100%;
  font-weight: 500;
}

.modal__new-list:hover {
  color: var(--link-hover);
  background-color: var(--surface-1);
}

.modal__list-item:hover .modal__item-actions,
.modal__list-item:focus-within .modal__item-actions {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 0s;
}

/* Link-styled buttons */
.modal__action-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--link, #1a73e8);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.modal__action-link:hover {
  color: var(--link-hover, #135db8);
}

.modal__action-link--danger {
  color: var(--danger);
}

.modal__action-link--danger:hover {
  color: #af2828;
}

.modal__action-link:focus-visible {
  outline: 2px solid var(--focus, #2b7cff);
  outline-offset: 2px;
  border-radius: 4px;
}

/* View panels */
.modal__view[hidden] {
  display: none;
}

.modal__form {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) 0;
}

.modal__label {
  font-size: var(--text-sm, 0.875rem);
  color: var(--text-muted, #58606a);
}

.modal__input {
  width: 100%;
  padding: var(--space-3);
  border: var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.modal__view-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.modal__warning {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: rgb(201 54 54 / 10%);
  border-left: 6px solid var(--danger);
  font-size: var(--text-sm);
  font-weight: 500;
}

.modal__warning i {
  margin-right: var(--space-2);
  color: var(--danger);
}

/* Optional: a tiny entrance motion */
@media (prefers-reduced-motion: no-preference) {
  .modal[aria-hidden="false"] .modal__panel {
    animation: uiModalIn var(--dur-3) var(--ease-standard);
  }

  @keyframes uiModalIn {
    from {
      transform: translateY(8px);
      opacity: 0;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* ------------------------------------------------------------------------
   Component: Button
   Classes: .btn, .btn--primary, .btn--secondary, .btn--ghost,
            .btn--lg, .btn--sm, .btn--icon, .btn--icon-only
   Notes:
   - Uses CSS variables where available, with sensible fallbacks
   - No colour hard-coding required, but provides fallbacks if tokens are absent
   ------------------------------------------------------------------------ */

/* Design tokens (fallbacks) */
:root {
  /* Sizing */
  --btn-radius: var(--radius-sm);

  --btn-font-size: var(--text-sm, 0.9375rem);
  --btn-font-size-sm: var(--text-xs, 0.875rem);
  --btn-font-size-lg: var(--text-md, 1rem);

  --btn-pad-y: var(--space-2, 0.5rem);
  --btn-pad-x: var(--space-4, 1rem);

  --btn-pad-y-sm: var(--space-1, 0.375rem);
  --btn-pad-x-sm: var(--space-3, 0.75rem);

  --btn-pad-y-lg: var(--space-3, 0.75rem);
  --btn-pad-x-lg: var(--space-5, 1.25rem);

  --btn-gap: var(--space-2, 0.5rem);

  /* Borders and focus */
  --btn-border-width: 1px;
  --btn-focus-width: 3px;

  /* Motion */
  --btn-transition: var(--dur-3) var(--ease-standard);

  /* Default colour fallbacks (override via your tokens/themes) */
  --btn-primary-bg: var(--link);
  --btn-primary-fg: var(--surface);
  --btn-primary-border: var(--link);

  --btn-secondary-bg: var(--surface, #ffffff);
  --btn-secondary-fg: var(--text);
  --btn-secondary-border: var(--link);

  --btn-ghost-bg: transparent;
  --btn-ghost-fg: var(--link);
  --btn-ghost-border: transparent;

  --btn-disabled-opacity: 0.55;
}

/* Base */
.btn {
  appearance: none;
  border: var(--btn-border-width) solid transparent;
  border-radius: var(--btn-radius);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);

  padding: var(--btn-pad-y) var(--btn-pad-x);

  font: inherit;
  font-size: var(--btn-font-size);
  font-weight: var(--font-weight-semibold, 600);
  line-height: 1.1;

  text-decoration: none;
  user-select: none;
  cursor: pointer;

  background: transparent;
  color: inherit;

  transition:
    background-color var(--btn-transition),
    border-color var(--btn-transition),
    color var(--btn-transition),
    transform var(--btn-transition),
    box-shadow var(--btn-transition);
}

/* Prevent icon <i> from affecting layout unexpectedly */
.btn i {
  line-height: 1;
  display: inline-block;
}

/* Hover and active feedback */
.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Focus */
.btn:focus {
  outline: none;
  /* handled by :focus-visible */
}

.btn:focus-visible {
  outline: var(--btn-focus-width) solid
    var(--focus-ring, rgba(31, 91, 214, 0.35));
  outline-offset: 2px;
}

/* Disabled */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: var(--btn-disabled-opacity);
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* ------------------------------------------------------------------------
   Emphasis variants
   ------------------------------------------------------------------------ */

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-border);
}

.btn--primary:hover {
  /* subtle, token-friendly hover */
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
  background-color: var(--link-hover);
}

.btn--secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-fg);
  border-color: var(--btn-secondary-border);
}

.btn--secondary:hover {
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

.btn--ghost {
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-fg);
  border-color: var(--btn-ghost-border);
}

.btn--ghost:hover {
  background: var(--surface-subtle, rgba(17, 24, 39, 0.06));
}

/* Optional: destructive emphasis (if you introduce it later) */
/*
.btn--danger {
  background: var(--danger, #b91c1c);
  color: var(--on-danger, #ffffff);
  border-color: var(--danger, #b91c1c);
}
*/

/* ------------------------------------------------------------------------
   Size variants
   ------------------------------------------------------------------------ */

.btn--lg {
  padding: var(--btn-pad-y-lg) var(--btn-pad-x-lg);
  font-size: var(--btn-font-size-lg);
}

.btn--sm {
  padding: var(--btn-pad-y-sm) var(--btn-pad-x-sm);
  font-size: var(--btn-font-size-sm);
}

/* ------------------------------------------------------------------------
   Icon support
   ------------------------------------------------------------------------ */

.btn--icon > i,
.btn--icon > svg {
  /* Keep icons visually aligned without forcing sizing */
  flex: 0 0 auto;
}

.btn--icon-only {
  /* Square button with centred icon */
  padding: var(--btn-pad-y) var(--btn-pad-y);
  width: calc((var(--btn-pad-y) * 2) + 1.25em);
  height: calc((var(--btn-pad-y) * 2) + 1.25em);
  gap: 0;
}

.btn--icon-only.btn--sm {
  padding: var(--btn-pad-y-sm);
  width: calc((var(--btn-pad-y-sm) * 2) + 1.25em);
  height: calc((var(--btn-pad-y-sm) * 2) + 1.25em);
}

.btn--icon-only.btn--lg {
  padding: var(--btn-pad-y-lg);
  width: calc((var(--btn-pad-y-lg) * 2) + 1.25em);
  height: calc((var(--btn-pad-y-lg) * 2) + 1.25em);
}

/* If your icon-only button uses <i> (Font Awesome), give it a consistent size */
.btn--icon-only i {
  font-size: 1.05em;
}

/* ------------------------------------------------------------------------
   Optional: link-style buttons (if you ever need them)
   ------------------------------------------------------------------------ */
/*
.btn--link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link, #1f5bd6);
  font-weight: var(--font-weight-semibold, 600);
}
.btn--link:hover {
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}
*/

/* ------------------------------------------------------------------------
   Component: Text Toggle (View more / View less)
   ------------------------------------------------------------------------ */

.text-toggle {
  /* fallback collapsed height */
  --tt-collapsed: 10rem;
  --tt-duration: 280ms;
  --tt-ease: ease;
  margin-bottom: var(--space-4);
}

/* Collapsible region */
.text-toggle__body {
  overflow: hidden;
  max-height: var(--tt-collapsed);
  transition: max-height var(--tt-duration) var(--tt-ease);
}

/* Optional subtle fade at the bottom when collapsed */
.text-toggle__body::after {
    content: "";
    display: block;
    height: 5rem;
    margin-top: -5rem;
    pointer-events: none;
    opacity: 1;
    transition: opacity var(--tt-duration) var(--tt-ease);
    background: linear-gradient(to bottom, transparent, var(--surface));
    z-index: 2;
    position: relative;
}

/* Expanded state */
.text-toggle.is-expanded .text-toggle__body {
  max-height: var(--tt-expanded, 999px);
  /* JS sets --tt-expanded */
}

.text-toggle.is-expanded .text-toggle__body::after {
  opacity: 0;
}

/* Button */
.text-toggle__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;

  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.text-toggle__btn:hover {
  text-decoration: underline;
}

.text-toggle__btn:focus-visible {
  outline: 2px solid var(--focus, var(--action, #0b66c3));
  outline-offset: 2px;
}

/* Chevron rotate */
.text-toggle__chev {
  display: inline-block;
  transition: transform var(--tt-duration) var(--tt-ease);
}

.text-toggle.is-expanded .text-toggle__chev {
  transform: rotate(180deg);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .text-toggle__body,
  .text-toggle__chev,
  .text-toggle__body::after {
    transition: none;
  }
}

/* ==========================================================================
   ##) Accessibility helpers (core)
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background-color: white;
  z-index: 999;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  z-index: 1000;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ------------------------------------------------------------------------
   Tooltip base (only if you do not already have it styled)
   Your JS positions #tooltip and toggles aria-hidden.
   ------------------------------------------------------------------------ */

.tooltip {
  position: fixed;
  z-index: 1000;

  max-width: 22rem;
  padding: 0.6rem 0.75rem;

  background: #111;
  color: #fff;

  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25);

  font-size: 0.875rem;
  line-height: 1.35;
}

.tooltip[aria-hidden="true"] {
  display: none;
}

/* Optional little arrow */
.tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  background: #111;
  transform: translateX(-50%) rotate(45deg);
}

.tooltip[data-placement="top"]::after {
  bottom: -0.35rem;
}

.tooltip[data-placement="bottom"]::after {
  top: -0.35rem;
}

.tooltip__content {
  white-space: normal;
}


/* Utility if you do not already have it */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.badge {
  --badge-size: 48px;
  --badge-bg: var(--link);
  --badge-fg: var(--surface);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: var(--badge-size);
  height: var(--badge-size);

  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-fg);

  font-weight: 700;
  font-size: 1rem;
  line-height: 1;

  letter-spacing: 0.04em;
  text-transform: uppercase;

  user-select: none;
  cursor: help;
}

.badge__text {
  display: block;
  transform: translateY(-0.02em); /* tiny optical tweak */
}

/* Visible focus for keyboard users */
.badge:focus {
  outline: none;
}

.badge:focus-visible {
  box-shadow:
    0 0 0 0.2rem #ffffff,
    0 0 0 0.35rem rgba(31, 95, 170, 0.45);
}

/* Optional: slightly smaller variant */
.badge--cpd.badge--sm {
  --badge-size: 2.75rem;
  font-size: 0.875rem;
}
