/* ==========================================================================
   batmanUX — shadcn/ui design system, dark mode (neutral base)
   --------------------------------------------------------------------------
   Token system from shadcn/ui theming docs (neutral .dark scaffold),
   oklch values converted to hex for browser compatibility.
   Dark-only: tokens live on :root; <html> carries class="dark".
   Strict shadcn adherence (JJ): no custom components or decorative variants —
   every component below maps 1:1 to a shadcn/ui component (button, card,
   badge, input, tabs, table, alert, avatar, separator, skeleton, sidebar).
   The ONLY exception is the bat logo artwork itself, which JJ explicitly
   requested (inline SVG in base.html, amber #f5b301 fill).
   Fonts (self-hosted, no CDN):
     - "Inter Display" — Latin/English (static woff2 400/500/600/700)
     - "Yati Sans"     — Myanmar (variable ttf); per-character fallback
   Typography (JJ): font-feature-settings
     ('ss01','cv05','cv06','cv08','cv11') applied to Inter Display text globally
     via --font-feature-settings; headings use shadcn's own type scale.
   ========================================================================== */

/* ------------------------------------------------------------ fonts */
@font-face {
  font-family: "Inter Display";
  src: url("/static/fonts/InterDisplay-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("/static/fonts/InterDisplay-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("/static/fonts/InterDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("/static/fonts/InterDisplay-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Yati Sans";
  src: url("/static/fonts/Yati_Sans_Variation.ttf") format("truetype-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ------------------------------------------------------------ tokens */
:root {
  --radius: 0.625rem;

  --background: #0a0a0a;
  --foreground: #fafafa;

  --card: #171717;
  --card-foreground: #fafafa;

  --popover: #171717;
  --popover-foreground: #fafafa;

  --primary: #e5e5e5;
  --primary-foreground: #171717;

  --secondary: #262626;
  --secondary-foreground: #fafafa;

  --muted: #262626;
  --muted-foreground: #a1a1a1;

  --accent: #262626;
  --accent-foreground: #fafafa;

  --destructive: #ff6467;
  --destructive-foreground: #fafafa;

  --border: rgba(255, 255, 255, 0.10);
  --input: rgba(255, 255, 255, 0.15);
  --ring: #737373;

  --sidebar: #171717;
  --sidebar-foreground: #fafafa;
  --sidebar-accent: #262626;
  --sidebar-accent-foreground: #fafafa;
  --sidebar-border: rgba(255, 255, 255, 0.10);

  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);

  /* typography (JJ): Inter Display feature settings, applied globally */
  --font-feature-settings: 'ss01' on, 'cv05' on, 'cv06' on, 'cv08' on, 'cv11' on;
  --font-sans: "Inter Display", "Yati Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: var(--font-feature-settings);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Section heading — shadcn type scale (text-2xl font-semibold tracking-tight) */
.h-section {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 2rem;
  font-feature-settings: var(--font-feature-settings);
  margin: 0 0 1.1rem;
}
.h-section .sub { color: var(--muted-foreground); font-size: 0.9rem; font-weight: 400; letter-spacing: 0; }

/* ---------------------------------------------------------------- layout */
.layout { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 2rem; max-width: 1200px; width: 100%; margin: 0 auto; }
@media (max-width: 640px) { .content { padding: 1.25rem; } }

/* ---------------------------------------------------------------- sidebar */
.sidebar {
  width: 16.5rem; flex-shrink: 0;
  background: var(--sidebar); color: var(--sidebar-foreground);
  border-right: 1px solid var(--sidebar-border);
  height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column;
  padding: 1rem 0.75rem; gap: 0.15rem;
  overflow-y: auto; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 0.65rem; padding: 0.35rem 0.5rem 1rem; text-decoration: none; }
.brand svg { width: 34px; height: 22px; flex-shrink: 0; }
.brand-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.nav-sec {
  padding: 1rem 0.5rem 0.3rem;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--muted-foreground);
}
.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  width: 100%; padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem; color: var(--sidebar-foreground);
  text-decoration: none; border: 0; background: transparent; cursor: pointer;
  position: relative; font-family: var(--font-sans);
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); text-decoration: none; }
.nav-item.active { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); font-weight: 500; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--sidebar-border); }
.user-chip { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; }
.user-chip .nm { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .rl { font-size: 0.72rem; color: var(--muted-foreground); text-transform: capitalize; }
.scrim { display: none; }
.burger { display: none; }

/* --------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.7rem 1.5rem;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.crumb { font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.search { position: relative; margin-left: auto; width: min(340px, 40vw); }
.search svg {
  position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted-foreground); pointer-events: none;
}
.search input { padding-left: 2.2rem; }

/* ------------------------------------------------------- shadcn: button */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; white-space: nowrap;
  border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 500; font-family: var(--font-sans);
  font-feature-settings: var(--font-feature-settings);
  height: 2.25rem; padding: 0 1rem;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  background: var(--primary); color: var(--primary-foreground);
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.btn:hover { background: color-mix(in srgb, var(--primary) 90%, transparent); text-decoration: none; }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-sm, .btn.small { height: 2rem; padding: 0 0.75rem; font-size: 0.8rem; }
.btn-lg { height: 2.5rem; padding: 0 2rem; }
.btn-icon { height: 2.25rem; width: 2.25rem; padding: 0; }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { background: color-mix(in srgb, var(--secondary) 80%, transparent); }
.btn-outline {
  background: var(--background); color: var(--foreground);
  border-color: var(--input);
}
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-ghost { background: transparent; color: var(--foreground); box-shadow: none; }
.btn-ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-destructive, .btn.danger { background: var(--destructive); color: #fff; }
.btn-destructive:hover, .btn.danger:hover { background: color-mix(in srgb, var(--destructive) 90%, transparent); }
.btn-link { background: transparent; border: 0; box-shadow: none; color: var(--primary); height: auto; padding: 0; text-underline-offset: 4px; }
.btn-link:hover { text-decoration: underline; background: transparent; }
.btn.block { width: 100%; }
a.btn { text-decoration: none; }

.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; height: 2.5rem; padding: 0 1rem;
  border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500;
  font-family: var(--font-sans);
  background: var(--background); color: var(--foreground);
  border: 1px solid var(--input); box-shadow: 0 1px 2px rgba(0,0,0,.4);
  text-decoration: none; transition: background 0.15s;
}
.google-btn:hover { background: var(--accent); text-decoration: none; }

/* --------------------------------------------------------- shadcn: card */
.card {
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px rgba(0,0,0,.35);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.card-hover:hover { border-color: rgba(255,255,255,.2); transform: translateY(-2px); }
.card-header { display: flex; flex-direction: column; gap: 0.375rem; padding: 1.5rem 1.5rem 0; }
.card-title { font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; font-size: 1.05rem; margin: 0; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-description { font-size: 0.875rem; color: var(--muted-foreground); }
.card-content { padding: 1.5rem; padding-top: 0.75rem; }
.card-footer { display: flex; align-items: center; padding: 0 1.5rem 1.5rem; gap: 0.75rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.25rem; }

.card-top {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 1rem 1.25rem 0; font-size: 0.75rem; color: var(--muted-foreground);
}
.card-top .mins { margin-left: auto; white-space: nowrap; }
.card h3 { padding: 0.55rem 1.25rem 0; margin: 0; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cover { margin: 0.9rem 1.25rem 0; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/9; background: var(--muted); }
.cover svg { width: 100%; height: 100%; display: block; }
.card-foot { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.25rem 1.25rem; margin-top: auto; }
.views { font-size: 0.78rem; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 0.3rem; }

/* --------------------------------------------------------- shadcn: badge */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  border-radius: var(--radius-md); border: 1px solid transparent;
  padding: 0.15rem 0.6rem; font-size: 0.72rem; font-weight: 600; line-height: 1.4;
  background: var(--primary); color: var(--primary-foreground);
  white-space: nowrap; font-family: var(--font-sans);
}
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-destructive { background: var(--destructive); color: #fff; }
.badge-outline { background: transparent; color: var(--foreground); border-color: var(--border); }
/* status badges map to shadcn variants only: secondary / outline / default / destructive */
.badge.draft { background: var(--secondary); color: var(--secondary-foreground); }
.badge.review { background: transparent; color: var(--foreground); border-color: var(--border); }
.badge.published { background: var(--primary); color: var(--primary-foreground); }
.badge.rejected { background: var(--destructive); color: #fff; }

/* -------------------------------------------------- shadcn: input/form */
.field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }
.field label { font-size: 0.875rem; font-weight: 500; }
.hint { font-size: 0.78rem; color: var(--muted-foreground); }
.input, .search input, input[type="text"], input[type="search"],
input[type="email"], input[type="number"], input[type="password"],
textarea, select {
  width: 100%; border-radius: var(--radius-md);
  border: 1px solid var(--input); background: transparent;
  padding: 0.5rem 0.75rem; font-size: 0.875rem; color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
  font-family: var(--font-sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a1' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.6rem center;
  padding-right: 2rem;
}
select option { background: var(--popover); color: var(--popover-foreground); }
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--muted-foreground); }
.input:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 30%, transparent);
}
input[type="file"] { padding: 0.4rem 0.5rem; }
input[type="file"]::file-selector-button {
  border: 1px solid var(--input); background: var(--secondary); color: var(--secondary-foreground);
  border-radius: var(--radius-sm); padding: 0.35rem 0.7rem; font-size: 0.8rem;
  margin-right: 0.7rem; cursor: pointer; font-family: var(--font-sans);
}

/* --------------------------------------------------- shadcn: tabs/pills */
.tabs {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-lg); background: var(--muted);
  padding: 0.25rem; color: var(--muted-foreground); gap: 0.15rem;
}
.tabs a, .tabs button {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem; font-size: 0.85rem; font-weight: 500;
  font-family: var(--font-sans);
  color: var(--muted-foreground); text-decoration: none; border: 0;
  background: transparent; cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.tabs a:hover, .tabs button:hover { color: var(--foreground); }
.tabs a.on, .tabs button.on {
  background: var(--background); color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.tabs-sm a, .tabs-sm button { padding: 0.3rem 0.7rem; font-size: 0.78rem; }

/* --------------------------------------------------------- shadcn: table */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tbl thead tr { border-bottom: 1px solid var(--border); }
.tbl th {
  height: 2.5rem; padding: 0 1rem; text-align: left; vertical-align: middle;
  font-weight: 500; color: var(--muted-foreground); white-space: nowrap;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
  font-family: var(--font-sans);
}
.tbl tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s; }
.tbl tbody tr:last-child { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--muted) 50%, transparent); }
.tbl td { padding: 0.75rem 1rem; vertical-align: middle; }

