/* ==========================================================================
   TAKECARE 2026 Benefits Guide — JW Marriott Parq Vancouver & the DOUGLAS
   Modern Pacific Luxury Hospitality UI (Frosted Ivory · Deep Emerald · Satin Gold)
   ========================================================================== */

:root {
  --bg-page: #f6f4f0;
  --bg-surface: #ffffff;
  --bg-soft: #f0ece4;

  /* Pacific Northwest Deep Emerald (inspired by the DOUGLAS & Parq Vancouver) */
  --emerald-950: #0d211b;
  --emerald-900: #132f26;
  --emerald-800: #1c4437;
  --emerald-700: #255948;
  --emerald-100: #e7f1ed;
  --emerald-50: #f2f8f5;

  /* Warm Satin Gold */
  --gold-600: #997030;
  --gold-500: #b58942;
  --gold-400: #d1ab67;
  --gold-100: #f8efd9;
  --gold-50: #fcf8ee;

  /* Clean Neutral Inks */
  --ink-900: #161b18;
  --ink-700: #3d4540;
  --ink-500: #66706a;
  --ink-400: #8a948e;

  --crimson: #a8322d;
  --crimson-soft: #fdf1f0;

  --border: rgba(19, 47, 38, 0.09);
  --border-strong: rgba(19, 47, 38, 0.16);

  /* Crisp Modern Typography — looks ultra-clean on Windows, macOS & Cloudflare */
  --font-display: 'Plus Jakarta Sans', 'Segoe UI Variable Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', 'Segoe UI Variable Text', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow-xs: 0 1px 2px rgba(13, 33, 27, 0.04);
  --shadow-sm: 0 2px 8px rgba(13, 33, 27, 0.05), 0 1px 2px rgba(13, 33, 27, 0.03);
  --shadow-md: 0 10px 30px rgba(13, 33, 27, 0.08), 0 2px 6px rgba(13, 33, 27, 0.04);
  --shadow-lg: 0 20px 52px rgba(13, 33, 27, 0.14), 0 4px 14px rgba(13, 33, 27, 0.06);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-900);
  background-color: var(--bg-page);
  min-height: 100vh;
}

button, input, select, textarea {
  font-family: inherit;
}

a {
  color: var(--emerald-700);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--emerald-900);
  text-decoration: underline;
}

/* ==========================================================================
   Frosted Ivory Top Navigation Bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  color: var(--ink-900);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-monogram {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--emerald-800), var(--emerald-950));
  color: var(--gold-400);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(13, 33, 27, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-properties {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.2;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.nav-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.6);
}

.nav-tab.active {
  background: var(--emerald-900);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(19, 47, 38, 0.22);
}

.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--emerald-800);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--emerald-50);
  border: 1px solid rgba(28, 68, 55, 0.16);
  white-space: nowrap;
}

.engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e9e6b;
}

/* ==========================================================================
   Pacific Emerald Hero + Floating Search Concierge
   ========================================================================== */
.hero-wrap {
  position: relative;
  padding-bottom: 36px;
}

.hero {
  background:
    radial-gradient(ellipse 75% 90% at 15% 0%, rgba(209, 171, 103, 0.16), transparent 58%),
    radial-gradient(ellipse 65% 80% at 88% 100%, rgba(45, 114, 90, 0.35), transparent 60%),
    linear-gradient(135deg, #0f261f 0%, #173a2f 52%, #112a22 100%);
  color: #ffffff;
  padding: 54px 24px 86px;
  position: relative;
  overflow: visible;
}

.hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 14px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: rgba(209, 171, 103, 0.5);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(242, 248, 245, 0.8);
  max-width: 580px;
  margin: 0 auto;
  font-weight: 400;
}

/* Floating Search Dock straddling Hero & Canvas */
.search-dock {
  max-width: 780px;
  margin: -48px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 35;
}

.search-shell {
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 18px;
  padding: 8px 10px 8px 22px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(19, 47, 38, 0.12);
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.search-box:focus-within {
  border-color: var(--emerald-700);
  box-shadow:
    0 20px 56px rgba(13, 33, 27, 0.18),
    0 0 0 4px rgba(37, 89, 72, 0.14);
}

.search-icon {
  color: var(--emerald-700);
  display: flex;
  flex-shrink: 0;
  margin-right: 14px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-900);
  background: transparent;
  padding: 12px 0;
  min-width: 0;
}

