/* ============================================================
   NAVIONEERS — Design System
   Engineering / industrial document aesthetic
   IBM Plex · Hairline rules · Zero border-radius · Cyan accent
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }
ol, ul { list-style: none; }

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Brand palette */
  --brand-red:    #ff3416;
  --brand-orange: #f47c20;
  --brand-amber:  #ffb81c;
  --brand-cyan:   #15b5d6;
  --brand-navy:   #284870;

  /* Navy scale */
  --brand-navy-900: #0e1a2e;
  --brand-navy-800: #1a3258;
  --brand-navy-500: #4e6a8e;

  /* Cyan scale */
  --brand-cyan-600: #0d96b5;
  --brand-cyan-300: #a7e0ed;

  /* Backgrounds */
  --bg:      #eef2f7;
  --bg-2:    #e3eaf3;
  --paper:   #f8fafc;
  --paper-2: #ffffff;

  /* Dark surfaces */
  --dark:   #0e1a2e;
  --dark-2: #142844;

  /* Ink */
  --ink:      #0e1a2e;
  --ink-2:    #28395a;
  --ink-soft: #5e6e89;
  --ink-mute: #94a0b3;

  /* Ink on dark */
  --ink-on-dark:   #f8fafc;
  --ink-on-dark-2: rgba(248,250,252,.72);
  --ink-on-dark-3: rgba(248,250,252,.50);

  /* Lines */
  --line:        #0e1a2e;
  --line-soft:   #c8d2e1;
  --line-on-dark: rgba(248,250,252,.20);

  /* Semantic */
  --accent:       #15b5d6;
  --accent-hover: #0d96b5;
  --accent-tint:  #a7e0ed;
  --accent-warm:  #f47c20;
  --highlight:    #ffb81c;
  --hot:          #ff3416;
  --link:         #284870;
  --link-hover:   #15b5d6;

  /* Typography */
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-sans: "IBM Plex Sans", -apple-system, sans-serif;
  --font-cond: "IBM Plex Sans Condensed", var(--font-sans);

  /* Type scale */
  --t-xs:      11px;
  --t-sm:      13px;
  --t-base:    15.5px;
  --t-md:      18px;
  --t-lg:      clamp(22px, 2.2vw, 28px);
  --t-xl:      clamp(36px, 6vw, 76px);
  --t-display: clamp(64px, 14vw, 240px);

  /* Tracking */
  --tracking-wide:  .14em;
  --tracking-tight: -.015em;

  /* Layout */
  --max:    1480px;
  --gutter: clamp(20px, 4vw, 64px);
  --nav-h:  56px;
  --rail-w: 220px;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Border & radius */
  --bw:     1px;
  --radius: 0;

  /* Shadow (one allowed pop shadow for dropdowns) */
  --shadow-pop: 0 18px 30px -22px rgba(14,26,46,.32);

  /* Motion */
  --ease:     cubic-bezier(.2,.6,.2,1);
  --dur-fast: 140ms;
  --dur:      220ms;
  --dur-slow: 360ms;

  /* Z-index */
  --z-nav:      50;
  --z-dropdown: 60;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 28px; /* leave room for fixed footer */
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: var(--bw) solid var(--line);
  transition: background var(--dur) var(--ease);
}

.navbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 0;
}

/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
  padding-right: var(--s-4);
  border-right: var(--bw) solid var(--line-soft);
  height: 100%;
}

.brand-icon { opacity: .8; flex-shrink: 0; }

.brand-name {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink);
}

/* Nav toggle (hamburger) — visible only on mobile */
.nav__toggle {
  display: none;
  align-items: center;
  gap: var(--s-2);
  background: none;
  border: none;
  padding: 0 var(--s-3);
  height: 100%;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink);
  border-right: var(--bw) solid var(--line-soft);
  flex-shrink: 0;
}

.nav__toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav__toggle-lines span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
  transform-origin: center;
}

/* Animate to X when open */
.nav__toggle[aria-expanded="true"] .nav__toggle-lines span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-lines span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-lines span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Also keep old hamburger class compatible */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: var(--s-2) var(--s-3);
  margin-left: auto;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
  transform-origin: center;
}

/* Nav links list */
.nav-links {
  display: flex;
  align-items: stretch;
  flex: 1;
  height: 100%;
  padding: 0;
  margin: 0;
}

