/* D-COS NEXUS — Dark Tech Enterprise design system */
:root {
  --bg: #04060c;
  --bg-2: #070c18;
  --night: #0a1428;
  --surface: rgba(14, 24, 46, 0.72);
  --surface-solid: #0d1730;
  --surface-2: #111e3b;
  --line: rgba(120, 160, 230, 0.16);
  --line-strong: rgba(120, 170, 255, 0.34);
  --blue: #2f6bff;
  --blue-2: #4d86ff;
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --silver: #b9c4d6;
  --muted: #8b98b0;
  --white: #eef4ff;
  --ok: #34d399;
  --warn: #fbbf24;
  --sim: #a78bfa;
  --hw: #38bdf8;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(77, 134, 255, 0.35), 0 0 24px rgba(47, 107, 255, 0.25);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container: 1200px;
  --gutter: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--silver);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(47, 107, 255, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(34, 211, 238, 0.08), transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--white); line-height: 1.2; margin: 0 0 .6em; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
code, .mono { font-family: var(--mono); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -200px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 28px; } }
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section--tight { padding: 48px 0; }
.section--alt { background: linear-gradient(180deg, rgba(10, 20, 40, 0.0), rgba(10, 20, 40, 0.65) 18%, rgba(10, 20, 40, 0.65) 82%, rgba(10, 20, 40, 0)); }
.eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); margin: 0 0 14px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--silver); max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.stack > * + * { margin-top: 14px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--white); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1rem; }
.brand-name span { color: var(--cyan); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-list { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav-list a { display: block; padding: 8px 11px; border-radius: 8px; color: var(--silver); font-size: .93rem; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--white); background: rgba(77, 134, 255, 0.12); text-decoration: none; }
.nav-list a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--cyan); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(13, 23, 48, .8); color: var(--white); cursor: pointer; font: inherit; font-size: .88rem; }
.icon-btn:hover { border-color: var(--line-strong); box-shadow: var(--glow); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-switch { position: relative; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); list-style: none; margin: 0; display: none; }
.lang-menu.open { display: block; }
.lang-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--silver); }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: rgba(77, 134, 255, .16); color: var(--white); text-decoration: none; }
.lang-menu .code { font-family: var(--mono); color: var(--cyan); font-size: .8rem; }
.menu-toggle { display: none; }
@media (max-width: 1080px) {
  .menu-toggle { display: inline-flex; }
  .nav { position: fixed; inset: 68px 0 auto 0; background: rgba(4, 6, 12, .97); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 20px; display: none; max-height: calc(100vh - 68px); overflow-y: auto; }
  .nav.open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: 12px 10px; font-size: 1rem; }
}
@media (max-width: 640px) {
  .header-actions .header-cta { display: none; }
  .brand-name { font-size: .92rem; }
}

