/* ==========================================================================
   KIBORRate.pk - Professional Financial Website Stylesheet
   --------------------------------------------------------------
   Every colour used on the site lives in the CSS variables below so the
   theme is easy to maintain. Dark mode simply overrides the variables via
   <html data-theme="dark">. The site remembers the choice (localStorage).
   ========================================================================== */

:root {
  color-scheme: light;

  /* Palette - green theme */
  --green:       #0f9d6b;
  --green-dark:  #0b7d55;
  --green-light: #12b07a;
  --gold:        #d4a017;
  --text:        #2b3440;
  --text-muted:  #66707e;
  --bg:          #f4f6f9;
  --white:       #ffffff;
  --border:      #e3e8ef;
  --radius:      10px;
  --shadow:      0 4px 18px rgba(12, 74, 60, 0.08);
  --shadow-lg:   0 10px 34px rgba(12, 74, 60, 0.16);

  /* Semantic aliases used across the stylesheet */
  --brand:          var(--green);
  --brand-dark:     var(--green-dark);
  --brand-light:    var(--green-light);
  --brand-soft:     #e8f3ee;   /* pale green wash */
  --accent:         var(--gold);
  --on-accent:      #0b3d2e;   /* dark text on gold */

  /* Header / footer / topbar / hero surfaces (green) */
  --header-bg:      #0c4a3c;
  --header-soft:    rgba(255, 255, 255, 0.12);
  --footer-bg:      #072a22;
  --topbar-bg:      #06251d;
  --hero-from:      #0c4a3c;
  --hero-to:        #0e6a4f;
  --pagehead-from:  #0c4a3c;
  --pagehead-to:    #0e6a4f;

  /* App surfaces */
  --bg-alt:         #eef2f7;
  --surface:        var(--white);
  --surface-muted:  #f8fafc;
  --surface-hover:  #eef4f0;

  /* Text on dark surfaces */
  --on-dark:        var(--white);
  --on-dark-soft:   #d7e2ee;
  --on-dark-muted:  #b9c7d8;

  /* Status */
  --success:        #16a34a;
  --danger:         #dc2626;

  /* Misc */
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Dark mode - overrides the variables only
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;

  --brand:          #14b37f;
  --brand-dark:     #0e8f61;
  --brand-soft:     #0d2b20;
  --accent:         #e0b13a;
  --on-accent:      #14251f;

  --header-bg:      #07241c;
  --header-soft:    rgba(255, 255, 255, 0.08);
  --footer-bg:      #041410;
  --topbar-bg:      #03100b;
  --hero-from:      #06201a;
  --hero-to:        #0a3b2c;
  --pagehead-from:  #06201a;
  --pagehead-to:    #0a3b2c;

  --bg:             #0e1419;
  --bg-alt:         #121a21;
  --surface:        #182129;
  --surface-muted:  #1d2832;
  --surface-hover:  #22313c;

  --text:           #e7ecf3;
  --text-muted:     #94a3b8;

  --border:         #2b3947;

  --shadow:    0 4px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 34px rgba(0, 0, 0, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }

/* Centered reusable wrapper - used once inside every section */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------- Top bar */
.topbar {
  background: var(--topbar-bg);
  color: var(--on-dark-muted);
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 6px 20px;
  gap: 4px 16px;
}
.topbar a { color: var(--on-dark-muted); }
.topbar a:hover { color: var(--on-dark); }

/* ---------------------------------------------------------------- Header */
header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 45px; width: auto; }

