:root {
  --ink: #0a1811;
  --ink-soft: #26372e;
  --muted: #69776f;
  --muted-2: #89938d;
  --paper: #f2f4ef;
  --paper-2: #e8ece6;
  --white: #ffffff;
  --deep: #06130d;
  --deep-2: #0b2117;
  --deep-3: #133426;
  --green: #35e58f;
  --green-2: #b9ffd9;
  --green-dark: #0a8c52;
  --line: #d5ddd6;
  --line-dark: rgba(255, 255, 255, .13);
  --danger: #d74c4c;
  --warning: #dc9a22;
  --success: #13895a;
  --shadow: 0 24px 70px rgba(13, 30, 21, .12);
  --shadow-deep: 0 34px 90px rgba(0, 0, 0, .34);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 11px;
  --max: 1540px;
  --topbar: 78px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 24px); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.overlay-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

::selection { background: var(--green); color: var(--deep); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #e6eae5; }
::-webkit-scrollbar-thumb { border: 3px solid #e6eae5; border-radius: 999px; background: #9ca8a0; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 500;
  transform: translateY(-160%);
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--green);
  color: var(--deep);
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  background-image:
    linear-gradient(rgba(10, 24, 17, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 24, 17, .035) 1px, transparent 1px);
  background-size: 64px 64px;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 0 clamp(20px, 4vw, 72px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  transition: background .3s ease, backdrop-filter .3s ease, box-shadow .3s ease;
}
.topbar.is-scrolled {
  background: rgba(6, 19, 13, .88);
  backdrop-filter: blur(22px) saturate(135%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .13);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: #fff;
  text-decoration: none;
}
.brand-symbol {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(53, 229, 143, .72);
  box-shadow: inset 0 0 0 5px rgba(53, 229, 143, .06);
}
.brand-symbol svg { width: 24px; height: 24px; fill: var(--green); }
.brand-text { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 5px; line-height: 1; }
.brand-text strong { font-size: 17px; letter-spacing: -.02em; }
.brand-text > span { font-size: 10px; font-weight: 700; letter-spacing: .12em; opacity: .66; }
.brand-text em { grid-column: 1 / -1; margin-top: 5px; color: var(--green); font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: .28em; }

.main-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.main-nav a {
  position: relative;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
  opacity: .72;
  text-decoration: none;
  transition: opacity .2s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--green);
  transition: transform .3s var(--ease);
}
.main-nav a:hover { opacity: 1; }
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.install-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.language-switch {
  position: relative;
  width: 74px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: #fff;
  cursor: pointer;
  overflow: hidden;
}
.language-switch span { position: relative; z-index: 2; font-size: 9px; font-weight: 900; letter-spacing: .08em; opacity: .56; transition: opacity .25s ease, color .25s ease; }
.language-switch span:first-child { opacity: 1; color: var(--deep); }
.language-switch i {
  position: absolute;
  z-index: 1;
  left: 3px;
  top: 3px;
  width: 32px;
  height: 30px;
  border-radius: 999px;
  background: var(--green);
  transition: transform .35s var(--ease);
}
.language-switch.is-uz i { transform: translateX(35px); }
.language-switch.is-uz span:first-child { opacity: .56; color: #fff; }
.language-switch.is-uz span:last-child { opacity: 1; color: var(--deep); }
.round-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .055);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.round-button:hover { background: var(--green); color: var(--deep); transform: translateY(-1px); }
.round-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.section { padding: 118px clamp(20px, 5vw, 82px); }
.section > * { width: min(100%, var(--max)); margin-left: auto; margin-right: auto; }
.screen-section { min-height: 100vh; }

.hero {
  position: relative;
  min-height: max(760px, 100vh);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(430px, .98fr);
  gap: clamp(42px, 7vw, 112px);
  align-items: center;
  padding: calc(var(--topbar) + 74px) clamp(24px, 6vw, 96px) 76px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(circle at 84% 28%, rgba(53, 229, 143, .14), transparent 32%),
    radial-gradient(circle at 15% 100%, rgba(26, 111, 73, .18), transparent 40%),
    linear-gradient(135deg, #06110c 0%, #07170f 48%, #0b2117 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .55) 65%, transparent 100%);
}
.hero::after {
  content: "AKFA LAB";
  position: absolute;
  right: -2vw;
  bottom: -7vw;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .04);
  font-size: clamp(130px, 20vw, 340px);
  font-weight: 900;
  letter-spacing: -.08em;
  white-space: nowrap;
}
.hero-copy, .hero-console { position: relative; z-index: 2; }
.hero-copy { max-width: 820px; }
.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #68766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.section-kicker > span:first-child:not(.pulse-dot) { width: 30px; height: 1px; background: var(--green-dark); }
.section-kicker-dark { color: rgba(255, 255, 255, .58); }
.section-kicker-dark > span:first-child:not(.pulse-dot) { background: var(--green); }
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(53, 229, 143, .48);
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 60% { box-shadow: 0 0 0 11px rgba(53, 229, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(53, 229, 143, 0); } }
.hero h1 {
  max-width: 900px;
  margin: 27px 0 26px;
  font-size: clamp(54px, 6.3vw, 104px);
  font-weight: 720;
  line-height: .91;
  letter-spacing: -.066em;
  text-wrap: balance;
}
.hero-lead {
  max-width: 700px;
  margin: 0;
  color: rgba(226, 236, 230, .68);
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.72;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s ease, color .25s ease, border-color .25s ease;
}
.button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.button:hover { transform: translateY(-3px); }
.button-primary { border: 1px solid var(--green); background: var(--green); color: var(--deep); box-shadow: 0 16px 40px rgba(53, 229, 143, .16); }
.button-ghost { border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .035); color: #fff; }
.button-ghost:hover { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08); }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 760px;
  margin-top: 70px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.stat { min-width: 0; padding: 0 24px; border-right: 1px solid rgba(255, 255, 255, .12); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border: 0; }