.search-input::placeholder {
  color: var(--ink-400);
  font-weight: 400;
}

.search-clear {
  appearance: none;
  border: none;
  background: var(--bg-soft);
  color: var(--ink-700);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  place-items: center;
  margin-right: 8px;
  font-size: 16px;
  transition: background-color 0.15s;
}

.search-clear.visible {
  display: grid;
}

.search-clear:hover {
  background: #e1dbd0;
}

.search-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-500);
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 5px 9px;
  margin-right: 4px;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.prompt-chip {
  appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-700);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s var(--ease);
}

.prompt-chip:hover {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Live Question Autocomplete Dropdown */
.suggest-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  display: none;
}

.suggest-dropdown.visible {
  display: block;
  animation: fadeSlideIn 0.16s var(--ease);
}

.suggest-header {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald-800);
  padding: 10px 16px 8px;
  background: var(--emerald-50);
  border-bottom: 1px solid var(--border);
}

.suggest-item {
  width: 100%;
  appearance: none;
  border: none;
  background: #ffffff;
  text-align: left;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s;
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item:hover {
  background: var(--gold-50);
}

.suggest-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
}

.suggest-sec {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-600);
  background: var(--gold-100);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ==========================================================================
   Main Container & Key Benefits Highlights Strip
   ========================================================================== */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 28px 80px;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeSlideIn 0.22s var(--ease);
}

.highlights-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.highlight-tile {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}

.highlight-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(181, 137, 66, 0.5);
}

.highlight-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald-700);
}

.highlight-stat {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.12;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.highlight-desc {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.5;
}

.highlight-ref {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-600);
  margin-top: 6px;
}

/* ==========================================================================
   Search Results & Verified Concierge Answer Card
   ========================================================================== */
.results-section {
  margin-bottom: 36px;
  display: none;
}

.results-section.visible {
  display: block;
  animation: fadeSlideIn 0.24s var(--ease);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.results-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink-900);
}

.results-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-500);
}

.best-answer-card {
  background: var(--bg-surface);
  border: 1px solid rgba(19, 47, 38, 0.14);
  border-top: 4px solid var(--emerald-800);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}

.best-answer-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.best-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--emerald-700);
  background: var(--emerald-50);
  padding: 4px 10px;
  border-radius: 6px;
}

.best-answer-text {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-700);
  margin: 0 0 20px;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.related-qa-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.related-qa-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s var(--ease);
}

.related-qa-btn:hover {
  border-color: var(--emerald-700);
  background: var(--emerald-50);
  transform: translateX(3px);
}

.related-qa-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
}

.lines-toggle-bar {
  display: flex;
  align-items: center;
  margin: 12px 0 6px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s var(--ease);
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--emerald-700);
}

.result-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.result-section-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-snippet {
  font-size: 14px;
  color: var(--ink-700);
  line-height: 1.62;
  margin: 0;
}

mark {
  background: var(--gold-100);
  color: var(--ink-900);
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
}

/* ==========================================================================
   Buttons & Citation Chips
   ========================================================================== */
.cite-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gold-600);
  background: var(--gold-50);
  border: 1px solid rgba(181, 137, 66, 0.32);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.cite-chip:hover {
  background: var(--gold-500);
  color: #ffffff;
  border-color: var(--gold-500);
}

.btn-primary {
  appearance: none;
  border: none;
  background: var(--emerald-900);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 3px 10px rgba(19, 47, 38, 0.2);
  transition: all 0.2s var(--ease);
}

.btn-primary:hover {
  background: var(--emerald-700);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(19, 47, 38, 0.26);
}

.btn-ghost {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s var(--ease);
}

.btn-ghost:hover {
  border-color: var(--emerald-700);
  color: var(--emerald-900);
  background: var(--emerald-50);
}

.empty-state {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 28px;
  text-align: center;
  color: var(--ink-700);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   Two-Column Document Reader
   ========================================================================== */
.guide-layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 86px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
}

.sidebar-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
  padding: 0 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toc-btn {
  width: 100%;
  appearance: none;
  border: none;
  background: transparent;
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-700);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.16s var(--ease);
}

