/* frikwork v0.0.26 — https://frikwork.com */
/* --- src/css/00-tokens.css --- */
/* frikwork design tokens — dark-first, with a full light theme */

:root {
  /* brand */
  --fw-brand: #94c83e;
  --fw-brand-text: #94c83e;      /* legible-on-background brand variant */
  --fw-brand-2: #3aaabe;         /* teal secondary */
  --fw-brand-2-deep: #2580a7;    /* deeper teal — header tint gradients */

  /* ink on a brand/status-coloured surface (gradient buttons, avatars, step dots).
     Overriding a brand colour without overriding its ink is how you get white-on-yellow. */
  --fw-on-primary: #101010;
  --fw-on-secondary: #ffffff;
  --fw-on-danger: #ffffff;
  --fw-on-warning: #101010;

  /* surfaces */
  --fw-bg: #101010;
  --fw-bg-2: #1a1a1a;
  --fw-bg-card: #1f1f1f;
  --fw-bg-hover: #262626;
  --fw-border: #333333;

  /* text */
  --fw-text: #ffffff;
  --fw-text-2: #cfcfcf;
  --fw-text-muted: #8a8a8a;

  /* glass */
  --fw-glass-bg: rgba(31, 31, 31, 0.55);
  --fw-glass-border: rgba(255, 255, 255, 0.08);
  --fw-glass-shadow: rgba(0, 0, 0, 0.35);

  /* status */
  --fw-success: #94c83e;
  --fw-warning: #f59e0b;
  --fw-danger: #ef4444;
  --fw-info: #3b82f6;

  /* severity ramp */
  --fw-sev-critical: #ff3860;
  --fw-sev-high: #ff7849;
  --fw-sev-medium: #f59e0b;
  --fw-sev-low: #3b82f6;

  /* categorical chart palette */
  --fw-chart-1: #2a78d6;
  --fw-chart-2: #1baf7a;
  --fw-chart-3: #eda100;
  --fw-chart-4: #008300;
  --fw-chart-5: #4a3aa7;
  --fw-chart-6: #e34948;
  --fw-chart-7: #e87ba4;
  --fw-chart-other: #55534c;

  /* button gradients — all coloured buttons use a 135deg gradient for a cohesive set */
  --fw-gradient-primary:        linear-gradient(135deg, #a5d94f, #7fb52e);
  --fw-gradient-primary-hover:  linear-gradient(135deg, #b2e35d, #8cc231);
  --fw-gradient-secondary:      linear-gradient(135deg, #1a5ddf, #2580a7);
  --fw-gradient-secondary-hover: linear-gradient(135deg, #1550c5, #1f6d90);
  --fw-gradient-danger:         linear-gradient(135deg, #f05252, #dc2626);
  --fw-gradient-danger-hover:   linear-gradient(135deg, #f56b6b, #e02d2d);
  --fw-gradient-warning:        linear-gradient(135deg, #fbbf24, #f59e0b);
  --fw-gradient-warning-hover:  linear-gradient(135deg, #fccb47, #f9a825);
  /* back-compat aliases (secondary was the original gradient) */
  --fw-gradient: var(--fw-gradient-secondary);
  --fw-gradient-hover: var(--fw-gradient-secondary-hover);

  /* spacing */
  --fw-space-xs: 0.25rem;
  --fw-space-sm: 0.5rem;
  --fw-space-md: 1rem;
  --fw-space-lg: 1.5rem;
  --fw-space-xl: 2rem;

  /* radii */
  --fw-radius-sm: 0.375rem;
  --fw-radius-md: 0.5rem;
  --fw-radius-lg: 0.65rem;
  --fw-radius-xl: 1rem;
  --fw-radius-pill: 9999px;

  /* shadows */
  --fw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --fw-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --fw-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
  --fw-shadow-glass: 0 8px 32px var(--fw-glass-shadow);
  --fw-shadow-glow: 0 0 20px color-mix(in srgb, var(--fw-brand) 30%, transparent);

  /* motion */
  --fw-ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
  --fw-ease-draw: cubic-bezier(0.16, 1, 0.3, 1);
  --fw-ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fw-dur-fast: 0.15s;
  --fw-dur: 0.2s;
  --fw-dur-slow: 0.3s;

  /* type */
  --fw-font: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --fw-font-heading: var(--fw-font);   /* aliased by default — set it to pair a display face */
  --fw-font-mono: 'Fira Code', Consolas, monospace;

  color-scheme: dark light;
}

/* Light theme: explicit user choice */
[data-fw-theme="light"] {
  --fw-brand-text: #5c8a1e;
  --fw-brand-2: #2d8a9b;

  --fw-bg: #f5f4f1;
  --fw-bg-2: #ffffff;
  --fw-bg-card: #ffffff;
  --fw-bg-hover: #eeece7;
  --fw-border: #ddd9d0;

  --fw-text: #17160f;
  --fw-text-2: #4b4a42;
  --fw-text-muted: #86847a;

  --fw-glass-bg: rgba(255, 255, 255, 0.55);
  --fw-glass-border: rgba(23, 22, 15, 0.08);
  --fw-glass-shadow: rgba(23, 22, 15, 0.12);

  --fw-success: #5c8a1e;
  --fw-warning: #b45309;
  --fw-danger: #dc2626;
  --fw-info: #2563eb;

  --fw-sev-critical: #e11d48;
  --fw-sev-high: #ea580c;
  --fw-sev-medium: #b45309;
  --fw-sev-low: #2563eb;

  --fw-shadow-sm: 0 1px 2px rgba(23, 22, 15, 0.1);
  --fw-shadow-md: 0 4px 6px rgba(23, 22, 15, 0.1);
  --fw-shadow-lg: 0 10px 15px rgba(23, 22, 15, 0.12);
}

/* Light theme: system preference, only before an explicit choice is set */
@media (prefers-color-scheme: light) {
  :root:not([data-fw-theme]) {
    --fw-brand-text: #5c8a1e;
    --fw-brand-2: #2d8a9b;
    --fw-bg: #f5f4f1;
    --fw-bg-2: #ffffff;
    --fw-bg-card: #ffffff;
    --fw-bg-hover: #eeece7;
    --fw-border: #ddd9d0;
    --fw-text: #17160f;
    --fw-text-2: #4b4a42;
    --fw-text-muted: #86847a;
    --fw-glass-bg: rgba(255, 255, 255, 0.55);
    --fw-glass-border: rgba(23, 22, 15, 0.08);
    --fw-glass-shadow: rgba(23, 22, 15, 0.12);
    --fw-success: #5c8a1e;
    --fw-warning: #b45309;
    --fw-danger: #dc2626;
    --fw-info: #2563eb;
  }
}

/* Animatable angle for the rotating card border ring (lively tier) */
@property --fw-card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* --- src/css/01-reset.css --- */
/* frikwork reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, picture, svg, video, canvas { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul[class], ol[class] { list-style: none; padding: 0; }

/* --- src/css/02-elements.css --- */
/* frikwork base elements — unclassed HTML looks like frikwork.
   Flow/rhythm rules use :where() (zero specificity) so any .fw-* component,
   inline style, or consumer rule always wins. Structural element rules that
   should not leak into styled components are scoped with :not([class]). */
body {
  background: var(--fw-bg);
  color: var(--fw-text);
  font-family: var(--fw-font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--fw-dur-slow) ease, color var(--fw-dur-slow) ease;
}

/* --- headings: scale + proportional vertical rhythm --- */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 600; color: var(--fw-text); }
h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }
h5 { font-size: 0.9375rem; }
h6 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fw-text-muted); }

/* margin-block in em → bigger headings get proportionally more space above them */
:where(h1, h2, h3, h4, h5, h6) { margin-block: 1.4em 0.5em; }
:where(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }

/* --- flow content rhythm --- */
:where(p, ul, ol, dl, blockquote, pre, figure, table) { margin-block: 0 var(--fw-space-md); }
:where(p, ul, ol, dl, blockquote, pre, figure, table):last-child { margin-bottom: 0; }

p { color: var(--fw-text-2); }
strong, b { font-weight: 700; color: var(--fw-text); }
em, i { font-style: italic; }

a:not([class]) { color: var(--fw-brand-text); }
a:not([class]):hover { text-decoration: underline; }

/* --- lists --- */
ul:not([class]), ol:not([class]) { padding-left: 1.25rem; color: var(--fw-text-2); }
:where(ul, ol) :where(ul, ol) { margin-block: 0.25rem 0; }
:where(li) { margin-block: 0.2rem 0; }

/* --- description lists --- */
dl:not([class]) dt { font-weight: 600; color: var(--fw-text); }
dl:not([class]) dd { color: var(--fw-text-2); margin: 0 0 var(--fw-space-sm) 1.25rem; }

hr { border: none; border-top: 1px solid var(--fw-border); margin: var(--fw-space-lg) 0; }

/* --- blockquote + attribution --- */
blockquote {
  border-left: 3px solid var(--fw-brand);
  padding-left: var(--fw-space-md);
  color: var(--fw-text-2);
  font-style: italic;
}
blockquote cite, blockquote footer {
  display: block;
  margin-top: var(--fw-space-sm);
  font-size: 0.8125rem;
  font-style: normal;
  color: var(--fw-text-muted);
}
blockquote cite::before, blockquote footer::before { content: '— '; }

/* --- figures --- */
figcaption {
  margin-top: var(--fw-space-sm);
  font-size: 0.8125rem;
  color: var(--fw-text-muted);
  text-align: center;
}

/* --- code family --- */
code, pre, kbd, samp, var { font-family: var(--fw-font-mono); font-size: 0.9em; }
code { background: var(--fw-bg-card); padding: 0.1em 0.35em; border-radius: var(--fw-radius-sm); }
pre { background: var(--fw-bg-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius-md); padding: var(--fw-space-md); overflow-x: auto; }
pre code { background: none; padding: 0; }
var { font-style: italic; }
kbd {
  background: var(--fw-bg-2);
  border: 1px solid var(--fw-border);
  border-bottom-width: 2px;
  border-radius: var(--fw-radius-sm);
  padding: 0.1em 0.4em;
  font-size: 0.8em;
}

/* --- inline semantics --- */
mark { background: color-mix(in srgb, var(--fw-brand) 28%, transparent); color: var(--fw-text); padding: 0.05em 0.3em; border-radius: var(--fw-radius-sm); }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 0.2em; cursor: help; }
sub, sup { font-size: 0.75em; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
small { font-size: 0.8125em; }
del, s { text-decoration: line-through; color: var(--fw-text-muted); }
ins { text-decoration: underline; text-decoration-color: var(--fw-brand); text-underline-offset: 0.15em; }
u { text-decoration: underline; text-underline-offset: 0.15em; }
cite, dfn { font-style: italic; }
q { font-style: italic; }
address { font-style: normal; color: var(--fw-text-2); }
output { font-variant-numeric: tabular-nums; color: var(--fw-text); }

/* --- unclassed table (styled table is .fw-table) --- */
table:not([class]) { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
table:not([class]) th, table:not([class]) td {
  text-align: left;
  padding: var(--fw-space-sm) var(--fw-space-md);
  border-bottom: 1px solid var(--fw-border);
}
table:not([class]) th { font-weight: 600; color: var(--fw-text); }
table:not([class]) td { color: var(--fw-text-2); }
caption { caption-side: bottom; padding-top: var(--fw-space-sm); font-size: 0.8125rem; color: var(--fw-text-muted); text-align: left; }

/* --- unclassed fieldset (styled group is .fw-fieldset) --- */
fieldset:not([class]) { border: 1px solid var(--fw-border); border-radius: var(--fw-radius-md); padding: var(--fw-space-md); margin-block: 0 var(--fw-space-md); }
legend:not([class]) { padding: 0 var(--fw-space-sm); font-weight: 600; font-size: 0.875rem; color: var(--fw-text); }

/* --- unclassed details (styled accordion is .fw-accordion) --- */
details:not([class]) { border: 1px solid var(--fw-border); border-radius: var(--fw-radius-md); padding: var(--fw-space-sm) var(--fw-space-md); margin-bottom: var(--fw-space-md); }
details:not([class]) summary { cursor: pointer; font-weight: 600; color: var(--fw-text); }
details:not([class])[open] summary { margin-bottom: var(--fw-space-sm); }

/* --- native progress + meter (styled bar is .fw-meter) --- */
progress {
  -webkit-appearance: none; appearance: none;
  width: 100%; max-width: 320px; height: 8px;
  border: none; border-radius: var(--fw-radius-pill);
  background: var(--fw-bg-hover); overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--fw-bg-hover); border-radius: var(--fw-radius-pill); }
progress::-webkit-progress-value { background: var(--fw-brand); border-radius: var(--fw-radius-pill); }
progress::-moz-progress-bar { background: var(--fw-brand); }
meter {
  width: 100%; max-width: 320px; height: 8px;
  -webkit-appearance: none; appearance: none;
  background: var(--fw-bg-hover); border-radius: var(--fw-radius-pill); overflow: hidden;
}
meter::-webkit-meter-bar { background: var(--fw-bg-hover); border: none; border-radius: var(--fw-radius-pill); }
meter::-webkit-meter-optimum-value { background: var(--fw-success); border-radius: var(--fw-radius-pill); }
meter::-webkit-meter-suboptimum-value { background: var(--fw-warning); border-radius: var(--fw-radius-pill); }
meter::-webkit-meter-even-less-good-value { background: var(--fw-danger); border-radius: var(--fw-radius-pill); }
meter:-moz-meter-optimum::-moz-meter-bar { background: var(--fw-success); }
meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--fw-warning); }
meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--fw-danger); }