/* Each nav item */
.nav__item {
  position: relative;
  display: flex;
  align-items: stretch;
  border-right: var(--bw) solid var(--line-soft);
}

.nav__item:first-child {
  border-left: var(--bw) solid var(--line-soft);
}

/* Nav link */
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-4);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  height: 100%;
}

.nav-link:hover {
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}

.nav-link.active,
.nav__item.is-active > .nav-link {
  background: var(--brand-navy);
  color: var(--ink-on-dark);
}

/* Numbered nav item parts */
.nav__num {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-mute);
  flex-shrink: 0;
}

.nav-link.active .nav__num,
.nav__item.is-active > .nav-link .nav__num {
  color: var(--ink-on-dark-3);
}

.nav__name { flex: 1; }

.nav__chev {
  font-size: var(--t-xs);
  color: var(--ink-mute);
  margin-left: var(--s-1);
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}

.nav__item--has-sub:hover .nav__chev {
  transform: rotate(45deg);
}

/* Editor link */
.nav-editor-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 100%;
  color: var(--ink-mute);
  font-size: var(--t-sm);
  text-decoration: none;
  border-left: var(--bw) solid var(--line-soft);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  flex-shrink: 0;
}

.nav-editor-link:hover {
  background: var(--bg);
  color: var(--ink);
}

/* CTA link in nav */
.nav__cta {
  display: flex;
  align-items: center;
  padding: 0 var(--s-4);
  height: 100%;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-on-dark);
  background: var(--brand-navy);
  border-left: var(--bw) solid var(--line);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease);
}

.nav__cta:hover {
  background: var(--brand-navy-800);
}

/* ── Desktop dropdown ───────────────────────────────────────── */
.nav__item--has-sub { position: relative; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--paper);
  border: var(--bw) solid var(--line);
  border-top: 0;
  box-shadow: var(--shadow-pop);
  z-index: var(--z-dropdown);
  flex-direction: column;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.nav__item--has-sub:hover .nav-dropdown,
.nav-has-children:hover .nav-dropdown {
  display: flex;
  opacity: 1;
}

.nav-dropdown li {
  border-top: var(--bw) solid var(--line-soft);
}

.nav-dropdown li:first-child { border-top: 0; }

.nav-dropdown .nav-link,
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  font-size: var(--t-sm);
  color: var(--ink-2);
  text-decoration: none;
  width: 100%;
  height: auto;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  border: none;
}

.nav-dropdown .nav-link:hover,
.nav-dropdown a:hover {
  background: var(--bg);
  color: var(--ink);
}

.sub__num {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-mute);
  flex-shrink: 0;
}

/* Legacy dropdown support */
.nav-has-children {
  position: relative;
}

/* ── Mobile menu ────────────────────────────────────────────── */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: var(--bw) solid var(--line);
  z-index: var(--z-nav);
  flex-direction: column;
  max-height: calc(100svh - var(--nav-h));
  overflow-y: auto;
}

.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu .nav-link,
.nav-mobile-menu a.nav-link {
  display: flex;
  align-items: center;
  padding: var(--s-3) var(--gutter);
  height: auto;
  border-top: var(--bw) solid var(--line-soft);
  font-size: var(--t-base);
  color: var(--ink-2);
  text-decoration: none;
  border-right: none;
  border-left: none;
}

.nav-mobile-menu .nav-link.active {
  background: var(--brand-navy);
  color: var(--ink-on-dark);
}

.nav-link-sub {
  padding-left: calc(var(--gutter) + var(--s-6)) !important;
  font-size: var(--t-sm) !important;
  color: var(--ink-soft) !important;
}

/* ── Subsection nav ─────────────────────────────────────────── */
.subsection-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
  padding: var(--s-3) 0;
  border-top: var(--bw) solid var(--line-soft);
  border-bottom: var(--bw) solid var(--line-soft);
}

.subsection-nav-link {
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  border: var(--bw) solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.subsection-nav-link:hover,
.subsection-nav-link.active {
  background: var(--brand-navy);
  color: var(--ink-on-dark);
  border-color: var(--brand-navy);
}

.subsection-nav-root { font-weight: 700; }

@media (max-width: 760px) {
  .subsection-nav {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-1);
  }
  .subsection-nav-link { text-align: center; }
}

