/*
 * The app's design tokens (frontend/styles/theme.js) as CSS: one steady blue
 * for actions and links, green only for money saved, thin borders rather than
 * heavy shadows. Logical properties throughout, so Arabic pages mirror
 * without a second stylesheet.
 */
:root {
	--brand: #1D4ED8;
	--brand-pressed: #1E40AF;
	--brand-soft: #EEF3FE;
	--brand-border: #C9D7FB;
	--ink: #0B1426;
	--text: #1E293B;
	--text-soft: #3B4A61;
	--muted: #5B6A82;
	--faint: #8E9AAE;
	--line: #E4E9F0;
	--line-strong: #CDD6E2;
	--page: #F5F7FA;
	--surface: #FFFFFF;
	--surface-muted: #F7F9FC;
	--success: #0B7A55;
	--success-soft: #EAF7F1;
	--success-border: #BFE5D3;
	--warning: #94580A;
	--warning-soft: #FFF7E8;
	--warning-border: #F2DBAE;
	--danger: #B42318;
	--danger-soft: #FEF2F1;
	--danger-border: #F6CBC6;
	/* Stripe's own purple, for its mark on the checkout and nothing else of ours. */
	--stripe: #635BFF;
	--stripe-soft: #F1F0FF;
	--radius-sm: 8px;
	--radius-md: 10px;
	--radius-lg: 14px;
	--radius-xl: 18px;
	--shadow-card: 0 1px 2px rgba(11, 20, 38, 0.05);
	--shadow-raised: 0 12px 32px rgba(11, 20, 38, 0.16);
	--content: 1200px;
	--reading: 760px;
	--gutter: 16px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text-soft);
	background: var(--surface);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-pressed); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.75rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.25em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: var(--radius-sm); }
