:root {
  --ink: #172337;
  --muted: #627086;
  --paper: #f4f1ea;
  --white: #fffdf8;
  --line: #d9e1e8;
  --blue: #0d4fc7;
  --blue-dark: #08285f;
  --orange: #f47b20;
  --red: #c9352b;
  --green: #287a53;
  --shadow: 0 18px 50px rgba(16, 37, 71, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }

/* Local Leaflet layout fallback in case the CDN stylesheet is blocked. */
.leaflet-container { overflow: hidden; outline-offset: 1px; }
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas { position: absolute; left: 0; top: 0; }
.leaflet-map-pane,
.leaflet-control-container { position: absolute; left: 0; top: 0; }
.leaflet-container img.leaflet-tile { max-width: none !important; max-height: none !important; width: 256px; height: 256px; padding: 0; }
.leaflet-tile { visibility: hidden; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-top,
.leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control-zoom { margin: 12px; border-radius: 8px; box-shadow: 0 2px 10px rgba(8, 40, 95, 0.2); overflow: hidden; }
.leaflet-control-zoom a { display: grid; width: 34px; height: 34px; place-items: center; color: var(--blue-dark); background: white; font: 700 20px/1 sans-serif; }
.leaflet-control-zoom a + a { border-top: 1px solid var(--line); }
.leaflet-control-attribution { margin: 0; padding: 3px 7px; color: #526078; background: rgba(255, 255, 255, 0.82); font-size: 10px; }
.leaflet-control-attribution a { color: var(--blue); }
.leaflet-popup { position: absolute; margin-bottom: 20px; text-align: center; }
.leaflet-popup-content-wrapper { padding: 1px; border-radius: 12px; background: white; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.25); }
.leaflet-popup-content { margin: 14px 18px; min-width: 190px; text-align: left; }
.leaflet-popup-tip-container { position: absolute; left: 50%; width: 40px; height: 20px; margin-left: -20px; overflow: hidden; }
.leaflet-popup-tip { width: 17px; height: 17px; margin: -10px auto 0; transform: rotate(45deg); background: white; box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.18); }
.leaflet-popup-close-button { position: absolute; top: 5px; right: 7px; z-index: 1; color: #6a7586; font-size: 20px; }
.site-header { position: sticky; top: 0; z-index: 1000; color: white; background: rgba(8, 40, 95, 0.96); backdrop-filter: blur(14px); }
.header-inner { width: min(1180px, calc(100% - 32px)); min-height: 78px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: grid; gap: 3px; }
.brand strong { font-family: Georgia, serif; font-size: 1.35rem; }
.brand span { color: #cbd8ec; font-size: 0.78rem; }
nav { display: flex; gap: 7px; flex-wrap: wrap; }
nav { scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a { padding: 10px 12px; border-radius: 999px; color: #dce6f6; font-size: 0.88rem; font-weight: 800; }
nav a:hover, nav a.active { color: var(--blue-dark); background: #ffcf8e; }
main { overflow: hidden; }
.hero { color: white; background: linear-gradient(120deg, rgba(7, 31, 75, 0.98), rgba(13, 79, 199, 0.9)), radial-gradient(circle at 80% 20%, #f47b20, transparent 36%); }
.hero-inner { width: min(1180px, calc(100% - 32px)); min-height: 490px; margin: auto; display: grid; grid-template-columns: 1.4fr 0.7fr; gap: 48px; align-items: center; padding: 70px 0; }
.eyebrow, .kicker { color: var(--orange); font-size: 0.78rem; font-weight: 950; letter-spacing: 0.15em; text-transform: uppercase; }
.eyebrow { color: #ffd092; display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 11px; height: 11px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 6px rgba(244, 123, 32, 0.2); }
h1 { max-width: 760px; margin: 15px 0; font: 700 clamp(3.5rem, 8vw, 7rem)/0.88 Georgia, serif; letter-spacing: -0.045em; }
.hero-lede { max-width: 720px; margin: 24px 0 0; color: #dce7f7; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.55; }
.hero-actions, .official-camera-links, .source-links { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions { margin-top: 30px; }
.button, .official-camera-links a, .source-links a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; font-weight: 900; }
.button.primary { color: var(--blue-dark); border-color: #ffd092; background: #ffd092; }
.project-facts { display: grid; gap: 12px; padding: 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 22px; background: rgba(5, 26, 64, 0.52); box-shadow: var(--shadow); }
.project-facts div { padding: 18px; border-radius: 15px; background: rgba(255,255,255,.08); }
.project-facts strong, .project-facts span { display: block; }
.project-facts strong { color: #ffd092; font-size: 1.5rem; }
.project-facts span { margin-top: 5px; color: #d5e0f1; line-height: 1.4; }
.status-strip { width: min(1080px, calc(100% - 32px)); margin: -38px auto 34px; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); overflow: hidden; }
.status-strip div { min-height: 100px; padding: 21px; border-right: 1px solid var(--line); }
.status-strip div:last-child { border: 0; }
.status-strip span, .status-strip strong { display: block; }
.status-strip span { color: var(--muted); font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.status-strip strong { margin-top: 8px; font-size: 1.15rem; }
.page-section, .source-panel { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 55px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.section-heading.compact { margin-bottom: 18px; }
.section-heading h2, .source-panel h2 { margin: 6px 0 0; font: 700 clamp(2rem, 4vw, 3.3rem)/1 Georgia, serif; letter-spacing: -.025em; }
.section-heading > a { color: var(--blue); font-weight: 900; }
.weather-section { padding-top: 34px; }
.connector-news-section { padding-top: 34px; }
.connector-news-list { padding: 28px; }
.weather-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 16px; }
.weather-main, .weather-signals, .email-alert-summary article, .email-alert-card, .map-shell, .incident-card, .camera-card, .camera-fallback, .section-card-grid article, .timeline, .news-list, .source-panel { border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: var(--shadow); }
.weather-main { padding: 30px; background: linear-gradient(135deg, #fffdf8, #eaf2ff); }
.weather-main h3 { margin: 15px 0 9px; font: 700 clamp(1.6rem, 3vw, 2.4rem)/1.08 Georgia, serif; }
.weather-main p { margin: 0; color: var(--muted); line-height: 1.65; }
.impact-badge { display: inline-flex; padding: 8px 12px; border-radius: 999px; color: var(--green); background: #e2f3e9; font-size: .78rem; font-weight: 950; text-transform: uppercase; }
.impact-badge.elevated { color: #8a3d0b; background: #ffead5; }
.impact-badge.high { color: #8a1712; background: #ffe0dc; }
.weather-signals { display: grid; padding: 8px 24px; }
.weather-signals div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.weather-signals div:last-child { border: 0; }
.weather-signals span { color: var(--muted); }
.ncdot-email-section { padding-top: 30px; }
.email-alert-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.email-alert-summary article { padding: 19px 22px; }
.email-alert-summary span, .email-alert-card span { display: block; color: var(--muted); font-size: .72rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.email-alert-summary strong { display: block; margin-top: 7px; font-size: 1.18rem; }
.email-alert-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.email-alert-card { display: grid; gap: 11px; padding: 22px; border-left: 6px solid var(--blue); }
.email-alert-card.severity-closure { border-left-color: var(--red); }
.email-alert-card.severity-incident { border-left-color: #c95c2b; }
.email-alert-card.severity-cleared { border-left-color: var(--green); opacity: .82; }
.email-alert-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.email-alert-card h3 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 1.35rem; }
.email-alert-card b { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: var(--blue-dark); background: #eaf2ff; font-size: .68rem; font-weight: 950; text-transform: uppercase; }
.email-alert-card.severity-closure b { color: #8a1712; background: #ffe0dc; }
.email-alert-card.severity-incident b { color: #8a3d0b; background: #ffead5; }
.email-alert-card.severity-cleared b { color: #1d623f; background: #e2f3e9; }
.email-alert-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.email-alert-meta { color: #48566b; font-size: .82rem; line-height: 1.45; }
.email-alert-card a { color: var(--blue); font-weight: 900; }
.update-source { width: max-content; padding: 4px 8px; border-radius: 999px; color: #48566b; background: #edf3f8; font-size: .68rem; font-weight: 950; text-transform: uppercase; }
.email-alert-card.source-record { opacity: .9; }
.email-alert-card.source-record .update-source { color: #8a3d0b; background: #ffead5; }
.map-intro { max-width: 780px; margin: 14px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.closure-dot, .work-dot, .plan-swatch { width: 10px; height: 10px; display: inline-block; }
.plan-swatch { border-radius: 3px; background: rgba(47, 128, 255, .72); box-shadow: inset 0 0 0 2px rgba(255,255,255,.72), 0 0 0 1px rgba(9,37,95,.2); }
.closure-dot, .work-dot { border-radius: 50%; }
.closure-dot { background: var(--red); }.work-dot { background: var(--orange); }
.map-shell { position: relative; overflow: hidden; }
#connectorMap { height: 470px; background: #dce7ef; }
.map-key { position: absolute; z-index: 900; top: 16px; right: 16px; width: 235px; padding: 16px; border: 1px solid rgba(9, 37, 95, .14); border-radius: 15px; color: var(--ink); background: rgba(255, 253, 248, .94); box-shadow: 0 10px 30px rgba(9, 37, 95, .18); backdrop-filter: blur(10px); pointer-events: none; }
.map-key > strong { display: block; margin-bottom: 11px; color: var(--blue-dark); font-family: Georgia, serif; font-size: 1.08rem; }
.map-key div { display: grid; grid-template-columns: 18px 1fr; column-gap: 9px; align-items: center; padding: 7px 0; border-top: 1px solid rgba(9, 37, 95, .09); }
.map-key div:first-of-type { border-top: 0; }
.map-key b { font-size: .8rem; }
.map-key small { grid-column: 2; margin-top: 1px; color: var(--muted); font-size: .68rem; }
.map-note { padding: 14px 18px; color: var(--muted); background: #f8fafc; font-size: .78rem; line-height: 1.5; }
.map-note strong { color: var(--blue-dark); }
.map-note a { color: var(--blue); font-weight: 900; }
.incident-list { margin-top: 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.incident-card, .loading-card { padding: 22px; }
.incident-card { display: grid; gap: 10px; }
.incident-top { display: flex; justify-content: space-between; gap: 10px; }
.incident-road { font-size: 1.12rem; font-weight: 950; }
.event-tag { align-self: start; padding: 6px 9px; border-radius: 999px; color: #8a3d0b; background: #ffead5; font-size: .68rem; font-weight: 950; text-transform: uppercase; }
.event-tag.closure { color: #8a1712; background: #ffe0dc; }
.incident-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.incident-meta { color: #48566b; font-size: .82rem; }
.incident-card a { color: var(--blue); font-weight: 900; }
.camera-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.camera-card, .camera-fallback { overflow: hidden; padding: 22px; }
.camera-card { position: relative; padding-top: 0; }
.camera-view { position: relative; height: 180px; margin: 0 -22px 18px; overflow: hidden; color: white; background: linear-gradient(135deg, var(--blue-dark), var(--blue)); }
.camera-view img { width: 100%; height: 100%; display: block; object-fit: cover; transition: opacity .25s ease; }
.camera-view img.is-refreshing { opacity: .72; }
.camera-live-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: white; background: rgba(8, 40, 95, .82); box-shadow: 0 3px 12px rgba(0,0,0,.22); backdrop-filter: blur(8px); font-size: .66rem; font-weight: 950; letter-spacing: .05em; text-transform: uppercase; }
.camera-live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5ee28c; box-shadow: 0 0 0 4px rgba(94, 226, 140, .2); }
.camera-route { color: var(--orange); font-size: .72rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.camera-card h3, .camera-fallback h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 1.35rem; }
.camera-card p, .camera-fallback p { margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.camera-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: .73rem; }
.camera-card a { color: var(--blue); font-weight: 900; }
.official-camera-links { margin-top: 16px; }
.official-camera-links a { border-color: var(--line); background: var(--white); color: var(--blue); }
.section-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.section-card-grid article { padding: 23px; }
.section-card-grid span { color: var(--orange); font-weight: 950; }
.section-card-grid h3 { margin: 10px 0; font-family: Georgia, serif; font-size: 1.35rem; }
.section-card-grid p { color: var(--muted); line-height: 1.55; }
.section-card-grid b { color: var(--blue); font-size: .82rem; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.timeline, .news-list { margin: 0; padding: 26px; }
.timeline { list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 0 0 25px 24px; border-left: 2px solid #b9c9df; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }
.timeline li.complete::before { background: var(--green); }
.timeline time { color: var(--muted); font-size: .8rem; font-weight: 900; }
.timeline strong { font-family: Georgia, serif; font-size: 1.08rem; }
.timeline p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.news-list { display: grid; gap: 0; }
.news-list a { display: grid; gap: 5px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.news-list a:last-child { border: 0; }
.news-list time { color: var(--orange); font-size: .75rem; font-weight: 950; text-transform: uppercase; }
.news-list strong { font-family: Georgia, serif; font-size: 1.18rem; }
.news-list span { color: var(--muted); line-height: 1.45; }
.connector-news-item { display: grid; gap: 9px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.connector-news-item:last-child { border: 0; }
.connector-news-media { overflow: hidden; border-radius: 12px; background: var(--blue-dark); }
.connector-news-media.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
.connector-news-media img,
.connector-news-media video { width: 100%; max-height: 260px; display: block; object-fit: cover; }
.connector-news-media.gallery img,
.connector-news-media.gallery video { aspect-ratio: 16 / 9; border-radius: 10px; }
.connector-news-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--orange); font-size: .75rem; font-weight: 950; text-transform: uppercase; }
.connector-news-item h3 { margin: 0; font-family: Georgia, serif; font-size: 1.28rem; }
.connector-news-text { color: var(--muted); line-height: 1.5; }
.connector-news-text p { margin: 0 0 8px; }
.connector-news-text p:last-child { margin-bottom: 0; }
.connector-news-text a, .connector-news-source { color: var(--blue); font-weight: 900; }
.source-panel { margin-top: 40px; margin-bottom: 70px; padding: 34px; display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.source-links { justify-content: flex-end; }
.source-links a { border-color: var(--line); color: var(--blue); }
footer { min-height: 150px; padding: 35px max(16px, calc((100% - 1180px) / 2)); display: flex; justify-content: space-between; gap: 30px; color: #d9e4f4; background: var(--blue-dark); }
footer div { display: flex; gap: 14px; flex-wrap: wrap; align-content: flex-start; }
footer strong, footer span { display: block; width: 100%; }
footer span { color: #afc0da; max-width: 700px; }
footer a { font-weight: 900; }
.leaflet-popup-content { line-height: 1.45; }

@media (max-width: 900px) {
  .hero-inner, .weather-grid, .split-section { grid-template-columns: 1fr; }
  .project-facts { grid-template-columns: repeat(3, 1fr); }
  .section-card-grid { grid-template-columns: repeat(2, 1fr); }
  .camera-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-panel { align-items: flex-start; flex-direction: column; }
  .source-links { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .header-inner { padding: 14px 0; align-items: flex-start; flex-direction: column; }
  nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  nav a { white-space: nowrap; }
  .hero-inner { min-height: auto; padding: 55px 0 72px; }
  h1 { font-size: clamp(3.2rem, 17vw, 5.2rem); }
  .project-facts { grid-template-columns: 1fr; }
  .status-strip { grid-template-columns: repeat(2, 1fr); }
  .status-strip div:nth-child(2) { border-right: 0; }
  .status-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .email-alert-summary, .email-alert-list, .incident-list, .camera-grid, .section-card-grid { grid-template-columns: 1fr; }
  .connector-news-media.gallery { grid-template-columns: 1fr; }
  #connectorMap { height: 390px; }
  .map-key { top: 12px; right: 12px; width: 190px; padding: 12px; }
  .map-key small { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 5px; }
  footer { flex-direction: column; }
}