/* ── Cover / Hero (index.html) ──────────────────────────────── */
.cover {
  position: relative;
  min-height: 560px;
  max-height: 880px;
  height: 100svh;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cover__img {
  position: absolute;
  inset: 0;
  background-image: url('../assets/cover-desktop.png');
  background-size: cover;
  background-position: center 30%;
  opacity: .45;
}

/* Utility bar at top of cover */
.util {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-5);
  border-bottom: var(--bw) solid var(--line-on-dark);
  margin-top: var(--nav-h);
}

.util__l,
.util__r {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.util__c {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.util__brand {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-on-dark-2);
}

.util__brand-suffix {
  color: var(--ink-on-dark-3);
}

.tick {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: .08em;
  color: var(--ink-on-dark-3);
  white-space: nowrap;
}

.tick--bare { color: var(--ink-on-dark-2); }

/* Hero body inside cover */
.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--s-7) var(--s-7) var(--s-7);
}

.hero__meta {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  max-width: 640px;
}

.hero__sub {
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  color: var(--ink-on-dark-2);
  line-height: 1.65;
}

.hero__title {
  font-family: var(--font-cond);
  font-size: var(--t-display);
  font-weight: 700;
  line-height: .92;
  letter-spacing: var(--tracking-tight);
  color: var(--ink-on-dark);
  text-transform: uppercase;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-bottom: var(--s-5);
  overflow: visible;
}

.hero__title span {
  display: inline-block;
}

.hero__foot {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-on-dark-3);
  padding-top: var(--s-4);
  border-top: var(--bw) solid var(--line-on-dark);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-on-dark-3);
}

.badge__dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 0;
  flex-shrink: 0;
}

/* Corner crop marks */
.crop {
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 3;
}

.crop--tl { top: calc(var(--nav-h) + 8px); left: 8px; border-top: var(--bw) solid var(--line-on-dark); border-left: var(--bw) solid var(--line-on-dark); }
.crop--tr { top: calc(var(--nav-h) + 8px); right: 8px; border-top: var(--bw) solid var(--line-on-dark); border-right: var(--bw) solid var(--line-on-dark); }
.crop--bl { bottom: 8px; left: 8px; border-bottom: var(--bw) solid var(--line-on-dark); border-left: var(--bw) solid var(--line-on-dark); }
.crop--br { bottom: 8px; right: 8px; border-bottom: var(--bw) solid var(--line-on-dark); border-right: var(--bw) solid var(--line-on-dark); }

/* ── Legacy hero classes (kept for backwards compat) ────────── */
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: .45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,26,46,.85) 0%, rgba(14,26,46,.3) 60%, rgba(14,26,46,.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--s-7) var(--s-7);
  max-width: 900px;
}

.hero-title {
  font-family: var(--font-cond);
  font-size: var(--t-xl);
  font-weight: 700;
  line-height: 1;
  color: var(--ink-on-dark);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--s-4);
}

.hero-subtitle {
  font-size: var(--t-base);
  color: var(--ink-on-dark-2);
  line-height: 1.65;
  margin-bottom: var(--s-6);
  max-width: 520px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--brand-navy);
  color: var(--ink-on-dark);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: var(--s-3) var(--s-5);
  border: var(--bw) solid var(--brand-navy-500);
  border-radius: var(--radius);
  transition: background var(--dur-fast) var(--ease);
}

.hero-cta:hover {
  background: var(--brand-navy-800);
}

/* ── Section hero ───────────────────────────────────────────── */
.section-hero {
  background: var(--paper);
  border-bottom: var(--bw) solid var(--line);
  padding: calc(var(--nav-h) + var(--s-8)) var(--gutter) var(--s-8);
}

.section-hero-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--s-3);
}

.section-hero-title {
  font-family: var(--font-cond);
  font-size: var(--t-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  line-height: 1;
  margin-bottom: var(--s-4);
}

.section-hero-sub {
  font-size: var(--t-base);
  color: var(--ink-2);
  max-width: 600px;
  line-height: 1.65;
}

/* ── Page layout ────────────────────────────────────────────── */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--s-8) var(--gutter) var(--s-9);
}

.page-content-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s-8) var(--gutter) var(--s-9);
}

