/* Index Optics website */
@font-face { font-family: 'Outfit'; font-weight: 300; font-display: swap; src: url('/assets/fonts/outfit-300.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 500; font-display: swap; src: url('/assets/fonts/outfit-500.woff2') format('woff2'); }

:root {
  --primary: #0e7490;
  --primary-dark: #0b5f76;
  --primary-soft: #e0f2f6;
  --ink: #12202b;
  --text: #2b3a47;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f4f7f9;
  --border: #e3e9ee;
  --whatsapp: #1fa855;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 60px rgba(14, 116, 144, 0.18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--ink); line-height: 1.3; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
img, video { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.center { text-align: center; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--primary); text-decoration: none; }
.wordmark { font-family: 'Outfit', 'Segoe UI', sans-serif; font-size: 1.45rem; line-height: 1; color: var(--ink); white-space: nowrap; }
.wm-index { font-weight: 500; }
.wm-optics { font-weight: 300; color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(14, 116, 144, 0.28); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-outline:hover { background: var(--primary-soft); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #188c46; }

/* Country suggestion bar */
.geo-banner { background: var(--ink); color: #fff; font-size: 0.95rem; }
.geo-inner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 0; flex-wrap: wrap; position: relative; padding-inline-end: 36px; }
.geo-banner a { color: #7dd8ec; font-weight: 600; }
.geo-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.25); }
.geo-close { position: absolute; inset-inline-end: 0; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.main-nav { display: flex; gap: 22px; margin-inline-start: auto; }
.main-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.main-nav a:hover { color: var(--primary); }
.topbar-tools { display: flex; align-items: center; gap: 10px; }
.lang-link { font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.lang-link:hover { background: var(--primary-soft); }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #d9f1f6 0%, transparent 60%), linear-gradient(180deg, #f7fbfc 0%, #fff 100%); padding: 56px 0 28px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.05rem); font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: 1.15rem; color: var(--text); max-width: 36em; }
.status-pill { display: inline-block; margin-bottom: 16px; padding: 5px 14px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; background: var(--primary-soft); color: var(--primary-dark); }
.status-soon { background: #fef3c7; color: #92400e; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.hero-link { font-weight: 600; text-decoration: none; }
.hero-shot { position: relative; border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--border); background: #fff; transform: perspective(1600px) rotateY(var(--tilt, -4deg)); }
[dir='ltr'] .hero-shot { --tilt: 4deg; }
.browser { display: flex; gap: 6px; padding: 10px 12px; background: #eef2f5; border-bottom: 1px solid var(--border); }
.browser span { width: 11px; height: 11px; border-radius: 50%; background: #d3dbe1; }
.browser span:first-child { background: #f87171; } .browser span:nth-child(2) { background: #fbbf24; } .browser span:nth-child(3) { background: #34d399; }
.strip { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; padding: 40px 0 10px; margin-block: 0; }
.strip li { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.strip svg, .plan-points svg, .yes svg { color: var(--primary); flex: none; }

/* Coming soon */
.soon-box { margin-block: 32px 0; padding: 28px; border-radius: var(--radius); background: #fffbeb; border: 1px solid #fde68a; text-align: center; }
.soon-box p { max-width: 46em; margin-inline: auto; }

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: transform 0.15s; }
.feature:hover { transform: translateY(-3px); }
.feature h3 { font-size: 1.12rem; margin-top: 14px; }
.feature p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.feature-highlight { border-color: #a5dcea; background: linear-gradient(180deg, #f2fafc, #fff); }

/* Screens */
.shot-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; }
.shot-tab { font: inherit; font-size: 0.95rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; }
.shot-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.shot-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: #fff; max-width: 1100px; margin: 0 auto; }
.shot { display: none; }
.shot.active { display: block; }
.video { max-width: 900px; margin: 56px auto 0; text-align: center; }
.video video { width: 100%; border-radius: 14px; box-shadow: var(--shadow); background: #000; }

/* Options */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 30px 26px; box-shadow: var(--shadow); }
.plan-featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.plan-badge { position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(50%); background: var(--primary); color: #fff; font-size: 0.85rem; font-weight: 600; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
[dir='ltr'] .plan-badge { transform: translateX(-50%); }
.plan h3 { font-size: 1.4rem; margin-bottom: 4px; }
.plan-tagline { color: var(--muted); min-height: 3.2em; }
.plan-price { padding: 14px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.plan-price strong { font-size: 2rem; color: var(--ink); }
.plan-price strong.ask { font-size: 1.25rem; color: var(--primary); }
.plan-price small { display: block; color: var(--muted); }
.plan-points { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-points li { display: flex; gap: 10px; align-items: flex-start; }
.plan-points svg { margin-top: 5px; }
.plan .btn { width: 100%; }
.compare { margin-top: 56px; }
.compare h3 { text-align: center; }
.table-scroll { overflow-x: auto; }
.compare table { width: 100%; max-width: 900px; margin: 0 auto; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.compare th, .compare td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: center; }
.compare thead th { background: var(--bg-alt); color: var(--ink); }
.compare tbody th { text-align: start; font-weight: 500; }
.compare .no { color: #b6c0c9; }
.compare .partial { color: var(--muted); font-size: 0.9rem; }
.compare .yes { display: inline-flex; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps p { color: var(--muted); margin: 0; }

/* FAQ */
.faq { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; background: #fff; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--primary); }
.faq[open] summary::after { content: '−'; }
.faq p { padding: 0 22px 18px; margin: 0; color: var(--text); }

/* Contact */
.contact { background: linear-gradient(135deg, #0e7490, #0b4f63); color: #e7f6fa; }
.contact h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.contact .muted { color: #b9dfe8; }
.contact-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 24px; }
.contact-card { display: flex; flex-direction: column; gap: 2px; min-width: 240px; padding: 18px 24px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; text-decoration: none; }
.contact-card:hover { background: rgba(255, 255, 255, 0.18); }
.payments { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.payments span { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 0.9rem; }

/* Legal */
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.2rem; margin-top: 28px; }
.draft { padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #92400e; }

/* Footer */
.site-footer { background: #0c1a22; color: #b8c4cc; padding: 56px 0 24px; font-size: 0.95rem; }
.site-footer .wordmark { color: #fff; }
.site-footer .wm-optics { color: #7dd8ec; }
.site-footer .brand { color: #22a5c4; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 2fr 1fr; gap: 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: #b8c4cc; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1f3340; margin-top: 32px; padding-top: 18px; color: #7c8b95; }

/* Phones and tablets */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .topbar-tools { margin-inline-start: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-shot { transform: none; }
  .plans, .steps { grid-template-columns: 1fr; }
  .plan-tagline { min-height: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wordmark { font-size: 1.2rem; }
  .brand svg { width: 30px; height: 30px; }
  .topbar-inner { gap: 10px; }
  .hero-ctas .btn { width: 100%; }
  .compare th, .compare td { padding: 10px 8px; font-size: 0.9rem; }
}

/* Saudi riyal sign, left of the number */
.riyal-sign { display: inline-block; height: 0.8em; width: auto; vertical-align: -0.05em; fill: currentColor; }
.amount { white-space: nowrap; unicode-bidi: isolate; }

/* Plan prices on the home page: lifetime and yearly */
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.price-row > span { color: var(--muted); font-size: 0.95rem; }
.price-row strong { font-size: 1.45rem; }

/* Order page: sign up → subscription → download */
.order-section { background: var(--bg-alt); min-height: 70vh; }
.order { max-width: 760px; }
.back-link { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }
.order h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.progress { list-style: none; display: flex; gap: 8px; padding: 0; margin: 18px 0 22px; }
.progress li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.progress li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-alt); font-size: 0.85rem; flex: none; }
.progress li.current { border-color: var(--primary); color: var(--primary); }
.progress li.current span { background: var(--primary); color: #fff; }
.progress li.done { color: var(--ink); }
.progress li.done span { background: var(--primary-soft); color: var(--primary); }
.order-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.order-card h2 { font-size: 1.35rem; }
.plan-pick { border: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.plan-pick legend { font-weight: 600; color: var(--ink); margin-bottom: 8px; padding: 0; }
.plan-chip { cursor: pointer; }
.plan-chip input { position: absolute; opacity: 0; pointer-events: none; }
.plan-chip span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--border); font-weight: 600; }
.plan-chip input:checked + span { border-color: var(--primary); background: var(--primary); color: #fff; }
.plan-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select { font: inherit; font-weight: 400; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-error { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: #fdeee6; color: #c2410c; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.billing { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.billing-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 16px; border: 2px solid var(--border); cursor: pointer; }
.billing-card input { position: absolute; opacity: 0; pointer-events: none; }
.billing-card:has(input:checked) { border-color: var(--primary); background: #f2fafc; box-shadow: var(--shadow); }
.billing-name { font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.billing-text { color: var(--muted); }
.billing-price { margin-top: 8px; }
.billing-price strong { font-size: 1.7rem; color: var(--ink); }
.billing-price small { display: block; color: var(--muted); }
.billing-price em { font-style: normal; color: var(--primary); font-weight: 600; }
.vat-note { margin: 10px 0 0; }
.small { font-size: 0.9rem; }
.done-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); margin-bottom: 8px; }
.done-icon svg { width: 30px; height: 30px; }
.summary { margin: 18px 0 0; padding: 16px 18px; border-radius: 14px; background: var(--bg-alt); }
.summary h3 { font-size: 1rem; margin-bottom: 8px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.summary div:last-child { border-bottom: none; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; color: var(--ink); }
.done-actions { justify-content: flex-start; }
.notice-pill { display: inline-block; padding: 12px 18px; border-radius: 12px; background: #fef3c7; color: #92400e; font-weight: 600; }
@media (max-width: 640px) {
  .fields, .billing { grid-template-columns: 1fr; }
  .order-card { padding: 20px; }
  .progress li { flex-direction: column; text-align: center; font-size: 0.82rem; padding: 8px 4px; }
  .step-actions .btn { flex: 1; }
}

/* "My account" and the owner's page */
.account-link { font-weight: 600; text-decoration: none; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--primary); color: var(--primary); white-space: nowrap; }
.account-link:hover { background: var(--primary-soft); }
.login-card { max-width: 460px; margin: 0 auto; }
.fields.one { grid-template-columns: 1fr; }
.center { text-align: center; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.account-head h2 { margin: 0; }
#account .order-card + .order-card, #account .account-head + .order-card { margin-top: 16px; }
.order-card h3 { font-size: 1.15rem; }
.order-card h4 { margin: 20px 0 8px; font-size: 1rem; }
.status-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; background: var(--bg-alt); }
.status-badge.ok { background: #e5f6eb; color: #15803d; }
.status-badge.warn { background: #fef3c7; color: #92400e; }
.status-badge.bad { background: #fdeee6; color: #c2410c; }
.account-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #fffbeb; color: #78350f; }
.activate-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.activate-row .field { flex: 1; min-width: 220px; }
.activate-row input { letter-spacing: 0.06em; text-transform: uppercase; }
.key-box { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 16px; border-radius: 14px; border: 2px solid var(--primary); background: #f2fafc; }
.key-box code, .devices code { font-size: 0.95rem; word-break: break-all; user-select: all; color: var(--ink); }
.key-box .btn { align-self: flex-start; }
.devices { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.devices li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); }
.devices li code { grid-column: 1 / -1; grid-row: 2; }
.devices .device { font-weight: 700; font-family: ui-monospace, Consolas, monospace; }
.devices .copy { grid-column: 3; grid-row: 1; padding: 6px 12px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-tabs button { font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; cursor: pointer; }
.admin-tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.admin-search { width: 100%; font: inherit; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 12px; }
.admin-table { overflow-x: auto; background: #fff; border-radius: 16px; border: 1px solid var(--border); }
.admin-table table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: middle; }
.admin-table th { background: var(--bg-alt); white-space: nowrap; }
.admin-table tr.open td { background: #f2fafc; }
.small-btn { padding: 6px 12px; font-size: 0.9rem; }
.admin-edit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 8px 0; }
.admin-edit .wide { grid-column: 1 / -1; }
.order:has(#admin) { max-width: 1200px; }
@media (max-width: 640px) {
  .admin-edit { grid-template-columns: 1fr; }
  .account-link { padding: 6px 10px; font-size: 0.9rem; }
}

/* What each subscription includes */
.billing-points { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 6px; color: var(--text); font-size: 0.95rem; }
.billing-points li { display: flex; gap: 8px; align-items: flex-start; }
.billing-points svg { color: var(--primary); flex: none; margin-top: 4px; width: 16px; height: 16px; }
.billing-terms { margin-top: 32px; padding: 24px; border-radius: 20px; background: var(--bg-alt); }
.billing-terms h3 { text-align: center; }
.billing-terms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.billing-terms-grid > div { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.billing-terms h4 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.billing-terms h4 .amount { font-size: 1.15rem; }
@media (max-width: 640px) { .billing-terms-grid { grid-template-columns: 1fr; } }
.billing-card[hidden] { display: none; }
.billing:has(.billing-card[hidden]) { grid-template-columns: 1fr; max-width: 420px; }

/* Owner page: visits */
.periods button { padding: 6px 14px; font-size: 0.9rem; }
.visit-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 18px; }
.visit-stats > div { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.visit-stats span { color: var(--muted); font-size: 0.92rem; }
.visit-stats strong { font-size: 1.8rem; color: var(--ink); }
.visit-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 16px; direction: ltr; }
.visit-chart .bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.visit-chart .bar span { display: block; width: 100%; min-height: 2px; background: var(--primary); border-radius: 4px 4px 0 0; }
.visit-chart .bar:hover span { background: var(--primary-dark); }
.chart-range { text-align: center; margin: 6px 0 18px; direction: ltr; }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.visit-grid .wide { grid-column: 1 / -1; }
.visit-grid h3 { font-size: 1.05rem; margin-bottom: 8px; }
@media (max-width: 760px) {
  .visit-stats { grid-template-columns: 1fr 1fr; }
  .visit-grid { grid-template-columns: 1fr; }
}

/* Owner page: payments */
.pay-form { margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pay-form h4 { margin: 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.payments-list li { grid-template-columns: auto 1fr auto; }
.money-big { font-size: 1.35rem !important; line-height: 1.4; }
button.link { background: none; border: none; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-align: start; }
button.link:hover { text-decoration: underline; }
.plans.plans-one { grid-template-columns: minmax(0, 460px); justify-content: center; }

/* A done message (password link sent, password changed) */
.form-ok { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: #e5f6eb; color: #15803d; }

/* Phones: the top bar fits the screen (logo icon, country, My account, language) without sideways scrolling */
@media (max-width: 520px) {
  .topbar .wordmark { display: none; }
  .topbar-tools { gap: 6px; }
  .lang-link { padding: 6px 8px; }
}
/* The comparison table scrolls inside its box on a narrow screen (not the page) */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Form fields never wider than their column */
.fields > *, .field input, .field select { min-width: 0; }
.field input, .field select { width: 100%; }
/* The smallest phones (320px) */
@media (max-width: 360px) {
  .account-link { padding: 5px 8px; font-size: 0.85rem; }
  .lang-link { padding: 5px 4px; font-size: 0.85rem; }
}

/* Flags (assets/flags) */
.flag { display: inline-block; width: 20px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12); object-fit: cover; flex: none; vertical-align: -2px; }
.flag.globe { width: 18px; height: 18px; box-shadow: none; border-radius: 0; color: var(--muted); }
.with-flag { display: inline-flex; align-items: center; gap: 8px; }

/* The country menu: flag + name */
.country-picker { position: relative; }
.country-picker summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; background: #fff; color: var(--ink); font-size: 0.95rem; white-space: nowrap; user-select: none; }
.country-picker summary::-webkit-details-marker { display: none; }
.country-picker summary:hover, .country-picker[open] summary { border-color: var(--primary); }
.country-picker summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cp-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.cp-caret { color: var(--muted); transition: transform 0.15s; }
.country-picker[open] .cp-caret { transform: rotate(180deg); }
.country-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; max-height: min(70vh, 480px); overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.country-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.country-menu a:hover, .country-menu a:focus-visible { background: var(--primary-soft); outline: none; }
.country-menu a[aria-current="page"] { background: var(--primary-soft); font-weight: 600; }
.country-menu em { margin-inline-start: auto; font-style: normal; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 520px) {
  .cp-name { max-width: 90px; }
  .country-picker summary { padding: 6px 8px; gap: 6px; }
}
@media (max-width: 360px) {
  .cp-name { display: none; }
}
/* Phones: the flag alone in the top bar; the menu across the screen */
@media (max-width: 520px) {
  .cp-name { display: none; }
  .country-menu { position: fixed; inset-inline: 12px; top: 64px; min-width: 0; max-height: calc(100vh - 80px); }
}
