/* AlloyPanel webfonts.
   IBM Plex Sans — UI + headings (engineered, professional, open SIL OFL license).
   IBM Plex Mono — server values: domains, IPs, paths, code.
   Loaded from Google Fonts CDN. If you need self-hosted binaries, download the
   IBM Plex families from https://github.com/IBM/plex and replace this @import
   with local @font-face rules. */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
/* ============================================================
   AlloyPanel — Color system
   "Alloy": steel-blue primary, cool zinc neutrals, copper accent.
   Restrained, utilitarian, high-contrast for accessibility.
   ============================================================ */
:root {
  /* ---- Base ramps ---------------------------------------- */

  /* Cool zinc / slate neutrals */
  --zinc-50:  #f6f8fa;
  --zinc-100: #eceff3;
  --zinc-200: #dde2e8;
  --zinc-300: #c7ced7;
  --zinc-400: #9aa4b1;
  --zinc-500: #6b7682;
  --zinc-600: #4d5763;
  --zinc-700: #39424d;
  --zinc-800: #283039;
  --zinc-900: #1a2026;
  --zinc-950: #11161b;

  /* Steel blue — the brand primary */
  --blue-50:  #eaf2fa;
  --blue-100: #cee2f4;
  --blue-200: #a3c8e8;
  --blue-300: #6fa6d6;
  --blue-400: #3e83be;
  --blue-500: #1f6fb2;
  --blue-600: #1a5c95;
  --blue-700: #164b79;
  --blue-800: #133d62;
  --blue-900: #0f2e49;

  /* Copper — warm metal accent, used sparingly */
  --copper-50:  #fbf1ea;
  --copper-100: #f1d9c7;
  --copper-300: #d49b72;
  --copper-500: #b26a3c;
  --copper-700: #8a4f2b;

  /* Semantic hues */
  --green-50:  #e7f3ec;
  --green-100: #c6e3d1;
  --green-500: #2f855a;
  --green-600: #276749;
  --green-700: #1f5138;

  --amber-50:  #fbf3e1;
  --amber-100: #f4e2b8;
  --amber-500: #b7791f;
  --amber-600: #946115;

  --red-50:  #fbeaea;
  --red-100: #f3c9c9;
  --red-500: #c53030;
  --red-600: #9b2c2c;
  --red-700: #7a2222;

  /* ---- Semantic aliases ---------------------------------- */

  /* Surfaces */
  --surface-page:    var(--zinc-100);   /* app background */
  --surface-card:    #ffffff;           /* panels, cards, tables */
  --surface-sunken:  var(--zinc-50);    /* insets, table stripes, code blocks */
  --surface-raised:  #ffffff;           /* menus, popovers */
  --surface-header:  var(--zinc-900);   /* top bar / brand bar */
  --surface-nav:     var(--zinc-800);   /* left sidebar */
  --surface-nav-active: var(--zinc-900);

  /* Borders & dividers */
  --border-subtle:   var(--zinc-200);
  --border-default:  var(--zinc-300);
  --border-strong:   var(--zinc-400);
  --border-focus:    var(--blue-500);

  /* Text */
  --text-strong:   var(--zinc-900);
  --text-body:     var(--zinc-700);
  --text-muted:    var(--zinc-500);
  --text-faint:    var(--zinc-400);
  --text-inverse:  #ffffff;
  --text-link:     var(--blue-600);

  /* Brand */
  --brand:        var(--blue-500);
  --brand-hover:  var(--blue-600);
  --brand-active: var(--blue-700);
  --brand-fg:     #ffffff;
  --brand-tint:   var(--blue-50);

  /* Accent */
  --accent:       var(--copper-500);
  --accent-hover: var(--copper-700);
  --accent-tint:  var(--copper-50);

  /* Status — text/icon foreground, surface tint, and border each */
  --success:         var(--green-600);
  --success-surface: var(--green-50);
  --success-border:  var(--green-100);

  --warning:         var(--amber-600);
  --warning-surface: var(--amber-50);
  --warning-border:  var(--amber-100);

  --danger:          var(--red-600);
  --danger-surface:  var(--red-50);
  --danger-border:   var(--red-100);

  --info:            var(--blue-600);
  --info-surface:    var(--blue-50);
  --info-border:     var(--blue-100);

  /* Focus ring */
  --ring: 0 0 0 3px rgba(31, 111, 178, 0.35);
}
/* ============================================================
   AlloyPanel — Typography
   IBM Plex Sans for UI & headings; IBM Plex Mono for server values.
   Conservative scale, generous line-height, accessible sizes
   (14px minimum body in dense tables; 16px default).
   ============================================================ */
