/* ==========================================================================
   SKY GLASS HUB - CORE DESIGN SYSTEM & STYLESHEET
   100/100 Core Web Vitals, Phone-First, Accessible, High Contrast
   ========================================================================== */

:root {
  /* Design Tokens from Section 1.4 */
  --color-ink: #0F1B2D;
  --color-body: #1F2A37;
  --color-bg: #F7F9FB;
  --color-surface: #FFFFFF;
  --color-link: #1456D9;
  --color-action: #0A7A87;
  --color-action-hover: #08616B;
  --color-border: #D9E0E7;
  --color-border-subtle: #E5E9EF;
  
  /* Status / Callout Colors */
  --amber-bg: #FFF4D6;
  --amber-border: #F5A524;
  --amber-text: #5C3D00;
  
  --green-bg: #E6F6EC;
  --green-border: #2E9E5B;
  --green-text: #14532D;
  
  --red-bg: #FDE8E8;
  --red-border: #D64545;
  --red-text: #7A1D1D;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  --max-content-width: 760px;
  --max-site-width: 1200px;
  
  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 27, 45, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 27, 45, 0.08);
  --shadow-lg: 0 12px 24px rgba(15, 27, 45, 0.12);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-body);
  font-size: 17.5px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  color: var(--color-body);
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--color-action);
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-ink);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 2.45rem);
  margin-bottom: 0.85rem;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw + 0.6rem, 1.75rem);
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  scroll-margin-top: 5.5rem;
}

h3 {
  font-size: 1.22rem;
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
  scroll-margin-top: 5.5rem;
}

p {
  margin-bottom: 1.15rem;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.45rem;
}

strong {
  color: var(--color-ink);
  font-weight: 700;
}

/* Link rules: Blue is strictly for links */
a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: opacity 0.15s ease, color 0.15s ease;
}
a:hover {
  opacity: 0.85;
}
a:focus-visible {
  outline: 2px solid var(--color-action);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Buttons: Teal strictly for actions */
.btn-teal,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-action);
  color: #FFFFFF !important;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.1s ease;
  line-height: 1.3;
}
.btn-teal:hover,
.btn-primary:hover {
  background-color: var(--color-action-hover);
  opacity: 1;
  text-decoration: none;
}
.btn-teal:active,
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--color-ink) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.btn-secondary:hover {
  background-color: var(--color-border-subtle);
  border-color: var(--color-ink);
  text-decoration: none;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: var(--max-site-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo {
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--color-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.site-logo:hover {
  opacity: 1;
}

.logo-accent {
  color: var(--color-action);
  font-weight: 750;
}

.site-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-logo-badge {
  background: #F0F4F8;
  border: 1px solid #D9E2EC;
  color: var(--color-action);
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 750;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* Desktop Nav (Max 5 items, no mega-menu) */
.desktop-nav {
  display: none;
}
@media (min-width: 992px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
  }
}
@media (min-width: 1180px) {
  .desktop-nav {
    gap: 0.5rem;
  }
}

.nav-item {
  position: relative;
}

.nav-link-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-ink);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
@media (min-width: 1180px) {
  .nav-link-btn {
    font-size: 0.92rem;
    padding: 0.45rem 0.75rem;
  }
}

.nav-link-btn:hover,
.nav-link-btn:focus-visible {
  background-color: var(--color-bg);
  color: var(--color-action);
}

.nav-chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  fill: currentColor;
  opacity: 0.65;
}

.nav-item:hover .nav-chevron,
.nav-item:focus-within .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -3px rgba(15, 27, 45, 0.1), 0 4px 6px -2px rgba(15, 27, 45, 0.05);
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1010;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(2px);
}

.nav-dropdown a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--color-ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-dropdown a:hover {
  background: var(--color-bg);
  color: var(--color-link);
  opacity: 1;
}

.nav-dropdown .dropdown-footer-link {
  border-top: 1px solid var(--color-border-subtle);
  margin-top: 0.3rem;
  padding-top: 0.55rem;
  font-weight: 650;
  color: var(--color-action);
}

/* Header Utilities */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--color-bg);
  border-color: var(--color-ink);
}

