:root {
  --bills-green-950: #071d18;
  --bills-green-900: #0d2b24;
  --bills-green-800: #103d35;
  --bills-green-700: #1a563f;
  --bills-green-500: #4c9b7d;
  --bills-green-300: #9ad6b5;
  --bills-green-100: #dff5e9;
  --bills-slate: #dfe7e3;
  --bills-muted: #a8c0b8;
  --bills-surface: rgba(17, 44, 38, 0.82);
  --bills-panel: rgba(8, 25, 22, 0.84);
  --bills-line: rgba(195, 219, 211, 0.15);
  --bills-success: #7ed1a3;
  --bills-warning: #f7cf78;
  --bills-danger: #ff8a7a;
  --bills-shadow: 0 1.25rem 2.5rem rgba(2, 13, 11, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(66, 140, 108, 0.35), transparent 32%),
    linear-gradient(180deg, #051a15 0%, #071d18 30%, #0b231e 100%);
  color: #edf8f4;
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(154, 214, 181, 0.9), 0 0 0 5px rgba(5, 15, 13, 0.7);
}

.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 30;
  top: 1rem;
  left: 1rem;
  background: #f4f2ec;
  color: #071d18;
  padding: 0.8rem 1rem;
}

.bills-app-container {
  width: min(100% - 1.5rem, 1200px);
  margin-inline: auto;
}

.bills-app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--bills-line);
  background: rgba(6, 26, 22, 0.72);
  backdrop-filter: blur(12px);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.wordmark-period {
  color: var(--bills-muted);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.status-pill,
.service-tag,
.status-badge,
.eyebrow {
  font-family: "DM Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(154, 214, 181, 0.38);
  border-radius: 999px;
  background: rgba(115, 181, 148, 0.08);
  color: var(--bills-green-100);
  font-size: 0.62rem;
}

.label-link {
  color: var(--bills-green-100);
  text-decoration: none;
  font-size: 0.8rem;
}

.bills-app-shell {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.5rem 3rem;
}

.app-card {
  border: 1px solid var(--bills-line);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(14, 30, 26, 0.9), rgba(10, 25, 22, 0.7));
  box-shadow: var(--bills-shadow);
}

.bills-app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.brand-card,
.sidebar-card,
.security-card,
.hero-panel,
#service-panel,
#checkout-panel {
  padding: 1.25rem;
}

.brand-card h1 {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.eyebrow {
  margin: 0;
  color: var(--bills-green-300);
  font-size: 0.62rem;
}

.eyebrow-soft {
  color: var(--bills-green-300);
}

.subtle-copy {
  margin: 0;
  color: var(--bills-muted);
  line-height: 1.6;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.service-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  color: #f1f8f5;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.service-button:hover,
.service-button.is-active {
  border-color: rgba(154, 214, 181, 0.5);
  background: rgba(144, 205, 168, 0.08);
  transform: translateY(-1px);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  background: rgba(109, 175, 142, 0.12);
  color: var(--bills-green-100);
  font-size: 1.15rem;
}

.security-card ul {
  display: grid;
  gap: 0.6rem;
  padding-left: 1.1rem;
  margin: 1rem 0 0;
  color: var(--bills-muted);
  line-height: 1.5;
}

.bills-app-main {
  display: grid;
  gap: 1.5rem;
}

.hero-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(19, 57, 47, 0.92), rgba(7, 29, 24, 0.9));
}

.hero-panel h2 {
  margin: 0.55rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.06em;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  min-width: min(100%, 360px);
}

.stat-row > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--bills-line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.stat-label {
  color: var(--bills-muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-row strong {
  font-size: 1.1rem;
}

#service-panel,
#checkout-panel {
  min-height: 200px;
}

.hidden {
  display: none;
}

.service-panel-header,
.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.service-panel-header h3,
.checkout-header h3 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.6rem, 1.9vw, 2.25rem);
  letter-spacing: -0.05em;
}

.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(154, 214, 181, 0.34);
  border-radius: 999px;
  background: rgba(154, 214, 181, 0.08);
  color: var(--bills-green-100);
  font-size: 0.6rem;
}