/* --- native dialog (styled overlay is .fw-modal) --- */
dialog {
  background: var(--fw-bg-card);
  color: var(--fw-text);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  padding: var(--fw-space-lg);
  box-shadow: var(--fw-shadow-lg);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.5); }

::selection { background: color-mix(in srgb, var(--fw-brand) 30%, transparent); color: var(--fw-text); }

:focus-visible { outline: 2px solid var(--fw-brand); outline-offset: 2px; }

/* forms follow accent at the element level only; full styling is opt-in via .fw-* */
input, textarea, select { accent-color: var(--fw-brand); }

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fw-border); border-radius: var(--fw-radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--fw-text-muted); }

/* --- src/css/03-typography.css --- */
/* frikwork typography — self-hosted Schibsted Grotesk (variable, latin subset).
   Two physical files cover the whole weight axis via font-weight ranges. */
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-grotesk-regular.woff2') format('woff2');
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-grotesk-italic.woff2') format('woff2');
  font-weight: 400 700; font-style: italic; font-display: swap;
}

/* Headings take their own font token so a theme can pair a display face with a body face.
   Defaults to var(--fw-font), so leaving it unset changes nothing. */
h1, h2, h3, h4, h5, h6 { font-family: var(--fw-font-heading); }

/* type-scale utilities */
.fw-lead { font-size: 1.125rem; line-height: 1.6; color: var(--fw-text-2); }
.fw-muted { color: var(--fw-text-muted); }
.fw-micro { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fw-text-muted); font-weight: 500; }
.fw-num { font-variant-numeric: tabular-nums; }

/* long-form article body — opt-in readable measure + richer rhythm.
   Base :where() rhythm already flows; .fw-prose tightens it for reading. */
.fw-prose { max-width: 68ch; line-height: 1.7; color: var(--fw-text-2); }
.fw-prose > :first-child { margin-top: 0; }
.fw-prose > :last-child { margin-bottom: 0; }
.fw-prose h1, .fw-prose h2, .fw-prose h3, .fw-prose h4 { color: var(--fw-text); }
.fw-prose h2 { margin-top: 2em; padding-bottom: 0.3em; border-bottom: 1px solid var(--fw-border); }
.fw-prose h3 { margin-top: 1.6em; }
.fw-prose p, .fw-prose ul, .fw-prose ol, .fw-prose blockquote { margin-bottom: 1.15em; }
.fw-prose li { margin-block: 0.35em 0; }
.fw-prose a { color: var(--fw-brand-text); text-decoration: underline; text-underline-offset: 0.15em; }
.fw-prose img, .fw-prose figure { margin-block: 1.5em; }
.fw-prose blockquote { margin-inline: 0; }
.fw-prose code { font-size: 0.875em; }
.fw-prose > pre { margin-block: 1.5em; }

/* --- src/css/04-layout.css --- */
/* frikwork layout primitives */
/* width:100% is a *definite* width (vs auto), so an inner overflow-x:auto scroller (e.g.
   .fw-table-wrap) has something to scroll against and a wide table can't widen the page. */
.fw-container { width: 100%; max-width: 1900px; margin: 0 auto; padding: 0 var(--fw-space-lg); }
@media (max-width: 640px) { .fw-container { padding: 0 var(--fw-space-md); } }

.fw-grid { display: grid; gap: var(--fw-space-md); }
.fw-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.fw-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.fw-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
/* grid/flex items default to min-width:auto, so long unbreakable content (code, URLs, wide
   tables) can force horizontal overflow. Reset it so children shrink and scroll internally. */
.fw-grid > *, .fw-stack > * { min-width: 0; }

@media (max-width: 1000px) {
  .fw-grid--cols-3, .fw-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .fw-grid--cols-2, .fw-grid--cols-3, .fw-grid--cols-4 { grid-template-columns: 1fr; }
}

.fw-stack { display: flex; flex-direction: column; gap: var(--fw-space-md); }
.fw-stack--lg { gap: var(--fw-space-lg); }

/* Sticky-footer page shell — put on the top-level wrapper (or <body>) so header/content/footer
   stack in a full-height column. Paired with .fw-footer { margin-top: auto }, the footer sits
   at the bottom of the viewport even when the content is short (not floating mid-page). Opt-in,
   so it never changes a consumer's existing body layout unless they ask for it. */
.fw-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
/* flex items won't shrink below their content's min-width by default; allow it so a wide
   descendant (long code line, wide table) scrolls internally instead of widening the page */
.fw-page > * { min-width: 0; }

/* App shell — a full-height frame whose regions scroll independently, for sidebar apps
   (dashboards, PM tools, consoles). The document itself never scrolls.

   Why this exists: the obvious hand-rolled version — a grid with `min-height: 100vh` and
   `overflow: auto` on the aside — does NOT work. `min-height` is not a height, so the grid row
   grows to whatever the tallest child is; a long nav makes the *document* tall, the aside's
   `overflow` never engages because its own height is content-driven, and any `position: sticky`
   content in the main column runs out of its containing block and scrolls away, stranding a
   blank gap beside the nav. `height` (definite, not `min-height`) plus `min-height: 0` on every
   descendant that must scroll is the fix — grid and flex children default to `min-height: auto`
   and refuse to shrink below their content, which is why "just add overflow" so often fails.

   <div class="fw-shell">
     <aside class="fw-shell__aside">…</aside>
     <div class="fw-shell__main">
       <header class="fw-shell__head">…</header>
       <main class="fw-shell__body">…</main>
     </div>
   </div>

   Aside width comes from --fw-shell-aside so consumers retune it without redeclaring the rule.
   Opt-in and unopinionated about padding, borders and colour — compose with .fw-panel etc. */
.fw-shell { display: grid; grid-template-columns: var(--fw-shell-aside, 260px) 1fr; height: 100vh; height: 100dvh; overflow: hidden; }
.fw-shell > * { min-width: 0; min-height: 0; }
.fw-shell__aside { overflow-y: auto; overflow-x: hidden; min-height: 0; }
/* The head/body split: head keeps its natural height, body takes the rest and scrolls. */
.fw-shell__main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.fw-shell__head { flex: 0 0 auto; }
.fw-shell__body { flex: 1 1 auto; min-height: 0; min-width: 0; overflow-y: auto; }
/* A route that manages its own inner scrollers (e.g. a list + a detail pane side by side) sets
   this on the body instead, then sizes its own children to 100% and scrolls them individually. */
.fw-shell__body--fixed { overflow: hidden; }

/* Below the shell's usable width the aside is expected to become a drawer, which is a JS/markup
   decision the consumer owns. All we do is stop forcing a two-column grid into a phone. */
@media (max-width: 640px) {
  .fw-shell { grid-template-columns: 1fr; height: auto; min-height: 100dvh; overflow: visible; }
  .fw-shell__aside { overflow-y: visible; }
  .fw-shell__main { overflow: visible; }
  .fw-shell__body, .fw-shell__body--fixed { overflow: visible; }
}

/* --- src/css/10-buttons.css --- */
/* frikwork buttons */
.fw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fw-space-sm);
  padding: 0.625rem var(--fw-space-md);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--fw-radius-md);
  border: 1px solid transparent;
  transition: all var(--fw-dur) ease;
}
.fw-btn:hover { transform: translateY(-1px); box-shadow: var(--fw-shadow-md); }
.fw-btn:active { transform: translateY(0); }

/* coloured buttons use gradients; outline/ghost stay flat */
.fw-btn--primary { background-image: var(--fw-gradient-primary); color: var(--fw-on-primary); }
.fw-btn--primary:hover { background-image: var(--fw-gradient-primary-hover); }

.fw-btn--secondary { background-image: var(--fw-gradient-secondary); color: var(--fw-on-secondary); }
.fw-btn--secondary:hover { background-image: var(--fw-gradient-secondary-hover); }

.fw-btn--danger { background-image: var(--fw-gradient-danger); color: var(--fw-on-danger); }
.fw-btn--danger:hover { background-image: var(--fw-gradient-danger-hover); }

