/* The portal (the site's home page): the cabinet's design (frontend/cabinet/src/styles.css): teal brand, slate
   neutrals, amber accent, sky blue companions (never violet), light and dark themes;
   the font is the user's choice (<html data-font>, InterfaceFonts). */

:root {
    --brand: #0f766e;
    --brand-strong: #115e59;
    --brand-soft: #ccfbf1;
    --accent: #f59e0b;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-2: #475569;
    --muted: #64748b;
    --good: #15803d;
    --good-soft: #dcfce7;
    --warn: #b45309;
    --warn-soft: #fef3c7;
    --bad: #b91c1c;
    --bad-soft: #fee2e2;
    --info: #1d4ed8;
    --info-soft: #dbeafe;
    --sky: #0284c7;
    --sky-soft: #e0f2fe;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
    --radius: 14px;
    --sidebar: 248px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --brand: #2dd4bf;
        --brand-strong: #5eead4;
        --brand-soft: #134e4a;
        --bg: #0b1220;
        --surface: #111a2e;
        --surface-2: #0f172a;
        --border: #1e293b;
        --text: #e2e8f0;
        --text-2: #cbd5e1;
        --muted: #94a3b8;
        --good: #4ade80;
        --good-soft: #14532d;
        --warn: #fbbf24;
        --warn-soft: #422006;
        --bad: #f87171;
        --bad-soft: #450a0a;
        --info: #93c5fd;
        --info-soft: #172554;
        --sky: #7dd3fc;
        --sky-soft: #082f49;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --brand-soft: #134e4a;
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-2: #0f172a;
    --border: #1e293b;
    --text: #e2e8f0;
    --text-2: #cbd5e1;
    --muted: #94a3b8;
    --good: #4ade80;
    --good-soft: #14532d;
    --warn: #fbbf24;
    --warn-soft: #422006;
    --bad: #f87171;
    --bad-soft: #450a0a;
    --info: #93c5fd;
    --info-soft: #172554;
    --sky: #7dd3fc;
    --sky-soft: #082f49;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
}