.skip-link:focus { top: 8px; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.wrap { max-width: var(--content); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-reading { max-width: calc(var(--reading) + 2 * var(--gutter)); }

/* ------------------------------------------------------------------ buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
	min-height: 40px; padding: 8px 16px;
	font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
	border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-pressed); color: #fff; }
.btn-quiet { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-border); }
.btn-quiet:hover { background: #E2EAFD; color: var(--brand-pressed); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line-strong); }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* ------------------------------------------------------------------ masthead */
.masthead { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.masthead-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-name { font-weight: 600; }
.brand-name b { color: var(--brand); font-weight: 700; }
.primary-nav { display: none; gap: 4px; margin-inline-start: 8px; }
.primary-nav a { padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; font-size: 0.9375rem; text-decoration: none; }
.primary-nav a:hover { background: var(--surface-muted); color: var(--ink); }
.masthead-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.my-esims-link { display: none; }

.menu { position: relative; }
.menu > summary {
	list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px;
	border: 1px solid var(--line-strong); border-radius: var(--radius-md); cursor: pointer; font-weight: 600; font-size: 0.875rem; color: var(--text); background: var(--surface);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: 7px; height: 7px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.menu-label { display: none; }
.menu-list {
	position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px; margin: 0; padding: 6px; list-style: none;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised);
}
.menu-list a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: 0.9375rem; }
.menu-list a:hover, .menu-list a[aria-current="true"] { background: var(--brand-soft); color: var(--brand); }

@media (min-width: 640px) {
	.menu-label { display: inline; }
	.my-esims-link { display: inline-flex; }
}
@media (min-width: 960px) {
	.primary-nav { display: flex; }
	.nav-menu { display: none; }
}

/* ------------------------------------------------------------------ promo */
.promo { background: var(--ink); color: #E4E9F0; font-size: 0.875rem; }
.promo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-block: 8px; }
.promo p { margin: 0; }
.promo-kicker { color: #FFD580; letter-spacing: 0.06em; margin-inline-end: 6px; }
.promo-body { color: #AEB9CB; }
.promo-clock { display: flex; gap: 10px; font-variant-numeric: tabular-nums; font-size: 0.75rem; color: #AEB9CB; text-transform: uppercase; letter-spacing: 0.04em; }
.promo-clock b { color: #fff; font-size: 0.9375rem; margin-inline-end: 2px; }

/* ------------------------------------------------------------------ hero */
.hero { padding-block: 28px 40px; border-bottom: 1px solid var(--line); }
.hero-home { background: linear-gradient(180deg, var(--brand-soft) 0%, var(--surface) 100%); padding-block: 48px 56px; }
.hero-destination { background: linear-gradient(180deg, var(--surface-muted) 0%, var(--surface) 100%); }
.hero-plain { background: var(--surface-muted); }
.hero .lead { font-size: 1.125rem; color: var(--text-soft); max-width: 60ch; }
.hero-grid, .hero-home-grid { display: grid; gap: 28px; align-items: start; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hero-flag { font-size: 1.25rem; }
@media (min-width: 900px) {
	.hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
	.hero-home-grid { grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr); align-items: center; }
}

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.fact { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.fact dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 2px 0 0; color: var(--ink); font-weight: 600; }
.fact dd.price { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.fact dd.small { font-weight: 500; color: var(--text-soft); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.stats > div { padding: 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stats dt { order: 2; font-size: 0.8125rem; color: var(--muted); }
.stats dd { margin: 0; font-size: 1.75rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats > div { display: flex; flex-direction: column-reverse; }
/* the company card under the counts: the same tile, with the app's card inside */
.hero-side { display: grid; gap: 10px; }
.company-card { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); font-size: 0.875rem; }
.company-title { margin: 0 0 2px; font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.company-name { margin: 0 0 8px; font-size: 1.0625rem; font-weight: 700; color: var(--ink); }
.company-card address { display: grid; gap: 4px; margin: 0; font-style: normal; color: var(--text-soft); }
.company-line { display: flex; align-items: flex-start; gap: 8px; }
.company-line .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.company-mail { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 600; text-decoration: none; }
.company-mail .icon { color: currentColor; }
.company-mail:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ search */
.search-title { font-size: 1rem; margin-top: 20px; }
.search { position: relative; max-width: 560px; }
.search-row, .filter { display: flex; gap: 8px; }
.filter { max-width: 560px; flex-direction: column; }
.search input, .filter input {
	flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--ink);
	background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
}
.search input:focus, .filter input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-results {
	position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 40; max-height: 360px; overflow: auto; margin: 0; padding: 6px; list-style: none;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised);
}
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results [aria-selected="true"] a { background: var(--brand-soft); color: var(--brand); }
.search-results .result-price { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.search-empty { margin: 8px 2px 0; color: var(--muted); }

/* ------------------------------------------------------------------ sections */
.section { padding-block: 44px; }
.section + .section { border-top: 1px solid var(--line); }
.section-tint { background: var(--surface-muted); }
.section-lead { color: var(--text-soft); max-width: 70ch; margin-top: -0.25em; }
.section-more { margin-top: 20px; }
.footnote { font-size: 0.875rem; color: var(--muted); margin-top: 12px; }

.breadcrumbs { font-size: 0.875rem; margin-bottom: 18px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: 4px; color: var(--faint); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text); }

/* ------------------------------------------------------------------ destination cards */
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.dest-grid-compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.dest-card {
	display: grid; grid-template-columns: auto 1fr; grid-template-areas: "flag name" "flag price"; column-gap: 10px; align-items: center;
	min-height: 64px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card); color: var(--ink); text-decoration: none;
}
.dest-card:not(:has(.dest-flag)) { grid-template-areas: "name" "price"; grid-template-columns: 1fr; }
.dest-card:hover { border-color: var(--brand-border); background: var(--brand-soft); color: var(--ink); }
.dest-flag { grid-area: flag; font-size: 1.6rem; line-height: 1; }
.dest-name { grid-area: name; font-weight: 600; line-height: 1.3; }
.dest-price { grid-area: price; font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dest-grid [hidden] { display: none; }

/* ------------------------------------------------------------------ plan and comparison tables */
.plan-group { margin-bottom: 28px; }
.table-scroll { overflow-x: auto; }
table.plans, table.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
table.plans th, table.plans td, table.compare th, table.compare td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.plans tbody tr:last-child > *, table.compare tbody tr:last-child > * { border-bottom: 0; }
table.plans thead th, table.compare thead th { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface-muted); }
table.plans tbody th { font-weight: 600; color: var(--ink); }
table.plans tbody tr:target { background: var(--brand-soft); }
@media (min-width: 640px) {
	table.plans { table-layout: fixed; }
	table.plans thead th:nth-child(1) { width: 40%; }
	table.plans thead th:nth-child(2) { width: 20%; }
	table.plans thead th:nth-child(3), table.plans thead th:nth-child(4) { width: 15%; }
	table.plans thead th:nth-child(5) { width: 10%; }
}
.num { text-align: end !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price { color: var(--ink); font-weight: 700; }
.buy-cell { text-align: end; width: 1%; }
.plan-data { margin-inline-end: 6px; }
table.compare caption { caption-side: top; text-align: start; padding: 0 0 8px; font-weight: 600; color: var(--ink); }
table.compare tr.is-ours th { color: var(--brand); }
table.compare tr.is-cheapest td.price { color: var(--success); }
.compare-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .compare-grid { grid-template-columns: 1fr 1fr; } }

@media (max-width: 639px) {
	table.plans thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	table.plans, table.plans tbody, table.plans tr, table.plans th, table.plans td { display: block; width: auto; }
	table.plans { border: 0; background: none; overflow: visible; }
	table.plans tbody tr {
		display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; margin-bottom: 10px;
		background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
	}
	table.plans tbody tr > * { padding: 0; border: 0; }
	table.plans tbody th { grid-column: 1; }
	table.plans td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 500; }
	table.plans td.num { text-align: start !important; }
	table.plans td.price { grid-column: 2; grid-row: 1; font-size: 1.125rem; }
	table.plans td.price::before { content: none; }
	table.plans td.buy-cell { grid-column: 2; grid-row: 2 / span 2; align-self: end; width: auto; }
}

.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.chip { display: inline-block; padding: 1px 8px; font-size: 0.75rem; font-weight: 600; line-height: 1.6; color: var(--text-soft); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.chip-brand { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-border); }
.chip-success { color: var(--success); background: var(--success-soft); border-color: var(--success-border); }
.chip-warning { color: var(--warning); background: var(--warning-soft); border-color: var(--warning-border); }
/* a label that explains itself on tap: a button opening .tag-tip, marked with a small "i" */
.chip-button { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; font-family: inherit; color: var(--brand); background: var(--brand-soft); border-color: var(--brand-border); cursor: pointer; }
.chip-button::after { content: "i"; display: inline-grid; place-items: center; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 9px; font-weight: 700; line-height: 1; }
.chip-button:hover { background: var(--brand-border); }

.tag-legend { display: grid; gap: 10px; max-width: var(--reading); margin: 14px 0 0; font-size: 0.875rem; }
.tag-legend dt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tag-legend dd { margin: 2px 0 0; color: var(--text-soft); }
.tag-code { font-size: 0.75rem; color: var(--muted); }

/* The popover a label opens, as a card along the bottom of the screen: within
   thumb reach on a phone, and never cut off by the table's scrolling box. A
   browser without popovers drops the :popover-open rule and keeps it hidden. */
.tag-tip { display: none; }
.tag-tip:popover-open {
	display: block; position: fixed; inset: auto 16px max(16px, env(safe-area-inset-bottom)); width: auto; max-width: 440px; height: auto; margin: 0 auto;
	padding: 16px 18px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised);
	font-size: 0.9375rem;
}
.tag-tip p { margin: 0 0 12px; }
.tag-tip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tag-tip-close { display: flex; margin-inline-start: auto; }

/* ------------------------------------------------------------------ bundles, networks */
.bundle { padding: 20px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.bundle h3 { margin-bottom: 4px; }
.bundle-countries { margin: 8px 0 16px; }
.bundle-countries > summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.inline-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 0; list-style: none; }
.bundle-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bundle-links li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.network-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.network-list li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.network-name { font-weight: 600; color: var(--ink); }

/* ------------------------------------------------------------------ steps, cards, notes, faq */
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding: 18px 18px 18px 18px; padding-top: 56px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); counter-increment: step; }
.step::before { content: counter(step); position: absolute; top: 16px; inset-inline-start: 18px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.step h3 { font-size: 1rem; }
.step p { margin: 0; font-size: 0.9375rem; }

.cards-3 { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card p:last-child { margin-bottom: 0; }


.note { margin-block: 16px; padding: 16px 18px; background: var(--brand-soft); border: 1px solid var(--brand-border); border-inline-start: 4px solid var(--brand); border-radius: var(--radius-md); }
.note h3 { font-size: 1rem; }
.note p:last-child { margin-bottom: 0; }
.two-col { display: grid; gap: 16px; margin-top: 20px; }
.two-col .note { margin: 0; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

.faq { display: grid; gap: 8px; max-width: var(--reading); }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.faq-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.faq-item > summary::after { content: "+"; flex: none; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq-item[open] > summary::after { content: "\2212"; }
.faq-answer { padding: 0 18px 16px; }
.faq-answer > :last-child { margin-bottom: 0; }

.prose { padding-block: 32px 48px; }
.prose h2 { margin-top: 1.6em; font-size: 1.375rem; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 0.35em; }

/* ------------------------------------------------------------------ forms (sign-in, checkout) */
.panel { max-width: 560px; margin: 32px auto 56px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.panel h1 { font-size: 1.6rem; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; color: var(--text); font-size: 0.9375rem; }
.field input, .field select {
	min-height: 46px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface);
	border: 1px solid var(--line-strong); border-radius: var(--radius-md);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field .hint { font-size: 0.8125rem; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.alert { padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-md); border: 1px solid; }
.alert-error { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.alert-success { color: var(--success); background: var(--success-soft); border-color: var(--success-border); }
.alert-info { color: var(--text); background: var(--brand-soft); border-color: var(--brand-border); }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 0.875rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Continue with Google: Google's sign-in script draws the button itself
   (app.js); the page only gives it a centred slot of the form's width. */
.google-button { display: flex; justify-content: center; min-height: 44px; }
/* Said when Google's sign-in window did not open: as the terms reminder, under the button. */
.google-popup-blocked { display: flex; align-items: flex-start; gap: 6px; max-width: 400px; margin: 8px auto 0; font-size: 0.875rem; line-height: 1.45; color: var(--warning); text-align: start; }
.google-popup-blocked[hidden] { display: none; }
.google-popup-blocked .icon { width: 16px; height: 16px; margin-top: 2px; }
.order-summary { display: grid; gap: 8px; margin: 0 0 18px; padding: 16px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.order-summary div { display: flex; justify-content: space-between; gap: 12px; }
.order-summary dt { color: var(--muted); }
.order-summary dd { margin: 0; color: var(--ink); font-weight: 600; text-align: end; }
.assurance { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--muted); }
.esim-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.esim-card { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.esim-card h2 { font-size: 1.0625rem; margin-bottom: 4px; }
.esim-card .install { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.bundle-links li .btn { margin-inline-start: auto; }
.qr { display: block; width: 220px; height: 220px; margin: 12px 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-state]:not([data-state-visible]) { display: none; }

.icon { width: 18px; height: 18px; flex: none; }
[dir="rtl"] .icon-arrow { transform: scaleX(-1); }

/* The terms confirmation: the app's muted row, a full-size box in the brand
   colour beside the sentence's first line, the sentence in normal weight. */
.consent { margin: 4px 0 16px; }
.consent-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-soft); background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; }
.consent-row input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); cursor: pointer; }
/* One focus ring, around the whole row; a browser without :has() keeps the box's own. */
@supports selector(:has(*)) {
	.consent-row:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
	.consent-row input:focus-visible { outline: none; }
}
.consent-text a { font-weight: 500; }
.consent.is-missing .consent-row { background: var(--warning-soft); border-color: var(--warning-border); }
.consent-missing { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; font-size: 0.875rem; line-height: 1.4; color: var(--warning); }
.consent-missing[hidden] { display: none; }
.consent-missing .icon { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ checkout
   As the app's order summary: the plan; a confirmation card holding the pay
   button; the app's PurchaseAssurance card with Stripe's mark. Side by side
   from tablet width, the button in view beside the facts. */
.checkout { max-width: 980px; margin: 32px auto 56px; }
.checkout-head { margin-bottom: 20px; }
.checkout-head h1 { font-size: clamp(1.6rem, 1.4rem + 1vw, 2rem); margin-bottom: 4px; }
.checkout-head p { margin: 0; }
.checkout-status { display: flex; align-items: center; gap: 12px; }
.checkout-status p { margin: 0; }
.checkout-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 860px) { .checkout-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; } }
.checkout-side { display: grid; gap: 16px; min-width: 0; }
.checkout-card { min-width: 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.overline { margin: 0 0 4px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.order-plan { margin: 0 0 14px; font-size: 1.25rem; }
.order-facts { display: grid; gap: 10px; margin: 0; padding-block: 14px; border-block: 1px solid var(--line); }
.order-facts div { display: flex; justify-content: space-between; gap: 12px; }
.order-facts dt { color: var(--muted); }
.order-facts dd { margin: 0; color: var(--ink); font-weight: 600; text-align: end; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding-top: 14px; color: var(--ink); font-weight: 600; }
.order-total strong { font-size: 1.625rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 1rem; }
.card-title .icon { color: var(--brand); }
.btn-pay { width: 100%; min-height: 52px; gap: 10px; padding: 12px 16px; font-size: 1rem; white-space: normal; }
.btn-pay-price { padding: 2px 8px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.18); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); text-align: center; }
.pay-note .icon { width: 14px; height: 14px; }
.assurance-card { display: grid; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.assurance-row { display: flex; align-items: flex-start; gap: 12px; }
.assurance-row + .assurance-row { padding-top: 14px; border-top: 1px solid var(--line); }
.assurance-row h3 { margin: 0; font-size: 0.875rem; line-height: 1.45; }
.assurance-row p { margin: 2px 0 0; font-size: 0.8125rem; line-height: 1.5; color: var(--text-soft); }
.assurance-icon { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 999px; }
.assurance-icon .icon { width: 17px; height: 17px; }
.assurance-icon-guarantee { color: var(--success); background: var(--success-soft); }
.assurance-icon-stripe { color: var(--stripe); background: var(--stripe-soft); }
/* Stripe's English lockup reads left to right on Arabic pages too, as Stripe's own badge does. */
.powered-by-stripe { direction: ltr; unicode-bidi: isolate; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 3px 8px; font-size: 0.6875rem; font-weight: 600; line-height: 1.3; color: var(--text-soft); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.stripe-wordmark { display: block; }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: 0; background: var(--ink); color: #AEB9CB; font-size: 0.9375rem; }
.site-footer a { color: #E4E9F0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; padding-block: 44px 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-heading { font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.brand-small { color: #fff; margin-bottom: 10px; }
.brand-small:hover { color: #fff; }
.site-footer .brand-name b { color: #8FB0FF; }
.footer-small { font-size: 0.8125rem; color: #8E9AAE; }
.footer-base { padding-block: 16px 28px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.8125rem; }
.footer-base p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
	.masthead, .site-footer, .btn-buy, .promo { display: none !important; }
}
