/* ============================================================
   Queue Reality Check — scoped styles
   Does NOT override any existing classes in style.css
   ============================================================ */

/* ── Tool header block ─────────────────────────────────────── */
.qrc-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
}
.qrc-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}
.qrc-hero .qrc-subhead {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 640px;
}

/* ── Inputs card ───────────────────────────────────────────── */
.qrc-inputs-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
}
.qrc-inputs-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}
.qrc-inputs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: start;
}
.qrc-field-poi {
  grid-column: 1 / -1;
}
@media (max-width: 900px) {
  .qrc-inputs-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 500px) {
  .qrc-inputs-grid {
    grid-template-columns: 1fr;
  }
}
.qrc-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.qrc-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}
.qrc-field .qrc-poi-wrap {
  position: relative;
}
.qrc-poi-search {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: #111111;
  border: 1px solid #333333;
  border-radius: var(--radius);
  padding: 0.625rem 2.5rem 0.625rem 1rem;
  width: 100%;
  min-height: 42px;
  transition: border-color 0.1s ease, outline 0.1s ease;
  appearance: none;
}
.qrc-poi-clear {
  position: absolute;
  top: 50%;
  right: 0.625rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #555555;
  font-size: 0.875rem;
  line-height: 1;
  border-radius: 2px;
  transition: color 0.1s ease;
}
.qrc-poi-clear:hover {
  color: var(--color-text);
}
.qrc-poi-search::placeholder {
  color: #555555;
}
.qrc-poi-search:focus {
  outline: 2px solid rgba(245, 245, 245, 0.4);
  outline-offset: 2px;
  border-color: #555555;
}
.qrc-poi-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: var(--radius);
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.qrc-poi-dropdown.open {
  display: block;
}
.qrc-poi-option {
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  color: var(--color-text);
  cursor: pointer;
  border-bottom: 1px solid #252525;
}
.qrc-poi-option:last-child {
  border-bottom: none;
}
.qrc-poi-option:hover,
.qrc-poi-option.highlighted {
  background: var(--color-surface-hover);
}
.qrc-poi-option.no-results {
  color: var(--color-text-muted);
  cursor: default;
  font-style: italic;
}
.qrc-poi-option.no-results:hover {
  background: transparent;
}
.qrc-field select {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: #111111;
  border: 1px solid #333333;
  border-radius: var(--radius);
  padding: 0.625rem 2.25rem 0.625rem 1rem;
  width: 100%;
  min-height: 42px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.1s ease;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}
