:root {
    --bg: #353655;
    --bg-deep: #2a2b48;
    --bg-soft: #3d3e62;
    --surface: #ffffff;
    --surface-2: #fafafc;
    --surface-3: #f3f3f7;
    --surface-4: #ebebf0;
    --accent: #e0aa3e;
    --accent-hover: #f0c050;
    --accent-soft: #a78345;
    --accent-soft-15: rgba(167, 131, 69, 0.15);
    --accent-soft-25: rgba(224, 170, 62, 0.18);
    --text: #1d1d33;
    --text-muted: #5a5a78;
    --text-on-dark: #f0f0f5;
    --text-on-dark-muted: #b8b8d0;
    --border: #e8e8ee;
    --border-strong: #d6d6dd;
    --link: #a78345;
    --link-hover: #8a6a32;
    --danger: #9c1a1c;
    --shadow-xs: 0 1px 2px rgba(20, 20, 40, 0.04);
    --shadow-sm: 0 1px 3px rgba(20, 20, 40, 0.05), 0 1px 2px rgba(20, 20, 40, 0.04);
    --shadow-md: 0 4px 12px rgba(20, 20, 40, 0.06), 0 2px 4px rgba(20, 20, 40, 0.04);
    --shadow-lg: 0 12px 32px rgba(20, 20, 40, 0.08), 0 4px 8px rgba(20, 20, 40, 0.04);
    --shadow-glow: 0 0 0 4px var(--accent-soft-15);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --container: 1200px;
    --container-narrow: 880px;
    --header-h: 72px;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    tab-size: 4;
}
:is(section, .card)[id],
#contacts, #BESNU-characteristics, #Docs, #Powerful_magnets, #Coil_power_calc {
    scroll-margin-top: calc(var(--header-h) + 16px);
}
body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
img, picture, svg, video, iframe { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a {
    color: var(--link);
    transition: color 180ms var(--ease);
}
a:hover { color: var(--link-hover); }
ul, ol { padding-left: 1.4em; }
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text);
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== Layout helpers ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }
.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    padding: 10px 18px;
    background: var(--accent);
    color: var(--bg-deep);
    font-weight: 600;
    border-radius: var(--radius-sm);
    z-index: 100;
    transition: top 200ms var(--ease);
}
.skip-link:focus { top: 12px; color: var(--bg-deep); }

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    color: var(--text-on-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-on-dark);
}
.brand img { height: 38px; width: auto; }
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    color: var(--text-on-dark);
    align-items: center;
    justify-content: center;
    transition: background 180ms var(--ease);
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.08); }
.nav-toggle svg { width: 22px; height: 22px; }

.site-nav ul {
    display: flex;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-nav a {
    display: inline-block;
    padding: 8px 14px;
    color: var(--text-on-dark-muted);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color 180ms var(--ease), background 180ms var(--ease);
}
.site-nav a:hover { color: var(--text-on-dark); background: rgba(255, 255, 255, 0.06); }
.site-nav a.active { color: var(--accent); }

/* ===== Hero ===== */
.hero {
    position: relative;
    color: var(--text-on-dark);
    background:
        radial-gradient(ellipse 80% 60% at 80% 0%, rgba(224, 170, 62, 0.16), transparent 60%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(74, 63, 140, 0.35), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    padding: 96px 0 88px;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(224, 170, 62, 0.12);
    border: 1px solid rgba(224, 170, 62, 0.25);
    color: var(--accent);
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
}
.hero-eyebrow::before {
    content: "";
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(224, 170, 62, 0.2);
}
.hero h1 {
    font-size: clamp(1.5rem, 6.5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text-on-dark);
    overflow-wrap: break-word;
}
.accent { color: var(--accent); }
.hero h1 b { font-weight: 900; letter-spacing: -0.01em; }
.prose b { font-weight: 700; }
.hero .lead {
    margin-top: 20px;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    max-width: 60ch;
    color: var(--text-on-dark-muted);
}
.hero .actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
}
.hero .meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px 40px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero .meta-item {
    color: var(--text-on-dark-muted);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.hero .meta-item strong {
    display: block;
    color: var(--text-on-dark);
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    margin-top: 4px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1;
    white-space: nowrap;
    transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--accent);
    color: var(--bg-deep);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-deep);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(224, 170, 62, 0.28);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark);
    border-color: rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--text-on-dark); }
.btn-lg { padding: 14px 28px; font-size: 1em; }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-soft { background: var(--surface-3); }
.section-head { margin-bottom: 40px; max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.02em;
}
.section-head p {
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 1.05rem;
}

