/* GO DGTL compliance and availability overview
   Dark brand theme. Milestone 1 output restyled.
   Inter for headings and body, JetBrains Mono for figures and eyebrow labels.
   Flat surfaces, subtle 1px borders. Copy stays em-dash free. */

:root {
  /* Surfaces */
  --bg: #0C0D0F;
  --surface: #16171A;
  --surface-2: #1C1D21;
  --border: #26282C;

  /* Text */
  --text: #F4F5F7;
  --text-muted: #9AA0A6;

  /* Accent and status */
  --red: #E63946;
  --red-hover: #D62F3C;
  --green: #34D399;
  --amber: #E8A317;
  --gray-status: #6B7280;

  /* Informational card */
  --blue-card: #14213D;
  --blue-card-border: #26365C;

  /* Radii */
  --radius-card: 14px;
  --radius-control: 10px;

  /* Height of the sticky bottom action bar, reserved as page padding */
  --action-bar-h: 72px;

  /* Type */
  --font-sans: "Inter", Arial, Helvetica, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

/* Visually hidden, still available to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  /* Reserve space so the fixed action bar never covers the footer */
  padding-bottom: var(--action-bar-h);
}

/* Sticky top header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex: 0 0 8px;
}

.wordmark {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

/* Page column */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* Hero: title and positioning */
.hero {
  padding: 28px 0 20px;
}

.header-title {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.header-positioning {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 8px;
  max-width: 60ch;
}

.header-purpose {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 12px;
  max-width: 60ch;
}

.header-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0;
}

/* Status key legend */
.status-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 20px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.status-key-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Section titles */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  margin: 0 0 10px;
}

/* General info box */
.info-box {
  margin: 0 0 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.info-box .section-title {
  font-size: 15px;
  margin: 0 0 8px;
}

.info-box-line {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 6px;
  max-width: 62ch;
}

.info-box-line:last-child {
  margin-bottom: 0;
}

/* Digital Services Tax sub-block, set off from the lines above by a divider */
.dst-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.dst-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}

.dst-intro {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 10px;
  max-width: 62ch;
}

.dst-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dst-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}

.dst-item:first-child {
  border-top: none;
}

.dst-country {
  font-size: 13px;
  color: var(--text);
}

.dst-rate {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Provider grid */
.provider-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-card);
  padding: 16px;
}

/* Left border in the status colour */
.provider-card.status-available { border-left-color: var(--green); }
.provider-card.status-limited { border-left-color: var(--amber); }
.provider-card.status-unavailable { border-left-color: var(--gray-status); }

.provider-card.is-unavailable {
  opacity: 0.55;
}

/* The card header is a full-width button. Reset native button styling. */
.card-header {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-control);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.letter-badge {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: var(--radius-control);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.provider-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 10px;
}

.status-available .status-dot { background: var(--green); }
.status-limited .status-dot { background: var(--amber); }
.status-unavailable .status-dot { background: var(--gray-status); }

.best-for {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin: 12px 0 0;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 12px;
}

.view-restrictions {
  font-size: 14px;
  font-weight: 500;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chevron {
  display: inline-block;
  border: solid var(--red);
  border-width: 0 2px 2px 0;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

/* Chevron points up once the panel is open */
.card-header[aria-expanded="true"] .chevron {
  transform: rotate(-135deg);
}

.usd-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* Right cluster of the meta row: delivery estimate and optional USD pill */
.card-meta-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.delivery {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}

.delivery-icon {
  display: inline-flex;
  color: var(--text-muted);
}

/* Muted one-line description under best-for */
.description {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

/* Accepted category chips */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.category-chip-item {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.category-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
}

/* A temporarily unavailable category chip renders dimmed and gray */
.category-chip.is-unavailable-chip {
  color: var(--text-muted);
  opacity: 0.6;
}

.chip-unavailable-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--gray-status);
}

/* Categories and fees table inside the expanded panel */
.fee-table-wrap {
  margin-bottom: 14px;
}

.fee-table-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fee-table th,
.fee-table td {
  text-align: left;
  padding: 7px 8px;
  border: 1px solid var(--border);
}

.fee-row-label {
  font-weight: 500;
  color: var(--text);
}

.fee-row-name {
  display: block;
}

/* Per row delivery estimate under an account type label */
.fee-row-delivery {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--text-muted);
}

.fee-row-value {
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  width: 1%;
}

/* Temporarily unavailable category row: dimmed, gray fee text */
.fee-table .is-unavailable-row {
  opacity: 0.6;
}

.fee-row-value.is-unavailable-fee {
  color: var(--gray-status);
}

/* Single line shown in place of the fee table, for example custom pricing */
.fee-table-line {
  font-size: 13px;
  color: var(--text);
  margin: 0;
}

/* Facebook pages required note */
.pages-note {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.pages-note-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}

.pages-note-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* Prohibited list, rendered in place for milestone 1. Expand and collapse
   wiring arrives in milestone 2. */
.prohibited {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.prohibited-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.prohibited-list {
  margin: 0;
  padding-left: 18px;
}

.prohibited-list li {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.card-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 10px 0 0;
  font-style: italic;
}

/* Footnote under the partner grid */
.grid-footnote {
  font-size: 13px;
  color: var(--text-muted);
  margin: 14px 0 0;
  max-width: 62ch;
}

/* Diversification feature card */
.feature-card {
  margin: 24px 0 0;
  padding: 18px;
  background: var(--blue-card);
  border: 1px solid var(--blue-card-border);
  border-radius: var(--radius-card);
}

.feature-card-text {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  max-width: 62ch;
}

/* Universal rules strip */
.universal-rules {
  margin: 16px 0 0;
  padding: 16px 18px;
  background: rgba(230, 57, 70, 0.10);
  border: 1px solid rgba(230, 57, 70, 0.45);
  border-radius: var(--radius-card);
}

.universal-rules-text {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  max-width: 62ch;
}

/* Footer disclaimer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.footer-inner p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 62ch;
}

/* Sticky bottom action bar */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.action-bar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
  /* Keep clear of the iOS home indicator on phones */
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.btn-primary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}

/* Focus states use the red accent */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
