/* ============================================
   OBLIGACJEPROSTO - design system
   Koncepcja: "KUPON" - papier wartościowy
   Głęboka zieleń (pieniądze) + złoto (kupon) + krem (papier)
   ============================================ */

/* --- Tokens: light (default) --- */
:root {
  --bg: #f7f2e7;
  --bg-soft: #efe8d7;
  --card-bg: #fdfaf2;
  --ink: #0c2e22;
  --ink-2: #0a241c;
  --panel-dark: #11382b;
  --text: #24332c;
  --muted: #5c6a62;
  --accent: #c9a227;
  --accent-deep: #7a5619;
  --profit: #25654a;
  --border: #ddd2ba;
  --border-soft: #e8e0cd;
  --header-bg: rgba(247, 242, 231, 0.92);
  --sidebar-bg: var(--ink);
  --sidebar-text: #e8e4d8;
  --sidebar-muted: #9db3a7;
  --code-bg: #efe8d7;
  --shadow-card: 0 1px 2px rgba(12, 46, 34, 0.06), 0 4px 14px rgba(12, 46, 34, 0.07);
  --shadow-card-hover: 0 6px 22px rgba(12, 46, 34, 0.12);
  --radius: 10px;
  --transition: all 0.2s ease-out;
  --header-h: 64px;
  --sidebar-w: 280px;
  --font-display: 'Libre Caslon Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Schibsted Grotesk', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* --- Tokens: dark --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #081f17;
    --bg-soft: #0c2e22;
    --card-bg: #11382b;
    --ink: #e8e4d8;
    --ink-2: #f2efdf;
    --panel-dark: #0a241c;
    --text: #e8e4d8;
    --muted: #9fb0a5;
    --accent: #c9a227;
    --accent-deep: #d9b64a;
    --profit: #6fbf92;
    --border: #1d4a3a;
    --border-soft: #16402f;
    --header-bg: rgba(8, 31, 23, 0.92);
    --sidebar-bg: #061a13;
    --sidebar-text: #e8e4d8;
    --sidebar-muted: #8fa397;
    --code-bg: #0a241c;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
    --shadow-card-hover: 0 6px 22px rgba(0, 0, 0, 0.4);
    --bond-paper: #f3ecd9;
    --bond-ink: #0c2e22;
    --bond-muted: #5c6a62;
    --bond-gold-deep: #8a6420;
  }
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(201, 162, 39, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(12, 46, 34, 0.09), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Accessibility --- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--accent); color: var(--ink-2);
  padding: 10px 18px; border-radius: 0 0 8px 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* --- Header --- */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.app-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.4), transparent);
  pointer-events: none;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink-2); white-space: nowrap;
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--ink-2); color: var(--accent);
}
.logo-text { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: 0.01em; }
.logo-text em { font-style: italic; color: var(--accent-deep); }
.header-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.header-search input {
  width: 100%; padding: 9px 14px 9px 36px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card-bg); color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem;
}
.header-search input::placeholder { color: var(--muted); }
.search-results {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1200;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover); overflow: hidden; max-height: 420px; overflow-y: auto;
}
.search-results a {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--bg-soft); }
.sr-ico { font-size: 1.1rem; line-height: 1.4; }
.sr-title { display: block; font-weight: 600; font-size: 0.88rem; }
.sr-exc { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.sr-empty { padding: 14px; color: var(--muted); font-size: 0.88rem; }
mark { background: rgba(201, 162, 39, 0.35); color: inherit; border-radius: 2px; padding: 0 2px; }

/* --- Mobile menu button --- */
.mobile-menu-btn {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 10px;
  background: none; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.mobile-menu-btn span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Sidebar --- */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 900;
  width: var(--sidebar-w);
  background: var(--sidebar-bg); color: var(--sidebar-text);
  overflow-y: auto; padding: 18px 0 40px;
  border-right: 1px solid rgba(201, 162, 39, 0.25);
}
.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.nav-home {
  display: block; margin: 2px 14px 10px; padding: 9px 12px;
  color: var(--sidebar-text); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  border-radius: 8px; transition: var(--transition);
}
.nav-home:hover { background: rgba(201, 162, 39, 0.15); }
.nav-home.active { background: rgba(201, 162, 39, 0.22); color: #fff; }
.nav-section {
  padding: 14px 16px 5px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
}
.sidebar-link {
  display: flex; align-items: center; gap: 8px;
  margin: 1px 10px; padding: 6px 10px;
  color: var(--sidebar-text); text-decoration: none;
  font-size: 0.9rem; line-height: 1.35; border-radius: 7px;
  transition: var(--transition);
}
.sidebar-link:hover { background: rgba(201, 162, 39, 0.14); transform: translateX(2px); }
.sidebar-link.active { background: rgba(201, 162, 39, 0.22); color: #fff; font-weight: 600; }
.sl-ico { font-size: 0.85rem; opacity: 0.85; flex-shrink: 0; }

/* --- Main --- */
.main-content {
  margin-left: var(--sidebar-w);
  padding: calc(var(--header-h) + 28px) 28px 60px;
  min-height: 100vh;
}
.content-article {
  max-width: 880px; margin: 0 auto;
  animation: fadeUp 0.28s ease-out;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 10px;
}
.breadcrumbs a { color: var(--accent-deep); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* --- Article --- */
.content-article h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 2.75rem);
  font-weight: 400; line-height: 1.15; margin: 0 0 10px;
  color: var(--ink-2); text-wrap: balance;
}
.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; margin-bottom: 22px; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: rgba(201, 162, 39, 0.18); color: var(--accent-deep);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.content-article h2 {
  font-family: var(--font-display);
  font-size: 1.55rem; font-weight: 400; line-height: 1.25;
  margin: 2.1em 0 0.6em; padding-bottom: 6px;
  color: var(--ink-2); border-bottom: 1px solid var(--border); text-wrap: balance;
}
.content-article h3 {
  font-size: 1.12rem; font-weight: 700; margin: 1.7em 0 0.5em;
  color: var(--ink-2); text-wrap: balance;
}
.content-article p { margin: 0 0 1em; }
.content-article ul, .content-article ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.content-article li { margin-bottom: 0.35em; }
.content-article a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.content-article a:hover { text-decoration-thickness: 2px; }
.content-article strong { font-weight: 700; }
.content-article em { font-style: italic; }
.content-article blockquote {
  margin: 1.2em 0; padding: 12px 18px;
  border-left: 3px solid var(--accent); background: var(--bg-soft);
  border-radius: 0 8px 8px 0; color: var(--text);
}
.content-article code {
  font-family: var(--font-mono); font-size: 0.82em;
  background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
}

/* --- TOC --- */
.article-toc {
  margin: 0 0 26px; padding: 16px 20px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.article-toc h3 {
  margin: 0 0 8px; font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-deep);
}
.article-toc a { display: block; padding: 3px 0; color: var(--text); text-decoration: none; font-size: 0.9rem; }
.article-toc a:hover { color: var(--accent-deep); text-decoration: underline; }
.article-toc .toc-h3 { padding-left: 16px; font-size: 0.85rem; color: var(--muted); }

/* --- Info / warn boxes --- */
.info-box, .warn-box {
  margin: 1.3em 0; padding: 14px 18px 14px 48px;
  border-radius: var(--radius); position: relative; font-size: 0.95rem;
}
.info-box::before, .warn-box::before {
  position: absolute; left: 16px; top: 14px; font-size: 1.15rem; line-height: 1;
}
.info-box {
  background: rgba(37, 101, 74, 0.1); border: 1px solid rgba(37, 101, 74, 0.35);
  color: var(--text);
}
.info-box::before { content: '💡'; }
.warn-box {
  background: rgba(201, 162, 39, 0.14); border: 1px solid rgba(201, 162, 39, 0.5);
  color: var(--text);
}
.warn-box::before { content: '⚠️'; }

/* --- Tables --- */
.table-responsive { overflow-x: auto; margin: 1.3em 0; border-radius: var(--radius); }
.compare-table, .error-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px;
}
.compare-table th, .error-table th {
  background: var(--ink-2); color: var(--bg);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: left; padding: 10px 14px; border: 1px solid var(--border);
}
.error-table th { background: #7a2433; color: #f7f2e7; }
.compare-table td, .error-table td { padding: 10px 14px; border: 1px solid var(--border); vertical-align: top; }
.compare-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.error-table tbody tr:nth-child(even) { background: rgba(122, 36, 51, 0.07); }
.compare-table tbody tr:hover, .error-table tbody tr:hover { background: rgba(201, 162, 39, 0.12); }

/* --- FAQ --- */
.faq-item {
  margin: 0 0 12px; padding: 14px 18px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.faq-item h3 {
  margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: var(--ink-2);
  display: flex; gap: 10px; align-items: baseline;
}
.faq-item h3::before {
  content: 'Q'; flex-shrink: 0;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  color: var(--accent-deep); border: 1px solid var(--accent-deep);
  border-radius: 5px; padding: 1px 6px;
}
.faq-item p { margin: 0; font-size: 0.93rem; }
.faq-item details summary { cursor: pointer; font-weight: 600; font-size: 0.98rem; }
.faq-item details p { margin-top: 8px; }

/* --- Glossary --- */
.glossary-list { margin: 1.2em 0; }
.glossary-list dt {
  font-weight: 700; color: var(--ink-2); margin-top: 14px;
  font-size: 0.98rem;
}
.glossary-list dt::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 8px; transform: rotate(45deg); }
.glossary-list dd { margin: 3px 0 0 16px; font-size: 0.92rem; color: var(--text); }

/* --- Checklist --- */
.checklist { list-style: none; padding-left: 4px; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 8px; }
.checklist li::before {
  content: ''; position: absolute; left: 2px; top: 4px;
  width: 16px; height: 16px; border: 2px solid var(--accent-deep); border-radius: 4px;
}

/* --- HOME: hero --- */
.home-hero {
  position: relative; overflow: hidden;
  margin: -8px -8px 34px; padding: 40px 36px 30px;
  background: linear-gradient(135deg, #0a241c 0%, #0c2e22 45%, #14563f 100%);
  color: #f2efdf;
  border-radius: 16px;
  box-shadow: var(--shadow-card-hover);
}
.home-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(201, 162, 39, 0.16), transparent 60%),
    radial-gradient(ellipse 45% 40% at 8% 90%, rgba(47, 125, 92, 0.25), transparent 60%);
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: #c9a227; margin-bottom: 12px;
}
.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.8vw, 3.1rem);
  font-weight: 400; line-height: 1.12; margin: 0 0 12px;
  color: #fff; text-wrap: balance; max-width: 640px;
}
.home-hero h1 em { font-style: italic; color: #c9a227; }
.home-hero > p { max-width: 620px; margin: 0 0 20px; color: #d9e4dc; font-size: 1.02rem; }
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.hero-cta {
  display: inline-block; padding: 11px 22px;
  background: #c9a227; color: #0c2e22;
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  border-radius: 999px; transition: var(--transition);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(201, 162, 39, 0.35); }
.hero-cta-outline {
  display: inline-block; padding: 10px 20px;
  background: transparent; color: #f2efdf;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: 1.5px solid rgba(201, 162, 39, 0.7); border-radius: 999px;
  transition: var(--transition);
}
.hero-cta-outline:hover { background: rgba(201, 162, 39, 0.14); transform: translateY(-2px); }
.hero-ac-wrap { display: flex; justify-content: center; margin: 18px 0 6px; }
.bond-svg { width: 100%; max-width: 560px; height: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35)); }

