/* ===== DESIGN TOKENS ===== */
:root {
  --space-1: clamp(0.75rem, 0.55rem + 0.4vw, 1rem);
  --space-2: clamp(1rem, 0.7rem + 0.8vw, 1.618rem);
  --space-3: clamp(1.618rem, 1.1rem + 1.5vw, 2.618rem);
  --space-4: clamp(2.618rem, 1.8rem + 2vw, 4.236rem);
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-xl: 40px;
  --shadow-soft: 0 12px 40px rgba(33, 14, 71, 0.10);
  --shadow-md: 0 20px 60px rgba(33, 14, 71, 0.14);
  --shadow-glow: 0 28px 90px rgba(122, 71, 223, 0.22);
  --shadow-card: 0 2px 12px rgba(33, 14, 71, 0.06);
  --brand-950: #150c25;
  --brand-900: #210e47;
  --brand-800: #3d2075;
  --brand-700: #7a47df;
  --brand-600: #8750f7;
  --brand-500: #af23b7;
  --brand-400: #c065d6;
  --surface-100: #f8f0ff;
  --surface-200: #efe7fb;
  --surface-50: #fdfaff;
  --text-strong: #140c24;
  --text-muted: #5b616f;
  --text-inverse: #ffffff;
  --success: #24a148;
  --danger: #b42318;
  --border-soft: rgba(122, 71, 223, 0.14);
  --border-active: rgba(122, 71, 223, 0.35);
  --gradient-main: linear-gradient(135deg, #210e47 0%, #3d2075 38%, #7a47df 72%, #af23b7 100%);
  --gradient-soft: linear-gradient(135deg, rgba(175, 35, 183, 0.08) 0%, rgba(122, 71, 223, 0.05) 100%);
  --gradient-trust: linear-gradient(135deg, rgba(122, 71, 223, 0.06) 0%, rgba(175, 35, 183, 0.04) 100%);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  color: var(--text-strong);
  background:
    radial-gradient(ellipse 60% 40% at 85% 5%, rgba(175, 35, 183, 0.14), transparent),
    radial-gradient(ellipse 50% 50% at 10% 15%, rgba(122, 71, 223, 0.10), transparent),
    linear-gradient(180deg, #faf6ff 0%, #fcfbff 50%, #f7f2fc 100%);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

[dir="ltr"] body {
  font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif;
}

/* ===== LAYOUT ===== */
.page-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: var(--space-2) 0 var(--space-3);
}

.main-stack {
  display: grid;
  gap: var(--space-3);
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.brand__text {
  font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar__actions {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.3rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.lang-toggle {
  border: 0;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  transition: 200ms ease;
}

.lang-toggle.is-active {
  background: var(--gradient-main);
  color: var(--text-inverse);
}

/* ===== SURFACE ===== */
.surface {
  position: relative;
  overflow: hidden;
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.surface--glow {
  background: linear-gradient(135deg, rgba(33, 14, 71, 0.97), rgba(61, 32, 117, 0.95) 50%, rgba(122, 71, 223, 0.92) 100%);
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow);
}

.surface--glow::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 280px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(175, 35, 183, 0.15), transparent 70%);
  pointer-events: none;
}

/* ===== HERO ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.85fr);
  gap: var(--space-3);
  align-items: center;
}

.hero h1 {
  margin: 0;
  line-height: 1.12;
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3.4rem);
  font-weight: 700;
}

.hero__lead {
  margin: 0.8rem 0 0;
  line-height: 1.85;
  opacity: 0.88;
  font-size: clamp(0.95rem, 0.85rem + 0.3vw, 1.1rem);
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.78;
}

.eyebrow--dark {
  color: var(--brand-700);
  opacity: 1;
}

.hero__steps {
  display: grid;
  gap: 0.75rem;
}

.mini-step {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: background 200ms;
}

.mini-step:hover {
  background: rgba(255, 255, 255, 0.13);
}

.mini-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-inverse);
}

/* ===== TRUST BANNER ===== */
.trust-banner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  padding: 0.5rem 1.2rem;
  text-align: start;
}

.trust-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 16px;
  background: var(--gradient-soft);
  color: var(--brand-700);
}

.trust-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
  color: var(--text-strong);
}

.trust-item p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.trust-divider {
  width: 1px;
  align-self: stretch;
  margin: 0.5rem 0;
  background: var(--border-soft);
  flex-shrink: 0;
}

/* ===== SECTION HEADERS ===== */
.composer h2, .examples h2, .results h2 {
  margin: 0;
  line-height: 1.15;
  font-size: clamp(1.5rem, 1rem + 1.5vw, 2.4rem);
}

.section-lead {
  margin: 0.3rem 0 0;
  line-height: 1.8;
  color: var(--text-muted);
}

.composer__header,
.results__header,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.status-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(122, 71, 223, 0.07);
  border: 1px solid var(--border-soft);
  color: var(--brand-900);
  font-weight: 600;
  font-size: 0.88rem;
}