.fw-btn--warning { background-image: var(--fw-gradient-warning); color: var(--fw-on-warning); }
.fw-btn--warning:hover { background-image: var(--fw-gradient-warning-hover); }

.fw-btn--outline { background: transparent; border-color: var(--fw-border); color: var(--fw-text-2); }
.fw-btn--outline:hover { background: var(--fw-bg-hover); border-color: var(--fw-brand); color: var(--fw-brand-text); }

.fw-btn--ghost { background: transparent; color: var(--fw-text-2); }
.fw-btn--ghost:hover { background: var(--fw-bg-hover); color: var(--fw-text); box-shadow: none; }

.fw-btn--sm { padding: var(--fw-space-xs) var(--fw-space-sm); font-size: 0.8rem; }
.fw-btn--lg { padding: var(--fw-space-md) var(--fw-space-lg); font-size: 1rem; }
.fw-btn--block { display: flex; width: 100%; }

.fw-btn[disabled], .fw-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* icon button — square, bordered (salesdash) */
.fw-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  background: transparent;
  color: var(--fw-text-2);
  transition: all var(--fw-dur) ease;
}
.fw-icon-btn:hover { border-color: var(--fw-brand); color: var(--fw-brand-text); }
.fw-icon-btn.is-active { border-color: var(--fw-brand); color: var(--fw-brand-text); background: color-mix(in srgb, var(--fw-brand) 10%, transparent); }
.fw-icon-btn svg { width: 16px; height: 16px; }

/* --- src/css/11-cards.css --- */
/* frikwork cards — glass by default (salesdash frosted surface) */
.fw-card {
  background: var(--fw-glass-bg);
  border: 1px solid var(--fw-glass-border);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-radius: var(--fw-radius-lg);
  box-shadow: var(--fw-shadow-glass);
  padding: var(--fw-space-lg);
  position: relative;
  overflow: hidden;
}
/* fallback: no backdrop-filter → the semi-opaque surface above still reads as a panel */

/* opt out of glass for dense/nested contexts (opaque, flat) */
.fw-card--solid {
  background: var(--fw-bg-card);
  border-color: var(--fw-border);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

/* back-compat: cards are glass by default now, so this is a no-op alias */
.fw-card--glass { /* alias — see .fw-card */ }

/* Every card carries an accent colour (brand by default). Status variants below override it,
   and .fw-card--hover highlights in whatever the accent is — so a danger card glows red, an
   online card glows green, a plain card glows brand. */
.fw-card { --fw-card-accent: var(--fw-brand); }

.fw-card--hover { transition: transform var(--fw-dur) ease, border-color var(--fw-dur) ease, box-shadow var(--fw-dur) ease; cursor: pointer; }
.fw-card--hover:hover {
  transform: translateY(-2px);
  border-color: var(--fw-card-accent);
  box-shadow:
    0 0 0 1px var(--fw-card-accent),
    0 8px 24px -6px color-mix(in srgb, var(--fw-card-accent) 45%, transparent),
    var(--fw-shadow-lg);
}

/* stat card */
.fw-stat-card { padding: 1.5rem 1.8rem; }
.fw-stat-card__value { font-size: 3rem; font-weight: 700; line-height: 1; color: var(--fw-text); font-variant-numeric: tabular-nums; }
.fw-stat-card__value--brand { color: var(--fw-brand-text); }
.fw-stat-card__label { margin-top: 0.4rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fw-text-muted); font-weight: 500; }

/* status variants: set the accent colour + a left edge. `--edge-*` and the short
   `--success/--warning/--danger/--info` names are equivalent aliases. Combine with
   .fw-card--hover for a status-coloured hover highlight. */
.fw-card--edge-success, .fw-card--success { --fw-card-accent: var(--fw-success); border-left: 3px solid var(--fw-success); }
.fw-card--edge-warning, .fw-card--warning { --fw-card-accent: var(--fw-warning); border-left: 3px solid var(--fw-warning); }
.fw-card--edge-danger,  .fw-card--danger  { --fw-card-accent: var(--fw-danger);  border-left: 3px solid var(--fw-danger); }
.fw-card--edge-info,    .fw-card--info     { --fw-card-accent: var(--fw-info);    border-left: 3px solid var(--fw-info); }

/* --- src/css/12-forms.css --- */
/* frikwork forms — full styling is opt-in via .fw-* (native controls keep accent-color) */
.fw-field { display: flex; flex-direction: column; gap: var(--fw-space-xs); margin-bottom: var(--fw-space-md); }
.fw-label { font-size: 0.75rem; font-weight: 500; color: var(--fw-text-2); }
.fw-label--req::after { content: ' *'; color: var(--fw-danger); }
.fw-help { font-size: 0.75rem; color: var(--fw-text-muted); }
.fw-error { font-size: 0.75rem; color: var(--fw-danger); }

.fw-input, .fw-select, .fw-textarea {
  width: 100%;
  padding: var(--fw-space-sm) var(--fw-space-md);
  font-size: 0.875rem;
  background: var(--fw-bg);
  color: var(--fw-text);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  transition: border-color var(--fw-dur-fast) ease;
}
.fw-input::placeholder, .fw-textarea::placeholder { color: var(--fw-text-muted); }
.fw-input:focus, .fw-select:focus, .fw-textarea:focus { outline: none; border-color: var(--fw-brand); }
.fw-textarea { resize: vertical; min-height: 5rem; }

/* tint the native date/time picker indicator to match the dark surface */
.fw-input::-webkit-calendar-picker-indicator { filter: invert(0.7); cursor: pointer; }
[data-fw-theme="light"] .fw-input::-webkit-calendar-picker-indicator { filter: none; opacity: 0.55; }
@media (prefers-color-scheme: light) {
  :root:not([data-fw-theme]) .fw-input::-webkit-calendar-picker-indicator { filter: none; opacity: 0.55; }
}

.fw-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* multi-select / listbox — drop the single-select chrome, become a scrollable list */
.fw-select[multiple], .fw-select[size] {
  appearance: auto;
  background-image: none;
  padding: var(--fw-space-sm);
  min-height: 8rem;
}
.fw-select[multiple] option, .fw-select[size] option { padding: 0.35rem var(--fw-space-sm); border-radius: var(--fw-radius-sm); }
/* dark ink on the brand fill — matches .fw-btn--primary; white scored 1.98:1 (WCAG fail) */
.fw-select[multiple] option:checked, .fw-select[size] option:checked {
  background: linear-gradient(var(--fw-brand), var(--fw-brand));
  color: var(--fw-on-primary);
}

.is-invalid { border-color: var(--fw-danger) !important; }

/* disabled + readonly across all controls */
.fw-input:disabled, .fw-select:disabled, .fw-textarea:disabled,
.fw-input[readonly], .fw-textarea[readonly] { opacity: 0.6; cursor: not-allowed; }
.fw-input[readonly], .fw-textarea[readonly] { background: var(--fw-bg-2); }
.fw-switch:disabled, .fw-checkbox:disabled, .fw-radio:disabled, .fw-range:disabled { opacity: 0.5; cursor: not-allowed; }

/* toggle switch */
.fw-switch {
  appearance: none;
  position: relative;
  width: 48px; height: 24px;
  background: var(--fw-border);
  border-radius: var(--fw-radius-pill);
  cursor: pointer;
  transition: background var(--fw-dur) ease;
  flex-shrink: 0;
}
.fw-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--fw-dur) ease;
}
.fw-switch:checked { background: var(--fw-brand); }
.fw-switch:checked::after { transform: translateX(24px); }
.fw-switch--danger:checked { background: var(--fw-danger); }

/* checkbox + radio — native accent for reliability + consistency */
.fw-checkbox, .fw-radio { width: 1rem; height: 1rem; accent-color: var(--fw-brand); cursor: pointer; flex-shrink: 0; }

/* radio group layout */
.fw-radio-group { display: flex; flex-direction: column; gap: var(--fw-space-sm); }
.fw-radio-group--inline { flex-direction: row; flex-wrap: wrap; gap: var(--fw-space-lg); }

/* range slider */
.fw-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: var(--fw-bg-hover);
  border-radius: var(--fw-radius-pill);
  cursor: pointer;
}
.fw-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--fw-brand);
  border: 2px solid var(--fw-bg);
  box-shadow: var(--fw-shadow-sm);
  transition: transform var(--fw-dur-fast) ease;
}
.fw-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.fw-range::-moz-range-thumb {
  width: 18px; height: 18px; border: 2px solid var(--fw-bg);
  border-radius: 50%; background: var(--fw-brand); box-shadow: var(--fw-shadow-sm);
}
.fw-range::-moz-range-track { height: 6px; background: var(--fw-bg-hover); border-radius: var(--fw-radius-pill); }
.fw-range:focus-visible { outline: 2px solid var(--fw-brand); outline-offset: 4px; }

/* file input */
.fw-file { width: 100%; font-size: 0.875rem; color: var(--fw-text-2); }
.fw-file::file-selector-button {
  margin-right: var(--fw-space-md);
  padding: var(--fw-space-sm) var(--fw-space-md);
  font: inherit; font-size: 0.875rem; font-weight: 500;
  color: var(--fw-text);
  background: var(--fw-bg-hover);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  cursor: pointer;
  transition: background var(--fw-dur-fast) ease, border-color var(--fw-dur-fast) ease;
}
.fw-file::file-selector-button:hover { background: var(--fw-bg-card); border-color: var(--fw-brand); }

/* colour picker */
.fw-color {
  width: 3rem; height: 2.25rem;
  padding: 0.2rem;
  background: var(--fw-bg);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  cursor: pointer;
}
.fw-color::-webkit-color-swatch-wrapper { padding: 0; }
.fw-color::-webkit-color-swatch { border: none; border-radius: var(--fw-radius-sm); }
.fw-color::-moz-color-swatch { border: none; border-radius: var(--fw-radius-sm); }

/* fieldset group */
.fw-fieldset {
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  padding: var(--fw-space-md) var(--fw-space-lg) var(--fw-space-lg);
  margin: 0 0 var(--fw-space-md);
}
.fw-legend {
  padding: 0 var(--fw-space-sm);
  font-size: 0.8125rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--fw-text-2);
}

/* output / computed value */
.fw-output {
  display: inline-block;
  padding: var(--fw-space-xs) var(--fw-space-sm);
  font-variant-numeric: tabular-nums; font-weight: 600;
  color: var(--fw-text);
  background: var(--fw-bg-hover);
  border-radius: var(--fw-radius-sm);
}

/* input group — prefix/suffix addons around a .fw-input */
.fw-input-group { display: flex; align-items: stretch; }
.fw-input-group .fw-input { border-radius: 0; }
.fw-input-group > :first-child { border-top-left-radius: var(--fw-radius-md); border-bottom-left-radius: var(--fw-radius-md); }
.fw-input-group > :last-child { border-top-right-radius: var(--fw-radius-md); border-bottom-right-radius: var(--fw-radius-md); }
.fw-input-group .fw-input:not(:first-child) { border-left: none; }
.fw-input-group__addon {
  display: flex; align-items: center;
  padding: 0 var(--fw-space-md);
  font-size: 0.875rem;
  color: var(--fw-text-muted);
  white-space: nowrap;
  background: var(--fw-bg-hover);
  border: 1px solid var(--fw-border);
}

