/* GridPayouts.com — Fast static docket theme (v1.3 official-source math + mobile nav) */
:root {
  --navy-950: #07111e;
  --navy-900: #0b192c;
  --navy-800: #162942;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-50: #ecfdf5;
  --amber-800: #92400e;
  --amber-600: #d97706;
  --amber-50: #fffbeb;
  --blue-700: #1d4ed8;
  --blue-50: #eff6ff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.07);
  --max-w: 1180px;
  --paper: #f6f1e8;
  --ink-rule: #e6dccb;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--slate-900);
  background-color: var(--paper);
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}
a { color: var(--emerald-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy-900); }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* Top Notice & Sticky Header with Responsive Phone Menu */
.top-notice { background: var(--navy-950); color: #cbd5e1; font-size: 0.8rem; padding: 0.42rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.top-notice .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
.top-notice strong { color: #34d399; }

.site-header { background: var(--navy-900); color: #ffffff; position: sticky; top: 0; z-index: 60; box-shadow: 0 2px 10px rgba(0,0,0,0.18); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 1rem; position: relative; }
.brand-logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: #ffffff; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand-logo:hover { color: #ffffff; }
.brand-logo span.accent { color: #34d399; }

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.22);
  color: #ffffff;
  border-radius: var(--radius-sm);
  width: 44px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.mobile-menu-btn:hover { border-color: #34d399; color: #34d399; }

.main-nav { display: flex; align-items: center; gap: 1.15rem; }
.main-nav a { color: #e2e8f0; text-decoration: none; font-size: 0.88rem; font-weight: 500; padding: 0.35rem 0; white-space: nowrap; }
.main-nav a:hover { color: #34d399; }

@media (max-width: 860px) {
  .mobile-menu-btn { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 62px;
    left: -1.25rem;
    right: -1.25rem;
    background: var(--navy-900);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 2px solid var(--emerald-500);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 1.25rem 0.75rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.28);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    padding: 0.72rem 0.25rem;
    font-size: 0.96rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .main-nav a:last-child { border-bottom: none; }
}

/* Breadcrumbs & Hero */
.breadcrumbs { font-size: 0.82rem; color: var(--slate-500); padding: 0.9rem 0 0.25rem; }
.breadcrumbs a { color: var(--slate-600); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.page-hero {
  background-color: #fffaf3;
  background-image:
    linear-gradient(rgba(22, 41, 66, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 41, 66, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--ink-rule);
  padding: 1.4rem 0 1.85rem;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; background: var(--emerald-50); color: var(--emerald-700);
  border: 1px solid #a7f3d0; padding: 0.25rem 0.65rem; border-radius: 999px; margin-bottom: 0.75rem;
}
h1 { font-size: clamp(1.55rem, 3.1vw, 2.25rem); line-height: 1.2; letter-spacing: -0.025em; margin: 0 0 1rem; color: var(--navy-900); }
h2 { font-size: 1.38rem; line-height: 1.3; letter-spacing: -0.015em; color: var(--navy-900); margin: 2.1rem 0 0.85rem; scroll-margin-top: 84px; }
h3 { font-size: 1.06rem; color: var(--navy-900); margin: 1.15rem 0 0.4rem; }

/* PUC Regulatory Verification Bar & Verdict */
.puc-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 0.75rem;
  background: var(--slate-50); border: 1px solid var(--slate-200); border-left: 4px solid var(--emerald-600);
  border-radius: var(--radius-md); padding: 0.85rem 1rem; margin: 0.9rem 0 1.15rem; font-size: 0.83rem;
}
.puc-item .label { display: block; font-size: 0.71rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-500); font-weight: 700; }
.puc-item .val { font-weight: 600; color: var(--slate-900); }
.verdict-box { background: linear-gradient(to right, #f0fdf4, #ffffff); border: 1px solid #bbf7d0; border-radius: var(--radius-md); padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm); }
.verdict-title { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--emerald-700); margin-bottom: 0.35rem; }
.verdict-box p { margin: 0; font-size: 0.98rem; color: var(--slate-900); }

/* Main Content + Mediavine / Journey / Raptive Compliant 300px Sidebar Architecture */
.main-wrap { padding: 2rem 0 3.5rem; }
.content-sidebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 332px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 1023px) {
  .content-sidebar-layout { grid-template-columns: 1fr; }
}
#primary-content.entry-content { min-width: 0; }
#secondary-sidebar.widget-area { width: 332px; padding: 0 16px; min-height: 100%; }
@media (max-width: 1023px) {
  #secondary-sidebar.widget-area { width: 100%; padding: 0; }
}
.sidebar-widget {
  background: #ffffff; border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  padding: 1.05rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); font-size: 0.86rem;
}
.sidebar-widget h3 { margin: 0 0 0.6rem; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--navy-900); }
.toc-links { list-style: none; padding: 0; margin: 0; }
.toc-links li { margin-bottom: 0.42rem; }
.toc-links a { text-decoration: none; color: var(--slate-700); font-weight: 500; }
.toc-links a:hover { color: var(--emerald-700); text-decoration: underline; }
.sidebar-sticky-rail { position: sticky; top: 82px; }

/* CLS-Safe Display Ad Slots */
.ad-slot-incontent {
  min-height: 268px; background: #ffffff; border: 1px dashed var(--slate-200);
  border-radius: var(--radius-sm); margin: 1.5rem 0; padding: 0.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ad-slot-sidebar {
  width: 300px; min-height: 600px; margin: 0 auto 1.25rem;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
}
.ad-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate-500); margin-bottom: 4px; }

/* Interactive Calculator Module */
.calc-card { background: #ffffff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; margin-bottom: 1.75rem; }
.calc-header { background: var(--navy-900); color: #ffffff; padding: 1rem 1.3rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.calc-header h2 { color: #ffffff; margin: 0; font-size: 1.15rem; }
.calc-badge { font-size: 0.75rem; background: rgba(16,185,129,0.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); padding: 0.2rem 0.55rem; border-radius: 999px; font-weight: 600; }
.calc-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; }
@media (max-width: 760px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-inputs { padding: 1.25rem; border-right: 1px solid var(--slate-200); }
@media (max-width: 760px) { .calc-inputs { border-right: none; border-bottom: 1px solid var(--slate-200); } }
.calc-outputs { padding: 1.25rem; background: var(--slate-50); display: flex; flex-direction: column; justify-content: space-between; }
.field-group { margin-bottom: 0.95rem; }
.field-group:last-child { margin-bottom: 0; }
.field-group label { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.86rem; color: var(--slate-900); margin-bottom: 0.32rem; }
.field-hint { font-size: 0.76rem; color: var(--slate-500); margin-top: 0.2rem; }
select, input[type="number"] { width: 100%; padding: 0.55rem 0.7rem; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); font-size: 0.89rem; background: #ffffff; color: var(--slate-900); }
input[type="range"] { width: 100%; accent-color: var(--emerald-600); cursor: pointer; }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.55rem; background: var(--slate-50); border: 1px solid var(--slate-200); padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.83rem; }
.checkbox-row input { margin-top: 0.2rem; accent-color: var(--emerald-600); }

/* Output KPI Cards */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.85rem; }
@media (max-width: 480px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi-box { background: #ffffff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 0.8rem 0.9rem; }
.kpi-box.highlight { background: var(--emerald-50); border-color: #6ee7b7; }
.kpi-label { font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-600); font-weight: 700; }
.kpi-val { font-size: 1.42rem; font-weight: 800; color: var(--navy-900); line-height: 1.25; margin-top: 0.18rem; }
.kpi-box.highlight .kpi-val { color: var(--emerald-700); }
.kpi-sub { font-size: 0.75rem; color: var(--slate-600); margin-top: 0.18rem; }
.calc-alert { background: var(--amber-50); border: 1px solid #fde68a; color: var(--amber-800); border-radius: var(--radius-sm); padding: 0.65rem 0.8rem; font-size: 0.8rem; margin-top: 0.7rem; }
.roi-bar-wrap { margin-top: 0.75rem; }
.roi-bar-track { height: 11px; width: 100%; background: var(--slate-200); border-radius: 999px; overflow: hidden; display: flex; }
.roi-seg-upfront { background: #059669; }
.roi-seg-vpp { background: #10b981; }
.roi-seg-tou { background: #3b82f6; }
.roi-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.74rem; color: var(--slate-600); margin-top: 0.4rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }

/* Tables, Trap Cards, Scenarios, FAQs & Directory Cards */
.table-wrap { overflow-x: auto; background: #ffffff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin: 0.9rem 0 1.65rem; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.89rem; }
th { background: var(--slate-100); color: var(--navy-900); font-weight: 700; padding: 0.75rem 0.9rem; border-bottom: 2px solid var(--slate-200); white-space: nowrap; }
td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--slate-200); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

.trap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.95rem; margin: 0.9rem 0 1.65rem; }
.trap-card { background: #ffffff; border: 1px solid var(--slate-200); border-top: 3px solid var(--amber-600); border-radius: var(--radius-md); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.trap-card h3 { margin: 0 0 0.38rem; font-size: 0.96rem; color: var(--amber-800); }
.trap-card p { margin: 0; font-size: 0.87rem; color: var(--slate-700); }

.scenario-card { background: #ffffff; border: 1px solid var(--slate-200); border-left: 4px solid var(--blue-700); border-radius: var(--radius-md); padding: 1.15rem 1.3rem; margin: 0.9rem 0 1.65rem; }
.scenario-card ol { margin: 0.65rem 0 0; padding-left: 1.2rem; }
.scenario-card li { margin-bottom: 0.48rem; font-size: 0.91rem; }

.faq-list { display: grid; gap: 0.8rem; margin-bottom: 1.75rem; }
.faq-item { background: #ffffff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 0.95rem 1.15rem; }
.faq-item h3 { margin: 0 0 0.35rem; font-size: 0.98rem; }
.faq-item p { margin: 0; font-size: 0.9rem; color: var(--slate-700); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; margin: 1.1rem 0; }
.utility-card { background: #ffffff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 1.15rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.12s ease, border-color 0.12s ease; }
.utility-card:hover { border-color: var(--emerald-500); transform: translateY(-2px); }
.state-pill { display: inline-block; font-size: 0.72rem; font-weight: 700; background: var(--blue-50); color: var(--blue-700); padding: 0.18rem 0.52rem; border-radius: 999px; margin-bottom: 0.45rem; }
.utility-card h3 { margin: 0.18rem 0 0.42rem; font-size: 1.04rem; }
.utility-card h3 a { color: var(--navy-900); text-decoration: none; }
.utility-card h3 a:hover { color: var(--emerald-700); }
.utility-card p { font-size: 0.86rem; color: var(--slate-600); margin: 0 0 0.85rem; }
.card-cta { font-size: 0.84rem; font-weight: 700; color: var(--emerald-700); text-decoration: none; }

.filter-bar { display: flex; gap: 0.75rem; margin: 1rem 0; flex-wrap: wrap; }
.filter-bar input[type="search"] { flex: 1; min-width: 240px; padding: 0.65rem 0.9rem; border: 1px solid #cbd5e1; border-radius: var(--radius-sm); font-size: 0.95rem; }

/* Footer */
.site-footer { background: var(--navy-950); color: #94a3b8; padding: 2.75rem 0 2rem; font-size: 0.86rem; border-top: 1px solid var(--navy-800); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #ffffff; margin: 0 0 0.75rem; font-size: 0.95rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a { color: #cbd5e1; text-decoration: none; }
.footer-links a:hover { color: #34d399; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; font-size: 0.79rem; }

/* Docket / ledger accents */
.docket-chip {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.verified-stamp { font-size: 0.72rem; color: var(--slate-500); white-space: nowrap; }
.estimate-flag {
  display: inline-block;
  margin-left: 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber-800);
  background: var(--amber-50);
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
}
.table-footnote { font-size: 0.78rem; color: var(--slate-600); margin: 0.65rem 0.9rem 0.85rem; }
h2 { border-bottom: 1px solid var(--ink-rule); padding-bottom: 0.35rem; }

/* Open-drawer lock: no page text under the menu */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 17, 30, 0.62);
  z-index: 55;
}
.nav-backdrop:not([hidden]) { display: block; }
body.nav-open { overflow: hidden; }

@media (max-width: 860px) {
  .main-nav {
    left: 0;
    right: 0;
    z-index: 70;
    background: var(--navy-900);
    background-color: #0b192c;
  }
  .site-header { z-index: 80; }
}

/* Mobile search: do not clip the placeholder */
.filter-bar { width: 100%; }
.filter-bar input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* Rate and directory tables become stacked cards on phones */
@media (max-width: 700px) {
  .table-wrap { overflow-x: visible; }
  .table-wrap table { border: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap tr {
    background: #ffffff;
    border-bottom: 1px solid var(--slate-200);
    padding: 0.7rem 0.85rem 0.85rem;
  }
  .table-wrap tr:last-child { border-bottom: none; }
  .table-wrap td {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 0.5rem;
    border-bottom: 0;
    padding: 0.28rem 0;
  }
  .table-wrap td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--slate-500);
  }
  .table-wrap tr:hover td { background: transparent; }
}

.calc-header h2 { border-bottom: none; padding-bottom: 0; }

.mobile-menu-btn .icon-menu,
.mobile-menu-btn .icon-close { display: none; }
.mobile-menu-btn .icon-menu { display: block; }
.mobile-menu-btn[aria-expanded="true"] .icon-menu { display: none; }
.mobile-menu-btn[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 860px) {
  .main-nav.is-open {
    display: flex;
    position: fixed;
    top: 62px; /* JS overwrites with the header's bottom edge */
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 70;
    background: #0b192c;
    overflow-y: auto;
    padding-bottom: 2rem;
    box-shadow: none;
  }
}
