/* ncept.css — NCEPT Guide page (/ncept). Relocated from the page's inline <style>. */

/* ── NCEPT Guide Page Styles ── */
.ncept-page {
  --ncept-accent: #2cb3cc;
  --ncept-accent-bg: rgba(44, 179, 204, 0.08);
  --ncept-primary-color: #0d6efd;
  --ncept-secondary-color: #198754;
  --ncept-mutual-color: #fd7e14;
  --ncept-section-border: rgba(44, 179, 204, 0.25);
  --ncept-card-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
[data-bs-theme="dark"] .ncept-page {
  --ncept-card-shadow: 0 4px 12px rgba(0,0,0,0.3);
}



/* Section headings */
.ncept-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ncept-section-border);
  scroll-margin-top: 5.5rem;
}
.ncept-section-title .section-icon {
  margin-right: 0.5rem;
}
.ncept-section {
  margin-bottom: 3.5rem;
}

/* Accordion overrides */
.ncept-accordion .accordion-header {
  margin: 0;
}
.ncept-accordion .accordion-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.ncept-accordion .accordion-button {
  background: var(--card-bg);
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  border: none;
  box-shadow: none !important;
}
.ncept-accordion .accordion-button:not(.collapsed) {
  background: var(--ncept-accent-bg);
  color: var(--text-color);
}
.ncept-accordion .accordion-button::after {
  filter: var(--bs-accordion-btn-icon-filter, none);
}
[data-bs-theme="dark"] .ncept-accordion .accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}
.ncept-accordion .accordion-body {
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 1rem 1.25rem 1.25rem;
}
.ncept-accordion .accordion-body .criteria-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.ncept-accordion .criteria-table th {
  background: rgba(44,179,204,0.1);
  color: var(--text-color);
  font-weight: 600;
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.82rem;
}
[data-bs-theme="dark"] .ncept-accordion .criteria-table th {
  background: rgba(26,123,142,0.15);
}
.ncept-accordion .criteria-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.82rem;
  vertical-align: middle;
}
.ncept-accordion .criteria-table tr:last-child td {
  border-bottom: none;
}