/* ── About strip ────────────────────────────────────────────── */
.about-strip {
  background: var(--dark);
  padding: var(--s-6) var(--s-7);
  border-bottom: var(--bw) solid var(--line);
  position: relative;
}

.about-strip p {
  color: var(--ink-on-dark-2);
  font-size: var(--t-base);
  line-height: 1.75;
  max-width: 860px;
}

.about-strip p a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.about-strip p a:hover {
  color: var(--accent-hover);
}

/* ── Articles ───────────────────────────────────────────────── */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article {
  background: var(--bg);
  border-top: var(--bw) solid var(--line-soft);
  padding: var(--s-6) 0;
  transition: background var(--dur-fast) var(--ease);
}

.article:first-child { border-top: 0; }

.article:hover { background: var(--bg); }

.article.article-linked {
  animation: article-flash 2.8s ease forwards;
}
@keyframes article-flash {
  0%   { background: rgba(21, 181, 214, .18); }
  60%  { background: rgba(21, 181, 214, .10); }
  100% { background: transparent; }
}

.article-controlpanel {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}

.article-controlpanel button {
  background: none;
  border: var(--bw) solid var(--line-soft);
  border-radius: var(--radius);
  padding: var(--s-1) var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-mute);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.article-controlpanel button:hover {
  border-color: var(--line);
  color: var(--ink);
}

.article-header { margin-bottom: var(--s-3); }

.article-title {
  font-family: var(--font-cond);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  margin-bottom: var(--s-2);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
}

.article-metadata {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  text-align: left;
  margin-bottom: var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  letter-spacing: .04em;
}

.article-body {
  color: var(--ink-2);
  font-size: var(--t-base);
  line-height: 1.75;
}

.article-body p { margin-bottom: var(--s-4); }
.article-body p:last-child { margin-bottom: 0; }

.article-body h2,
.article-body h3 {
  font-family: var(--font-cond);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}

.article-body h2 {
  font-size: var(--t-md);
  margin: var(--s-6) 0 var(--s-3);
}

.article-body h3 {
  font-size: var(--t-base);
  margin: var(--s-5) 0 var(--s-2);
}

.article-body a {
  color: var(--link);
  text-decoration: none;
  border-bottom: var(--bw) solid var(--line-soft);
}

.article-body a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.article-body img {
  border-radius: var(--radius);
  border: none;
  margin: var(--s-5) auto;
}

/* ── Loading / spinner ──────────────────────────────────────── */
.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-9) var(--s-5);
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
}

.spinner {
  width: 24px;
  height: 24px;
  border: var(--bw) solid var(--line-soft);
  border-top-color: var(--accent);
  border-radius: 0;
  animation: spin .9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  padding: var(--s-9) var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-mute);
  letter-spacing: var(--tracking-wide);
  border-top: var(--bw) solid var(--line-soft);
}

/* ── News grid ──────────────────────────────────────────────── */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--s-6);
}

.news-card {
  background: var(--paper);
  border: var(--bw) solid var(--line-soft);
  border-top: 0;
  padding: var(--s-5) var(--s-6);
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  width: 100%;
  border-radius: var(--radius);
}

.news-grid .news-card:first-child {
  border-top: var(--bw) solid var(--line-soft);
}

.news-card:hover {
  border-color: var(--line);
  background: var(--paper-2);
}

.news-card-date {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-mute);
  margin-bottom: var(--s-2);
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.news-card-date::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--accent);
  flex-shrink: 0;
}

.news-card-title {
  font-family: var(--font-cond);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--s-3);
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
}