:root {
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Weights */
  --fw-regular:  400; /* @kind font */
  --fw-medium:   500; /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold:     700; /* @kind font */

  /* Type scale (px) — restrained, utilitarian */
  --text-xs:   12px;   /* metadata, table captions */
  --text-sm:   13px;   /* dense table cells, helper text */
  --text-base: 14px;   /* default UI text */
  --text-md:   15px;   /* comfortable body */
  --text-lg:   17px;   /* card titles */
  --text-xl:   20px;   /* section headings */
  --text-2xl:  24px;   /* page titles */
  --text-3xl:  30px;   /* dashboard stat figures */
  --text-4xl:  38px;   /* hero figures */

  /* Line heights */
  --leading-tight:   1.2;
  --leading-snug:    1.35;
  --leading-normal:  1.5;
  --leading-relaxed: 1.65;

  /* Letter spacing */
  --tracking-tight:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.02em;
  --tracking-caps:   0.06em;   /* uppercase nav/section labels */
}
/* ============================================================
   AlloyPanel — Spacing, radii, sizing
   4px base grid. Tight, dense layouts (control-panel ergonomics).
   ============================================================ */
:root {
  /* Spacing scale (4px base) */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Corner radii — small. This is utilitarian software, not a rounded app. */
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-full: 999px;

  /* Control heights */
  --control-sm: 28px;
  --control-md: 34px;
  --control-lg: 40px;

  /* Layout */
  --sidebar-width: 230px;
  --header-height: 52px;
  --container-max: 1320px;
}
/* ============================================================
   AlloyPanel — Elevation & borders
   Shadows are subtle and short. Most separation comes from
   hairline borders, not big soft glows. Keep it crisp.
   ============================================================ */
:root {
  /* Hairline borders */
  --border-width: 1px;

  /* Shadows — short, low-spread, cool-tinted */
  --shadow-xs: 0 1px 0 rgba(26, 32, 38, 0.04);
  --shadow-sm: 0 1px 2px rgba(26, 32, 38, 0.08), 0 0 0 1px rgba(26, 32, 38, 0.03);
  --shadow-md: 0 2px 4px rgba(26, 32, 38, 0.10), 0 1px 2px rgba(26, 32, 38, 0.06);
  --shadow-lg: 0 6px 16px rgba(26, 32, 38, 0.14), 0 2px 4px rgba(26, 32, 38, 0.08);
  --shadow-inset: inset 0 1px 2px rgba(26, 32, 38, 0.08);

  /* Standard card framing */
  --card-border: 1px solid var(--border-subtle);
  --card-shadow: var(--shadow-sm);
}
/* ============================================================
   AlloyPanel — Base resets & primitives
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--text-strong);
  font-weight: var(--fw-semibold);
  line-height: var(--leading-snug);
}

p { margin: 0; }

a {
  color: var(--text-link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

/* Uppercase section label used throughout the panels */
.ap-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}

.ap-mono { font-family: var(--font-mono); }

/* Material Symbols base (loaded via CDN where used) */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  user-select: none;
}

/* Thin, neutral scrollbars for panel chrome */
.ap-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.ap-scroll::-webkit-scrollbar-thumb {
  background: var(--zinc-300);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: content-box;
}
.ap-scroll::-webkit-scrollbar-thumb:hover { background: var(--zinc-400); }
/* ============================================================
   AlloyPanel — core component styles
   Class-based so components get real :hover / :focus / :active
   states. All values come from tokens. Imported by styles.css.
   ============================================================ */

/* ---------- Button ---------------------------------------- */
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-md);
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 130ms ease, border-color 130ms ease, color 130ms ease;
  text-decoration: none;
}
.ap-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.ap-btn[disabled], .ap-btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; pointer-events: none;
}
.ap-btn .material-symbols-rounded { font-size: 20px; }

.ap-btn--sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: var(--text-sm); }
.ap-btn--lg { height: var(--control-lg); padding: 0 var(--space-5); font-size: var(--text-md); }

.ap-btn--primary { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); }
.ap-btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.ap-btn--primary:active { background: var(--brand-active); border-color: var(--brand-active); }

.ap-btn--secondary { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-default); }
.ap-btn--secondary:hover { background: var(--zinc-50); border-color: var(--border-strong); }
.ap-btn--secondary:active { background: var(--zinc-100); }

.ap-btn--ghost { background: transparent; color: var(--text-body); border-color: transparent; }
.ap-btn--ghost:hover { background: var(--zinc-100); }
.ap-btn--ghost:active { background: var(--zinc-200); }

