@font-face {
  font-family: Inter;
  src: url("/assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #eef3f9;
  --card: #ffffff;
  --border: #d7e1ee;
  --text: #0b1f3a;
  --muted: #5a6d84;
  --navy: #0a335c;
  --navy-2: #0d4a86;
  --accent: #0b4f8a;
  --cyan: #0a4d8c;
  --danger: #b42318;
  --ok: #067647;
  --grad: linear-gradient(135deg, #0a335c 0%, #1565a8 100%);
  --cta-text: #ffffff;
  --vote-bg: #f4f8fc;
  --header-bg: rgba(238, 243, 249, .82);
  --shadow: 0 18px 40px rgba(10, 51, 92, .08);
  --shadow-hover: 0 22px 50px rgba(10, 51, 92, .14);
  --radius: 20px;
  --wrap: 800px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(21, 101, 168, .09), transparent 55%),
    radial-gradient(720px 360px at 100% 0%, rgba(10, 51, 92, .07), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  font-size: 16px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: .5rem 1rem;
  z-index: 20;
}
.skip:focus { left: 1rem; }
.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.35'/></svg>");
}
.site-header, main, .site-footer, .fab { position: relative; z-index: 1; }

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(22px) saturate(1.2);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(10, 51, 92, .08);
  z-index: 9;
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 72px;
  min-width: 0;
  width: min(var(--wrap), calc(100% - 2rem));
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .14em;
  padding: .42rem .55rem;
  border-radius: 9px;
  background: var(--grad);
  color: var(--cta-text);
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(10, 51, 92, .18);
}
.brand-mark.sm { font-size: .65rem; margin-right: .4rem; box-shadow: none; }
.brand-text { font-size: .95rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text strong { color: var(--navy); font-weight: 700; letter-spacing: -.02em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: .15rem .35rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: .92rem;
  padding: .45rem .7rem;
  border-radius: 999px;
  font-weight: 500;
}
.site-nav a:hover:not(.btn-cta),
.site-nav a.is-active:not(.btn-cta) {
  color: var(--navy);
  background: rgba(10, 51, 92, .06);
}
.nav-dd { position: relative; }
.nav-dd-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .4rem;
  box-shadow: var(--shadow);
  z-index: 9;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { display: grid; }
.nav-dd-menu a { padding: .5rem .6rem; border-radius: 8px; }
.nav-dd-menu a:hover { background: var(--vote-bg); }
.nav-toggle {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  position: relative;
  flex-shrink: 0;
  z-index: 10;
  overflow: visible;
}
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  margin-left: -9px;
  background: var(--navy);
  transform-origin: center;
  transition: transform .2s var(--ease);
}
.nav-toggle::before { transform: translateY(-5px); }
.nav-toggle::after { transform: translateY(5px); }
.nav-toggle[aria-expanded="true"]::before {
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"]::after {
  transform: rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  text-decoration: none;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 999px;
  padding: .75rem 1.25rem;
  min-height: 46px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.btn-cta {
  border: 0;
  background: var(--grad);
  color: var(--cta-text);
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(10, 51, 92, .22);
}
.btn-cta:hover,
.btn-cta:focus-visible {
  background: linear-gradient(135deg, #07243f 0%, #0c3d70 100%);
  color: var(--cta-text);
  box-shadow: 0 14px 28px rgba(10, 51, 92, .28);
}
.btn-ghost {
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-block { width: 100%; }
.site-nav .btn-cta,
.site-nav .btn-cta:hover,
.site-nav .btn-cta:focus-visible,
.site-nav .btn-cta.is-active {
  color: var(--cta-text);
  padding: .55rem 1.05rem;
  min-height: 42px;
  margin-left: .35rem;
}

.hero { padding: 2.6rem 0 1.2rem; }
.hero.compact { padding: 1.4rem 0 .4rem; }
.hero-stage { padding: 1.6rem 0 0; }
.hero-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(480px 220px at 100% 0%, rgba(255,255,255,.16), transparent 55%),
    linear-gradient(145deg, #082848 0%, #0a335c 48%, #125aa0 100%);
  color: #fff;
  border-radius: 28px;
  padding: 2.7rem 2.5rem 2rem;
  box-shadow: 0 30px 70px rgba(10, 51, 92, .22);
}
.hero-panel::after {
  content: "IADM";
  position: absolute;
  right: -0.5rem;
  top: .4rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(5rem, 18vw, 9rem);
  letter-spacing: -.06em;
  color: rgba(255,255,255,.055);
  pointer-events: none;
  line-height: 1;
  z-index: 0;
}
.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy-2);
  margin: 0 0 .8rem;
}
.hero-panel .eyebrow {
  display: inline-flex;
  color: rgba(214, 230, 247, .82);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .38rem .75rem;
  margin-bottom: 1.15rem;
}
.hero h1, .prose h1, .hero-panel h1 {
  font-size: clamp(1.85rem, 5.4vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.hero-panel h1 { color: #fff; max-width: 14ch; }
.hero-panel h1 span { color: #cfe3f7; font-weight: 600; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.45rem; }
.hero-panel .btn-cta {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}
.hero-panel .btn-cta:hover,
.hero-panel .btn-cta:focus-visible {
  background: #e7f0fa;
  color: var(--navy);
}
.hero-panel .btn-ghost {
  border-color: rgba(255,255,255,.22);
  color: #fff;
  background: rgba(255,255,255,.08);
}
.hero-panel .btn-ghost:hover {
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.16);
  color: #fff;
}
.hero-kpis {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(255,255,255,.14);
  position: relative;
  z-index: 1;
}
.hero-panel .eyebrow,
.hero-panel h1,
.hero-panel .hero-actions { position: relative; z-index: 1; }
.hero-kpis b {
  display: block;
  font-size: 1.5rem;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.hero-kpis span {
  display: block;
  margin-top: .25rem;
  font-size: .78rem;
  color: rgba(214, 230, 247, .75);
}
.cat-strip {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: 1.15rem 1.6rem .15rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 1.4rem), transparent 100%);
}
.cat-strip::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(10, 51, 92, .08);
  color: var(--navy);
  border-radius: 999px;
  padding: .48rem .85rem;
  font-size: .84rem;
  font-weight: 500;
  box-shadow: 0 8px 22px rgba(10, 51, 92, .05);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.cat-chip em {
  font-style: normal;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  color: var(--muted);
  background: #eef3f9;
  border-radius: 999px;
  padding: .08rem .4rem;
}
.cat-chip:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.2rem;
}
.subnav a {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .4rem .9rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: .88rem;
  background: var(--card);
}
.subnav a.is-active {
  color: var(--cta-text);
  background: var(--grad);
  border-color: transparent;
}

.feed { padding-bottom: 6.5rem; }
.feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 1rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid rgba(10, 51, 92, .08);
}
.feed-head h2 { margin: 0 0 .2rem; font-size: 1.28rem; letter-spacing: -.02em; color: var(--navy); }
.feed-head p { margin: 0; color: var(--muted); font-size: .92rem; }

.card {
  background: var(--card);
  border: 1px solid rgba(10, 51, 92, .07);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.05rem;
  margin-bottom: 1.05rem;
  box-shadow: var(--shadow);
  min-width: 0;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover {
  border-color: rgba(10, 51, 92, .16);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .65rem;
  align-items: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .7rem;
  color: var(--muted);
  margin-bottom: .85rem;
}
.card-head .author { margin-left: auto; }
.badge {
  text-decoration: none;
  border-radius: 999px;
  padding: .2rem .58rem;
  border: 1px solid transparent;
  font-weight: 500;
}
.badge-cat { color: var(--navy); background: #eaf1f9; }
.badge-ai { color: var(--navy-2); background: #eef5fc; }
.card-body {
  margin: 0 0 1.1rem;
  font-size: 1.06rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.card-link { text-decoration: none; color: inherit; }
.card-link strong:first-child { color: var(--navy); }
.card-link strong:last-child {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .82em;
  letter-spacing: .04em;
  color: var(--navy-2);
}
.card-link:hover { color: var(--navy); }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.vote {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--vote-bg);
  border: 1px solid rgba(10, 51, 92, .08);
  border-radius: 14px;
  padding: .58rem .75rem;
  min-height: 46px;
  cursor: pointer;
  color: var(--muted);
  max-width: 100%;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.vote:hover { color: var(--navy); border-color: #b7c8dc; background: #fff; }
.vote.is-active.vote-a,
.vote.is-active.vote-b {
  color: var(--navy);
  border-color: #9bb6d4;
  background: #e7f0fa;
}
.vote-label { font-size: .82rem; line-height: 1.2; }
.count {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .78rem;
  min-width: 1.4rem;
  text-align: right;
  color: var(--navy);
}
.count.pop { animation: pop .28s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.icon-btn {
  background: #fff;
  border: 1px solid rgba(10, 51, 92, .08);
  border-radius: 12px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.icon-btn:hover { color: var(--navy); border-color: #b7c8dc; background: var(--vote-bg); }
.share { position: relative; margin-left: auto; }
.share-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 200px;
  max-width: min(240px, calc(100vw - 2rem));
  padding: .35rem;
  display: grid;
  z-index: 4;
  box-shadow: var(--shadow);
}
.share-menu[hidden] { display: none !important; }
.share-menu a, .share-menu button {
  background: none;
  border: 0;
  text-align: left;
  padding: .55rem .6rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  color: var(--text);
  font-size: .88rem;
}
.share-menu a:hover, .share-menu button:hover { background: var(--vote-bg); }

.fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  background: var(--grad);
  color: var(--cta-text);
  font-weight: 600;
  text-decoration: none;
  padding: .85rem 1.15rem;
  min-height: 48px;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(10, 51, 92, .28);
  z-index: 6;
  display: inline-flex;
  align-items: center;
}
.hide-fab .fab { display: none; }
.site-footer {
  border-top: 1px solid rgba(10, 51, 92, .08);
  padding: 2rem 0 max(6.5rem, calc(5rem + env(safe-area-inset-bottom)));
  color: var(--muted);
  font-size: .88rem;
  background: rgba(255,255,255,.35);
}
.footer-inner {
  width: min(var(--wrap), calc(100% - 2rem));
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-inline: auto;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: .7rem 1rem; }
.site-footer a { color: var(--navy); text-decoration: none; }

.empty { color: var(--muted); padding: 2rem 0; }
.back { margin-top: 1.2rem; }
.back a { color: var(--navy-2); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 1rem;
  padding-bottom: 4rem;
}
.cat-card {
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: grid;
  gap: .5rem;
  box-shadow: var(--shadow);
}
.cat-card h2 { margin: 0; font-size: 1.1rem; color: var(--navy); }
.cat-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.cat-count { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .75rem; color: var(--navy-2); }

.prose { padding: 1.4rem 0 5rem; }
.prose h2 { margin-top: 2rem; color: var(--navy); }
.prose h3 { margin: 1.4rem 0 .4rem; font-size: 1.05rem; color: var(--navy); }
.prose ul { padding-left: 1.2rem; color: var(--muted); }
.prose p { color: #24364d; }
.faq { margin-top: .4rem; }
.permalink { padding: 0 0 4rem; }
.crumbs {
  padding: 1rem 0 .2rem;
  font-size: .82rem;
  color: var(--muted);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.crumbs li { display: inline-flex; align-items: center; max-width: 100%; }
.crumbs li:not(:last-child)::after {
  content: "/";
  margin: 0 .45rem;
  color: #9aadc2;
}
.crumbs a { color: var(--navy); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

.submit-page, .login-box { padding-bottom: 5rem; max-width: 680px; }
.login-box { padding-top: 4rem; padding-inline: .75rem; }
.iadm-form { display: grid; gap: 1rem; }
.form-hint, .form-status { color: var(--muted); font-size: .9rem; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--danger); }
.composer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.preview {
  color: var(--muted);
  margin-bottom: .6rem;
  font-size: .95rem;
  overflow-wrap: anywhere;
}
.preview.is-live { color: var(--text); }
.composer textarea, .iadm-form input, .iadm-form select, .edit-area {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem .8rem;
}
.composer textarea { min-height: 140px; resize: vertical; }
.composer-meta { text-align: right; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .75rem; color: var(--muted); margin-top: .4rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-grid label, .iadm-form label { display: grid; gap: .35rem; font-size: .88rem; color: var(--muted); min-width: 0; }
.opt { opacity: .7; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }

.modal::backdrop { background: rgba(11, 31, 58, .45); }
.modal { border: 0; padding: 0; background: transparent; }
.modal-card {
  width: min(640px, calc(100vw - 1.25rem));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.2rem;
  position: relative;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.modal-close { position: absolute; right: .8rem; top: .8rem; }
.modal-card h2 { margin: 0 0 1rem; color: var(--navy); }

.toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  border: 0;
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 999px;
  z-index: 20;
  font-size: .9rem;
  max-width: calc(100vw - 2rem);
  text-align: center;
}

.card.sk {
  height: 160px;
  background: linear-gradient(90deg, #eef3f9 0%, #fff 50%, #eef3f9 100%);
  background-size: 200% 100%;
  animation: shine 1.2s infinite;
}
@keyframes shine {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.feed-more { display: grid; gap: .8rem; justify-items: center; margin-top: 1rem; }

.admin-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--bg); }
.admin-side {
  border-right: 1px solid transparent;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--navy);
  color: #d7e4f2;
}
.admin-side .brand { color: #fff; }
.admin-side nav { display: grid; gap: .3rem; }
.admin-side nav a {
  text-decoration: none;
  color: #c5d6e8;
  padding: .55rem .5rem;
  border-radius: 8px;
}
.admin-side nav a.is-active, .admin-side nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-side .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.admin-user { color: #9fb4cb; font-size: .8rem; margin-top: auto; word-break: break-all; }
.admin-main { padding: 1.5rem 1.2rem 4rem; min-width: 0; }
.admin-head h1 { margin: 0 0 .3rem; color: var(--navy); }
.admin-head p { color: var(--muted); }
kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  border: 1px solid var(--border);
  padding: .05rem .35rem;
  border-radius: 4px;
}
.mod-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: .8rem;
}
.mod-card.is-focus { outline: 2px solid var(--navy-2); }
.mod-card header { display: flex; gap: .6rem; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.mod-card p { overflow-wrap: anywhere; }
.mod-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.mod-actions button {
  background: var(--vote-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem .7rem;
  min-height: 40px;
  cursor: pointer;
}
.mod-actions button[data-act="approve"], .mod-actions button[data-act="save"] { border-color: #86c9a8; color: var(--ok); }
.mod-actions button[data-act="reject"], .mod-actions button[data-act="unpublish"] { border-color: #f0b4ae; color: var(--danger); }
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.kpi b { display: block; font-size: 1.6rem; color: var(--navy); }
.kpi span { color: var(--muted); font-size: .8rem; }
.chart-block { margin: 1.5rem 0; }
.bars { display: flex; align-items: flex-end; gap: .4rem; height: 160px; overflow-x: auto; }
.bar {
  flex: 1;
  background: var(--grad);
  height: var(--h);
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  color: #fff;
  font-size: .7rem;
  min-height: 8px;
  min-width: 22px;
}
.bar small { color: var(--muted); margin-top: .3rem; }
.hbar { display: grid; grid-template-columns: minmax(0, 160px) 1fr 40px; gap: .6rem; align-items: center; margin: .35rem 0; }
.hbar i { display: block; height: 8px; background: var(--grad); border-radius: 99px; }
.hbar span { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

@media (max-width: 900px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-side { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    right: auto;
    width: 100vw;
    transform: translateX(-50%);
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: .85rem 1rem 1.1rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 18px 40px rgba(10, 51, 92, .16);
    z-index: 9;
    max-height: min(78vh, calc(100dvh - 5.5rem));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 44px; display: flex; align-items: center; }
  .site-nav .btn-cta { margin-left: 0; width: 100%; justify-content: center; }
  .nav-dd-menu { position: static; display: grid; box-shadow: none; border: 0; padding: 0 .4rem; }
  body.nav-open { overflow: hidden; }
  body.nav-open .fab { visibility: hidden; pointer-events: none; }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 58, .28);
    z-index: 7;
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  .vote { flex: 1 1 calc(50% - .5rem); justify-content: space-between; }
  .vote-label { font-size: .75rem; }
  .share { margin-left: 0; }
  .share-menu { left: 0; right: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .fab {
    width: 3.4rem;
    height: 3.4rem;
    min-width: 3.4rem;
    min-height: 3.4rem;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .fab span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .fab::before {
    content: "+";
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 1;
  }
  .hbar { grid-template-columns: 1fr 40px; }
  .hbar i { grid-column: 1 / -1; }
  .hero { padding-top: 1.6rem; }
  .hero-stage { padding-top: 1rem; }
  .hero-panel { padding: 1.55rem 1.2rem 1.3rem; border-radius: 22px; }
  .hero-panel::after { display: none; }
  .hero-panel h1 { max-width: none; }
  .hero-kpis { gap: .65rem; }
  .hero-kpis b { font-size: 1.2rem; }
  .card { padding: 1.05rem .95rem .9rem; }
  .card:hover { transform: none; }
  .card-head .author { margin-left: 0; width: 100%; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .vote { flex: 1 1 100%; }
  .hero-actions .btn { width: 100%; }
  .kpi-row { grid-template-columns: 1fr; }
  .brand-text span { display: none; }
  .card-actions { padding-right: 3.4rem; }
  .wrap, .header-inner, .footer-inner { width: calc(100% - 1.25rem); }
  .hero-kpis { gap: .5rem; }
  .hero-kpis span { font-size: .68rem; }
  .crumbs [aria-current="page"] { max-width: 18ch; }
}

@media (max-width: 360px) {
  .hero-kpis { grid-template-columns: 1fr; }
  .hero-panel { padding: 1.25rem 1rem 1.1rem; }
  .brand-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
