/* Avoz. Ranglar: sovuq oq qog'oz, siyoh-binafsha matn, abr ranglari (magenta, za'faron, yashil) faqat naqshda.
   Magenta — asosiy tugmalar. Ikki burchak darajasi: panel 14px, boshqaruv 10px.
   Tungi rejim: chuqur siyoh-binafsha (qora emas), magenta yorqinroq. data-theme cookie'dan, bo'lmasa tizimdan. */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(fonts/unbounded-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(fonts/unbounded-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(fonts/unbounded-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/onest-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/onest-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/onest-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f6f6fa;
  --sheet: #ffffff;
  --ink: #1f1a44;
  --ink-2: #2b2559;
  --muted: #5e5a7a;
  --line: #e3e1ee;
  --line-2: #cbc7dd;
  --magenta: #c8235f;
  --magenta-dk: #a51a4d;
  --magenta-tint: #fbe5ed;
  --saffron: #f2a900;
  --saffron-tint: #fff4d6;
  --green: #138a72;
  --btn: #c8235f;
  --btn-hover: #a51a4d;
  --on-accent: #ffffff;
  --code-bg: #ecebf4;
  --code-block: #15112f;
  --dev-bg: #1f1a44;
  --dev-ink: #e6e3f4;
  --shadow: 0 12px 32px rgba(31, 26, 68, 0.14);
  --paper-glass: rgba(246, 246, 250, 0.94);
  --ikat-saffron: #f2a900;
  --ikat-magenta: #c8235f;
  --ikat-ink: #1f1a44;
  --ikat-green: #138a72;
  --ikat-paper: #ffffff;
  --r-panel: 14px;
  --r-ctl: 10px;
  --wrap: 1180px;
  --gut: clamp(20px, 4vw, 40px);
  --font-d: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-b: "Onest", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #15122b;
  --sheet: #1e1a3a;
  --ink: #ecebf6;
  --ink-2: #d9d6ee;
  --muted: #a9a5c6;
  --line: #2f2a52;
  --line-2: #47416f;
  --magenta: #f0588e;
  --magenta-dk: #ff86ad;
  --magenta-tint: #3d1832;
  --saffron: #f5b731;
  --saffron-tint: #3a2c0f;
  --green: #34c3a0;
  --btn: #d6336c;
  --btn-hover: #b8285c;
  --code-bg: #2a2550;
  --code-block: #0b0919;
  --dev-bg: #100d24;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --paper-glass: rgba(21, 18, 43, 0.92);
  --ikat-saffron: #f5b731;
  --ikat-magenta: #e8467f;
  --ikat-ink: #8a80e6;
  --ikat-green: #2db894;
  --ikat-paper: #1e1a3a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #15122b;
    --sheet: #1e1a3a;
    --ink: #ecebf6;
    --ink-2: #d9d6ee;
    --muted: #a9a5c6;
    --line: #2f2a52;
    --line-2: #47416f;
    --magenta: #f0588e;
    --magenta-dk: #ff86ad;
    --magenta-tint: #3d1832;
    --saffron: #f5b731;
    --saffron-tint: #3a2c0f;
    --green: #34c3a0;
    --btn: #d6336c;
    --btn-hover: #b8285c;
    --code-bg: #2a2550;
    --code-block: #0b0919;
    --dev-bg: #100d24;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    --paper-glass: rgba(21, 18, 43, 0.92);
    --ikat-saffron: #f5b731;
    --ikat-magenta: #e8467f;
    --ikat-ink: #8a80e6;
    --ikat-green: #2db894;
    --ikat-paper: #1e1a3a;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-b);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-d);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.1rem, 1.3rem + 3.1vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem);
  line-height: 1.15;
}
h3 {
  font-size: 1.1rem;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--magenta-dk);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--magenta);
}
code,
pre {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
}
:not(pre) > code {
  background: var(--code-bg);
  border-radius: 5px;
  padding: 0.08em 0.35em;
}
small {
  font-size: 0.85em;
}

:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden,
.drop-input {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: var(--r-ctl);
}
.skip:focus {
  top: 12px;
  color: var(--paper);
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.92rem;
}
.measure {
  max-width: 60ch;
}

/* ───────── sarlavha va pastki qism ───────── */

.top {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font: 700 1.3rem/1 var(--font-d);
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.brand-dot {
  color: var(--magenta);
}
.top-right {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.2vw, 22px);
}
.nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  font-weight: 500;
  margin-right: clamp(0px, 1vw, 8px);
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--magenta);
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctl);
  background: var(--sheet);
  color: var(--ink);
  font: 600 0.9rem/1 var(--font-b);
  cursor: pointer;
}
.tool-btn:hover {
  border-color: var(--ink);
}
.tool-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  flex: none;
}
.theme-btn {
  padding: 0;
}
/* Kirish / Profil (Q15): kompyuterda belgi va yozuv, telefonda faqat belgi. */
.me-btn {
  text-decoration: none;
}
.me-btn:hover {
  color: var(--ink);
}
.me-btn[aria-current="page"] {
  border-color: var(--ink);
}
.theme-btn .i-moon {
  fill: currentColor;
  stroke: none;
}
.theme-btn .i-sun,
:root[data-theme="dark"] .theme-btn .i-moon {
  display: none;
}
:root[data-theme="dark"] .theme-btn .i-sun {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .i-moon {
    display: none;
  }
  :root:not([data-theme]) .theme-btn .i-sun {
    display: block;
  }
}

/* Ochiladigan menyular: til tanlash, yuklab olish */
.menu {
  position: relative;
}
.menu > summary {
  list-style: none;
  cursor: pointer;
}
.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  box-shadow: var(--shadow);
}
.menu-list a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.menu-list a:hover,
.menu-list a:focus-visible {
  background: var(--paper);
}
.menu-list a[aria-current] {
  font-weight: 650;
  box-shadow: inset 3px 0 0 var(--magenta);
}

.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.foot-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 44px var(--gut) 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: 28px 32px;
}
.foot-brand {
  font: 700 1.15rem/1.2 var(--font-d);
  color: var(--ink);
  letter-spacing: -0.03em;
}
.foot-about p {
  max-width: 30ch;
}
.foot-small {
  font-size: 0.88rem;
}
.foot-col h2 {
  font: 600 0.95rem/1.3 var(--font-b);
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 12px;
}
.foot-col ul,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot-col li {
  margin: 0 0 8px;
}
.foot a {
  color: var(--muted);
  text-decoration: none;
}
.foot a:hover {
  color: var(--magenta-dk);
  text-decoration: underline;
}
.foot-bar {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gut) 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  font-size: 0.88rem;
}
.foot-bar > * {
  margin: 0;
}
.foot-bar .foot-seller {
  order: 9;
  flex-basis: 100%;
  font-size: 0.8rem;
  color: var(--muted);
}
.foot-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  padding: 0;
}
.foot-langs a[aria-current] {
  color: var(--ink);
  font-weight: 600;
}
.sys {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sys[hidden] {
  display: none;
}
.sys-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}
.sys.warn .sys-dot {
  background: var(--saffron);
  box-shadow: none;
}
.sys.down .sys-dot {
  background: var(--magenta);
  box-shadow: none;
}

/* ───────── tugmalar ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font: 600 1rem/1.1 var(--font-b);
  padding: 0.8em 1.25em;
  border-radius: var(--r-ctl);
  border: 1px solid transparent;
  background: var(--btn);
  color: var(--on-accent);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  background: var(--btn-hover);
  color: var(--on-accent);
}
.btn-ghost {
  background: var(--sheet);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  background: var(--sheet);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-light {
  background: #fff;
  color: #1f1a44;
}
.btn-light:hover {
  background: #fff4d6;
  color: #1f1a44;
}
.btn-small {
  font-size: 0.92rem;
  padding: 0.6em 0.95em;
}
.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--magenta-dk);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

/* Lotin / yangi alifbo / Кирилл almashtirgich */
.script-pick {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctl);
  background: var(--sheet);
  min-width: 0;
}
.script-pick label {
  position: relative;
  padding: 0.42em 0.85em;
  border-radius: 7px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}