.header-cta-btn {
  display: none;
}
@media (min-width: 1060px) {
  .header-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 650;
    white-space: nowrap;
    height: 36px;
    border-radius: var(--radius-sm);
  }
}

.mobile-menu-toggle {
  display: flex;
}
@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 999;
  overflow-y: auto;
  padding: 1.25rem;
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}
.mobile-nav-drawer.is-open {
  display: flex;
}

.mobile-pinned-cta {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}
.mobile-pinned-cta a {
  display: block;
  font-weight: 750;
  color: var(--green-text);
  font-size: 1.05rem;
  text-decoration: none;
}

.mobile-group {
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 1rem;
}

.mobile-group-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-action);
  font-weight: 750;
  margin-bottom: 0.6rem;
}

.mobile-links {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mobile-links a {
  color: var(--color-ink);
  font-size: 0.95rem;
  text-decoration: none;
  display: block;
  padding: 0.35rem 0;
}

/* Main Content Wrapper (Single Column Phone-First ~720px) */
.page-container {
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  flex: 1;
}

.full-width-container {
  max-width: var(--max-site-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  flex: 1;
}

/* Breadcrumbs */
.breadcrumb-nav {
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.breadcrumbs {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-body);
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--color-border);
}
.breadcrumbs a {
  color: var(--color-body);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--color-link);
  text-decoration: underline;
}
.breadcrumbs [aria-current="page"] {
  font-weight: 600;
  color: var(--color-ink);
}

/* Meta Byline & Last Checked Badge */
.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--color-body);
}

.badge-checked {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.78rem;
}
.badge-checked svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* Model Chips (Gen 1, Gen 2, Air) */
.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.model-chip-label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--color-ink);
  margin-right: 0.2rem;
}
.model-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.22rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
}
.model-chip.chip-active {
  background: var(--color-ink);
  color: #FFFFFF;
  border-color: var(--color-ink);
}

/* Quick Answer Box */
.quick-answer-box {
  background: var(--color-surface);
  border: 2px solid var(--color-action);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.quick-answer-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-action);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.quick-answer-header svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.quick-answer-content p:last-child {
  margin-bottom: 0;
}

/* Jump Links / Table of Contents */
.toc-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin-bottom: 2.25rem;
}
.toc-title {
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--color-ink);
  margin-bottom: 0.6rem;
}
.toc-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.92rem;
}
.toc-list a {
  text-decoration: none;
}
.toc-list a:hover {
  text-decoration: underline;
}

/* Callout Boxes (Section 1.4: Amber, Green, Red) */
.callout {
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin: 1.75rem 0;
  border-left-width: 4px;
  border-left-style: solid;
}

.callout-title {
  font-weight: 750;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.callout-title svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.callout-amber {
  background-color: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
  border-left-width: 5px;
}
.callout-amber strong, .callout-amber .callout-title {
  color: var(--amber-text);
}

.callout-green {
  background-color: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green-text);
  border: 1px solid var(--green-border);
  border-left-width: 5px;
}
.callout-green strong, .callout-green .callout-title {
  color: var(--green-text);
}

.callout-red {
  background-color: var(--red-bg);
  border-color: var(--red-border);
  color: var(--red-text);
  border: 1px solid var(--red-border);
  border-left-width: 5px;
}
.callout-red strong, .callout-red .callout-title {
  color: var(--red-text);
}

/* Symptom Picker Grid */
.symptom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
@media (min-width: 600px) {
  .symptom-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .symptom-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.symptom-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-body);
}
.symptom-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-action);
  opacity: 1;
}
.symptom-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  color: var(--color-action);
}
.symptom-card-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.symptom-card-title {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--color-ink);
  margin-bottom: 0.35rem;
}
.symptom-card-desc {
  font-size: 0.88rem;
  color: var(--color-body);
  margin-bottom: 0.8rem;
  flex-grow: 1;
}
.symptom-card-link {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--color-action);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Numbered Step Cards */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.step-card.step-completed {
  border-color: var(--green-border);
  background: #F2FAF5;
}

.step-check-label {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--color-body);
  cursor: pointer;
  user-select: none;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}
