/* ==========================================================================
   MEPCO Bill Portal - Clean, Understated Utility Stylesheet
   ========================================================================== */

:root {
  --canvas: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f9fafb;
  --emerald-deep: #14532d;
  --emerald: #15803d;
  --emerald-hover: #166534;
  --emerald-tint: #f0fdf4;
  --ink: #111827;
  --ink-body: #374151;
  --ink-muted: #6b7280;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #92400e;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 20px 50px rgba(0, 0, 0, 0.2);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.03125rem;
  line-height: 1.7;
  color: var(--ink-body);
  background-color: var(--canvas);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.015em;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--emerald);
  text-decoration: underline;
  text-decoration-color: rgba(21, 128, 61, 0.35);
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  background: #f3f4f6;
  color: var(--ink);
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.65rem 1.1rem;
  background: var(--ink);
  color: #ffffff;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Clean Flat Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
}

.header-accent-bar {
  height: 3px;
  background: var(--emerald);
}

.header-inner {
  max-width: 1180px;
  margin-inline: auto;
  padding: 0 1.25rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-lockup:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--emerald);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.main-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-body);
  text-decoration: none;
  position: relative;
}

.nav-menu a:hover {
  background-color: #f3f4f6;
  color: var(--ink);
  text-decoration: none;
}

.nav-menu a[aria-current="page"] {
  color: var(--emerald-deep);
}

.nav-menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 4px;
  height: 2px;
  background-color: var(--emerald);
}

.nav-search-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0 0.85rem;
  margin-inline-start: 0.35rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-body);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-search-pill:hover {
  border-color: #9ca3af;
  background: #f9fafb;
  color: var(--ink);
}

.nav-search-pill--icon {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
}

.mobile-nav-controls {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.menu-toggle {
  appearance: none;
  min-height: 44px;
  padding: 0 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

@media (max-width: 840px) {
  .header-inner {
    padding-inline: 0.9rem;
    min-height: 58px;
    gap: 0.6rem;
  }

  .brand-lockup {
    min-width: 0;
    flex: 1 1 auto;
    gap: 0.55rem;
  }

  .brand-text-wrap {
    min-width: 0;
  }

  .brand-name {
    font-size: 1.02rem;
    white-space: nowrap;
  }

  .brand-sub {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-controls {
    display: flex;
    flex-shrink: 0;
  }

  .nav-search-item {
    display: none;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0.9rem 0.9rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    z-index: 950;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    min-height: 48px;
    padding: 0.65rem 0.75rem;
    width: 100%;
  }

  .nav-menu a[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3px;
    height: auto;
  }
}

@media (max-width: 380px) {
  .brand-sub {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Search Modal <dialog>
   -------------------------------------------------------------------------- */
dialog.search-dialog {
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  width: min(600px, calc(100vw - 2rem));
  margin: 5rem auto auto;
  box-shadow: var(--shadow-modal);
  overflow: visible;
}

dialog.search-dialog:modal {
  overscroll-behavior: contain;
}

dialog.search-dialog::backdrop {
  background-color: rgba(17, 24, 39, 0.5);
  overflow: hidden;
  overscroll-behavior: contain;
}

.search-dialog-box {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.search-modal-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem;
}

.search-modal-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  border: 0;
  font: inherit;
  font-size: max(1rem, 1.02rem);
  color: var(--ink);
  background: transparent;
}

.search-modal-input:focus {
  outline: none;
}

.search-modal-submit {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: var(--emerald);
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 42px;
  padding: 0 1.1rem;
  cursor: pointer;
}

.search-modal-submit:hover {
  background: var(--emerald-hover);
}

.search-modal-close {
  appearance: none;
  border: 0;
  background: #f3f4f6;
  color: var(--ink-body);
  border-radius: 6px;
  min-width: 42px;
  min-height: 42px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Clean Flat Utility Hero Section (No gradients, no nested boxes, no pills)
   -------------------------------------------------------------------------- */
.site-main {
  flex: 1 0 auto;
}

.hero-band {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 1.25rem 2.5rem;
}

.hero-container {
  max-width: 1180px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
  gap: 2.5rem;
  align-items: start;
}

.hero-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.75rem, 3.1vw, 2.35rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--ink);
}

.hero-subtitle {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--ink-body);
  max-width: 54ch;
}

/* Flat Crisp Lookup Panel */
.lookup-card {
  background: var(--surface-muted);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 1.35rem 1.4rem;
}

.mode-fieldset {
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  display: flex;
  gap: 1.25rem;
}

.mode-option {
  position: relative;
}

.mode-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-option label {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.15rem 0.55rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.mode-option input[type="radio"]:checked + label {
  color: var(--emerald-deep);
  border-bottom-color: var(--emerald);
  font-weight: 700;
}

.mode-option input[type="radio"]:focus-visible + label {
  outline: 3px solid var(--emerald);
  outline-offset: 2px;
}

.lookup-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.lookup-label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
}

.digit-counter {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.digit-counter.is-complete {
  color: var(--emerald);
  font-weight: 700;
}

.lookup-input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: max(1.0625rem, 1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: #ffffff;
}

.lookup-input::placeholder {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: normal;
  color: #9ca3af;
}

.lookup-input:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.14);
}

.lookup-input:is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field-panel[hidden] {
  display: none;
}

.lookup-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.8rem 0 1.05rem;
}