.news-card-body {
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.7;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.news-card.expanded .news-card-body {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.news-card-author {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-mute);
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: var(--bw) solid var(--line-soft);
  letter-spacing: .04em;
}

/* Pinned */
.news-card.pinned {
  border-left: 3px solid var(--accent);
}

.news-card.pinned .news-card-date::before {
  background: var(--accent);
}

/* ── Feature grid ───────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0;
  margin: var(--s-6) 0;
  border: var(--bw) solid var(--line-soft);
}

.feature-card {
  background: var(--paper);
  border-right: var(--bw) solid var(--line-soft);
  border-bottom: var(--bw) solid var(--line-soft);
  padding: var(--s-6);
  border-radius: var(--radius);
  transition: background var(--dur-fast) var(--ease);
}

.feature-card:hover {
  background: var(--paper-2);
}

.feature-card-icon {
  font-size: 1.4rem;
  margin-bottom: var(--s-3);
  line-height: 1;
}

.feature-card-title {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: var(--t-md);
  margin-bottom: var(--s-2);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}

.feature-card-desc {
  font-size: var(--t-sm);
  color: var(--ink-soft);
  line-height: 1.65;
}

/* ── Contact grid ───────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  margin: var(--s-5) 0;
  border: var(--bw) solid var(--line-soft);
}

.contact-card {
  background: var(--paper);
  border-right: var(--bw) solid var(--line-soft);
  border-bottom: var(--bw) solid var(--line-soft);
  padding: var(--s-5);
  border-radius: var(--radius);
}

.contact-card-label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--s-2);
}

.contact-card-value {
  font-size: var(--t-base);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.contact-card-value a {
  color: var(--link);
  text-decoration: none;
  border-bottom: var(--bw) solid var(--line-soft);
}

.contact-card-value a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* ── Partners strip ─────────────────────────────────────────── */
.partners-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--s-6);
  padding: var(--s-6) 0;
  border-top: var(--bw) solid var(--line-soft);
  margin-top: var(--s-6);
}

.partner-item {
  text-align: left;
  max-width: 200px;
}

.partner-item img {
  max-height: 56px;
  width: auto;
  margin: 0 0 var(--s-3);
  padding: var(--s-2);
  border: var(--bw) solid var(--line-soft);
  filter: grayscale(20%);
  opacity: .85;
  transition: opacity var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.partner-item img:hover { opacity: 1; filter: none; }

.partner-caption {
  font-size: var(--t-xs);
  color: var(--ink-mute);
  line-height: 1.5;
  font-family: var(--font-sans);
}

/* Vertical partners (visual-navigation) */
.partners-vertical {
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
  margin-top: var(--s-6);
}

.partner-item-v {
  text-align: center;
}

.partner-item-v img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto var(--s-4);
  filter: grayscale(15%);
  opacity: .9;
  transition: opacity var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.partner-item-v img:hover { opacity: 1; filter: none; }

.partner-item-v .partner-caption {
  font-size: var(--t-sm);
  font-family: var(--font-sans);
  color: var(--ink-soft);
  line-height: 1.65;
  text-align: center;
}

.partner-caption-lang {
  display: block;
  margin-top: var(--s-2);
  color: var(--ink-mute);
  font-style: italic;
}

/* ── Prose ──────────────────────────────────────────────────── */
.prose {
  color: var(--ink-2);
  font-size: var(--t-base);
  line-height: 1.65;
}

.prose p { margin-bottom: var(--s-5); }
.prose p:last-child { margin-bottom: 0; }

.prose h2 {
  font-family: var(--font-cond);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--ink);
  margin: var(--s-8) 0 var(--s-4);
  padding-top: var(--s-4);
  border-top: var(--bw) solid var(--line-soft);
  letter-spacing: var(--tracking-tight);
}

.prose h3 {
  font-family: var(--font-cond);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ink);
  margin: var(--s-6) 0 var(--s-3);
  letter-spacing: var(--tracking-tight);
}

.prose ul,
.prose ol {
  padding-left: var(--s-6);
  margin-bottom: var(--s-5);
  list-style: disc;
}

.prose ol { list-style: decimal; }
.prose li { margin-bottom: var(--s-2); }

.prose a {
  color: var(--link);
  text-decoration: none;
  border-bottom: var(--bw) solid var(--line-soft);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.prose a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* ── Footer ─────────────────────────────────────────────────── */
/* ── Footer — fixed minimal bar ─────────────────────────────── */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-nav) - 1);
  height: 28px;
  background: var(--dark);
  border-top: var(--bw) solid rgba(248,250,252,.12);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0 var(--gutter);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-on-dark-3);
}

.footer-brand {
  font-weight: 600;
  color: var(--ink-on-dark-2);
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
}

.footer-brand-suffix { color: var(--accent); }
.footer-sep { color: var(--line-on-dark); }
.footer-copy { color: var(--ink-on-dark-3); white-space: nowrap; }
.footer-doc  { color: var(--ink-on-dark-3); white-space: nowrap; }