/* --------------------------------------------------------- shadcn: alert */
.alert {
  position: relative; width: 100%;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  padding: 0.9rem 1rem; font-size: 0.875rem;
  background: var(--card); color: var(--card-foreground);
  display: flex; gap: 0.7rem; align-items: flex-start;
  margin-bottom: 1rem;
}
.alert-ok { border-color: var(--border); }
.alert-ok::before { content: "✓"; font-weight: 700; }
.alert-warn { border-color: color-mix(in srgb, var(--destructive) 50%, transparent); color: var(--destructive); }
.alert-warn::before { content: "!"; font-weight: 700; }

/* -------------------------------------------------------- shadcn: avatar */
.avatar {
  position: relative; display: inline-flex; flex-shrink: 0;
  height: 2.5rem; width: 2.5rem; overflow: hidden; border-radius: 9999px;
  background: var(--muted);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { height: 2rem; width: 2rem; }

/* ----------------------------------------------------- shadcn: separator */
.separator { height: 1px; width: 100%; background: var(--border); margin: 1.25rem 0; }

/* ------------------------------------------------------- shadcn: skeleton */
.skeleton { animation: pulse 1.6s ease-in-out infinite; border-radius: var(--radius-md); background: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* --------------------------------------------------- section headings */
.toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.1rem 0; align-items: center; }

/* ------------------------------------------------------------ article */
.art-wrap { max-width: 760px; }
.art-kicker {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 0.6rem;
  font-family: var(--font-sans);
}
.art-title {
  font-family: var(--font-sans);
  font-size: 1.875rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.2;
  font-feature-settings: var(--font-feature-settings);
  margin: 0 0 0.9rem; text-wrap: balance;
}
.art-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted-foreground); font-size: 0.83rem; margin-bottom: 1.2rem; }
.art-cover { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); margin-bottom: 1.75rem; aspect-ratio: 16/8; background: var(--muted); }
.art-cover svg { width: 100%; height: 100%; display: block; }
.art-body { font-size: 1rem; line-height: 1.85; color: color-mix(in srgb, var(--foreground) 92%, transparent); }
.art-body h2 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; margin: 2.2rem 0 0.8rem; font-family: var(--font-sans); }
.art-body h3 { font-size: 1.1rem; font-weight: 600; margin: 1.8rem 0 0.6rem; font-family: var(--font-sans); }
.art-body p { margin: 0 0 1.1rem; }
.art-body ul, .art-body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.art-body li { margin-bottom: 0.45rem; }
.art-body blockquote {
  border-left: 2px solid var(--border); margin: 1.4rem 0; padding: 0.2rem 0 0.2rem 1.1rem;
  color: var(--muted-foreground); font-style: italic;
}
.art-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em; background: var(--muted); padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}
.art-body pre {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem; overflow-x: auto; margin: 1.2rem 0;
}
.art-body pre code { background: none; padding: 0; }
.art-body img { border-radius: var(--radius-lg); border: 1px solid var(--border); margin: 1rem 0; }
.art-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1.2rem 0; }
.art-body th, .art-body td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; }
.art-body th { background: var(--muted); font-weight: 600; }
.art-actions { display: flex; gap: 0.6rem; margin: 2rem 0; flex-wrap: wrap; }
.note { font-size: 0.83rem; color: var(--muted-foreground); }
.note a { color: var(--foreground); text-underline-offset: 3px; }