.save-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-body);
  cursor: pointer;
  padding: 6px 0;
}

.save-check-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--emerald);
}

.lookup-hint-link {
  font-size: 0.875rem;
  font-weight: 600;
}

.form-alert-error {
  margin-bottom: 0.9rem;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-alert-error[hidden] {
  display: none;
}

.btn-emerald {
  appearance: none;
  border: 0;
  border-radius: 6px;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  background: var(--emerald);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
}

.btn-emerald:hover {
  background: var(--emerald-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-emerald--full {
  width: 100%;
}

.btn-emerald[disabled] {
  opacity: 0.8;
  cursor: wait;
}

.btn-spinner {
  width: 17px;
  height: 17px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-spinner[hidden] {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.saved-numbers-bar {
  margin-top: 0.95rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.saved-numbers-bar[hidden] {
  display: none;
}

.saved-chip {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: var(--ink);
  border-radius: 5px;
  padding: 0.25rem 0.65rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.saved-chip:hover {
  border-color: var(--emerald);
  color: var(--emerald-deep);
}

.saved-clear-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  margin-inline-start: auto;
}

.hero-left,
.hero-diagram-wrap,
.guide-article,
.subpage-content-panel,
.sidebar-card {
  min-width: 0;
  overflow-wrap: break-word;
}

/* Native Responsive MEPCO Bill Header Locator Card */
.bill-specimen-card {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.specimen-top {
  background: #111827;
  color: #ffffff;
  padding: 0.75rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.specimen-company {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.specimen-sub {
  font-size: 0.72rem;
  color: #9ca3af;
}

.specimen-url {
  font-size: 0.75rem;
  font-weight: 600;
  color: #86efac;
}

.specimen-dates-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
}

.specimen-mid-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr 1.35fr;
  border-bottom: 1px solid var(--border);
}

.specimen-cell {
  padding: 0.55rem 0.7rem;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.specimen-cell:last-child {
  border-right: 0;
}

.specimen-k {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.specimen-k--amber {
  color: #b45309;
}

.specimen-k--green {
  color: var(--emerald);
}

.specimen-v {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.specimen-v--bold {
  font-weight: 700;
}

.specimen-v--due {
  color: #b45309;
  font-weight: 700;
}

.specimen-highlight {
  padding: 0.6rem 0.75rem;
  min-width: 0;
}

.specimen-highlight--amber {
  background: var(--amber-bg);
  border-right: 2px solid #d97706;
  box-shadow: inset 0 0 0 1.5px #d97706;
}

.specimen-highlight--green {
  background: var(--emerald-tint);
  box-shadow: inset 0 0 0 2px var(--emerald);
}

.specimen-num {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ink);
  line-height: 1.25;
}

.specimen-num--lg {
  font-size: 1.06rem;
}

.specimen-num small {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 700;
}

.specimen-ref-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
}

.specimen-tip {
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  font-size: 0.76rem;
  color: var(--ink-body);
  line-height: 1.4;
}

.specimen-tip strong {
  color: var(--ink);
  font-size: 0.78rem;
}

/* Right Hero Column (Simple Figure + Plain Utility Info) */
.hero-diagram-wrap {
  padding-top: 0.25rem;
}

.hero-diagram-caption {
  margin: 0.65rem 0 0.85rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.hero-quick-note {
  padding: 0.8rem 1rem;
  border-radius: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 0.8875rem;
  color: var(--ink-body);
  line-height: 1.55;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.quick-note-item code {
  word-break: break-word;
}

.mode-digits {
  font-weight: 500;
  color: var(--ink-muted);
  margin-inline-start: 0.2rem;
}

.mode-option input[type="radio"]:checked + label .mode-digits {
  color: var(--emerald);
}

@media (max-width: 920px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .hero-band {
    padding: 1.25rem 0.9rem 1.5rem;
  }

  .hero-title {
    font-size: 1.5rem;
    line-height: 1.22;
  }

  .hero-subtitle {
    font-size: 0.94rem;
    margin-bottom: 1rem;
  }

  .lookup-card {
    padding: 1.05rem 0.95rem;
  }

  .mode-fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .mode-option label {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .specimen-dates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .specimen-dates-grid .specimen-cell {
    border-bottom: 1px solid var(--border);
  }

  .specimen-dates-grid .specimen-cell:nth-child(2n) {
    border-right: 0;
  }

  .specimen-dates-grid .specimen-cell:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .specimen-mid-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .specimen-mid-grid .specimen-highlight--amber {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .specimen-ref-row {
    grid-template-columns: 1fr;
  }

  .specimen-tip {
    border-top: 1px solid var(--border);
    background: #f9fafb;
  }

  .hero-quick-note {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .quick-note-item code {
    white-space: nowrap;
  }

  .lookup-card {
    border-radius: 10px;
  }

  .bill-specimen-card {
    border-radius: 10px;
  }
}

/* --------------------------------------------------------------------------
   Editorial Guide Layout with Collapsible Top Table of Contents
   -------------------------------------------------------------------------- */
.guide-shell {
  max-width: 1180px;
  margin: 1.75rem auto 3rem;
  padding-inline: 1.25rem;
}

.guide-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2.4rem;
}

.toc-tabs-panel {
  margin: 0 0 1.75rem;
  padding: 1rem 1.15rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.toc-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.7rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.toc-tabs-title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.toc-tabs-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.toc-tabs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.toc-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.42rem 0.82rem;
  border-radius: 7px;
  border: 1px solid #dde3ea;
  background: #ffffff;
  color: var(--ink-body);
  font-size: 0.8625rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.toc-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 0.3rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.toc-tab-label {
  white-space: nowrap;
}

.toc-tab-arrow {
  display: none;
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.15s ease, color 0.15s ease;
}

.toc-tab-item:hover {
  border-color: var(--emerald);
  background: var(--emerald-tint);
  color: var(--emerald-deep);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.09);
}

.toc-tab-item:hover .toc-tab-num {
  background: #dcfce7;
  color: var(--emerald-deep);
}

.toc-tab-item.is-active {
  border-color: var(--emerald);
  background: var(--emerald);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.22);
}

.toc-tab-item.is-active .toc-tab-num {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.guide-lead-banner {
  padding-bottom: 1.35rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--border);
}

.guide-lead-banner h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 700;
}

.guide-section {
  padding-top: 0.4rem;
  margin-bottom: 2rem;
}

.editorial-h2 {
  margin: 1.85rem 0 0.8rem;
  padding-bottom: 0.45rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1.5px solid var(--border);
}

.editorial-h3 {
  margin: 1.3rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.guide-article p {
  margin: 0 0 1rem;
}

.guide-article ul,
.guide-article ol {
  margin: 0 0 1.15rem;
  padding-inline-start: 1.35rem;
}

.guide-article li {
  margin-bottom: 0.42rem;
}

.two-col-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}

.method-card {
  padding: 1.1rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.method-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  color: var(--ink);
}

.method-card ul {
  margin: 0;
  padding-inline-start: 1.15rem;
}

.callout-box {
  margin: 1.25rem 0;
  padding: 0.95rem 1.15rem;
  border-radius: 6px;
  background: var(--emerald-tint);
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--emerald);
}

.callout-box--amber {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  border-left-color: #d97706;
}

.callout-box p:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .guide-shell {
    padding-inline: 0.85rem;
    margin-top: 1.15rem;
  }

  .guide-article {
    padding: 1.15rem 0.95rem;
    border-radius: 12px;
  }

  .guide-lead-banner {
    padding-bottom: 1.15rem;
    margin-bottom: 1.35rem;
  }

  .guide-lead-banner h2 {
    font-size: 1.38rem;
    line-height: 1.28;
  }

  .editorial-h2 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-top: 1.5rem;
  }

  .toc-tabs-panel {
    padding: 0.9rem;
    margin-bottom: 1.45rem;
    border-radius: 10px;
    background: #f8fafc;
    border-color: #e2e8f0;
  }

  .toc-tabs-header {
    padding-bottom: 0.6rem;
    margin-bottom: 0.75rem;
  }

  .toc-tabs-meta {
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    background: var(--emerald-tint);
    border: 1px solid #bbf7d0;
    color: var(--emerald-deep);
    font-size: 0.72rem;
    font-weight: 600;
  }

  .toc-tabs-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.42rem;
  }

  .toc-tab-item {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0.55rem 0.82rem;
    border-radius: 8px;
    font-size: 0.875rem;
    gap: 0.65rem;
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  }

  .toc-tab-num {
    min-width: 26px;
    height: 22px;
    font-size: 0.72rem;
    flex-shrink: 0;
  }

  .toc-tab-label {
    flex: 1 1 auto;
    white-space: normal;
    line-height: 1.35;
  }

  .toc-tab-arrow {
    display: inline-flex;
  }

  .toc-tab-item:hover .toc-tab-arrow {
    color: var(--emerald);
    transform: translateX(2px);
  }

  .toc-tab-item.is-active .toc-tab-arrow {
    color: rgba(255, 255, 255, 0.9);
  }

  .two-col-cards {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Subpage Containers & Sidebars
   -------------------------------------------------------------------------- */
.site-container {
  max-width: 1180px;
  margin: 1.75rem auto 3rem;
  padding-inline: 1.25rem;
}

.layout-centered-shell {
  max-width: 740px;
}

.layout-two-col-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.75rem;
  align-items: start;
}

.subpage-content-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2.2rem;
}

.breadcrumb-nav {
  margin-bottom: 0.7rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.breadcrumb-nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumb-nav a:hover {
  color: var(--emerald);
  text-decoration: underline;
}

.page-title {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.22;
}

.sidebar-stack {
  display: grid;
  gap: 1.15rem;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.3rem;
}

.sidebar-card--highlight {
  background: var(--surface-muted);
}

.sidebar-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--emerald);
  margin-bottom: 0.25rem;
}

.sidebar-card-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.sidebar-card-copy {
  margin: 0 0 0.9rem;
  font-size: 0.9125rem;
  color: var(--ink-muted);
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.sidebar-links a {
  display: block;
  padding: 0.42rem 0.6rem;
  border-radius: 5px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-body);
}

.sidebar-links a:hover,
.sidebar-links a[aria-current="page"] {
  background: var(--emerald-tint);
  color: var(--emerald-deep);
}

.sidebar-phone-list {
  display: grid;
  gap: 0.45rem;
}

.sidebar-phone-pill,
.sidebar-sms-pill {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.sidebar-phone-pill:hover {
  border-color: var(--emerald);
  color: var(--emerald-deep);
}

@media (max-width: 960px) {
  .layout-two-col-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-container {
    padding-inline: 0.85rem;
  }

  .subpage-content-panel {
    padding: 1.35rem 1.1rem;
  }
}

/* --------------------------------------------------------------------------
   Bill Verification Card (/mepco-bill-summary/)
   -------------------------------------------------------------------------- */
.receipt-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1rem;
}

.receipt-banner {
  background: #111827;
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.receipt-banner--error {
  background: #991b1b;
}

.receipt-banner-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
}

.receipt-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #86efac;
}

.receipt-body {
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.receipt-number-display {
  margin: 0 auto 1.25rem;
  padding: 1rem 1.25rem;
  max-width: 440px;
  border-radius: 6px;
  background: var(--emerald-tint);
  border: 1px solid #bbf7d0;
}

.receipt-number-display--error {
  background: var(--danger-bg);
  border-color: #fecaca;
}

.receipt-number-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-deep);
  margin-bottom: 0.25rem;
}

.receipt-number-display--error .receipt-number-label {
  color: #991b1b;
}

.receipt-number-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.1rem, 3.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.receipt-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto 1.35rem;
  text-align: left;
}

.receipt-meta-item {
  padding: 0.7rem 0.85rem;
  border-radius: 6px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 0.875rem;
}

.receipt-meta-item span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.receipt-meta-item strong {
  color: var(--ink);
}

.receipt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.05rem;
}

.btn-secondary {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--ink);
  border-radius: 6px;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.btn-secondary:hover {
  background: #f3f4f6;
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 560px) {
  .receipt-body {
    padding: 1.35rem 1rem;
  }

  .receipt-meta-grid {
    grid-template-columns: 1fr;
  }

  .receipt-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .receipt-actions .btn-secondary {
    justify-content: center;
    min-height: 44px;
  }
}

/* --------------------------------------------------------------------------
   Responsive Accessible Tables (@container)
   -------------------------------------------------------------------------- */
.table-wrapper {
  margin: 1.2rem 0 1.6rem;
  overflow-x: auto;
  max-inline-size: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  container-type: inline-size;
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
  text-align: left;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fafb;
  color: var(--ink);
  font-weight: 700;
  padding: 0.75rem 0.95rem;
  border-bottom: 1.5px solid var(--border-strong);
}

.data-table tbody td,
.data-table tbody th {
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}

.data-table tbody tr:hover {
  background: #f9fafb;
}

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th {
  border-bottom: 0;
}

.data-table tbody th {
  font-weight: 600;
  color: var(--ink);
}

@container (width < 560px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    margin: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
  }

  .data-table tbody th {
    background: #f9fafb;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
  }

  .data-table tbody th::before {
    content: none;
  }

  .data-table tbody td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    text-align: left;
  }

  .data-table tbody tr > :last-child {
    border-bottom: 0;
  }

  .data-table tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
  }
}