/* --- src/css/13-header.css --- */
/* frikwork header — frosted glass, sticky */
.fw-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fw-space-md);
  padding: var(--fw-space-md) var(--fw-space-lg);
  background: var(--fw-glass-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--fw-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* brand-tint gradient layered over the glass */
.fw-header--tint-brand {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--fw-brand) 12%, transparent), color-mix(in srgb, var(--fw-brand-2-deep) 12%, transparent)),
    var(--fw-glass-bg);
  border-bottom: 2px solid var(--fw-brand);
}

/* custom tint: set --fw-header-tint to any accent color on the element */
.fw-header--tint-custom {
  --fw-header-tint: #ff9900;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--fw-header-tint) 12%, transparent), color-mix(in srgb, var(--fw-brand-2-deep) 12%, transparent)),
    var(--fw-glass-bg);
  border-bottom: 2px solid var(--fw-header-tint);
}

/* mobile: wrap gracefully instead of overflowing. Any header stays on one line until it
   can't; then it wraps. When the .fw-navlinks nav component is present it drops to its own
   centered full-width row below the brand + controls. */
@media (max-width: 640px) {
  .fw-header { flex-wrap: wrap; row-gap: var(--fw-space-sm); padding: var(--fw-space-sm) var(--fw-space-md); }
  .fw-header .fw-navlinks { order: 3; width: 100%; justify-content: center; }
}

/* --- src/css/14-nav.css --- */
/* Icon support for both nav primitives. frikwork's reset sets svg { display: block }, so a
   tab or nav link that isn't a flex container drops an inline <svg> onto its own line — every
   other icon-capable component (.fw-btn, .fw-badge, .fw-chip, .fw-alert, .fw-step, .fw-breadcrumb)
   was already flex-with-gap; these two were the holdouts. Same scale and icon gap as .fw-btn.
   Text-only tabs/links don't move: a single text child lays out identically, and justify-content
   only bites when a consumer stretches one (flex:1 equal-width strip), where it keeps the
   centring that text-align used to give. Give icons an explicit width/height — the framework
   doesn't size them (bare viewBox-only SVGs default to 300x150), same as .fw-btn. */
.fw-tab, .fw-navlink { display: inline-flex; align-items: center; justify-content: center; gap: var(--fw-space-sm); }

/* site-level header nav links (anchors between pages, not in-page tabs) */
.fw-navlinks { display: flex; gap: var(--fw-space-xs); align-items: center; flex-wrap: wrap; }
.fw-navlink {
  padding: var(--fw-space-sm) var(--fw-space-md);
  font-size: 0.9rem; font-weight: 500;
  color: var(--fw-text-2);
  border-radius: var(--fw-radius-md);
  transition: color var(--fw-dur) ease, background var(--fw-dur) ease;
}
.fw-navlink:hover { background: var(--fw-bg-hover); color: var(--fw-text); }
.fw-navlink.is-active { color: var(--fw-brand-text); background: color-mix(in srgb, var(--fw-brand) 12%, transparent); }

/* frikwork nav tabs */
.fw-tabs { display: flex; gap: var(--fw-space-xs); flex-wrap: wrap; }
.fw-tab {
  padding: var(--fw-space-sm) var(--fw-space-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fw-text-muted);
  border-radius: var(--fw-radius-md);
  transition: all var(--fw-dur) ease;
}
.fw-tab:hover { background: var(--fw-bg-hover); color: var(--fw-text); }
.fw-tab.is-active { color: var(--fw-brand-text); background: color-mix(in srgb, var(--fw-brand) 10%, transparent); }

/* underline variant */
.fw-tabs--underline { gap: var(--fw-space-md); border-bottom: 1px solid var(--fw-border); }
.fw-tabs--underline .fw-tab { border-radius: 0; border-bottom: 2px solid transparent; background: none; padding-left: 0; padding-right: 0; }
.fw-tabs--underline .fw-tab.is-active { background: none; border-bottom-color: var(--fw-brand); }

/* panes */
.fw-tab-pane { display: none; }
.fw-tab-pane.is-active { display: block; }

/* segmented tab bar (Option B): an enclosed group with a track + optional count badges */
.fw-tabs--segmented {
  display: inline-flex;
  gap: var(--fw-space-xs);
  background: var(--fw-bg-2);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  padding: var(--fw-space-xs);
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;              /* too many segments for the width → scroll, don't overflow */
}
.fw-tabs--segmented .fw-tab { border-radius: var(--fw-radius-sm); white-space: nowrap; }
.fw-tab__count {
  font-size: 0.72rem; font-weight: 700;
  background: var(--fw-bg-card); color: var(--fw-text-2);
  padding: 0.05em 0.5em; border-radius: var(--fw-radius-pill);
  /* no margin-left: .fw-tab is a flex container now, so its gap owns this spacing.
     Leaving the old 0.4rem here would stack on top of the gap. */
}
.fw-tab.is-active .fw-tab__count { background: color-mix(in srgb, var(--fw-brand) 18%, transparent); color: var(--fw-brand-text); }

/* card-tabs (Option A): a tab group styled as full cards — one active at a time. Use for
   stat/filter selectors where you want the numbers big but the behaviour of tabs. Only the
   active tab goes lively (see motion tier), because a selector isn't content. */
.fw-cardtabs { display: grid; grid-template-columns: repeat(var(--fw-cardtabs-cols, 4), 1fr); gap: var(--fw-space-md); }
.fw-cardtab {
  position: relative;
  background: var(--fw-bg-card);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  padding: var(--fw-space-lg);
  cursor: pointer;
  transition: border-color var(--fw-dur) ease, background var(--fw-dur) ease, transform var(--fw-dur) ease;
}
.fw-cardtab:hover { border-color: var(--fw-text-muted); }
.fw-cardtab.is-active {
  border-color: var(--fw-brand);
  background: linear-gradient(135deg, color-mix(in srgb, var(--fw-brand) 10%, transparent), transparent 60%), var(--fw-bg-card);
}
@media (max-width: 1000px) { .fw-cardtabs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .fw-cardtabs { grid-template-columns: 1fr; } }

/* --- src/css/15-dropdown.css --- */
/* frikwork dropdown / settings panel */
.fw-dropdown { position: relative; display: inline-block; }
.fw-dropdown__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;   /* default; frikwork.js re-aligns (left/right/up/down) on open so it never clips */
  z-index: 400;
  width: 260px;
  max-width: calc(100vw - var(--fw-space-lg));
  max-height: 70vh;
  overflow-y: auto;
  padding: var(--fw-space-sm);
  background: var(--fw-bg-card);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  animation: fw-panel-in 160ms ease-out;
}
.fw-dropdown__panel[hidden] { display: none; }

/* State hook: the wrapper carries .is-open while its panel is showing, so a
   trigger can be styled as active without the consumer tracking state itself.
   Deliberately no rules on [data-fw-menubar] — a menubar is usually an existing
   nav (.fw-navlinks, a toolbar) that already owns its own layout, and imposing
   display/gap here would fight it. */
.fw-dropdown.is-open > [data-fw-toggle="dropdown"] { color: var(--fw-brand-text); }
.fw-dropdown__title { padding: var(--fw-space-sm); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fw-text-muted); font-weight: 600; }
.fw-dropdown__divider { height: 1px; background: var(--fw-border); margin: var(--fw-space-sm) 0; }

.fw-check-row {
  display: flex;
  align-items: center;
  gap: var(--fw-space-sm);
  padding: var(--fw-space-sm);
  border-radius: var(--fw-radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
}
.fw-check-row:hover { background: var(--fw-bg-hover); }
.fw-check-row input { accent-color: var(--fw-brand); }

@keyframes fw-panel-in {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* --- src/css/16-modal.css --- */
/* frikwork modal */
.fw-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: var(--fw-space-lg);
}
.fw-modal.is-open { display: flex; }
.fw-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); }
.fw-modal__content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--fw-bg-card);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  box-shadow: var(--fw-shadow-lg);
  animation: fw-panel-in 200ms var(--fw-ease-settle);
}
.fw-modal__content--sm { max-width: 400px; }
.fw-modal__content--lg { max-width: 640px; }
.fw-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--fw-space-lg);
  border-bottom: 1px solid var(--fw-border);
  font-weight: 600;
}
.fw-modal__body { padding: var(--fw-space-lg); }
.fw-modal__footer {
  display: flex; gap: var(--fw-space-sm); justify-content: flex-end;
  padding: var(--fw-space-lg);
  border-top: 1px solid var(--fw-border);
}
.fw-modal__close {
  width: 2rem; height: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fw-text-muted);
  border-radius: var(--fw-radius-sm);
  font-size: 1.25rem; line-height: 1;
}
.fw-modal__close:hover { background: var(--fw-bg-hover); color: var(--fw-text); }

/* --- src/css/17-toast.css --- */
/* frikwork toast */
.fw-toast-stack {
  position: fixed;
  top: var(--fw-space-lg);
  right: var(--fw-space-lg);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: var(--fw-space-sm);
  max-width: 420px;
}
.fw-toast {
  padding: var(--fw-space-md);
  background: var(--fw-bg-card);
  border: 1px solid var(--fw-border);
  border-left: 4px solid var(--fw-info);
  border-radius: var(--fw-radius-md);
  color: var(--fw-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: fw-toast-in 300ms ease-out;
  cursor: pointer;
}
.fw-toast--success { border-left-color: var(--fw-success); }
.fw-toast--warning { border-left-color: var(--fw-warning); }
.fw-toast--danger  { border-left-color: var(--fw-danger); }
.fw-toast--info    { border-left-color: var(--fw-info); }
.fw-toast.is-leaving { animation: fw-toast-out 400ms ease forwards; }

@keyframes fw-toast-in {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes fw-toast-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(30px); opacity: 0; }
}

/* --- src/css/18-badges.css --- */
/* frikwork badges */
.fw-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--fw-space-xs);
  padding: 0.2em 0.6em;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--fw-radius-pill);
  background: var(--fw-bg-hover);
  color: var(--fw-text-2);
}
.fw-badge--primary { background: color-mix(in srgb, var(--fw-brand) 12%, transparent); color: var(--fw-brand-text); }
.fw-badge--success { background: color-mix(in srgb, var(--fw-success) 12%, transparent); color: var(--fw-success); }
.fw-badge--warning { background: color-mix(in srgb, var(--fw-warning) 12%, transparent); color: var(--fw-warning); }
.fw-badge--danger  { background: color-mix(in srgb, var(--fw-danger) 12%, transparent); color: var(--fw-danger); }
.fw-badge--info    { background: color-mix(in srgb, var(--fw-info) 12%, transparent); color: var(--fw-info); }