/* comments */
.comments { margin-top: 2.5rem; border-top: 1px solid var(--border); padding-top: 1.75rem; }
.comments h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 1.1rem; font-family: var(--font-sans); }
.comment {
  display: flex; gap: 0.8rem; padding: 1rem 1.15rem; margin-bottom: 0.75rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.comment .who { font-weight: 600; font-size: 0.87rem; }
.comment .when { color: var(--muted-foreground); font-size: 0.75rem; margin-left: 0.6rem; }
.comment .txt { font-size: 0.9rem; margin-top: 0.35rem; line-height: 1.65; }
.comment-form { margin-top: 1.25rem; }

/* ------------------------------------------------- bites / glossary */
.bite {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.35rem 1.5rem; margin-bottom: 1rem;
}
.bite h3 { margin: 0.4rem 0 0.5rem; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.bite h3 a { text-decoration: none; }
.bite h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bite .tip { color: var(--muted-foreground); font-size: 0.9rem; line-height: 1.7; }
.term {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; margin-bottom: 0.75rem;
}
.term .t { font-weight: 700; font-size: 1rem; display: flex; gap: 0.7rem; align-items: baseline; flex-wrap: wrap; }
.term .t .my { font-weight: 500; font-size: 0.85rem; color: var(--muted-foreground); }
.term .d { color: var(--muted-foreground); font-size: 0.9rem; margin-top: 0.4rem; line-height: 1.7; }
.gloss-search { margin-bottom: 1.4rem; }

/* cheatsheet section cards */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.cs-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.35rem 1.4rem;
}
.cs-card h3 { margin: 0 0 0.7rem; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.cs-body { font-size: 0.9rem; color: color-mix(in srgb, var(--foreground) 88%, transparent); line-height: 1.75; }
.cs-body ul { padding-left: 1.2rem; margin: 0.4rem 0; }
.cs-body li { margin-bottom: 0.35rem; }
.cs-body p { margin: 0 0 0.6rem; }

/* companies */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.co-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.4rem 1.2rem; text-align: center; text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.co-card:hover { border-color: rgba(255,255,255,.22); transform: translateY(-2px); text-decoration: none; }
.co-card .ini {
  width: 3.2rem; height: 3.2rem; margin: 0 auto 0.8rem; border-radius: var(--radius-lg);
  background: var(--secondary); color: var(--secondary-foreground);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
}
.co-card .nm { font-weight: 600; }
.co-card .ct { font-size: 0.8rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.2rem 1.25rem;
}
.stat .n { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; font-family: var(--font-sans); }
.stat .l { font-size: 0.78rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* forms */
.form-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 900px) { .editor-split { grid-template-columns: 1fr; } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 700px) { .row2 { grid-template-columns: 1fr; } }

/* empty state */
.empty {
  text-align: center; color: var(--muted-foreground); font-size: 0.9rem;
  padding: 3.5rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.6);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(0,0,0,.6);
  }
  .burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md);
    border: 1px solid transparent; background: transparent; color: var(--foreground);
    font-size: 1.1rem; cursor: pointer; flex-shrink: 0; font-family: var(--font-sans);
  }
  .burger:hover { background: var(--accent); }
  .topbar { padding: 0.6rem 1rem; gap: 0.6rem; }
  .crumb { display: none; }
  .search { width: auto; flex: 1; }
}
