/* ═══════════════════════════════════════════════════════════
   ئەندازیارنامە · Engineerpedia — minimal design on the animated blueprint background.
   Logical properties everywhere so RTL (ku, ar) and LTR (en, de) both work.
   Layout: one centred column (max 1180px), sections separated by space, thin hairlines for structure.
   ═══════════════════════════════════════════════════════════ */

/* ─────────── Zain (self-hosted, Google Fonts, SIL OFL) ─────────── */
@font-face { font-family: 'Zain'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/zain-arabic-400.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Zain'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/zain-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2070-209F, U+20A0-20BF; }
@font-face { font-family: 'Zain'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/zain-arabic-700.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Zain'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/zain-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2070-209F, U+20A0-20BF; }
@font-face { font-family: 'Zain'; font-style: normal; font-weight: 900; font-display: swap; src: url('../fonts/zain-arabic-900.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Zain'; font-style: normal; font-weight: 900; font-display: swap; src: url('../fonts/zain-latin-900.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2070-209F, U+20A0-20BF; }

:root {
  color-scheme: dark;
  --bg: #03060d;
  --surface: rgba(9, 16, 30, .64);
  --surface-2: rgba(13, 23, 42, .8);
  --line: rgba(140, 180, 255, .12);
  --line-2: rgba(140, 180, 255, .22);
  --ink: #eef3fb;
  --ink-2: #b6c3d6;
  --muted: #7e8ea6;
  --green: #4ade80;
  --accent: #FFB81C;
  --accent-rgb: 255, 184, 28;
  --accent-ink: #0a1220;
  --radius: 18px;
  --ease: cubic-bezier(.22, .7, .28, 1);
  --font: 'Zain', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --wrap: 1180px;
  --top: calc(66px + env(safe-area-inset-top, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 20px; line-height: 1.8;
  overflow-x: hidden; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
@supports (overflow-x: clip) { body { overflow-x: clip; } }
html[dir="ltr"] body { font-size: 19px; line-height: 1.7; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
em { font-style: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.svg-defs { position: absolute; width: 0; height: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(var(--accent-rgb), .35); color: #fff; }
.ic { width: 1.1em; height: 1.1em; flex: none; }
html[dir="rtl"] .flip { transform: scaleX(-1); }
html[lang="de"] :is(h1, h2, h3, b) { hyphens: auto; -webkit-hyphens: auto; }

/* ─────────── Background layers (unchanged look) ─────────── */
/* every fixed layer is as tall as the largest viewport, so a phone's address bar showing or hiding never resizes them */
#bg, .grid-layer, .vignette { top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; }
#bg { position: fixed; z-index: 0; pointer-events: none; display: block; width: 100%; }
.grid-layer {
  position: fixed; z-index: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, #000 30%, transparent 100%);
}
.grid-layer::before {
  content: ''; position: absolute; inset: 0 0 -120px 0;
  background-image:
    linear-gradient(rgba(95, 150, 235, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 150, 235, .07) 1px, transparent 1px),
    linear-gradient(rgba(95, 150, 235, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 150, 235, .03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  transform: translate3d(0, var(--gy, 0px), 0);
}
/* vignette and film grain share one layer (the grain's 5% opacity is inside the SVG): one full-screen layer less to blend on every frame */
.vignette { position: fixed; z-index: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E"), radial-gradient(ellipse at 50% 40%, transparent 42%, rgba(0, 0, 0, .66)); }

/* ─────────── Helmet (SVG, still) ─────────── */
.helmet { width: 100%; height: auto; overflow: visible; }
.helmet .hc { fill: var(--hc); }
.helmet .h-shadow { fill: url(#hg-shadow); }
.helmet .o-hi { fill: url(#hg-hi); }
.helmet .o-sh { fill: url(#hg-sh); }
.helmet .o-side { fill: url(#hg-side); }
.helmet .o-brim { fill: url(#hg-brim); }
.helmet .o-edge { fill: url(#hg-edge); }
.helmet .o-rib { fill: url(#hg-rib); }
.helmet .o-band { fill: #000; opacity: .26; }
.helmet .s-rib { fill: none; stroke: #000; stroke-opacity: .16; stroke-width: 3.2; stroke-linecap: round; }
.helmet .s-ribhi { fill: none; stroke: #fff; stroke-opacity: .3; stroke-width: 1.4; stroke-linecap: round; }
.helmet .s-lip { fill: none; stroke: #fff; stroke-opacity: .4; stroke-width: 1.6; stroke-linecap: round; }
.helmet .s-rim { fill: none; stroke: #fff; stroke-opacity: .2; stroke-width: 1.2; }
.helmet .spec { fill: url(#hg-spec); }
.helmet .spec2 { fill: #fff; opacity: .6; }

/* ─────────── Text motion (from the text-motion kit; colours are the site's own) ─────────── */
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-in { animation: page-in .7s cubic-bezier(.25, .6, .3, 1) both; }

.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

.js-reveal .reveal.words { opacity: 1; transform: none; }
.js-reveal .reveal.words .word { display: inline-block; opacity: 0; transform: translateY(11px); transition: opacity .62s cubic-bezier(.25, .6, .3, 1), transform .62s cubic-bezier(.25, .6, .3, 1); }
.js-reveal .reveal.words.is-in .word { opacity: 1; transform: none; }

.js-reveal .reveal.lines { opacity: 1; transform: none; }
.js-reveal .reveal.lines:not([data-lines]) { opacity: 0; }
.js-reveal .tline { display: block; overflow: hidden; padding: .16em .12em; margin: -.16em -.12em; }
.js-reveal .tline-in { display: block; transform: translateY(102%); opacity: 0; transition: transform .8s cubic-bezier(.25, .6, .3, 1), opacity .6s cubic-bezier(.25, .6, .3, 1); }
.js-reveal .reveal.lines.is-in .tline-in { transform: none; opacity: 1; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ─────────── Top bar ─────────── */
.topbar { position: fixed; top: 0; inset-inline: 0; z-index: 60; padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid transparent; transition: background .35s, border-color .35s; }
.topbar.scrolled { background: rgba(3, 6, 13, .9); border-color: var(--line); }
.topbar-in { max-width: var(--wrap); margin-inline: auto; height: 66px; padding-inline: 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 900; line-height: 1; }
.brand b { white-space: nowrap; }
.brand-helmet { width: 38px; }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav a { padding: 6px 12px; border-radius: 10px; font-size: 17px; color: var(--ink-2); transition: color .25s, background .25s; }
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.nav .nav-cta { color: var(--accent); }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 12px; border-radius: 12px; border: 1px solid var(--line-2); font-size: 15px; color: var(--ink-2); transition: border-color .25s, color .25s; }
.lang-btn:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), .55); }
.lang-btn b { font-weight: 700; letter-spacing: .06em; }
.lang-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 190px; padding: 6px; border-radius: 14px; background: #0a1322; border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; }
.lang.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: 17px; text-align: start; }
.lang-menu button:hover { background: rgba(255, 255, 255, .05); }
.lang-menu button.on { color: var(--accent); }
.lang-menu small { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); place-items: center; }
.menu-btn .ic { width: 22px; height: 22px; }
.menu-btn .ic + .ic, body.menu-open .menu-btn .ic:first-child { display: none; }
body.menu-open .menu-btn .ic + .ic { display: block; }

/* ─────────── Layout ─────────── */
main { position: relative; z-index: 1; }
body.switching main { opacity: .4; transition: opacity .2s; }
.sec { position: relative; z-index: 1; max-width: var(--wrap); margin-inline: auto; padding-block: 104px; padding-inline: 20px; }
.sec-head { max-width: 780px; margin-block-end: 44px; }
.label { display: flex; align-items: center; gap: 10px; margin-block-end: 12px; font-size: 15px; font-weight: 700; color: var(--accent); }
.label::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.label bdi { color: var(--muted); font-weight: 400; }
.h2 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 900; line-height: 1.18; text-wrap: balance; }
.h2 .t2 { color: var(--accent); }
.lead { margin-block-start: 16px; max-width: 62ch; font-size: clamp(18px, 1.5vw, 20.5px); line-height: 1.9; color: var(--ink-2); }
.sub { display: flex; align-items: center; gap: 10px; margin-block-end: 10px; font-size: 23px; font-weight: 800; line-height: 1.4; }
.sub .ic { width: 22px; height: 22px; color: var(--accent); }
.note { margin-block-end: 20px; max-width: 72ch; font-size: 16.5px; color: var(--muted); }
.block { margin-block-start: 56px; }
.sec-head + .block { margin-block-start: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.panel { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.n { font-variant-numeric: tabular-nums; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding-inline: 24px; border-radius: 14px; font-size: 18px; font-weight: 700; transition: background .25s, border-color .25s, color .25s, transform .25s; }
.btn .ic { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { transform: translateY(-2px); }
.btn.ghost { border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); }
.btn.ghost:hover { border-color: rgba(var(--accent-rgb), .6); }

/* ─────────── Hero ─────────── */
.hero { position: relative; z-index: 1; max-width: 920px; margin-inline: auto; padding-block: calc(var(--top) + 96px) 88px; padding-inline: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-helmet { width: 128px; margin-block-end: 26px; }
.kicker { margin-block-end: 16px; font-size: 14px; font-weight: 700; letter-spacing: .2em; color: var(--muted); }
.hero-title { font-size: clamp(46px, 8vw, 96px); font-weight: 900; line-height: 1.1; text-wrap: balance; }
.hero-title .ln { display: block; }
.hero-title .acc { color: var(--accent); }
.hero-lead { margin-block-start: 24px; max-width: 58ch; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.9; color: var(--ink-2); }
.hero-cta { margin-block-start: 34px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ─────────── Explore (site guide) ─────────── */
.hub-sec { padding-block-start: 40px; }
.hub { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hub-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 196px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .3s, background .3s; }
.hub-card:hover { border-color: rgba(var(--accent-rgb), .55); background: var(--surface-2); }
.hub-n { position: absolute; top: 18px; inset-inline-end: 20px; font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.hub-ic { width: 30px; height: 30px; margin-block-end: 8px; color: var(--accent); }
.hub-card b { font-size: 20px; font-weight: 800; line-height: 1.35; }
.hub-d { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.hub-go { margin-block-start: auto; width: 20px; height: 20px; color: var(--muted); transition: color .25s, translate .25s; }
.hub-card:hover .hub-go { color: var(--accent); translate: 4px 0; }
html[dir="rtl"] .hub-card:hover .hub-go { translate: -4px 0; }

/* ─────────── Kurdish engineers ─────────── */
.kurds { --kr: #ED2024; --kg: #278E43; --ks: #FEBD11; }
.k-flag { width: 54px; height: 36px; margin-block-end: 20px; border-radius: 5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.kurds .label { color: var(--ks); }
.kurds .h2 .t2 { color: var(--ks); }
.k-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kcard { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-areas: 'ph head' 'more more'; column-gap: 20px; align-items: start; padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.k-ph { grid-area: ph; }
.k-head { grid-area: head; min-width: 0; align-self: center; }
.k-more { grid-area: more; min-width: 0; }
.kcard::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--kr) 0 33.3%, #fff 33.3% 66.6%, var(--kg) 66.6%); opacity: .85; }
.kcard.wide { grid-column: 1 / -1; grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: 'ph head' 'ph more'; grid-template-rows: auto 1fr; }
.kcard.feat { grid-column: 1 / -1; grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: 'ph head' 'ph more'; grid-template-rows: auto 1fr; border-color: rgba(254, 189, 17, .32); background: linear-gradient(135deg, rgba(254, 189, 17, .07), var(--surface) 55%); }
.k-ph { aspect-ratio: 4 / 5; border-radius: 16px; background: rgba(254, 189, 17, .08); }
.kcard.feat .k-head { align-self: start; }
.kcard:not(.feat) .k-badge { inset-inline-start: 6px; inset-block-end: 6px; padding: 4px 7px; }
.kcard:not(.feat) .k-badge small { display: none; }
.k-badge { position: absolute; inset-inline-start: 10px; inset-block-end: 10px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(3, 6, 13, .82); border: 1px solid rgba(254, 189, 17, .45); line-height: 1.2; }
.k-badge .ic { width: 20px; height: 20px; color: var(--ks); }
.k-badge b { display: block; font-size: 15px; font-weight: 900; color: var(--ks); direction: ltr; }
.k-badge small { display: block; font-size: 11px; color: var(--ink-2); direction: ltr; }
.k-rank { font-size: 15px; font-weight: 700; color: var(--ks); }
.kcard h3 { font-size: 26px; font-weight: 900; line-height: 1.3; }
.kcard.feat h3 { font-size: clamp(28px, 3vw, 36px); }
.k-en { display: block; font-size: 14px; color: var(--muted); unicode-bidi: isolate; }
html[dir="rtl"] .k-en { text-align: right; }
.k-at { display: flex; gap: 8px; margin-block-start: 8px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.k-at .ic { margin-block-start: 5px; color: var(--ks); }
.k-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 16px 12px; border-block: 1px solid var(--line); }
.k-stats div { padding: 12px 8px; }
.k-stats div + div { border-inline-start: 1px solid var(--line); }
.k-stats b { display: block; font-size: clamp(24px, 2.4vw, 32px); font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
html[dir="rtl"] .k-stats b { text-align: right; }
.k-stats b em { color: var(--ks); }
.k-stats span { font-size: 14px; color: var(--muted); line-height: 1.4; }
.k-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 15px; color: var(--ink-2); }
.k-top .ic { color: var(--ks); }
.k-top i { padding: 1px 9px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: #1a1300; background: var(--ks); }
.kcard h4 { display: flex; align-items: center; gap: 8px; margin-block: 18px 6px; font-size: 17px; font-weight: 800; }
.kcard h4 .ic { color: var(--ks); }
.k-edu { margin: 0; padding: 0; list-style: none; border-inline-start: 2px solid var(--line-2); }
.k-edu li { position: relative; display: flex; gap: 12px; padding-block: 6px; padding-inline-start: 16px; font-size: 15.5px; line-height: 1.6; }
.k-edu li::before { content: ''; position: absolute; inset-inline-start: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ks); }
.k-edu b { flex: none; min-width: 4.4em; font-size: 14px; color: var(--ks); }
html[dir="rtl"] .k-edu b { text-align: right; }
.k-edu span { min-width: 0; }
.k-edu small { display: block; font-size: 14px; color: var(--muted); }
.k-hi li { display: flex; gap: 10px; padding-block: 6px; font-size: 15.5px; line-height: 1.75; color: var(--ink-2); }
.k-hi li::before { content: ''; flex: none; width: 6px; height: 6px; margin-block-start: .8em; border-radius: 50%; background: var(--ks); }
.kcard.feat .k-hi, .kcard.wide .k-hi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.kcard .links a:hover { border-color: rgba(254, 189, 17, .6); }
.k-note { margin-block-start: 18px; }

/* ─────────── Developer: research + Telegram ─────────── */
.author { max-width: 980px; }
.paper { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.paper-cover { display: block; align-self: start; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transition: transform .3s; }
.paper-cover:hover { transform: translateY(-3px); }
.paper-cover img { width: 100%; height: auto; }
.paper-b { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.paper .tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13.5px; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .4); }
.paper h3 { font-size: 23px; font-weight: 900; line-height: 1.4; }
.paper em { font-size: 14px; color: var(--muted); unicode-bidi: isolate; }
html[dir="rtl"] .paper em { text-align: right; }
.paper-b > p { font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.paper-pts li { display: flex; gap: 10px; padding-block: 4px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.paper-pts .ic { margin-block-start: 5px; color: var(--green); }
.paper-meta { font-size: 14px !important; color: var(--muted) !important; }
.paper-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 8px; }

/* ─────────── Links from a department to the pages ─────────── */
.related { margin-block-start: 40px; padding: 20px; border-radius: var(--radius); border: 1px dashed var(--line-2); }
.related p { margin-block-end: 10px; font-size: 15px; font-weight: 700; color: var(--muted); }
.related > div { display: flex; flex-wrap: wrap; gap: 8px; }
.related a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 14px; border-radius: 12px; border: 1px solid var(--line-2); font-size: 15.5px; transition: border-color .2s, background .2s; }
.related a .ic { color: var(--c, var(--accent)); }
.related a:hover { border-color: rgba(var(--c-rgb, var(--accent-rgb)), .6); background: rgba(var(--c-rgb, var(--accent-rgb)), .06); }

/* ─────────── Extra pages (shared) ─────────── */
.p-hero { position: relative; z-index: 1; max-width: var(--wrap); margin-inline: auto; padding-block: calc(var(--top) + 64px) 28px; padding-inline: 20px; }
.p-title { font-size: clamp(40px, 6vw, 76px); font-weight: 900; line-height: 1.12; text-wrap: balance; max-width: 18ch; }
.p-lead { max-width: 70ch; }
.p-body { position: relative; z-index: 1; }
.p-body > .sec:first-child { padding-block-start: 40px; }
.p-tabs { position: sticky; top: var(--top); z-index: 40; background: rgba(3, 6, 13, .94); border-block: 1px solid var(--line); }
.p-tabs-in { max-width: var(--wrap); margin-inline: auto; padding-inline: 8px; display: flex; overflow-x: auto; scrollbar-width: none; }
.p-tabs-in::-webkit-scrollbar { display: none; }
.p-tabs button, .p-tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 13px 14px; font-size: 16px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; transition: color .25s, border-color .25s; }
.p-tabs .ic { width: 18px; height: 18px; }
.p-tabs :is(button, a):hover { color: var(--ink-2); }
.p-tabs :is(button, a).on { color: var(--ink); border-color: var(--accent); }
.nav a.on { color: var(--accent); }

/* Tall photos are shown whole over a blurred copy; logos/seals sit on a light plate */
.ph.tall img { object-fit: contain; z-index: 1; }
.ph.tall::before { content: ''; position: absolute; inset: -24px; background: var(--ph) center / cover no-repeat; filter: blur(22px) brightness(.5) saturate(1.1); }
.ph.svgimg { background: #f4f6fa !important; }
.ph.svgimg img { object-fit: contain; padding: 12%; }
.ph .ph-fb, .proj-y { z-index: 2; }

/* ─────────── Numbers ─────────── */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 26px 20px 4px; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat .ic { width: 26px; height: 26px; color: var(--accent); margin-block-end: 6px; }
.stat b { font-size: clamp(40px, 4.4vw, 56px); font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; text-align: left; }
html[dir="rtl"] .stat b, html[dir="rtl"] .mini .volt, html[dir="rtl"] .std .key { text-align: right; }
.stat b em { color: var(--accent); }
.stat span { font-size: 17px; color: var(--muted); line-height: 1.5; }

/* ─────────── Departments ─────────── */
.search { display: flex; align-items: center; gap: 12px; max-width: 520px; height: 56px; padding-inline: 18px; margin-block-end: 28px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .25s; }
.search:focus-within { border-color: rgba(var(--accent-rgb), .6); }
.search .ic { width: 20px; height: 20px; color: var(--muted); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font-size: 18px; }
.search input::placeholder { color: var(--muted); }
.dept-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.empty { grid-column: 1 / -1; color: var(--muted); }
.dcard { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .3s, background .3s; }
.dcard:hover { border-color: rgba(var(--c-rgb), .55); background: var(--surface-2); }
.dcard-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, rgba(var(--c-rgb), .22), rgba(9, 16, 30, .9)); }
.dcard-cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.dcard-cover img.ok { opacity: .78; }
.dcard-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(6, 12, 24, .92)); }
.dcard-helmet { position: relative; z-index: 1; display: block; width: 78px; margin-block: -44px 0; margin-inline: 18px; }
.dcard-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 8px 20px 18px; }
.dcard h3 { font-size: 24px; font-weight: 900; line-height: 1.3; }
.den { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--c); line-height: 1.6; }
.dtag { margin-block-start: 4px; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dmeta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-block-start: auto; padding-block-start: 14px; font-size: 15px; color: var(--muted); }
.dmeta .hc { display: inline-flex; align-items: center; gap: 7px; color: var(--c); }
.dmeta i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* ─────────── Safety ─────────── */
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.codes li { display: flex; align-items: baseline; gap: 14px; padding-block: 13px; border-bottom: 1px solid var(--line); }
.codes .dot { flex: none; width: 13px; height: 13px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); transform: translateY(1px); }
.codes b { flex: none; min-width: 5.5em; font-weight: 800; }
.codes span:last-child { font-size: 17px; color: var(--ink-2); }
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mini-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.style-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.mini .key { display: inline-block; font-size: 14px; font-weight: 700; color: var(--accent); direction: ltr; unicode-bidi: isolate; }
.mini b { display: block; margin-block: 2px 4px; font-size: 19px; font-weight: 800; line-height: 1.4; }
.mini em { display: block; font-size: 13px; color: var(--muted); unicode-bidi: plaintext; margin-block-end: 4px; }
.mini p { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.mini .volt { display: block; margin-block-end: 4px; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; unicode-bidi: isolate; text-align: start; }
.std li, .care li { display: flex; gap: 14px; padding-block: 11px; border-bottom: 1px solid var(--line); font-size: 17px; color: var(--ink-2); }
.std li:last-child, .care li:last-child { border-bottom: 0; }
.std .key { flex: none; min-width: 8.6em; font-weight: 700; color: var(--ink); direction: ltr; unicode-bidi: isolate; text-align: start; }
.care .ic { color: var(--green); margin-block-start: 6px; }
.ppe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ppe { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.ppe > div { min-width: 0; }
.ppe-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.ppe-ic .ic { width: 24px; height: 24px; }
.ppe b { font-size: 18px; font-weight: 800; line-height: 1.4; }
.ppe p { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.ppe-dots { display: flex; flex-wrap: wrap; gap: 5px; margin-block-start: 10px; }
.ppe-dots i { width: 8px; height: 8px; border-radius: 50%; }

/* ─────────── Software ─────────── */
.chips { display: flex; gap: 8px; margin-block-end: 24px; padding-block-end: 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding-inline: 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 15.5px; color: var(--ink-2); transition: color .25s, border-color .25s, background .25s; }
.chips button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chips button:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), .45); }
.chips button.on { background: var(--ink); border-color: var(--ink); color: #06101f; }
.sw-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.sw-grid.collapsed .swt.x { display: none; }
.swt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 16px; text-align: center; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .25s, background .25s; }
.swt:hover { border-color: rgba(var(--c-rgb), .6); background: var(--surface-2); }
.swt b { font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.swt small { font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.logo { position: relative; flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(140deg, rgba(var(--c-rgb), .95), rgba(var(--c-rgb), .5)); color: var(--c-ink, #fff); font-size: 18px; font-weight: 900; }
.logo.lg { width: 76px; height: 76px; border-radius: 20px; font-size: 26px; }
.logo img { position: absolute; inset: 20%; width: 60%; height: 60%; object-fit: contain; opacity: 0; transition: opacity .3s; }
.logo.has-img img { opacity: 1; }
.logo.has-img .mono { opacity: 0; }
.more-wrap { display: flex; justify-content: center; margin-block-start: 24px; }

/* ─────────── Engineers (home) ─────────── */
.legs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.leg { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.leg-ph { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: rgba(var(--c-rgb), .08); transition: border-color .25s; }
.leg:hover .leg-ph { border-color: rgba(var(--c-rgb), .65); }
.leg b { margin-block-start: 4px; font-size: 16.5px; font-weight: 800; line-height: 1.35; }
.leg small { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.leg small i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Image placeholders */
.ph { position: relative; overflow: hidden; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.ph img.ok { opacity: 1; }
.ph-fb { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 900; color: rgba(255, 255, 255, .35); }
.ph-fb .ic { width: 34px; height: 34px; }
.ph.loaded .ph-fb { display: none; }

/* ─────────── Quiz ─────────── */
.quiz { max-width: 880px; padding: 28px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.quiz.qz-anim > * { animation: fadeUp .45s var(--ease) both; }
.qz-top { display: flex; align-items: center; gap: 14px; margin-block-end: 18px; font-size: 15px; color: var(--muted); }
.qz-top .ic { color: var(--green); width: 22px; height: 22px; }
.qz-bar { flex: 1; height: 3px; border-radius: 3px; overflow: hidden; background: var(--line); }
.qz-bar i { display: block; height: 100%; background: var(--accent); transition: width .5s var(--ease); }
.qz-q { margin-block-end: 18px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; line-height: 1.4; }
.qz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qz-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: start; border-radius: 14px; border: 1px solid var(--line-2); font-size: 17.5px; line-height: 1.5; transition: border-color .2s, background .2s; }
.qz-opt .k { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; background: rgba(255, 255, 255, .06); }
.qz-opt:hover { border-color: rgba(var(--accent-rgb), .7); background: rgba(var(--accent-rgb), .06); }
.qz-reset { display: inline-flex; align-items: center; gap: 8px; margin-block-start: 18px; font-size: 16px; color: var(--muted); transition: color .2s; }
.qz-reset:hover { color: var(--ink); }
.qz-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.qz-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; border: 1px solid rgba(var(--c-rgb), .4); background: rgba(var(--c-rgb), .06); transition: border-color .25s; }
.qz-card:hover { border-color: rgba(var(--c-rgb), .8); }
.qz-helmet { width: 84px; }
.qz-card b { font-size: 19px; font-weight: 800; line-height: 1.35; }
.qz-pct { height: 4px; border-radius: 4px; overflow: hidden; background: var(--line); }
.qz-pct i { display: block; height: 100%; background: var(--c); }
.qz-card small { font-size: 15px; color: var(--muted); }
.qz-note { margin-block-start: 16px; font-size: 15.5px; color: var(--muted); }

/* ─────────── Other fields ─────────── */
.others { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.other { padding-block: 16px; border-bottom: 1px solid var(--line); }
.other b { font-size: 19px; font-weight: 800; }
.other p { font-size: 16.5px; color: var(--ink-2); }

/* ─────────── Footer ─────────── */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(3, 6, 13, .78); }
.foot-in { max-width: var(--wrap); margin-inline: auto; padding: 48px 20px 28px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; }
.foot-brand b { font-size: 24px; font-weight: 900; }
.foot-brand p, .foot-note p { font-size: 15.5px; line-height: 1.8; color: var(--muted); }
.foot-note p + p { margin-block-start: 8px; }
.credit { max-width: var(--wrap); margin-inline: auto; padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.credit .dev { color: var(--ink-2); }
.social { display: inline-flex; gap: 10px; margin-inline-end: auto; }
.social a { display: block; width: 34px; height: 34px; border-radius: 9px; transition: transform .2s, filter .2s; }
.social a:hover { transform: translateY(-2px); filter: brightness(1.12); }
.social svg { display: block; width: 100%; height: 100%; }
.to-top { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); transition: color .2s; }
.to-top:hover { color: var(--ink); }

/* ─────────── Department page ─────────── */
.d-hero { position: relative; z-index: 1; display: flex; align-items: flex-end; min-height: min(80svh, 760px); overflow: hidden; }
.d-cover { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .9s; }
.d-cover.ok { opacity: .5; }
.d-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(3, 6, 13, .6), rgba(3, 6, 13, .3) 38%, var(--bg)); }
.d-hero-in { position: relative; z-index: 2; width: 100%; max-width: var(--wrap); margin-inline: auto; padding-block: calc(var(--top) + 70px) 56px; padding-inline: 20px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: end; }
.d-hero-tx { min-width: 0; container-type: inline-size; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-block-end: 22px; font-size: 16px; color: var(--ink-2); transition: color .2s; }
.back:hover { color: var(--ink); }
.d-hero h1 { font-size: clamp(44px, 6.4vw, 92px); font-weight: 900; line-height: 1.1; text-wrap: balance; }
@supports (width: 1cqi) { .d-hero h1 { font-size: min(clamp(44px, 6.4vw, 92px), calc(100cqi / (var(--lw, 8) * .63))); } }
.d-en { margin-block-start: 8px; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.d-tag { margin-block-start: 16px; max-width: 54ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.8; color: var(--ink-2); }
.d-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 22px; }
.d-chips span { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding-inline: 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(3, 6, 13, .55); font-size: 15.5px; color: var(--ink-2); }
.d-chips .ic { color: var(--c); }
.d-hero-helmet { justify-self: center; width: 100%; max-width: 280px; text-align: center; }
.d-hlabel { display: inline-flex; align-items: center; gap: 10px; margin-block-start: 14px; font-size: 15px; color: var(--muted); }
.d-hlabel i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.d-hlabel b { color: var(--c); font-weight: 700; }

.d-tabs { position: sticky; top: var(--top); z-index: 40; background: rgba(3, 6, 13, .94); border-block: 1px solid var(--line); }
.d-tabs-in { max-width: var(--wrap); margin-inline: auto; padding-inline: 8px; display: flex; overflow-x: auto; scrollbar-width: none; }
.d-tabs-in::-webkit-scrollbar { display: none; }
.d-tabs button { flex: none; padding: 13px 14px; font-size: 16px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; transition: color .25s, border-color .25s; }
.d-tabs button:hover { color: var(--ink-2); }
.d-tabs button.on { color: var(--ink); border-color: var(--c); }
.dept .label, .dept .sub .ic, .dept .h2 .t2 { color: var(--c); }
.d-sec { padding-block: 88px; }
.d-sec + .d-sec { border-top: 1px solid var(--line); }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-block-end: 48px; }
.about-tx { font-size: clamp(18px, 1.5vw, 20.5px); line-height: 1.95; color: var(--ink-2); }
.fact { display: flex; gap: 14px; padding: 22px; border-radius: var(--radius); border: 1px solid rgba(var(--c-rgb), .35); background: rgba(var(--c-rgb), .06); }
.fact .ic { width: 26px; height: 26px; margin-block-start: 4px; color: var(--c); }
.fact b { display: block; margin-block-end: 4px; font-weight: 800; }
.fact p { font-size: 16.5px; line-height: 1.8; color: var(--ink-2); }
.nature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.nature li { display: flex; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.nature li::before { content: ''; flex: none; width: 7px; height: 7px; margin-block-start: .72em; border-radius: 50%; background: var(--c); }

.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stages.s5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stage { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.stage-h { display: flex; align-items: center; gap: 10px; margin-block-end: 10px; padding-block-end: 12px; border-bottom: 1px solid var(--line); }
.stage-n { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; font-weight: 900; color: var(--c); background: rgba(var(--c-rgb), .14); }
.stage-h b { font-size: 18px; font-weight: 800; }
.stage li { padding-block: 6px; font-size: 16.5px; line-height: 1.5; }
.stage li em, .grad li em, .br em { display: block; font-size: 13px; color: var(--muted); unicode-bidi: plaintext; line-height: 1.5; }
html[dir="rtl"] :is(.stage li em, .grad li em, .br em, .mini em, .eng-info > em, .proj-b em) { text-align: right; }
.study-note { display: flex; gap: 10px; margin-block-start: 20px; max-width: 80ch; font-size: 15.5px; color: var(--muted); }
.study-note .ic { margin-block-start: 6px; }

.count { margin-block-start: 12px; font-size: 18px; color: var(--ink-2); }
.count b { font-size: 1.3em; font-weight: 900; color: var(--c); }
.br-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.br { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.br b { font-size: 19px; font-weight: 800; line-height: 1.4; }
.br em { color: var(--c); }
.br p { margin-block-start: 6px; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }

.grad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grad-h { display: flex; align-items: center; gap: 10px; margin-block-end: 8px; }
.grad-h .ic { width: 24px; height: 24px; color: var(--c); }
.grad-h b { flex: 1; font-size: 20px; font-weight: 800; }
.grad-h .tag { font-size: 13px; color: var(--muted); padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); }
.grad li { padding-block: 9px; border-bottom: 1px solid var(--line); font-size: 17px; }
.grad li:last-child { border-bottom: 0; }

.swd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.swd { display: flex; align-items: flex-start; gap: 14px; padding: 16px; text-align: start; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .25s, background .25s; }
.swd:hover { border-color: rgba(var(--c-rgb), .55); background: var(--surface-2); }
.swd-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.swd b { font-size: 18px; font-weight: 800; }
.swd .p { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.swd .more { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 6px; font-size: 14.5px; color: var(--c); }

.jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.job { display: flex; align-items: center; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.job > span { min-width: 0; }
.job .ic { color: var(--c); }

.safe { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
.safe-card { position: sticky; top: calc(var(--top) + 64px); padding: 24px; border-radius: 22px; border: 1px solid rgba(var(--c-rgb), .35); background: var(--surface); }
.safe-vis { width: 72%; margin: 0 auto 14px; }
.safe-card dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 16px; }
.safe-card dt { color: var(--muted); }
.safe-card dd { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.safe-card dd[dir="ltr"] { justify-content: flex-end; }
html[dir="ltr"] .safe-card dd[dir="ltr"] { justify-content: flex-start; }
.safe-card dd i { width: 12px; height: 12px; border-radius: 50%; }
.why { margin-block-start: 14px; padding-block-start: 14px; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.8; color: var(--ink-2); }
.safe-ppe { min-width: 0; }
.ppe-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dept .ppe-ic { color: var(--c); background: rgba(var(--c-rgb), .12); }
.tip { display: flex; gap: 12px; margin-block-start: 16px; padding: 18px; border-radius: var(--radius); border: 1px solid rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .06); }
.tip .ic { width: 24px; height: 24px; margin-block-start: 4px; color: var(--green); }
.tip b { display: block; font-weight: 800; }
.tip p { font-size: 16px; line-height: 1.8; color: var(--ink-2); }

.engs { display: flex; flex-direction: column; gap: 18px; }
.eng { padding: 24px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.eng-head { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; align-items: start; }
.eng-ph { aspect-ratio: 4 / 5; border-radius: 14px; background: rgba(var(--c-rgb), .1); }
.eng-info h3 { font-size: 26px; font-weight: 900; line-height: 1.25; }
.eng-info > em { display: block; font-size: 14px; color: var(--c); unicode-bidi: plaintext; }
.eng-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-block: 8px 10px; font-size: 15px; color: var(--muted); }
.eng-meta span { display: inline-flex; align-items: center; gap: 6px; }
.eng-info > p { font-size: 17px; line-height: 1.85; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }
.links a, .bio-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 12px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 15px; color: var(--ink-2); transition: color .2s, border-color .2s; }
.links a:hover, .bio-btn:hover { color: var(--ink); border-color: rgba(var(--c-rgb, var(--accent-rgb)), .6); }
.bio-btn .ic:last-child { transition: transform .3s; }
.eng.open .bio-btn .ic:last-child { transform: rotate(180deg); }
.story { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.story > div { overflow: hidden; }
.eng.open .story { grid-template-rows: 1fr; }
.story p { padding-block-start: 14px; font-size: 16.5px; line-height: 1.95; color: var(--ink-2); }
.projs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-block-start: 20px; }
.proj { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: rgba(3, 6, 13, .35); }
.proj-ph { aspect-ratio: 16 / 10; background: rgba(var(--c-rgb), .08); }
.proj-y { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; z-index: 1; padding: 1px 8px; border-radius: 8px; font-size: 13px; background: rgba(3, 6, 13, .78); }
.proj-b { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 14px; }
.proj-b b { font-size: 17px; font-weight: 800; line-height: 1.4; }
.proj-b em { font-size: 12.5px; color: var(--muted); unicode-bidi: plaintext; }
.proj-b p { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.proj-f { display: flex; align-items: center; gap: 8px; margin-block-start: auto; padding-block-start: 10px; font-size: 14px; color: var(--muted); }
.proj-f span { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.proj-f a { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-2); transition: border-color .2s, color .2s; }
.proj-f a:hover { color: var(--ink); border-color: rgba(var(--c-rgb), .6); }

.pn { position: relative; z-index: 1; max-width: var(--wrap); margin-inline: auto; padding: 24px 20px 88px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pn-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .25s; }
.pn-card:hover { border-color: rgba(var(--c-rgb), .6); }
.pn-card.nx { flex-direction: row-reverse; text-align: end; }
.pn-h { flex: none; width: 64px; }
.pn-tx { display: flex; flex-direction: column; min-width: 0; }
.pn-dir { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); }
.pn-card.nx .pn-dir { justify-content: flex-end; }
.pn-card b { font-size: 20px; font-weight: 800; line-height: 1.35; color: var(--c); overflow-wrap: anywhere; hyphens: auto; }

/* ─────────── Software modal ─────────── */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal-veil { position: absolute; inset: 0; background: rgba(2, 5, 10, .84); animation: fade .25s ease; }
.modal-box { position: relative; width: min(820px, 100%); max-height: calc(100svh - 32px); overflow: auto; border-radius: 24px; border: 1px solid var(--line-2); background: #0a1322; box-shadow: 0 40px 100px rgba(0, 0, 0, .55); animation: pop .35s var(--ease); scrollbar-width: thin; }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(3, 6, 13, .7); }
.modal-close .ic { width: 20px; height: 20px; }
.mh { display: flex; align-items: center; gap: 16px; padding: 24px; padding-inline-end: 70px; }
.mh h3 { font-size: 30px; font-weight: 900; line-height: 1.2; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 15px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.mshot { aspect-ratio: 16 / 8; margin-inline: 24px; border-radius: 16px; background: rgba(var(--c-rgb), .08); }
.mb { display: grid; gap: 18px; padding: 20px 24px 24px; }
.mb h4 { display: flex; align-items: center; gap: 8px; margin-block-end: 6px; font-size: 18px; font-weight: 800; }
.mb h4 .ic { color: var(--c); }
.mb p { font-size: 16.5px; line-height: 1.85; color: var(--ink-2); }
.mworks li { display: flex; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink-2); }
.mworks li::before { content: ''; flex: none; width: 6px; height: 6px; margin-block-start: .75em; border-radius: 50%; background: var(--c); }
.mworks li:last-child { border-bottom: 0; }
.mdepts { display: flex; flex-wrap: wrap; gap: 8px; }
.mdepts a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding-inline: 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 15px; transition: border-color .2s; }
.mdepts a:hover { border-color: var(--dc); }
.mdepts i { width: 8px; height: 8px; border-radius: 50%; background: var(--dc); }
.modal .links { margin-block-start: 0; }

/* ─────────── Helmet put on when entering a department ─────────── */
.drop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; cursor: pointer; }
.drop-veil { position: absolute; inset: 0; background: rgba(3, 6, 13, .92); }
.drop-center { position: relative; width: 200px; height: 210px; }
.drop-person { width: 100%; height: 100%; fill: none; stroke: rgba(var(--c-rgb), .85); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.drop-helmet { position: absolute; left: 50%; top: 14px; width: 140px; transform: translate(-50%, 0); }
.drop-title, .drop-sub { position: absolute; left: 50%; translate: -50% 0; width: min(92vw, 640px); text-align: center; opacity: 0; text-wrap: balance; }
.drop-title { top: 104%; font-size: clamp(24px, 4vw, 34px); font-weight: 900; line-height: 1.3; color: var(--c); }
.drop-sub { top: calc(104% + 54px); font-size: 17px; color: var(--ink-2); }
.drop.run .drop-veil { animation: fade .3s ease both; }
.drop.run .drop-person { animation: fadeUp .45s var(--ease) .05s both; }
.drop.run .drop-helmet { animation: hdrop .75s cubic-bezier(.3, 1.12, .5, 1) .18s both; }
@keyframes hdrop { 0% { transform: translate(-50%, -50vh); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-50%, 0); opacity: 1; } }
.drop.run .drop-title { animation: fadeUp .5s var(--ease) .55s both; }
.drop.run .drop-sub { animation: fadeUp .5s var(--ease) .68s both; }
.drop.out { animation: fadeOut .35s ease both; }

/* ─────────── Responsive ─────────── */
@media (max-width: 1180px) {
  .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .nav a { padding-inline: 9px; font-size: 16px; }
  .dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sw-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ppe-grid, .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stages, .stages.s5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two, .about-grid, .safe { grid-template-columns: minmax(0, 1fr); }
  .safe-card { position: static; }
  .legs { grid-template-columns: repeat(7, minmax(110px, 1fr)); overflow-x: auto; padding-block-end: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .leg { scroll-snap-align: start; }
}
@media (max-width: 1140px) {
  .menu-btn { display: grid; }
  .lang { margin-inline-start: auto; }
  .nav { position: fixed; top: var(--top); inset-inline: 0; margin: 0; padding: 10px 16px 16px; flex-direction: column; align-items: stretch; gap: 2px; background: rgba(3, 6, 13, .97); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  body.menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 12px; font-size: 18px; border-radius: 12px; }
  body.menu-open .topbar { background: rgba(3, 6, 13, .97); border-color: var(--line); }
}
@media (max-width: 860px) {
  .d-hero-in { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block-start: calc(var(--top) + 40px); }
  .d-hero-helmet { order: -1; display: flex; align-items: center; gap: 14px; max-width: none; justify-self: start; text-align: start; }
  .d-hero-helmet .helmet { width: 150px; flex: none; }
  .d-hlabel { margin: 0; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  body { font-size: 18.5px; }
  html[dir="ltr"] body { font-size: 18px; }
  .topbar-in { padding-inline: 16px; gap: 12px; }
  .brand { font-size: 21px; }
  .brand-helmet { width: 34px; }
  .sec { padding-block: 68px; padding-inline: 16px; }
  .d-sec { padding-block: 60px; }
  .sec-head { margin-block-end: 32px; }
  .block { margin-block-start: 44px; }
  .hero { padding-block: calc(var(--top) + 56px) 64px; padding-inline: 16px; }
  .hero-helmet { width: 104px; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; align-self: stretch; }
  .hub { grid-template-columns: minmax(0, 1fr); }
  .hub-card { min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 16px; }
  .hub-ic { grid-row: 1 / 3; margin: 2px 0 0; }
  .hub-n, .hub-go { display: none; }
  .kcard, .kcard.feat, .kcard.wide { grid-template-columns: 108px minmax(0, 1fr); grid-template-areas: 'ph head' 'more more'; grid-template-rows: auto; column-gap: 14px; padding: 16px; }
  .kcard h3, .kcard.feat h3 { font-size: 21px; }
  .k-at { font-size: 14.5px; }
  .k-badge b { font-size: 12px; }
  .k-badge .ic { width: 15px; height: 15px; }
  .kcard .k-badge small { display: none; }
  .k-badge { inset-inline-start: 4px; inset-block-end: 4px; padding: 3px 6px; gap: 4px; }
  .kcard.feat .k-hi, .kcard.wide .k-hi { grid-template-columns: minmax(0, 1fr); }
  .k-stats b { font-size: 24px; }
  .paper { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .paper-cover { width: 56%; max-width: 220px; }
  .p-hero { padding-inline: 16px; padding-block: calc(var(--top) + 40px) 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
  .stat { padding: 20px 4px 14px; border-top: 1px solid var(--line); }
  .stat + .stat { border-inline-start: 0; }
  .stat:last-child { grid-column: 1 / -1; }
  .dept-grid, .codes, .mini-grid, .mini-grid.c3, .ppe-grid, .style-grid, .nature, .stages, .stages.s5, .br-grid, .grad, .swd-grid, .jobs, .ppe-list, .qz-opts, .qz-res, .others, .projs, .foot-in, .pn { grid-template-columns: minmax(0, 1fr); }
  .sw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .swt { padding: 14px 6px 12px; }
  .swt b { font-size: 15px; }
  .swt small { font-size: 12.5px; }
  .logo { width: 44px; height: 44px; border-radius: 12px; font-size: 16px; }
  .legs { grid-template-columns: repeat(14, 42%); }
  .quiz { padding: 20px; }
  .eng { padding: 18px; }
  .eng-head { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .eng-info h3 { font-size: 22px; }
  .d-hero { min-height: 0; }
  .d-hero-in { padding-inline: 16px; padding-block-end: 40px; }
  .d-hero-helmet .helmet { width: 112px; }
  .pn { padding-inline: 16px; }
  .pn-card.nx { flex-direction: row; text-align: start; }
  .pn-card.nx .pn-dir { justify-content: flex-start; }
  .mh { padding: 20px; padding-inline-end: 64px; }
  .mh h3 { font-size: 24px; }
  .mshot { margin-inline: 20px; }
  .mb { padding: 18px 20px 20px; }
  .credit { flex-direction: column; align-items: flex-start; }
  .foot-in { padding-inline: 16px; }
  .credit { padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Shown only when JavaScript cannot run (e.g. a file preview) */
.noscript { position: relative; z-index: 2; max-width: 640px; margin: 140px auto 0; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); font-size: 18px; line-height: 1.9; color: var(--ink-2); text-align: center; }
.boot-error { padding-block-start: calc(var(--top) + 80px); text-align: center; }
.boot-error .lead { margin-inline: auto; }

/* ─────────── Calculators ─────────── */
.tool-note { display: flex; gap: 10px; padding-block: 24px 0 !important; font-size: 15.5px; color: var(--muted); }
.tool-note .ic { margin-block-start: 6px; color: var(--accent); }
.tool-sec { padding-block: 64px; }
.calcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.calcs.one { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.calc { padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.calc-h { display: flex; gap: 14px; margin-block-end: 18px; }
.calc-ic { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.calc-ic .ic { width: 24px; height: 24px; }
.calc h3 { font-size: 21px; font-weight: 900; line-height: 1.35; }
.calc-h p { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.cf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span:first-child { font-size: 14px; color: var(--muted); line-height: 1.4; }
.fld input, .fld select { width: 100%; min-width: 0; height: 44px; padding-inline: 12px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(3, 6, 13, .6); color: var(--ink); font: inherit; font-size: 16.5px; outline: 0; transition: border-color .2s; }
.fld select { appearance: none; -webkit-appearance: none; padding-inline-end: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237e8ea6' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
html[dir="rtl"] .fld select { background-position: left 12px center; }
html[dir="rtl"] .fld select[dir="ltr"] { background-position: right 12px center; }
.fld select option { background: #0a1322; color: var(--ink); }
.fld input:focus, .fld select:focus { border-color: rgba(var(--accent-rgb), .7); }
.inp { position: relative; display: block; }
.inp input { padding-inline-end: 64px; }
html[dir="rtl"] .inp input { text-align: right; }
.inp i { position: absolute; inset-block: 0; inset-inline-end: 12px; display: flex; align-items: center; font-style: normal; font-size: 13.5px; color: var(--muted); pointer-events: none; }
.cres { margin-block-start: 16px; }
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cr { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 0; }
.cr span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.cr b { font-size: 20px; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; unicode-bidi: isolate; overflow-wrap: anywhere; }
html[dir="rtl"] .cr b { text-align: right; }
.cr b small { font-size: 13px; font-weight: 700; color: var(--muted); }
.cr.main { background: rgba(var(--accent-rgb), .08); border-color: rgba(var(--accent-rgb), .35); }
.cr.main b { color: var(--accent); font-size: 24px; }
.cwarn, .cnote { display: flex; gap: 8px; margin-block-start: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; line-height: 1.7; }
.cwarn { color: #fcd34d; background: rgba(252, 211, 77, .08); border: 1px solid rgba(252, 211, 77, .3); }
.cnote { color: var(--ink-2); background: rgba(74, 222, 128, .06); border: 1px solid rgba(74, 222, 128, .25); }
.cwarn .ic, .cnote .ic { margin-block-start: 4px; }
.how { margin-block-start: 14px; border-top: 1px solid var(--line); padding-block-start: 10px; }
.how summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; color: var(--ink-2); list-style: none; }
.how summary::-webkit-details-marker { display: none; }
.how summary .ic { color: var(--accent); }
.how p { margin-block-start: 8px; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.how code { display: block; margin-block-start: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(3, 6, 13, .7); border: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; color: #a5c8ff; white-space: pre-wrap; text-align: left; }
.swap-btn { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 11px; border: 1px solid var(--line-2); color: var(--ink-2); transition: border-color .2s, color .2s; }
.swap-btn:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), .6); }
.conv-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(var(--accent-rgb), .08); border: 1px solid rgba(var(--accent-rgb), .35); }
.conv-main span { color: var(--ink-2); }
.conv-main b { font-size: 28px; font-weight: 900; color: var(--accent); overflow-wrap: anywhere; }
.conv-main small { font-size: 16px; color: var(--ink-2); }
.conv-all { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; }
.conv-all span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.conv-all b { color: var(--ink); font-weight: 700; }
.cgrid > .cr:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* lamp guide */
.kband { display: flex; align-items: center; gap: 12px; margin-block-end: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--k1) 16%, transparent), color-mix(in srgb, var(--k2) 16%, transparent)); }
html[dir="rtl"] .kband { background: linear-gradient(-90deg, color-mix(in srgb, var(--k1) 16%, transparent), color-mix(in srgb, var(--k2) 16%, transparent)); }
.kband > i { flex: none; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--k1), var(--k2)); box-shadow: 0 0 22px color-mix(in srgb, var(--k1) 70%, transparent); }
.kband span { display: flex; flex-direction: column; min-width: 0; }
.kband small { font-size: 13.5px; color: var(--muted); }
.kband b { font-size: 18px; font-weight: 800; line-height: 1.5; }
.lg { display: flex; flex-direction: column; gap: 16px; margin-block-start: 16px; }
.lg-block { padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.lg-h { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 900; line-height: 1.4; }
.lg-h .ic { flex: none; color: var(--accent); }
.lg-block > .lg-h ~ .lg-h { margin-block-start: 22px; }
.lg-lead { margin-block: 6px 14px; font-size: 15.5px; line-height: 1.8; color: var(--ink-2); }
html[dir="rtl"] .kscale { --gdir: -90deg; }
.kscale { height: 16px; border-radius: 999px; margin-block-start: 6px; box-shadow: 0 0 30px rgba(255, 200, 140, .12); }
.kticks { display: flex; justify-content: space-between; margin-block: 6px 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kstops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kstop { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--k) 30%, transparent); background: linear-gradient(170deg, color-mix(in srgb, var(--k) 12%, transparent), transparent 70%); }
.kstop > i { width: 26px; height: 26px; margin-block-end: 6px; border-radius: 50%; background: var(--k); box-shadow: 0 0 20px var(--k); }
.kstop b { font-size: 20px; font-weight: 900; color: var(--k); font-variant-numeric: tabular-nums; }
html[dir="rtl"] .kstop b, html[dir="rtl"] .kstop small { text-align: right; }
.kstop strong { font-size: 16px; font-weight: 800; }
.kstop small { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.kstop p { margin-block-start: 4px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.kdots { display: inline-flex; }
.kdots i { width: 18px; height: 18px; border-radius: 50%; background: var(--k); box-shadow: 0 0 12px var(--k); border: 2px solid var(--bg, #05080f); }
.kdots i + i { margin-inline-start: -6px; }
.lg-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lg-room { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.lg-room > b { font-size: 17px; font-weight: 800; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.lg-chips span { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lg-room p { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.lg-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.lg-type { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.lg-type > b { font-size: 16.5px; font-weight: 800; }
.lg-bar { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.lg-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(var(--accent-rgb), .5), var(--accent)); }
.lg-stats { display: grid; grid-template-columns: repeat(2, auto); justify-content: space-between; gap: 8px; }
.lg-stats span { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.lg-stats span:first-child { grid-column: 1 / -1; }
.lg-stats small { color: var(--muted); font-size: 13px; }
.lg-stats em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
html[dir="rtl"] .lg-stats em { text-align: right; }
.lg-type p { font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.lg-tw { overflow-x: auto; }
.lg-eq { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lg-eq th { padding: 8px 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.lg-eq td { padding: 9px 6px; text-align: center; font-size: 15.5px; border-bottom: 1px solid var(--line); }
.lg-eq td:first-child { font-weight: 800; color: var(--accent); }
.lg-eq td:nth-child(2) { font-weight: 800; color: #4ade80; }
.lg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.lg-list { display: grid; gap: 2px; }
.lg-list li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: baseline; padding-block: 8px; border-bottom: 1px solid var(--line); }
.lg-list li:last-child { border-bottom: 0; }
.lg-k { display: flex; flex-direction: column; gap: 2px; }
.lg-k b { font-weight: 800; color: var(--ink); }
.lg-k em { align-self: flex-start; padding: 0 7px; border-radius: 6px; font-style: normal; font-size: 12.5px; font-weight: 700; color: #fcd34d; background: rgba(252, 211, 77, .1); }
html[dir="rtl"] .lg-k b { text-align: right; }
html[dir="rtl"] .lg-k em { align-self: flex-start; }
.lg-list p { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
@media (max-width: 1080px) { .lg-rooms, .kstops { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lg-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .lg-rooms { grid-template-columns: minmax(0, 1fr); } .lg-block { padding: 16px; } .lg-list li { grid-template-columns: 104px minmax(0, 1fr); } .kticks { font-size: 11.5px; } }
@media (max-width: 1080px) { .calcs { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .calc { padding: 16px; }
  .cf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .tool-sec { padding-block: 48px; }
  .cr b { font-size: 18px; }
  .cr.main b { font-size: 21px; }
}

/* ─────────── Standards ─────────── */
.st-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.st-kinds .key { direction: ltr; }
.st-anat { margin-block-start: 20px; padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.st-anat-t { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.st-anat-t .ic { color: var(--accent); }
.st-code { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-block: 18px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.st-code span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.st-code b { padding: 6px 8px; border-radius: 8px; font-size: clamp(22px, 3.4vw, 40px); font-weight: 700; color: #fff; white-space: pre; }
.st-code i, .st-parts i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font-size: 13px; font-weight: 800; color: #06101f; font-family: var(--font); }
.st-code .p0 b { background: rgba(96, 165, 250, .18); } .st-code .p0 i, .st-parts li:nth-child(1) i { background: #60a5fa; }
.st-code .p1 b { background: rgba(251, 191, 36, .18); } .st-code .p1 i, .st-parts li:nth-child(2) i { background: #fbbf24; }
.st-code .p2 b { background: rgba(74, 222, 128, .18); } .st-code .p2 i, .st-parts li:nth-child(3) i { background: #4ade80; }
.st-code .p3 b { background: rgba(244, 114, 182, .18); } .st-code .p3 i, .st-parts li:nth-child(4) i { background: #f472b6; }
.st-code .p4 b { background: rgba(167, 139, 250, .2); } .st-code .p4 i, .st-parts li:nth-child(5) i { background: #a78bfa; }
.st-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.st-parts li { display: flex; gap: 10px; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.st-parts i { flex: none; margin-block-start: 3px; }
.st-list .chips { margin-block-end: 20px; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.st { padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); transition: border-color .3s; }
.st:hover { border-color: rgba(var(--c-rgb), .45); }
.st-h { display: flex; gap: 14px; align-items: center; }
.st-a { flex: none; min-width: 74px; height: 58px; padding-inline: 10px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; font-weight: 900; letter-spacing: .02em; color: var(--c-ink); background: linear-gradient(140deg, rgba(var(--c-rgb), 1), rgba(var(--c-rgb), .62)); }
.st-h > div { min-width: 0; }
.st h3 { font-size: 18px; font-weight: 800; line-height: 1.35; unicode-bidi: isolate; }
html[dir="rtl"] .st h3 { text-align: right; }
.st-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-block-start: 2px; font-size: 14px; color: var(--muted); }
.st-meta span { display: inline-flex; align-items: center; gap: 5px; }
.st-local { margin-block-start: 12px; font-size: 15.5px; font-weight: 700; color: var(--c); }
.st-d { margin-block-start: 6px; font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.st-for { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 12px; }
.st-for a { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-inline: 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); transition: border-color .2s; }
.st-for a:hover { border-color: var(--dc); }
.st-for i { width: 7px; height: 7px; border-radius: 50%; background: var(--dc); }
.st h4 { display: flex; align-items: center; gap: 8px; margin-block: 16px 6px; font-size: 16px; font-weight: 800; }
.st h4 .ic { color: var(--c); }
.st-codes li { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 12px; padding-block: 7px; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; direction: ltr; }
.st-codes li:last-child { border-bottom: 0; }
.st-codes b { font-weight: 800; color: var(--ink); }
.st-codes span { color: var(--ink-2); }
.st-link { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 14px; font-size: 14.5px; color: var(--c); }
.st-link bdi { color: var(--muted); }
.st-iq { max-width: 920px; }
@media (max-width: 1080px) { .st-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .st-kinds, .st-parts { grid-template-columns: minmax(0, 1fr); }
  .st { padding: 16px; }
  .st-codes li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .st-a { min-width: 60px; height: 50px; font-size: 17px; }
}

/* ─────────── Universities ─────────── */
/* Kurdistan engineering colleges */
.kr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kr { position: relative; padding: 24px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(var(--accent-rgb), .07), var(--surface) 220px); min-width: 0; }
.kr-h { display: flex; gap: 14px; align-items: center; }
.kr-ic { flex: none; width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; color: var(--accent-ink, #06101f); background: var(--accent); }
.kr-ic .ic { width: 28px; height: 28px; }
.kr h3 { font-size: 23px; font-weight: 900; line-height: 1.35; }
.kr-en { font-size: 14px; color: var(--muted); }
html[dir="rtl"] .kr-en { text-align: right; }
.kr-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-block: 18px 14px; }
.kr-facts span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); min-width: 0; }
.kr-facts small { font-size: 13px; color: var(--muted); }
.kr-facts b { font-size: 20px; font-weight: 900; color: var(--accent); }
html[dir="rtl"] .kr-facts b { text-align: right; }
.kr-about { font-size: 15.5px; line-height: 1.9; color: var(--ink-2); }
.kr-lead { display: grid; gap: 6px; margin-block-start: 14px; }
.kr-lead p, .kr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.kr-lead span, .kr-head span { font-size: 14px; color: var(--muted); }
.kr-lead b, .kr-head b { font-size: 16.5px; font-weight: 800; }
.kr-lead small, .kr-head small { font-size: 13px; color: var(--muted); }
.kr-t { display: flex; align-items: center; gap: 8px; margin-block: 22px 10px; font-size: 18px; font-weight: 900; }
.kr-t .ic { color: var(--accent); }
.kr-tl { margin: 0; padding: 0; list-style: none; border-inline-start: 2px solid var(--line-2); }
.kr-tl li { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding-block: 6px; padding-inline-start: 16px; }
.kr-tl li::before { content: ''; position: absolute; inset-inline-start: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.kr-tl b { font-size: 16px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
html[dir="rtl"] .kr-tl b { text-align: right; }
.kr-tl span { font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.kr-deps { display: grid; gap: 8px; }
.kr-dep { border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); transition: border-color .2s; }
.kr-dep[open] { border-color: color-mix(in srgb, var(--dc) 45%, transparent); }
.kr-dep summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.kr-dep summary::-webkit-details-marker { display: none; }
.kr-dep summary > i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dc); box-shadow: 0 0 10px var(--dc); }
.kr-dn { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.kr-dn b { font-size: 16px; font-weight: 800; line-height: 1.45; }
.kr-dn small { font-size: 13px; color: var(--muted); }
.kr-dep summary em { flex: none; min-width: 28px; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: 13px; font-weight: 800; text-align: center; color: var(--ink-2); border: 1px solid var(--line-2); }
.kr-dep summary > .ic { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .25s; }
.kr-dep[open] summary > .ic { transform: rotate(180deg); }
.kr-db { padding: 0 14px 14px; }
.kr-head { margin-block-end: 10px; }
.kr-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.kr-staff li { padding: 6px 10px; border-radius: 9px; font-size: 14px; line-height: 1.5; color: var(--ink-2); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
html[dir="rtl"] .kr-staff li { text-align: right; }
.kr-none { font-size: 14.5px; color: var(--muted); }
.kr-more { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 10px; font-size: 14px; color: var(--dc); }
.kr-more .ic { width: 16px; height: 16px; }
.kr-note { display: flex; gap: 8px; margin-block-start: 14px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.kr-note .ic { flex: none; margin-block-start: 4px; color: var(--accent); }
@media (max-width: 1080px) { .kr-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .kr { padding: 16px; } .kr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kr h3 { font-size: 20px; } .kr-staff { grid-template-columns: minmax(0, 1fr); } }
.un-note { display: flex; gap: 10px; max-width: 90ch; }
.un-note .ic { margin-block-start: 6px; color: var(--accent); }
.un-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.un { overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); transition: border-color .3s; }
.un:hover { border-color: rgba(var(--accent-rgb), .45); }
.un-ph { aspect-ratio: 16 / 7; background: linear-gradient(135deg, rgba(var(--accent-rgb), .14), rgba(9, 16, 30, .9)); }
.un-ph::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 45%, rgba(6, 12, 24, .85)); pointer-events: none; }
.un-i { position: absolute; inset-block-end: 10px; inset-inline-end: 14px; z-index: 2; font-size: 34px; font-weight: 900; line-height: 1; color: rgba(255, 255, 255, .9); }
.un-b { padding: 18px 22px 22px; }
.un-h { display: flex; gap: 12px; align-items: center; }
.un-s { flex: none; min-width: 64px; padding: 8px 10px; border-radius: 12px; text-align: center; font-size: 15px; font-weight: 900; color: var(--accent-ink); background: var(--accent); }
.un h3 { font-size: 19px; font-weight: 800; line-height: 1.35; unicode-bidi: isolate; }
html[dir="rtl"] .un h3 { text-align: right; }
.un-local { font-size: 15px; color: var(--accent); }
.un-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-block-start: 12px; font-size: 14.5px; color: var(--muted); }
.un-meta span { display: inline-flex; align-items: center; gap: 6px; }
.un-best-t { display: flex; align-items: center; gap: 8px; margin-block-start: 14px; font-size: 15px; font-weight: 800; }
.un-best-t .ic { color: var(--accent); }
.un-best { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.un-best a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; transition: border-color .2s; }
.un-best a:hover { border-color: var(--dc); }
.un-best i { width: 8px; height: 8px; border-radius: 50%; background: var(--dc); }
.un-d { margin-block-start: 12px; font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.un-al { margin-block-start: 10px; font-size: 14.5px; color: var(--muted); }
.un-al b { color: var(--ink-2); }
.un-sch { max-width: 920px; }
.un-sch-l { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin-block: 8px 14px; }
.un-sch-l li { display: flex; justify-content: space-between; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: 16px; }
.un-sch-l a { color: var(--accent); }
.un-sch-l span { color: var(--muted); }
@media (max-width: 1080px) { .un-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .un-b { padding: 16px; } .un-sch-l { grid-template-columns: minmax(0, 1fr); } .un-ph { aspect-ratio: 16 / 8; } }

/* ─────────── Mega projects (blueprint & 3D) ─────────── */
.pj-index { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 18px 32px; }
.pj-index a { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding-inline: 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14.5px; color: var(--ink-2); transition: border-color .2s, color .2s; }
.pj-index a:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), .6); }
.pj-index b { font-size: 12px; color: var(--accent); }
.pjs { display: flex; flex-direction: column; gap: 22px; }
.pj { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.pj:nth-child(even) .pj-view { order: 2; }
.pj-view { position: relative; min-height: 440px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, #0f2c52, #071426 75%); }
.pj-view::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(120, 180, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 180, 255, .08) 1px, transparent 1px);
  background-size: 28px 28px; }
.pj-view[data-mode="bp"] { background: #1b4f8f; }
.pj-view[data-mode="bp"]::before { opacity: 1;
  background-image: linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; }
.pj-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.pj-view.dragging canvas { cursor: grabbing; }
.pj-view[data-mode="bp"] canvas { cursor: default; }
.pj-view[data-mode="ph"] canvas, .pj-view:not([data-mode="ph"]) .pj-ph { visibility: hidden; }
.pj-ph { position: absolute; inset: 0; background: #071426; }
.pj-tabs { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 3; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(3, 8, 18, .72); border: 1px solid rgba(160, 200, 255, .2); }
.pj-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding-inline: 10px; border-radius: 9px; font-size: 14px; color: #a9c4e6; transition: background .2s, color .2s; }
.pj-tabs button .ic { width: 16px; height: 16px; }
.pj-tabs button.on { background: rgba(150, 215, 255, .18); color: #fff; }
.pj-hint { position: absolute; inset-block-end: 12px; inset-inline-start: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(190, 220, 255, .7); pointer-events: none; transition: opacity .3s; }
.pj-view[data-mode="bp"] .pj-hint, .pj-view[data-mode="ph"] .pj-hint, .pj-view.dragging .pj-hint { opacity: 0; }
.pj-n { position: absolute; inset-block-start: 10px; inset-inline-end: 16px; z-index: 2; font-size: 38px; font-weight: 900; line-height: 1; color: rgba(190, 225, 255, .22); pointer-events: none; }
.pj-view[data-mode="bp"] .pj-n { color: rgba(255, 255, 255, .3); }
.pj-b { min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.pj-y { font-size: 14.5px; color: var(--accent); font-weight: 700; }
.pj h3 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 900; line-height: 1.25; }
.pj-b > em { font-size: 14px; color: var(--muted); unicode-bidi: isolate; }
html[dir="rtl"] .pj-b > em { text-align: right; }
.pj-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 10px 4px; border-block: 1px solid var(--line); }
.pj-stats div { padding: 10px 8px; min-width: 0; }
.pj-stats div + div { border-inline-start: 1px solid var(--line); }
.pj-stats b { display: block; font-size: clamp(17px, 1.6vw, 21px); font-weight: 900; line-height: 1.25; unicode-bidi: isolate; overflow-wrap: anywhere; }
html[dir="rtl"] .pj-stats b { text-align: right; }
.pj-stats span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.pj-d { font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.pj-x { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .06); font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.pj-x .ic { flex: none; margin-block-start: 5px; color: var(--accent); }
.pj-x b { color: var(--ink); }
.pj-e { display: flex; gap: 8px; font-size: 14.5px; color: var(--muted); }
.pj-e .ic { flex: none; margin-block-start: 5px; }
.pj-f { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-block-start: auto; padding-block-start: 8px; }
.pj-f a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; transition: border-color .2s; }
.pj-f a:hover { border-color: var(--dc, var(--accent)); }
.pj-f i { width: 8px; height: 8px; border-radius: 50%; background: var(--dc); }
.pj-f .pj-wiki { margin-inline-start: auto; color: var(--ink-2); }
@media (max-width: 1080px) { .pj { grid-template-columns: minmax(0, 1fr); } .pj:nth-child(even) .pj-view { order: 0; } .pj-view { min-height: 0; aspect-ratio: 4 / 3.4; } }
@media (max-width: 760px) { .pj-b { padding: 16px; } .pj-view { aspect-ratio: 1 / 1; } .pj-n { font-size: 30px; } }

/* ─────────── Architecture styles ─────────── */
.stl-time { position: sticky; top: var(--top); z-index: 30; margin-inline: -20px; padding: 10px 20px; background: rgba(3, 6, 13, .92); border-block: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.stl-time::-webkit-scrollbar { display: none; }
.stl-track { position: relative; display: flex; gap: 4px; width: max-content; }
.stl-track::before { content: ''; position: absolute; inset-inline: 10px; top: 13px; height: 1px; background: var(--line-2); }
.stl-track a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 92px; padding: 2px 6px; text-align: center; border-radius: 10px; transition: background .2s; }
.stl-track a:hover { background: rgba(255, 255, 255, .05); }
.stl-track i { width: 14px; height: 14px; margin-block: 6px 4px; border-radius: 50%; background: linear-gradient(135deg, var(--s1), var(--s2)); box-shadow: 0 0 0 3px var(--bg); }
.stl-track b { font-size: 13px; font-weight: 700; line-height: 1.3; max-width: 120px; white-space: normal; }
.stl-track small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.stl-list { display: flex; flex-direction: column; gap: 26px; margin-block-start: 30px; }
.stl { overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.stl-ph { aspect-ratio: 21 / 9; background: linear-gradient(135deg, rgba(var(--accent-rgb), .12), #0a1322); }
.stl-ph::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 40%, rgba(3, 6, 13, .88)); pointer-events: none; }
.stl-ph figcaption { position: absolute; inset-inline: 24px; inset-block-end: 18px; z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.stl-i { font-size: 15px; font-weight: 900; color: var(--accent); }
.stl-ph figcaption b { font-size: clamp(26px, 3.4vw, 42px); font-weight: 900; line-height: 1.15; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
.stl-ph figcaption small { font-size: 15px; color: rgba(255, 255, 255, .8); }
.stl-ph img { z-index: 0; }
.stl-b { padding: 22px 24px 24px; }
.stl-d { font-size: 17px; line-height: 1.95; color: var(--ink-2); max-width: 90ch; }
.stl-pal { display: flex; align-items: center; gap: 6px; margin-block: 14px 4px; }
.stl-pal i { width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .15); }
.stl-pal span { margin-inline-start: 6px; font-size: 13px; color: var(--muted); }
.stl-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px 32px; margin-block-start: 8px; }
.stl h4 { display: flex; align-items: center; gap: 8px; margin-block: 16px 6px; font-size: 17px; font-weight: 800; }
.stl h4 .ic { color: var(--accent); }
.stl-grid p { font-size: 15.5px; line-height: 1.85; color: var(--ink-2); }
.stl-feat li { display: flex; gap: 10px; padding-block: 7px; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.stl-feat li:last-child { border-bottom: 0; }
.stl-feat li::before { content: ''; flex: none; width: 7px; height: 7px; margin-block-start: .7em; border-radius: 2px; transform: rotate(45deg); background: var(--accent); }
.stl-spot { display: flex; gap: 10px; margin-block-start: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .06); }
.stl-spot .ic { flex: none; margin-block-start: 5px; color: var(--accent); }
.stl-spot b { color: var(--ink); }
.stl-foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 32px; margin-block-start: 8px; padding-block-start: 6px; border-top: 1px solid var(--line); }
.stl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stl-chips a, .stl-chips span { display: inline-flex; align-items: center; height: 32px; padding-inline: 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); transition: border-color .2s, color .2s; }
.stl-chips a:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), .6); }
.stl-chips.names span { border-style: dashed; }
@media (max-width: 860px) { .stl-grid, .stl-foot { grid-template-columns: minmax(0, 1fr); } .stl-ph { aspect-ratio: 16 / 10; } }
@media (max-width: 760px) { .stl-time { margin-inline: -16px; padding-inline: 16px; } .stl-b { padding: 16px; } .stl-ph figcaption { inset-inline: 16px; } }
.nw { white-space: nowrap; }