/* Main navigation: pushed to the right; theme switch sits beside it */
.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.main-nav ul { list-style: none; display: flex; gap: 4px; }
.main-nav a {
  display: block;
  color: var(--on-dark-soft);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover,
.main-nav a.active { background: var(--header-soft); color: var(--on-dark); }

/* Logo shown inside the full-screen mobile menu only */
.menu-logo { display: none; }
@media (min-width: 1025px) {
  .menu-logo { display: none !important; }
}

/* Theme switch (sun / moon) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--header-soft);
  color: var(--on-dark);
  cursor: pointer;
  transition: background 0.15s;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hamburger / close toggle (tablet & mobile only) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--header-soft);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: var(--on-dark);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.active .icon-hamburger { display: none; }
.nav-toggle.active .icon-close { display: block; }

/* ---------------------------------------------------------------- Hero */
.hero {
  background:
    linear-gradient(135deg, var(--hero-from), var(--hero-to)),
    url("../images/logo.png") no-repeat right bottom / 220px;
  color: var(--on-dark);
  padding: 54px 0 58px;
}
.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.hero p { max-width: 640px; color: var(--on-dark-soft); font-size: 1.02rem; }
.hero .updated { display: inline-block; margin-top: 16px; font-size: 0.85rem; color: var(--on-dark-muted); }
.hero .updated b { color: var(--accent); }

/* ---------------------------------------------------------------- Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* -------------------------------------------------------- PDF library card */
.pdf-card {
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pdf-card:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.pdf-card-body { min-width: 0; }
.pdf-card-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.pdf-card-title a {
  color: var(--brand-dark);
  text-decoration: none;
  min-width: 0;
}
.pdf-card-title a:hover { color: var(--brand); text-decoration: underline; }
.pdf-card-title .badge { margin-left: 0; flex-shrink: 0; white-space: nowrap; }
.pdf-card-date {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.pdf-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pdf-btn i { font-size: 0.85rem; }
.pdf-btn-view {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand-dark);
}
.pdf-btn-view:hover { background: var(--brand); color: var(--on-dark); }
.pdf-btn-download {
  background: var(--brand);
  color: var(--on-dark);
}
.pdf-btn-download:hover { background: var(--brand-dark); color: var(--on-dark); }
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: var(--brand);
  color: var(--on-dark);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-share i { font-size: 0.85rem; }
.btn-share:hover { background: var(--brand-dark); color: var(--on-dark); }

.pdf-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section { padding: 38px 0; }
.section-title {
  display: block;
  margin-bottom: 18px;
}
.section-title h2 { color: var(--text); font-size: 1.4rem; margin-bottom: 4px; }
.section-title p { color: var(--text-muted); font-size: 0.92rem; margin: 0 0 4px; }
.section-title .btn { margin-top: 4px; }

/* ---------------------------------------------------------------- Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

table.kibor-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
}
table.kibor-table th,
table.kibor-table td { padding: 13px 18px; text-align: left; }
table.kibor-table thead th {
  background: var(--header-bg);
  color: var(--on-dark);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 3px solid var(--brand);
}
table.kibor-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
table.kibor-table thead th:last-child { border-radius: 0 var(--radius) 0 0; }
table.kibor-table tbody td {
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
  font-variant-numeric: tabular-nums;
}
table.kibor-table tbody tr:nth-child(even) { background: var(--surface-muted); }
table.kibor-table tbody tr:hover { background: var(--surface-hover); }
table.kibor-table tbody tr:last-child td:first-child { border-radius: 0 0 0 var(--radius); }
table.kibor-table td .rate-delta { margin-left: 4px; font-size: 0.72rem; white-space: nowrap; }
table.kibor-table td .rate-delta i { font-size: 0.6rem; margin-right: 2px; }
table.kibor-table tbody tr:last-child td:last-child { border-radius: 0 0 var(--radius) 0; }
table.kibor-table tbody tr:last-child td { border-bottom: 0; }
table.kibor-table td:first-child { font-weight: 600; color: var(--text); }
table.kibor-table td.num,
table.kibor-table th.num { text-align: center; }

/* ---------------------------------------------------------------- Chart */
.chart-card { padding: 20px; min-width: 0; }
.chart-card h3 { color: var(--text); font-size: 1.05rem; margin-bottom: 2px; }
.chart-card > p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 14px; }
.chart-wrap { position: relative; height: 320px; min-width: 0; overflow: hidden; }
.grid > .card { min-width: 0; }

.chart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chart-controls label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chart-controls select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  min-width: 130px;
}
.chart-controls select:focus { outline: none; border-color: var(--brand); }