.fw-badge--dot::before {
  content: '';
  width: 0.5em; height: 0.5em;
  border-radius: 50%;
  background: currentColor;
}

/* severity chips */
.fw-sev--critical { background: color-mix(in srgb, var(--fw-sev-critical) 14%, transparent); color: var(--fw-sev-critical); }
.fw-sev--high     { background: color-mix(in srgb, var(--fw-sev-high) 14%, transparent); color: var(--fw-sev-high); }
.fw-sev--medium   { background: color-mix(in srgb, var(--fw-sev-medium) 14%, transparent); color: var(--fw-sev-medium); }
.fw-sev--low      { background: color-mix(in srgb, var(--fw-sev-low) 14%, transparent); color: var(--fw-sev-low); }

/* --- src/css/19-table.css --- */
/* frikwork table */
/* wrap a wide table in .fw-table-wrap so it scrolls horizontally on narrow screens
   instead of overflowing the page: <div class="fw-table-wrap"><table class="fw-table">…</table></div> */
.fw-table-wrap { width: 100%; overflow-x: auto; }
.fw-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.fw-table th {
  text-align: left;
  padding: var(--fw-space-sm) var(--fw-space-md);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fw-text-muted);
  border-bottom: 1px solid var(--fw-border);
}
.fw-table td { padding: var(--fw-space-sm) var(--fw-space-md); border-bottom: 1px solid var(--fw-border); color: var(--fw-text-2); }
.fw-table tbody tr { transition: background var(--fw-dur-fast) ease; }
.fw-table tbody tr:hover { background: var(--fw-bg-hover); }
.fw-table--sticky th { position: sticky; top: 0; background: var(--fw-bg-2); z-index: 1; }

/* column sorting — add data-fw-sort to the <table> and frikwork.js turns every th into
   a sort toggle (per-column data-fw-sort="off|num|date|text"; see 31-tablesort.js) */
th.fw-sort { cursor: pointer; -webkit-user-select: none; user-select: none; }
th.fw-sort::after { content: '↕'; display: inline-block; margin-left: 0.45em; opacity: 0.35; transition: opacity var(--fw-dur-fast) ease; }
th.fw-sort:hover, th.fw-sort[aria-sort] { color: var(--fw-text); }
th.fw-sort:hover::after { opacity: 0.7; }
th.fw-sort[aria-sort="ascending"]::after { content: '↑'; opacity: 1; color: var(--fw-brand-text); }
th.fw-sort[aria-sort="descending"]::after { content: '↓'; opacity: 1; color: var(--fw-brand-text); }

/* --- src/css/20-accordion.css --- */
/* frikwork accordion — native <details> */
.fw-accordion {
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  overflow: hidden;
}
.fw-accordion + .fw-accordion { margin-top: var(--fw-space-sm); }
.fw-accordion > summary {
  display: flex;
  align-items: center;
  gap: var(--fw-space-sm);
  padding: var(--fw-space-md);
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}
.fw-accordion > summary::-webkit-details-marker { display: none; }
.fw-accordion__caret {
  transition: transform var(--fw-dur) ease;
  color: var(--fw-text-muted);
}
.fw-accordion[open] > summary .fw-accordion__caret { transform: rotate(90deg); }
.fw-accordion[open] { border-color: var(--fw-brand); }
.fw-accordion__body { padding: 0 var(--fw-space-md) var(--fw-space-md); color: var(--fw-text-2); }

/* --- src/css/21-progress.css --- */
/* frikwork progress + spinner */
.fw-meter {
  width: 100%;
  height: 6px;
  background: var(--fw-bg-hover);
  border-radius: var(--fw-radius-pill);
  overflow: hidden;
}
.fw-meter__fill {
  height: 100%;
  width: 0;
  background: var(--fw-success);
  border-radius: inherit;
  transition: width var(--fw-dur-slow) ease;
}
.fw-meter__fill--warn { background: var(--fw-warning); }
.fw-meter__fill--critical { background: var(--fw-danger); }

.fw-spinner {
  display: inline-block;
  width: 1.25rem; height: 1.25rem;
  border: 2px solid var(--fw-border);
  border-top-color: var(--fw-brand);
  border-radius: 50%;
  animation: fw-spin 0.7s linear infinite;
}
@keyframes fw-spin { to { transform: rotate(360deg); } }

/* --- src/css/22-tooltip.css --- */
/* frikwork tooltip — JS positions it at the cursor */
.fw-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  padding: var(--fw-space-xs) var(--fw-space-sm);
  background: var(--fw-bg-2);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-sm);
  color: var(--fw-text);
  font-size: 0.76rem;
  box-shadow: var(--fw-shadow-md);
  opacity: 0;
  transition: opacity var(--fw-dur-fast) ease;
}
.fw-tooltip.is-visible { opacity: 1; }

/* --- src/css/23-footer.css --- */
/* frikwork footer */
.fw-footer {
  margin-top: auto;   /* inside a .fw-page flex column, pins the footer to the viewport bottom */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fw-space-md);
  padding: var(--fw-space-md) var(--fw-space-lg);
  border-top: 1px solid var(--fw-border);
  color: var(--fw-text-muted);
  font-size: 0.8rem;
}
.fw-build-tag { cursor: help; font-size: 0.65rem; color: var(--fw-text-muted); }

/* --- src/css/24-misc.css --- */
/* frikwork misc */
.fw-empty {
  text-align: center;
  padding: var(--fw-space-xl);
  color: var(--fw-text-muted);
}
.fw-divider { height: 1px; background: var(--fw-border); border: none; margin: var(--fw-space-md) 0; }

.fw-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--fw-brand); }
.fw-dot--pulse { box-shadow: 0 0 10px color-mix(in srgb, var(--fw-brand) 60%, transparent); animation: fw-pulse 2s ease-in-out infinite; }

@keyframes fw-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- src/css/25-sortable.css --- */
/* frikwork sortable — drag-to-reorder (pointer-based, mouse + touch).
   Opt in with data-fw-sortable on a container; its direct children become reorderable.
   Whole item is draggable by default (items get touch-action:none so a touch-drag works).
   Add a .fw-drag-handle inside each item to restrict the grab to the handle — frikwork then
   marks the container .fw-has-handles so items keep touch scrolling and only the handle drags. */
[data-fw-sortable] > * { touch-action: none; }
[data-fw-sortable].fw-has-handles > * { touch-action: auto; }

.fw-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--fw-text-muted);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.fw-drag-handle:hover { color: var(--fw-text-2); }
.fw-drag-handle:active { cursor: grabbing; }

/* the lifted element while dragging (frikwork sets position:fixed inline) */
.fw-sorting {
  z-index: 800;
  cursor: grabbing;
  box-shadow: var(--fw-shadow-lg);
  opacity: 0.97;
  transform: scale(1.02);
}

/* spacer that holds the drop slot */
.fw-sortable-placeholder {
  border: 2px dashed var(--fw-card-accent, var(--fw-brand));
  border-radius: var(--fw-radius-lg);
  background: color-mix(in srgb, var(--fw-brand) 8%, transparent);
  box-sizing: border-box;
}

/* while a cross-container ("grouped") drag is in progress, every container in the group is a
   valid drop target — outline them so it's obvious where items can go. */
.fw-sortable-dropzone { outline: 2px dashed color-mix(in srgb, var(--fw-brand) 45%, transparent); outline-offset: 4px; border-radius: var(--fw-radius-lg); }

/* --- src/css/26-lightbox.css --- */
/* frikwork lightbox — click an image (data-fw-lightbox) to view it full-screen.
   Group images by giving them the same data-fw-lightbox value for prev/next + arrow keys. */
[data-fw-lightbox] { cursor: zoom-in; }

.fw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--fw-space-xl);
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.fw-lightbox.is-open { display: flex; }

.fw-lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--fw-radius-md);
  box-shadow: var(--fw-shadow-lg);
  object-fit: contain;
  animation: fw-lightbox-in 200ms var(--fw-ease-settle);
}

.fw-lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: var(--fw-space-lg);
  transform: translateX(-50%);
  max-width: 80%;
  text-align: center;
  font-size: 0.875rem;
  color: var(--fw-text);
  background: var(--fw-glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--fw-glass-border);
  padding: var(--fw-space-xs) var(--fw-space-md);
  border-radius: var(--fw-radius-pill);
}
.fw-lightbox__caption[hidden] { display: none; }

.fw-lightbox__close,
.fw-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--fw-radius-pill);
  transition: background var(--fw-dur) ease;
}
.fw-lightbox__close:hover,
.fw-lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }

.fw-lightbox__close { top: var(--fw-space-lg); right: var(--fw-space-lg); width: 2.5rem; height: 2.5rem; font-size: 1.5rem; }
.fw-lightbox__nav { top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; font-size: 1.75rem; }
.fw-lightbox__nav--prev { left: var(--fw-space-lg); }
.fw-lightbox__nav--next { right: var(--fw-space-lg); }
.fw-lightbox__nav[hidden] { display: none; }

@keyframes fw-lightbox-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* --- src/css/27-menu.css --- */
/* frikwork mobile menu — right-slide drawer with drill-down panels (top → sub → sub-sub → …).
   Author writes nested <ul class="fw-menu__list">; frikwork flattens them into sliding panels.
   Trigger with data-fw-toggle="menu" data-fw-target="menuId". */

/* hamburger trigger: shown only on mobile; when the header holds one, the flat nav is replaced */
.fw-menu-trigger { display: none; }
@media (max-width: 640px) {
  .fw-menu-trigger { display: inline-flex; }
  .fw-header:has(.fw-menu-trigger) .fw-navlinks { display: none; }
}

.fw-menu {
  position: fixed;
  inset: 0;
  z-index: 620;
  visibility: hidden;
  transition: visibility 0s linear var(--fw-dur-slow);   /* delay hide until the slide-out finishes */
}
.fw-menu.is-open { visibility: visible; transition-delay: 0s; }

.fw-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--fw-dur) ease;
}
.fw-menu.is-open .fw-menu__backdrop { opacity: 1; }

.fw-menu__drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 86vw);
  display: flex;
  flex-direction: column;
  background: var(--fw-bg-2);
  border-left: 1px solid var(--fw-border);
  box-shadow: var(--fw-shadow-lg);
  transform: translateX(100%);
  transition: transform var(--fw-dur-slow) var(--fw-ease-settle);
}
.fw-menu.is-open .fw-menu__drawer { transform: translateX(0); }

