:root {
  --ink: #0f1a33;
  --muted: #596a86;
  --line: #d9e1ec;
  --surface: #ffffff;
  --canvas: #f3f7fb;
  --primary: #2864dc;
  --primary-dark: #1749ac;
  --accent: #8b5cf6;
  --success: #13795b;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(31, 58, 96, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: linear-gradient(145deg, #f8fbff 0%, #edf3fa 100%); min-height: 100vh; }
a { color: var(--primary); }
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 38px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 38px; }
.brand { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.eyebrow { color: var(--primary); font-weight: 800; letter-spacing: .15em; font-size: .77rem; text-transform: uppercase; }
.brand-title { font-weight: 800; font-size: 1.2rem; }
.support-link { text-decoration: none; font-weight: 700; }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 32px; align-items: end; margin: 26px 0 30px; }
.hero h1, .setup-intro h1, .admin-heading h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1.02; margin: 12px 0 16px; letter-spacing: -.045em; }
.hero p, .setup-intro p { color: var(--muted); font-size: 1.08rem; line-height: 1.7; max-width: 750px; }
.trust-panel { background: #e9f1ff; border: 1px solid #cbdcff; border-radius: 20px; padding: 22px; display: grid; gap: 8px; line-height: 1.5; }
.trust-panel span { color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 24px; }
.option-card.featured { border: 2px solid #99baff; transform: translateY(-6px); }
.option-heading { margin-bottom: 24px; }
.option-heading h2, .card h2 { margin: 10px 0 8px; font-size: 1.55rem; }
.option-heading p, .card p { color: var(--muted); line-height: 1.55; }
.pill, .status-badge { display: inline-flex; border-radius: 999px; background: #e9f1ff; color: var(--primary); font-weight: 800; font-size: .75rem; letter-spacing: .1em; padding: 7px 11px; }
.pill-accent { background: #f1eaff; color: #6d3bd6; }
.price { font-size: 2rem !important; color: var(--ink) !important; font-weight: 800; margin: 8px 0 !important; }
.stacked-form { display: grid; gap: 9px; }
label { font-weight: 750; font-size: .92rem; margin-top: 7px; }
input, select, textarea { width: 100%; border: 1px solid #b9c6d9; border-radius: 12px; padding: 12px 13px; font: inherit; color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(40, 100, 220, .18); border-color: var(--primary); }
.machine-code, code, .token-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--muted); line-height: 1.45; }
.check-row input { width: auto; margin-top: 3px; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; padding: 12px 18px; text-decoration: none; font: inherit; font-weight: 800; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--primary); }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { color: var(--primary); background: #eaf1ff; }
.button-full { width: 100%; margin-top: 12px; }
.button-large { width: 100%; padding: 16px 22px; font-size: 1.05rem; margin-bottom: 30px; }
.button-row, .admin-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.fine-print { font-size: .82rem; color: var(--muted); }
.centered, .center-link { text-align: center; }
.alert { border-radius: 15px; padding: 14px 16px; margin: 16px 0 24px; line-height: 1.5; }
.alert-info { background: #eaf2ff; border: 1px solid #c7dbff; color: #244779; }
.alert-error { background: #fff0ef; border: 1px solid #ffc9c4; color: var(--danger); }
.alert-success { background: #eaf8f2; border: 1px solid #b8e4d3; color: var(--success); }
.lookup-strip { display: grid; grid-template-columns: .9fr 1.4fr; gap: 28px; align-items: center; margin-top: 26px; }
.lookup-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; }
.result-card { max-width: 860px; margin: 60px auto 24px; }
.result-card h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 14px 0; }
.result-line { margin: 5px 0 !important; }
.token-box { min-height: 170px; resize: vertical; line-height: 1.45; background: #f7f9fc; word-break: break-all; }
.footer { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .85rem; padding: 28px 4px 0; }
.footer-links { display: flex; gap: 16px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.card-narrow { max-width: 540px; margin: 70px auto; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.admin-heading h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid > div { display: grid; gap: 7px; align-content: start; }
.form-grid .span-2 { grid-column: span 2; }
.form-action { align-self: end; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 820px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .86rem; }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.table-status { display: inline-flex; background: #eef3fa; padding: 5px 8px; border-radius: 999px; font-weight: 700; }
.setup-intro { margin: 30px 0; max-width: 900px; }
.setup-intro h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.setup-form { max-width: 980px; margin: 0 auto; }
@media (max-width: 850px) {
  .hero, .choice-grid, .lookup-strip { grid-template-columns: 1fr; }
  .option-card.featured { transform: none; }
  .lookup-form { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 1160px); padding-top: 16px; }
  .card { padding: 21px; border-radius: 18px; }
  .topbar, .admin-heading, .footer { align-items: flex-start; flex-direction: column; }
  .hero h1 { font-size: 2.45rem; }
}

/* v2.6 legal/consent UI */
.button:disabled,
.button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.button:disabled:hover { transform: none; }
.consent-box { margin-top: 12px; padding: 14px 15px; border: 1px solid #cfd9e8; border-radius: 14px; background: #f8faff; }
.consent-box .check-row { margin: 0; color: var(--ink); font-weight: 600; }
.consent-box .check-row a { font-weight: 800; }
.consent-box .fine-print { margin: 8px 0 0 28px; }
.consent-accepted .consent-box { border-color: #abd9ca; background: #f0faf6; }
.legal-summary { margin-top: 26px; }
.legal-summary > div:first-child { max-width: 850px; }
.legal-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.legal-link-card { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8faff; text-decoration: none; color: var(--ink); }
.legal-link-card:hover { border-color: #a8c2f1; background: #f2f7ff; }
.legal-link-card strong { color: var(--primary); }
.legal-link-card span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.legal-hero { max-width: 920px; margin: 30px auto 20px; }
.legal-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.03; letter-spacing: -.04em; margin: 10px 0 14px; }
.legal-hero p { color: var(--muted); line-height: 1.65; }
.legal-document { max-width: 920px; margin: 0 auto; }
.legal-document h2 { margin: 28px 0 8px; font-size: 1.35rem; }
.legal-document h3 { margin: 20px 0 6px; font-size: 1.05rem; }
.legal-document p, .legal-document li { color: #33435f; line-height: 1.68; }
.legal-document ul { padding-left: 22px; }
.legal-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; margin-top: 14px; }
.legal-callout { border: 1px solid #cbdcff; background: #eef5ff; border-radius: 14px; padding: 15px 16px; margin: 18px 0; color: #244779; line-height: 1.55; }
.legal-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 850px) {
  .legal-link-grid { grid-template-columns: 1fr; }
}

.alert-warning { background: #fff8e6; border: 1px solid #f1d28a; color: #6d4f00; }
.email-note { margin-top: 14px; }

/* v2.9 multilingual customer portal */
.language-switcher {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    margin: .85rem 0 1.15rem;
    padding: .7rem .85rem;
    border: 1px solid var(--border, #d4deec);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
}
.language-label { font-weight: 700; font-size: .9rem; }
.language-links { display: flex; flex-wrap: wrap; gap: .38rem; }
.language-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: .28rem .58rem;
    border-radius: 999px;
    border: 1px solid #cdd8e8;
    background: #fff;
    color: inherit;
    text-decoration: none;
    font-size: .86rem;
    font-weight: 650;
}
.language-link:hover { border-color: #7fa5e8; }
.language-link.active { background: #e9f0ff; border-color: #6792e6; color: #184ea6; }
.topbar-actions { display: flex; align-items: center; gap: .7rem; }
.language-notice { margin-bottom: 1.25rem; }

html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .hero,
html[dir="rtl"] .topbar,
html[dir="rtl"] .lookup-strip,
html[dir="rtl"] .legal-meta,
html[dir="rtl"] .legal-nav,
html[dir="rtl"] .button-row,
html[dir="rtl"] .footer { direction: rtl; }
html[dir="rtl"] .machine-code,
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[name="order_reference"],
html[dir="rtl"] .token-box,
html[dir="rtl"] code { direction: ltr; text-align: left; }
html[dir="rtl"] .check-row { align-items: flex-start; }

@media (max-width: 720px) {
    .language-switcher { align-items: flex-start; }
    .language-links { width: 100%; }
}