.script-pick input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.script-pick label:has(input:checked) {
  background: var(--ink);
  color: var(--paper);
}
.script-pick label:has(input:focus-visible) {
  outline: 3px solid var(--magenta);
  outline-offset: 1px;
}

/* Ovozdan matn ↔ matndan ovoz: ikkala sahifada birinchi ekranning tepasida, bir joyda (Q13). */
.mode-switch {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctl);
  background: var(--sheet);
  /* hero'ning katta oralig'i o'rniga — almashtirgich sarlavhaga yaqin tursin */
  margin-bottom: calc(14px - clamp(28px, 5vw, 64px));
}
.mode-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.55em 1.1em;
  border-radius: 7px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.mode-opt svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.mode-opt:hover {
  background: var(--paper);
}
.mode-opt[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}
.mode-opt:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 1px;
}

/* ───────── bosh sahifa: birinchi ekran ───────── */

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--gut) clamp(40px, 7vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.hero-text {
  padding-top: clamp(0px, 2vw, 24px);
  container-type: inline-size;
}
/* Sarlavha ustun eniga qarab: kirillcha "айлантиринг" lotinchadan ~27% enliroq, ustundan chiqmasin. */
.hero h1 {
  font-size: clamp(2rem, 12cqi, 3.5rem);
}
.lead {
  font-size: clamp(1.08rem, 1rem + 0.3vw, 1.22rem);
  line-height: 1.55;
  max-width: 34ch;
}
.facts {
  color: var(--muted);
  max-width: 36ch;
}

.tool {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.ikat {
  display: block;
  width: 100%;
}
.tool > .ikat {
  height: 136px;
  width: calc(100% - 40px);
  margin: 22px 20px 4px;
}

.drop {
  padding: 8px 20px 20px;
}
.drop-label {
  display: block;
  padding: 22px 22px 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-ctl);
  cursor: pointer;
  background: var(--paper);
}
.drop-label:hover {
  border-color: var(--line-2);
}
.drop.over .drop-label {
  border-color: var(--magenta);
  background: var(--magenta-tint);
}
.drop-input:focus-visible + .drop-label {
  outline: 3px solid var(--magenta);
  outline-offset: 2px;
}
.drop-title {
  display: block;
  font: 600 1.12rem/1.3 var(--font-d);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.drop-sub {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}
.drop-sub u {
  color: var(--magenta-dk);
  text-underline-offset: 0.18em;
}
.drop-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.drop.busy .drop-label,
.drop.busy .drop-actions {
  opacity: 0.55;
  pointer-events: none;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--magenta);
  flex: none;
}
.rec[aria-pressed="true"] {
  border-color: var(--magenta);
  color: var(--magenta-dk);
  font-variant-numeric: tabular-nums;
}
.rec[aria-pressed="true"] .rec-dot {
  animation: blink 1.2s steps(2, jump-none) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

.status {
  margin-top: 14px;
  min-height: 1.6em;
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.status.err {
  color: var(--magenta-dk);
  font-weight: 500;
}

.recent {
  margin-top: 36px;
  max-width: 40ch;
}
.recent-title {
  font: 600 0.95rem/1.3 var(--font-b);
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: 8px;
}
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.recent-list li {
  border-bottom: 1px solid var(--line);
}
.recent-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  color: var(--ink);
  text-decoration: none;
}
.recent-list a:hover .recent-name {
  color: var(--magenta-dk);
  text-decoration: underline;
}
.recent-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-when {
  color: var(--muted);
  font-size: 0.9rem;
  flex: none;
  font-variant-numeric: tabular-nums;
}

/* ───────── bo'limlar ───────── */

.band {
  padding: clamp(52px, 8vw, 100px) 0;
}
.band-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
}
.band-in.two {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.band-in.narrow > * {
  max-width: 760px;
}
.band + .band {
  border-top: 1px solid var(--line);
}
.band-sheet {
  background: var(--sheet);
}
.band-dev {
  background: var(--dev-bg);
  color: var(--dev-ink);
  border-top: 0 !important;
}
.band-dev h2 {
  color: #fff;
}
.band-dev + .band {
  border-top: 0;
}

.uses {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}
.uses > div {
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}
.uses dt {
  font-weight: 650;
  margin-bottom: 4px;
}
.uses dd {
  margin: 0;
  color: var(--muted);
}

.plain {
  margin: 0;
  padding-left: 1.1em;
}
.plain li {
  margin-bottom: 0.6em;
}
.plain li::marker {
  color: var(--magenta);
}

/* Natija namunasi va natija sahifasidagi matn — bir xil ko'rinish */
.sheet {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 6px 14px 14px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.seg {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 10px 12px 10px 10px;
  border-radius: var(--r-ctl);
  line-height: 1.7;
}
.seg.cur {
  background: var(--sheet);
  box-shadow: inset 3px 0 0 var(--magenta);
}
.sheet .seg.cur {
  background: var(--sheet);
}
.ts {
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  padding-top: 0.22em;
  line-height: 1.5;
}
mark.w,
.w.on {
  background: var(--magenta-tint);
  color: var(--ink);
  border-radius: 4px;
  box-shadow: 0 2px 0 var(--magenta);
}

/* Narxlar jadvali */
.prices {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0 18px;
  font-variant-numeric: tabular-nums;
}
.prices th,
.prices td {
  text-align: left;
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.prices thead th {
  font: 500 0.88rem/1.2 var(--font-b);
  color: var(--muted);
  padding-top: 0;
  padding-bottom: 12px;
  border-bottom-color: var(--line-2);
}
.prices tbody th {
  font: 600 1.05rem/1.25 var(--font-d);
  letter-spacing: -0.02em;
}
.prices tbody th small {
  display: block;
  font: 400 0.85rem/1.35 var(--font-b);
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 4px;
}
.prices tbody td:nth-of-type(1) {
  font: 600 1.05rem/1.2 var(--font-d);
  letter-spacing: -0.02em;
}
.prices td:last-child {
  text-align: right;
}
.prices tr.best th {
  box-shadow: inset 4px 0 0 var(--saffron);
}
.prices tr.best {
  background: var(--saffron-tint);
}
.prices.compact {
  margin: 12px 0 8px;
}
.prices.compact th,
.prices.compact td {
  padding: 12px 10px;
}
.prices.compact tbody th {
  font: 500 1rem/1.35 var(--font-b);
  letter-spacing: 0;
}
.prices.compact tbody td:nth-of-type(1) {
  font: 400 1rem/1.35 var(--font-b);
  letter-spacing: 0;
  text-align: left;
}

/* Kod */
.code {
  margin: 0;
  padding: 20px 22px;
  border-radius: var(--r-panel);
  background: var(--code-block);
  color: #e9e6f8;
  overflow-x: auto;
  line-height: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.band-dev .btn-light:focus-visible,
.band-dev a:focus-visible {
  outline-color: var(--saffron);
}

/* Savol-javob */
#savollar details {
  border-bottom: 1px solid var(--line);
}
#savollar details:first-of-type {
  border-top: 1px solid var(--line);
}
#savollar summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  position: relative;
}
summary::-webkit-details-marker {
  display: none;
}
#savollar summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat;
}
#savollar details[open] summary::after {
  background: linear-gradient(var(--magenta), var(--magenta)) center / 12px 2px no-repeat;
}
#savollar details > p {
  margin: -4px 0 20px;
  color: var(--muted);
  max-width: 62ch;
}