.toc-btn:hover {
  background: var(--bg-page);
  color: var(--ink-900);
}

.toc-btn.active {
  background: var(--emerald-50);
  color: var(--emerald-900);
  font-weight: 700;
}

.toc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-600);
  font-weight: 600;
  margin-right: 7px;
  font-variant-numeric: tabular-nums;
}

.toc-page {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-400);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.sidebar-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-reader {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.reader-toolbar {
  padding: 18px 28px;
  background: #faf9f6;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.reader-doc-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.reader-doc-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

.reader-doc-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-500);
}

.reader-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}

.filter-pill:hover {
  border-color: var(--emerald-700);
  color: var(--emerald-900);
}

.filter-pill.active {
  background: var(--emerald-900);
  border-color: var(--emerald-900);
  color: #ffffff;
}

.document-body {
  padding: 28px 34px 48px;
}

.doc-section-block {
  padding-top: 34px;
  margin-top: 34px;
  border-top: 1px solid var(--border);
}

.doc-section-block:first-child {
  padding-top: 4px;
  margin-top: 0;
  border-top: none;
}

.doc-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  padding: 6px 12px;
  border-radius: 10px;
  transition: background-color 0.25s var(--ease);
  scroll-margin-top: 96px;
  position: relative;
}

.doc-line:hover {
  background: rgba(242, 248, 245, 0.7);
}

.doc-line.highlighted {
  background: var(--gold-50);
  box-shadow: inset 3.5px 0 0 var(--gold-500);
  animation: highlightPulse 1.6s var(--ease);
}

@keyframes highlightPulse {
  0% { background: var(--gold-100); }
  100% { background: var(--gold-50); }
}

.line-gutter {
  display: flex;
  align-items: flex-start;
  padding-top: 3px;
}

.line-ref-btn {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-400);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.line-ref-btn:hover {
  background: var(--gold-100);
  color: var(--gold-600);
}

.doc-line.highlighted .line-ref-btn {
  color: var(--gold-600);
  font-weight: 700;
}

.line-content {
  min-width: 0;
}

.kind-section_heading .line-content {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--emerald-950);
  padding-top: 2px;
}

.kind-section_subtitle .line-content {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gold-600);
  margin-bottom: 8px;
}

.kind-subheading .line-content {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  margin-top: 12px;
}

.kind-paragraph .line-content {
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-700);
}

.kind-bullet .line-content {
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--ink-700);
  padding-left: 18px;
  position: relative;
}

.kind-bullet .line-content::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-500);
}

.kind-callout .line-content {
  background: var(--emerald-50);
  border: 1px solid rgba(28, 68, 55, 0.14);
  border-left: 4px solid var(--emerald-700);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-900);
  white-space: pre-line;
}

.doc-table-wrap {
  margin: 12px 0 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.doc-table th,
.doc-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

.doc-table th {
  background: var(--emerald-50);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-900);
}

.doc-table tr:nth-child(even) td {
  background: #faf9f6;
}

.doc-table tr.highlighted td {
  background: var(--gold-50);
}

.doc-table .tbl-line-cell {
  width: 74px;
  white-space: nowrap;
  padding-left: 10px;
  padding-right: 4px;
}

/* ==========================================================================
   Calculators View
   ========================================================================== */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 24px;
}

.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--emerald-800);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.calc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.calc-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  line-height: 1.2;
}

.calc-header p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-500);
}

.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 8px;
}

.field-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--emerald-800);
  font-weight: 700;
}

.range-input {
  width: 100%;
  accent-color: var(--emerald-800);
  cursor: pointer;
  height: 6px;
}

.number-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.text-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--ink-900);
  background: #faf9f6;
  transition: all 0.18s var(--ease);
}

.text-input:focus {
  outline: none;
  border-color: var(--emerald-700);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 89, 72, 0.14);
}

.calc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 18px;
}

.metric-box {
  background: #faf9f6;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
}

.metric-box.accent {
  background: var(--emerald-50);
  border-color: rgba(28, 68, 55, 0.22);
}

.metric-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 5px;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
}

.metric-box.accent .metric-val {
  color: var(--emerald-900);
}

.metric-sub {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-top: 3px;
}