.fw-menu__header {
  display: flex;
  align-items: center;
  gap: var(--fw-space-sm);
  padding: var(--fw-space-sm) var(--fw-space-md);
  min-height: 56px;
  border-bottom: 1px solid var(--fw-border);
}
.fw-menu__title { flex: 1; text-align: center; font-weight: 600; color: var(--fw-text); }
.fw-menu__back, .fw-menu__close {
  width: 2rem; height: 2rem;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fw-text-2);
  border-radius: var(--fw-radius-md);
  font-size: 1.25rem; line-height: 1;
  transition: background var(--fw-dur) ease, color var(--fw-dur) ease;
}
.fw-menu__back:hover, .fw-menu__close:hover { background: var(--fw-bg-hover); color: var(--fw-text); }
.fw-menu__back[hidden] { visibility: hidden; }   /* keep the header layout stable at the root level */

.fw-menu__panels { position: relative; flex: 1; overflow: hidden; }

/* each level is an absolutely-stacked panel; the active one is on screen, parents parked left,
   not-yet-visited children parked right. frikwork toggles the classes. */
.fw-menu__list {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: var(--fw-space-sm);
  list-style: none;
  overflow-y: auto;
  background: var(--fw-bg-2);
  transform: translateX(100%);
  transition: transform var(--fw-dur-slow) var(--fw-ease-settle);
}
.fw-menu__list.is-active { transform: translateX(0); }
.fw-menu__list.is-parent { transform: translateX(-100%); }
.fw-menu__list li { margin: 0; }

.fw-menu__link, .fw-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fw-space-sm);
  width: 100%;
  text-align: left;
  padding: var(--fw-space-md);
  font-size: 0.95rem;
  color: var(--fw-text-2);
  border-radius: var(--fw-radius-md);
  transition: background var(--fw-dur) ease, color var(--fw-dur) ease;
}
.fw-menu__link:hover, .fw-menu__item:hover { background: var(--fw-bg-hover); color: var(--fw-text); text-decoration: none; }
.fw-menu__item::after { content: '›'; font-size: 1.25rem; color: var(--fw-text-muted); }   /* drill-in affordance */

@media (prefers-reduced-motion: reduce) {
  .fw-menu, .fw-menu__backdrop, .fw-menu__drawer, .fw-menu__list { transition-duration: 0.001ms; }
}

/* --- src/css/28-alert.css --- */
/* frikwork alert — static, inline messaging (persistent, unlike the transient .fw-toast).
   <div class="fw-alert fw-alert--warning" role="alert">
     <span class="fw-alert__icon">▲</span>
     <div class="fw-alert__body"><div class="fw-alert__title">Heads up</div>Message text.</div>
     <button class="fw-alert__close" data-fw-dismiss aria-label="Dismiss">×</button>
   </div> */
.fw-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--fw-space-sm);
  padding: var(--fw-space-md);
  border: 1px solid var(--fw-border);
  border-left: 3px solid var(--fw-alert-accent, var(--fw-info));
  border-radius: var(--fw-radius-md);
  background: color-mix(in srgb, var(--fw-alert-accent, var(--fw-info)) 8%, var(--fw-bg-card));
  color: var(--fw-text-2);
  font-size: 0.9rem;
}
.fw-alert__icon { color: var(--fw-alert-accent, var(--fw-info)); flex-shrink: 0; line-height: 1.5; font-weight: 700; }
.fw-alert__body { flex: 1; min-width: 0; }
.fw-alert__title { font-weight: 600; color: var(--fw-text); margin-bottom: 0.15rem; }
.fw-alert__close {
  flex-shrink: 0;
  width: 1.5rem; height: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fw-text-muted);
  border-radius: var(--fw-radius-sm);
  font-size: 1.1rem; line-height: 1;
  transition: background var(--fw-dur) ease, color var(--fw-dur) ease;
}
.fw-alert__close:hover { background: var(--fw-bg-hover); color: var(--fw-text); }

.fw-alert--info    { --fw-alert-accent: var(--fw-info); }
.fw-alert--success { --fw-alert-accent: var(--fw-success); }
.fw-alert--warning { --fw-alert-accent: var(--fw-warning); }
.fw-alert--danger  { --fw-alert-accent: var(--fw-danger); }

/* --- src/css/29-skeleton.css --- */
/* frikwork skeleton — loading placeholders. Give an element .fw-skeleton (optionally a
   modifier) and set width/height, or use .fw-skeleton--text lines. Shimmer respects motion prefs. */
.fw-skeleton {
  display: block;
  background: var(--fw-bg-hover);
  border-radius: var(--fw-radius-sm);
  background-image: linear-gradient(90deg,
    transparent, color-mix(in srgb, var(--fw-text) 8%, transparent), transparent);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: fw-skeleton-shimmer 1.4s ease-in-out infinite;
}
.fw-skeleton--text { height: 0.8em; margin: 0.3em 0; border-radius: var(--fw-radius-pill); }
.fw-skeleton--text:last-child { width: 70%; }
.fw-skeleton--title { height: 1.4em; width: 45%; margin-bottom: 0.6em; border-radius: var(--fw-radius-sm); }
.fw-skeleton--circle { border-radius: 50%; aspect-ratio: 1; width: 3rem; }
.fw-skeleton--btn { height: 2.4rem; width: 6rem; border-radius: var(--fw-radius-md); }

@keyframes fw-skeleton-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fw-skeleton { animation: none; }
}

/* --- src/css/30-avatar.css --- */
/* frikwork avatar — image or initials. <span class="fw-avatar">RA</span> or
   <span class="fw-avatar"><img src="…" alt=""></span>. Group with .fw-avatar-group for a stack. */
.fw-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--fw-bg-hover);
  color: var(--fw-text-2);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  user-select: none;
  border: 1px solid var(--fw-border);
}
.fw-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fw-avatar--sm { width: 1.75rem; height: 1.75rem; font-size: 0.7rem; }
.fw-avatar--lg { width: 3.5rem; height: 3.5rem; font-size: 1.1rem; }
.fw-avatar--brand { background: var(--fw-brand); color: var(--fw-on-primary); border-color: transparent; }

/* status dot */
.fw-avatar[data-fw-status] { position: relative; overflow: visible; }
.fw-avatar[data-fw-status] img { border-radius: 50%; }
.fw-avatar[data-fw-status]::after {
  content: '';
  position: absolute; right: 0; bottom: 0;
  width: 28%; height: 28%;
  border-radius: 50%;
  border: 2px solid var(--fw-bg);
  background: var(--fw-text-muted);
}
.fw-avatar[data-fw-status="online"]::after  { background: var(--fw-success); }
.fw-avatar[data-fw-status="busy"]::after    { background: var(--fw-danger); }
.fw-avatar[data-fw-status="away"]::after     { background: var(--fw-warning); }

/* overlapping group */
.fw-avatar-group { display: inline-flex; }
.fw-avatar-group .fw-avatar { border: 2px solid var(--fw-bg); margin-left: -0.6rem; }
.fw-avatar-group .fw-avatar:first-child { margin-left: 0; }

/* --- src/css/31-pagination.css --- */
/* frikwork pagination — <nav class="fw-pagination"> with .fw-page-link items (a or button).
   Mark the current page .is-active and unavailable steps .is-disabled. */
.fw-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fw-space-xs);
}
.fw-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 var(--fw-space-sm);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--fw-text-2);
  background: var(--fw-bg-card);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  transition: background var(--fw-dur) ease, border-color var(--fw-dur) ease, color var(--fw-dur) ease;
}
.fw-page-link:hover { background: var(--fw-bg-hover); color: var(--fw-text); border-color: var(--fw-text-muted); text-decoration: none; }
.fw-page-link.is-active {
  background: var(--fw-brand);
  border-color: var(--fw-brand);
  color: var(--fw-on-primary);
  font-weight: 600;
}
.fw-page-link.is-disabled { opacity: 0.45; pointer-events: none; }
.fw-page-ellipsis { display: inline-flex; align-items: center; padding: 0 var(--fw-space-xs); color: var(--fw-text-muted); }

/* --- src/css/32-utils.css --- */
/* frikwork utilities — a few high-value helpers (frikwork stays component-first, not utility-first) */

/* visually hidden but available to screen readers (skip links, icon-button labels, etc.) */
.fw-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* responsive show/hide at the mobile breakpoint (≤640px) */
.fw-hide-mobile { }
.fw-show-mobile { display: none !important; }
@media (max-width: 640px) {
  .fw-hide-mobile { display: none !important; }
  .fw-show-mobile { display: revert !important; }
}

/* --- src/css/33-breadcrumb.css --- */
/* frikwork breadcrumb — <nav class="fw-breadcrumb"><a>…</a><a>…</a><span aria-current="page">…</span></nav> */
.fw-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fw-space-xs);
  font-size: 0.85rem;
  color: var(--fw-text-muted);
}
.fw-breadcrumb > * { display: inline-flex; align-items: center; }
.fw-breadcrumb > * + *::before {
  content: '›';
  margin: 0 var(--fw-space-xs);
  color: var(--fw-text-muted);
}
.fw-breadcrumb a { color: var(--fw-text-2); }
.fw-breadcrumb a:hover { color: var(--fw-brand-text); text-decoration: none; }
.fw-breadcrumb [aria-current="page"], .fw-breadcrumb .is-current { color: var(--fw-text); font-weight: 600; }

/* --- src/css/34-steps.css --- */
/* frikwork steps / stepper — <ol class="fw-steps"><li class="fw-step is-done">…</li>…</ol>
   States: .is-done (checked), .is-active (current), default (upcoming). */
.fw-steps {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: fw-step;
}
.fw-step {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--fw-space-sm);
  text-align: center;
  font-size: 0.85rem;
  color: var(--fw-text-muted);
  min-width: 0;
}
.fw-step__dot {
  counter-increment: fw-step;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--fw-bg-card);
  border: 2px solid var(--fw-border);
  color: var(--fw-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1;
}
.fw-step__dot::before { content: counter(fw-step); }
/* connector line between dots */
.fw-step:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 1rem;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--fw-border);
}
.fw-step.is-done { color: var(--fw-text-2); }
.fw-step.is-done .fw-step__dot { background: var(--fw-brand); border-color: var(--fw-brand); color: var(--fw-on-primary); }
.fw-step.is-done .fw-step__dot::before { content: '✓'; }
.fw-step.is-done:not(:first-child)::before,
.fw-step.is-active:not(:first-child)::before { background: var(--fw-brand); }
.fw-step.is-active { color: var(--fw-text); font-weight: 600; }
.fw-step.is-active .fw-step__dot { border-color: var(--fw-brand); color: var(--fw-brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fw-brand) 18%, transparent); }

@media (max-width: 640px) {
  .fw-steps { flex-direction: column; align-items: flex-start; gap: var(--fw-space-md); }
  .fw-step { flex-direction: row; text-align: left; flex: none; width: 100%; }
  .fw-step:not(:first-child)::before { display: none; }
}

