/* ===== DESIGN TOKENS ===== */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transition */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

/* ===== LIGHT MODE (default) ===== */
:root, [data-theme="light"] {
  --color-bg:             #f4f2ed;
  --color-surface:        #faf8f4;
  --color-surface-2:      #fff;
  --color-surface-offset: #ece9e2;
  --color-divider:        #d6d2c9;
  --color-border:         #c8c3b8;

  --color-text:           #1a1e2e;
  --color-text-muted:     #5c6070;
  --color-text-faint:     #9ca0a8;
  --color-text-inverse:   #f4f2ed;

  --color-primary:        #1b3a5c;
  --color-primary-hover:  #142c47;
  --color-primary-active: #0e1f33;

  --color-accent:         #c4842b;
  --color-accent-hover:   #a36d1f;
  --color-accent-active:  #8a5c18;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --color-bg:             #0f1117;
  --color-surface:        #161820;
  --color-surface-2:      #1c1e28;
  --color-surface-offset: #12141c;
  --color-divider:        #252733;
  --color-border:         #2e3040;

  --color-text:           #d4d6de;
  --color-text-muted:     #8a8d9a;
  --color-text-faint:     #565860;
  --color-text-inverse:   #0f1117;

  --color-primary:        #6a9ec8;
  --color-primary-hover:  #84b0d6;
  --color-primary-active: #9ac0e0;

  --color-accent:         #daa04c;
  --color-accent-hover:   #e4b56e;
  --color-accent-active:  #ecc890;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0f1117;
    --color-surface:        #161820;
    --color-surface-2:      #1c1e28;
    --color-surface-offset: #12141c;
    --color-divider:        #252733;
    --color-border:         #2e3040;
    --color-text:           #d4d6de;
    --color-text-muted:     #8a8d9a;
    --color-text-faint:     #565860;
    --color-text-inverse:   #0f1117;
    --color-primary:        #6a9ec8;
    --color-primary-hover:  #84b0d6;
    --color-primary-active: #9ac0e0;
    --color-accent:         #daa04c;
    --color-accent-hover:   #e4b56e;
    --color-accent-active:  #ecc890;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ===== GLOBAL STYLES ===== */
body {
  font-family: var(--font-body);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
a:hover {
  color: var(--color-accent);
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  font-size: var(--text-sm);
}
.skip-link:focus {
  top: var(--space-2);
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #1b3a5c, #2a5298);
  border-bottom: none;
  box-shadow: 0 4px 16px rgba(27,58,92,0.35), 0 1px 4px rgba(0,0,0,0.15);
  transition: box-shadow 0.3s var(--ease-out);
}
.header--scrolled {
  box-shadow: 0 6px 24px rgba(27,58,92,0.45), 0 2px 6px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 10px var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
/* Header nav links white on gradient */
.nav-desktop a {
  color: rgba(255,255,255,0.85) !important;
}
.nav-desktop a.active,
.nav-desktop a:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.12) !important;
}
.theme-toggle {
  color: rgba(255,255,255,0.75) !important;
}
.theme-toggle:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.12) !important;
}
/* Mobile hamburger white */
.nav-toggle {
  color: rgba(255,255,255,0.9) !important;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-link:hover { opacity: 0.85; }
.logo-img {
  height: 88px;
  width: auto;
  object-fit: contain;
}
.logo-img--footer {
  height: 56px;
}

/* Logo theme switching */
.logo-img--dark { display: none; }
.logo-img--light { display: block; }

[data-theme="dark"] .logo-img--dark { display: block; }
[data-theme="dark"] .logo-img--light { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-img--dark { display: block; }
  :root:not([data-theme]) .logo-img--light { display: none; }
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.nav-desktop a {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition-interactive), background var(--transition-interactive);
  text-decoration: none;
}
.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.05);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
.mobile-menu-btn:hover { color: var(--color-text); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.05);
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* ===== PAGE SECTIONS ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% center;
}
@media (min-width: 768px) {
  .hero-img { object-position: center center; }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    oklch(from var(--color-bg) l c h / 0.95) 0%,
    oklch(from var(--color-bg) l c h / 0.6) 40%,
    oklch(from var(--color-bg) l c h / 0.15) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-16) var(--space-4) var(--space-12);
  width: 100%;
}
.hero h1 {
  font-size: var(--text-3xl);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  max-width: 16ch;
}
.hero p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 42ch;
  margin-bottom: var(--space-6);
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.hero-cta:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
}
.hero-cta:active {
  transform: translateY(0);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.hero-cta--secondary {
  background: transparent;
  color: var(--color-text-inverse);
  border: 1px solid currentColor;
}
.hero-cta--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text-inverse);
}