:root { --wrap: 1180px; --header: 68px; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
img, svg { display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
    border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
:root[data-theme="dark"] .btn-primary, :root[data-theme="dark"] .btn-primary:hover { color: #042f2e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary, :root:not([data-theme="light"]) .btn-primary:hover { color: #042f2e; } }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: #0f766e; }
.btn-light:hover { background: #f0fdfa; color: #115e59; }
.btn-lg { padding: 14px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; padding: 0; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }

/* header */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-in { display: flex; align-items: center; gap: 20px; height: var(--header); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
@media (max-width: 1180px) { .header .brand .logo-slogan { display: none; } }
.brand:hover { color: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a:not(.btn) { color: var(--text-2); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--brand); background: var(--surface-2); }
.nav-cabinet { display: none; }
.tools { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.lang-btn { padding: 8px 10px; font-size: .85rem; font-weight: 600; color: var(--text-2); line-height: 1.4; }
.lang-btn:hover { color: var(--brand); background: var(--surface-2); }
.lang-btn.lang-on { background: var(--brand-soft); color: var(--brand-strong); }
.icon-sun, .icon-x { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-sun { display: block; } :root:not([data-theme="light"]) .icon-moon { display: none; } }
.menu-btn { display: none; }
.menu-open .icon-menu { display: none; }
.menu-open .icon-x { display: block; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px;
    background: radial-gradient(1000px 500px at 85% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
                radial-gradient(700px 400px at -10% 110%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft);
    color: var(--brand-strong); font-weight: 600; font-size: .85rem; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--brand); }
.lead { margin-top: 20px; font-size: 1.12rem; color: var(--text-2); max-width: 600px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 40px 0 0; max-width: 560px; }
.stats div { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stats dt { font-size: 1.5rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.stats dd { margin: 4px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.hero-visual { position: relative; }
.doc { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
    padding: 22px; transform: rotate(-1.5deg); }
.doc-top { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.doc-top b { font-size: .95rem; }
.doc-badge { background: var(--brand); color: #fff; font-weight: 800; font-size: .75rem; padding: 4px 8px; border-radius: 6px; letter-spacing: .04em; }
.dot-ok { margin-left: auto; display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center;
    background: var(--good-soft); color: var(--good); }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.doc-cell { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.doc-cell small { display: block; color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-cell span { display: block; font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-ai, .doc-sign { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; }
.doc-ai { background: var(--sky-soft); color: var(--sky); }
.doc-sign { background: var(--good-soft); color: var(--good); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; justify-content: center; }
.tag { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: .85rem; font-weight: 500; }

/* sections */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.label { display: inline-block; color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: 12px; }
.head h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; }
.sub { margin-top: 16px; color: var(--text-2); font-size: 1.05rem; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
    transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.section-alt .card { background: var(--surface-2); }
.card h3 { font-size: 1.1rem; margin: 16px 0 8px; }
.card p { color: var(--text-2); font-size: .95rem; }
.ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px;
    background: var(--brand-soft); color: var(--brand-strong); flex: none; }
.ico-bad { background: var(--bad-soft); color: var(--bad); }
.ico-good { background: var(--good-soft); color: var(--good); }
.checks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; color: var(--text-2); }
.checks svg { color: var(--good); margin-top: 4px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.column { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.column-bad { border-top: 4px solid var(--bad); }
.column-good { border-top: 4px solid var(--good); }
.column h3 { font-size: 1.2rem; margin-bottom: 20px; }
.row { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.row:first-of-type { border-top: 0; }
.row b { display: block; margin-bottom: 2px; }
.row p { color: var(--text-2); font-size: .94rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 24px; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, var(--brand), var(--accent)); opacity: .35; }
.step { position: relative; text-align: center; padding: 0 6px; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brand);
    color: #fff; font-weight: 800; font-size: 1.1rem; box-shadow: 0 0 0 6px var(--bg); position: relative; }
:root[data-theme="dark"] .step-n { color: #042f2e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step-n { color: #042f2e; } }
.step b { display: block; margin: 16px 0 6px; }
.step p { color: var(--text-2); font-size: .92rem; }

/* pricing */
.pricing { align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan h3 { margin-top: 0; }
.plan .checks { flex: 1; margin-bottom: 24px; }
.plan-featured { border: 2px solid var(--brand); }
.plan-tag { position: absolute; top: -13px; left: 24px; background: var(--accent); color: #422006; font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.price { margin: 8px 0 12px; display: flex; align-items: baseline; gap: 6px; }
.price b { font-size: 2.2rem; font-weight: 800; color: var(--text); }
.price span { color: var(--muted); }
.plan-terms { list-style: none; padding: 12px 0 0; margin: 0; border-top: 1px dashed var(--border); display: grid; gap: 8px; }
.plan-terms li { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--text-2); }
.plan-terms svg { color: var(--brand); margin-top: 3px; }
.note { margin-top: 24px; text-align: center; color: var(--muted); font-size: .88rem; }

/* call to action */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 48px; border-radius: 24px; color: #fff;
    background: linear-gradient(135deg, #0f766e, #115e59 60%, #134e4a); box-shadow: 0 24px 60px rgba(15, 118, 110, .25); }
.cta h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
.cta p { margin-top: 12px; color: #ccfbf1; max-width: 640px; }
.cta-contacts { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; }
.cta-contacts a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; }
.cta-contacts a:hover { color: #fde68a; }

/* footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0 32px; }
/* about | contacts | visits, the developer's mark at the end (beside the contacts on wide screens) */
.footer-grid { display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr) minmax(180px, .8fr) auto; gap: 32px; align-items: start; }
.footer-about { display: flex; flex-direction: column; gap: 14px; }
.footer-grid > *, .fb > * { min-width: 0; }
/* the documents' pages: one row */
.footer-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-in p { flex: 1; min-width: 220px; }
.footer p { color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; gap: 10px 20px; flex-wrap: wrap; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: .9rem; }
.footer-links a:hover { color: var(--brand); }
.footer-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer-contacts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-contacts li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: .92rem; color: var(--text-2); }
.footer-contacts li > svg { color: var(--brand); flex: none; }
.footer-contacts a { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.footer-contacts a:hover { color: var(--brand); }
.footer-note { color: var(--muted); font-size: .85rem; }
.footer-stats dl { display: flex; flex-direction: column; gap: 6px; }
.footer-stats dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 6px; border-bottom: 1px dashed var(--border); }
.footer-stats dl > div:last-child { border-bottom: 0; }
.footer-stats dt { color: var(--text-2); font-size: .88rem; }
.footer-stats dd { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
/* the program's users: under the site's visits, set apart */
.footer-stats dl + dl { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.footer-dev { align-self: center; }
/* how to report a mistake (common\widgets\BugReport::note()) */
.footer-report { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--border); color: var(--muted); }
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .footer-about { grid-column: 1 / -1; }
    .footer-dev { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* the contact form */
.fb { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.fb-info h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; }
.fb-info .sub { margin-top: 14px; color: var(--text-2); }
.fb-contacts { list-style: none; padding: 0; margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.fb-contacts li { display: flex; align-items: center; gap: 14px; }
.fb-contacts a { display: block; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.fb-contacts a:hover { color: var(--brand); }
.fb-contacts small { display: block; color: var(--muted); font-size: .85rem; }
.fb-contact-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.fb-card { padding: 28px; }
.fb-form { display: flex; flex-direction: column; gap: 16px; }
.fb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.fb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fb-field label { font-size: .88rem; font-weight: 600; color: var(--text-2); }
.fb-req { color: var(--bad); }
.fb-input { font: inherit; width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
    transition: border-color .15s, box-shadow .15s; }
textarea.fb-input { resize: vertical; min-height: 120px; }
.fb-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.fb-invalid .fb-input { border-color: var(--bad); }
.fb-error { color: var(--bad); font-size: .82rem; min-height: 0; }
.fb-error:empty { display: none; }
.fb-alert { padding: 10px 14px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: .9rem; }
.fb-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fb-note { font-size: .85rem; max-width: 320px; }
.fb-trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fb-hidden { display: none !important; }
.fb-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 32px 8px; }
.fb-done-ico { color: var(--good); }
.fb-done-text { font-size: 1.05rem; font-weight: 600; max-width: 420px; }
.fb-form.fb-busy { opacity: .6; pointer-events: none; }
@media (max-width: 960px) {
    .fb { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 560px) {
    .fb-row { grid-template-columns: minmax(0, 1fr); }
    .fb-card { padding: 20px; }
    .fb-foot .btn { width: 100%; }
}

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.to-top.shown { opacity: 1; visibility: visible; transform: none; }

/* responsive */
@media (max-width: 1100px) {
    .nav a:not(.btn) { padding: 8px; font-size: .9rem; }
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
    .steps::before, .steps::after { display: none; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .menu-btn { display: inline-flex; }
    .nav { position: fixed; top: var(--header); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 20px;
        background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; margin: 0; }
    .menu-open .nav { display: flex; }
    .nav a:not(.btn) { padding: 12px; font-size: 1rem; }
    .nav-cabinet { display: inline-flex; margin-top: 8px; }
    .tools { margin-left: auto; }
    .hero-in { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
    .cta { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .header-in { gap: 10px; }
    .brand { --logo-size: 34px; }
    .brand .logo-mark { width: 34px; height: 34px; }
    .tools-cabinet span { display: none; }
    .tools-cabinet { padding: 10px; }
    .lang-btn { padding: 8px 7px; font-size: .8rem; }
    .hero { padding: 40px 0 56px; }
    .section { padding: 56px 0; }
    .head { margin-bottom: 32px; }
    .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .stats div { padding: 10px; }
    .stats dt { font-size: 1.2rem; }
    .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
    .doc { transform: none; padding: 16px; }
    .column { padding: 20px; }
    .cta { padding: 28px 20px; border-radius: 18px; }
    .btn-lg { width: 100%; }
}
@media (max-width: 480px) {
    .header .brand .logo-text { display: none; }
}

/* the "technical works" page (the maintenance mode) */
.maintenance { min-height: calc(100vh - var(--header)); display: flex; align-items: center; padding: 48px 0;
    background: radial-gradient(900px 450px at 80% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
                radial-gradient(700px 400px at 0% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.maintenance .wrap { width: 100%; }
.maintenance-card { max-width: 640px; margin: 0 auto; text-align: center; background: var(--surface); border: 1px solid var(--border);
    border-radius: 24px; padding: 48px 32px; box-shadow: var(--shadow); }
.maintenance-icon { display: inline-flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%;
    background: var(--warn-soft); color: var(--warn); margin-bottom: 24px; }
.maintenance-card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
.maintenance-card .lead { margin: 16px auto 0; }
.maintenance-contact { margin-top: 24px; display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
@media (max-width: 640px) { .maintenance-card { padding: 32px 20px; border-radius: 18px; } }
.tools-end { margin-left: auto; }

/* ---------- motion and colour: tones, accented headings, reveal on scroll, tilt ---------- */
/* the cards' tones: the brand's teal and its companions (all have a dark-theme variant through the tokens) */
.tone-1 { --tone: var(--brand); --tone-soft: var(--brand-soft); }
.tone-2 { --tone: var(--sky); --tone-soft: var(--sky-soft); }
.tone-3 { --tone: var(--info); --tone-soft: var(--info-soft); }
.tone-4 { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.tone-5 { --tone: var(--good); --tone-soft: var(--good-soft); }

/* the end of a heading in the logo's colours, slowly flowing */
.hl { background: linear-gradient(90deg, var(--brand), #14b8a6, var(--accent), var(--brand)); background-size: 300% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: hl-flow 9s linear infinite; }
@keyframes hl-flow { to { background-position: 300% 0; } }
.label { padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); }

/* reveal: only when the script runs and motion is allowed (portal.js adds .reveal-on) */
.reveal-on .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
    transition-delay: calc(var(--i, 0) * 90ms); }
.reveal-on .reveal.in { opacity: 1; transform: none; }
/* once shown, the element follows the pointer at once (the reveal's delay no longer applies) */
.reveal-on .reveal.in.done { transition: opacity .2s, transform .15s ease-out, border-color .25s, box-shadow .25s; transition-delay: 0s; }

/* tilt: the card leans towards the pointer (portal.js sets --rx / --ry) */
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0)); will-change: transform; }
.reveal-on .tilt.reveal.in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0)); }
.tilt:hover { --lift: -4px; }
.card.tilt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0)); }

/* cards with a tone: coloured icon, title accent, a flowing top line and a glow on hover */
.card[class*="tone-"] { position: relative; overflow: hidden; }
.card[class*="tone-"]::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px;
    background: linear-gradient(90deg, var(--tone), var(--accent), var(--tone)); background-size: 200% 100%;
    transform: scaleX(0); transform-origin: left; transition: transform .45s ease; }
.card[class*="tone-"]:hover::before, .card[class*="tone-"]:focus-within::before { transform: scaleX(1); animation: hl-flow 3s linear infinite; }
.card[class*="tone-"]:hover { border-color: color-mix(in srgb, var(--tone) 55%, var(--border));
    box-shadow: 0 18px 40px color-mix(in srgb, var(--tone) 18%, transparent); }
.card[class*="tone-"] .ico { background: var(--tone-soft); color: var(--tone); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.card[class*="tone-"]:hover .ico { transform: rotate(-8deg) scale(1.1); }
.card[class*="tone-"] h3 { color: var(--text); background: linear-gradient(var(--tone), var(--tone)) no-repeat 0 100% / 0 2px; padding-bottom: 2px;
    display: block; width: fit-content; max-width: 100%; transition: background-size .35s ease, color .25s; }
.card[class*="tone-"]:hover h3 { color: var(--tone); }
.card[class*="tone-"]:hover h3 { background-size: 100% 2px; }
.card[class*="tone-"] .checks svg { color: var(--tone); }

/* problems and solutions: the rows of one pair light up together */
.row { transition: background .25s, transform .25s; border-radius: 12px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; outline: none; }
.row b { transition: color .25s; }
.column-bad .row.paired { background: var(--bad-soft); transform: translateX(4px); }
.column-good .row.paired { background: var(--good-soft); transform: translateX(-4px); }
.column-bad .row.paired b { color: var(--bad); }
.column-good .row.paired b { color: var(--good); }
.row .ico { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.row.paired .ico { transform: scale(1.12); }
.column h3 { display: flex; align-items: center; gap: 10px; }
.column-bad h3 { color: var(--bad); }
.column-good h3 { color: var(--good); }
.reveal-on .column-bad .row.reveal { transform: translateX(-18px); }
.reveal-on .column-good .row.reveal { transform: translateX(18px); }
.reveal-on .row.reveal.in { transform: none; }
.reveal-on .row.reveal.in.paired { transform: translateX(var(--shift, 0)); }
.column-bad .row.paired { --shift: 4px; }
.column-good .row.paired { --shift: -4px; }

/* the steps: the line fills in, the numbers light up one by one; a step under the pointer is lifted */
.steps::after { content: ""; position: absolute; top: 24px; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, var(--brand), var(--accent));
    transform-origin: left; transition: transform 1.6s cubic-bezier(.4, 0, .2, 1) .2s; }
.reveal-on .steps::after { transform: scaleX(0); }
.reveal-on .steps.in::after { transform: scaleX(1); }
.reveal-on .steps.reveal { opacity: 1; transform: none; }
.step-n { z-index: 1; background: var(--tone, var(--brand)); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s; }
.reveal-on .steps .step { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(.25s + var(--i) * 260ms); }
.reveal-on .steps.in .step { opacity: 1; transform: none; }
.step { outline: none; cursor: default; }
.step:hover .step-n, .step:focus-visible .step-n { transform: scale(1.15) translateY(-3px); box-shadow: 0 0 0 6px var(--bg), 0 10px 24px color-mix(in srgb, var(--tone, var(--brand)) 40%, transparent); }
.step b { transition: color .25s; }
.step:hover b, .step:focus-visible b { color: var(--tone, var(--brand)); }

/* pricing: the period switch, the price changes smoothly */
.period { display: flex; justify-content: center; gap: 6px; width: max-content; max-width: 100%; margin: -16px auto 36px; padding: 5px;
    border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.period-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-weight: 600;
    padding: 8px 18px; border-radius: 999px; cursor: pointer; transition: background .25s, color .25s, box-shadow .25s; }
.period-btn.on { background: var(--brand); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
:root[data-theme="dark"] .period-btn.on { color: #042f2e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .period-btn.on { color: #042f2e; } }
.period-save { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #422006; }
.price b { transition: color .3s; }
.price b.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: translateY(-4px); color: var(--brand); } }
.price b { display: inline-block; }
.price-total { margin: -6px 0 10px; font-size: .88rem; color: var(--brand); font-weight: 600; }
.plan-featured { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, var(--brand), var(--accent), var(--sky), var(--brand)) border-box; background-size: 100% 100%, 300% 300%;
    animation: border-flow 8s linear infinite; }
.section-alt .plan-featured { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    linear-gradient(120deg, var(--brand), var(--accent), var(--sky), var(--brand)) border-box; background-size: 100% 100%, 300% 300%; }
@keyframes border-flow { to { background-position: 0 0, 300% 0; } }
.plan h3 { color: var(--tone, var(--text)); }

/* ---------- the Central Bank's rates ---------- */
.rates-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(240px, 1.1fr); gap: 16px; }
.rate-card { position: relative; overflow: hidden; padding: 20px 20px 54px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow); transition: border-color .25s, box-shadow .25s, transform .2s; }
.rate-card:hover { border-color: color-mix(in srgb, var(--tone) 55%, var(--border)); box-shadow: 0 18px 40px color-mix(in srgb, var(--tone) 18%, transparent); }
.rate-top { display: flex; align-items: center; gap: 10px; }
.rate-alpha { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; padding: 4px 8px; border-radius: 8px;
    background: var(--tone-soft, var(--brand-soft)); color: var(--tone, var(--brand-strong)); font-weight: 800; letter-spacing: .04em; font-size: .85rem; }
.rate-name { color: var(--muted); font-size: .88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-value { margin-top: 14px; display: flex; align-items: baseline; gap: 6px; }
.rate-value b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rate-value span { color: var(--muted); }
.rate-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.rate-foot small { color: var(--muted); }
.chg { font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg-up { color: var(--good); }
.chg-down { color: var(--bad); }
.chg-flat { color: var(--muted); }
.spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46px; }
.spark-line { fill: none; stroke: var(--tone, var(--brand)); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round;
    stroke-dasharray: 400; stroke-dashoffset: 0; }
.spark-area { fill: color-mix(in srgb, var(--tone, var(--brand)) 14%, transparent); }
.reveal-on .rate-card .spark-line { stroke-dashoffset: 400; transition: stroke-dashoffset 1.4s ease calc(.3s + var(--i, 0) * 120ms); }
.reveal-on .rate-card.in .spark-line { stroke-dashoffset: 0; }
.rate-calc { display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--radius); color: #fff;
    background: linear-gradient(135deg, #0f766e, #115e59 60%, #134e4a); box-shadow: 0 18px 40px rgba(15, 118, 110, .25); }
.rate-calc-title { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.rate-calc-row { display: flex; gap: 8px; }
.rate-calc input, .rate-calc select { font: inherit; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .12); color: #fff;
    border-radius: 10px; padding: 9px 10px; min-width: 0; }
.rate-calc input { flex: 1; font-variant-numeric: tabular-nums; }
.rate-calc select option { color: #0f172a; }
.rate-calc input:focus, .rate-calc select:focus { outline: 2px solid #fde68a; outline-offset: 1px; }
.rate-swap { justify-self: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fde68a; color: #422006; font-size: 1.1rem;
    cursor: pointer; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.rate-swap:hover { transform: rotate(180deg); }
.rate-calc-out { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; word-break: break-all; }
.rate-calc .muted { color: #ccfbf1; }
.rates-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.rates-meta > span { display: inline-flex; align-items: center; gap: 8px; }
.rates-count { display: inline-flex; min-width: 24px; justify-content: center; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: .78rem; }
.rates-more[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); }
.rates-all { margin-top: 18px; animation: drop .35s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.rates-search { width: 100%; max-width: 360px; font: inherit; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); margin-bottom: 14px; }
.rates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.rate-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "alpha name value" "alpha name change"; column-gap: 10px; align-items: center;
    padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s; }
.rate-row:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); transform: translateY(-2px); }
.rate-row .rate-alpha { grid-area: alpha; }
.rate-row .rate-name { grid-area: name; white-space: normal; line-height: 1.3; }
.rate-row b { grid-area: value; text-align: right; font-variant-numeric: tabular-nums; }
.rate-row .chg { grid-area: change; text-align: right; font-size: .78rem; }
@media (max-width: 1100px) { .rates-main { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rate-calc { grid-column: 1 / -1; } }
@media (max-width: 760px) { .rates-main { grid-template-columns: 1fr; } .rates-meta { flex-direction: column; align-items: stretch; } .rates-more { width: 100%; } }
@media (hover: none) { .tilt { transform: none !important; } }
.rate-unit { align-self: center; color: #ccfbf1; font-weight: 600; white-space: nowrap; }
.rate-calc.reversed .rate-swap { transform: rotate(180deg); }
.rate-row[hidden], .rates-none[hidden] { display: none; }

/* ---------- the public offer and the privacy policy ---------- */
.legal { padding: 40px 0 72px; }
.legal-in { max-width: 900px; }
.legal-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; }
.legal-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; }
.legal-tab:hover { color: var(--brand); border-color: var(--brand); }
.legal-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .legal-tab.on { color: #042f2e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .legal-tab.on { color: #042f2e; } }
.legal-print { margin-left: auto; }
.legal-doc { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 40px 48px; box-shadow: var(--shadow); }
.legal-doc h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; margin-bottom: 8px; }
.legal-doc h1 + p { color: var(--muted); margin-bottom: 8px; }
.legal-doc h2 { font-size: 1.15rem; margin: 28px 0 10px; color: var(--brand-strong); }
.legal-doc p { margin: 10px 0; color: var(--text-2); text-align: justify; hyphens: auto; }
.legal-doc ul { margin: 8px 0 12px; padding-left: 22px; color: var(--text-2); display: grid; gap: 6px; }
.legal-doc h2:last-of-type + p { font-weight: 600; color: var(--text); text-align: left; }
@media (max-width: 640px) { .legal-doc { padding: 24px 18px; border-radius: 14px; } .legal-doc p { text-align: left; } .legal-print { margin-left: 0; } }
@media print {
    .header, .footer, .legal-tabs, .to-top, .test-banner { display: none !important; }
    body { background: #fff; color: #000; }
    .legal { padding: 0; }
    .legal-doc { border: 0; box-shadow: none; padding: 0; }
    .legal-doc p, .legal-doc ul, .legal-doc h2 { color: #000; }
}

/* ---------- the hero: living background, rising text, the declaration filling itself ---------- */
.hero-blob { position: absolute; z-index: 0; width: 520px; height: 520px; border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none; }
.hero-blob-1 { top: -180px; right: -120px; background: color-mix(in srgb, var(--brand) 60%, transparent); animation: blob-a 18s ease-in-out infinite alternate; }
.hero-blob-2 { bottom: -220px; left: -160px; background: color-mix(in srgb, var(--accent) 55%, transparent); animation: blob-b 22s ease-in-out infinite alternate; }
@keyframes blob-a { to { transform: translate(-120px, 80px) scale(1.15); } }
@keyframes blob-b { to { transform: translate(140px, -60px) scale(1.1); } }
.hero-in { position: relative; z-index: 1; }
.hero h1 em.hl { color: transparent; }
.kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); animation: dot-pulse 2s infinite; }
@keyframes dot-pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero-on .hero-rise { opacity: 0; transform: translateY(18px); animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero .btn-primary { position: relative; overflow: hidden; }
.hero .btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .7s ease; }
.hero .btn-primary:hover::after { transform: translateX(120%); }
.hero .btn-primary svg { transition: transform .25s ease; }
.hero .btn-primary:hover svg { transform: translateX(4px); }
.stat { transition: transform .25s ease, border-color .25s, box-shadow .25s; }
.stat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tone) 50%, var(--border)); box-shadow: 0 12px 28px color-mix(in srgb, var(--tone) 16%, transparent); }
.stats .stat dt { color: var(--tone, var(--brand)); }
/* the declaration: floats, leans to the pointer, fills in */
.hero-visual { perspective: 1200px; }
.doc { cursor: pointer; transition: transform .2s ease-out, box-shadow .3s; --rest: -1.5deg; transform: perspective(1200px) rotate(var(--rest)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.hero-on .doc { animation: doc-float 6s ease-in-out infinite; }
@keyframes doc-float { 50% { translate: 0 -10px; } }
.doc:hover { box-shadow: 0 30px 70px color-mix(in srgb, var(--brand) 22%, rgba(15, 23, 42, .12)); }
.doc-cell { transition: border-color .3s, background .3s, transform .3s; }
.doc-cell.typing { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface-2)); }
.doc-cell.typing span::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--brand); animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.doc-cell:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.doc-ai { position: relative; overflow: hidden; }
.doc-ai-wait { display: none; }
.doc.checking .doc-ai-wait { display: inline; }
.doc.checking .doc-ai-done { display: none; }
.doc.checking .doc-ai::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sky) 30%, transparent), transparent);
    animation: scan 1.1s linear infinite; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.doc.filling .doc-ai, .doc.filling .doc-sign, .doc.checking .doc-sign { opacity: .35; }
.doc .doc-sign, .doc .doc-ai { transition: opacity .4s ease; }
.doc.done .dot-ok { animation: pop .5s cubic-bezier(.34, 1.56, .64, 1); }
.doc.done .doc-sign svg { animation: pop .5s cubic-bezier(.34, 1.56, .64, 1) .2s both; }
@keyframes pop { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
.tag { transition: transform .25s ease, background .25s, color .25s, border-color .25s; }
.tag[class*="tone-"]:hover { transform: translateY(-3px); background: var(--tone-soft); color: var(--tone); border-color: color-mix(in srgb, var(--tone) 40%, var(--border)); }
.hero-on .tag { animation: tag-in .5s ease both; animation-delay: calc(1.2s + var(--i, 0) * 80ms); }
@keyframes tag-in { from { opacity: 0; transform: translateY(10px) scale(.9); } }
@media (hover: none) { .doc { transform: rotate(var(--rest)); } }
@media (max-width: 640px) { .doc { --rest: 0deg; } .hero-blob { width: 320px; height: 320px; } }

/* ---------- the news (the home page's section, /news, /news/<slug>) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.section-more { display: flex; justify-content: center; margin-top: 36px; }
.news-grid { align-items: stretch; }
.news-card { display: flex; flex-direction: column; padding: 0; }
.news-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; color: var(--tone);
    background: linear-gradient(135deg, var(--tone-soft), color-mix(in srgb, var(--tone) 22%, var(--surface))); }
.news-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.news-card:hover .news-cover img { transform: scale(1.06); }
.news-cover-empty svg { opacity: .55; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.news-card:hover .news-cover-empty svg { transform: rotate(-8deg) scale(1.15); }
.news-date { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
    background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text); backdrop-filter: blur(6px); }
.news-text { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.news-text h3 a { color: inherit; }
.news-text p { color: var(--text-2); font-size: .95rem; flex: 1; }
.news-cat { align-self: flex-start; margin: 0; font-size: .72rem; color: var(--tone, var(--brand)); background: var(--tone-soft, var(--brand-soft)); }
.news-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--tone); }
.news-more svg { transition: transform .25s ease; }
.news-card:hover .news-more svg { transform: translateX(4px); }
.news-page { padding-top: 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .88rem; margin-bottom: 28px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--brand); }
.news-empty { display: flex; align-items: center; gap: 14px; max-width: 520px; margin: 0 auto; color: var(--text-2); }
.news-empty .ico { background: var(--brand-soft); color: var(--brand); }
.news-article { max-width: 820px; }
.news-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.2; font-weight: 800; margin-top: 12px; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.news-meta time { display: inline-flex; align-items: center; gap: 6px; }
.news-hero { margin: 28px 0 8px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.news-hero img { width: 100%; max-height: 460px; object-fit: cover; }
/* the article's text: only the tags common\helpers\NewsHtml keeps, in the portal's typography */
.news-body { margin-top: 24px; font-size: 1.05rem; line-height: 1.75; color: var(--text-2); }
.news-body > * + * { margin-top: 1em; }
.news-body h2, .news-body h3, .news-body h4 { color: var(--text); line-height: 1.3; margin-top: 1.6em; }
.news-body h2 { font-size: 1.45rem; }
.news-body h3 { font-size: 1.2rem; }
.news-body h4 { font-size: 1.05rem; }
.news-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.news-body ul, .news-body ol { padding-left: 1.4em; display: grid; gap: .4em; }
.news-body ul { list-style: disc; }
.news-body ol { list-style: decimal; }
.news-body li::marker { color: var(--brand); }
.news-body blockquote { margin-left: 0; margin-right: 0; padding: 14px 20px; border-left: 4px solid var(--brand); border-radius: 0 12px 12px 0; background: var(--brand-soft); color: var(--text); }
.news-body img { display: block; max-width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); }
.news-body table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.news-body th, .news-body td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.news-body th { background: var(--surface-2); color: var(--text); }
.news-body hr { border: 0; border-top: 1px dashed var(--border); margin: 2em 0; }
.news-body code, .news-body pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface-2); border-radius: 6px; }
.news-body code { padding: 2px 6px; }
.news-body pre { padding: 14px; overflow-x: auto; }
.news-files { margin-top: 28px; }
.news-files ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.news-files a { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; color: var(--text);
    transition: border-color .2s, transform .2s; }
.news-files a:hover { border-color: var(--brand); transform: translateY(-2px); }
.news-files img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.news-files svg { color: var(--brand); flex: none; }
.news-files span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.news-files small { color: var(--muted); }
.news-back { margin-top: 32px; }
.news-related { margin-top: 72px; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 36px; }
.pager-link { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-weight: 600; }
.pager-item a.pager-link:hover { border-color: var(--brand); color: var(--brand); }
.pager-item.is-on .pager-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager-item.is-off .pager-link { opacity: .45; }

/* ---------- the system's updates: a timeline with the changes by kind ---------- */
.section-releases { position: relative; overflow: hidden; }
.section-releases::before { content: ""; position: absolute; inset: auto -10% -40% auto; width: 480px; height: 480px; border-radius: 50%;
    background: color-mix(in srgb, var(--sky) 18%, transparent); filter: blur(80px); pointer-events: none; }
.rel-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -16px 0 36px; }
.rel-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .25s ease; }
.rel-chip span { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; }
.rel-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--k); }
.rel-chip:hover { transform: translateY(-2px); border-color: var(--k, var(--brand)); color: var(--k, var(--brand)); }
.rel-chip.is-on { background: var(--k, var(--brand)); border-color: var(--k, var(--brand)); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--k, var(--brand)) 30%, transparent); }
.rel-chip.is-on span { background: rgba(255, 255, 255, .22); }
.rel-chip.is-on i { background: #fff; }
.rel-chip-new, .rel-change.is-new, .rel-count-new, .rel-meter-new { --k: var(--good); --k-soft: var(--good-soft); }
.rel-chip-improved, .rel-change.is-improved, .rel-count-improved, .rel-meter-improved { --k: var(--info); --k-soft: var(--info-soft); }
.rel-chip-fixed, .rel-change.is-fixed, .rel-count-fixed, .rel-meter-fixed { --k: var(--warn); --k-soft: var(--warn-soft); }
.rel-timeline { position: relative; max-width: 980px; margin: 0 auto; display: grid; gap: 28px; }
/* the line in the middle, flowing in the brand's colours */
.rel-timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%); border-radius: 3px;
    background: linear-gradient(180deg, var(--brand), var(--sky), var(--info), var(--brand)); background-size: 100% 300%; animation: rel-flow 8s linear infinite; opacity: .55; }
@keyframes rel-flow { to { background-position: 0 300%; } }
.rel { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.rel > .rel-card { grid-column: 1; margin-right: 44px; }
.rel:nth-child(even) > .rel-card { grid-column: 2; margin: 0 0 0 44px; }
.rel-dot { position: absolute; left: 50%; top: 26px; width: 18px; height: 18px; transform: translateX(-50%); border-radius: 50%;
    background: var(--surface); border: 4px solid var(--tone); box-shadow: 0 0 0 6px color-mix(in srgb, var(--tone) 18%, transparent); z-index: 1; }
.rel-latest .rel-dot { animation: rel-pulse 2.2s ease-out infinite; }
@keyframes rel-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone) 55%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
.rel-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow);
    transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .25s, box-shadow .25s; }
.rel-card::after { content: ""; position: absolute; top: 28px; right: -9px; width: 16px; height: 16px; background: inherit; border: inherit;
    border-width: 1px 1px 0 0; transform: rotate(45deg); }
.rel:nth-child(even) .rel-card::after { right: auto; left: -9px; transform: rotate(-135deg); }
.rel-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tone) 55%, var(--border)); box-shadow: 0 18px 40px color-mix(in srgb, var(--tone) 18%, transparent); }
.rel-latest .rel-card { border-color: color-mix(in srgb, var(--tone) 45%, var(--border)); }
.rel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.rel-version { padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; color: #fff; letter-spacing: .02em;
    background: linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 55%, var(--accent))); }