.custom-tenors { gap: 8px; }
.cc-tenor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cc-tenor:hover { border-color: var(--brand); }
.cc-tenor input { accent-color: var(--brand); cursor: pointer; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button {
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-muted);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--brand); color: #fff; }
.seg-btn {
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 14px;
}
.range-tabs button {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.range-tabs button:hover { border-color: var(--brand); color: var(--brand-dark); }
.range-tabs button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.rate-delta { font-size: 0.8rem; font-weight: 700; margin-left: 8px; }
.rate-delta.up { color: var(--success); }
.rate-delta.down { color: var(--danger); }
.rate-delta.flat { color: var(--accent); }

.badge {
  display: inline-block;
  background: var(--brand);
  color: var(--on-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.badge.gold {
  background: linear-gradient(135deg, #ffd76b, #f0a90f);
  color: #4a3300;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 4px rgba(224, 165, 14, 0.45);
  letter-spacing: 0.8px;
}

/* ---------------------------------------------------------------- Grid */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.feature { padding: 22px; text-align: center; }
.feature .icon {
  width: 52px; height: 52px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 50%;
}
.feature h3 { color: var(--text); font-size: 1rem; margin-bottom: 6px; }
.feature p { color: var(--text-muted); font-size: 0.88rem; }
.feature.feature-active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.feature.feature-active h3 { color: var(--brand-dark); }

/* ---------------------------------------------------------------- Steps */
.step { padding: 26px 22px; text-align: center; }
.step .step-num {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 6px 16px rgba(15, 157, 107, 0.35);
}
.step h3 { color: var(--text); font-size: 1.02rem; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.88rem; }

/* ---------------------------------------------------------------- Explore link cards */
a.card.feature { text-decoration: none; display: block; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
a.card.feature:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); transform: translateY(-3px); }

/* ---------------------------------------------------------------- CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: var(--on-dark);
  padding: 42px 0;
}
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 1.5rem; margin-bottom: 6px; }
.cta-band p { color: var(--on-dark-soft); max-width: 560px; font-size: 0.95rem; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-light:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-gold { background: var(--accent); color: var(--on-accent); }
.btn-gold:hover { background: #c08f14; color: #fff; }

/* ---------------------------------------------------------------- Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.stat .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat .value { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-top: 4px; }
.stat .value small { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.stat .value-pair { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.stat .value-pair span { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: baseline; }
.stat .value-pair em { font-style: normal; font-weight: 600; margin-right: auto; }
.stat .value-pair b { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.stat .value-pair .rate-delta { font-size: 0.7rem; font-weight: 700; margin-left: 5px; color: var(--text); }
.stat .value-pair .rate-delta.up { color: var(--success); }
.stat .value-pair .rate-delta.down { color: var(--danger); }
.stat .value-pair .rate-delta.flat { color: var(--accent); }
.stat .value-pair .rate-delta i { font-size: 0.62rem; margin-right: 2px; }
.stat .delta { font-size: 0.78rem; margin-top: 6px; font-weight: 600; }
.stat .delta.up { color: var(--success); }
.stat .delta.down { color: var(--danger); }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--on-dark);
  font-weight: 600;
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--brand-dark); color: var(--on-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--brand); color: var(--brand-dark); }
.btn-outline:hover { background: var(--brand); color: var(--on-dark); }
.btn-block { display: block; width: 100%; text-align: center; }

.tenors-cta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* ---------------------------------------------------------------- Content */
.content { max-width: 820px; margin: 0 auto; }
.content h1 { color: var(--text); font-size: 1.8rem; margin: 8px 0 6px; }
.content h2 { color: var(--text); font-size: 1.25rem; margin: 26px 0 10px; }
.content h2.blog-article-title { font-size: 1.5rem; margin: 10px 0 14px; }
.content h3 { color: var(--text); font-size: 1.05rem; margin: 20px 0 8px; }
.content p { margin: 10px 0; }
.content ul, .content ol { margin: 10px 0 10px 22px; }
.content li { margin: 5px 0; }
.content blockquote {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  padding: 12px 16px;
  margin: 14px 0;
  color: var(--text);
  border-radius: 0 8px 8px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before {
  content: "\203A";
  margin: 0 8px;
  color: var(--on-dark-muted);
}
.breadcrumb a { color: var(--brand-dark); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: #94a3b8; font-weight: 600; }

/* ---------------------------------------------------------------- Contact */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.contact-card h3 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-card p { margin: 0; }
.contact-card a { font-weight: 600; }

/* ---------------------------------------------------------------- Footer */
footer {
  background: var(--footer-bg);
  color: var(--on-dark-muted);
  margin-top: auto;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 30px;
  padding: 42px 30px;
}
.footer-grid h4 { color: var(--on-dark); font-size: 0.95rem; margin-bottom: 14px; letter-spacing: 0.4px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--on-dark-muted); }
.footer-grid a:hover { color: var(--accent); }
.footer-about p { font-size: 0.85rem; margin-top: 10px; }
.footer-logo { margin-bottom: 14px; }
.footer-logo img { height: 36px; }
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-dark-muted);
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.footer-social a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
  font-size: 0.82rem;
}
.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: var(--on-dark-muted); margin-left: 12px; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- Blog */
.blog-post {
  padding: 12px;
  display: block;
  overflow: hidden;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
}
.blog-post:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--text); }
.blog-post .blog-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: calc(var(--radius) - 3px);
}
.blog-post .blog-post-body { padding: 12px 8px 6px; }
.blog-post .date { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.blog-post h3 { color: var(--text); margin: 8px 0; font-size: 1.08rem; }
.blog-post h2.blog-card-title { color: var(--text); margin: 8px 0; font-size: 1.08rem; font-weight: 600; }
.blog-post p { color: var(--text-muted); font-size: 0.9rem; }
.blog-post .more { color: var(--brand-dark); font-weight: 600; font-size: 0.88rem; }

.blog-hero {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  margin-bottom: 18px;
}

/* ---------------------------------------------------------------- FAQ */
.faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: start;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq-item.open {
  border-color: var(--brand);
  box-shadow: inset 4px 0 0 var(--brand), var(--shadow-lg);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  text-align: left;
}
.faq-q:hover { color: var(--brand-dark); }
.faq-item h3.faq-q-wrap { margin: 0; font-size: inherit; line-height: inherit; }
.faq-q::before {
  content: '+';
  flex: 0 0 30px;
  height: 30px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  transform: rotate(0deg);
  transition: transform 0.25s ease, background 0.25s ease;
}
.faq-item.open .faq-q::before { transform: rotate(135deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-a { max-height: 500px; }
.faq-a p {
  padding: 0 18px 18px 62px;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.65;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}
.faq-item.open .faq-a p {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------------- Page head */
.page-head {
  background: linear-gradient(135deg, var(--pagehead-from), var(--pagehead-to));
  color: var(--on-dark);
  padding: 38px 0;
}
.page-head h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-bottom: 6px; }
.page-head p { color: var(--on-dark-soft); max-width: 700px; }

/* ---------------------------------------------------------------- Misc */
.note {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin: 14px 0;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.rate-ticker {
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 0;
  text-align: center;
}

/* ---------------------------------------------------------------- Back to top */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-dark);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.2s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--brand-dark); }
.back-to-top i { font-size: 1.1rem; line-height: 1; }

/* ---------------------------------------------------------------- Ads */
.ad-responsive,
.ad-medium,
.ad-large,
.ad-leaderboard {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 28px auto;
  overflow: hidden;
  text-align: center;
}
.ad-responsive > *,
.ad-medium > *,
.ad-large > *,
.ad-leaderboard > * { max-width: 100%; }
.ad-responsive iframe,
.ad-medium iframe,
.ad-large iframe,
.ad-leaderboard iframe,
.ad-responsive ins,
.ad-medium ins,
.ad-large ins,
.ad-leaderboard ins,
.ad-responsive img,
.ad-medium img,
.ad-large img,
.ad-leaderboard img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}
.ad-medium { max-width: 300px; }
.ad-large { max-width: 336px; }
.ad-leaderboard { max-width: 728px; }