/* ===== SECTION SPACING ===== */
.section {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) var(--space-4);
}
.section-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.section-header {
  margin-bottom: var(--space-10);
}
.section-header h2 {
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.section-header p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 52ch;
}
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

/* ===== BLOG CARDS ===== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 640px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.blog-grid--featured {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .blog-grid--featured {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-8);
  }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive);
  cursor: pointer;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card:active {
  transform: translateY(0);
}
.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.card-body {
  padding: var(--space-5);
}
.card-meta {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}
.card-tag {
  color: var(--color-accent);
  font-weight: 600;
}
.card-body h3 {
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.card-body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Featured card large */
.card--featured .card-img {
  aspect-ratio: 16 / 9;
}
.card--featured .card-body h3 {
  font-size: var(--text-xl);
}
.card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: var(--space-3);
}
.card-read-more {
  display: inline-block;
  margin-top: var(--space-4);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.01em;
  transition: gap 0.2s ease;
}
.card--featured:hover .card-read-more {
  text-decoration: underline;
}

/* ===== SUBSONIC PILOT ===== */
.sp-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-10);
}
.sp-hero img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.sp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    oklch(from var(--color-bg) l c h / 0.85) 0%,
    oklch(from var(--color-bg) l c h / 0.3) 60%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  padding: var(--space-8);
}
.sp-hero-text h2 {
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.sp-hero-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 40ch;
}

.sp-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}
@media (min-width: 640px) {
  .sp-features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .sp-features { grid-template-columns: repeat(4, 1fr); }
}

.sp-feature {
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}
.sp-feature-icon {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.sp-feature h3 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.sp-feature p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.sp-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.sp-link:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}
.sp-link:active {
  transform: translateY(0);
}

/* ===== ABOUT ===== */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: start;
}
@media (min-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr 1fr;
  }
}
.about-img {
  border-radius: var(--radius-xl);
  width: 100%;
  object-fit: cover;
}
.about-text h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}
.about-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.about-value {
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
}
.about-value h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.about-value p {
  font-size: var(--text-xs);
  margin-bottom: 0;
}

/* ===== CONTACT ===== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr 1.2fr;
  }
}
.contact-info h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}
.contact-info p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}
.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.contact-detail svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.contact-form {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}
.form-group {
  margin-bottom: var(--space-5);
}
.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.btn-submit:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}
.btn-submit:active {
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.footer {
  background: #f0f4f8;
  border-top: none;
  padding: var(--space-8) var(--space-4) var(--space-6);
  margin-top: var(--space-16);
  position: relative;
  overflow: hidden;
  box-shadow: 0 -4px 16px rgba(27,58,92,0.12), 0 -1px 4px rgba(0,0,0,0.06);
}
[data-theme="dark"] .footer {
  background: #111c27;
}
/* Mountain silhouette SVG watermark */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1280 60' preserveAspectRatio='none' fill='none' stroke='%233a5a7c' stroke-width='1.5'%3E%3Cpolyline points='0,60 40,42 90,50 140,28 200,38 260,18 310,32 360,10 420,24 470,36 520,14 580,30 640,8 700,22 750,34 800,12 860,26 920,6 970,20 1020,32 1070,16 1120,28 1170,10 1220,24 1280,60'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  opacity: 0.12;
  pointer-events: none;
}
.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.footer-brand p {
  font-size: var(--text-xs);
  color: #6b7c8e;
  max-width: 36ch;
  margin-top: var(--space-3);
}
[data-theme="dark"] .footer-brand p { color: var(--color-text-faint); }
.footer-links {
  display: flex;
  gap: var(--space-8);
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: #8a9bae;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}
[data-theme="dark"] .footer-col h4 { color: var(--color-text-faint); }
.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: #4a5c6e;
  padding: var(--space-1) 0;
  text-decoration: none;
}
[data-theme="dark"] .footer-col a { color: var(--color-text-muted); }
.footer-col a:hover {
  color: #1b3a5c;
}
[data-theme="dark"] .footer-col a:hover { color: var(--color-text); }
.footer-bottom {
  max-width: var(--content-wide);
  margin: var(--space-4) auto 0;
  padding-top: var(--space-3);
  border-top: 1px solid #d8e0ea;
  font-size: var(--text-xs);
  color: #8a9bae;
[data-theme="dark"] .footer-bottom { border-color: oklch(from var(--color-text) l c h / 0.06); color: var(--color-text-faint); }
}