.translation-notice { background: rgba(251, 191, 36, .08); border-bottom: 1px solid rgba(251, 191, 36, .35); color: #fdf0c8; font-size: .86rem; padding: 8px 0; }
.translation-notice a { color: #fde68a; text-decoration: underline; }
.lang-menu { max-height: 70vh; overflow-y: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: .98rem; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; font-family: inherit; text-align: center; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--blue), #1f4fd6); color: #fff; box-shadow: 0 6px 24px rgba(47, 107, 255, .35); }
.btn-primary:hover { color: #fff; box-shadow: 0 8px 30px rgba(47, 107, 255, .5); }
.btn-ghost { background: rgba(13, 23, 48, .6); color: var(--white); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--white); box-shadow: var(--glow); }
.btn-sm { padding: 8px 14px; font-size: .88rem; border-radius: 10px; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { position: relative; padding: clamp(64px, 10vw, 128px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { max-width: 420px; margin: 0 auto; } }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.4rem); letter-spacing: .02em; margin-bottom: .15em; background: linear-gradient(180deg, #fff 30%, #9fb7e8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .subtitle { font-family: var(--mono); color: var(--cyan); letter-spacing: .16em; font-size: clamp(.78rem, 1.6vw, 1rem); margin: 0 0 24px; }
.hero .lead { margin-bottom: 30px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%); }
.hero-visual svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 30px rgba(47, 107, 255, .25)); }
.orbit { transform-origin: 200px 200px; animation: spin 80s linear infinite; }
.orbit.rev { animation-direction: reverse; animation-duration: 120s; }
.pulse { animation: pulse 3.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--bg-2); padding: 22px 18px; }
.stat b { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--white); font-weight: 700; line-height: 1; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.stat span { font-size: .88rem; color: var(--muted); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: var(--line-strong); }
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; box-shadow: var(--glow); transform: translateY(-2px); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--cyan); margin-bottom: 14px; }
.card .icon svg { width: 22px; height: 22px; }
.card-kicker { font-family: var(--mono); font-size: .75rem; color: var(--cyan); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; display: block; }
.card ul { margin: .4em 0 0; }
.card li { margin: .25em 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 30px; margin: 10px 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--cyan-soft); box-shadow: inset 0 0 0 1px var(--cyan); }
.checklist li::after { content: ""; position: absolute; left: 6px; top: calc(.35em + 4px); width: 6px; height: 9px; border: solid var(--cyan); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; padding: 4px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; line-height: 1.2; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lvl-base { color: var(--cyan); }
.lvl-full { color: var(--ok); }
.lvl-core { color: #60a5fa; }
.lvl-hwsim { color: var(--hw); }
.lvl-domsim { color: var(--sim); }
.tag { display: inline-block; font-size: .78rem; padding: 3px 9px; border-radius: 6px; background: rgba(77, 134, 255, .12); color: var(--silver); border: 1px solid var(--line); margin: 2px 4px 2px 0; }
a.tag:hover { color: var(--white); border-color: var(--line-strong); text-decoration: none; }

.impl-implemented { color: var(--ok); }
.impl-partial { color: var(--warn); }
.owner-note { border-color: rgba(34, 211, 238, .5); background: linear-gradient(135deg, rgba(34, 211, 238, .08), rgba(14, 24, 46, .7)); }
.owner-note h2 { color: var(--cyan); }
.module-card .badge { white-space: normal; }

/* Right-to-left languages (Arabic) */
[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Arabic Typesetting", system-ui, sans-serif; }
[dir="rtl"] ul { padding-left: 0; padding-right: 1.2em; }
[dir="rtl"] .checklist li { padding-left: 0; padding-right: 30px; }
[dir="rtl"] .checklist li::before { left: auto; right: 0; }
[dir="rtl"] .checklist li::after { left: auto; right: 6px; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .note { border-left: 0; border-right: 3px solid var(--warn); border-radius: 10px 0 0 10px; }
[dir="rtl"] .note--info { border-right-color: var(--cyan); }
[dir="rtl"] .breadcrumb li + li::before { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .chat-launcher { right: auto; left: 18px; }
[dir="rtl"] .chat-panel { right: auto; left: 18px; }
[dir="rtl"] .msg.bot { border-top-left-radius: 14px; border-top-right-radius: 4px; }
[dir="rtl"] .msg.user { border-top-right-radius: 14px; border-top-left-radius: 4px; }
[dir="rtl"] .data-table th, [dir="rtl"] .data-table td, [dir="rtl"] .status-table th, [dir="rtl"] .status-table td { text-align: right; }
[dir="rtl"] select { background-position: 18px 50%, 13px 50%; padding-right: 13px; padding-left: 36px; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .mono, [dir="rtl"] code, [dir="rtl"] .mc-code, [dir="rtl"] .code-big { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 520px) { [dir="rtl"] .chat-panel { left: 12px; right: 12px; } }

/* Manifesto */
.manifesto { display: grid; gap: 16px; }
.manifesto-item { display: grid; grid-template-columns: 70px 1fr; gap: 20px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 600px) { .manifesto-item { grid-template-columns: 1fr; gap: 8px; } }
.manifesto-num { font-family: var(--mono); color: var(--cyan); font-size: 1.5rem; }
.manifesto-item blockquote { margin: 0 0 6px; font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: var(--white); font-weight: 600; }
.manifesto-item .tr { color: var(--cyan); font-size: .95rem; margin-bottom: 10px; font-style: italic; }
.motto { font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: var(--white); font-weight: 600; max-width: 900px; margin: 0 auto; line-height: 1.5; }
.motto span { color: var(--cyan); }

/* Notes */
.note { border-left: 3px solid var(--warn); background: rgba(251, 191, 36, .07); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--silver); font-size: .94rem; }
.note--info { border-color: var(--cyan); background: rgba(34, 211, 238, .06); }

/* Layers */
.layers { display: grid; gap: 8px; counter-reset: layer; }
.layer { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 10px; background: linear-gradient(90deg, rgba(47, 107, 255, .14), rgba(14, 24, 46, .6)); border: 1px solid var(--line); }
.layer::before { counter-increment: layer; content: counter(layer, decimal-leading-zero); font-family: var(--mono); color: var(--cyan); }
.layer b { color: var(--white); display: block; }
.layer span { font-size: .9rem; color: var(--muted); }

/* Architecture map */
.map-wrap { position: relative; background: radial-gradient(circle at 50% 50%, rgba(47, 107, 255, .12), transparent 65%); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.archmap { width: 100%; height: auto; display: block; max-height: 80vh; }
.archmap .link { stroke: rgba(120, 170, 255, .16); stroke-width: 1; fill: none; transition: stroke .2s, stroke-width .2s, opacity .2s; }
.archmap .node circle { transition: r .2s, stroke-width .2s; cursor: pointer; }
.archmap .node text { font-family: var(--mono); font-size: 10px; fill: var(--white); pointer-events: none; }
.archmap .node:focus { outline: none; }
.archmap .node:focus circle, .archmap .node:hover circle { stroke: #fff; stroke-width: 2.5; }
.archmap.has-active .link { opacity: .15; }
.archmap.has-active .link.on { opacity: 1; stroke: var(--cyan); stroke-width: 1.8; }
.archmap.has-active .node { opacity: .35; }
.archmap.has-active .node.on { opacity: 1; }
.archmap .area-label { font-family: var(--mono); font-size: 11px; fill: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.map-tip { position: absolute; pointer-events: none; background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; font-size: .85rem; max-width: 260px; box-shadow: var(--shadow); display: none; z-index: 5; color: var(--silver); }
.map-tip b { color: var(--white); display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; font-size: .85rem; }

/* Explorer */
.explorer-controls { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .explorer-controls { grid-template-columns: 1fr 1fr; } .explorer-controls .search { grid-column: 1 / -1; } }
@media (max-width: 480px) { .explorer-controls { grid-template-columns: 1fr; } }
label { display: block; font-size: .85rem; color: var(--silver); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--white); background: rgba(4, 8, 18, .8); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; min-height: 44px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: .9rem; color: var(--muted); }
.module-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.module-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.module-card .mc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.module-card .mc-code { font-family: var(--mono); color: var(--cyan); font-size: .9rem; }
.module-card h3 { font-size: 1.05rem; margin: 0; }
.module-card p { font-size: .9rem; margin: 0; color: var(--muted); }
.module-card .mc-foot { margin-top: auto; font-size: .78rem; color: var(--muted); }
.module-card[hidden] { display: none; }
.empty-state { padding: 30px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* Status table */
.status-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.status-table th, .status-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.status-table th { color: var(--muted); font-weight: 500; width: 55%; }
.st-yes { color: var(--ok); font-weight: 600; }
.st-no { color: var(--muted); }
.st-planned { color: var(--warn); font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--white); background: rgba(47, 107, 255, .1); font-weight: 600; }
.data-table tr:last-child td { border-bottom: 0; }

/* Module detail */
.module-hero { padding: 48px 0 24px; }
.module-hero .code-big { font-family: var(--mono); font-size: clamp(3rem, 9vw, 5.5rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--cyan); margin-bottom: 8px; }
.module-layout { display: grid; grid-template-columns: 1.4fr .9fr; gap: 28px; align-items: start; }
@media (max-width: 960px) { .module-layout { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .92rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--white); }
.level-box { padding: 16px; border-radius: 12px; border: 1px solid currentColor; background: rgba(255, 255, 255, .02); }
.level-box p { color: var(--silver); font-size: .9rem; margin: 8px 0 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--muted); padding-top: 22px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); }

.page-head { padding: 40px 0 8px; }

/* Process */
.process { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; counter-reset: step; }
@media (max-width: 1000px) { .process { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }
.step { padding: 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); color: var(--cyan); margin-bottom: 6px; }
.step b { color: var(--white); display: block; margin-bottom: 4px; }
.step span { font-size: .88rem; color: var(--muted); }

.path-card { display: flex; flex-direction: column; }
.path-card .btn { margin-top: auto; align-self: flex-start; }
.path-card h3 { font-family: var(--mono); letter-spacing: .06em; font-size: 1rem; color: var(--cyan); }

/* Sector */
.sector { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); scroll-margin-top: 90px; }
.sector + .sector { margin-top: 18px; }
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 26px; margin-top: 16px; }
@media (max-width: 900px) { .sector-grid { grid-template-columns: 1fr; } }
.sector-grid h4 { font-size: .8rem; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: 6px; }
.sector-grid ul { margin: 0; font-size: .93rem; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; color: var(--white); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-family: var(--mono); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 16px; }

/* Form */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field-error { color: var(--danger); font-size: .83rem; margin-top: 4px; display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); }
.field.invalid .field-error { display: block; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--blue); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.form-status { padding: 14px 16px; border-radius: 10px; font-size: .95rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .5); color: #c9f7e4; }
.form-status.err { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .5); color: #fde2e2; }
.form-status.warn { background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .5); color: #fdf0c8; }

/* CTA band */
.cta-band { border-radius: 20px; padding: clamp(28px, 5vw, 56px); background: linear-gradient(135deg, rgba(47, 107, 255, .22), rgba(34, 211, 238, .08)), var(--surface-solid); border: 1px solid var(--line-strong); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: .3em; }
.cta-band p { margin: 0; max-width: 620px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 28px; margin-top: 40px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 28px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: .78rem; font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--silver); }
.site-footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; }
.signature { font-family: var(--mono); letter-spacing: .08em; color: var(--white); }