.ap-btn--danger { background: var(--red-500); color: #fff; border-color: var(--red-500); }
.ap-btn--danger:hover { background: var(--red-600); border-color: var(--red-600); }
.ap-btn--danger:active { background: var(--red-700); border-color: var(--red-700); }

/* ---------- Icon button ----------------------------------- */
.ap-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--control-md); height: var(--control-md);
  border: 1px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: background-color 130ms ease, color 130ms ease;
}
.ap-iconbtn:hover { background: var(--zinc-100); color: var(--text-strong); }
.ap-iconbtn:active { background: var(--zinc-200); }
.ap-iconbtn:focus-visible { outline: none; box-shadow: var(--ring); }
.ap-iconbtn--sm { width: var(--control-sm); height: var(--control-sm); }
.ap-iconbtn--solid { background: var(--surface-card); border-color: var(--border-default); }
.ap-iconbtn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Input ----------------------------------------- */
.ap-field { display: flex; flex-direction: column; gap: var(--space-1); }
.ap-label { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-body); }
.ap-label__req { color: var(--danger); margin-left: 2px; }
.ap-help { font-size: var(--text-xs); color: var(--text-muted); }
.ap-help--error { color: var(--danger); }

.ap-input, .ap-select {
  height: var(--control-md);
  padding: 0 var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-strong);
  width: 100%;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.ap-input::placeholder { color: var(--text-faint); }
.ap-input:hover, .ap-select:hover { border-color: var(--border-strong); }
.ap-input:focus, .ap-select:focus { outline: none; border-color: var(--border-focus); box-shadow: var(--ring); }
.ap-input[aria-invalid="true"] { border-color: var(--danger); }
.ap-input[disabled], .ap-select[disabled] { background: var(--zinc-50); color: var(--text-muted); cursor: not-allowed; }
.ap-input--mono { font-family: var(--font-mono); }

.ap-inputwrap { position: relative; display: flex; align-items: center; }
.ap-inputwrap .material-symbols-rounded {
  position: absolute; left: var(--space-3); color: var(--text-faint); font-size: 20px; pointer-events: none;
}
.ap-inputwrap .ap-input { padding-left: 38px; }

.ap-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7682' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
  cursor: pointer;
}

/* ---------- Checkbox & switch ------------------------------ */
.ap-check { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: var(--text-base); color: var(--text-body); }
.ap-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.ap-check__box {
  width: 18px; height: 18px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface-card);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color 120ms ease, border-color 120ms ease; flex: none;
}
.ap-check__box .material-symbols-rounded { font-size: 16px; color: #fff; opacity: 0; }
.ap-check input:checked + .ap-check__box { background: var(--brand); border-color: var(--brand); }
.ap-check input:checked + .ap-check__box .material-symbols-rounded { opacity: 1; }
.ap-check input:focus-visible + .ap-check__box { box-shadow: var(--ring); }

.ap-switch { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.ap-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ap-switch__track {
  width: 38px; height: 22px; border-radius: var(--radius-full);
  background: var(--zinc-300); position: relative; transition: background-color 140ms ease; flex: none;
}
.ap-switch__knob {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 140ms ease;
}
.ap-switch input:checked + .ap-switch__track { background: var(--green-600); }
.ap-switch input:checked + .ap-switch__track .ap-switch__knob { transform: translateX(16px); }
.ap-switch input:focus-visible + .ap-switch__track { box-shadow: var(--ring); }

/* ---------- Badge & status dot ---------------------------- */
.ap-badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  height: 20px; padding: 0 var(--space-2);
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  letter-spacing: 0.01em; white-space: nowrap;
}
.ap-badge--neutral { background: var(--zinc-100); color: var(--zinc-700); border-color: var(--zinc-200); }
.ap-badge--brand   { background: var(--brand-tint); color: var(--blue-700); border-color: var(--blue-100); }
.ap-badge--success { background: var(--success-surface); color: var(--success); border-color: var(--success-border); }
.ap-badge--warning { background: var(--warning-surface); color: var(--warning); border-color: var(--warning-border); }
.ap-badge--danger  { background: var(--danger-surface); color: var(--danger); border-color: var(--danger-border); }

.ap-dot { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-body); }
.ap-dot__mark { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ap-dot--success .ap-dot__mark { background: var(--green-600); }
.ap-dot--warning .ap-dot__mark { background: var(--amber-500); }
.ap-dot--danger  .ap-dot__mark { background: var(--red-500); }
.ap-dot--neutral .ap-dot__mark { background: var(--zinc-400); }

/* ---------- Card ------------------------------------------ */
.ap-card { background: var(--surface-card); border: var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); }
.ap-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-subtle);
}
.ap-card__title { font-size: var(--text-lg); font-weight: var(--fw-semibold); color: var(--text-strong); }
.ap-card__body { padding: var(--space-5); }
.ap-card__body--flush { padding: 0; }