/* ===== BLOG POST LAYOUT ===== */
.post-layout {
  max-width: var(--content-narrow);
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: var(--space-6);
  transition: color var(--transition-interactive);
}
.post-back:hover {
  color: var(--color-text);
}
.post-meta {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}
.post-title {
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-6);
  line-height: 1.15;
}
.post-hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  aspect-ratio: 21 / 9;
  margin-bottom: var(--space-8);
}
.post-inline-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  margin: var(--space-8) 0;
}
.post-content {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
}
.post-content h2 {
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}
.post-content p {
  margin-bottom: var(--space-4);
}
.post-content p:last-child {
  margin-bottom: 0;
}

/* Article tables */
.post-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-4) 0 var(--space-6);
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.9rem;
  min-width: 28rem;
}
.post-content table thead {
  background: var(--color-surface-offset);
}
.post-content table th {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}
.post-content table td {
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
  white-space: nowrap;
}
.post-content table tbody tr:last-child td {
  border-bottom: none;
}
.post-content table td strong {
  color: var(--color-text);
}
@media (max-width: 600px) {
  .post-content table {
    font-size: 0.875rem;
  }
}

/* Card as link reset */
a.card {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.card:hover {
  color: inherit;
}

/* ===== POST SHARE ===== */
.post-share {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-5);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  flex-wrap: wrap;
}
.post-share__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.post-share__buttons {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}
.post-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  padding: 0;
  font: inherit;
}
.post-share__btn:hover,
.post-share__btn:focus-visible {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: oklch(from var(--color-primary) l c h / 0.08);
  outline: none;
}
.post-share__btn:active {
  transform: scale(0.96);
}
.post-share__btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.post-share__btn.is-copied {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: oklch(from var(--color-primary) l c h / 0.12);
}
.post-share__toast {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
  margin-left: var(--space-2);
}
.post-share__toast.is-visible {
  opacity: 1;
}

/* ===== AUTHOR BIO ===== */
.author-bio {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-10);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  background: oklch(from var(--color-bg-alt) l c h / 0.6);
}
.author-bio__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid oklch(from var(--color-text) l c h / 0.08);
}
.author-bio__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.author-bio__label {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.author-bio__text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 480px) {
  .author-bio { flex-direction: column; text-align: center; }
}

/* ===== SCROLL REVEAL ===== */
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}
@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ===== DIVIDER ===== */
.section-alt {
  background: var(--color-surface-offset);
}

/* ===== CALCULATOR ===== */
.calc-page {
  min-height: calc(100vh - 200px);
}

/* Hero */
.calc-hero {
  background: linear-gradient(135deg, #1b3a5c 0%, #2a5298 100%);
  padding: var(--space-12) var(--space-4) var(--space-10);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.calc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06), transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(196,132,43,0.08), transparent 50%);
  pointer-events: none;
}
.calc-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.calc-hero .section-label {
  color: #daa04c;
  opacity: 0.95;
}
.calc-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: var(--space-3) 0 var(--space-4);
  color: #fff;
}
.calc-hero-subtitle {
  font-size: var(--text-base);
  max-width: 60ch;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin: 0;
}

/* Body */
.calc-body {
  padding: var(--space-10) var(--space-4) var(--space-16);
  max-width: 1100px;
  margin: 0 auto;
}
.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 900px) {
  .calc-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: var(--space-10);
    align-items: start;
  }
}

/* Form column */
.calc-form-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}
.calc-section {
  padding: var(--space-6);
  background: var(--color-bg);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.calc-section-heading {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
}
.calc-section-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
  opacity: 0.5;
  line-height: 1;
  flex-shrink: 0;
}
.calc-section-heading h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin: 0 0 var(--space-1);
  color: var(--color-text);
  line-height: 1.1;
}
.calc-section-heading p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}
.calc-field--full { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .calc-grid { grid-template-columns: 1fr; }
}
.calc-field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.calc-field input[type="number"],
.calc-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid oklch(from var(--color-text) l c h / 0.15);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-base);
  font-family: var(--font-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.calc-field input[type="number"]:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

/* Input prefix/suffix */
.calc-input-wrap {
  position: relative;
  display: block;
}
.calc-input-wrap[data-prefix]::before {
  content: attr(data-prefix);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  font-size: var(--text-base);
  pointer-events: none;
  font-family: var(--font-body);
}
.calc-input-wrap[data-prefix] input {
  padding-left: 28px;
}
.calc-input-wrap[data-suffix]::after {
  content: attr(data-suffix);
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  pointer-events: none;
  font-family: var(--font-body);
}
.calc-input-wrap[data-suffix] input {
  padding-right: 60px;
}

/* Pills */
.calc-pills {
  display: inline-flex;
  padding: 4px;
  background: oklch(from var(--color-text) l c h / 0.04);
  border-radius: var(--radius-md);
  gap: 2px;
}
.calc-pill {
  position: relative;
  cursor: pointer;
  padding: 8px 20px;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: calc(var(--radius-md) - 4px);
  transition: background 0.15s ease, color 0.15s ease;
  color: var(--color-text-muted);
}
.calc-pill input { position: absolute; opacity: 0; pointer-events: none; }
.calc-pill:has(input:checked) {
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Results column */
.calc-results-col {
  position: relative;
}
.calc-results-sticky {
  background: linear-gradient(180deg, #1b3a5c 0%, #163050 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(27,58,92,0.25);
}
.calc-results-header {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.calc-results-header .section-label {
  color: #daa04c;
}
.calc-results-meta {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.65);
  margin: var(--space-2) 0 0;
}

.calc-hero-stat {
  margin-bottom: var(--space-5);
}
.calc-hero-stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-2);
}
.calc-hero-stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  line-height: 1;
  color: #fff;
  margin-bottom: var(--space-2);
}
.calc-hero-stat-footer {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.55);
}