.qrc-field select:focus {
  outline: 2px solid rgba(245, 245, 245, 0.4);
  outline-offset: 2px;
  border-color: #555555;
}
.qrc-field select option {
  background: #1a1a1a;
  color: var(--color-text);
}
.qrc-field input[type="number"] {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: #111111;
  border: 1px solid #333333;
  border-radius: var(--radius);
  padding: 0.625rem 1rem;
  width: 100%;
  min-height: 42px;
  appearance: none;
  -moz-appearance: textfield;
  transition: border-color 0.1s ease;
}
.qrc-field input[type="number"]:focus {
  outline: 2px solid rgba(245, 245, 245, 0.4);
  outline-offset: 2px;
  border-color: #555555;
}
.qrc-field input[type="number"]::placeholder {
  color: #555555;
}
.qrc-field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}
.qrc-field-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}
.qrc-service-radios {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 0.5rem 0;
}
.qrc-radio-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}
.qrc-radio-label input[type="radio"] {
  accent-color: var(--color-accent);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* ── Summary cards row ─────────────────────────────────────── */
.qrc-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 700px) {
  .qrc-summary-row {
    grid-template-columns: 1fr;
  }
}
.qrc-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
}
.qrc-stat-card.qrc-stat-accent {
  border-color: #4a8f6f;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(74,143,111,0.3);
}
.qrc-stat-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.625rem;
}
.qrc-stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 0.375rem;
}
.qrc-stat-unit {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.qrc-stat-sub {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* ── Projects table section ────────────────────────────────── */
.qrc-table-section {
  padding: 2rem 0 1rem;
}
.qrc-table-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.qrc-table-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.qrc-table-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}
.qrc-table-poi-context {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-family: var(--font-sans, sans-serif);
}
.qrc-table-poi-context:empty {
  display: none;
}
.qrc-table-count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.qrc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.qrc-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: 0.9375rem;
  min-width: 780px;
}
.qrc-table thead tr {
  border-bottom: 1px solid var(--color-border);
}
.qrc-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.qrc-table th.right,
.qrc-table td.right {
  text-align: right;
}
.qrc-table th.center,
.qrc-table td.center {
  text-align: center;
}
.qrc-table tbody tr {
  border-bottom: 1px solid #222222;
  transition: background 0.1s ease;
}
.qrc-table tbody tr:last-child {
  border-bottom: none;
}
.qrc-table tbody tr:hover {
  background: var(--color-surface-hover);
}
.qrc-table td {
  padding: 0.875rem 1rem;
  color: var(--color-text);
  vertical-align: middle;
}
.qrc-table td.muted {
  color: var(--color-text-muted);
}
.qrc-proj-id {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.qrc-tech-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  border: 1px solid;
}
.qrc-tech-solar        { color: #d4a84b; border-color: rgba(212,168,75,0.4);  background: rgba(212,168,75,0.08); }
.qrc-tech-wind         { color: #5da8d4; border-color: rgba(93,168,212,0.4);  background: rgba(93,168,212,0.08); }
.qrc-tech-storage      { color: #7b8cde; border-color: rgba(123,140,222,0.4); background: rgba(123,140,222,0.08); }
.qrc-tech-solar-storage{ color: #a07bd4; border-color: rgba(160,123,212,0.4); background: rgba(160,123,212,0.08); }
.qrc-tech-other        { color: #888888; border-color: rgba(136,136,136,0.4); background: rgba(136,136,136,0.08); }

.qrc-prob-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.qrc-prob-bar-bg {
  flex: 1;
  height: 4px;
  background: #2a2a2a;
  border-radius: 2px;
  min-width: 48px;
}
.qrc-prob-bar-fill {
  height: 4px;
  border-radius: 2px;
  background: #4a8f6f;
  transition: width 0.3s ease;
}
.qrc-prob-pct {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  min-width: 2.5rem;
  text-align: right;
}

/* ── 3-state segmented toggle ──────────────────────────────── */
.qrc-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.75rem;
}
.qrc-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.qrc-toggle label {
  padding: 0.3125rem 0.625rem;
  cursor: pointer;
  color: var(--color-text-muted);
  background: transparent;
  border-right: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
  line-height: 1.4;
  user-select: none;
}
.qrc-toggle label:last-of-type {
  border-right: none;
}
.qrc-toggle label:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}
.qrc-toggle input[type="radio"]:checked + label {
  background: #2e2e2e;
  color: var(--color-text);
}
.qrc-toggle input[type="radio"].qrc-will-build:checked + label {
  background: rgba(74,143,111,0.2);
  color: #6abf96;
  border-color: rgba(74,143,111,0.3);
}
.qrc-toggle input[type="radio"].qrc-will-withdraw:checked + label {
  background: rgba(248,113,113,0.15);
  color: #f87171;
  border-color: rgba(248,113,113,0.3);
}

/* ── Empty state ───────────────────────────────────────────── */
.qrc-empty {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-surface);
}
.qrc-empty-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.qrc-empty-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}
.qrc-empty-msg {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* ── Insights panel ────────────────────────────────────────── */
.qrc-insights {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
}
.qrc-insights-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.qrc-insights-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.qrc-insight-item {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  padding-left: 1rem;
  border-left: 2px solid var(--color-border);
  line-height: 1.5;
}

/* ── Section spacing ───────────────────────────────────────── */
.qrc-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.qrc-section + .qrc-section {
  padding-top: 0;
}

/* ── SEO footer links ──────────────────────────────────────── */
.qrc-footer-links {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
}
.qrc-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.qrc-footer-heading {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.qrc-footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.qrc-footer-link {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.qrc-footer-link:hover {
  color: var(--color-text);
  text-decoration: none;
}
.qrc-footer-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.qrc-footer-fineprint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.6;
  line-height: 1.5;
  border-top: 1px solid var(--color-border);
  padding-top: 1.25rem;
}
@media (max-width: 640px) {
  .qrc-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ── Data source / provenance note ─────────────────────────── */
.qrc-data-source {
  margin-top: 0.875rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.qrc-data-source a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.qrc-data-source a:hover {
  color: var(--color-accent, #6abf96);
}

/* ── Scope disclosure note ──────────────────────────────────── */
.qrc-scope-note {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.5;
}
.qrc-scope-note strong {
  font-style: normal;
  font-weight: 600;
  color: var(--color-text);
}

/* ── Column header info tooltip ─────────────────────────────── */
.qrc-th-info {
  display: inline-block;
  position: relative;
  margin-left: 0.3em;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  cursor: default;
  vertical-align: middle;
  line-height: 1;
}
.qrc-th-info:hover,
.qrc-th-info:focus {
  color: var(--color-text);
  outline: none;
}
/* Source content hidden in DOM — JS reads it and shows #qrc-body-tooltip */
.qrc-th-tooltip {
  display: none;
}
/* Body-level tooltip that escapes overflow-clipping scroll containers */
#qrc-body-tooltip {
  position: fixed;
  background: #1e2330;
  color: #c8cdd8;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  width: 280px;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.15s ease;
  text-transform: none;
  letter-spacing: 0;
}
#qrc-body-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
}
#qrc-body-tooltip a {
  color: var(--color-accent, #6abf96);
  text-decoration: underline;
  text-underline-offset: 2px;
}