/* ===== Clause (rotated section header tape) ===== */
.clause {
    display: inline-flex;
    align-items: center;
    margin: 0 auto 24px;
    padding: 10px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transform: rotate(-2deg);
    transition: transform 240ms var(--ease);
}
.clause:hover { transform: rotate(-2deg) translateY(-2px); }
.clause img { height: 22px; width: auto; display: block; }
.clause-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
    max-width: 100%;
}

/* ===== Cards ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 240ms var(--ease), transform 240ms var(--ease);
}
.card-lg { padding: 48px; }
.card + .card { margin-top: 24px; }
.card:hover { box-shadow: var(--shadow-md); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 24px;
}
.feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--surface-3);
    border: 1px solid transparent;
    transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.feature:hover { border-color: var(--border-strong); background: var(--surface); }
.feature-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-soft-15);
    color: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.feature-icon svg { width: 16px; height: 16px; }
.feature-icon.plus { background: rgba(74, 63, 140, 0.12); color: #493e8c; }
.feature-text { font-size: 0.95em; line-height: 1.5; }

/* ===== Integration images ===== */
.integration_images {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 24px;
}
.integration_images h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    letter-spacing: -0.01em;
}
.integration_images img {
    display: block;
    margin: 0 auto;
    width: 82%;
    height: auto;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}
.integration_images img:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Prose (article body) ===== */
.prose { color: var(--text); text-align: justify; }
.prose p { margin: 1em 0; }
.prose h2 { font-size: 1.5rem; margin: 1.6em 0 0.6em; }
.prose h3 { font-size: 1.2rem; margin: 1.4em 0 0.5em; }
.prose h4 { font-size: 1.05rem; margin: 1.2em 0 0.4em; }
.prose ul, .prose ol { margin: 1em 0; }
.prose ul li, .prose ol li { margin: 0.3em 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); }
.prose a { color: var(--link); }
.prose a:hover { color: var(--link-hover); text-decoration: underline; }
.prose .picbig { width: 100%; max-width: 720px; margin: 1.5em auto; border: 1px solid var(--border); box-shadow: var(--shadow-md); border-radius: var(--radius); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 0; margin: 1.5em 0; box-shadow: var(--shadow-sm); }
.prose .danger-note { color: var(--danger); font-size: 0.9em; margin: 0.5em 0 1em; }

/* ===== Tables ===== */
.tbl-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1.5em 0;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}
.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
.tbl th, .tbl td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.tbl thead th {
    background: var(--surface-3);
    font-weight: 600;
    color: var(--text);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-3); }
.tbl td.center, .tbl th.center { text-align: center; }
.tbl-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: 0.9em; color: var(--text-muted); }
.field input,
.field select,
.field textarea {
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
    width: 100%;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 4px var(--accent-soft-15);
}
.field input:required,
.field textarea:required { border-left: 3px solid var(--accent); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.form-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Calculator ===== */
.calc-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 32px;
    align-items: start;
}
.calc-block img { border-radius: var(--radius); border: 1px solid var(--border); }
.calc-input { max-width: 12em; }
.calc-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface-3);
    display: grid;
    gap: 8px;
    font-size: 0.95em;
}
.calc-result-row { display: flex; justify-content: space-between; gap: 12px; }
.calc-result-row span { color: var(--text-muted); }
.calc-result-row strong { font-weight: 600; }
.calc-result-row.highlight strong { color: var(--accent-soft); font-size: 1.15em; }

/* ===== TOC (table of contents) ===== */
.toc { display: grid; gap: 8px; }
.toc a {
    display: block;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--surface-3);
    color: var(--text);
    font-weight: 500;
    transition: background 180ms var(--ease), transform 180ms var(--ease);
    border: 1px solid transparent;
}
.toc a:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    transform: translateX(4px);
}
.toc a::after { content: "→"; margin-left: 8px; opacity: 0; transition: opacity 180ms var(--ease); }
.toc a:hover::after { opacity: 1; }

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-deep);
    color: var(--text-on-dark-muted);
    padding: 64px 0 24px;
    margin-top: 96px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.footer-contact { display: grid; gap: 8px; }
.footer-brand img { height: 40px; margin-bottom: 12px; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85em;
    color: var(--text-on-dark-muted);
}

/* ===== Documents / doc list ===== */
.doc-list { display: grid; gap: 10px; margin: 1em 0; padding: 0; list-style: none; }
.doc-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-weight: 500;
    transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}
.doc-list a:hover { border-color: var(--accent-soft); transform: translateY(-1px); color: var(--text); }
.doc-list a::before { content: "📄"; font-size: 1.1em; opacity: 0.7; }
.doc-list a strong { color: var(--text); }