.rel-head time { color: var(--muted); font-size: .88rem; }
.rel-badge { margin-left: auto; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); animation: rel-blink 2.4s ease-in-out infinite; }
@keyframes rel-blink { 50% { opacity: .55; } }
.rel-card h3 { font-size: 1.12rem; margin-bottom: 12px; }
.rel-meter { display: flex; gap: 3px; height: 6px; border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.rel-meter span { background: var(--k); transform-origin: left; }
.reveal-on .rel.reveal .rel-meter span { transform: scaleX(0); transition: transform .8s cubic-bezier(.2, .7, .2, 1) .35s; }
.reveal-on .rel.reveal.in .rel-meter span { transform: scaleX(1); }
.rel-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.rel-count { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--k); background: var(--k-soft); }
.rel-toggle-icon { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--text-2);
    transition: transform .3s ease, background .2s; }
.rel-toggle[aria-expanded="true"] .rel-toggle-icon { transform: rotate(90deg); background: var(--tone-soft); color: var(--tone); }
/* the changes open with a smooth height (0fr → 1fr) */
.rel-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.rel-toggle[aria-expanded="true"] + .rel-body { grid-template-rows: 1fr; }
.rel-changes { overflow: hidden; display: grid; gap: 8px; }
.rel-toggle[aria-expanded="true"] + .rel-body .rel-changes { padding-top: 14px; }
.rel-change { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--k-soft) 55%, transparent);
    font-size: .93rem; color: var(--text-2); border-left: 3px solid var(--k); transition: opacity .3s, transform .3s; }