/* --- src/css/35-timeline.css --- */
/* frikwork timeline / activity feed — <ul class="fw-timeline"><li class="fw-timeline__item">…</li></ul> */
.fw-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fw-timeline__item {
  position: relative;
  padding: 0 0 var(--fw-space-lg) var(--fw-space-xl);
}
.fw-timeline__item::before {   /* the vertical line */
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 0.35rem;
  bottom: 0;
  width: 2px;
  background: var(--fw-border);
}
.fw-timeline__item:last-child { padding-bottom: 0; }
.fw-timeline__item:last-child::before { display: none; }
.fw-timeline__item::after {    /* the dot */
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--fw-bg);
  border: 2px solid var(--fw-brand);
}
.fw-timeline__item--success::after { border-color: var(--fw-success); }
.fw-timeline__item--warning::after { border-color: var(--fw-warning); }
.fw-timeline__item--danger::after  { border-color: var(--fw-danger); }
.fw-timeline__item--muted::after   { border-color: var(--fw-text-muted); }
.fw-timeline__time { font-size: 0.75rem; color: var(--fw-text-muted); }
.fw-timeline__title { font-weight: 600; color: var(--fw-text); margin: 0.1rem 0 0.2rem; }
.fw-timeline__body { font-size: 0.9rem; color: var(--fw-text-2); }

/* --- src/css/36-drawer.css --- */
/* frikwork drawer — generic off-canvas panel for arbitrary content (settings, details, filters).
   (The mobile nav .fw-menu is a specialised drill-down drawer; this one is for content.)
   <div class="fw-drawer fw-drawer--right" id="d"><div class="fw-drawer__backdrop"></div>
     <div class="fw-drawer__panel">…<button class="fw-drawer__close" data-fw-dismiss>×</button></div></div>
   Open with data-fw-toggle="drawer" data-fw-target="d". */
.fw-drawer {
  position: fixed;
  inset: 0;
  z-index: 615;
  visibility: hidden;
  transition: visibility 0s linear var(--fw-dur-slow);
}
.fw-drawer.is-open { visibility: visible; transition-delay: 0s; }
.fw-drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--fw-dur) ease;
}
.fw-drawer.is-open .fw-drawer__backdrop { opacity: 1; }
.fw-drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 88vw);
  display: flex;
  flex-direction: column;
  gap: var(--fw-space-md);
  padding: var(--fw-space-lg);
  overflow-y: auto;
  background: var(--fw-bg-2);
  border-left: 1px solid var(--fw-border);
  box-shadow: var(--fw-shadow-lg);
  transform: translateX(100%);
  transition: transform var(--fw-dur-slow) var(--fw-ease-settle);
}
.fw-drawer.is-open .fw-drawer__panel { transform: none; }
.fw-drawer--left .fw-drawer__panel { left: 0; right: auto; border-left: none; border-right: 1px solid var(--fw-border); transform: translateX(-100%); }
.fw-drawer--top .fw-drawer__panel { left: 0; right: 0; bottom: auto; width: auto; max-height: 85vh; border: none; border-bottom: 1px solid var(--fw-border); transform: translateY(-100%); }
.fw-drawer--bottom .fw-drawer__panel { left: 0; right: 0; top: auto; width: auto; max-height: 85vh; border: none; border-top: 1px solid var(--fw-border); transform: translateY(100%); }
.fw-drawer__close {
  position: absolute; top: var(--fw-space-md); right: var(--fw-space-md);
  width: 2rem; height: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fw-text-muted); border-radius: var(--fw-radius-sm);
  font-size: 1.25rem; line-height: 1;
}
.fw-drawer__close:hover { background: var(--fw-bg-hover); color: var(--fw-text); }
@media (prefers-reduced-motion: reduce) {
  .fw-drawer, .fw-drawer__backdrop, .fw-drawer__panel { transition-duration: 0.001ms; }
}

/* --- src/css/37-chip.css --- */
/* frikwork chip — compact interactive tag. <span class="fw-chip">Label<button class="fw-chip__remove"
   aria-label="Remove">×</button></span>. Removing fires fw:chipremove and deletes the chip. */
.fw-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--fw-space-xs);
  padding: 0.25rem 0.35rem 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fw-text-2);
  background: var(--fw-bg-hover);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-pill);
  max-width: 100%;
}
.fw-chip--brand   { color: var(--fw-brand-text); background: color-mix(in srgb, var(--fw-brand) 12%, transparent); border-color: transparent; }
.fw-chip--info    { color: var(--fw-info);    background: color-mix(in srgb, var(--fw-info) 14%, transparent); border-color: transparent; }
.fw-chip--danger  { color: var(--fw-danger);  background: color-mix(in srgb, var(--fw-danger) 14%, transparent); border-color: transparent; }
.fw-chip__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  color: inherit;
  opacity: 0.7;
  font-size: 0.9rem;
  line-height: 1;
  transition: background var(--fw-dur) ease, opacity var(--fw-dur) ease;
}
.fw-chip__remove:hover { background: rgba(255, 255, 255, 0.12); opacity: 1; }
.fw-chip__avatar { width: 1.25rem; height: 1.25rem; border-radius: 50%; margin-left: -0.35rem; object-fit: cover; }

/* --- src/css/38-popover.css --- */
/* frikwork popover — click-triggered floating content anchored to a trigger.
   <button data-fw-toggle="popover" data-fw-target="p">Info</button>
   <div class="fw-popover" id="p" data-fw-placement="bottom">…</div>
   frikwork positions it (fixed) and toggles .is-open; outside-click / Esc close it. */
.fw-popover {
  position: fixed;
  top: 0; left: 0;
  z-index: 500;
  min-width: 12rem;
  max-width: min(22rem, 92vw);
  padding: var(--fw-space-md);
  font-size: 0.9rem;
  color: var(--fw-text-2);
  background: var(--fw-bg-card);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  box-shadow: var(--fw-shadow-lg);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity var(--fw-dur) ease, transform var(--fw-dur) ease;
}
.fw-popover.is-open { opacity: 1; transform: none; pointer-events: auto; }
.fw-popover__title { font-weight: 600; color: var(--fw-text); margin-bottom: 0.3rem; }
@media (prefers-reduced-motion: reduce) { .fw-popover { transition: none; } }

/* --- src/css/39-command.css --- */
/* frikwork command palette — searchable overlay (⌘K / Ctrl-K). Filter as you type,
   ↑/↓ to move, Enter to pick (clicks the active .fw-command__item), Esc to close.
   Open with data-fw-toggle="command" data-fw-target, or add data-fw-hotkey to the .fw-command. */
.fw-command {
  position: fixed;
  inset: 0;
  z-index: 640;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh var(--fw-space-lg) var(--fw-space-lg);
}
.fw-command.is-open { display: flex; }
.fw-command__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.fw-command__box {
  position: relative;
  width: min(560px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--fw-bg-card);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-lg);
  box-shadow: var(--fw-shadow-lg);
  overflow: hidden;
  animation: fw-panel-in 180ms var(--fw-ease-settle);
}
.fw-command__input {
  width: 100%;
  padding: var(--fw-space-md) var(--fw-space-lg);
  font-size: 1rem;
  color: var(--fw-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--fw-border);
}
.fw-command__input::placeholder { color: var(--fw-text-muted); }
.fw-command__input:focus { outline: none; }
.fw-command__list { list-style: none; margin: 0; padding: var(--fw-space-xs); overflow-y: auto; }
.fw-command__item {
  display: flex;
  align-items: center;
  gap: var(--fw-space-sm);
  width: 100%;
  text-align: left;
  padding: var(--fw-space-sm) var(--fw-space-md);
  border-radius: var(--fw-radius-md);
  color: var(--fw-text-2);
  font-size: 0.9rem;
}
.fw-command__item[hidden] { display: none; }
.fw-command__item.is-active, .fw-command__item:hover { background: var(--fw-bg-hover); color: var(--fw-text); }
.fw-command__item .fw-command__hint { margin-left: auto; font-size: 0.75rem; color: var(--fw-text-muted); }
.fw-command__empty { padding: var(--fw-space-lg); text-align: center; color: var(--fw-text-muted); font-size: 0.9rem; }

/* --- src/css/40-ring.css --- */
/* frikwork ring — circular/radial progress. <div class="fw-ring" style="--fw-ring-value:68">68%</div>
   Set --fw-ring-value 0–100. Status variants recolour the arc. */
.fw-ring {
  --fw-ring-value: 0;
  --fw-ring-thickness: 0.55rem;
  --fw-ring-color: var(--fw-brand);
  position: relative;
  display: grid;
  place-items: center;
  width: 6rem;
  height: 6rem;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fw-text);
}
.fw-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--fw-ring-color) calc(var(--fw-ring-value) * 1%), var(--fw-bg-hover) 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - var(--fw-ring-thickness)), #000 calc(100% - var(--fw-ring-thickness)));
  mask: radial-gradient(closest-side, transparent calc(100% - var(--fw-ring-thickness)), #000 calc(100% - var(--fw-ring-thickness)));
  transition: background var(--fw-dur-slow) var(--fw-ease-settle);
}
.fw-ring > * { position: relative; z-index: 1; }
.fw-ring--sm { width: 4rem; height: 4rem; font-size: 0.8rem; --fw-ring-thickness: 0.4rem; }
.fw-ring--lg { width: 8.5rem; height: 8.5rem; font-size: 1.4rem; --fw-ring-thickness: 0.7rem; }
.fw-ring--success { --fw-ring-color: var(--fw-success); }
.fw-ring--warning { --fw-ring-color: var(--fw-warning); }
.fw-ring--danger  { --fw-ring-color: var(--fw-danger); }

/* --- src/css/41-combobox.css --- */
/* frikwork combobox — searchable <select> enhancement (like select2). Add data-fw-search to a
   .fw-select; frikwork hides it (still submits + no-JS fallback) and renders a searchable widget.
   Static: filters the <option>s. AJAX: data-fw-search-url="/api?q=" fetches JSON [{value,label}].
   The floating panel is position:fixed (appended to <body>) so it escapes modal/overflow clipping. */
.fw-combobox { position: relative; }
.fw-combobox__native { display: none; }

.fw-combobox__control {
  display: flex;
  align-items: center;
  gap: var(--fw-space-sm);
  width: 100%;
  padding: var(--fw-space-sm) var(--fw-space-md);
  font-size: 0.875rem;
  text-align: left;
  background: var(--fw-bg);
  color: var(--fw-text);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  cursor: pointer;
  transition: border-color var(--fw-dur-fast) ease;
}
.fw-combobox.is-open .fw-combobox__control,
.fw-combobox__control:focus-visible { outline: none; border-color: var(--fw-brand); }
.fw-combobox__value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-combobox__value.is-placeholder { color: var(--fw-text-muted); }
.fw-combobox__clear {
  flex-shrink: 0;
  width: 1.25rem; height: 1.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fw-text-muted);
  border-radius: 50%;
  font-size: 1rem; line-height: 1;
}
.fw-combobox__clear:hover { background: var(--fw-bg-hover); color: var(--fw-text); }
.fw-combobox__clear[hidden] { display: none; }
.fw-combobox__caret { flex-shrink: 0; color: var(--fw-text-muted); transition: transform var(--fw-dur) ease; }
.fw-combobox.is-open .fw-combobox__caret { transform: rotate(180deg); }