.status-pill.is-success {
  background: rgba(36, 161, 72, 0.08);
  border-color: rgba(36, 161, 72, 0.18);
  color: var(--success);
}

/* ===== COMPOSER / WORKSPACE ===== */
.composer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: var(--space-2);
}

.input-pane, .upload-pane {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field > span {
  font-weight: 600;
  font-size: 0.92rem;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-strong);
  padding: 0.85rem 1rem;
  outline: 0;
  transition: border-color 200ms, box-shadow 200ms;
}

textarea {
  min-height: 400px;
  resize: vertical;
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(122, 71, 223, 0.10);
}

/* ===== DROPZONE ===== */
.dropzone {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  min-height: 200px;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1.5px dashed rgba(122, 71, 223, 0.25);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 240, 255, 0.7));
  text-align: center;
  transition: 200ms ease;
}

.dropzone input { display: none; }

.dropzone:hover, .dropzone.is-dragging {
  transform: translateY(-1px);
  border-color: var(--border-active);
  box-shadow: 0 8px 24px rgba(122, 71, 223, 0.10);
}

.dropzone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: var(--gradient-main);
  color: var(--text-inverse);
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

/* ===== FILE SPOILER (FIXED) ===== */
.file-spoiler {
  border-radius: var(--radius-md);
  background: rgba(122, 71, 223, 0.05);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.file-spoiler[hidden] { display: none; }

.file-spoiler__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  list-style: none;
  user-select: none;
}

.file-spoiler__summary::-webkit-details-marker { display: none; }

.file-spoiler__summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(122, 71, 223, 0.10);
  color: var(--brand-800);
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 200ms;
}

.file-spoiler[open] .file-spoiler__summary::after {
  content: "\2212";
  transform: rotate(0deg);
}

.file-spoiler__note {
  margin: 0;
  padding: 0 1rem 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 1rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 71, 223, 0.2) transparent;
}

.file-list::-webkit-scrollbar { width: 5px; }
.file-list::-webkit-scrollbar-track { background: transparent; }
.file-list::-webkit-scrollbar-thumb { background: rgba(122, 71, 223, 0.2); border-radius: 999px; }

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(122, 71, 223, 0.07);
  border: 1px solid var(--border-soft);
  font-size: 0.82rem;
  max-width: 100%;
  line-height: 1.3;
}

.file-chip__path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.file-chip strong {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ===== CONTROL CARD ===== */
.control-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--gradient-soft);
  border: 1px solid var(--border-soft);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== BUTTONS ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 180ms, box-shadow 180ms, background 180ms;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: 0.5; cursor: not-allowed; }

.button--primary {
  background: var(--gradient-main);
  color: var(--text-inverse);
  box-shadow: 0 10px 24px rgba(122, 71, 223, 0.20);
}

.button--primary:hover:not(:disabled) {
  box-shadow: 0 14px 32px rgba(122, 71, 223, 0.28);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-900);
  border-color: var(--border-soft);
}

.button--ghost:hover:not(:disabled) {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 1);
}

.button--sm {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.button--full { width: 100%; }

/* ===== FEEDBACK ===== */
.feedback {
  min-height: 1.6rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.feedback.is-error { color: var(--danger); }
.feedback.is-success { color: var(--success); }

/* ===== USAGE STATS ===== */
.usage-stats__header {
  margin-bottom: var(--space-2);
}

.usage-stats__header h2 {
  margin: 0;
  font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem);
}

.usage-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-1);
}

.usage-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.3rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform 200ms, box-shadow 200ms;
}

.usage-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.usage-card--highlight {
  background: linear-gradient(135deg, rgba(33, 14, 71, 0.96), rgba(122, 71, 223, 0.92));
  color: var(--text-inverse);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.usage-card--highlight .usage-card__icon {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-inverse);
}

.usage-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gradient-soft);
  color: var(--brand-700);
}

.usage-card strong {
  font-size: 1.6rem;
  line-height: 1;
}