/* ── Nav end (CTA + editor) ─────────────────────────────────── */
.nav-end {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  margin-left: auto;
  flex-shrink: 0;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-4);
  height: 100%;
  background: var(--brand-navy);
  color: var(--ink-on-dark);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
  border-left: var(--bw) solid var(--line-soft);
  white-space: nowrap;
}

.nav__cta:hover { background: var(--accent); }

.brand-suffix {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  letter-spacing: .06em;
  margin-left: var(--s-1);
}

/* ── Back-to-top ────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: calc(28px + var(--s-3)); /* sit above the fixed footer */
  right: var(--s-5);
  z-index: var(--z-nav);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-navy);
  color: var(--ink-on-dark);
  border: var(--bw) solid var(--line-on-dark);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), background var(--dur-fast) var(--ease);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover { background: var(--brand-navy-800); }

/* ── Utility: gallery, images, infobar ─────────────────────── */
.gallery { overflow: hidden; border: var(--bw) solid var(--line-soft); }
.gallery img { width: 100%; }

.gallery_control {
  display: flex;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

.gallery_control button,
.btn-link {
  background: var(--paper);
  border: var(--bw) solid var(--line-soft);
  border-radius: var(--radius);
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  text-decoration: none;
}

.gallery_control button:hover,
.btn-link:hover {
  border-color: var(--line);
  color: var(--ink);
}

.image-classic, .generalimg {
  text-align: center;
  margin: var(--s-5) 0;
}

.image-classic img,
.generalimg img {
  max-width: 100%;
  margin: 0 auto;
  border: none;
}

.image-50 { text-align: center; margin: var(--s-5) 0; }
.image-50 img { max-width: 50%; margin: 0 auto; border: none; }

.image-75 { text-align: center; margin: var(--s-5) 0; }
.image-75 img { max-width: 75%; margin: 0 auto; border: none; }

/* Video embed classes (mirrors image pattern) */
.video-full, .video-75, .video-50 { margin: var(--s-5) 0; }
.video-full video { width: 100%; display: block; }
.video-75 { text-align: center; }
.video-75 video { max-width: 75%; }
.video-50 { text-align: center; }
.video-50 video { max-width: 50%; }
.article-body video { max-width: 100%; display: block; }

.generalimgsmall { text-align: center; margin: var(--s-5) 0; }
.generalimgsmall img { max-width: 50%; margin: 0 auto; border: none; }

.image-bordered img { border: var(--bw) solid var(--line-soft); }

.infobar {
  background: var(--paper);
  border: var(--bw) solid var(--line-soft);
  padding: var(--s-4) var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-soft);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s-2) var(--s-5);
}

/* ── Utility buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--radius);
  border: var(--bw) solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-navy);
  color: var(--ink-on-dark);
  border-color: var(--brand-navy);
}

.btn-primary:hover {
  background: var(--brand-navy-800);
  border-color: var(--brand-navy-800);
  color: var(--ink-on-dark);
}

.btn-secondary, .btn-light {
  background: var(--paper);
  color: var(--ink-2);
  border-color: var(--line-soft);
}

.btn-secondary:hover, .btn-light:hover {
  border-color: var(--line);
  background: var(--paper-2);
  color: var(--ink);
}

.btn-danger {
  background: var(--hot);
  color: var(--ink-on-dark);
  border-color: var(--hot);
}

.btn-danger:hover {
  background: #d42a0e;
  border-color: #d42a0e;
}

/* ── Misc content helpers ───────────────────────────────────── */
.section { margin: var(--s-5) 0; }

.headline {
  font-family: var(--font-cond);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--s-4);
  letter-spacing: var(--tracking-tight);
}

.briefing-subsection {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--s-2);
}

.subsection-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-4) 0;
}

.subsection-buttons button {
  background: var(--paper);
  border: var(--bw) solid var(--line-soft);
  border-radius: var(--radius);
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  color: var(--ink-2);
}

.subsection-buttons button:hover {
  border-color: var(--line);
  color: var(--ink);
}

/* ── Form elements (editor / new article) ───────────────────── */
#new_article {
  background: var(--paper);
  border: var(--bw) solid var(--line-soft);
  padding: var(--s-6);
  margin: var(--s-5) 0;
}