.calc-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.calc-mini-stat {
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.08);
}
.calc-mini-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-1);
}
.calc-mini-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: #fff;
}

.calc-vs-rental {
  padding: var(--space-4);
  background: rgba(218,160,76,0.12);
  border: 1px solid rgba(218,160,76,0.25);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}
.calc-vs-label {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: #daa04c;
  margin-bottom: var(--space-1);
}
.calc-vs-sub {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
}

.calc-breakdown {
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
}
.calc-breakdown summary {
  cursor: pointer;
  font-weight: 500;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.85);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calc-breakdown summary::-webkit-details-marker { display: none; }
.calc-breakdown summary::after {
  content: '+';
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.5);
  transition: transform 0.2s ease;
}
.calc-breakdown[open] summary::after { content: '−'; }
.calc-breakdown-list {
  margin: var(--space-4) 0 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}
.calc-breakdown-list dt {
  color: rgba(255,255,255,0.65);
  font-weight: 400;
}
.calc-breakdown-list dd {
  color: #fff;
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Download button - prominent CTA */
.calc-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: #daa04c;
  color: #1b3a5c;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(218,160,76,0.2);
}
.calc-download-btn svg {
  flex-shrink: 0;
  display: block;
}
.calc-download-btn span {
  display: inline-block;
  line-height: 1;
}
.calc-download-btn:hover {
  background: #e8ae58;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(218,160,76,0.3);
}
.calc-download-btn:active { transform: translateY(0); }
.calc-download-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.calc-download-status {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  min-height: 1em;
  text-align: center;
  color: rgba(255,255,255,0.7);
}
.calc-download-status.calc-email-status--success { color: #7bc98a; }
.calc-download-status.calc-email-status--error { color: #f08585; }

.calc-disclaimer {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.08);
  line-height: 1.5;
  font-style: italic;
}

/* ===== POST CTA ===== */
.post-cta {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--color-primary);
  background: oklch(from var(--color-primary) l c h / 0.08);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.post-cta p { margin: 0; }

/* ===== LIGHTBOX (acronym cards) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 40, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
  cursor: zoom-out;
}
.lightbox--open {
  display: flex;
  animation: lightbox-fade 0.15s ease-out;
}
@keyframes lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox__img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  cursor: default;
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox__close:hover {
  background: rgba(255,255,255,0.22);
}
img.acronym-card-img {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
img.acronym-card-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ===== KAPA WEATHER ===== */
.wx {
  max-width: 52rem;
}
.wx-status {
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}
.wx-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
.wx-kicker {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.wx-cat,
.wx-da {
  font-size: var(--text-2xl);
  font-family: "Instrument Serif", serif;
}
.wx-cat[data-cat="vfr"] { color: #1f7a3a; }
.wx-cat[data-cat="mvfr"] { color: #1d4ed8; }
.wx-cat[data-cat="ifr"] { color: #b45309; }
.wx-cat[data-cat="lifr"] { color: #b91c1c; }
.wx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-6);
}
.wx-grid dt {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wx-grid dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}
.wx-raw {
  white-space: pre-wrap;
  font-size: var(--text-xs);
  line-height: 1.5;
  padding: var(--space-4);
  overflow-x: auto;
  margin: 0 0 var(--space-6);
}
.wx-sub {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.wx-taf {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
}
.wx-taf li {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border, rgba(0,0,0,0.12));
  font-size: var(--text-sm);
}
.wx-taf strong {
  display: block;
  margin-bottom: 0.2rem;
}
.wx-note {
  font-size: var(--text-xs);
  max-width: 42rem;
}