.fw-combobox__panel {
  position: fixed;
  z-index: 660;   /* above modal (600) / drawer (615) so it works inside them */
  display: flex;
  flex-direction: column;
  max-height: 320px;
  background: var(--fw-bg-card);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-md);
  box-shadow: var(--fw-shadow-lg);
  overflow: hidden;
  animation: fw-panel-in 140ms var(--fw-ease-settle);
}
.fw-combobox__panel[hidden] { display: none; }
.fw-combobox__search {
  margin: var(--fw-space-sm);
  padding: var(--fw-space-sm) var(--fw-space-md);
  font-size: 0.875rem;
  background: var(--fw-bg);
  color: var(--fw-text);
  border: 1px solid var(--fw-border);
  border-radius: var(--fw-radius-sm);
}
.fw-combobox__search::placeholder { color: var(--fw-text-muted); }
.fw-combobox__search:focus { outline: none; border-color: var(--fw-brand); }
.fw-combobox__list { list-style: none; margin: 0; padding: 0 var(--fw-space-xs) var(--fw-space-xs); overflow-y: auto; }
.fw-combobox__option {
  padding: var(--fw-space-sm) var(--fw-space-md);
  border-radius: var(--fw-radius-sm);
  font-size: 0.875rem;
  color: var(--fw-text-2);
  cursor: pointer;
}
.fw-combobox__option[aria-selected="true"] { color: var(--fw-brand-text); font-weight: 500; }
.fw-combobox__option.is-active, .fw-combobox__option:hover { background: var(--fw-bg-hover); color: var(--fw-text); }
.fw-combobox__status { padding: var(--fw-space-md); text-align: center; color: var(--fw-text-muted); font-size: 0.85rem; }

/* --- src/css/90-motion.css --- */
/* frikwork LIVELY motion tier.
   Opt in by adding data-fw-motion="lively" to any ancestor (usually <html>): every
   .fw-card inside then gains a breathing glow, a rotating border ring, and a drop-in
   entrance. The same effects are also available as explicit per-element modifiers
   (.fw-card--breathe, .fw-card--ring, .fw-anim-drop) when you want one without the
   global toggle. */

/* ---- breathing inner/outer brand glow ---- */
.fw-card--breathe { animation: fw-breathe 7s ease-in-out infinite; }

@keyframes fw-breathe {
  0%, 100% { box-shadow: var(--fw-shadow-glass); }
  50% {
    box-shadow:
      0 8px 40px var(--fw-glass-shadow),
      0 0 32px color-mix(in srgb, var(--fw-brand) 22%, transparent),
      inset 0 0 28px color-mix(in srgb, var(--fw-brand) 7%, transparent);
  }
}

/* ---- lively cards: breathe AND drop in ----
   Combined into one animation list so both run. The drop uses `backwards` fill so that
   AFTER it lands the card reverts to its natural resting state (transform: none) — this
   is what keeps :hover lift working. `backwards` also holds the start frame during the
   stagger delay so waiting cards stay hidden instead of flashing. */
/* Ambient: lively cards breathe (continuous). This is safe to re-apply on AJAX re-renders. */
[data-fw-motion="lively"] .fw-card { animation: fw-breathe 7s ease-in-out infinite; }

/* Entrance drop: fires ONLY inside a [data-fw-entrance] region, so it plays on page load —
   not on every AJAX re-render (remove the attribute after the first render). Breathe + drop
   are one animation list so both run. The drop is reverse-staggered via --fw-drop-i (0 = drops
   first) so a grid fills LAST-to-FIRST / bottom-to-top: set --fw-drop-i inline per card =
   (count - 1 - index) for dynamic grids, or lean on the nth-last-child fallback below for
   small static grids. --fw-drop-step tunes the gap (default 40ms; lower it for dense grids). */
[data-fw-motion="lively"] [data-fw-entrance] .fw-card {
  animation:
    fw-breathe 7s ease-in-out infinite,
    fw-drop 1.05s var(--fw-ease-settle) backwards;
  animation-delay: 0s, calc(var(--fw-drop-i, 0) * var(--fw-drop-step, 40ms));
}
[data-fw-motion="lively"] [data-fw-entrance] .fw-card:nth-last-child(1) { --fw-drop-i: 0; }
[data-fw-motion="lively"] [data-fw-entrance] .fw-card:nth-last-child(2) { --fw-drop-i: 1; }
[data-fw-motion="lively"] [data-fw-entrance] .fw-card:nth-last-child(3) { --fw-drop-i: 2; }
[data-fw-motion="lively"] [data-fw-entrance] .fw-card:nth-last-child(4) { --fw-drop-i: 3; }
[data-fw-motion="lively"] [data-fw-entrance] .fw-card:nth-last-child(5) { --fw-drop-i: 4; }
[data-fw-motion="lively"] [data-fw-entrance] .fw-card:nth-last-child(6) { --fw-drop-i: 5; }
[data-fw-motion="lively"] [data-fw-entrance] .fw-card:nth-last-child(7) { --fw-drop-i: 6; }
[data-fw-motion="lively"] [data-fw-entrance] .fw-card:nth-last-child(8) { --fw-drop-i: 7; }

/* explicit one-shot drop opt-in (backwards fill; honours --fw-drop-i for staggering) */
.fw-anim-drop {
  animation: fw-drop 1.05s var(--fw-ease-settle) backwards;
  animation-delay: calc(var(--fw-drop-i, 0) * var(--fw-drop-step, 40ms));
}

@keyframes fw-drop {
  0%   { opacity: 0; transform: translateY(-170px) scale(0.9) rotate(0deg); }
  42%  { opacity: 1; transform: translateY(0) scale(1.05, 0.9) rotate(0deg); }
  55%  { transform: translateY(-9px) scale(0.97, 1.05) rotate(-2.5deg); }
  66%  { transform: translateY(3px) scale(1.02, 0.98) rotate(2deg); }
  76%  { transform: translateY(-3px) scale(1, 1.01) rotate(-1.2deg); }
  86%  { transform: translateY(1px) rotate(0.7deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}

/* ---- rotating conic-gradient border ring ----
   A center-emanating conic gradient maps its angular span onto a rectangle's
   perimeter unevenly, so a single thin highlight visibly compresses on the short
   edges and stretches on the long ones (badly on wide cards). Fix: TWO broad, soft
   lobes 180deg apart with gentle alpha ramps (no sharp edge to track), so the glow
   reads as an even travelling sheen rather than a lurching dot. Two lobes also make
   the pattern repeat every half-turn, so it feels ~2x livelier at the same speed. */
.fw-card--ring::before,
[data-fw-motion="lively"] .fw-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--fw-card-angle),
    transparent 0deg,
    color-mix(in srgb, var(--fw-brand) 90%, transparent) 50deg,
    color-mix(in srgb, var(--fw-brand-2) 55%, transparent) 90deg,
    transparent 140deg,
    transparent 180deg,
    color-mix(in srgb, var(--fw-brand) 90%, transparent) 230deg,
    color-mix(in srgb, var(--fw-brand-2) 55%, transparent) 270deg,
    transparent 320deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: fw-border-glow 8s linear infinite;
  pointer-events: none;
}
@keyframes fw-border-glow { to { --fw-card-angle: 360deg; } }
/* desynchronize adjacent rings so they don't travel in lockstep (uneven offsets < 8s) */
[data-fw-motion="lively"] .fw-card:nth-child(1)::before, .fw-card--ring:nth-child(1)::before { animation-delay: -1.6s; }
[data-fw-motion="lively"] .fw-card:nth-child(2)::before, .fw-card--ring:nth-child(2)::before { animation-delay: -5.2s; }
[data-fw-motion="lively"] .fw-card:nth-child(3)::before, .fw-card--ring:nth-child(3)::before { animation-delay: -0.9s; }
[data-fw-motion="lively"] .fw-card:nth-child(4)::before, .fw-card--ring:nth-child(4)::before { animation-delay: -3.7s; }

/* ---- active tab: subtle breathing glow in lively mode ----
   A gentle glow (no rotating ring) so it reads as "alive" at any tab size without the
   busy look a ring gives on a small pill. */
[data-fw-motion="lively"] .fw-tab.is-active { animation: fw-tab-glow 4s ease-in-out infinite; }
@keyframes fw-tab-glow {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50%      { box-shadow: 0 0 14px -2px color-mix(in srgb, var(--fw-brand) 50%, transparent); }
}

/* ---- card-tabs: only the ACTIVE tab goes lively (a selector, not content) ---- */
[data-fw-motion="lively"] .fw-cardtab.is-active { animation: fw-breathe 7s ease-in-out infinite; }
[data-fw-motion="lively"] .fw-cardtab.is-active::before {
  content: ''; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit;
  background: conic-gradient(from var(--fw-card-angle),
    transparent 0deg, color-mix(in srgb, var(--fw-brand) 90%, transparent) 50deg, color-mix(in srgb, var(--fw-brand-2) 55%, transparent) 90deg, transparent 140deg,
    transparent 180deg, color-mix(in srgb, var(--fw-brand) 90%, transparent) 230deg, color-mix(in srgb, var(--fw-brand-2) 55%, transparent) 270deg, transparent 320deg, transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude;
  animation: fw-border-glow 8s linear infinite; pointer-events: none;
}

/* ---- idle "still here" wobble (explicit opt-in) ---- */
.fw-anim-wobble { animation: fw-settle-wobble 1.4s var(--fw-ease-settle); }
@keyframes fw-settle-wobble {
  0%       { transform: translateY(0) scale(1) rotate(0deg); }
  9%       { transform: translateY(-9px) scale(0.97, 1.05) rotate(-2.5deg); }
  19%      { transform: translateY(3px) scale(1.02, 0.98) rotate(2deg); }
  29%      { transform: translateY(-3px) scale(1, 1.01) rotate(-1.2deg); }
  37%      { transform: translateY(1px) rotate(0.7deg); }
  45%, 100%{ transform: translateY(0) scale(1) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  [data-fw-motion="lively"] .fw-card,
  [data-fw-motion="lively"] .fw-card::before,
  [data-fw-motion="lively"] .fw-tab.is-active,
  [data-fw-motion="lively"] .fw-cardtab.is-active,
  [data-fw-motion="lively"] .fw-cardtab.is-active::before,
  .fw-card--breathe,
  .fw-card--ring::before,
  .fw-anim-drop,
  .fw-anim-wobble {
    animation: none !important;
  }
}
