/* ===================================================
   DIG811GUIDE — Core Stylesheet
   Aesthetic: Civic-Utility / Infrastructure-Honest
   Fonts: IBM Plex Mono (headers) + Source Serif 4 (body)
   =================================================== */

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

/* ── CSS Variables ───────────────────────────────── */
:root {
  --c-bg:        #F5F2EC;
  --c-bg-dark:   #1C1F24;
  --c-surface:   #FFFFFF;
  --c-border:    #D4CFC5;
  --c-text:      #1C1F24;
  --c-muted:     #6B6860;
  --c-accent:    #D4420A;      /* safety orange — 811 brand adjacent */
  --c-accent2:   #1B5E9B;     /* utility blue */
  --c-warn:      #E6A817;     /* caution yellow */
  --c-green:     #2D7A3A;
  --c-stripe:    rgba(212,66,10,0.06);

  --font-mono:   'IBM Plex Mono', monospace;
  --font-serif:  'Source Serif 4', Georgia, serif;
  --font-sans:   'IBM Plex Sans', sans-serif;

  --max-w:       1100px;
  --max-w-prose: 720px;
  --radius:      4px;
  --shadow:      0 2px 12px rgba(28,31,36,0.10);
  --shadow-lg:   0 6px 32px rgba(28,31,36,0.14);
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-serif);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-accent2); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--c-accent); }

