/* FiscalGrid — financial dashboard aesthetic
 * Deep navy + teal accent, Inter/DM Sans typography,
 * sharp grids, crisp data tables, restrained color use. */

:root {
  --bg: #f5f7fa;
  --paper: #ffffff;
  --paper-2: #fbfcfd;
  --ink: #0b1220;
  --ink-soft: #2c3a4f;
  --muted: #5b6a82;
  --muted-2: #8997ad;
  --line: #e3e8ef;
  --line-2: #eef1f6;
  --brand: #0d2c4e;        /* deep navy */
  --brand-700: #0a223d;
  --brand-50: #ebf0f7;
  --accent: #0d9488;       /* teal-600 */
  --accent-700: #0b7c72;
  --accent-50: #ebfaf7;
  --warn: #b45309;
  --weekend: #f5f7fa;
  --holiday: #ebfaf7;
  --shadow-sm: 0 1px 2px rgba(13, 44, 78, 0.05);
  --shadow: 0 1px 2px rgba(13, 44, 78, 0.04), 0 8px 24px rgba(13, 44, 78, 0.06);
  --radius: 6px;
  --radius-lg: 10px;
  --font-sans: "Inter", "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "DM Sans", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  font-feature-settings: "ss01", "cv11", "cv02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-700); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .5em;
  letter-spacing: -0.015em;
  font-weight: 600;
}
h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.5rem; margin-top: 2em; padding-bottom: .35em; border-bottom: 1px solid var(--line-2); }
h3 { font-size: 1.125rem; margin-top: 1.4em; }
h4 { font-size: .95rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { position: static; padding: 8px 12px; background: var(--accent); color: #fff; }

/* ────── Header ────── */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
}
.site-header a { color: var(--ink-soft); text-decoration: none; }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 24px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink) !important; font-family: var(--font-display); letter-spacing: -0.02em; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 6px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  letter-spacing: .02em;
}
.brand-name { font-size: 1.05rem; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; font-size: .92rem; font-weight: 500; }
.nav a { padding: 8px 14px; border-radius: 6px; color: var(--ink-soft); }
.nav a:hover { background: var(--brand-50); color: var(--brand); }
.nav a.active { color: var(--brand); background: var(--brand-50); }