.rel-toggle[aria-expanded="true"] + .rel-body .rel-change { animation: rel-in .4s ease both; animation-delay: calc(var(--j, 0) * 50ms); }
@keyframes rel-in { from { opacity: 0; transform: translateX(-8px); } }
.rel-kind { flex: none; padding: 1px 8px; border-radius: 6px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--k); margin-top: 2px; }
/* a chosen kind: the other changes fade, a release without it steps back */
.rel-timeline[data-filter] .rel-change { opacity: .25; }
.rel-timeline[data-filter="new"] .rel-change.is-new, .rel-timeline[data-filter="improved"] .rel-change.is-improved,
.rel-timeline[data-filter="fixed"] .rel-change.is-fixed { opacity: 1; transform: translateX(4px); }
.rel.rel-dim .rel-card { opacity: .45; filter: saturate(.4); }
@media (max-width: 820px) {
    .rel-timeline::before { left: 9px; }
    .rel { grid-template-columns: 1fr; }
    .rel > .rel-card, .rel:nth-child(even) > .rel-card { grid-column: 1; margin: 0 0 0 36px; }
    .rel-dot { left: 9px; }
    .rel-card::after, .rel:nth-child(even) .rel-card::after { left: -9px; right: auto; transform: rotate(-135deg); }
}
@media (prefers-reduced-motion: reduce) {
    .rel-timeline::before, .rel-latest .rel-dot, .rel-badge { animation: none; }
}