.usage-card span {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.usage-card--highlight span {
  color: rgba(255, 255, 255, 0.78);
}

/* ===== EXAMPLES ===== */
.examples__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.example-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.example-card h3 { margin: 0; font-size: 1.05rem; }

.example-card p {
  margin: 0;
  line-height: 1.75;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.example-tag {
  display: inline-flex;
  width: fit-content;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(122, 71, 223, 0.07);
  color: var(--brand-700);
  font-weight: 700;
  font-size: 0.82rem;
}

.example-points {
  margin: 0;
  padding-inline-start: 1.1rem;
  color: var(--text-strong);
  line-height: 1.85;
  font-size: 0.92rem;
}

/* ===== RESULTS ===== */
.results__grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: var(--space-2);
}

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

.stat-box {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(122, 71, 223, 0.05);
  border: 1px solid var(--border-soft);
}

.stat-box span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stat-box strong { font-size: 1.15rem; }

.result-card--tips { min-height: 100%; }

.output-header { margin-bottom: 0.85rem; }
.output-header h3 { margin: 0; font-size: 1.05rem; }

.output-panel {
  margin: 0;
  min-height: 300px;
  max-height: 600px;
  overflow: auto;
  border-radius: var(--radius-md);
  padding: 1.1rem;
  background: #120a20;
  color: #f8f0ff;
  font-family: "IBM Plex Sans", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.result-notes { display: grid; gap: 0.75rem; }

.result-notes p {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(122, 71, 223, 0.05);
  border: 1px solid var(--border-soft);
  line-height: 1.75;
  font-size: 0.92rem;
}

/* ===== MODALS ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 8, 29, 0.55);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.modal-backdrop.is-hidden { display: none; }

.modal-card {
  width: min(100%, 560px);
  padding: var(--space-3);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border-soft);
  box-shadow: 0 24px 80px rgba(33, 14, 71, 0.22);
}

.modal-card--output { width: min(100%, 940px); }

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-inline-start: auto;
  border: 0;
  border-radius: 999px;
  background: rgba(122, 71, 223, 0.07);
  color: var(--brand-900);
  font-size: 1.3rem;
  transition: background 150ms;
}

.modal-close:hover { background: rgba(122, 71, 223, 0.14); }

.stack-lg { display: grid; gap: 1rem; }

/* ===== PHONE FIELD (INLINE COUNTRY PICKER) ===== */
.phone-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  overflow: visible;
  transition: border-color 200ms, box-shadow 200ms;
}

.phone-field:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(122, 71, 223, 0.10);
}

.phone-field__input {
  flex: 1;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.85rem 1rem;
  min-width: 0;
}

[dir="rtl"] .phone-field__input {
  border-right: 1px solid var(--border-soft) !important;
  border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
}

[dir="ltr"] .phone-field__input {
  border-left: 1px solid var(--border-soft) !important;
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

/* ===== COUNTRY PICKER ===== */
.country-picker {
  position: relative;
  flex-shrink: 0;
}

.country-picker__trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  padding: 0 0.85rem;
  background: transparent;
  border: 0;
  color: var(--text-strong);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms;
}

.country-picker__trigger:hover {
  background: rgba(122, 71, 223, 0.05);
}

.country-picker__flag { font-size: 1.3rem; line-height: 1; }
.country-picker__dial { font-size: 0.88rem; color: var(--text-muted); }
.country-picker__arrow { flex-shrink: 0; color: var(--text-muted); transition: transform 200ms; }
.country-picker__trigger[aria-expanded="true"] .country-picker__arrow { transform: rotate(180deg); }

.country-picker__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 100;
  width: 320px;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 16px 48px rgba(33, 14, 71, 0.18);
  overflow: hidden;
}

[dir="rtl"] .country-picker__dropdown { right: 0; }
[dir="ltr"] .country-picker__dropdown { left: 0; }

.country-picker__dropdown[hidden] { display: none; }

.country-picker__search {
  width: 100% !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border-soft) !important;
  border-radius: 0 !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.9rem !important;
  background: var(--surface-50) !important;
  box-shadow: none !important;
}

.country-picker__list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(122, 71, 223, 0.15) transparent;
}

.country-picker__list::-webkit-scrollbar { width: 5px; }
.country-picker__list::-webkit-scrollbar-thumb { background: rgba(122, 71, 223, 0.15); border-radius: 999px; }

.country-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  font-size: 0.88rem;
  text-align: start;
  cursor: pointer;
  transition: background 120ms;
}

.country-option:hover, .country-option.is-highlighted {
  background: rgba(122, 71, 223, 0.07);
}

.country-option.is-selected {
  background: rgba(122, 71, 223, 0.12);
  font-weight: 600;
}

.country-option__flag { font-size: 1.2rem; flex-shrink: 0; }
.country-option__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-option__dial { color: var(--text-muted); font-size: 0.82rem; flex-shrink: 0; }

/* ===== FOOTER ===== */
.site-footer {
  margin-top: var(--space-3);
  padding: var(--space-2) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

.site-footer p { margin: 0; line-height: 1.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1080px) {
  .hero,
  .composer__grid,
  .results__grid {
    grid-template-columns: 1fr;
  }

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

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

  .trust-banner {
    flex-direction: column;
    gap: 0;
    padding: var(--space-1) var(--space-2);
  }

  .trust-divider {
    width: 100%;
    height: 1px;
    margin: 0.4rem 0;
  }

  .trust-item {
    padding: 0.6rem 0.4rem;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: calc(100% - 1rem);
  }

  .topbar,
  .composer__header,
  .results__header,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .surface, .modal-card {
    padding: var(--space-2);
    border-radius: var(--radius-lg);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  textarea { min-height: 240px; }

  .country-picker__dropdown {
    width: calc(100vw - 3rem);
    max-width: 320px;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 1.1rem + 2vw, 2.2rem);
  }
}