/* ---------- Alert ----------------------------------------- */
.ap-alert {
  display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border: 1px solid; border-radius: var(--radius-md); font-size: var(--text-base);
}
.ap-alert .material-symbols-rounded { font-size: 20px; flex: none; margin-top: 1px; }
.ap-alert__title { font-weight: var(--fw-semibold); color: var(--text-strong); }
.ap-alert--info    { background: var(--info-surface); border-color: var(--info-border); color: var(--text-body); }
.ap-alert--info .material-symbols-rounded { color: var(--info); }
.ap-alert--success { background: var(--success-surface); border-color: var(--success-border); color: var(--text-body); }
.ap-alert--success .material-symbols-rounded { color: var(--success); }
.ap-alert--warning { background: var(--warning-surface); border-color: var(--warning-border); color: var(--text-body); }
.ap-alert--warning .material-symbols-rounded { color: var(--warning); }
.ap-alert--danger  { background: var(--danger-surface); border-color: var(--danger-border); color: var(--text-body); }
.ap-alert--danger .material-symbols-rounded { color: var(--danger); }

/* ---------- Tabs ------------------------------------------ */
.ap-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border-default); }
.ap-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: var(--space-3) var(--space-3); margin-bottom: -1px;
  font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--fw-medium);
  color: var(--text-muted); border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.ap-tab:hover { color: var(--text-strong); }
.ap-tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: var(--fw-semibold); }

/* ---------- Progress / usage meter ------------------------ */
.ap-meter { display: flex; flex-direction: column; gap: var(--space-2); }
.ap-meter__top { display: flex; justify-content: space-between; font-size: var(--text-sm); }
.ap-meter__track { height: 8px; border-radius: var(--radius-full); background: var(--zinc-200); overflow: hidden; }
.ap-meter__fill { height: 100%; border-radius: var(--radius-full); background: var(--brand); transition: width 300ms ease; }
.ap-meter__fill--warning { background: var(--amber-500); }
.ap-meter__fill--danger { background: var(--red-500); }

/* ---------- Stat card ------------------------------------- */
.ap-stat { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-5); background: var(--surface-card); border: var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); }
.ap-stat__label { font-size: var(--text-xs); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted); }
.ap-stat__row { display: flex; align-items: baseline; gap: var(--space-2); }
.ap-stat__value { font-size: var(--text-3xl); font-weight: var(--fw-semibold); color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1; }
.ap-stat__unit { font-size: var(--text-md); color: var(--text-muted); }
.ap-stat__delta { display: inline-flex; align-items: center; gap: 2px; font-size: var(--text-xs); font-weight: var(--fw-semibold); }
.ap-stat__delta--up { color: var(--green-600); }
.ap-stat__delta--down { color: var(--red-600); }

/* ---------- Table ----------------------------------------- */
.ap-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.ap-table thead th {
  text-align: left; padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--text-muted);
  background: var(--surface-sunken); border-bottom: 1px solid var(--border-default);
}
.ap-table tbody td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle); color: var(--text-body); }
.ap-table tbody tr:hover { background: var(--zinc-50); }
.ap-table tbody tr:last-child td { border-bottom: none; }
.ap-table td.ap-mono, .ap-table td .ap-mono { font-family: var(--font-mono); color: var(--text-strong); }

/* ---------- Breadcrumb ------------------------------------ */
.ap-crumbs { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.ap-crumbs a { color: var(--text-muted); }
.ap-crumbs a:hover { color: var(--text-link); }
.ap-crumbs__sep { color: var(--text-faint); }
.ap-crumbs__current { color: var(--text-strong); font-weight: var(--fw-medium); }

/* ---------- Avatar ---------------------------------------- */
.ap-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue-600); color: #fff; font-weight: var(--fw-semibold); font-size: var(--text-sm); width: 32px; height: 32px; flex: none; overflow: hidden; }
.ap-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- app shell ---- */
.ap-appbar {
  height: var(--header-height);
  background: var(--surface-header);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
}
.ap-appbar a { color: var(--text-inverse); }
.ap-appbar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--fw-semibold);
  color: var(--text-inverse);
}
.ap-appbar__brand img { width: 24px; height: 24px; }
.ap-appbar__spacer { margin-left: auto; }
.ap-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}
.ap-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.ap-nav a {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-card);
  border: var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-weight: var(--fw-medium);
}
.ap-nav a:hover { border-color: var(--border-strong); text-decoration: none; }