/* ---------- the footer's links to the official websites ---------- */
.footer-sites { margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--border); }
.footer-sites ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.footer-sites a { display: flex; align-items: center; gap: 10px; height: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface-2); color: var(--text); transition: border-color .2s, transform .2s, box-shadow .2s; }
.footer-sites a:hover, .footer-sites a:focus-visible { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 14%, transparent); }
.footer-site-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.footer-sites a:hover .footer-site-icon { transform: rotate(-12deg) scale(1.08); }
.footer-site-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.footer-site-text b { font-size: .88rem; font-weight: 600; }
.footer-site-text small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.footer-site-go { flex: none; color: var(--muted); transform: rotate(-45deg); transition: transform .25s ease, color .2s; }
.footer-sites a:hover .footer-site-go { color: var(--brand); transform: rotate(-45deg) translateX(3px); }
@media print { .footer-sites, .rel-filter { display: none !important; } }

/* ---------- the offer to install the app (the same as the cabinet's components/InstallPrompt.jsx) ---------- */
.install-prompt { position: fixed; z-index: 60; right: 20px; bottom: 20px; width: min(400px, calc(100vw - 24px)); display: flex; gap: 14px; align-items: flex-start;
    padding: 16px 40px 16px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .25); animation: install-in .45s cubic-bezier(.2, .7, .2, 1) both; }