/* ────── Breadcrumbs ────── */
.crumbs { padding: 18px 0 0; font-size: .82rem; color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs li + li::before { content: "›"; padding-right: 6px; color: var(--muted-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs li[aria-current="page"] { color: var(--ink-soft); font-weight: 500; }

/* ────── Layout ────── */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 32px; padding: 24px 0 64px; align-items: start; }
.layout-full { grid-template-columns: 1fr; }
.content {
  background: var(--paper);
  padding: 40px 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  min-width: 0;
}
.content > h1:first-child { margin-top: 0; }
.content > h2:first-of-type { margin-top: 1.2em; }

.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.card h4 { margin: 0 0 12px; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.link-list a { color: var(--ink-soft); font-weight: 500; }
.link-list a:hover { color: var(--brand); }
.link-list li { padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.link-list li:last-child { border: none; padding-bottom: 0; }
.link-list .muted { display: block; font-size: .75rem; color: var(--muted-2); margin-top: 2px; font-weight: 400; }

/* ────── Hero ────── */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center;
  padding: 64px 56px;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(13,148,136,0.12), transparent 70%),
    radial-gradient(ellipse 60% 60% at 0% 100%, rgba(13,44,78,0.06), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, var(--paper-2) 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(13,44,78,0.04), 0 24px 48px -12px rgba(13,44,78,0.10);
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(13,44,78,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,44,78,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; top: 24px; right: 24px;
  width: 96px; height: 96px;
  background:
    linear-gradient(135deg, transparent 48%, var(--accent) 49%, var(--accent) 51%, transparent 52%),
    linear-gradient(45deg, transparent 48%, rgba(13,148,136,0.4) 49%, rgba(13,148,136,0.4) 51%, transparent 52%);
  background-size: 16px 16px;
  opacity: 0.5;
  pointer-events: none;
  border-radius: 6px;
}
.hero > div { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent-700); background: var(--accent-50);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.hero h1 { font-size: 3.25rem; margin-bottom: .35em; letter-spacing: -0.035em; line-height: 1.05; }
.hero h1 em { font-style: normal; color: var(--accent-700); background: linear-gradient(180deg, transparent 65%, rgba(13,148,136,0.18) 65%); padding: 0 4px; }
.hero p.lede { font-size: 1.15rem; color: var(--ink-soft); line-height: 1.6; max-width: 54ch; }
.hero-img { width: 100%; height: auto; border-radius: 12px; display: block; box-shadow: 0 12px 32px -8px rgba(13,44,78,0.18); }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num { font-family: var(--font-display); font-size: 1.85rem; font-weight: 700; color: var(--brand); letter-spacing: -0.025em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stat-lbl { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-top: 6px; }

/* ────── Buttons ────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff;
  padding: 11px 20px; border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500; font-size: .9rem;
  border: 1px solid var(--brand);
  transition: all .15s ease;
  letter-spacing: -0.005em;
}
.btn:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-50); color: var(--brand); border-color: var(--brand-50); }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-700); border-color: var(--accent-700); }

/* ────── Tile grid ────── */
.grid { display: grid; gap: 14px; margin: 18px 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 20px; text-decoration: none; color: var(--ink); display: block;
  transition: all .15s ease;
  position: relative;
}
.tile:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); text-decoration: none; }
.tile:hover h3 { color: var(--accent); }
.tile h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 600; transition: color .15s ease; }
.tile .meta { color: var(--muted); font-size: .82rem; margin: 0; }
.tile .badge { position: absolute; top: 14px; right: 14px; font-size: .68rem; font-weight: 600; color: var(--accent); background: var(--accent-50); padding: 2px 8px; border-radius: 4px; letter-spacing: .04em; text-transform: uppercase; }

/* ────── Calendar ────── */
.cal { margin: 22px 0; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px 20px; background: var(--paper-2); }
.cal-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.cal-head h3 { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--brand); }
.cal-grid { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.cal-grid th { text-align: center; font-weight: 600; font-size: .68rem; color: var(--muted); padding: 6px 4px; text-transform: uppercase; letter-spacing: .1em; }
.cal-grid td { vertical-align: top; height: 64px; border: 1px solid var(--line-2); padding: 6px; background: #fff; border-radius: 4px; transition: all .15s ease; }
.cal-grid td.empty { background: transparent; border-color: transparent; }
.cal-grid td.weekend { background: var(--bg); }
.cal-grid td.holiday { background: var(--accent-50); border-color: rgba(13, 148, 136, 0.25); }
.cal-grid td .num { display: block; font-family: var(--font-mono); font-size: .82rem; font-weight: 600; color: var(--ink); }
.cal-grid td .lbl { display: block; font-size: .65rem; color: var(--accent-700); margin-top: 3px; line-height: 1.2; font-weight: 500; }
.cal-grid td a { text-decoration: none; color: inherit; display: block; height: 100%; }
.cal-grid td a:hover .num { color: var(--accent); }

.cal-row, .cal-grid-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.cal-grid-wrap { grid-template-columns: repeat(4, 1fr); }

/* ────── Key/value ────── */
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 10px 24px; font-size: .9rem; padding: 18px 22px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-lg); margin: 18px 0; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ────── Tables ────── */
.table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 18px 0; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.table th { background: var(--paper-2); font-weight: 600; color: var(--ink-soft); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.table tr:hover td { background: var(--paper-2); }
.table td.num, .table td.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ────── Callouts ────── */
.callout { background: var(--accent-50); border-left: 3px solid var(--accent); padding: 14px 20px; border-radius: var(--radius); margin: 22px 0; font-size: .92rem; }
.callout strong { color: var(--accent-700); }
.callout-warn { background: #fef7ec; border-left-color: var(--warn); }
.callout-warn strong { color: var(--warn); }

/* ────── Stats panel ────── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--radius-lg); overflow: hidden;
  margin: 22px 0; border: 1px solid var(--line);
}
.stat { background: var(--paper); padding: 18px 20px; }
.stat-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--brand); letter-spacing: -0.02em; line-height: 1.1; }
.stat-lbl { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; margin-top: 4px; }

/* ────── PBN editorial recommendations block ────── */
.recommends {
  margin-top: 28px;
  padding: 22px 24px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.recommends h4 {
  margin: 0 0 4px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 600;
}
.recommends .recommends-sub { font-size: .8rem; color: var(--muted-2); margin: 0 0 14px; }
.recommends ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.recommends li { padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.recommends li:last-child { border: none; padding-bottom: 0; }
.recommends a { color: var(--ink-soft); font-weight: 500; font-size: .92rem; }
.recommends a:hover { color: var(--brand); }
.recommends .rec-meta { display: block; font-size: .76rem; color: var(--muted-2); margin-top: 3px; font-weight: 400; }

/* ────── Ad placeholders ────── */
.ad {
  background: var(--paper-2);
  border: 1px dashed var(--line);
  color: var(--muted-2);
  text-align: center;
  font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: var(--radius);
}
.ad-header, .ad-footer { padding: 10px; margin: 0; border-radius: 0; border-left: none; border-right: none; }
.ad-in_content { padding: 22px 14px; margin: 24px 0; }
.ad-sidebar { padding: 50px 14px; }

/* ────── Footer ────── */
.site-footer { background: var(--brand); color: #cbd5e1; padding: 48px 0 24px; margin-top: 48px; }
.site-footer .brand { color: #fff !important; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-grid h4 { color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: .88rem; }
.footer-grid p { color: #94a3b8; font-size: .88rem; }

.footer-recs { padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 22px; }
.footer-recs h4 { color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; font-weight: 600; }
.footer-recs ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; font-size: .85rem; }
.footer-recs li { color: #94a3b8; }
.footer-recs a { color: #cbd5e1; }

.print-only { display: none; }
@media print {
  .site-header, .site-footer, .sidebar, .ad, .nav, .hero-cta, .crumbs, .recommends, .footer-recs { display: none !important; }
  .layout { grid-template-columns: 1fr; padding: 0; }
  .content { box-shadow: none; border: none; padding: 0; background: #fff; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .cal-grid td { height: 80px; }
  .print-only { display: block; }
  a { color: #000; text-decoration: none; }
  h1, h2, h3 { color: #000; }
}

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; gap: 20px; }
  .sidebar { position: static; }
  .hero { grid-template-columns: 1fr; padding: 36px 28px; gap: 32px; }
  .hero h1 { font-size: 2.25rem; }
  .hero p.lede { font-size: 1.05rem; }
  .hero-img { max-width: 480px; margin: 0 auto; }
  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 1.55rem; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cal-row, .cal-grid-wrap { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-recs ul { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 28px 22px; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.35rem; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .kv dt { padding-top: 8px; }
  .header-row { padding: 12px 16px; gap: 12px; }
  .nav { font-size: .88rem; }
  .nav a { padding: 6px 10px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .grid-2, .grid-3, .grid-4, .cal-row, .cal-grid-wrap { grid-template-columns: 1fr; }
  .footer-grid, .footer-recs ul, .stats { grid-template-columns: 1fr; }
  .stats { gap: 0; }
  .stat { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: none; }
  .nav { width: 100%; gap: 2px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .nav a { padding: 6px 12px; font-size: .85rem; white-space: nowrap; }
  .container { padding: 0 14px; }
  .hero { padding: 28px 20px; border-radius: 10px; }
  .hero::after { display: none; }
  .hero h1 { font-size: 1.85rem; letter-spacing: -0.025em; }
  .hero p.lede { font-size: 1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .hero-stats { gap: 20px 24px; }
  .hero-stat-num { font-size: 1.4rem; }
  .content { padding: 22px 18px; border-radius: 8px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; margin-top: 1.6em; }
  .cal-grid td { height: 52px; padding: 4px; }
  .cal-grid td .num { font-size: .75rem; }
  .cal-grid td .lbl { font-size: .55rem; }
  .crumbs { font-size: .76rem; }
  .table th, .table td { padding: 10px 8px; font-size: .82rem; }
  .recommends, .footer-recs { padding: 16px 14px; }
  .site-footer { padding: 32px 0 20px; }
  .footer-grid { gap: 24px; padding-bottom: 24px; }
}