/* ───────── natija sahifasi ───────── */

.res {
  max-width: calc(920px + 2 * var(--gut));
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) var(--gut) clamp(48px, 8vw, 96px);
}
.res-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
  margin-bottom: 18px;
}
.res-title {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.res-head .muted {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.res-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.res-tools[hidden],
.player[hidden],
.transcript[hidden],
.res-foot[hidden],
.wait[hidden],
.recent[hidden] {
  display: none;
}

.dl > summary {
  padding: 0.6em 0.95em;
  font-weight: 600;
}
.dl-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 310px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 6px;
  box-shadow: var(--shadow);
}
.dl-menu a {
  white-space: nowrap;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
}
.dl-menu a:hover,
.dl-menu a:focus-visible {
  background: var(--paper);
}
.dl-menu .ext {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.player {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin: 0 -16px 18px;
  background: var(--paper-glass);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--btn);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.play:hover {
  background: var(--btn-hover);
}
.play svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.play .i-pause,
.play.on .i-play {
  display: none;
}
.play.on .i-pause {
  display: block;
}
.track {
  min-width: 0;
}
.ikat-small {
  height: 60px;
  cursor: pointer;
  touch-action: none;
}
.times {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.speed {
  min-width: 64px;
  padding: 0.5em 0.7em;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line-2);
  background: var(--sheet);
  color: var(--ink);
  font: 600 0.92rem/1 var(--font-b);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.speed:hover {
  border-color: var(--ink);
}

.wait {
  padding: clamp(24px, 6vw, 56px) 0;
}
.ikat-wait {
  height: 104px;
}
.wait-text {
  margin: 18px 0 0;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.wait.failed .wait-text {
  color: var(--magenta-dk);
  font-weight: 500;
}
.wait .btn {
  margin-top: 16px;
}

.transcript {
  font-size: 1.08rem;
  margin: 0 -12px 0 -10px;
}
.transcript .ts {
  background: none;
  border: 0;
  font-family: var(--font-b);
  text-align: left;
  cursor: pointer;
  padding: 0.22em 0 0;
  align-self: start;
}
.transcript .ts:hover {
  color: var(--magenta-dk);
  text-decoration: underline;
}
.has-audio .w {
  cursor: pointer;
  border-radius: 4px;
}
.has-audio .w:hover {
  background: var(--line);
}
.has-audio .w.on:hover {
  background: var(--magenta-tint);
}
.transcript .empty {
  color: var(--muted);
  padding: 24px 10px;
}
.res-foot {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.res-foot .linkish {
  margin-left: 0.4em;
}

/* ───────── matnli sahifalar: biz haqimizda, maxfiylik, shartlar ───────── */

.prose h1 {
  margin-bottom: 0.4em;
}
.prose h2 {
  margin-top: 1.7em;
  font-size: 1.25rem;
}
.prose ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}
.prose li {
  margin-bottom: 0.45em;
}
.prose li::marker {
  color: var(--magenta);
}
.prose .plain-list {
  padding: 0;
}

/* ───────── API hujjatlari ───────── */

.docs h1 {
  margin-bottom: 0.3em;
}
.docs h2 {
  margin-top: 1.9em;
  font-size: 1.35rem;
}
.docs .code {
  margin: 0 0 1.1em;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 24px 0 8px;
}
.fields {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
}
.fields th,
.fields td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}
.fields th {
  width: 30%;
  font-weight: 500;
}

/* ───────── kichik ekranlar ───────── */

.on-touch {
  display: none;
}
@media (hover: none) and (pointer: coarse) {
  .on-desk {
    display: none;
  }
  .on-touch {
    display: inline;
  }
}

/* ───────── taqqoslash sahifasi ───────── */

.price-cmp {
  margin: 0 0 6px;
  font-weight: 500;
}
.table-scroll {
  overflow-x: auto;
  /* ichidagi .visually-hidden (absolute) qutidan chiqib, telefonda sahifani kengaytirmasin */
  position: relative;
}
.cmp-sum {
  list-style: none;
  margin: 28px 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 760px;
}
.cmp-sum li {
  padding: 14px 18px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-left: 4px solid var(--magenta);
  border-radius: 4px var(--r-ctl) var(--r-ctl) 4px;
  font-size: 1.05rem;
}
.cmp-sum a {
  font-weight: 600;
}
.cmp-packs {
  min-width: 720px;
}
.cmp-packs.prices.compact tbody td {
  font: 600 1rem/1.25 var(--font-d);
  letter-spacing: -0.02em;
  vertical-align: top;
}
.cmp-packs td small {
  display: block;
  font: 400 0.82rem/1.35 var(--font-b);
  letter-spacing: 0;
  color: var(--muted);
  margin-top: 3px;
}
.cmp-packs.prices td:last-child {
  text-align: left;
}
.cmp-packs tr.ours th,
.cmp-packs tr.ours td {
  background: var(--magenta-tint);
}
.cmp-packs tr.ours th {
  color: var(--magenta-dk);
}
.cmp-packs.prices.compact tbody td.win {
  color: var(--green);
}
.cmp-packs.prices.compact tbody td.pk-na {
  font: 400 0.92rem/1.35 var(--font-b);
  color: var(--muted);
}
.rank-q {
  margin-bottom: 12px;
}
.prices .price-group th {
  font: 600 0.88rem/1.2 var(--font-b);
  letter-spacing: 0;
  color: var(--muted);
  padding-top: 26px;
  padding-bottom: 10px;
  border-bottom-color: var(--line-2);
}

/* Narx reytingi: chiziq uzunligi — narx; bizniki magenta */
.rank {
  list-style: none;
  margin: 22px 0 34px;
  padding: 0;
  max-width: 980px;
}
.rank-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) minmax(150px, 210px);
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.rank-name {
  font: 600 1rem/1.25 var(--font-b);
}
.rank-bar {
  width: 100%;
  height: 12px;
  display: block;
}
.rank-bar rect {
  fill: var(--line-2);
}
.rank-row.ours .rank-bar rect {
  fill: var(--magenta);
}
.rank-row.ours .rank-name,
.rank-row.ours .rank-price {
  color: var(--magenta-dk);
}
.rank-price {
  font: 600 1.02rem/1.25 var(--font-d);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rank-price small {
  display: block;
  font: 400 0.85rem/1.35 var(--font-b);
  letter-spacing: 0;
  color: var(--muted);
}
.rank-orig {
  font: 400 0.85rem/1 var(--font-b);
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 6px;
}
.rank-h {
  margin-top: 8px;
}
.subs {
  list-style: none;
  margin: 14px 0 28px;
  padding: 0;
  max-width: 980px;
}
.subs li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.sub-v {
  text-align: right;
  font-weight: 600;
}
.sub-v.sub-na {
  font-weight: 400;
  color: var(--muted);
}
.sub-v small {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}
.cmp-feats {
  min-width: 640px;
}
.cmp-feats.prices.compact tbody td {
  text-align: center;
  vertical-align: middle;
}
.cmp-feats thead th:not(:first-child) {
  text-align: center;
}
.cmp-feats tr.ours th,
.cmp-feats tr.ours td {
  background: var(--magenta-tint);
}
.cmp-feats tr.ours th {
  color: var(--magenta-dk);
}
.f-ic {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.f-no,
.f-unk {
  color: var(--muted);
}
.cmp-src {
  margin-top: 14px;
}
.cmp-src summary {
  cursor: pointer;
  font-weight: 600;
}
.cmp-others {
  margin: 28px 0 0;
  padding: 14px 18px;
  border-left: 4px solid var(--saffron);
  background: var(--saffron-tint);
  border-radius: 4px var(--r-ctl) var(--r-ctl) 4px;
  max-width: 760px;
}

/* 100 so'z: kulrang — to'g'ri, magenta — xato */
.wfigs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 48px);
  margin: 32px 0 40px;
}
.wfig {
  margin: 0;
  padding: 22px 24px 26px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.wfig figcaption {
  margin-bottom: 18px;
  color: var(--muted);
}
.wfig-name {
  display: block;
  font: 600 1.35rem/1.2 var(--font-d);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 4px;
}
.wgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em 0.42em;
  font-size: 14px;
}
.wgrid i {
  display: block;
  height: 0.62em;
  border-radius: 3px;
  background: var(--line-2);
}
.wgrid .w1 { width: 1.5em; }
.wgrid .w2 { width: 2.3em; }
.wgrid .w3 { width: 3.1em; }
.wgrid .w4 { width: 4em; }
.wgrid .w5 { width: 5.1em; }
.wgrid i.x {
  background: var(--magenta);
}
.wgrid i.half {
  background: linear-gradient(90deg, var(--magenta) 50%, var(--line-2) 50%);
}
.cmp-detail {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
.cmp-voices {
  margin-top: 0;
  min-width: 420px;
}
.cmp-voices caption {
  text-align: left;
  font: 600 1.1rem/1.3 var(--font-d);
  letter-spacing: -0.02em;
  padding-bottom: 10px;
}
.cmp-voices td {
  font-variant-numeric: tabular-nums;
}
.cmp-voices tbody th {
  white-space: nowrap; /* «1-ovoz» telefonda ikkiga bo'linmasin */
}
.cmp-voices.prices td:last-child {
  text-align: left;
}
.cmp-voices td.win {
  color: var(--green);
  font-weight: 700;
}
.cmp-voices td.na {
  color: var(--muted);
}
/* Qisman o'lchanganlar: reytingdan tashqarida, faqat o'sha ovozlarda Avoz bilan */
.cmp-partial {
  margin: 28px 0 0;
  max-width: 760px;
}
.cmp-partial h3 {
  font: 600 1.05rem/1.3 var(--font-d);
  margin: 0 0 8px;
}
.cmp-partial li + li {
  margin-top: 6px;
}
.cmp-partial p {
  margin: 10px 0 0;
}
.cmp-voices tfoot th,
.cmp-voices tfoot td {
  border-bottom: 0;
  border-top: 2px solid var(--line-2);
  font-weight: 700;
}
.cmp-method ul {
  font-size: 0.95rem;
}
.cmp-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  margin: 24px 0 20px;
}
.cmp-diff h3 {
  margin-bottom: 0.8em;
}

@media (max-width: 900px) {
  .hero,
  .band-in.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .lead,
  .facts {
    max-width: 52ch;
  }
  .foot-in {
    grid-template-columns: 1fr 1fr;
  }
  .foot-about {
    grid-column: 1 / -1;
  }
  .cmp-detail,
  .cmp-diff {
    grid-template-columns: minmax(0, 1fr);
  }
  .nav-more {
    display: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }
  /* Telefonda yuklash joyi birinchi ekranda ko'rinsin: sarlavha va kirish, keyin asbob, keyin qolgani. */
  .hero {
    padding-top: 12px;
    gap: 20px;
  }
  .hero-text {
    display: contents;
  }
  .hero h1 {
    order: 1;
    margin-bottom: 0;
    font-size: clamp(1.75rem, 10.6vw, 2.6rem);
  }
  .lead {
    order: 2;
    margin: 0;
  }
  .tool {
    order: 3;
  }
  .facts {
    order: 4;
    margin: 0;
  }
  .recent {
    order: 5;
    margin-top: 0;
  }
  .top {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .nav {
    font-size: 0.95rem;
  }
  .nav a {
    white-space: nowrap;
  }
  .nav-faq {
    display: none;
  }
  /* Almashtirgich telefonda butun en bo'ylab, sarlavhadan oldin: ikkala xizmat birinchi ekranda ko'rinadi. */
  .mode-switch {
    order: 0;
    display: flex;
    justify-self: stretch;
    margin-bottom: -4px;
  }
  .mode-opt {
    flex: 1 1 0;
    padding: 0.6em 0.5em;
    font-size: 0.95rem;
  }
  /* Taqqoslash: 100 so'z rasmlari yonma-yon qolsin — farq bir qarashda ko'rinadi. */
  .wfigs {
    gap: 12px;
  }
  .wfig {
    padding: 14px 12px 16px;
  }
  .wfig figcaption {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }
  .wfig-name {
    font-size: 1.05rem;
  }
  .wgrid {
    font-size: 7.5px;
  }
  .rank-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name price" "bar bar";
    gap: 6px 12px;
  }
  .rank-name {
    grid-area: name;
  }
  .rank-price {
    grid-area: price;
    text-align: right;
  }
  .rank-bar {
    grid-area: bar;
    height: 8px;
  }
  .cmp-voices {
    min-width: 0;
  }
  .cmp-voices th,
  .cmp-voices td {
    padding: 10px 6px;
    font-size: 0.92rem;
  }
  /* Uch yozuv tugmasi teng ustunlarda: uzun nom ("Новая латиница") ikki qatorga chiroyli bo'linadi. */
  .script-pick {
    display: flex;
    width: 100%;
  }
  .script-pick label {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
    padding: 0.5em 0.5em;
  }
  .tool-btn {
    height: 36px;
    min-width: 36px;
    padding: 0 8px;
  }
  .me-btn span {
    display: none;
  }
  .foot-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .tool > .ikat {
    height: 84px;
    width: calc(100% - 28px);
    margin: 14px 14px 2px;
  }
  .drop {
    padding: 6px 14px 16px;
  }
  .drop-label {
    padding: 18px 16px;
  }
  .uses {
    grid-template-columns: 1fr;
  }
  /* Bosh sahifa: «1 soati» ustuni yashirinadi; taqqoslash jadvallari yonga suriladi. */
  .prices:not(.cmp-packs, .cmp-feats) th:nth-child(3),
  .prices:not(.cmp-packs, .cmp-feats) td:nth-child(3) {
    display: none;
  }
  /* imkoniyatlar: yonga suriladi, xizmat nomi chapda qotib turadi */
  .cmp-feats {
    min-width: 600px;
  }
  .cmp-feats.prices th,
  .cmp-feats.prices td {
    padding: 11px 6px;
  }
  .cmp-feats thead th {
    font-size: 0.78rem;
  }
  .cmp-packs {
    min-width: 600px;
  }
  .cmp-packs.prices th,
  .cmp-packs.prices td {
    padding: 11px 8px;
  }
  .cmp-packs tbody th,
  .cmp-packs thead th:first-child,
  .cmp-feats tbody th,
  .cmp-feats thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--paper);
    max-width: 118px;
    font-size: 0.92rem;
  }
  .cmp-packs tr.ours th,
  .cmp-feats tr.ours th {
    background: linear-gradient(var(--magenta-tint), var(--magenta-tint)) var(--paper);
  }
  .band-sheet .cmp-packs tbody th,
  .band-sheet .cmp-packs thead th:first-child,
  .band-sheet .cmp-feats tbody th,
  .band-sheet .cmp-feats thead th:first-child {
    background: var(--sheet);
  }
  /* Narx jadvali 375 px da sig'sin: ruscha «Попробовать» tugmasi bitta so'z, bo'linmaydi (2026-12-04). */
  .prices th,
  .prices td {
    padding: 14px 6px;
  }
  .prices tbody th {
    font-size: 0.98rem;
  }
  .prices td .btn-small {
    font-size: 0.86rem;
    padding-inline: 0.7em;
  }
  /* API jadvalidagi uzun nom (`timestamp_granularities[]`) telefonda sahifani kengaytirmasin. */
  .fields code {
    overflow-wrap: anywhere;
  }
  .seg {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 10px;
  }
  .player {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    padding: 10px 14px;
    margin: 0 -14px 14px;
  }
  .play {
    width: 46px;
    height: 46px;
  }
  .speed {
    display: none;
  }
  .res-tools {
    width: 100%;
  }
  .dl-menu {
    left: auto;
    right: 0;
    min-width: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