.install-prompt[hidden] { display: none; }
.install-prompt::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand)); background-size: 200% 100%; animation: install-flow 4s linear infinite; }
.install-icon { flex: none; border-radius: 14px; box-shadow: var(--shadow); animation: install-bob 3s ease-in-out infinite; }
.install-text { display: grid; gap: 6px; min-width: 0; }
.install-text p { margin: 0; color: var(--text-2); font-size: .9rem; }
.install-steps { margin: 2px 0 0; padding-left: 18px; color: var(--text-2); font-size: .86rem; display: grid; gap: 2px; }
.install-steps[hidden] { display: none; }
.install-share { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--info-soft); color: var(--info); font-size: .75rem; }
.install-actions { display: flex; gap: 8px; margin-top: 4px; }
.install-actions [hidden] { display: none; }
.install-actions .btn { padding: 8px 14px; font-size: .9rem; }
.install-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%;
    background: var(--surface-2); color: var(--muted); cursor: pointer; }
.install-close:hover { color: var(--text); }
@keyframes install-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes install-flow { to { background-position: 200% 0; } }
@keyframes install-bob { 50% { transform: translateY(-3px); } }
@media (max-width: 640px) { .install-prompt { left: 12px; right: 12px; width: auto; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .install-prompt, .install-prompt::before, .install-icon { animation: none; } }
@media print { .install-prompt { display: none !important; } }