/* ---------------------------------------------------------------- Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 22px;
}
.result-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.result-count strong {
  color: var(--text);
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-field span {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.filter-field label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.filter-field input[type="search"] {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}
.filter-field input[type="search"]:focus { outline: none; border-color: var(--brand); }
.filter-reset { padding: 9px 18px; }

/* -------------------------------------------------------- PDF library search */
.pdf-search {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pdf-search label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.pdf-search-field {
  position: relative;
  display: flex;
  align-items: center;
}
.pdf-search-field i {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.pdf-search-field input[type="search"] {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pdf-search-field input[type="search"]::placeholder { color: var(--text-muted); }
.pdf-search-field input[type="search"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.pdf-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }

/* ---------------------------------------------------------------- Header search */
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--on-dark-soft);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.search-toggle:hover { background: var(--header-soft); color: var(--on-dark); }

.menu-search {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}
.menu-search i { color: var(--text-muted); font-size: 0.9rem; }
.menu-search input {
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 8px 0;
  width: 100%;
  outline: none;
}

/* Search overlay - opens centered on screen */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 20px 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}
.search-overlay.open { display: flex; }
.search-overlay-box {
  width: min(600px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-overlay-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.search-overlay-field > i { color: var(--brand); font-size: 1.1rem; }
.search-overlay-field input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  outline: none;
}
.search-overlay-field input::placeholder { color: var(--text-muted); }
.search-overlay-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.search-overlay-close:hover { color: var(--text); }
.search-results { max-height: 55vh; overflow-y: auto; }
.search-results-note {
  padding: 18px 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.search-result {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.12s;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--brand-soft); }
.search-result-title { color: var(--brand-dark); font-weight: 600; font-size: 0.98rem; }
.search-result-desc { color: var(--text-muted); font-size: 0.86rem; }
.filter-field select {
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}
.filter-field select:focus { outline: none; border-color: var(--brand); }

/* ---------------------------------------------------------------- Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 26px 0 6px;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.page-link i { line-height: 1; }
.page-link i.fa-angle-left { margin-right: 6px; }
.page-link i.fa-angle-right { margin-left: 6px; }
.page-link:hover:not(.disabled):not(.active) { border-color: var(--brand); color: var(--brand); }
.page-link.active { background: var(--brand); border-color: var(--brand); color: var(--on-dark); }
.page-link.disabled { opacity: 0.45; pointer-events: none; }
.page-gap { padding: 0 4px; color: var(--text-muted); }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  /* Hamburger toggle + full-screen slide-in menu (tablet & mobile only) */
  .nav-toggle { display: inline-flex; z-index: 160; }
  .theme-toggle { margin-left: auto; }
  .search-toggle { display: none; }
  .menu-search { display: flex; width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 2px 14px; margin-bottom: 18px; }
  .main-nav {
    position: fixed;
    inset: 0;
    height: 100%;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    background: var(--header-bg);
    padding: 92px 28px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 150;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav .menu-logo { display: flex; margin-bottom: 24px; }
  .menu-logo img { height: 46px; }
  .main-nav ul { flex-direction: column; width: 100%; gap: 6px; }
  .main-nav ul a { font-size: 1.12rem; padding: 12px 14px; border-radius: 8px; }
  .main-nav .theme-toggle { margin-top: 28px; align-self: flex-start; }
  header .container { padding: 10px 16px; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-social { justify-content: center; }
  .footer-logo { justify-content: center; }
  .footer-grid ul li { text-align: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-bottom-bar { justify-content: center; }
  .pdf-search { flex-basis: 100%; }
  .pdf-filters { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .pdf-filters .filter-field select { width: 100%; }
  .pdf-filters .filter-reset { width: auto; flex: 0 0 auto; }
  .pdf-filters .filter-field { min-width: 0; flex: 1 1 30%; }
  .pdf-card { padding: 16px; flex-direction: column; align-items: stretch; }
  .pdf-card-actions { width: 100%; justify-content: center; }
  .pdf-card-actions .pdf-btn { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 7px 12px; font-size: 0.8rem; }
  .pdf-card-actions .btn-share { flex: 1 1 100%; justify-content: center; padding: 7px 12px; font-size: 0.8rem; }

  /* KIBOR tables on mobile: keep the normal table UI, just let it fit the
     content width (smaller padding/font, no forced min-width) so there is no
     horizontal scroll */
  table.kibor-table { min-width: 0; }
  table.kibor-table th,
  table.kibor-table td { padding: 11px 10px; font-size: 0.88rem; }
  table.kibor-table thead th { font-size: 0.72rem; letter-spacing: 0.4px; }
  table.kibor-table td .rate-delta { font-size: 0.68rem; }
}

@media (max-width: 480px) {
  .pdf-filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .pdf-filters .filter-field { flex: 1 1 30%; width: auto; }
  .pdf-filters .filter-reset { width: auto; flex: 0 0 auto; }
  .pdf-search-field input[type="search"] { font-size: 1rem; }
  .filter-field select { font-size: 1rem; }
  .pdf-card-actions { flex-direction: row; flex-wrap: wrap; }
  .pdf-card-actions .pdf-btn { flex: 1 1 calc(50% - 4px); padding: 7px 12px; font-size: 0.8rem; }
  .pdf-card-actions .btn-share { flex: 1 1 100%; padding: 7px 12px; font-size: 0.8rem; }
}

/* Very narrow screens: single-column stats so each card gets full width */
@media (max-width: 340px) {
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .stat { padding: 13px 14px; }
}

/* ---------------------------------------------------------------- Calculator */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.calc-panel { padding: 26px; }
.calc-title { font-size: 1.05rem; color: var(--text); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

.calc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.calc-field > label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 600;
}
.calc-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 0.15s;
}
.calc-input:focus { outline: none; border-color: var(--brand); }
select.calc-input { cursor: pointer; }
.calc-hint { font-size: 0.8rem; color: var(--text-muted); }
.calc-field .seg { align-self: flex-start; }

.calc-results { background: linear-gradient(180deg, var(--surface-muted), var(--surface)); }

.calc-summary {
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calc-summary-label { font-size: 0.82rem; font-weight: 600; color: var(--brand-dark); letter-spacing: 0.3px; text-transform: uppercase; }
.calc-summary-value { font-size: 1.65rem; font-weight: 800; color: var(--text); line-height: 1.2; word-break: break-word; }

.result-rows { margin: 0 0 14px; }
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}
.result-row:last-child { border-bottom: 0; }
.result-row dt { font-size: 0.88rem; color: var(--text-muted); }
.result-row dd { font-size: 0.98rem; font-weight: 700; color: var(--text); text-align: right; word-break: break-word; }
.result-row-total dd { color: var(--brand-dark); font-size: 1.08rem; }
.result-row-total dd::after { content: " p.a."; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }

.calc-disclaimer { font-size: 0.8rem; color: var(--text-muted); margin: 8px 0 0; }

.formula-box {
  margin: 18px 0;
  padding: 18px 22px;
  text-align: center;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  overflow-x: auto;
}
.formula-box sup { color: var(--brand-dark); }
.how-list li { margin: 8px 0; }
.example-panel { margin: 22px 0; }
.example-panel .result-row dd { font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-panel { padding: 20px; }
}

/* 7-button range segments may not fit one line inside narrow chart cards.
   On phones (<=425px) let them drop to their own row and wrap into pill
   buttons so every range (incl. "ALL") stays visible instead of clipped. */
@media (max-width: 425px) {
  .chart-controls .range-seg {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    padding: 2px 0;
  }
  .chart-controls .range-seg button {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text-muted);
    padding: 7px 13px;
    font-size: 0.84rem;
    justify-content: center;
  }
  .chart-controls .range-seg button:last-child { border-right: 1px solid var(--border); }
  .chart-controls .range-seg button:hover { border-color: var(--brand); color: var(--brand-dark); }
  .chart-controls .range-seg button.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
  }
}

/* Extra-compact range buttons on small phones so all 7 stay tight/readable */
@media (max-width: 420px) {
  .chart-controls .range-seg { gap: 5px; padding: 1px 0; }
  .chart-controls .range-seg button {
    padding: 6px 9px;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 6px;
  }
}

@media (max-width: 375px) {
  .chart-controls .range-seg { gap: 4px; }
  .chart-controls .range-seg button {
    padding: 5px 7px;
    font-size: 0.72rem;
    border-radius: 5px;
  }
}

/* ---------------------------------------------------- chart toolbar (interest-rate) */
.ctrl-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chart-controls .date-input {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  min-width: 0;
}
.chart-controls .date-input:focus { outline: none; border-color: var(--brand); }
.chart-controls .date-input::-webkit-calendar-picker-indicator { cursor: pointer; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid var(--brand);
  border-radius: 8px;
  background: transparent;
  color: var(--brand-dark);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--brand); color: var(--on-dark); }
.icon-btn i { font-size: 0.95rem; }

.chart-actions { position: relative; margin-left: auto; display: flex; gap: 8px; }

/* Compact chart toolbar buttons on smaller screens */
@media (max-width: 480px) {
  .icon-btn { padding: 7px 11px; font-size: 0.82rem; gap: 6px; }
  .icon-btn i { font-size: 0.88rem; }
  .icon-btn--square { padding: 7px 10px; }
}
@media (max-width: 425px) {
  .chart-actions { gap: 6px; }
  .icon-btn { padding: 7px 10px; font-size: 0.8rem; }
  .icon-btn--square { padding: 7px 9px; }
}
@media (max-width: 375px) {
  .icon-btn { padding: 6px 9px; font-size: 0.76rem; gap: 5px; }
  .icon-btn i { font-size: 0.82rem; }
  .icon-btn--square { padding: 6px 8px; }
  .icon-btn-label { display: none; }
}

.export-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 210px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: none;
}
.export-menu.open { display: block; }
.export-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.export-menu a:hover { background: var(--surface-hover); }
.export-menu a i { width: 18px; text-align: center; color: var(--brand-dark); }