.stat strong { display: block; overflow: hidden; color: #fff; font-size: clamp(20px, 2vw, 29px); line-height: 1.15; text-overflow: ellipsis; }
.stat span { display: block; margin-top: 7px; color: rgba(220, 232, 225, .52); font-size: 10px; line-height: 1.35; }
.stat-wide strong { color: var(--green); font-size: 14px; letter-spacing: .12em; }

.hero-console { min-height: 630px; display: grid; place-items: center; perspective: 1400px; }
.hero-orbit { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.orbit-one { width: 570px; height: 570px; right: -40px; top: 80px; border: 1px solid rgba(53, 229, 143, .16); box-shadow: inset 0 0 90px rgba(53, 229, 143, .03), 0 0 80px rgba(53, 229, 143, .04); }
.orbit-two { width: 390px; height: 390px; right: 52px; top: 170px; border: 1px dashed rgba(255, 255, 255, .1); }
.console-shell {
  position: relative;
  width: min(100%, 570px);
  min-height: 455px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(19, 50, 36, .82), rgba(7, 22, 15, .91));
  box-shadow: var(--shadow-deep), inset 0 1px rgba(255, 255, 255, .05);
  backdrop-filter: blur(24px);
  transform: rotateY(-7deg) rotateX(2deg);
  animation: consoleFloat 6s ease-in-out infinite;
}
@keyframes consoleFloat { 50% { transform: rotateY(-4deg) rotateX(1deg) translateY(-9px); } }
.console-shell::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border-radius: 23px;
  background-image: linear-gradient(rgba(255,255,255,.027) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.027) 1px, transparent 1px);
  background-size: 28px 28px;
}
.console-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 19px; border-bottom: 1px solid rgba(255, 255, 255, .11); color: rgba(255,255,255,.52); font-size: 9px; letter-spacing: .13em; }
.console-head > div { display: flex; align-items: center; gap: 8px; }
.console-head strong { color: var(--green); font-size: 9px; }
.console-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px var(--green); }
.console-title-row { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 28px; }
.console-title-row small { color: rgba(255,255,255,.43); font-size: 9px; letter-spacing: .18em; }
.console-title-row h2 { margin: 5px 0 0; font-size: 58px; font-weight: 500; letter-spacing: -.06em; }
.console-title-row h2 sub { font-size: .36em; }
.console-ready { margin-top: 6px; padding: 8px 11px; border: 1px solid rgba(53,229,143,.22); border-radius: 999px; background: rgba(53,229,143,.07); color: var(--green); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.console-equation { margin-top: 18px; padding: 15px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(0,0,0,.13); color: rgba(255,255,255,.66); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; text-align: center; }
.console-flow { display: grid; grid-template-columns: 1fr 26px 1fr 26px 1fr; align-items: center; gap: 4px; margin-top: 24px; }
.console-flow > div { min-width: 0; padding: 13px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.025); }
.console-flow > div.active { border-color: rgba(53,229,143,.3); background: rgba(53,229,143,.06); }
.console-flow span { display: block; color: var(--green); font-size: 8px; font-weight: 900; }
.console-flow b { display: block; margin: 4px 0 3px; overflow: hidden; color: rgba(255,255,255,.82); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.console-flow small { display: block; overflow: hidden; color: rgba(255,255,255,.36); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.console-flow i { height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(53,229,143,.48)); }
.console-result { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 25px; }
.console-result small { display: block; color: rgba(255,255,255,.42); font-size: 8px; letter-spacing: .12em; }
.console-result strong { display: inline-block; margin-top: 3px; color: #fff; font-size: 52px; line-height: 1; letter-spacing: -.05em; }
.console-result > div:first-child > span { margin-left: 6px; color: var(--green); font-size: 10px; }
.console-chart { width: 170px; height: 72px; display: flex; align-items: flex-end; gap: 7px; padding: 0 4px; border-bottom: 1px solid rgba(255,255,255,.14); }
.console-chart i { width: 100%; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(var(--green), rgba(53,229,143,.15)); box-shadow: 0 0 14px rgba(53,229,143,.11); }
.floating-chip { position: absolute; z-index: 5; display: grid; min-width: 132px; padding: 16px; border: 1px solid rgba(255,255,255,.13); border-radius: 19px; background: rgba(9,29,20,.83); box-shadow: 0 24px 60px rgba(0,0,0,.28); backdrop-filter: blur(18px); }
.floating-chip span { color: var(--green); font-size: 10px; font-weight: 900; }
.floating-chip strong { margin: 4px 0; font-size: 23px; }
.floating-chip small { color: rgba(255,255,255,.42); font-size: 8px; }
.chip-a { left: -12px; top: 112px; transform: rotate(-5deg); }
.chip-b { right: -10px; bottom: 102px; transform: rotate(4deg); }

.catalog { background: var(--paper); }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .6fr);
  gap: 60px;
  align-items: end;
  margin-bottom: 48px;
}
.section-heading h2 { margin: 16px 0 0; font-size: clamp(42px, 5vw, 76px); line-height: .96; letter-spacing: -.055em; }
.section-heading > p, .history-heading-actions > p { max-width: 580px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.filter-scroll { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; padding: 3px 0; scrollbar-width: none; }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-button {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.filter-button small { min-width: 23px; padding: 3px 7px; border-radius: 999px; background: rgba(10,24,17,.06); color: var(--muted); font-size: 8px; }
.filter-button:hover { transform: translateY(-2px); border-color: #b7c2ba; }
.filter-button.is-active { border-color: var(--deep); background: var(--deep); color: #fff; }
.filter-button.is-active small { background: rgba(53,229,143,.13); color: var(--green); }
.inline-search {
  flex: 0 0 min(380px, 32vw);
  height: 46px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.inline-search:focus-within { border-color: #8fb8a0; box-shadow: 0 0 0 4px rgba(53,229,143,.08); }
.inline-search svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.inline-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.inline-search input::placeholder { color: #929c96; }

.calculator-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.calculator-card {
  position: relative;
  min-height: 355px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.74);
  transition: transform .35s var(--ease), box-shadow .35s ease, border-color .35s ease, opacity .2s ease;
}
.calculator-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 30% 0%, rgba(53,229,143,.15), transparent 38%);
  transition: opacity .35s ease;
}
.calculator-card:hover { transform: translateY(-8px); border-color: #b5c6ba; box-shadow: var(--shadow); }
.calculator-card:hover::before { opacity: 1; }
.calculator-card.is-featured { border-color: #aacdb8; background: linear-gradient(145deg, #fbfffc, #e9f6ee); }
.calculator-card.is-featured::after { content: "FEATURED"; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); color: var(--green-dark); font-size: 7px; font-weight: 900; letter-spacing: .18em; }
.card-topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 19px 20px 0; }
.card-index { color: #9aa59e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: .12em; }
.favorite-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.62);
  color: #89938d;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.favorite-button:hover { transform: scale(1.06); }
.favorite-button.is-active { border-color: var(--deep); background: var(--deep); color: var(--green); }
.favorite-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.favorite-button.is-active svg { fill: currentColor; }
.card-main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 19px 20px 22px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.calculator-icon { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 30px; border: 1px solid #cfdbd2; border-radius: 18px; background: rgba(255,255,255,.75); color: var(--deep); box-shadow: 0 10px 25px rgba(12,33,21,.06); transition: transform .35s var(--ease), background .25s ease, color .25s ease; }
.calculator-card:hover .calculator-icon { transform: rotate(-5deg) scale(1.04); background: var(--deep); color: var(--green); }
.calculator-icon svg, .history-icon svg, .search-result-icon svg, .workspace-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.card-category { color: var(--green-dark); font-size: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.card-main h3 { margin: 10px 0 10px; font-size: 23px; line-height: 1.08; letter-spacing: -.035em; }
.card-main p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.card-footer { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 14px 14px 14px 20px; border-top: 1px solid var(--line); }
.card-footer > div { display: grid; gap: 4px; }
.card-footer small { color: #9aa49e; font-size: 7px; font-weight: 850; letter-spacing: .13em; }
.card-footer span { color: var(--ink-soft); font-size: 10px; font-weight: 760; }
.card-arrow { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; transition: background .25s ease, color .25s ease, transform .25s ease; }
.card-arrow:hover { transform: rotate(8deg); background: var(--green); color: var(--deep); }
.card-arrow svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.catalog-empty { display: grid; place-items: center; min-height: 300px; text-align: center; color: var(--muted); }
.catalog-empty span { font-size: 62px; font-weight: 300; }

.history-section { padding-top: 86px; background: #e9ede8; border-top: 1px solid var(--line); }
.compact-heading { align-items: center; }
.compact-heading h2 { font-size: clamp(40px, 4.2vw, 64px); }
.history-heading-actions { display: grid; justify-items: start; gap: 16px; }
.text-button { padding: 0 0 5px; border: 0; border-bottom: 1px solid #9dac9f; background: transparent; color: var(--ink); font-size: 10px; font-weight: 850; cursor: pointer; }
.history-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.history-card { min-height: 270px; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 21px; background: rgba(255,255,255,.68); transition: transform .25s var(--ease), box-shadow .25s ease; }
.history-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(16,36,24,.09); }
.history-card-head { display: flex; align-items: center; gap: 10px; }
.history-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--deep); color: var(--green); }
.history-icon svg { width: 19px; height: 19px; }
.history-card-head small { color: var(--green-dark); font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.history-card-head button { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(10,24,17,.05); color: var(--muted); cursor: pointer; }
.history-card h3 { margin: 20px 0 5px; font-size: 20px; line-height: 1.15; letter-spacing: -.03em; }
.history-card > p { margin: 0; color: var(--muted); font-size: 11px; }
.history-result { display: flex; align-items: baseline; gap: 7px; margin-top: auto; padding-top: 18px; }
.history-result strong { font-size: 27px; letter-spacing: -.04em; }
.history-result span { color: var(--muted); font-size: 10px; }
.history-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.history-card footer span { color: #8e9992; font-size: 8px; }
.history-card footer button { border: 0; background: transparent; color: var(--ink); font-size: 9px; font-weight: 850; cursor: pointer; }
.history-empty { min-height: 300px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-symbol { width: 74px; height: 74px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.6); color: #8d9991; }
.empty-symbol svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.history-empty h3 { margin: 20px 0 6px; font-size: 22px; }
.history-empty p { max-width: 460px; margin: 0; color: var(--muted); font-size: 12px; }

.methodology {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(50px, 8vw, 130px);
  color: #fff;
  background:
    radial-gradient(circle at 10% 50%, rgba(53,229,143,.1), transparent 32%),
    var(--deep);
}
.methodology > * { width: auto; margin: 0; }
.method-copy h2 { margin: 20px 0 24px; font-size: clamp(46px, 5vw, 78px); line-height: .97; letter-spacing: -.055em; }
.method-copy > p { max-width: 580px; margin: 0; color: rgba(225,235,229,.58); line-height: 1.8; }
.method-status { display: flex; align-items: center; gap: 13px; margin-top: 38px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(255,255,255,.03); }
.status-light { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 16px var(--green); }
.method-status small { display: block; color: rgba(255,255,255,.4); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.method-status strong { display: block; margin-top: 3px; font-size: 11px; }
.method-cards { display: grid; align-content: center; }
.method-cards article { display: grid; grid-template-columns: 90px 1fr; gap: 25px; padding: 30px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.method-cards article:first-child { border-top: 1px solid rgba(255,255,255,.12); }
.method-cards article > span { color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.method-cards h3 { margin: 0 0 9px; font-size: 21px; letter-spacing: -.025em; }
.method-cards p { max-width: 600px; margin: 0; color: rgba(225,235,229,.54); font-size: 13px; line-height: 1.7; }

.ecosystem { display: grid; grid-template-columns: minmax(0, .76fr) minmax(500px, 1.24fr); gap: 80px; align-items: center; min-height: 760px; background: var(--paper); }
.ecosystem > * { width: auto; margin: 0; }
.ecosystem-copy h2 { margin: 18px 0 24px; font-size: clamp(46px, 5vw, 76px); line-height: .97; letter-spacing: -.055em; }
.ecosystem-copy > p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.8; }
.privacy-note { display: flex; align-items: flex-start; gap: 15px; margin-top: 36px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.58); }
.privacy-note svg { width: 23px; height: 23px; flex: 0 0 auto; fill: none; stroke: var(--green-dark); stroke-width: 1.7; }
.privacy-note strong { display: block; font-size: 11px; }
.privacy-note span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ecosystem-map { position: relative; min-height: 510px; border: 1px solid var(--line); border-radius: 50%; background: radial-gradient(circle at center, rgba(53,229,143,.11), transparent 50%); }
.ecosystem-map::before, .ecosystem-map::after { content: ""; position: absolute; inset: 18%; border: 1px dashed #c8d1ca; border-radius: 50%; }
.ecosystem-map::after { inset: 34%; }
.map-core, .map-node { position: absolute; z-index: 3; display: grid; place-items: center; text-align: center; text-decoration: none; }
.map-core { inset: 50% auto auto 50%; width: 144px; height: 144px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--deep); color: #fff; box-shadow: 0 25px 60px rgba(9,29,18,.25); }
.map-core span { color: rgba(255,255,255,.58); font-size: 10px; letter-spacing: .15em; }
.map-core strong { color: var(--green); font-size: 31px; letter-spacing: -.04em; }
.map-core small { font-size: 7px; letter-spacing: .11em; opacity: .43; }
.map-node { width: 132px; height: 78px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.91); box-shadow: 0 15px 35px rgba(12,31,20,.08); transition: transform .25s var(--ease), border-color .25s ease; }
.map-node:hover { transform: translateY(-5px); border-color: #9bb9a6; }
.map-node small { color: var(--green-dark); font-size: 7px; font-weight: 900; letter-spacing: .13em; }
.map-node strong { font-size: 11px; }
.node-one { left: 3%; top: 18%; }
.node-two { right: 2%; top: 17%; }
.node-three { left: 6%; bottom: 13%; }
.node-four { right: 5%; bottom: 13%; }
.map-line { position: absolute; z-index: 1; width: 31%; height: 1px; background: linear-gradient(90deg, transparent, #9fb3a6); transform-origin: left; }
.line-one { left: 23%; top: 33%; transform: rotate(22deg); }
.line-two { left: 52%; top: 39%; transform: rotate(-25deg); }
.line-three { left: 24%; top: 67%; transform: rotate(-20deg); }
.line-four { left: 52%; top: 61%; transform: rotate(24deg); }

.site-footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 20px clamp(20px, 5vw, 82px); border-top: 1px solid rgba(255,255,255,.1); background: var(--deep); color: #fff; }
.footer-brand { display: flex; align-items: baseline; gap: 12px; }
.footer-brand strong { font-size: 13px; }
.footer-brand span { color: var(--green); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.site-footer p { display: flex; gap: 25px; margin: 0; color: rgba(255,255,255,.45); font-size: 9px; }
.site-footer > a { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 9px; font-weight: 800; text-decoration: none; }
.site-footer > a svg { width: 16px; height: 16px; fill: none; stroke: var(--green); stroke-width: 1.7; }

.workspace {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
}
.workspace.is-open { visibility: visible; opacity: 1; }
.workspace-backdrop { position: absolute; inset: 0; background: rgba(1, 8, 5, .78); backdrop-filter: blur(12px); }
.workspace-shell {
  position: absolute;
  inset: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
  transform: translateY(25px) scale(.985);
  transition: transform .45s var(--ease);
}
.workspace.is-open .workspace-shell { transform: translateY(0) scale(1); }
.workspace-header { min-height: 84px; display: flex; align-items: center; gap: 18px; padding: 13px 18px; border-bottom: 1px solid rgba(255,255,255,.11); background: var(--deep); color: #fff; }
.workspace-close { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; background: rgba(255,255,255,.04); color: #fff; cursor: pointer; }
.workspace-close:hover { background: var(--green); color: var(--deep); }
.workspace-close svg, .workspace-header-actions svg, .result-actions svg, .recalculate-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.workspace-heading { min-width: 0; }
.workspace-heading > span { display: block; color: var(--green); font-size: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.workspace-heading h2 { margin: 3px 0 2px; overflow: hidden; font-size: 22px; line-height: 1.1; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.workspace-heading small { color: rgba(255,255,255,.42); font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.workspace-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.workspace-header-actions button { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.045); color: #fff; font-size: 9px; font-weight: 750; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.workspace-header-actions button:hover { border-color: rgba(53,229,143,.42); background: rgba(53,229,143,.09); }
.workspace-header-actions .workspace-language { width: 42px; justify-content: center; padding: 0; border-color: rgba(53,229,143,.35); color: var(--green); }
.workspace-header-actions .workspace-language strong { font-size: 9px; letter-spacing: .08em; }
.workspace-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(250px, 310px) minmax(420px, 1fr) minmax(340px, 430px); overflow: hidden; }
.workspace-context, .workspace-form-column, .workspace-result-column { min-width: 0; min-height: 0; overflow-y: auto; }
.workspace-context { padding: 26px; border-right: 1px solid var(--line); background: #e9ede8; }
.workspace-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px; background: var(--deep); color: var(--green); box-shadow: 0 18px 40px rgba(8,29,17,.17); }
.workspace-icon svg { width: 34px; height: 34px; }
.workspace-context > p { margin: 24px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.model-card, .limitation-card { padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.7); }
.model-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.model-card-head span, .limitation-card > span { color: var(--green-dark); font-size: 8px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.model-card-head small { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.model-card code { display: block; overflow-wrap: anywhere; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; line-height: 1.65; }
.limitation-card { margin-top: 12px; }
.limitation-card p { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.context-warning { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; padding: 14px; border: 1px solid rgba(220,154,34,.23); border-radius: 14px; background: rgba(220,154,34,.075); color: #725312; }
.context-warning svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; }
.context-warning span { font-size: 9px; line-height: 1.5; }

.workspace-form-column { padding: 26px clamp(22px, 3vw, 44px) 44px; background: var(--paper); }
.form-column-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.form-column-head small { display: block; color: var(--green-dark); font-size: 8px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.form-column-head strong { display: block; margin-top: 4px; font-size: 12px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #b8d8c4; border-radius: 999px; background: #effaf3; color: var(--green-dark); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--green-dark); }
.project-field { display: grid; gap: 8px; margin-bottom: 14px; }
.project-field > span { color: var(--muted); font-size: 9px; font-weight: 760; }
.project-field input { width: 100%; height: 50px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: #fff; color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease; }
.project-field input:focus { border-color: #82b698; box-shadow: 0 0 0 4px rgba(53,229,143,.08); }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.model-field { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.75); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.model-field:focus-within { border-color: #8eb9a0; background: #fff; transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(53,229,143,.055); }
.model-field.is-wide { grid-column: 1 / -1; }
.model-field-label { min-width: 0; display: flex; justify-content: space-between; gap: 10px; }
.model-field-label b { min-width: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.3; }
.model-field-label em { flex: 0 0 auto; color: var(--green-dark); font-size: 8px; font-style: normal; font-weight: 850; }
.model-control { position: relative; display: block; }
.model-control input, .model-control select, .model-control textarea { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.2; }
.model-control input { height: 34px; }
.model-control select { height: 34px; appearance: none; cursor: pointer; }
.model-control textarea { min-height: 145px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 500; line-height: 1.6; }
.model-control .is-invalid { color: var(--danger); }
.model-field > small { color: var(--muted-2); font-size: 8px; line-height: 1.4; }
.recalculate-button { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--deep); color: #fff; font-size: 10px; font-weight: 850; cursor: pointer; transition: transform .2s var(--ease), background .2s ease; }
.recalculate-button:hover { transform: translateY(-2px); background: #0b2c1d; }
.recalculate-button svg { color: var(--green); }

.workspace-result-column { display: flex; flex-direction: column; padding: 25px; border-left: 1px solid var(--line); background: #fff; }
.result-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.result-header > span { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.result-status { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: #edf7f1; color: var(--success); }
.result-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.result-status b { font-size: 8px; }
.status-attention .result-status { background: #fff6e6; color: #a66e0d; }
.status-risk .result-status { background: #fff0f0; color: var(--danger); }
.result-empty { flex: 1; display: grid; place-items: center; align-content: center; min-height: 300px; text-align: center; color: var(--muted); }
.result-empty > span { width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); font-family: Georgia, serif; font-size: 35px; }
.result-empty p { max-width: 260px; margin: 17px 0 0; font-size: 11px; line-height: 1.6; }
.result-content { flex: 1; }
.main-result { padding: 24px; border-radius: 22px; background: var(--deep); color: #fff; box-shadow: 0 20px 50px rgba(8,31,18,.18); }
.main-result > small { color: rgba(255,255,255,.48); font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.main-result > div { display: flex; align-items: baseline; gap: 10px; margin-top: 9px; }
.main-result strong { overflow-wrap: anywhere; color: var(--green); font-size: clamp(38px, 4vw, 60px); line-height: 1; letter-spacing: -.055em; }
.main-result span { color: rgba(255,255,255,.68); font-size: 10px; }
.result-note { margin: 19px 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.result-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.result-metric { min-width: 0; display: grid; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.result-metric span { overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.result-metric strong { margin-top: 6px; overflow-wrap: anywhere; font-size: 17px; line-height: 1.15; }
.result-metric small { margin-top: 2px; color: var(--green-dark); font-size: 8px; }
.result-warnings { display: grid; gap: 8px; margin-top: 12px; }
.result-warning { display: flex; gap: 10px; padding: 12px; border: 1px solid rgba(220,154,34,.28); border-radius: 13px; background: rgba(220,154,34,.08); color: #785411; }
.result-warning.is-risk { border-color: rgba(215,76,76,.25); background: rgba(215,76,76,.07); color: #9d3030; }
.result-warning > span { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; font-size: 9px; font-weight: 900; }
.result-warning p { margin: 0; font-size: 9px; line-height: 1.55; }
.result-details { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.details-head { margin-bottom: 8px; color: var(--green-dark); font-size: 8px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
#resultDetailsList { display: grid; gap: 6px; }
.detail-row { display: grid; grid-template-columns: 90px 1fr; gap: 3px 10px; padding: 10px; border-radius: 11px; background: var(--paper); }
.detail-row span { color: var(--muted); font-size: 8px; }
.detail-row strong { overflow-wrap: anywhere; font-size: 9px; }
.detail-row small { grid-column: 2; color: var(--green-dark); font-size: 8px; }
.result-actions { display: grid; grid-template-columns: 1.25fr .75fr; gap: 8px; margin-top: 18px; }
.result-actions button { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--ink); font-size: 9px; font-weight: 820; cursor: pointer; }
.result-actions button:hover { border-color: #a9bdaf; background: #fff; }
.result-actions .save-project-button { border-color: var(--deep); background: var(--deep); color: #fff; }
.result-actions .save-project-button svg { color: var(--green); }
.print-report-meta { display: none; }

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: start center;
  padding: 8vh 20px 30px;
  visibility: hidden;
  opacity: 0;
  background: rgba(3,12,7,.91);
  backdrop-filter: blur(20px);
  transition: opacity .25s ease, visibility .25s ease;
}
.search-overlay.is-open { visibility: visible; opacity: 1; }
.search-overlay-inner { width: min(900px, 100%); max-height: 84vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 28px; background: #0a1d14; color: #fff; box-shadow: var(--shadow-deep); transform: translateY(16px); transition: transform .35s var(--ease); }
.search-overlay.is-open .search-overlay-inner { transform: translateY(0); }
.search-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.46); font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.search-head button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; background: rgba(255,255,255,.04); color: #fff; cursor: pointer; }
.search-head svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.search-large { display: flex; align-items: center; gap: 17px; min-height: 92px; padding: 0 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.search-large svg { width: 28px; height: 28px; flex: 0 0 auto; fill: none; stroke: var(--green); stroke-width: 1.5; }
.search-large input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: clamp(22px, 3vw, 38px); font-weight: 600; letter-spacing: -.035em; }
.search-large input::placeholder { color: rgba(255,255,255,.24); }
.search-results { min-height: 150px; overflow-y: auto; padding: 10px; }
.search-result { width: 100%; display: grid; grid-template-columns: 48px 1fr 30px; gap: 14px; align-items: center; padding: 13px; border: 0; border-radius: 16px; background: transparent; color: #fff; text-align: left; cursor: pointer; transition: background .2s ease; }
.search-result:hover { background: rgba(255,255,255,.06); }
.search-result-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; color: var(--green); }
.search-result-icon svg { width: 23px; height: 23px; }
.search-result-copy { min-width: 0; display: grid; }
.search-result-copy small { color: var(--green); font-size: 7px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.search-result-copy strong { margin-top: 3px; font-size: 14px; }
.search-result-copy em { overflow: hidden; margin-top: 3px; color: rgba(255,255,255,.42); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.search-result-arrow { color: rgba(255,255,255,.45); }
.search-no-results { min-height: 250px; display: grid; place-items: center; align-content: center; text-align: center; color: rgba(255,255,255,.45); }
.search-no-results span { font-size: 55px; }
.search-no-results p { margin: 7px 0 0; font-size: 11px; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 300; max-width: min(420px, calc(100vw - 44px)); padding: 14px 17px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: var(--deep); color: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.27); opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .25s ease, transform .35s var(--ease); }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--green); }
.toast.is-error::before { background: var(--danger); }
.toast.is-attention::before { background: var(--warning); }
.toast span { font-size: 10px; font-weight: 700; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

@media (max-width: 1320px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(390px, .8fr); gap: 40px; }
  .hero-console { min-height: 560px; }
  .console-shell { transform: none; }
  .calculator-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace-body { grid-template-columns: 260px minmax(390px, 1fr) 370px; }
  .workspace-header-actions button span { display: none; }
  .workspace-header-actions button { width: 42px; padding: 0; justify-content: center; }
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--topbar) + 90px); }
  .hero-copy { max-width: 900px; }
  .hero-console { min-height: 570px; }
  .orbit-one, .orbit-two { left: 50%; right: auto; transform: translateX(-50%); }
  .methodology, .ecosystem { grid-template-columns: 1fr; }
  .ecosystem-map { width: min(720px, 100%); min-height: 570px; margin: 0 auto; }
  .workspace-shell { inset: 8px; border-radius: 23px; }
  .workspace-body { grid-template-columns: 230px minmax(390px, 1fr); }
  .workspace-result-column { position: absolute; right: 0; top: 84px; bottom: 0; width: min(420px, 42vw); z-index: 3; box-shadow: -20px 0 60px rgba(15,34,22,.15); }
  .workspace-form-column { padding-right: calc(min(420px, 42vw) + 24px); grid-column: 2; }
  .workspace-context { grid-column: 1; }
}

@media (max-width: 820px) {
  :root { --topbar: 68px; }
  .topbar { padding: 0 17px; gap: 12px; }
  .main-nav, .install-button { display: none; }
  .top-actions { margin-left: auto; }
  .brand-text > span { display: none; }
  .hero { min-height: 860px; padding: calc(var(--topbar) + 60px) 20px 60px; }
  .hero h1 { font-size: clamp(49px, 13vw, 78px); }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .stat { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-right: 0; }
  .hero-console { min-height: 500px; }
  .console-shell { min-height: 420px; padding: 20px; }
  .floating-chip { display: none; }
  .console-flow { grid-template-columns: 1fr 12px 1fr 12px 1fr; }
  .console-flow > div { padding: 10px 7px; }
  .console-flow b { font-size: 8px; }
  .console-flow small { display: none; }
  .section { padding: 84px 18px; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; margin-bottom: 34px; }
  .section-heading h2 { font-size: clamp(42px, 12vw, 62px); }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .inline-search { flex-basis: auto; width: 100%; }
  .calculator-grid, .history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-card { min-height: 330px; }
  .methodology { gap: 55px; }
  .method-cards article { grid-template-columns: 55px 1fr; }
  .ecosystem { min-height: auto; }
  .ecosystem-map { min-height: 500px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer p { flex-direction: column; gap: 5px; }

  .workspace-shell { inset: 0; border: 0; border-radius: 0; }
  .workspace-header { min-height: 72px; padding: 10px 12px; }
  .workspace-heading h2 { max-width: 45vw; font-size: 17px; }
  .workspace-body { display: block; overflow-y: auto; }
  .workspace-context, .workspace-form-column, .workspace-result-column { overflow: visible; }
  .workspace-context { padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-context > p { margin: 18px 0; }
  .workspace-form-column { padding: 22px 18px 28px; }
  .workspace-result-column { position: static; width: auto; min-height: 560px; padding: 22px 18px 100px; border-left: 0; border-top: 1px solid var(--line); box-shadow: none; }
  #workspaceReset, #workspaceShare { display: none; }
  .fields-grid { grid-template-columns: 1fr; }
  .model-field.is-wide { grid-column: auto; }
  .result-actions { position: sticky; bottom: 0; margin: 18px -18px -100px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .brand-symbol { width: 37px; height: 37px; }
  .brand-text strong { font-size: 15px; }
  .language-switch { width: 67px; }
  .language-switch i { width: 28px; }
  .language-switch.is-uz i { transform: translateX(31px); }
  .hero { min-height: 780px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; justify-content: space-between; }
  .hero-console { min-height: 450px; }
  .console-shell { min-height: 390px; border-radius: 23px; }
  .console-title-row h2 { font-size: 46px; }
  .console-ready { max-width: 100px; text-align: center; }
  .console-result strong { font-size: 43px; }
  .console-chart { width: 125px; }
  .calculator-grid, .history-grid { grid-template-columns: 1fr; }
  .calculator-card { min-height: 315px; }
  .card-main h3 { font-size: 25px; }
  .method-copy h2, .ecosystem-copy h2 { font-size: 47px; }
  .ecosystem-map { min-height: 430px; border-radius: 32px; }
  .ecosystem-map::before, .ecosystem-map::after, .map-line { display: none; }
  .map-core { width: 118px; height: 118px; }
  .map-node { width: 118px; height: 70px; }
  .node-one { left: 4%; top: 6%; }
  .node-two { right: 4%; top: 6%; }
  .node-three { left: 4%; bottom: 6%; }
  .node-four { right: 4%; bottom: 6%; }
  .search-overlay { padding: 0; }
  .search-overlay-inner { max-height: 100vh; height: 100vh; border: 0; border-radius: 0; }
  .search-large { min-height: 82px; padding: 0 18px; }
  .search-result { grid-template-columns: 44px 1fr 20px; gap: 11px; padding: 11px 8px; }
  .workspace-heading h2 { max-width: 42vw; }
  .workspace-header-actions button { width: 38px; height: 38px; min-height: 38px; }
  .workspace-close { width: 40px; height: 40px; }
  .result-metrics { grid-template-columns: 1fr 1fr; }
  .result-actions { grid-template-columns: 1fr; }
}

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

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; color: #000 !important; font-size: 10pt; }
  body.print-workspace > :not(.workspace) { display: none !important; }
  body.print-workspace .workspace { position: static; visibility: visible; opacity: 1; }
  body.print-workspace .workspace-backdrop, body.print-workspace .workspace-header-actions, body.print-workspace .workspace-close, body.print-workspace .recalculate-button, body.print-workspace .result-actions, body.print-workspace .context-warning { display: none !important; }
  body.print-workspace .workspace-shell { position: static; inset: auto; display: block; overflow: visible; border: 0; border-radius: 0; box-shadow: none; transform: none; }
  body.print-workspace .workspace-header { min-height: 0; padding: 0 0 8mm; border-bottom: 2px solid #0a1811; background: #fff; color: #000; }
  body.print-workspace .workspace-heading > span, body.print-workspace .workspace-heading small { color: #0a8c52; }
  body.print-workspace .workspace-heading h2 { overflow: visible; font-size: 22pt; white-space: normal; }
  body.print-workspace .workspace-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; overflow: visible; }
  body.print-workspace .workspace-context { grid-column: 1 / -1; display: grid; grid-template-columns: 22mm 1fr 1fr; gap: 5mm; padding: 5mm 0; border: 0; background: #fff; overflow: visible; }
  body.print-workspace .workspace-icon { width: 18mm; height: 18mm; border: 1px solid #111; background: #fff; color: #000; box-shadow: none; }
  body.print-workspace .workspace-context > p { margin: 0; }
  body.print-workspace .model-card, body.print-workspace .limitation-card { margin: 0; padding: 4mm; background: #fff; }
  body.print-workspace .workspace-form-column, body.print-workspace .workspace-result-column { padding: 0; border: 0; background: #fff; overflow: visible; }
  body.print-workspace .fields-grid { grid-template-columns: 1fr 1fr; gap: 2mm; }
  body.print-workspace .model-field { padding: 3mm; break-inside: avoid; background: #fff; }
  body.print-workspace .model-control input, body.print-workspace .model-control select, body.print-workspace .model-control textarea { color: #000; font-size: 10pt; }
  body.print-workspace .main-result { background: #eef5f0; color: #000; box-shadow: none; }
  body.print-workspace .main-result strong { color: #087443; }
  body.print-workspace .main-result span, body.print-workspace .main-result > small { color: #333; }
  body.print-workspace .print-report-meta { display: flex; justify-content: space-between; margin-top: 8mm; padding-top: 4mm; border-top: 1px solid #aaa; color: #555; font-size: 7pt; }
}

/* Closed overlays must stop intercepting the next user action immediately. */
.workspace,.search-overlay{pointer-events:none}.workspace.is-open,.search-overlay.is-open{pointer-events:auto}