.step-check-label:hover {
  border-color: var(--color-action);
}
.step-checkbox {
  accent-color: var(--green-border);
  cursor: pointer;
}
.step-completed .step-check-label {
  background: var(--green-bg);
  color: var(--green-text);
  border-color: var(--green-border);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.step-badge {
  background: var(--color-action);
  color: #FFFFFF;
  font-weight: 750;
  font-size: 0.85rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 750;
  color: var(--color-ink);
  margin: 0;
}

.step-expected {
  background: var(--color-bg);
  border-left: 3px solid var(--color-action);
  padding: 0.65rem 0.95rem;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.step-expected strong {
  color: var(--color-action);
}

/* Responsive Tables (Horizontally Scrolling Container with Sticky First Column) */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--color-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.data-table thead th {
  background: var(--color-bg);
  color: var(--color-ink);
  font-weight: 750;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(10, 122, 135, 0.03);
}

/* Mobile Sticky Column */
@media (max-width: 768px) {
  .table-sticky-col th:first-child,
  .table-sticky-col td:first-child {
    position: sticky;
    left: 0;
    background: var(--color-surface);
    z-index: 2;
    border-right: 2px solid var(--color-border);
  }
  .table-sticky-col thead th:first-child {
    background: var(--color-bg);
    z-index: 3;
  }
}

.table-footnote {
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  color: var(--color-body);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  font-style: italic;
}

/* Figure & Image Styling */
.figure-wrapper {
  margin: 2rem 0;
  text-align: center;
}

.figure-wrapper img,
.figure-wrapper svg {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: block;
  margin: 0 auto;
}

.figure-caption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--color-body);
  font-style: normal;
}

/* "Still Stuck?" Box */
.still-stuck-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin: 2.5rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.still-stuck-title {
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.still-stuck-title svg {
  width: 20px;
  height: 20px;
  fill: var(--color-action);
}

/* Related Guides Block (Max 3 Hand-Picked Links) */
.related-guides-block {
  margin: 2rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.related-title {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 750;
  color: var(--color-action);
  margin-bottom: 0.75rem;
}
.related-links {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.related-links li {
  margin-bottom: 0;
}
.related-links a {
  font-weight: 600;
  font-size: 0.95rem;
}

/* "Next Step" Box (Funnel flow) */
.next-step-box {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-sm);
}
.next-step-label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-action);
  margin-bottom: 0.4rem;
}
.next-step-title {
  font-size: 1.25rem;
  font-weight: 750;
  color: var(--color-ink);
  margin-bottom: 0.6rem;
}
.next-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Live Incident Tracker Template (Page 3) */
.incident-template {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.incident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.incident-textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-body);
  resize: vertical;
}

/* Phase 2: Interactive Diagnostic Wizard */
.wizard-box {
  background: var(--color-surface);
  border: 2px solid var(--color-action);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}
.wizard-header {
  margin-bottom: 1.25rem;
}
.wizard-step {
  display: none;
}
.wizard-step.active-step {
  display: block;
}
.wizard-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}
@media (min-width: 600px) {
  .wizard-options-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wizard-btn-option {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-ink);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wizard-btn-option:hover {
  border-color: var(--color-action);
  background: var(--color-surface);
  transform: translateY(-1px);
}
.wizard-btn-option small {
  font-weight: 400;
  color: var(--color-body);
  font-size: 0.82rem;
}
.wizard-result-box {
  background: var(--green-bg);
  border: 2px solid var(--green-border);
  color: var(--green-text);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}
.wizard-result-box strong {
  color: var(--green-text);
}

/* Phase 2: Interactive Price & Finance Calculator */
.calc-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .calc-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}
.calc-group {
  margin-bottom: 1.25rem;
}
.calc-label {
  font-weight: 750;
  font-size: 0.92rem;
  color: var(--color-ink);
  margin-bottom: 0.5rem;
  display: block;
}
.calc-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.calc-pill-label {
  cursor: pointer;
}
.calc-pill-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.calc-pill-text {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-ink);
  font-size: 0.85rem;
  font-weight: 650;
  transition: all 0.15s ease;
}
.calc-pill-label input:checked + .calc-pill-text {
  background: var(--color-action);
  color: #FFFFFF;
  border-color: var(--color-action);
}
.calc-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  cursor: pointer;
}
.calc-summary-panel {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.calc-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
}
.calc-stat-total {
  border-top: 2px solid var(--color-action);
  border-bottom: none;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}