.date-picker { position: relative; }
.icon-btn--square { padding: 9px 11px; }

.date-menu {
  left: 0;
  right: auto;
  min-width: 250px;
  padding: 12px;
}
.date-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}
.date-menu-row + .date-menu-row { margin-top: 6px; }
.date-menu-row label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.date-menu-row .date-input { flex: 1; min-width: 0; }

.chart-card:fullscreen { display: flex; flex-direction: column; }
.chart-card:fullscreen .chart-wrap { flex: 1; height: auto !important; }
.chart-card:fullscreen .chart-controls { flex-wrap: wrap; }

/* ------------------------------------------------ interest-rate hero + more */
.ir-hero {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-left: 4px solid var(--brand);
}
.ir-hero-main { border-right: 1px solid var(--border); padding-right: 28px; }
.ir-hero-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.ir-hero-value {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  margin: 0;
}
.ir-hero-value span {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 6px;
}
.ir-hero-date {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.ir-hero-info { min-width: 0; }
.ir-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.ir-info-row > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.ir-info-row > strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}
.ir-info-row > strong small {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}
.ir-info-row > strong.up { color: var(--success); }
.ir-info-row > strong.down { color: var(--danger); }
.ir-info-row > strong.flat { color: var(--accent); }
.ir-hero-note {
  margin: 14px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.table-more { text-align: center; margin-top: 18px; }
.table-more .btn[disabled] { opacity: 0.6; cursor: default; }

@media (max-width: 720px) {
  .ir-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }
  .ir-hero-main {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 18px;
  }
  .ir-hero-value { font-size: 2.6rem; }
  .ir-info-row > strong { text-align: left; }
}

