/* ConstructionDaily news article — V3 Dense + V3 Mobile */
/* Design tokens from /tmp/gcd-news-article-v2/design_handoff_v3_dense/README.md */

:root {
  --headline-font: 'Source Serif 4', Georgia, serif;
  --body-font: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --page-pad-x: 16px;
}

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #000;
  font-family: var(--body-font);
}

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

/* Smooth scroll for TOC anchors */
html { scroll-behavior: smooth; }

/* H2 anchor offset under sticky masthead */
h2[id^="h2-"] {
  scroll-margin-top: 120px;
}

/* Strip default details disclosure on mobile TOC */
summary {
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}

/* Hide scrollbar on horizontal-scroll mobile rows */
.cd-no-scrollbar {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
}
.cd-no-scrollbar::-webkit-scrollbar { display: none; }

/* CTA button hover (subtle) */
.cd-cta-btn {
  cursor: pointer;
  transition: opacity 120ms ease;
}
.cd-cta-btn:hover { opacity: 0.85; }

/* Inline LeadForm wrapper section */
.cd-lead-section {
  border-top: 3px solid #000;
  background: #fff;
  margin-top: 32px;
  padding: 36px 32px 48px;
}

.cd-lead-section__inner {
  max-width: 760px;
  margin: 0 auto;
}

.cd-lead-section__heading {
  font-family: var(--headline-font);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.4px;
  margin: 0 0 8px;
  color: #000;
}

.cd-lead-section__subline {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  margin: 0 0 24px;
}

/* The reused LeadForm renders GCD form classes — apply minimal scoping so its
   look survives inside the editorial page without dragging in the GCD site palette. */
.cd-lead-section .form {
  font-family: var(--body-font);
}

/* Visibility helpers — viewport-driven layout swap */
.cd-desktop-only { display: block; }
.cd-mobile-only { display: none; }
.cd-tablet-reflow-only { display: none; }

/* Tablet 481-900: single column reflow of desktop (rails below body) */
@media (max-width: 900px) and (min-width: 481px) {
  .cd-tablet-reflow-only { display: block; }
  /* Desktop layout still shows but its grid collapses */
  .cd-article-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* Hide left rail TOC + progress (replaced by inline mobile-style? we keep simple — hide) */
  .cd-left-rail {
    position: static !important;
    display: none !important;
  }
  .cd-right-rail {
    position: static !important;
  }
}

/* True mobile ≤480 — switch to mobile composition */
@media (max-width: 480px) {
  .cd-desktop-only { display: none; }
  .cd-mobile-only { display: block; }
}