#new_article_content,
#new_article_ntent {
  width: 100%;
  box-sizing: border-box;
  border: var(--bw) solid var(--line-soft);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  resize: vertical;
  color: var(--ink);
  background: var(--paper-2);
  transition: border-color var(--dur-fast) var(--ease);
}

#new_article_content:focus,
#new_article_ntent:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint);
}

/* Storage tree */
#storage-content-tree .storage-folder-button {
  width: 75%;
  text-align: left;
}

/* ── Sidebar (kept for editor compat) ───────────────────────── */
.page-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-7) var(--gutter) var(--s-9);
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  gap: var(--s-6);
  align-items: start;
}

.sidebar { position: sticky; top: calc(var(--nav-h) + var(--s-5)); }

.sidebar-card {
  background: var(--paper);
  border: var(--bw) solid var(--line-soft);
  overflow: hidden;
}

.sidebar-mobile-header { display: none; }

.btn-sidebar-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--brand-navy);
  color: var(--ink-on-dark);
  border: none;
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius);
}

.sidebar-nav { padding: var(--s-2) 0; }

.sidebar-nav a,
.sidebar-nav button,
#main_menu a,
#main_menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-top: var(--bw) solid var(--line-soft);
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  text-decoration: none;
  line-height: 1.4;
}

.sidebar-nav a:hover,
.sidebar-nav button:hover,
#main_menu a:hover,
#main_menu button:hover {
  color: var(--ink);
  background: var(--bg);
}

#main_menu .headline,
.sidebar-nav .headline {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: var(--s-4) var(--s-4) var(--s-1);
  border-top: var(--bw) solid var(--line-soft);
  text-align: left;
}

#main_menu .sidebar-breaker,
.sidebar-nav .sidebar-breaker {
  height: var(--bw);
  background: var(--line-soft);
  margin: var(--s-2) var(--s-3);
}

#aklogo img { width: 100%; }

.main-content { min-width: 0; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .page-layout {
    grid-template-columns: 200px 1fr;
    gap: var(--s-5);
    padding: var(--s-6) var(--s-5) var(--s-8);
  }

  .hero__title { font-size: clamp(56px, 12vw, 160px); }
}

@media (max-width: 1080px) {
}

@media (max-width: 760px) {
  /* Nav */
  .nav__toggle { display: flex; }
  .nav-hamburger { display: flex; }
  .nav-links { display: none; }
  .nav__cta { padding: 0 var(--s-3); font-size: 10px; }

  /* Cover */
  .cover { max-height: none; height: auto; min-height: 520px; }
  .util__hide-sm { display: none; }
  .util__c { position: static; transform: none; }
  .util { flex-wrap: wrap; gap: var(--s-2); }

  .hero { padding: var(--s-5); }
  .hero__title { font-size: clamp(56px, 18vw, 120px); }
  .hero__foot { flex-direction: column; gap: var(--s-2); }

  /* Section hero */
  .section-hero {
    padding: calc(var(--nav-h) + var(--s-6)) var(--s-5) var(--s-6);
  }

  /* Page content */
  .page-content,
  .page-content-wide {
    padding: var(--s-6) var(--s-5) var(--s-8);
  }

  /* Layout */
  .page-layout {
    grid-template-columns: 1fr;
    padding: var(--s-5) var(--s-4) var(--s-7);
    gap: var(--s-4);
  }

  .sidebar { position: static; }
  .sidebar-mobile-header { display: block; padding: var(--s-3); }

  #main_menu {
    display: none;
    border-top: var(--bw) solid var(--line-soft);
    padding: var(--s-2) 0;
  }
  #main_menu.open { display: block; }

  /* About strip */
  .about-strip { padding: var(--s-5) var(--s-5); }

  /* Articles */
  .article { padding: var(--s-5) 0; }
  .article-title { font-size: var(--t-md); }

  /* Partners */
  .partners-strip { gap: var(--s-5); }

  /* Feature grid */
  .feature-grid { grid-template-columns: 1fr 1fr; }

  /* Contact grid */
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .navbar-inner { padding: 0 var(--s-4); }
  .hero-cta { font-size: var(--t-xs); padding: var(--s-3) var(--s-4); }
  .image-50 img,
  .image-75 img,
  .generalimgsmall img { max-width: 100%; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(48px, 20vw, 100px); }
  .infobar { grid-template-columns: 1fr 1fr; }
}
