/* ALHARITM — brand palette taken from the original site:
   teal #05a090 · navy #0a2540 · mist #E7E9EC · ink #011412 */
:root {
  --teal: #05a090;
  --teal-bright: #2fd3bd;
  --teal-ink: #036b60;      /* teal for text on light backgrounds (AA) */
  --teal-tint: #e3f5f2;
  --navy: #0a2540;
  --navy-2: #0f3157;
  --ink: #011412;
  --mist: #e7e9ec;
  --paper: #ffffff;
  --paper-2: #f5f7f8;
  --text: #1b2733;
  --muted: #52606d;
  --line: #dde2e7;
  --on-dark: #e9f1f5;
  --on-dark-muted: #a9bccb;
  --line-dark: rgba(255, 255, 255, .12);
  --warn: #f2c94c;
  --danger: #ff6b5a;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(10, 37, 64, .06), 0 8px 24px rgba(10, 37, 64, .06);
  --shadow-lg: 0 2px 6px rgba(10, 37, 64, .08), 0 24px 60px rgba(10, 37, 64, .12);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--text);
  background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 750; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
ul, ol { padding: 0; margin: 0; list-style: none; }
code { font-family: var(--mono); font-size: .85em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

.container { width: min(1200px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
.section { position: relative; padding: clamp(72px, 10vw, 128px) 0; }
.tint { background: var(--paper-2); }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--teal); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.25em; border-radius: 999px; border: 1px solid transparent;
  background: var(--bg); color: var(--fg); font-weight: 650; font-size: .98rem; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { box-shadow: 0 6px 20px rgba(5, 160, 144, .3); }
.btn-primary:hover { --bg: #14b5a2; box-shadow: 0 10px 28px rgba(5, 160, 144, .38); }
.btn-ghost { --bg: transparent; --fg: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); --fg: var(--teal-ink); }
.dark .btn-ghost, .hero .btn-ghost, .nf .btn-ghost { --fg: var(--on-dark); border-color: rgba(255, 255, 255, .25); }
.dark .btn-ghost:hover, .hero .btn-ghost:hover, .nf .btn-ghost:hover { --fg: #fff; border-color: var(--teal-bright); background: rgba(255, 255, 255, .05); }
.btn-lg { padding: 1em 1.6em; font-size: 1.02rem; }
.btn-sm { padding: .6em 1em; font-size: .9rem; }
.btn .icon { width: 1.1em; height: 1.1em; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  color: #fff; transition: background .3s, box-shadow .3s, color .3s, backdrop-filter .3s;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .86); color: var(--navy);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; letter-spacing: .06em; font-size: 1.12rem; }
.logo-mark { width: 22px; height: 30px; color: currentColor; }
.site-header .brand { color: #fff; }
.site-header.scrolled .brand { color: var(--navy); }
.site-nav { margin-left: auto; display: flex; align-items: center; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a:not(.btn) {
  display: block; padding: 8px 12px; border-radius: 10px; color: inherit; text-decoration: none;
  font-size: .95rem; font-weight: 550; opacity: .88; transition: opacity .2s, background .2s;
}
.site-nav a:not(.btn):hover, .site-nav a.active { opacity: 1; background: rgba(127, 140, 160, .14); }
.nav-cta { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 12px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: inherit;
  font-weight: 650; font-size: .88rem; letter-spacing: .04em; cursor: pointer;
}
.site-header.scrolled .lang-btn { border-color: var(--line); }
.lang-btn .icon { width: 17px; height: 17px; }
.lang-btn .icon:last-child { width: 14px; transition: transform .2s; }
.lang-btn[aria-expanded="true"] .icon:last-child { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; padding: 6px;
  background: #fff; color: var(--text); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); text-decoration: none; font-weight: 550; }
.lang-menu a:hover { background: var(--paper-2); }
.lang-menu a[aria-current] { background: var(--teal-tint); color: var(--teal-ink); }
.lang-code { font-family: var(--mono); font-size: .75rem; width: 26px; color: var(--muted); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; position: relative; border-radius: 10px; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1020px) {
  .header-cta { display: none; }
}
@media (max-width: 880px) {
  .menu-toggle { display: block; }
  .header-actions { margin-left: auto; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto; margin: 0; padding: 12px clamp(16px, 4vw, 40px) 24px;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: #fff; color: var(--navy); box-shadow: 0 20px 40px rgba(10, 37, 64, .15);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a:not(.btn) { padding: 12px; font-size: 1.05rem; }
  .nav-cta { display: inline-flex; }
  .site-header:has(.site-nav.open) { background: #fff; color: var(--navy); }
  .site-header:has(.site-nav.open) .brand { color: var(--navy); }
  .site-header:has(.site-nav.open) .lang-btn { border-color: var(--line); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 96px; color: var(--on-dark); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1200px 700px at 78% 40%, rgba(5, 160, 144, .22), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(15, 49, 87, .9), transparent 70%),
    linear-gradient(160deg, #0a2540 0%, #071c33 45%, #011412 100%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-vignette { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 28, 51, .82) 0%, rgba(7, 28, 51, .45) 42%, transparent 70%),
              linear-gradient(0deg, rgba(1, 20, 18, .55), transparent 30%); }
.hero-inner { position: relative; }
.hero-copy { max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; margin-bottom: 26px;
  border: 1px solid rgba(47, 211, 189, .3); border-radius: 999px; background: rgba(5, 160, 144, .1);
  font-family: var(--mono); font-size: .78rem; letter-spacing: .02em; color: #bfeee6;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 0 rgba(47, 211, 189, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(47, 211, 189, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 211, 189, 0); } }
.hero h1 { color: #fff; margin-bottom: .45em; }
.grad { background: linear-gradient(92deg, #2fd3bd 0%, #7ee8d8 45%, #b5f3ea 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--on-dark-muted); max-width: 600px; margin-bottom: 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips li { font-size: .82rem; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-dark); color: var(--on-dark); backdrop-filter: blur(4px); }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; translate: -50% 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--on-dark-muted); border: 1px solid var(--line-dark); animation: bob 2.4s ease-in-out infinite; }
.scroll-cue:hover { color: #fff; border-color: var(--teal-bright); }
@keyframes bob { 50% { transform: translateY(6px); } }
@media (max-width: 880px) {
  .hero { align-items: flex-end; }
  .hero-vignette { background: linear-gradient(0deg, rgba(7, 28, 51, .92) 0%, rgba(7, 28, 51, .7) 55%, rgba(7, 28, 51, .25) 100%); }
  .scroll-cue { display: none; }
}

/* ---------- section heads ---------- */
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-family: var(--mono); font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--teal-ink);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--teal); border-radius: 2px; }
.kicker.on-dark { color: var(--teal-bright); }
.section-lead { font-size: 1.12rem; color: var(--muted); }
.dark .section-lead { color: var(--on-dark-muted); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-points { display: grid; gap: 14px; }
.about-points li { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; transition: border-color .3s, box-shadow .3s, transform .3s var(--ease); }
.about-points li:hover { border-color: rgba(5, 160, 144, .45); box-shadow: var(--shadow); transform: translateX(4px); }
.about-points .num { font-family: var(--mono); font-size: .85rem; color: var(--teal-ink); padding-top: 3px; }
.about-points h3 { margin-bottom: .3em; }
.about-points p { margin: 0; color: var(--muted); font-size: .98rem; }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
  --mx: 50%; --my: 0%;
  position: relative; padding: 30px 28px 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  overflow: hidden; isolation: isolate; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.service-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(5, 160, 144, .12), transparent 45%);
}
.service-card::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--teal), var(--navy)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(5, 160, 144, .35); }
.service-card:hover::before { opacity: 1; }
.service-card:hover::after { transform: scaleX(1); }
.service-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 22px; color: var(--teal-ink); background: var(--teal-tint); transition: background .35s, color .35s, transform .35s var(--ease); }
.service-icon .icon { width: 26px; height: 26px; }
.service-card:hover .service-icon { background: var(--navy); color: var(--teal-bright); transform: rotate(-6deg) scale(1.05); }
.service-card p { color: var(--muted); font-size: .98rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags li { font-size: .76rem; font-family: var(--mono); padding: 4px 9px; border-radius: 6px; background: var(--paper-2); color: var(--navy); border: 1px solid var(--line); }
@media (max-width: 1020px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .service-grid { grid-template-columns: 1fr; } }

/* ---------- use cases ---------- */
.uc { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 28px; align-items: start; }
.uc-list { display: grid; gap: 6px; position: sticky; top: calc(var(--header-h) + 20px); }
.uc-tab {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 15px 18px;
  border-radius: 14px; border: 1px solid transparent; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted);
  transition: background .25s, color .25s, border-color .25s;
}
.uc-tab .icon { width: 22px; height: 22px; color: var(--muted); transition: color .25s; }
.uc-tab:hover { background: var(--paper-2); color: var(--navy); }
.uc-tab[aria-selected="true"] { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow); }
.uc-tab[aria-selected="true"] .icon { color: var(--teal); }
.uc-panels { min-height: 420px; }
.uc-panel { padding: clamp(26px, 4vw, 44px); border-radius: 24px; background: linear-gradient(160deg, #fff, var(--paper-2)); border: 1px solid var(--line); box-shadow: var(--shadow); animation: fadeUp .45s var(--ease); }
.uc-panel-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.uc-panel-head h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 0; }
.uc-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--navy); color: var(--teal-bright); flex: none; }
.uc-icon .icon { width: 28px; height: 28px; }
.uc-flow { margin: 0; display: grid; gap: 0; position: relative; }
.uc-flow > div { position: relative; padding: 0 0 22px 30px; }
.uc-flow > div::before { content: ""; position: absolute; left: 6px; top: 20px; bottom: 0; width: 2px; background: linear-gradient(var(--line), var(--line)); }
.uc-flow > div:last-child::before { display: none; }
.uc-flow dt { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-ink); margin-bottom: 4px; display: flex; align-items: center; }
.uc-flow .dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--teal); background: #fff; }
.uc-flow .dot-2 { border-color: var(--navy); }
.uc-flow .dot-3 { background: var(--teal); }
.uc-flow dd { margin: 0; color: var(--text); }
.uc-tech { margin: 8px 0 0; padding-top: 20px; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.uc-tech code { padding: 3px 8px; border-radius: 6px; background: var(--navy); color: #d6f5ef; font-size: .78rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 880px) {
  .uc { grid-template-columns: 1fr; }
  .uc-list { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; scroll-snap-type: x mandatory; margin-inline: calc(-1 * clamp(16px, 4vw, 40px)); padding-inline: clamp(16px, 4vw, 40px); scrollbar-width: none; }
  .uc-list::-webkit-scrollbar { display: none; }
  .uc-tab { flex: none; width: auto; white-space: nowrap; scroll-snap-align: start; border-color: var(--line); padding: 11px 14px; }
  .uc-panels { min-height: 0; }
}

/* ---------- dark sections ---------- */
.dark { color: var(--on-dark); background: var(--navy); overflow: hidden; isolation: isolate; }
.dark h2, .dark h3, .dark h4 { color: #fff; }
.dark-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 500px at 85% 0%, rgba(5, 160, 144, .22), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(47, 211, 189, .08), transparent 60%),
    linear-gradient(180deg, #0a2540, #061a2e);
}
.dark-bg::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); }
.glass { background: rgba(255, 255, 255, .045); border: 1px solid var(--line-dark); border-radius: 24px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- demo ---------- */
.demo-shell { border-radius: 26px; border: 1px solid var(--line-dark); background: rgba(1, 20, 18, .35); padding: clamp(16px, 3vw, 28px); box-shadow: 0 40px 80px rgba(0, 0, 0, .25); }
.demo-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-dark); margin-bottom: 24px; max-width: 100%; overflow-x: auto; }
.demo-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 0; background: transparent; color: var(--on-dark-muted); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .25s, color .25s; }
.demo-tabs button .icon { width: 18px; height: 18px; }
.demo-tabs button[aria-selected="true"] { background: var(--teal); color: var(--ink); }
.demo-panel { animation: fadeUp .4s var(--ease); }
.demo-intro { max-width: 780px; margin-bottom: 24px; }
.demo-intro h3 { font-size: 1.45rem; }
.demo-intro p { color: var(--on-dark-muted); margin-bottom: .6em; }
.model-note { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.model-note code { color: var(--teal-bright); background: rgba(47, 211, 189, .1); border: 1px solid rgba(47, 211, 189, .25); padding: 3px 9px; border-radius: 6px; }
.model-note .hint { font-size: .9rem; color: var(--on-dark-muted); }
.disclaimer { margin: 22px 0 0; font-size: .84rem; color: var(--on-dark-muted); opacity: .85; }

.credit-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.sliders { display: grid; gap: 14px; padding: 22px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-dark); }
.slider-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.slider label { font-size: .93rem; color: var(--on-dark); }
.slider output { font-family: var(--mono); font-size: .9rem; color: var(--teal-bright); white-space: nowrap; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; --p: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--teal) var(--p), rgba(255, 255, 255, .14) var(--p)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--teal); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 4px solid var(--teal); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); transition: transform .15s; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--teal); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline-offset: 6px; }