/* Chatbot */
.chat-launcher { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--line-strong); background: linear-gradient(135deg, var(--blue), #163fae); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 30px rgba(47, 107, 255, .45); }
.chat-launcher svg { width: 28px; height: 28px; }
.chat-launcher:hover { box-shadow: 0 10px 36px rgba(47, 107, 255, .65); }
.chat-panel { position: fixed; right: 18px; bottom: 90px; z-index: 81; width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 120px)); background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow); display: none; flex-direction: column; overflow: hidden; }
.chat-panel.open { display: flex; }
@media (max-width: 520px) { .chat-panel { right: 12px; left: 12px; width: auto; bottom: 84px; height: calc(100vh - 100px); } }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; background: linear-gradient(90deg, rgba(47, 107, 255, .2), transparent); }
.chat-head b { color: var(--white); font-family: var(--mono); letter-spacing: .06em; font-size: .9rem; }
.chat-disclosure { font-size: .74rem; color: var(--muted); padding: 8px 16px; border-bottom: 1px solid var(--line); background: rgba(4, 8, 18, .5); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.5; white-space: pre-line; }
.msg.bot { background: var(--surface-2); color: var(--silver); border-top-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--blue); color: #fff; border-top-right-radius: 4px; align-self: flex-end; }
.msg .msg-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg .msg-links a { font-size: .8rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--cyan); }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chip { font: inherit; font-size: .78rem; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--silver); cursor: pointer; }
.chip:hover { color: var(--white); border-color: var(--cyan); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-height: 42px; }

/* Language landing */
.lang-landing { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.lang-landing .btn-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .chat-launcher, .chat-panel, .site-footer { display: none; }
  body { background: #fff; color: #000; }
}