/* Padding tightening near 720 per design doc — keep at outer container */
@media (max-width: 720px) {
  .cd-article-container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Force black background page edges to white when leadform's outer page styling
   ever leaks; we are explicit. */
.cd-page-root { background: #fff; color: #000; }

/* Support form inputs from bottom.jsx — minimal local styling so the form is
   readable without loading the main styles.css (we deliberately do NOT import
   styles.css so the editorial identity is preserved). */
.cd-form-shell {
  border: 1px solid #000;
  background: #fff;
  padding: 24px;
}
.cd-form-shell .form { font-size: 14px; line-height: 1.5; color: #1a1a1a; }
.cd-form-shell .form__progress { margin-bottom: 18px; }
.cd-form-shell .form__progress-label {
  font-family: var(--body-font);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 8px;
}
.cd-form-shell .form__progress-bar {
  height: 4px;
  background: #eee;
  margin-bottom: 8px;
}
.cd-form-shell .form__progress-bar-fill {
  height: 100%;
  background: #000;
  transition: width 200ms ease;
}
.cd-form-shell .form__progress-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.cd-form-shell .form__progress-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f4f4f4;
  border: 1px solid #ddd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #999;
  font-family: var(--body-font);
}
.cd-form-shell .form__progress-dot.is-done {
  background: #000;
  color: #fff;
  border-color: #000;
}
.cd-form-shell .form__progress-dot.is-current {
  outline: 2px solid #000;
  outline-offset: 2px;
}
.cd-form-shell .form__step-title {
  font-family: var(--headline-font);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 16px;
  color: #000;
}
.cd-form-shell .form__group { margin-bottom: 16px; }
.cd-form-shell .form__group-label {
  font-family: var(--body-font);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 8px;
}
.cd-form-shell .form__options { display: flex; flex-direction: column; gap: 8px; }
.cd-form-shell .form__options--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.cd-form-shell .form__options--chips {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.cd-form-shell .form__option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ccc;
  text-align: left;
  cursor: pointer;
  font-family: var(--body-font);
  color: #1a1a1a;
  transition: border-color 120ms ease, background 120ms ease;
}
.cd-form-shell .form__option:hover {
  border-color: #000;
}
.cd-form-shell .form__option.is-selected {
  border-color: #000;
  background: #fafafa;
}
.cd-form-shell .form__option--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.cd-form-shell .form__option-label { font-size: 14px; font-weight: 600; color: #000; }
.cd-form-shell .form__option-sub { font-size: 12px; color: #666; }
.cd-form-shell .form__option-check {
  font-size: 14px;
  color: #000;
}
.cd-form-shell .form__chip {
  padding: 8px 12px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 13px;
  font-family: var(--body-font);
  color: #1a1a1a;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.cd-form-shell .form__chip:hover { border-color: #000; }
.cd-form-shell .form__chip.is-selected {
  border-color: #000;
  background: #000;
  color: #fff;
}
.cd-form-shell .form__field {
  display: block;
  margin-bottom: 12px;
}
.cd-form-shell .form__field--full { width: 100%; }
.cd-form-shell .form__label {
  display: block;
  font-family: var(--body-font);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
}
.cd-form-shell .form__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cd-form-shell .form__field--full {
  grid-column: 1 / -1;
}
.cd-form-shell .form input[type="text"],
.cd-form-shell .form input[type="tel"],
.cd-form-shell .form input[type="email"],
.cd-form-shell .form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  background: #fff;
  font-family: var(--body-font);
  font-size: 14px;
  color: #1a1a1a;
  border-radius: 0;
}
.cd-form-shell .form input:focus,
.cd-form-shell .form textarea:focus {
  outline: 2px solid #000;
  outline-offset: -1px;
  border-color: #000;
}
.cd-form-shell .form__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.cd-form-shell .form .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: #000;
  color: #fff;
  border: 0;
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
}
.cd-form-shell .form .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cd-form-shell .form .btn--ghost {
  background: transparent;
  color: #000;
  border: 1px solid #ccc;
}
.cd-form-shell .form .btn--sm {
  padding: 8px 14px;
  font-size: 11px;
}
.cd-form-shell .form .btn__arrow {
  display: inline-block;
}
.cd-form-shell .form__fineprint {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.5;
  color: #777;
}
.cd-form-shell .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cd-form-shell .form__success {
  text-align: center;
  padding: 24px 12px;
}
.cd-form-shell .form__success-tick {
  font-family: var(--headline-font);
  font-size: 48px;
  font-weight: 700;
  color: #000;
  margin-bottom: 8px;
}
.cd-form-shell .form__success h3 {
  font-family: var(--headline-font);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 12px;
  color: #000;
}
.cd-form-shell .form__success p {
  font-size: 14px;
  line-height: 1.55;
  color: #333;
  margin: 0 0 12px;
}
.cd-form-shell .form__success a {
  color: #000;
  font-weight: 600;
}
.cd-form-shell .form__success-next {
  font-size: 11px;
  color: #999;
  margin-top: 16px;
  letter-spacing: 1px;
}
.cd-form-shell .serif { font-family: var(--headline-font); }

/* Form-shell mobile tightening */
@media (max-width: 480px) {
  .cd-form-shell { padding: 20px 16px; }
  .cd-form-shell .form__fields { grid-template-columns: 1fr; }
  .cd-form-shell .form__options--grid { grid-template-columns: 1fr; }
  .cd-lead-section { padding: 28px 16px 36px; }
  .cd-lead-section__heading { font-size: 22px; }
}