.credit-result { padding: 22px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-dark); }
.gauge { position: relative; max-width: 320px; margin: 0 auto; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge-track { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 14; stroke-linecap: round; }
.gauge-fill { fill: none; stroke: url(#gauge-grad); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .6s var(--ease); }
.gauge-needle { stroke: #fff; stroke-width: 3; stroke-linecap: round; transform-origin: 100px 100px; transition: transform .6s var(--ease); }
.gauge-hub { fill: #fff; }
.gauge-read { text-align: center; margin-top: -4px; }
.gauge-label { display: block; font-size: .8rem; color: var(--on-dark-muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.gauge-read strong { display: block; font-size: 2.4rem; color: #fff; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.band { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 650; }
.band.low { background: rgba(5, 160, 144, .2); color: #7ee8d8; }
.band.medium { background: rgba(242, 201, 76, .18); color: #f6dc8a; }
.band.high { background: rgba(255, 107, 90, .18); color: #ffb0a6; }
.score-line { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 14px; padding: 12px 0; border-block: 1px solid var(--line-dark); }
.score-line small { color: var(--on-dark-muted); font-family: var(--mono); }
.score-line strong { font-family: var(--mono); font-size: 1.3rem; color: #fff; font-variant-numeric: tabular-nums; }
.contrib-title { font-size: .95rem; margin-bottom: 10px; }
.contrib { display: grid; gap: 8px; }
.contrib li { display: grid; grid-template-columns: minmax(0, 1.1fr) 1fr; gap: 10px; align-items: center; font-size: .82rem; color: var(--on-dark-muted); }
.contrib .bar { position: relative; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .06); }
.contrib .bar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: rgba(255, 255, 255, .25); }
.contrib .bar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; transition: left .5s var(--ease), width .5s var(--ease); }
.contrib .bar i.up { background: var(--danger); }
.contrib .bar i.down { background: var(--teal); }
.contrib-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; font-size: .78rem; color: var(--on-dark-muted); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.sw:first-child { margin-left: 0; }
.sw.up { background: var(--danger); }
.sw.down { background: var(--teal); }

.fraud-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.fraud-chart { border-radius: 18px; background: rgba(1, 20, 18, .5); border: 1px solid var(--line-dark); padding: 14px; }
.fraud-chart canvas { width: 100%; height: 380px; cursor: crosshair; border-radius: 10px; }
.fraud-legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 10px; font-size: .82rem; color: var(--on-dark-muted); }
.fraud-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg.normal { background: var(--teal-bright); }
.lg.flagged { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 107, 90, .3); }
.fraud-legend .count { margin-left: auto; font-family: var(--mono); }
.fraud-side { display: grid; gap: 16px; align-content: start; }
.fraud-side > * { padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-dark); }
.fraud-add { display: grid; gap: 12px; }
.fa-title, .fl-title { margin: 0; font-size: .8rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--on-dark-muted); }
.fa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fa-row label { display: grid; gap: 4px; font-size: .85rem; }
.fa-row input { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-dark); background: rgba(1, 20, 18, .5); color: #fff; font-family: var(--mono); }
.fraud-add .btn { justify-self: start; }
.fraud-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fl-body { margin: 6px 0 0; font-size: .95rem; }
.fl-body strong { color: #fff; font-family: var(--mono); }
.fl-body .tagx { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; margin-left: 6px; }
.tagx.ok { background: rgba(5, 160, 144, .2); color: #7ee8d8; }
.tagx.bad { background: rgba(255, 107, 90, .2); color: #ffb0a6; }
@media (max-width: 960px) {
  .credit-grid, .fraud-grid { grid-template-columns: 1fr; }
  .fraud-chart canvas { height: 300px; }
}

/* ---------- pipeline ---------- */
.pl { max-width: 1040px; margin: 0 auto; }
.pl-rail { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 30px; }
.pl-line { position: absolute; left: calc(100% / 12); right: calc(100% / 12); top: 32px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.pl-line::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(5, 160, 144, .5) 10px 16px); animation: flow 1.2s linear infinite; opacity: .6; }
@keyframes flow { to { background-position: 26px 0; } }
.pl-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--teal); z-index: 1; transition: width .6s var(--ease); }
.pl-node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .92rem; }
.pl-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid var(--line); color: var(--muted); transition: all .35s var(--ease); }
.pl-icon .icon { width: 26px; height: 26px; }
.pl-node:hover .pl-icon { border-color: var(--teal); color: var(--teal-ink); }
.pl-node.done .pl-icon { border-color: var(--teal); color: var(--teal-ink); }
.pl-node[aria-selected="true"] { color: var(--navy); }
.pl-node[aria-selected="true"] .pl-icon { background: var(--navy); border-color: var(--navy); color: var(--teal-bright); transform: scale(1.1); box-shadow: 0 0 0 8px rgba(5, 160, 144, .15), 0 10px 30px rgba(10, 37, 64, .25); }
.pl-name { text-align: center; line-height: 1.25; }
.pl-panels { position: relative; }
.pl-panel { padding: clamp(24px, 4vw, 40px); border-radius: 24px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); text-align: center; animation: fadeUp .4s var(--ease); }
.pl-step { font-family: var(--mono); font-size: .78rem; color: var(--teal-ink); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.pl-panel h3 { font-size: 1.5rem; }
.pl-panel p { max-width: 680px; margin-inline: auto; color: var(--muted); }
.pl-example { display: inline-block; margin: 6px 0 0 !important; padding: 10px 16px; border-radius: 12px; background: var(--teal-tint); color: var(--teal-ink) !important; font-size: .94rem; }
@media (max-width: 760px) {
  .pl-rail { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .pl-line { display: none; }
  .pl-icon { width: 54px; height: 54px; }
  .pl-name { font-size: .84rem; }
}

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; position: relative; }
.steps li { position: relative; padding: 26px 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.steps li::after { content: ""; position: absolute; top: 44px; right: -17px; width: 18px; height: 2px; background: var(--teal); opacity: .5; }
.steps li:last-child::after { display: none; }
.step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; margin-bottom: 18px; background: var(--navy); color: var(--teal-bright); font-family: var(--mono); font-weight: 500; }
.steps h3 { font-size: 1.08rem; }
.steps p { margin: 0; font-size: .94rem; color: var(--muted); }
@media (max-width: 1020px) {
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; }
  .steps li .step-num { grid-row: span 2; margin: 0; }
  .steps li::after { top: auto; bottom: -13px; left: 39px; right: auto; width: 2px; height: 14px; }
}

/* ---------- principles + stack ---------- */
.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: clamp(48px, 7vw, 80px); }
.principle-grid li { padding: 4px 0 0; border-top: 2px solid var(--line); padding-top: 22px; transition: border-color .3s; }
.principle-grid li:hover { border-color: var(--teal); }
.p-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--teal-tint); color: var(--teal-ink); margin-bottom: 16px; }
.principle-grid h3 { font-size: 1.08rem; }
.principle-grid p { margin: 0; color: var(--muted); font-size: .95rem; }
.stack { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(28px, 5vw, 64px); padding: clamp(28px, 4vw, 48px); border-radius: 26px; background: var(--navy); color: var(--on-dark); position: relative; overflow: hidden; isolation: isolate; }
.stack::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 300px at 100% 0%, rgba(5, 160, 144, .3), transparent 60%); }
.stack .kicker { color: var(--teal-bright); }
.stack h3 { color: #fff; }
.h2-sm { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.stack-head p { color: var(--on-dark-muted); margin: 0; }
.stack-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.stack-group h4 { font-size: .8rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--teal-bright); margin-bottom: 12px; font-weight: 500; }
.stack-group ul { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-group li { font-size: .85rem; padding: 5px 11px; border-radius: 8px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-dark); transition: background .2s, border-color .2s; }
.stack-group li:hover { background: rgba(5, 160, 144, .18); border-color: rgba(47, 211, 189, .4); }
@media (max-width: 1020px) { .principle-grid { grid-template-columns: repeat(2, 1fr); } .stack { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .principle-grid, .stack-groups { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.faq-list details[open] { border-color: rgba(5, 160, 144, .45); box-shadow: var(--shadow); }
.faq-list summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 22px; cursor: pointer; font-weight: 650; color: var(--navy); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { color: var(--teal-ink); transition: transform .3s var(--ease); }
.faq-list details[open] summary .icon { transform: rotate(45deg); }
.faq-a { padding: 0 22px 20px; color: var(--muted); }
.faq-a p { margin: 0; }
@media (max-width: 880px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.channels-title { font-size: .85rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--on-dark-muted); margin: 32px 0 12px; }
.channels { display: grid; gap: 10px; }
.channels a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-dark); background: rgba(255, 255, 255, .04); color: var(--on-dark); text-decoration: none; transition: border-color .25s, background .25s, transform .25s var(--ease); }
.channels a:hover { border-color: rgba(47, 211, 189, .5); background: rgba(5, 160, 144, .1); transform: translateX(4px); }
.channels .icon { width: 22px; height: 22px; color: var(--teal-bright); }
.channels span { display: grid; min-width: 0; }
.channels strong { font-size: .95rem; }
.channels small { color: var(--on-dark-muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-form { padding: clamp(22px, 4vw, 36px); display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; color: var(--on-dark); font-weight: 550; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(1, 20, 18, .45); color: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #a9bccb 50%), linear-gradient(135deg, #a9bccb 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field select option { color: var(--text); background: #fff; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-bright); box-shadow: 0 0 0 4px rgba(47, 211, 189, .18); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .err { font-size: .8rem; color: #ffb0a6; }
.contact-form .btn { justify-self: start; }
.form-note { margin: 0; font-size: .84rem; color: var(--on-dark-muted); }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: #7ee8d8; }
.form-status.bad { color: #ffb0a6; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 880px) { .contact-grid, .field-row { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 64px 0 28px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line-dark); }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 320px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-dark); color: var(--on-dark); transition: border-color .2s, color .2s; }
.footer-social a:hover { border-color: var(--teal-bright); color: var(--teal-bright); }
.footer-social .icon { width: 18px; height: 18px; }
.footer-nav ul, .footer-lang ul { display: grid; gap: 8px; }
.footer-lang p { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.site-footer a:not(.brand) { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:not(.brand):hover, .site-footer a[aria-current] { color: var(--teal-bright); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: .86rem; }
.footer-bottom p { margin: 0; }
.to-top { display: inline-flex; align-items: center; gap: 6px; }
.to-top .icon { width: 16px; height: 16px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.nf { background: var(--navy); }
.nf-main { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 48px 0; color: var(--on-dark); isolation: isolate; }
.nf .brand { color: #fff; }
.nf-code { font-size: clamp(5rem, 16vw, 10rem); font-weight: 800; letter-spacing: -.05em; margin: 20px 0; line-height: 1; background: linear-gradient(92deg, #2fd3bd, #b5f3ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.nf-block { padding: 22px; border-radius: 18px; border: 1px solid var(--line-dark); background: rgba(255, 255, 255, .04); }
.nf-block h2 { color: #fff; font-size: 1.25rem; }
.nf-block p { color: var(--on-dark-muted); font-size: .95rem; }

/* ---------- reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .pl-line::after { display: none; }
}

/* ---------- dropdown menus ---------- */
.has-sub { position: relative; }
.sub-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px 8px 12px; border-radius: 10px; border: 0; background: transparent;
  color: inherit; font-size: .95rem; font-weight: 550; opacity: .88; cursor: pointer; transition: opacity .2s, background .2s;
}
.sub-btn .icon { width: 15px; height: 15px; transition: transform .2s; }
.sub-btn:hover, .sub-btn[aria-expanded="true"] { opacity: 1; background: rgba(127, 140, 160, .14); }
.sub-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.sub-menu {
  position: absolute; left: 0; top: calc(100% + 8px); min-width: 300px; padding: 6px; z-index: 60;
  background: #fff; color: var(--text); border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  flex-direction: column !important; gap: 2px !important;
}
.sub-menu:not([hidden]) { display: flex; animation: fadeUp .2s var(--ease); }
.site-nav .sub-menu a { display: flex !important; align-items: flex-start; gap: 12px; padding: 10px 12px !important; opacity: 1 !important; color: var(--text); border-radius: 10px; }
.site-nav .sub-menu a:hover, .site-nav .sub-menu a[aria-current] { background: var(--paper-2) !important; }
.sub-menu .icon { width: 20px; height: 20px; color: var(--teal-ink); margin-top: 1px; }
.sub-menu span { display: grid; gap: 2px; }
.sub-menu strong { font-weight: 650; color: var(--navy); font-size: .95rem; }
.sub-menu small { color: var(--muted); font-size: .8rem; font-weight: 450; line-height: 1.35; }
@media (max-width: 880px) {
  .sub-btn { width: 100%; justify-content: space-between; padding: 12px; font-size: 1.05rem; }
  .sub-menu { position: static; min-width: 0; box-shadow: none; border: 0; background: var(--paper-2); margin: 2px 0 6px; }
  .site-nav { max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
}

/* ---------- founder page ---------- */
.founder-hero { position: relative; padding: calc(var(--header-h) + 64px) 0 72px; }
.founder-hero-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.avatar { position: relative; width: clamp(120px, 16vw, 180px); aspect-ratio: 1; border-radius: 32px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--teal), var(--navy-2)); box-shadow: 0 30px 60px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .15); }
.avatar span { font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 800; color: #fff; letter-spacing: -.03em; }
.avatar-mark { position: absolute; right: 12px; bottom: 12px; width: 18px; height: 24px; color: #fff; opacity: .85; }
.founder-hero h1 { color: #fff; margin-bottom: .2em; }
.founder-role { font-size: 1.2rem; font-weight: 650; color: var(--teal-bright); margin-bottom: .4em; }
.founder-tagline { color: var(--on-dark-muted); max-width: 640px; }
.founder-loc { display: flex; align-items: center; gap: 8px; color: var(--on-dark-muted); font-size: .95rem; margin-bottom: 24px; }
.founder-hero .hero-ctas { margin-bottom: 0; }
.founder-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.founder-bio { font-size: 1.1rem; color: var(--text); }
.founder-main .h2-sm { margin-top: 40px; margin-bottom: 18px; }
.timeline { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 0 0 22px 24px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); }
.timeline li:first-child::before { background: var(--teal); }
.tl-period { font-family: var(--mono); font-size: .8rem; color: var(--teal-ink); padding-top: 3px; }
.timeline h3 { font-size: 1.02rem; margin-bottom: .2em; }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }
.founder-side { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.side-card { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-2); }
.side-card h2 { font-size: .8rem; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-ink); margin-bottom: 14px; }
.side-card .tags { margin-top: 0; }
.plain { display: grid; gap: 8px; font-size: .94rem; }
.plain li { padding-left: 16px; position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 2px; background: var(--teal); }
.back-link { font-weight: 600; text-decoration: none; }
@media (max-width: 880px) {
  .founder-hero-inner, .founder-grid { grid-template-columns: 1fr; }
  .founder-side { position: static; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- protection layer (same rules as the uz page) ---------- */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
img, svg, canvas { -webkit-user-drag: none; }
.sec-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 200; max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px; border-radius: 16px; background: rgba(1, 20, 18, .95); color: #fff; border: 1px solid rgba(47, 211, 189, .4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .3); font-size: .85rem; font-weight: 650;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
}
.sec-toast.show { opacity: 1; transform: none; }
.footer-protected { display: block; margin-top: 4px; font-size: .8rem; opacity: .8; }
.sub-menu[hidden] { display: none !important; }

/* ---------- OzbekPython tutorial ---------- */
.tut-hero { position: relative; padding: calc(var(--header-h) + 56px) 0 72px; }
.tut-hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.tut-hero h1, .tut-head h1 { color: #fff; }
.tut-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; color: var(--on-dark-muted); }
.tut-stats strong { display: block; font-size: 1.9rem; color: #fff; letter-spacing: -.02em; line-height: 1.1; }
.tut-hero-code pre { margin: 0; padding: 22px 24px; border-radius: 18px; background: rgba(1, 20, 18, .6); border: 1px solid var(--line-dark); box-shadow: 0 30px 60px rgba(0, 0, 0, .3); overflow: auto; }
.tut-hero-code code { font-size: .92rem; line-height: 1.7; color: #e9f1f5; }
.tut-index { padding-top: 56px; }
.tut-progress { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: center; padding: 22px 26px; margin-bottom: 36px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-2); }
.tut-progress[hidden] { display: none; }
.tut-progress p { margin: 0; }
.tut-progress .bar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; }
.tut-progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); transition: width .6s var(--ease); }
.tut-level { font-size: 1.15rem; margin: 40px 0 16px; }
.tut-level:first-of-type { margin-top: 0; }
.tut-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tut-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 16px; height: 100%; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--text); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.tut-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(5, 160, 144, .45); }
.tut-num { font-family: var(--mono); font-size: .9rem; color: var(--teal-ink); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--teal-tint); }
.tut-card-body { display: grid; gap: 4px; }
.tut-card strong { color: var(--navy); font-size: 1.02rem; line-height: 1.3; }
.tut-card small { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.tut-card em { font-style: normal; font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-top: 4px; }
.tut-check { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; color: #fff; background: var(--teal); opacity: 0; transform: scale(.6); transition: all .3s var(--ease); }
.is-done .tut-check { opacity: 1; transform: none; }
.tut-how { margin-top: 64px; }
.tut-how .steps { grid-template-columns: repeat(3, 1fr); }
.tut-how .steps li::after { display: none; }
.tut-credit { margin-top: 24px; font-size: .88rem; color: var(--muted); }
@media (max-width: 960px) { .tut-hero-inner { grid-template-columns: 1fr; } .tut-progress { grid-template-columns: 1fr; } }
@media (max-width: 1020px) { .tut-how .steps { grid-template-columns: 1fr; } }

.tut-head { position: relative; padding: calc(var(--header-h) + 40px) 0 44px; }
.tut-head h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: .3em; }
.tut-head .hero-lead { margin-bottom: 18px; }
.crumbs { font-family: var(--mono); font-size: .8rem; color: var(--on-dark-muted); margin-bottom: 14px; }
.crumbs a { color: var(--teal-bright); text-decoration: none; }
.tut-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 0; font-size: .85rem; color: var(--on-dark-muted); font-family: var(--mono); }
.pill { padding: 3px 10px; border-radius: 999px; background: rgba(47, 211, 189, .14); color: #7ee8d8; border: 1px solid rgba(47, 211, 189, .3); }
.tut-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 40px; padding-top: 40px; padding-bottom: 80px; align-items: start; }
.tut-side, .tut-toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; font-size: .88rem; }
.tut-side summary { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-ink); cursor: pointer; margin-bottom: 10px; list-style: none; }
.tut-side summary::-webkit-details-marker { display: none; }
.tut-side ol { display: grid; gap: 2px; }
.tut-side a { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 7px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.tut-side a span { font-family: var(--mono); font-size: .75rem; padding-top: 2px; }
.tut-side a:hover { background: var(--paper-2); color: var(--navy); }
.tut-side a[aria-current] { background: var(--teal-tint); color: var(--teal-ink); font-weight: 650; }
.tut-side a.is-done span { color: var(--teal); }
.tut-toc p { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-ink); margin-bottom: 10px; }
.tut-toc ol { display: grid; gap: 2px; border-left: 2px solid var(--line); }
.tut-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.tut-toc a:hover, .tut-toc a.active { color: var(--teal-ink); border-left-color: var(--teal); }

.tut-article { font-size: 1.04rem; line-height: 1.75; min-width: 0; }
.tut-article h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); margin: 2.2em 0 .6em; scroll-margin-top: calc(var(--header-h) + 20px); }
.tut-article h2:first-child { margin-top: 0; }
.tut-article h3 { font-size: 1.15rem; margin: 1.8em 0 .5em; scroll-margin-top: calc(var(--header-h) + 20px); }
.tut-article .anchor { float: left; margin-left: -1.1em; padding-right: .3em; color: var(--line); text-decoration: none; opacity: 0; }
.tut-article h2:hover .anchor, .tut-article h3:hover .anchor { opacity: 1; }
.tut-article ul, .tut-article ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.tut-article ul { list-style: disc; }
.tut-article ol { list-style: decimal; }
.tut-article li { margin: .3em 0; }
.tut-article li::marker { color: var(--teal); }
.tut-article :not(pre) > code { font-size: .86em; padding: .12em .4em; border-radius: 6px; background: var(--paper-2); border: 1px solid var(--line); color: var(--navy); }
.tut-article hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.tut-article table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.tut-article th, .tut-article td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.tut-article th { background: var(--paper-2); color: var(--navy); }
.callout { margin: 1.2em 0; padding: 14px 18px; border-radius: 12px; border-left: 4px solid var(--teal); background: var(--teal-tint); }
.callout p { margin: 0; }
.callout.warn { border-left-color: #e0a100; background: #fff6dc; }
.callout.note { border-left-color: var(--navy); background: var(--paper-2); }

.code { margin: 1.1em 0 1.3em; border-radius: 14px; overflow: hidden; background: #0b1d30; border: 1px solid #12324f; }
.code-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; background: #0a2540; border-bottom: 1px solid #12324f; }
.code-lang { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #7f9ab0; }
.code-actions { display: flex; gap: 6px; }
.code-btn { font: 600 .78rem var(--font); padding: 5px 11px; border-radius: 8px; border: 1px solid #23476a; background: transparent; color: #cfe2ef; cursor: pointer; }
.code-btn:hover { border-color: var(--teal-bright); color: #fff; }
.code-btn.run { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.code-btn.run:hover { background: #14b5a2; }
.code-btn:disabled { opacity: .6; cursor: progress; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code code { font-family: var(--mono); font-size: .88rem; line-height: 1.65; color: #e6eef5; white-space: pre; }
.code-out { background: #f6f8fa; border-color: var(--line); }
.code-out .code-bar { background: #eef1f4; border-color: var(--line); }
.code-out .code-lang { color: var(--muted); }
.code-out code { color: var(--text); }
.run-out { margin: 0; padding: 14px 18px; border-top: 1px dashed #23476a; background: #071624; color: #b5f3ea; font-family: var(--mono); font-size: .86rem; line-height: 1.6; white-space: pre-wrap; }
.run-out.err { color: #ffb0a6; }
.tk-k { color: #ff8fb1; } .tk-s { color: #a5e8a0; } .tk-c { color: #6f8aa3; font-style: italic; } .tk-n { color: #ffc879; }
.tk-f { color: #7ee8d8; } .tk-b { color: #8cc8ff; } .tk-d { color: #f2c94c; } .tk-self { color: #ffb38a; }
details.solution { margin: .6em 0 1.6em; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
details.solution summary { cursor: pointer; padding: 10px 16px; font-weight: 650; color: var(--teal-ink); }
details.solution[open] summary { border-bottom: 1px solid var(--line); }
.solution-body { padding: 4px 16px 8px; }
.tut-done { margin: 48px 0 24px; display: flex; justify-content: center; }
.tut-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pager { display: grid; gap: 4px; padding: 16px 20px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.pager:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.pager small { color: var(--muted); font-family: var(--mono); font-size: .75rem; }
.pager strong { color: var(--navy); }
.pager.next { text-align: right; }
@media (max-width: 1180px) { .tut-layout { grid-template-columns: 230px minmax(0, 1fr); } .tut-toc { display: none; } }
@media (max-width: 860px) {
  .tut-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .tut-side { position: static; max-height: none; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
  .tut-side details:not([open]) summary { margin-bottom: 0; }
  .tut-pager { grid-template-columns: 1fr; }
}