.match-bar {
  height: 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  display: flex;
  margin-bottom: 10px;
}

.match-bar-you {
  background: var(--emerald-900);
  transition: width 0.28s var(--ease);
}

.match-bar-company {
  background: var(--gold-500);
  transition: width 0.28s var(--ease);
}

.bar-legend {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--ink-700);
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}

/* ==========================================================================
   Common Q&As & Contacts Cards
   ========================================================================== */
.contacts-intro {
  margin-bottom: 22px;
}

.contacts-intro h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}

.contacts-intro p {
  margin: 0;
  color: var(--ink-500);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s var(--ease);
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 89, 72, 0.35);
}

.contact-card.emergency {
  border-left: 4px solid var(--crimson);
}

.contact-cat {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--emerald-700);
}

.contact-card.emergency .contact-cat {
  color: var(--crimson);
}

.contact-name {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  margin: 5px 0 3px;
}

.contact-provider {
  font-size: 12.5px;
  color: var(--ink-500);
}

.contact-phone {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--emerald-950);
  margin: 9px 0 4px;
}

.contact-note {
  font-size: 13.5px;
  color: var(--ink-700);
  margin: 0;
}

.contact-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Modal, Footer & Toast
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(13, 33, 27, 0.56);
  backdrop-filter: blur(6px);
  display: none;
  place-items: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: grid;
}

.modal-card {
  width: 100%;
  max-width: 580px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--emerald-800);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 30px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.textarea-input {
  width: 100%;
  min-height: 94px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-900);
  background: #faf9f6;
  resize: vertical;
}

.textarea-input:focus {
  outline: none;
  border-color: var(--emerald-700);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 89, 72, 0.14);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #ffffff;
  padding: 26px 28px;
  color: var(--ink-500);
  font-size: 12.5px;
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  background: var(--emerald-950);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(209, 171, 103, 0.45);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.faq-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: 16px;
}

.phone-dial-link {
  color: inherit;
  text-decoration: none;
}

.phone-dial-link:hover {
  color: var(--emerald-700);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive (Tablet & Phone Ready)
   ========================================================================== */
@media (max-width: 1024px) {
  .highlights-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .engine-badge {
    display: none;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    height: auto;
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .brand-properties {
    font-size: 9.5px;
    letter-spacing: 0.1em;
  }
  .brand-title {
    font-size: 15.5px;
  }
  .nav-tabs {
    justify-content: space-between;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .nav-tab {
    flex: 1 0 auto;
    font-size: 12px;
    padding: 7px 11px;
    text-align: center;
  }
  .hero {
    padding: 36px 16px 68px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero-subtitle {
    font-size: 14px;
  }
  .search-dock {
    margin-top: -38px;
    padding: 0 14px;
  }
  .search-box {
    padding: 6px 8px 6px 14px;
    border-radius: 14px;
  }
  /* 16px prevents iOS Safari auto-zoom on focus */
  .search-input,
  .text-input,
  .textarea-input {
    font-size: 16px;
  }
  .suggest-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .quick-prompts {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .quick-prompts::-webkit-scrollbar {
    display: none;
  }
  .prompt-chip {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 6px 12px;
  }
  .main-container {
    padding: 10px 14px 56px;
  }
  .highlights-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }
  .highlight-tile {
    padding: 14px;
    gap: 4px;
  }
  .highlight-stat {
    font-size: 20px;
  }
  .highlight-desc {
    font-size: 11.5px;
    line-height: 1.4;
  }
  .best-answer-card {
    padding: 18px 16px;
  }
  .toc-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .toc-btn {
    padding: 8px;
    font-size: 12.5px;
  }
  .toc-page {
    display: none;
  }
  .reader-toolbar {
    padding: 14px 16px;
  }
  .doc-line {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 4px;
  }
  .line-ref-btn {
    font-size: 10px;
    padding: 2px 4px;
  }
  .document-body {
    padding: 14px 12px 28px;
  }
  .doc-table-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .calc-card {
    padding: 20px 16px;
  }
  .calc-metrics,
  .number-row {
    grid-template-columns: 1fr;
  }
  .results-grid,
  .faq-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }
  .modal-card {
    padding: 20px 18px;
  }
  .search-kbd {
    display: none;
  }
}
