/* Cyber SwiftNode — main stylesheet. Logical properties are used everywhere so RTL/LTR both work.
   The hero deliberately uses PHYSICAL left/right placement (headline left, intro + CTA right,
   news panel lower-right) in both languages, matching the reference composition. */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --cyan: #22d3ee;
  --orange: #ff8a5b;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050b18; --bg-alt: #081226; --surface: #0c1830; --surface-2: #112240; --border: #1d3156;
  --text: #e9f1ff; --muted: #a3b6d4; --link: #5ee3f7; --accent: #22d3ee; --accent-ink: #04202a;
  --cta: #ff9a70; --warn-bg: rgba(255,138,91,.14); --warn: #ffb28f; --shadow: 0 10px 40px rgba(0,0,0,.45);
  --header-bg: rgba(5,11,24,.82);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f7fc; --bg-alt: #e9f0f9; --surface: #ffffff; --surface-2: #eef4fb; --border: #d3deec;
  --text: #0b1a2f; --muted: #46597a; --link: #0b6e8a; --accent: #0e7490; --accent-ink: #ffffff;
  --cta: #b4400d; --warn-bg: #fff1e8; --warn: #9a3412; --shadow: 0 10px 30px rgba(11,26,47,.10);
  --header-bg: rgba(243,247,252,.88);
}
html[dir="rtl"] { --dir: rtl; }
html[dir="ltr"] { --dir: ltr; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1.0625rem; line-height: 1.75; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
html[lang="en"] body { line-height: 1.65; }
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; unicode-bidi: isolate; }
.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