/* ===== Sidebar (for partners page) ===== */
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.contact-card dl { display: grid; gap: 10px; }
.contact-card dt { font-size: 0.85em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-card dd { font-weight: 500; color: var(--text); margin-bottom: 4px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .calc-block { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .apparea { column-gap: 32px; }
}
@media (max-width: 760px) {
    :root { --header-h: 60px; }
    body { font-size: 0.95rem; }

    /* Header / Nav */
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-deep);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        padding: 12px 16px 20px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; gap: 2px; }
    .site-nav a { display: block; padding: 14px 16px; font-size: 1.05rem; }
    .header-inner { gap: 12px; padding: 0 16px; }
    .brand img { height: 30px; }

    /* Hero */
    .hero { padding: 48px 0 40px; }
    .hero-inner { padding: 0 12px; }
    .hero-eyebrow { font-size: 0.78em; padding: 5px 12px; margin-bottom: 16px; }
    .hero .lead { margin-top: 14px; }
    .hero .actions { margin-top: 24px; gap: 10px; }
    .hero .meta { margin-top: 36px; padding-top: 24px; gap: 16px 24px; }
    .hero .meta-item { font-size: 0.78em; }
    .hero .meta-item strong { font-size: 1.5em; }

    /* Layout */
    .container, .container-narrow { padding: 0 12px; }
    .section { padding: 36px 0; }
    .card { padding: 16px; border-radius: var(--radius); }
    .card-lg { padding: 12px; }
    .section-head { margin-bottom: 24px; }

    /* Clause images */
    .clause { padding: 8px 20px; }
    .clause img { height: 18px; }
    .clause-wrap { margin: 0 auto 16px; }

    /* Features */
    .feature-grid { grid-template-columns: 1fr; gap: 10px; }
    .feature { padding: 14px; gap: 12px; }
    .feature-icon { width: 28px; height: 28px; }

    /* Integration images */
    .integration_images { gap: 24px; }
    .integration_images img { padding: 8px; }
    .integration_images h3 { font-size: 0.95rem; }

    /* App area flex columns */
    .apparea { column-gap: 16px; }

    /* Forms */
    .form-grid { grid-template-columns: 1fr; gap: 20px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }

    /* Tables */
    .tbl th, .tbl td { padding: 10px 12px; font-size: 0.88em; }
    .tbl-responsive { margin-left: -20px; margin-right: -20px; padding: 0 20px; }

    /* Calculator */
    .calc-block { gap: 20px; }
    .calc-input { max-width: 100%; width: 100%; }
    .calc-result { font-size: 0.9em; }

    /* Documents */
    .doc-list a { padding: 12px 14px; font-size: 0.9em; gap: 10px; }

    /* Contact cards */
    .contact-card { padding: 20px; }

    /* Footer */
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .site-footer { padding: 40px 0 20px; margin-top: 48px; }
    .footer-bottom { margin-top: 24px; }

    /* TOC */
    .toc a { padding: 12px 14px; font-size: 0.95em; }

    /* Prose */
    .prose iframe { aspect-ratio: 16 / 9; margin: 1em 0; }
    .prose .picbig { margin: 1em auto; border-radius: var(--radius-sm); }

    /* Buttons touch targets */
    .btn { padding: 14px 22px; min-height: 48px; }
    .btn-lg { padding: 16px 28px; }
}
@media (max-width: 480px) {
    .hero .meta { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
    .hero .actions .btn { width: 100%; text-align: center; }
    .card { padding: 16px; }
    .card-lg { padding: 12px; }
    .section { padding: 28px 0; }
    .container, .container-narrow { padding: 0 12px; }
    .header-inner { padding: 0 12px; }
    .feature { padding: 12px; }
    .feature-text { font-size: 0.9em; }
    .prose h2 { font-size: 1.25rem; }
    .prose h3 { font-size: 1.05rem; }
    .section-head h2 { font-size: 1.3rem; }
    .section-head p { font-size: 0.95rem; }
    .integration_images img { padding: 6px; }
    .apparea { flex-direction: column; column-gap: 0; }
}
@media (max-width: 360px) {
    body { font-size: 0.9rem; }
    .hero-eyebrow { font-size: 0.72em; }
    .btn { font-size: 0.9em; padding: 12px 18px; }
    .hero .meta { grid-template-columns: 1fr; }
}

/* ===== Print ===== */
@media print {
    .site-header, .site-footer, .nav-toggle, .hero { display: none; }
    .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

.apparea {
    display: flex;
    flex-wrap: wrap;
    column-gap: 64px;
}
.integration_images{
        margin: 0 auto;
}