.calc-total-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-action);
}

/* Phase 2: Live Filter Table */
.filter-search-box {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}
.filter-search-input {
  width: 100%;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--color-surface);
  color: var(--color-ink);
  outline: none;
}
.filter-search-input:focus {
  border-color: var(--color-action);
}

/* Footer & Legal Strip */
/* Phase 2: Broadband Speed Readiness Estimator */
.speed-estimator-container {
  background: var(--color-surface);
  border: 2px solid var(--color-action);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}
.speed-estimator-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 650px) {
  .speed-estimator-form {
    grid-template-columns: repeat(3, 1fr) auto;
    align-items: flex-end;
  }
}
.speed-input, .speed-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: var(--color-bg);
  color: var(--color-ink);
  outline: none;
  font-family: inherit;
}
.speed-input:focus, .speed-select:focus {
  border-color: var(--color-action);
  box-shadow: 0 0 0 3px rgba(10, 122, 135, 0.15);
}

.site-footer {
  background: var(--color-ink);
  color: #B5C2D3;
  margin-top: auto;
  font-size: 0.88rem;
  border-top: 1px solid #1C2B42;
}

.footer-brand-section {
  border-bottom: 1px solid #1C2B42;
  padding: 2.25rem 1.25rem 1.75rem;
}

.footer-brand-container {
  max-width: var(--max-site-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.site-logo-footer {
  text-decoration: none;
}
.site-logo-footer:hover {
  opacity: 0.95;
}

.footer-brand-tagline {
  font-size: 0.88rem;
  color: #8C9CAB;
  max-width: 600px;
  line-height: 1.5;
  margin: 0;
}

.footer-top {
  max-width: var(--max-site-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
}
@media (min-width: 600px) {
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .footer-top {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-column-title {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 750;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.footer-links {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #B5C2D3;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.legal-strip {
  background: #09121E;
  border-top: 1px solid #142032;
  padding: 1.5rem 1.25rem;
}

.legal-strip-content {
  max-width: var(--max-site-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #8C9CAB;
}
@media (min-width: 768px) {
  .legal-strip-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.legal-statement {
  max-width: 800px;
  line-height: 1.5;
}

/* Modal Search Overlay */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 45, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 1rem;
}
.search-modal.is-active {
  display: flex;
}

.search-dialog {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  gap: 0.75rem;
}
.search-input-wrapper svg {
  width: 20px;
  height: 20px;
  fill: var(--color-action);
}
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--color-ink);
  outline: none;
}
.search-close-btn {
  background: none;
  border: none;
  color: var(--color-body);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.search-results {
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-result-item {
  display: block;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.search-result-item:hover {
  background: var(--color-bg);
  border-color: var(--color-border);
  opacity: 1;
}
.search-result-title {
  font-weight: 700;
  color: var(--color-ink);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
.search-result-desc {
  font-size: 0.85rem;
  color: var(--color-body);
}

/* Phase 3: Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-action);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Phase 3: Floating Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-ink);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.15s ease;
}
.back-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top-btn:hover {
  background: var(--color-action);
}

/* ==========================================================================
   AUTHORITY COMPONENTS: FEEDBACK, VETTING BADGE, CONTACT & COMMUNITY POLL
   ========================================================================== */

/* 1. Editorial Vetting Badge (E-E-A-T) */
.editorial-vetting-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #EEF8F9;
  border: 1px solid #B8E4E9;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.86rem;
  color: var(--color-ink);
}
.vetting-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vetting-content strong, .vetting-text strong {
  color: var(--color-action);
  font-weight: 750;
}
.vetting-text a {
  color: var(--color-action);
  font-weight: 600;
  text-decoration: underline;
}

/* 2. Interactive Guide Feedback Widget */
.guide-feedback-widget {
  margin-top: 2.5rem;
  margin-bottom: 2rem;
}
.feedback-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.feedback-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.feedback-question-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.feedback-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.feedback-heading {
  font-size: 1.15rem;
  color: var(--color-ink);
  margin-bottom: 0.2rem;
  font-weight: 750;
}
.feedback-subtext {
  font-size: 0.88rem;
  color: var(--color-body);
  margin-bottom: 0;
}
.feedback-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: #F7F9FB;
  color: var(--color-ink);
  transition: all 0.15s ease;
}
.feedback-btn:hover {
  border-color: var(--color-action);
  color: var(--color-action);
  background: #FFFFFF;
  transform: translateY(-1px);
}
.feedback-btn-yes:hover {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green-text);
}
.feedback-btn-no:hover {
  background: var(--red-bg);
  border-color: var(--red-border);
  color: var(--red-text);
}
.feedback-response-box {
  margin-top: 1rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
}
.feedback-success {
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green-text);
}
.feedback-note {
  background: #FFF9E6;
  border: 1px solid #F5D070;
  color: #6B4900;
}

/* 3. Community Bug Resolution Tracker Poll */
.community-poll-card {
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}
.poll-badge {
  display: inline-block;
  background: var(--color-ink);
  color: #38BDF8;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
.community-poll-card h3 {
  font-size: 1.22rem;
  color: var(--color-ink);
  margin-bottom: 0.35rem;
}
.poll-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 1.15rem 0;
}
@media (max-width: 600px) {
  .poll-options {
    grid-template-columns: 1fr;
  }
}
.poll-btn {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: #FFFFFF;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.poll-btn:hover {
  border-color: var(--color-action);
  box-shadow: var(--shadow-sm);
}
.poll-btn.has-voted {
  cursor: default;
  opacity: 0.9;
}
.poll-btn-label {
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--color-ink);
  margin-bottom: 0.2rem;
}
.poll-btn-count {
  font-size: 0.82rem;
  color: var(--color-dim);
}
.poll-bar-wrapper {
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.poll-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0A7A87, #2E9E5B);
  transition: width 0.5s ease;
}
.poll-footer-text {
  font-size: 0.8rem;
  color: var(--color-dim);
}

/* 4. Contact Form Card */
.contact-form-container {
  margin: 2rem 0;
}
.contact-form-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.contact-form-card .form-header {
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 1rem;
}
.contact-form-card .form-header h2 {
  font-size: 1.45rem;
  color: var(--color-ink);
  margin-bottom: 0.4rem;
}
.contact-form-card .form-header p {
  color: var(--color-body);
  font-size: 0.95rem;
  margin-bottom: 0;
}
.form-row {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.form-row-2 {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 680px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .contact-form-card {
    padding: 1.25rem;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}
.form-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-ink);
  margin-bottom: 0.4rem;
}
.required-star {
  color: #D64545;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-ink);
  background: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-action);
  box-shadow: 0 0 0 3px rgba(10, 122, 135, 0.15);
}
.contact-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.85rem;
  font-size: 1rem;
  font-weight: 750;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.spinner-svg {
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}
.form-status-alert {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.55;
}
.alert-success {
  background: var(--green-bg);
  border: 1.5px solid var(--green-border);
  color: var(--green-text);
}
.alert-error {
  background: var(--red-bg);
  border: 1.5px solid var(--red-border);
  color: var(--red-text);
}

/* 5. Energy Cost Calculator */
.calc-range {
  accent-color: var(--color-action);
  cursor: pointer;
}
.calc-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  padding: 1rem;
}
@media (max-width: 600px) {
  .calc-metric-row {
    grid-template-columns: 1fr;
  }
}
.calc-metric-item {
  display: flex;
  flex-direction: column;
}
.calc-metric-lbl {
  font-size: 0.8rem;
  color: var(--color-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.calc-metric-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-ink);
}

/* Print Styles */
@media print {
  .site-header, .site-footer, .next-step-box, .btn-teal, .theme-toggle-btn, .search-modal, .back-to-top-btn, .reading-progress-bar, .incident-header button, .step-check-label {
    display: none !important;
  }
  body {
    background: #FFF !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.4;
  }
  .page-container, .full-width-container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .step-card {
    border: 1px solid #CCC !important;
    page-break-inside: avoid;
    box-shadow: none !important;
    margin-bottom: 1rem;
  }
  .callout {
    border: 1px solid #999 !important;
    background: #F9F9F9 !important;
    color: #000 !important;
    page-break-inside: avoid;
  }
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 80%;
  }
}