:focus-visible { outline: 3px solid var(--cta); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

/* ---------- buttons / badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.4rem; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; background: none; color: var(--text); line-height: 1.3; transition: background .2s, color .2s, border-color .2s; }
.btn-outline { border-color: var(--cta); color: var(--cta); }
.btn-outline:hover { background: var(--cta); color: #1b0d05; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--link); }
.btn-sm { padding: .4rem 1rem; font-size: .9rem; }
.btn .i-arrow { transition: transform .2s; }
html[dir="rtl"] .i-arrow { transform: scaleX(-1); }
.btn:hover .i-arrow, .more:hover .i-arrow { translate: 3px 0; }
html[dir="rtl"] .btn:hover .i-arrow, html[dir="rtl"] .more:hover .i-arrow { translate: -3px 0; }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .15rem .7rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--link); text-decoration: none; line-height: 1.7; }
a.badge:hover { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.brand img { display: block; }
.nav { margin-inline-start: auto; }
.nav ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; }
.nav a { display: block; padding: .45rem .8rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.nav a[aria-current="page"] { color: var(--link); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.tools { display: flex; align-items: center; gap: .3rem; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; color: var(--text); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
[data-theme="dark"] .i-sun { display: block; } [data-theme="dark"] .i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; } [data-theme="light"] .i-moon { display: block; }
.lang-switch { padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.lang-switch:hover { border-color: var(--accent); color: var(--link); }
.menu-btn { display: none; }

@media (max-width: 1099px) {
  .menu-btn { display: inline-grid; }
  .nav { position: absolute; inset-inline: 0; top: 100%; margin: 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; padding: .5rem 1rem 1rem; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: .1rem; }
  .nav a { padding: .8rem 1rem; font-size: 1rem; border-radius: 10px; }
}
@media (min-width: 1100px) { .nav-home, .nav-search { display: none; } }
@media (min-width: 561px) { .nav-search { display: none; } }
@media (max-width: 560px) { .search-link { display: none; } }
@media (max-width: 420px) { .brand-name { font-size: 1rem; } .icon-btn { width: 38px; height: 38px; } .header-inner { gap: .4rem; } .lang-switch { padding: .3rem .7rem; } }

/* ---------- hero ---------- */
.home-top { position: relative; }
.site-header.on-hero { position: absolute; inset-inline: 14px; top: 14px; z-index: 20; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; color: #eaf3ff; direction: var(--dir); }
.on-hero .header-inner { width: auto; padding-inline: clamp(1rem, 4vw, 3.4rem); min-height: 92px; }
.on-hero .brand, .on-hero .icon-btn, .on-hero .lang-switch { color: #eaf3ff; }
.on-hero .nav a { color: #b9cbe6; }
.on-hero .nav a:hover { color: #fff; background: rgba(34,211,238,.14); }
.on-hero .nav a[aria-current="page"] { color: #5ee3f7; background: rgba(34,211,238,.16); }
.on-hero .lang-switch { border-color: rgba(160,190,230,.35); }
.on-hero .icon-btn:hover { background: rgba(34,211,238,.16); }
@media (max-width: 1099px) {
  .on-hero .nav { background: #0a1630; border: 1px solid #1d3156; border-radius: 16px; inset-inline: 0; top: calc(100% - 8px); margin-inline: clamp(.5rem, 3vw, 2rem); }
}

.hero { position: relative; margin: 14px 14px 0; border-radius: 26px; overflow: hidden; isolation: isolate; color: #eaf3ff; direction: ltr;
  min-height: clamp(700px, 94vh, 880px); background: #040913; }
.hero-bg { position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(60% 55% at 78% 0%, rgba(120,48,18,.55), transparent 70%),
    radial-gradient(70% 70% at 22% 8%, rgba(10,84,140,.55), transparent 68%),
    radial-gradient(60% 50% at 52% 78%, rgba(14,110,170,.28), transparent 70%),
    linear-gradient(180deg, #06142b 0%, #040913 60%, #03060e 100%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(70,150,210,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(70,150,210,.06) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(180deg, transparent 35%, #000 100%); mask-image: linear-gradient(180deg, transparent 35%, #000 100%); }
.hero-art { position: absolute; z-index: -1; inset-inline: 0; bottom: -9%; margin-inline: auto; width: min(80%, 820px); aspect-ratio: 1000 / 820; left: 50%; translate: -50% 0; pointer-events: none; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .brain { animation: float 9s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hero-grid { position: relative; min-height: inherit; padding: 128px clamp(1.25rem, 5vw, 4.2rem) 0; }
.hero .box { direction: var(--dir); text-align: start; }
.hero-copy { width: fit-content; max-width: min(640px, 62%); }
.eyebrow { margin: 0 0 .8rem; color: #8fb3d9; font-size: .95rem; letter-spacing: .02em; }
.hero h1 { font-weight: 500; font-size: clamp(2rem, 3.9vw, 3.5rem); line-height: 1.32; margin: 0; color: #f4f8ff; }
html[lang="en"] .hero h1 { line-height: 1.12; letter-spacing: -.01em; }
.hero h1 .accent { color: var(--cyan); display: block; text-shadow: 0 0 28px rgba(34,211,238,.35); }
.hero h1 .l2 { display: block; }

.hero-features { list-style: none; margin: 0; padding: 0; position: absolute; left: clamp(1.25rem, 5vw, 4.2rem); top: 49%; width: min(270px, 26%); display: grid; gap: 2rem; }
.hero-features li { display: grid; gap: .5rem; }
.hero-features .f-ico { color: #9fc4ea; display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; }
.hero-features .f-ico-alt { background: radial-gradient(circle, rgba(34,211,238,.28), rgba(12,50,68,.9)); border: 1px solid rgba(34,211,238,.35); color: #bff3ff; }
.hero-features h2 { font-size: 1.25rem; font-weight: 500; margin: 0 0 .15rem; }
.hero-features h2 a { color: #f1f6ff; text-decoration: none; }
.hero-features h2 a:hover { color: var(--cyan); }
.hero-features p { margin: 0; color: #8da6c6; font-size: .9rem; line-height: 1.6; }

.hero-side { position: absolute; right: clamp(1.25rem, 5vw, 4.2rem); top: 25%; width: min(320px, 27%); }
.hero-side p { color: #a9bdd8; font-size: .95rem; line-height: 1.8; margin-bottom: 1.4rem; }
.hero .btn-outline { border-color: #ff7a45; color: #ff9a70; padding: .8rem 2rem; background: rgba(255,122,69,.06); }
.hero .btn-outline:hover { background: #ff7a45; color: #1b0d05; }

.hero-panel { position: absolute; right: clamp(1.25rem, 4vw, 3.5rem); bottom: 0; width: clamp(310px, 31%, 390px); background: rgba(12,16,24,.94); border: 1px solid rgba(120,150,190,.14); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 1.2rem 1.3rem .6rem; box-shadow: 0 -10px 50px rgba(0,0,0,.4); }
.hero-panel ul { list-style: none; margin: 0; padding: 0; }
.panel-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; }
.panel-row h2 { margin: 0; font-size: 1.35rem; font-weight: 600; color: #fff; }
.panel-row a { color: #ff9a70; font-size: .9rem; font-weight: 600; text-decoration: none; }
.panel-row a:hover { text-decoration: underline; }
.panel-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; text-decoration: none; color: #eaf3ff; border-top: 1px solid rgba(120,150,190,.14); }
.panel-item:hover strong { color: var(--cyan); }
.panel-text { display: grid; gap: .2rem; min-width: 0; }
.panel-text strong { font-weight: 500; font-size: .98rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.panel-text span { color: #8da6c6; font-size: .8rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.panel-item img { flex: none; width: 96px; height: 60px; object-fit: cover; border-radius: 8px; }

.scroll-down { position: absolute; left: clamp(1.25rem, 5vw, 4.2rem); bottom: 38px; display: inline-flex; align-items: center; gap: .8rem; color: #ff9a70; font-weight: 600; text-decoration: none; }
.scroll-down .wheel { animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(6px); opacity: 0; } 100% { opacity: 0; } }
.scroll-down:hover { color: #ffc2a8; }

@media (max-width: 1099px) {
  .hero { min-height: 0; }
  .hero-grid { display: grid; gap: 1.6rem; padding-bottom: 0; padding-top: 112px; }
  .hero-copy { max-width: none; }
  .hero-features, .hero-side, .hero-panel, .scroll-down { position: static; width: auto; }
  .hero-art { position: relative; order: 0; inset: auto; translate: none; left: auto; width: min(100%, 640px); margin: -.5rem auto -3rem; bottom: auto; }
  .hero-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
  .hero-side { max-width: 560px; }
  .hero-panel { margin: .5rem -1.25rem 0; border-radius: 18px 18px 0 0; padding-inline: 1.25rem; }
  .scroll-down { display: none; }
}
@media (max-width: 1099px) { .hero { display: flex; flex-direction: column; } .hero-grid { order: 1; } .hero-art { order: 2; } .hero-grid { display: contents; } .hero-copy { order: 0; padding: 112px clamp(1.25rem, 5vw, 3rem) 0; } .hero-features { order: 3; padding: 0 clamp(1.25rem, 5vw, 3rem); } .hero-side { order: 4; padding: 0 clamp(1.25rem, 5vw, 3rem); margin-top: 1.2rem; } .hero-panel { order: 5; margin: 1.6rem 0 0; border-radius: 0; border-inline: 0; } .hero-art { order: 2; margin: 0 auto -2rem; } }
@media (max-width: 560px) { .hero { margin: 8px 8px 0; border-radius: 20px; } .site-header.on-hero { inset-inline: 8px; top: 8px; } .on-hero .header-inner { min-height: 76px; } .hero-copy { padding-top: 92px; } .hero-features { grid-template-columns: 1fr; } }

/* ---------- sections / cards ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.section-sub { margin-bottom: 1.6rem; }
.page-head { padding-block: clamp(2.2rem, 5vw, 3.8rem) 0; background: radial-gradient(60% 120% at 90% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: .3em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1.4rem; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: var(--shadow); }
.card[hidden] { display: none; }
.card-media { display: block; aspect-ratio: 16 / 10; background: #071a33; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; align-items: flex-start; }
.card-title { font-size: 1.15rem; margin: 0; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.badge { position: relative; z-index: 2; }
.card-title a:hover { color: var(--link); text-decoration: underline; }
.card-text { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; margin: auto 0 0; color: var(--muted); font-size: .85rem; padding-top: .3rem; }
.card-featured { flex-direction: row; }
.card-featured .card-media { flex: 1 1 48%; aspect-ratio: auto; min-height: 280px; }
.card-featured .card-body { flex: 1 1 52%; padding: clamp(1.4rem, 3vw, 2.4rem); justify-content: center; }
.card-featured .card-title { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.card-featured .card-text { -webkit-line-clamp: 5; font-size: 1.02rem; }
@media (max-width: 760px) { .card-featured { flex-direction: column; } .card-featured .card-media { aspect-ratio: 16/10; min-height: 0; flex: none; } }

.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.2rem; }
.cat-card { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; align-items: stretch; }
.cat-card img { flex: none; width: 112px; border-radius: 10px; object-fit: cover; align-self: flex-start; aspect-ratio: 16/10; }
.cat-card h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.cat-card h3 a { color: var(--text); text-decoration: none; }
.cat-card h3 a:hover { color: var(--link); }
.cat-card p { color: var(--muted); font-size: .9rem; line-height: 1.65; margin-bottom: .5rem; }
.more { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; text-decoration: none; }

/* ---------- finder (search + filters) ---------- */
.finder-form { position: relative; display: flex; align-items: center; margin-bottom: 1rem; max-width: 640px; }
.finder-icon { position: absolute; inset-inline-start: 1rem; color: var(--muted); display: grid; pointer-events: none; }
.finder-input { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; padding: .8rem 3rem; }
.finder-input::placeholder { color: var(--muted); opacity: .85; }
.finder-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.finder-input::-webkit-search-cancel-button { display: none; }
.finder-clear { position: absolute; inset-inline-end: .4rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.finder-clear:hover { background: var(--surface-2); color: var(--text); }
.finder-clear[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip { font: inherit; font-size: .92rem; font-weight: 500; padding: .35rem 1rem; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.finder-count { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; min-height: 1.5em; }
.finder-empty { padding: 2rem; text-align: center; color: var(--muted); border: 1.5px dashed var(--border); border-radius: var(--radius); }

/* ---------- market ---------- */
.market { background: var(--bg-alt); }
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; margin: 1.2rem 0; }
.market-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.market-card h3 { font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: .4rem; }
.market-value { font-size: 1.7rem; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
.market-value small { font-size: .9rem; font-weight: 500; color: var(--muted); margin-inline-start: .3rem; }
.market-change { font-size: .9rem; font-weight: 600; margin-top: .3rem; }
.up { color: #17a773; } .down { color: #e5484d; }
[data-theme="dark"] .up { color: #4ade9b; } [data-theme="dark"] .down { color: #ff7b80; }

/* ---------- article ---------- */
.breadcrumb { padding-block: 1.2rem .4rem; font-size: .9rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .6rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-inline-end: .6rem; opacity: .7; }
html[dir="rtl"] .breadcrumb li + li::before { content: "‹"; }
.breadcrumb a { color: var(--link); }
.article-head { max-width: 860px; padding-block: 1rem 1.6rem; }
.article-head h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: .6rem 0 .5rem; }
.article-head .lead { margin-bottom: 1rem; }
.article-head .meta { margin: 0 0 1.2rem; padding: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.article-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; align-items: start; padding-bottom: 3rem; }
.toc { position: sticky; top: 90px; font-size: .92rem; }
.toc h2 { font-size: .95rem; color: var(--muted); font-weight: 600; margin-bottom: .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--border); }
.toc a { display: block; padding: .35rem .9rem; color: var(--text); text-decoration: none; line-height: 1.5; }
.toc a:hover { color: var(--link); background: var(--surface-2); }
.prose { min-width: 0; max-width: 740px; font-size: 1.08rem; }
.prose h2 { font-size: 1.55rem; margin-top: 2.2em; scroll-margin-top: 90px; }
.prose p, .prose li { line-height: 1.95; }
html[lang="en"] .prose p, html[lang="en"] .prose li { line-height: 1.75; }
.prose ul, .prose ol { padding-inline-start: 1.5rem; margin-bottom: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose pre { direction: ltr; text-align: left; background: #06101f; color: #d8e8ff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.2rem; overflow-x: auto; font-size: .9rem; line-height: 1.7; margin: 1.2em 0; }
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.callout { border-inline-start: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); padding: 1rem 1.3rem; border-radius: var(--radius-sm); margin: 1.5em 0; }
.takeaways { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-bottom: 2rem; }
.takeaways h2 { font-size: 1.15rem; margin: 0 0 .5rem; scroll-margin-top: 90px; }
.takeaways ul { margin: 0; }
.notice { margin-top: 2.5rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); font-size: .92rem; }
.related { border-top: 1px solid var(--border); padding-block: 2.5rem 3.5rem; }
.related h2 { font-size: 1.5rem; margin-bottom: 1.4rem; }
.prose-page { max-width: 760px; }
@media (max-width: 960px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; }
}

/* ---------- contact ---------- */
.contact-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; align-items: start; }
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .9rem; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.field .err { border-color: #e5484d; }
.form-status { min-height: 1.5em; margin: 0; font-weight: 600; color: var(--link); }
.form-status.error { color: #e5484d; }
[data-theme="dark"] .form-status.error { color: #ff7b80; }
.form .btn { justify-self: start; }
.contact-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.contact-side h2 { font-size: 1.05rem; }
@media (max-width: 860px) { .contact-wrap { grid-template-columns: 1fr; gap: 1.5rem; } .contact-side { order: -1; } }

/* ---------- 404 ---------- */
.nf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding-block: 4rem; }
.nf-block h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.nf-block p { color: var(--muted); }
.nf-block .btn { margin-top: .5rem; }
@media (max-width: 760px) { .nf-grid { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.5rem; } }

/* ---------- footer ---------- */
.site-footer { margin-top: 0; background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: 2.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.footer-brand p { color: var(--muted); max-width: 38ch; margin-top: .8rem; font-size: .95rem; }
.footer-h { font-size: .95rem; color: var(--muted); font-weight: 600; margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer ul a { color: var(--text); text-decoration: none; font-size: .95rem; }
.site-footer ul a:hover { color: var(--link); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2rem; padding-block: 1.2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.footer-bottom p { margin: 0; }
.to-top { color: var(--link); font-weight: 600; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- toast ---------- */
.toast { position: fixed; inset-inline: 0; bottom: 1.5rem; margin-inline: auto; width: fit-content; max-width: calc(100% - 2rem); background: var(--surface-2); color: var(--text); border: 1px solid var(--accent); border-radius: 999px; padding: .65rem 1.3rem; box-shadow: var(--shadow); z-index: 200; font-weight: 600; font-size: .95rem; }
.toast[hidden] { display: none; }

@media print { .site-header, .site-footer, .toc, .actions, .related, .toast { display: none !important; } body { background: #fff; color: #000; } }

/* Cyber SwiftNode — compact premium market cards */
.market { padding-block: 1.4rem; }
.market .section-head { margin-bottom: .6rem; }
.market-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin: .8rem 0;
}
.market-card {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border-radius: 14px;
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  transition: transform .2s ease, border-color .2s ease;
}
.market-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.market-card h3 { font-size: .92rem; }
.market-value { font-size: clamp(1.05rem, 1.8vw, 1.5rem); overflow-wrap: anywhere; }
.market-change { font-size: .82rem; }
@media (max-width: 640px) {
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .market-card { padding: .85rem; }
  .market-value { font-size: clamp(1rem, 4vw, 1.3rem); }
}