/* Fallback media query for mobile browsers without container query support */
@media (max-width: 640px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    margin: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
  }

  .data-table tbody th {
    background: #f9fafb;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
  }

  .data-table tbody td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    text-align: left;
  }

  .data-table tbody tr > :last-child {
    border-bottom: 0;
  }

  .data-table tbody td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
  }

  .search-inline-form {
    flex-direction: column;
  }

  .search-inline-form .btn-emerald {
    width: 100%;
  }

  .contact-form-card {
    padding: 1.15rem 1rem;
  }
}

/* --------------------------------------------------------------------------
   FAQ Accordion (<details>)
   -------------------------------------------------------------------------- */
.faq-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.faq-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary:hover {
  background: #f9fafb;
}

.faq-toggle {
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--emerald);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.1rem 1rem;
  color: var(--ink-body);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Contact Page & Search Page Controls
   -------------------------------------------------------------------------- */
.contact-meta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}

.contact-meta-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.contact-meta-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.contact-meta-card p {
  margin: 0;
  font-size: 0.9125rem;
}

.contact-form-card {
  margin-top: 1.25rem;
  padding: 1.45rem 1.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  font: inherit;
  font-size: max(1rem, 1em);
  color: var(--ink);
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.14);
}

.form-control:is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--danger);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.status-banner {
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  margin-bottom: 1.15rem;
  font-weight: 600;
}

.status-banner--success {
  background: var(--emerald-tint);
  border: 1px solid #bbf7d0;
  color: var(--emerald-deep);
}

.status-banner--error {
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.search-inline-form {
  display: flex;
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
}

.search-inline-form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
}

.search-result-list {
  display: grid;
  gap: 0.9rem;
}

.search-result-item {
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.search-result-item h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.search-result-item p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #111827;
  color: #d1d5db;
  margin-top: auto;
}

.footer-container {
  max-width: 1180px;
  margin-inline: auto;
  padding: 2.25rem 1.25rem 1.35rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.brand-mark--footer {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-desc {
  margin: 0 0 0.6rem;
  font-size: 0.8875rem;
  color: #9ca3af;
  max-width: 44ch;
}

.footer-disclaimer {
  margin: 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.footer-col-title {
  margin: 0 0 0.7rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.footer-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.footer-nav-list a {
  color: #d1d5db;
  text-decoration: none;
}

.footer-nav-list a:hover,
.footer-nav-list a[aria-current="page"] {
  color: #86efac;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
  color: #9ca3af;
}

.footer-bottom code {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}
