/* ============================================================
   BusinessDayRules.com — Main Stylesheet
   Static Reference Site | Clean Utilitarian Design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --navy: #1a2b4a;
  --navy-mid: #243660;
  --ink: #1e1e2e;
  --body-text: #2d3040;
  --muted: #5a6378;
  --rule-line: #d4d8e2;
  --bg: #f7f8fb;
  --white: #ffffff;
  --accent: #2a6ebb;
  --accent-dark: #1c4f8a;
  --accent-light: #e8f0fb;
  --green: #1a7a4c;
  --green-light: #e6f5ed;
  --red: #c0392b;
  --red-light: #fdecea;
  --amber: #b8860b;
  --amber-light: #fef9e7;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-heading: 'Source Serif 4', Georgia, serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 3px 10px rgba(0,0,0,0.09);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--body-text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

/* --- Header --- */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-logo:hover { color: var(--white); text-decoration: none; }
.logo-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  background: rgba(255,255,255,0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  vertical-align: middle;
}
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: rgba(255,255,255,0.75); font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.site-nav a:hover, .site-nav a.active { color: var(--white); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; }

/* --- Disclaimer --- */
.disclaimer-bar {
  background: var(--amber-light);
  border-bottom: 1px solid #f0e0a0;
  padding: 0.5rem 1.25rem;
  font-size: 0.82rem;
  color: #6b5a00;
  text-align: center;
}

/* --- Hero --- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.hero-sub { font-size: 1.05rem; color: rgba(255,255,255,0.7); max-width: 640px; margin: 0 auto; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.page-hero-sm {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 2rem 0 1.75rem;
}
.page-hero-sm h1 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* --- Main Content --- */
.main-content { padding: 2rem 0 3rem; }

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--accent); }

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2.5rem;
  align-items: start;
}

/* --- Article Prose --- */
.article-prose h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.article-prose h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.article-prose p { margin-bottom: 1rem; }
.article-prose ul { margin: 0.5rem 0 1rem 1.5rem; }
.article-prose li { margin-bottom: 0.35rem; }

/* --- Tables --- */
.ref-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.ref-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.ref-table-wrap th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ref-table-wrap td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--rule-line);
}
.ref-table-wrap tr:nth-child(even) td { background: var(--accent-light); }

/* --- Info Boxes --- */
.info-box {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
}
.info-box p { margin-bottom: 0.35rem; }

.example-block {
  background: var(--green-light);
  border-left: 3px solid var(--green);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.example-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.warning-box {
  background: var(--amber-light);
  border-left: 3px solid var(--amber);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
}

/* --- Calculator Links --- */
.calc-links {
  background: var(--white);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.calc-links-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.calc-links ul { list-style: none; margin: 0; padding: 0; }
.calc-links li { margin-bottom: 0.4rem; }

/* --- Sidebar --- */
.sidebar-box {
  background: var(--white);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.sidebar-box h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.sidebar-box li { margin-bottom: 0.3rem; }
.sidebar-box li a { font-size: 0.88rem; }

/* --- Article Cards (index) --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.section h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section p { margin-bottom: 1rem; }
.section { margin-bottom: 2rem; }
hr { border: none; border-top: 1px solid var(--rule-line); margin: 2rem 0; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.article-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
  text-decoration: none;
  color: var(--body-text);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  text-decoration: none;
  color: var(--body-text);
}
.card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}
.article-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.5rem 0 0.35rem;
  color: var(--ink);
}
.article-card p { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.5rem; line-height: 1.5; }
.card-link-text { font-size: 0.82rem; color: var(--accent); font-weight: 500; }

/* --- Home Intro Grid --- */
.home-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.home-block {
  background: var(--white);
  border: 1px solid var(--rule-line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.home-block h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
.home-block p { font-size: 0.88rem; color: var(--muted); }

/* --- FAQ --- */
.faq-list { list-style: none; padding: 0; }
.faq-item { border-bottom: 1px solid var(--rule-line); padding: 0.75rem 0; }
.faq-q { font-weight: 600; color: var(--ink); margin-bottom: 0.25rem; }
.faq-a { font-size: 0.92rem; color: var(--muted); }

/* --- Trust Strip --- */
.trust-strip {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
}
.trust-strip strong { color: var(--white); }

/* --- Footer --- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.88rem;
}
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer-col h4 { color: var(--white); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.6rem; }
.footer-col p { font-size: 0.82rem; line-height: 1.5; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.3rem; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer-col a:hover { color: var(--white); }
.footer-resource-link { font-size: 0.82rem; }
.footer-resource-link a { color: rgba(255,255,255,0.7); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .home-intro-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 1.6rem; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
}