.service-helper {
  margin: 0 0 1.25rem;
  color: var(--bills-muted);
  line-height: 1.6;
}

.fee-preview,
.service-fee-note,
.catalog-state,
.eligibility-state,
.checkout-notice,
.account-panel {
  padding: 1rem;
  border: 1px solid var(--bills-line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.025);
}

.fee-preview {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  color: var(--bills-muted);
}

.fee-preview > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.fee-preview strong,
.fee-preview-total {
  color: #edf8f4;
}

.fee-preview-total {
  padding-top: 0.65rem;
  border-top: 1px solid var(--bills-line);
}

.fee-preview p,
.service-fee-note,
.catalog-state,
.eligibility-state,
.checkout-notice,
.account-panel .subtle-copy {
  color: var(--bills-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.fee-preview p {
  margin: 0.25rem 0 0;
}

.service-fee-note,
.catalog-state,
.eligibility-state,
.checkout-notice {
  margin-top: 1rem;
}

.catalog-state {
  color: var(--bills-warning);
}

.account-panel {
  margin-top: 1rem;
}

.account-mode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.account-form {
  display: grid;
  gap: 0.9rem;
  max-width: 34rem;
}

.account-form .subtle-copy {
  margin: 0;
}

.account-status {
  color: var(--bills-green-100);
}

.checkout-notice {
  border-color: rgba(247, 207, 120, 0.35);
  color: var(--bills-warning);
}

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

.field {
  display: grid;
  gap: 0.45rem;
  color: var(--bills-slate);
}

.field span {
  font-size: 0.82rem;
  color: var(--bills-muted);
}

.field input,
.field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid rgba(215, 228, 222, 0.18);
  border-radius: 0.9rem;
  background: rgba(4, 17, 15, 0.48);
  color: #edf8f4;
}

.form-actions,
.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.primary-button {
  background: linear-gradient(180deg, #76d39f, #4ca67d);
  color: #062b21;
  font-weight: 700;
}

.secondary-button {
  background: transparent;
  border-color: rgba(154, 214, 181, 0.3);
  color: #edf8f4;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.inline-message {
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 0.8rem;
  font-size: 0.92rem;
}

.inline-message-success {
  border: 1px solid rgba(126, 209, 163, 0.42);
  background: rgba(126, 209, 163, 0.09);
  color: #d8fce9;
}

.inline-message-error {
  border: 1px solid rgba(255, 138, 122, 0.42);
  background: rgba(255, 138, 122, 0.08);
  color: #ffd8d1;
}

.review-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(215, 228, 222, 0.12);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.review-item span,
.checkout-meta span {
  color: var(--bills-muted);
}

.review-total {
  background: rgba(118, 211, 159, 0.08);
}

.checkout-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px dashed rgba(154, 214, 181, 0.3);
  border-radius: 0.85rem;
  background: rgba(154, 214, 181, 0.04);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.6rem;
}

.status-badge.pending {
  border: 1px solid rgba(247, 207, 120, 0.35);
  background: rgba(247, 207, 120, 0.08);
  color: var(--bills-warning);
}

.status-badge.unavailable {
  border: 1px solid rgba(247, 207, 120, 0.35);
  background: rgba(247, 207, 120, 0.08);
  color: var(--bills-warning);
}

.status-badge.success {
  border: 1px solid rgba(126, 209, 163, 0.35);
  background: rgba(126, 209, 163, 0.08);
  color: var(--bills-success);
}

.result-card {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
}

.result-card-success {
  border: 1px solid rgba(126, 209, 163, 0.4);
  background: rgba(126, 209, 163, 0.08);
  color: #e6fff0;
}

.result-card h4 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.result-card p {
  margin: 0;
  color: #d5efe3;
}

.result-label {
  margin: 0;
  color: var(--bills-green-300);
  font-family: "DM Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .bills-app-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-row {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .app-header-inner,
  .header-meta,
  .service-panel-header,
  .checkout-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-meta {
    width: 100%;
  }

  .status-pill {
    width: fit-content;
  }
}

@media (max-width: 48rem) {
  .bills-app-page .site-footer .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .bills-app-page .site-footer .footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-2);
  }
}