/* Tier cards (compact) */
.ncept-tier-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}
@media (max-width: 575.98px) {
  .ncept-tier-row { grid-template-columns: 1fr; }
}
.ncept-tier-card {
  border-radius: 0.6rem;
  padding: 1rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  text-align: center;
}
.ncept-tier-card .tier-amount {
  font-size: 1.5rem;
  font-weight: 800;
}
.ncept-tier-card .tier-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}
.ncept-tier-card .tier-range {
  font-size: 0.78rem;
  color: var(--secondary);
}
.tier-3-accent .tier-label, .tier-3-accent .tier-amount { color: #6f42c1; }
.tier-2-accent .tier-label, .tier-2-accent .tier-amount { color: #b45309; }
.tier-1-accent .tier-label, .tier-1-accent .tier-amount { color: #146c43; }
[data-bs-theme="dark"] .tier-3-accent .tier-label, [data-bs-theme="dark"] .tier-3-accent .tier-amount { color: #a78bfa; }
[data-bs-theme="dark"] .tier-2-accent .tier-label, [data-bs-theme="dark"] .tier-2-accent .tier-amount { color: #ffa04d; }
[data-bs-theme="dark"] .tier-1-accent .tier-label, [data-bs-theme="dark"] .tier-1-accent .tier-amount { color: #75b798; }

/* ── Panel Timeline ── */
.timeline-container {
  position: relative;
  padding-left: 2.5rem;
}
.timeline-container::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--card-border);
}
.timeline-year {
  position: relative;
  margin-bottom: 1.75rem;
}
.timeline-year-label {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  position: relative;
}
.timeline-year-label::before {
  content: "";
  position: absolute;
  left: -1.65rem;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ncept-accent);
  border: 2px solid var(--bg-color);
  box-shadow: 0 0 0 2px var(--ncept-accent);
}
.timeline-events {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.timeline-event {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  font-size: 0.85rem;
  position: relative;
  box-shadow: var(--ncept-card-shadow);
}
@media (max-width: 575.98px) {
  .timeline-event { flex-direction: column; gap: 0.25rem; }
}
.timeline-event::before {
  content: "";
  position: absolute;
  left: -1.65rem;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.timeline-event.te-primary::before { background: var(--ncept-primary-color); }
.timeline-event.te-secondary::before { background: var(--ncept-secondary-color); }
.timeline-event.te-mutual::before { background: var(--ncept-mutual-color); }
.timeline-event.te-confirmed {
  border-left: 3px solid var(--ncept-accent);
}
.timeline-event.te-confirmed::before {
  left: calc(-1.65rem - 2px);
}
.te-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2em 0.5em;
  border-radius: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.te-badge-primary { background: rgba(13,110,253,0.12); color: #0a58ca; }
.te-badge-secondary { background: rgba(25,135,84,0.12); color: #146c43; }
.te-badge-mutual { background: rgba(253,126,20,0.12); color: #b45309; }
[data-bs-theme="dark"] .te-badge-primary { background: rgba(13,110,253,0.2); color: #6ea8fe; }
[data-bs-theme="dark"] .te-badge-secondary { background: rgba(25,135,84,0.2); color: #5ec99e; }
[data-bs-theme="dark"] .te-badge-mutual { background: rgba(253,126,20,0.2); color: #ffa04d; }
.te-badge-zero { background: rgba(220,53,69,0.12); color: #b02a37; }
[data-bs-theme="dark"] .te-badge-zero { background: rgba(220,53,69,0.15); color: #f07078; }
.te-badge-incentives { background: rgba(111,66,193,0.12); color: #6f42c1; }
[data-bs-theme="dark"] .te-badge-incentives { background: rgba(111,66,193,0.2); color: #b197fc; }
.te-badge-submissions { background: rgba(255,193,7,0.15); color: #7a6518; }
[data-bs-theme="dark"] .te-badge-submissions { background: rgba(255,193,7,0.15); color: #e8c96a; }
.te-badge-tsl { background: rgba(13,110,253,0.15); color: #0a58ca; }
[data-bs-theme="dark"] .te-badge-tsl { background: rgba(13,110,253,0.2); color: #6ea8fe; }
.te-date {
  font-weight: 600;
  white-space: nowrap;
  min-width: 75px;
}
.te-note {
  color: var(--secondary);
  font-size: 0.82rem;
}
.confirmed-icon {
  color: var(--ncept-accent);
  font-size: 0.75rem;
}

/* Completed panel state (green) + results link + collapsible deadline details */
.timeline-event.te-completed {
  border-left: 3px solid var(--ncept-secondary-color);
}
.timeline-event.te-completed::before {
  left: calc(-1.65rem - 2px);
  background: var(--ncept-secondary-color);
}
.completed-icon {
  color: var(--ncept-secondary-color);
  font-size: 0.75rem;
  font-weight: 600;
}
.te-results-link {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}
.te-completed-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.te-completed-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

/* ── TSL Section ── */
.tsl-current-card {
  border-radius: 0.75rem;
  padding: 1.5rem;
  color: var(--body-color);
  text-align: center;
  margin-bottom: 0;
}
.tsl-current-card .tsl-value {
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  margin: 0.5rem 0;
}
.tsl-current-card .tsl-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
}
.tsl-current-card .tsl-date {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-top: 0.25rem;
}
.tsl-chart-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: var(--ncept-card-shadow);
  position: relative;
}
.tsl-chart-container canvas {
  max-height: 350px;
}
.tsl-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (max-width: 575.98px) {
  .tsl-info-grid { grid-template-columns: 1fr; }
}
.tsl-info-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--ncept-accent);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.tsl-info-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
}

/* ── Decision Tree ── */
.dt-step { display: none; }
.dt-step.dt-active { display: block; }
.dt-question {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.dt-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 600px;
}
@media (max-width: 575.98px) {
  .dt-options { grid-template-columns: 1fr; }
}
.dt-option {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
}
.dt-option:hover {
  border-color: var(--ncept-accent);
  box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
}
.dt-option-title {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}
.dt-option-desc {
  font-size: 0.78rem;
  color: var(--secondary);
  line-height: 1.45;
  margin: 0;
}
.dt-result {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  max-width: 600px;
  box-shadow: var(--ncept-card-shadow);
}
.dt-result.dt-success { border-left: 4px solid var(--ncept-secondary-color); background: rgba(25,135,84,0.04); }
.dt-result.dt-blocked { border-left: 4px solid var(--danger); background: rgba(220,53,69,0.04); }
.dt-result.dt-info { border-left: 4px solid var(--ncept-accent); }
[data-bs-theme="dark"] .dt-result.dt-success { background: rgba(25,135,84,0.08); }
[data-bs-theme="dark"] .dt-result.dt-blocked { background: rgba(220,53,69,0.08); }
.dt-result h4 { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.5rem 0; }
.dt-result p { font-size: 0.85rem; line-height: 1.6; margin: 0; }
.dt-breadcrumb {
  font-size: 0.75rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}
.dt-breadcrumb span { cursor: pointer; text-decoration: underline; }
.dt-restart {
  font-size: 0.8rem;
  margin-top: 1rem;
  cursor: pointer;
  color: var(--ncept-accent);
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
}


/* ════════════ NCEPT Selections page (/ncept/selections) ════════════ */

/* Overview stat cards */
.ncept-selections-page .sel-stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
}
.ncept-selections-page .sel-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--secondary);
  margin-top: 0.15rem;
}

/* Facility reference (code + name), used in bars and tables */
.sel-fac {
  text-decoration: none;
  color: inherit;
}
.sel-fac-code {
  font-weight: 700;
  color: var(--bs-body-color);
}
.sel-fac:hover .sel-fac-code { color: var(--ncept-accent); text-decoration: underline; }
.sel-fac-name {
  color: var(--secondary);
  font-size: 0.82rem;
  margin-left: 0.4rem;
}

/* Horizontal bar lists (top gaining / releasing) */
.sel-bars { display: flex; flex-direction: column; gap: 0.4rem; }
.sel-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) 1fr 1.6rem;
  align-items: center;
  gap: 0.6rem;
}
.sel-bar-label { min-width: 0; }
.sel-bar-label .sel-fac {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.84rem;
}
.sel-bar-track {
  background: var(--card-border);
  border-radius: 50rem;
  height: 0.55rem;
  overflow: hidden;
}
.sel-bar-fill { height: 100%; border-radius: 50rem; }
.sel-bar-gain { background: var(--ncept-secondary-color); }
.sel-bar-loss { background: var(--danger); }
.sel-bar-count {
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}
.sel-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.15rem;
  vertical-align: middle;
}
.sel-dot-gain { background: var(--ncept-secondary-color); }
.sel-dot-loss { background: var(--danger); }

/* Tables */
.sel-table { font-size: 0.88rem; }
.sel-table thead th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--secondary);
  white-space: nowrap;
}
.sel-table .sel-arrow-col {
  width: 1.5rem;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

/* Per-panel card */
.sel-panel-card {
  margin-bottom: 1.5rem;
}
.sel-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.sel-panel-date { font-weight: 700; font-size: 0.95rem; margin: 0 0.5rem; }
.sel-panel-count { color: var(--secondary); font-size: 0.82rem; }
.sel-panel-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sel-panel-tools .sel-filter { max-width: 12rem; }
.sel-panel-switcher .form-select { max-width: 24rem; }

/* Truncated long tables: show the first 20 rows; toggle button reveals the rest.
   CSS-driven so client-side sorting re-shows the top 20 of the active sort order. */
.sel-trunc tbody tr:nth-child(n+21) { display: none; }
.sel-panel-inc { color: var(--secondary); font-size: 0.82rem; }
.sel-panel-inc strong { color: var(--ncept-secondary-color); font-weight: 700; }

/* Incentive awards */
.sel-incentive-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  background: var(--ncept-accent-bg);
}
.sel-incentive-total {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--ncept-secondary-color);
}
.sel-incentive-sub {
  font-size: 0.82rem;
  color: var(--secondary);
  margin-top: 0.4rem;
}
.sel-incentive-total-row td { border-top: 2px solid var(--card-border); }
.sel-tier-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15em 0.5em;
  border-radius: 0.25rem;
}
.sel-tier-3 { background: rgba(111,66,193,0.12); color: #6f42c1; }
.sel-tier-2 { background: rgba(180,83,9,0.12); color: #b45309; }
.sel-tier-1 { background: rgba(20,108,67,0.12); color: #146c43; }
.sel-tier-geo { background: var(--ncept-accent-bg); color: var(--ncept-accent); }
[data-bs-theme="dark"] .sel-tier-3 { background: rgba(111,66,193,0.22); color: #b197fc; }
[data-bs-theme="dark"] .sel-tier-2 { background: rgba(180,83,9,0.22); color: #ffa04d; }
[data-bs-theme="dark"] .sel-tier-1 { background: rgba(20,108,67,0.22); color: #75b798; }
/* On phones, stack the "$X each" amount under the tier chip so the incentive
   table's first column stays narrow enough to avoid horizontal scrolling. */
@media (max-width: 575.98px) {
  .sel-incentive-table .sel-tier-amt { display: block; }
}