/* Bond animations */
.bond-ink { opacity: 0; animation: bondFade 0.55s ease-out 0.1s forwards; }
.bond-ink-2 { animation-delay: 0.35s; }
.bond-perf circle { opacity: 0; animation: bondFade 0.3s ease-out forwards; }
.bond-perf circle:nth-child(1) { animation-delay: 0.5s; }
.bond-perf circle:nth-child(2) { animation-delay: 0.58s; }
.bond-perf circle:nth-child(3) { animation-delay: 0.66s; }
.bond-perf circle:nth-child(4) { animation-delay: 0.74s; }
.bond-perf circle:nth-child(5) { animation-delay: 0.82s; }
.bond-perf circle:nth-child(6) { animation-delay: 0.9s; }
.bond-perf circle:nth-child(7) { animation-delay: 0.98s; }
.bond-perf circle:nth-child(8) { animation-delay: 1.06s; }
.bond-fade { opacity: 0; animation: bondFade 0.5s ease-out forwards; }
.bond-fade:nth-of-type(1) { animation-delay: 0.7s; }
.bond-fade:nth-of-type(2) { animation-delay: 0.85s; }
.bond-fade:nth-of-type(3) { animation-delay: 1.0s; }
.bond-fade:nth-of-type(4) { animation-delay: 1.1s; }
.bond-fade:nth-of-type(5) { animation-delay: 1.25s; }
.bond-fade:nth-of-type(6) { animation-delay: 1.4s; }
.bond-fade:nth-of-type(7) { animation-delay: 1.5s; }
.bond-chart {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: bondDraw 1.3s ease-out 1.1s forwards;
}
.bond-area {
  opacity: 0;
  animation: bondAreaFade 0.8s ease-out 1.0s forwards;
}
.bond-stamp {
  opacity: 0; transform-origin: 395px 70px;
  animation: bondStamp 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) 1.9s forwards;
}
.bond-coupons { opacity: 0; animation: bondFade 0.45s ease-out 2.4s forwards; }
.bond-coupons rect, .bond-coupons line { opacity: 0; animation: bondFade 0.35s ease-out forwards; }
.bond-coupons rect:nth-child(1), .bond-coupons line:nth-child(1) { animation-delay: 2.5s; }
.bond-coupons rect:nth-child(2) { animation-delay: 2.65s; }
.bond-coupons rect:nth-child(3) { animation-delay: 2.8s; }
.bond-coupons text:nth-child(4) { animation-delay: 2.6s; }
.bond-coupons text:nth-child(5) { animation-delay: 2.75s; }
.bond-coupons text:nth-child(6) { animation-delay: 2.9s; }
@keyframes bondFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bondAreaFade { from { opacity: 0; } to { opacity: 0.12; } }
@keyframes bondDraw { to { stroke-dashoffset: 0; } }
@keyframes bondStamp {
  0% { opacity: 0; transform: scale(2.4) rotate(-16deg); }
  55% { opacity: 1; transform: scale(0.92) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* --- Facts strip --- */
.facts-strip {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin: 6px 0 20px; padding: 14px 20px;
  background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 10px;
}
.fact { font-size: 0.8rem; color: #d9e4dc; display: inline-flex; align-items: center; gap: 7px; }
.fact-dot { width: 6px; height: 6px; border-radius: 50%; background: #c9a227; flex-shrink: 0; }

/* --- Hero stats --- */
.hero-stats { display: flex; gap: 34px; margin-top: 4px; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat .num { font-family: var(--font-display); font-size: 1.9rem; color: #c9a227; line-height: 1.1; }
.hero-stat .lbl { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #9db3a7; }

/* --- Home grid --- */
.home-section-label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 400; color: var(--ink-2);
  margin: 34px 0 14px; text-wrap: balance;
}
.home-section-label::before {
  content: ''; width: 10px; height: 10px; flex-shrink: 0;
  background: var(--accent); transform: rotate(45deg); border-radius: 2px;
}
.home-section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 16px; }
.home-card {
  display: flex; flex-direction: column;
  padding: 18px 18px 14px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.home-card:hover { transform: translateY(-2px); border-color: rgba(201, 162, 39, 0.6); box-shadow: var(--shadow-card-hover); }
.card-icon { font-size: 1.5rem; margin-bottom: 8px; }
.home-card h3 { margin: 0 0 6px; font-size: 0.95rem; font-weight: 700; color: var(--ink-2); line-height: 1.35; text-wrap: balance; }
.home-card p { margin: 0 0 12px; font-size: 0.85rem; line-height: 1.55; color: var(--muted); flex: 1; }
.card-meta {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em;
  color: var(--accent-deep); display: flex; align-items: center; gap: 6px;
}
.card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* --- 404 --- */
.error-page { text-align: center; padding: 80px 20px; }
.err-code {
  font-family: var(--font-display); font-size: 5rem; color: var(--accent);
  line-height: 1;
}
.error-page a { color: var(--accent-deep); }

/* --- Footer --- */
.app-footer {
  margin-left: var(--sidebar-w);
  padding: 26px 28px 34px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted); font-size: 0.85rem;
}
.app-footer .foot-note { margin-top: 6px; max-width: 760px; }
.app-footer a { color: var(--accent-deep); }
.foot-copy { margin-top: 10px; font-family: var(--font-mono); font-size: 0.75rem; }

/* --- Loading --- */
.loading { display: flex; justify-content: center; padding: 80px 0; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Glow orb (cursor) --- */
.glow-orb {
  position: fixed; top: 0; left: 0; z-index: 50; pointer-events: none;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.09), transparent 65%);
  transform: translate(-999px, -999px);
  will-change: transform;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .mobile-menu-btn { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
    width: min(320px, 84vw);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed; inset: 0; z-index: 850; display: none;
    background: rgba(8, 31, 23, 0.55);
  }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0; padding: calc(var(--header-h) + 20px) 16px 50px; }
  .app-footer { margin-left: 0; }
  .home-hero { padding: 30px 22px 24px; }
  .header-search { max-width: none; }
}

@media (max-width: 600px) {
  .logo-text { font-size: 1.2rem; }
  .app-header { padding: 0 12px; gap: 10px; }
  .home-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .content-article h1 { font-size: 1.8rem; }
  .home-hero h1 { font-size: 1.85rem; }
  .bond-svg { max-width: 420px; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .bond-ink, .bond-fade, .bond-perf circle, .bond-stamp, .bond-coupons, .bond-coupons rect, .bond-coupons line { opacity: 1; }
  .bond-area { opacity: 0.12; }
  .bond-chart { stroke-dashoffset: 0; }
  .glow-orb { display: none; }
}

/* --- Print --- */
@media print {
  .app-header, .sidebar, .sidebar-overlay, .mobile-menu-btn, .search-results, .glow-orb { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .content-article a { color: #000; text-decoration: underline; }
}