/* ── Typography ──────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--c-text);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-top: 2.5rem; margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.05rem, 2vw, 1.3rem); margin-top: 2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; margin-top: 1.5rem; margin-bottom: 0.4rem; }
p  { margin-bottom: 1.1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
li { margin-bottom: 0.4rem; }
strong { font-weight: 600; }
em { font-style: italic; }
blockquote {
  border-left: 4px solid var(--c-accent);
  padding: 0.8rem 1.2rem;
  background: var(--c-stripe);
  margin: 1.5rem 0;
  font-style: italic;
}

/* ── Layout ──────────────────────────────────────── */
.container  { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.prose      { max-width: var(--max-w-prose); }
.section    { padding: 3rem 0; }
.section--lg{ padding: 4.5rem 0; }
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3     { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }

/* ── Header / Nav ────────────────────────────────── */
.site-header {
  background: var(--c-bg-dark);
  border-bottom: 3px solid var(--c-accent);
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.site-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: #FFFFFF;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo span { color: var(--c-accent); }
.site-nav { display: flex; gap: 0.25rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.site-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* ── Hero ────────────────────────────────────────── */
.hero {
  background: var(--c-bg-dark);
  color: #fff;
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(212,66,10,0.08) 0px, rgba(212,66,10,0.08) 1px,
    transparent 1px, transparent 60px
  ),
  repeating-linear-gradient(
    0deg,
    rgba(212,66,10,0.05) 0px, rgba(212,66,10,0.05) 1px,
    transparent 1px, transparent 60px
  );
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 0.75rem;
}
.hero h1 { color: #fff; max-width: 760px; margin-bottom: 1.2rem; }
.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.78);
  max-width: 620px;
  margin-bottom: 2rem;
  font-family: var(--font-sans);
  line-height: 1.6;
}
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover { background: #b83608; color: #fff; }
.btn--outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.4); }
.btn--outline:hover { border-color: #fff; color: #fff; }
.btn--blue { background: var(--c-accent2); color: #fff; }
.hero-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Alert / Callout Boxes ───────────────────────── */
.callout {
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  border-left: 5px solid;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
}
.callout--warn  { border-color: var(--c-warn);   background: #FEF8E7; }
.callout--info  { border-color: var(--c-accent2); background: #EAF2FB; }
.callout--ok    { border-color: var(--c-green);   background: #EAF5EC; }
.callout--danger{ border-color: var(--c-accent);  background: #FDF0EB; }
.callout strong { display: block; margin-bottom: 0.3rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card h3 { margin-top: 0; font-size: 1.05rem; }
.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }

/* ── Tables ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--c-surface); font-family: var(--font-sans); font-size: 0.9rem; }
thead { background: var(--c-bg-dark); color: #fff; }
thead th { padding: 0.85rem 1rem; text-align: left; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.05em; font-weight: 600; }
tbody td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--c-border); vertical-align: top; }
tbody tr:hover { background: var(--c-stripe); }
tbody tr:last-child td { border-bottom: none; }
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge--green { background: #D4EDDA; color: #155724; }
.badge--yellow { background: #FFF3CD; color: #856404; }
.badge--red { background: #F8D7DA; color: #721C24; }
.badge--blue { background: #D1ECF1; color: #0C5460; }

/* ── Color Code Section ──────────────────────────── */
.color-swatch {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  border: 1px solid rgba(0,0,0,0.08);
  background: var(--c-surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.swatch-dot { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(0,0,0,0.12); flex-shrink: 0; }
.swatch-info strong { font-family: var(--font-mono); font-size: 0.95rem; display: block; }
.swatch-info span { font-family: var(--font-sans); font-size: 0.85rem; color: var(--c-muted); }

/* ── Checklist ───────────────────────────────────── */
.checklist { list-style: none; padding: 0; }
.checklist li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--c-border);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '☐';
  font-size: 1.1rem;
  color: var(--c-accent);
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ── FAQ ─────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-q {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 1rem 0;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  list-style: none;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; font-size: 1.3rem; color: var(--c-accent); flex-shrink: 0; }
details[open] .faq-q::after { content: '−'; }
.faq-a {
  padding: 0 0 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--c-text);
}

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-muted);
  padding: 0.75rem 0;
  letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb span { margin: 0 0.4rem; }

/* ── Stat Boxes ──────────────────────────────────── */
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0; }
.stat-box {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 4px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  flex: 1; min-width: 160px;
}
.stat-box .stat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-box .stat-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── Sidebar Layout ──────────────────────────────── */
.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}
.sidebar-box {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: sticky; top: 80px;
}
.sidebar-box h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin-bottom: 0.75rem;
  margin-top: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--c-border);
}
.sidebar-box ul { list-style: none; padding: 0; margin: 0; }
.sidebar-box ul li { padding: 0.3rem 0; font-family: var(--font-sans); font-size: 0.88rem; border-bottom: 1px solid var(--c-border); }
.sidebar-box ul li:last-child { border-bottom: none; }
.sidebar-box ul li a { color: var(--c-accent2); text-decoration: none; }
.sidebar-box ul li a:hover { color: var(--c-accent); text-decoration: underline; }

/* ── Download CTA ────────────────────────────────── */
.download-box {
  background: linear-gradient(135deg, var(--c-accent2) 0%, #0f3d6e 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.download-box .dl-icon { font-size: 3rem; flex-shrink: 0; }
.download-box h3 { color: #fff; margin: 0 0 0.4rem; font-size: 1.1rem; }
.download-box p { color: rgba(255,255,255,0.8); margin: 0 0 1rem; font-family: var(--font-sans); font-size: 0.9rem; }
.btn--white { background: #fff; color: var(--c-accent2); font-weight: 700; }
.btn--white:hover { background: #f0f0f0; color: var(--c-accent2); }

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  background: var(--c-bg-dark);
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
  border-top: 3px solid var(--c-accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand .site-logo { font-size: 1.1rem; display: inline-block; margin-bottom: 0.75rem; }
.footer-brand p { font-family: var(--font-sans); font-size: 0.85rem; line-height: 1.6; color: rgba(255,255,255,0.5); }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
.footer-col ul li a:hover { color: var(--c-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  font-family: var(--font-sans); font-size: 0.78rem;
}
.footer-disclaimer {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1rem;
  line-height: 1.5;
}

/* ── Tool Styles ─────────────────────────────────── */
.tool-card {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.tool-header {
  background: var(--c-bg-dark);
  padding: 1.25rem 1.5rem;
  border-bottom: 3px solid var(--c-accent);
}
.tool-header h2 { color: #fff; margin: 0; font-size: 1.2rem; }
.tool-header p { color: rgba(255,255,255,0.65); margin: 0.3rem 0 0; font-family: var(--font-sans); font-size: 0.85rem; }
.tool-body { padding: 1.75rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.4rem;
  color: var(--c-muted);
}
.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--c-bg);
  color: var(--c-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.form-control:focus { outline: none; border-color: var(--c-accent2); box-shadow: 0 0 0 3px rgba(27,94,155,0.15); }
.tool-result {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.25rem;
  display: none;
}
.tool-result.visible { display: block; animation: fadeIn 0.3s ease; }
.result-days {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
}
.result-label { font-family: var(--font-sans); font-size: 0.85rem; color: var(--c-muted); margin-bottom: 1rem; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem; }
.result-item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 0.75rem; }
.result-item .ri-label { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-muted); display: block; margin-bottom: 0.2rem; }
.result-item .ri-val { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; }

/* ── Step Process ────────────────────────────────── */
.steps { counter-reset: steps; list-style: none; padding: 0; }
.steps li {
  counter-increment: steps;
  display: flex; gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--c-border);
  align-items: flex-start;
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(steps);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.steps li .step-body h4 { margin-top: 0; margin-bottom: 0.3rem; font-size: 1rem; }
.steps li .step-body p { margin: 0; font-family: var(--font-sans); font-size: 0.92rem; color: var(--c-muted); }

/* ── Animations ──────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 0.4s ease both; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .content-sidebar { grid-template-columns: 1fr; }
  .sidebar-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .site-nav.open { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem 0; }
  .hero { padding: 2.5rem 0 2rem; }
  .download-box { flex-direction: column; gap: 1rem; }
  .stat-row { flex-direction: column; }
  .hero-btns { flex-direction: column; }
}

/* ── Print / PDF ─────────────────────────────────── */
@media print {
  .site-header, .site-footer, .sidebar-box, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .container { max-width: 100%; padding: 0; }
}

/* ── Utility ─────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--c-muted); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 2rem; }
.divider { border: none; border-top: 1px solid var(--c-border); margin: 2.5rem 0; }
.tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  padding: 0.2rem 0.55rem; border-radius: 2px;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--c-stripe); color: var(--c-accent); border: 1px solid rgba(212,66,10,0.2);
  margin-right: 0.35rem; margin-bottom: 0.35rem;
}
