/* ConsultiQ AlburyCity community review — shared navigation (v1)
 * Self-contained: works on every public page without style.css.
 * Offsets below the v2 development banner and keeps anchor scrolling clear of it.
 */

:root {
  --cq-banner-h: 0px;
  --cq-header-h: 74px;
  --cq-navy: #0d2a3a;
  --cq-navy-soft: #164962;
  --cq-teal: #11adc4;
}

/* The banner is sticky at top:0 (v2-banner.css); everything else stacks below it. */
html:has(.v2-banner) { --cq-banner-h: 42px; }
html { scroll-padding-top: calc(var(--cq-banner-h) + var(--cq-header-h) + 16px); }

@media (max-width: 880px) { :root { --cq-header-h: 64px; } }

.cq-sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- shared header ---------- */

.cq-header {
  position: sticky; top: var(--cq-banner-h); z-index: 75;
  display: flex; align-items: center; gap: 18px;
  height: var(--cq-header-h);
  padding: 0 max(20px, calc((100vw - 1240px) / 2));
  background: var(--cq-navy); color: #fff;
  box-shadow: 0 3px 18px rgba(5, 24, 36, 0.15);
}

.cq-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; white-space: nowrap; }
.cq-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: #117a98; font-size: 22px; font-weight: 900; color: #fff; flex: none;
}
.cq-wordmark { font-size: 16.5px; font-weight: 850; letter-spacing: -0.4px; line-height: 1.05; }
.cq-wordmark > span { color: #5ee0dd; }
.cq-wordmark small { display: block; margin-top: 3px; font-size: 7px; font-weight: 650; letter-spacing: 1.4px; color: #abc0ca; }

.cq-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.cq-group { position: relative; }
.cq-group-btn {
  min-height: 44px; padding: 8px 13px; background: none; border: 0; border-radius: 6px;
  color: #fff; font-size: 13.5px; font-weight: 750; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.cq-group-btn:hover, .cq-group-btn[aria-expanded="true"] { background: var(--cq-navy-soft); color: #fff; }
.cq-caret { font-size: 10px; opacity: 0.85; transition: transform 0.15s ease; }
.cq-group-btn[aria-expanded="true"] .cq-caret { transform: rotate(180deg); }

.cq-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 302px;
  background: #0f3145; border: 1px solid #2a5468; border-radius: 10px; padding: 8px;
  box-shadow: 0 18px 30px rgba(4, 20, 30, 0.45);
  display: flex; flex-direction: column; gap: 2px; z-index: 90;
}
.cq-menu[hidden] { display: none; }

.cq-link {
  display: block; min-height: 44px; padding: 8px 12px; border-radius: 7px;
  text-decoration: none; color: #fff; font-size: 14px; font-weight: 700; line-height: 1.3;
}
.cq-link:hover, .cq-link:focus-visible { background: var(--cq-navy-soft); outline: 2px solid #5ee0dd; outline-offset: -2px; }
.cq-benefit { display: block; font-size: 11.5px; font-weight: 500; color: #b9d2dd; margin-top: 2px; line-height: 1.35; }
.cq-link[aria-current="page"] { background: #143c52; box-shadow: inset 3px 0 0 var(--cq-teal); }

/* Prominent action inside the Tools menu (community calculator). */
.cq-prominent { background: #0e8ba3; font-weight: 850; }
.cq-prominent .cq-benefit { color: #d7f2f7; }
.cq-prominent:hover, .cq-prominent:focus-visible { background: #12a0bd; }

/* ---------- header search (desktop) ---------- */

.cq-search { position: relative; margin-left: 8px; }
.cq-search input[type="search"] {
  width: 196px; min-height: 44px; border-radius: 8px; border: 1px solid #35617a;
  background: #123c52; color: #fff; padding: 8px 12px; font-size: 13.5px;
}
.cq-search input[type="search"]::placeholder { color: #9fc0cf; }
.cq-search input[type="search"]:focus-visible { outline: 2px solid #5ee0dd; border-color: #5ee0dd; }

.cq-results {
  position: absolute; top: calc(100% + 8px); right: 0; width: 348px; max-width: 76vw;
  max-height: min(62vh, 430px); overflow-y: auto; list-style: none; margin: 0; padding: 8px;
  background: #0f3145; border: 1px solid #2a5468; border-radius: 10px;
  box-shadow: 0 18px 30px rgba(4, 20, 30, 0.45); z-index: 95;
}
.cq-results[hidden] { display: none; }
.cq-hit { display: block; padding: 9px 12px; border-radius: 7px; text-decoration: none; color: #fff; min-height: 44px; }
.cq-hit:hover, .cq-hit:focus-visible { background: var(--cq-navy-soft); outline: 2px solid #5ee0dd; outline-offset: -2px; }
.cq-kind {
  display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; margin-right: 7px; background: #1d4a63; color: #8fe8f2; vertical-align: 1px;
}
.cq-hit-label { font-size: 13.5px; font-weight: 750; }
.cq-hit-benefit { display: block; font-size: 11.5px; color: #b9d2dd; margin-top: 2px; line-height: 1.35; }
.cq-noresult { padding: 10px 12px; font-size: 12.5px; color: #9fc0cf; list-style: none; }

/* ---------- mobile menu toggle + panel ---------- */

.cq-menu-toggle { display: none; }

@media (max-width: 880px) {
  .cq-nav, .cq-search { display: none; }
  .cq-brand small { display: none; }
  .cq-wordmark { font-size: 15.5px; }
  .cq-mark { width: 34px; height: 34px; font-size: 20px; }

  .cq-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin-left: auto; flex: none;
    background: var(--cq-navy-soft); border: 0; border-radius: 8px; cursor: pointer; padding: 12px;
  }
  .cq-menu-toggle:hover { background: #1d5a7c; }
  .cq-burger { position: relative; display: block; width: 24px; height: 16px; }
  .cq-burger i { position: absolute; left: 0; right: 0; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.18s ease, opacity 0.18s ease, top 0.18s ease; }
  .cq-burger i:nth-child(1) { top: 0; }
  .cq-burger i:nth-child(2) { top: 7px; }
  .cq-burger i:nth-child(3) { top: 14px; }
  .cq-menu-toggle[aria-expanded="true"] .cq-burger i:nth-child(1) { top: 7px; transform: rotate(45deg); }
  .cq-menu-toggle[aria-expanded="true"] .cq-burger i:nth-child(2) { opacity: 0; }
  .cq-menu-toggle[aria-expanded="true"] .cq-burger i:nth-child(3) { top: 7px; transform: rotate(-45deg); }

  /* One expandable menu with a visible close control. */
  .cq-mobile-panel {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 96;
    background: #0f3145; border-top: 1px solid #2a5468;
    padding: 14px max(20px, calc((100vw - 1240px) / 2)) 28px;
    max-height: calc(100vh - var(--cq-banner-h) - var(--cq-header-h)); overflow-y: auto;
    box-shadow: 0 24px 30px rgba(4, 20, 30, 0.5);
  }
  .cq-mobile-panel[hidden] { display: none; }
  .cq-mobile-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
  .cq-mobile-head strong { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: #abc0ca; }
  .cq-close {
    min-height: 44px; padding: 9px 18px; background: var(--cq-navy-soft); color: #fff;
    border: 0; border-radius: 8px; font-weight: 750; font-size: 13.5px; cursor: pointer;
  }
  .cq-close:hover { background: #1d5a7c; }

  .cq-msearch input[type="search"] { width: 100%; min-height: 46px; margin-bottom: 12px; border-radius: 8px; border: 1px solid #35617a; background: #123c52; color: #fff; padding: 9px 12px; font-size: 14.5px; }
  .cq-msearch input[type="search"]::placeholder { color: #9fc0cf; }
  .cq-msearch .cq-results { position: static; width: auto; max-width: none; max-height: none; overflow: visible; border-color: #2a5468; margin-bottom: 12px; }

  .cq-mgroup { margin-top: 10px; }
  .cq-mgroup h3 { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: #7fa5b8; margin: 6px 4px 6px; }
}

/* ---------- on-page contents list (long pages) ---------- */

.cq-toc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px max(20px, calc((100vw - 1240px) / 2));
  background: #eef5f7; border-bottom: 1px solid #d3e2e6; font-size: 12.5px;
}
.cq-toc-label { font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #5b7683; font-size: 10.5px; margin-right: 4px; }
.cq-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 13px; border-radius: 999px;
  background: #fff; border: 1px solid #c9dbe0; color: #17506b; text-decoration: none; font-weight: 700; line-height: 1.2;
}
.cq-chip:hover { border-color: var(--cq-teal); color: #0b6f86; }
.cq-chip[aria-current="true"] { background: var(--cq-navy); border-color: var(--cq-navy); color: #fff; }

/* ---------- homepage directory cards + question panel ---------- */

.explore-directory { padding-top: 54px; padding-bottom: 8px; }
.cq-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 22px; }
.cq-card {
  display: flex; flex-direction: column; gap: 7px; padding: 18px 19px;
  background: #fff; border: 1px solid #d5e3e7; border-radius: 12px; text-decoration: none; color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cq-card:hover { border-color: var(--cq-teal); transform: translateY(-2px); }
.cq-card-title { font-size: 16.5px; font-weight: 800; letter-spacing: -0.2px; color: #103b50; }
.cq-card-benefit { font-size: 13px; line-height: 1.45; color: #4c6774; }
.cq-card-go { margin-top: auto; padding-top: 8px; font-size: 12.5px; font-weight: 800; color: #0b6f86; }

.cq-questions-wrap { padding-bottom: 30px; }
.cq-questions { background: var(--cq-navy); border-radius: 14px; padding: 24px 26px 26px; color: #fff; }
.cq-questions h2 { font-size: clamp(20px, 3vw, 25px); letter-spacing: -0.3px; margin: 0 0 4px; }
.cq-questions > p { margin: 0 0 16px; font-size: 13.5px; color: #b9d2dd; }
.cq-q-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.cq-q-link {
  min-height: 44px; display: inline-flex; align-items: center; padding: 9px 17px; border-radius: 999px;
  background: var(--cq-navy-soft); color: #fff; text-decoration: none; font-weight: 700; font-size: 13.5px;
  border: 1px solid #2f5b73; line-height: 1.3;
}
.cq-q-link:hover, .cq-q-link:focus-visible { background: #1d5a7c; outline: 2px solid #5ee0dd; outline-offset: -2px; }

/* ---------- light "explore further" cross-links (index sections) ---------- */

.explore-further { margin-top: 26px; padding-top: 14px; border-top: 1px dashed #b9cdd4; font-size: 13.5px; color: #40606f; }
.explore-further a { color: #0b6f86; font-weight: 750; text-decoration: none; }
.explore-further a:hover { text-decoration: underline; }
.section-ink .explore-further { border-top-color: #3d5a68; color: #b9cdd4; }
.section-ink .explore-further a { color: #7fe0e8; }

/* ---------- calculator step links + result summary toggle ---------- */

.calc-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 14px; background: #fff; border: 1px solid #dfe8e9; border-radius: 12px; }
.calc-step {
  min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 15px; border-radius: 999px;
  text-decoration: none; font-size: 13px; font-weight: 750; color: #17506b; background: #eef5f7; border: 1px solid #d3e2e6; line-height: 1.2;
}
.calc-step:hover { border-color: var(--cq-teal); }
.calc-step[aria-current="true"] { background: var(--cq-navy); color: #fff; border-color: var(--cq-navy); }
.calc-step .n { font-size: 10.5px; font-weight: 850; opacity: 0.72; }

/* Keep the sticky result panel clear of banner + header (overrides calculator.css top). */
.results-sticky { top: calc(var(--cq-banner-h) + var(--cq-header-h) + 18px); }

.result-toggle { display: none; width: 100%; min-height: 44px; margin-top: 12px; padding: 9px 14px; border-radius: 8px; border: 1px solid #35617a; background: var(--cq-navy-soft); color: #e2f1f4; font-weight: 750; font-size: 13.5px; cursor: pointer; }
.result-toggle:hover { background: #1d5a7c; }

@media (max-width: 650px) {
  .result-toggle { display: block; }
  /* Phone: the compact summary stays, the full breakdown collapses behind the toggle. */
  .results-sticky.collapsed .separation, .results-sticky.collapsed .sharing { display: none; }
  .results-sticky.collapsed .result-panel { border-radius: var(--radius); }
}
