/* Shaxmatnoma sayt qobig'i: mobile-first, tashqi shrift yo'q (CSP). */
:root {
  --bg: #fff;
  --soft: #f6f6f8;
  --line: #e6e6ea;
  --ink: #0c0c0c;
  --muted: #5e5e68;
  --pink: #ff2e88;
  --pink-d: #d5116a;
  --pink-bg: #fff0f6;
  --ok: #12805c;
  --ok-bg: #e8f6f0;
  --warn: #b4232c;
  --warn-bg: #fdecee;
  --r: 12px;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    500 16px / 1.55 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
  width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 20px;
  line-height: 1.25;
}
img {
  display: block;
  max-width: 100%;
}
[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: [hidden] har doim yashirinsin */
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 50;
}
.skip:focus {
  left: 8px;
  top: 8px;
}
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
.narrow {
  max-width: 640px;
}

/* tugmalar */
.btn {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  border: 1.5px solid var(--pink);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  min-height: 44px;
}
.btn:hover {
  background: var(--pink-d);
  border-color: var(--pink-d);
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover {
  background: var(--ink);
  color: #fff;
}
.btn.sm {
  padding: 6px 12px;
  font-size: 14px;
  min-height: 36px;
}
.btn.big {
  padding: 14px 22px;
  font-size: 17px;
  border-radius: 12px;
}
.btn.tg {
  background: #229ed9;
  border-color: #229ed9;
}
.btn.tg:hover {
  background: #1b86b8;
  border-color: #1b86b8;
}

/* sarlavha */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo {
  color: var(--pink);
  font-size: 24px;
  line-height: 1;
}
.top nav {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.top nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
}
.top nav a:hover {
  color: var(--ink);
}
.top nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--pink);
}
.auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.navlink {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.dot.ok {
  background: var(--ok);
}

/* katalog */
.intro {
  padding: 28px 0 12px;
}
.sub {
  margin-top: 10px;
  color: var(--muted);
  max-width: 620px;
}
#sub {
  margin-top: 14px;
}
.status {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--soft);
  font-size: 14px;
  font-weight: 600;
}
.status.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.status.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.topics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.chip-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  min-height: 36px;
}
.chip-btn[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.note {
  color: var(--muted);
  padding: 12px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin: 12px 0 28px;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}
.card:hover {
  box-shadow: 0 10px 30px rgba(12, 12, 12, 0.12);
  transform: translateY(-2px);
}
.cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--soft);
}
.cover.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pink-bg), #ffd3e6);
  color: var(--pink);
  font-size: 64px;
  font-weight: 800;
}
.card-b {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card h3 {
  font-size: 17px;
  line-height: 1.25;
}
.desc {
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: auto;
}
.tag {
  align-self: flex-start;
  background: var(--pink-bg);
  color: var(--pink-d);
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 8px;
}
.partner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--soft);
  padding: 18px;
  margin: 8px 0 36px;
}
.partner h2 {
  margin: 6px 0 4px;
}
.partner p {
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
}

/* panel / forma */
.narrow h1 {
  padding: 28px 0 14px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin: 14px 0 28px;
  background: #fff;
}
.status-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  background: var(--soft);
}
.status-card.ok {
  background: var(--ok-bg);
  border-color: #bfe6d6;
}
.status-card.warn {
  background: var(--warn-bg);
  border-color: #f3c6cb;
}
.status-card .who {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}
.status-card .big {
  font-size: 18px;
  font-weight: 700;
  margin-top: 8px;
}
.lead {
  font-weight: 700;
  margin-bottom: 12px;
}
.lead2 {
  font-weight: 700;
  margin: 18px 0 8px;
}
.hint {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}
.hint.dev {
  margin-top: 0;
}
.login-opt + .login-opt {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.login-opt:empty {
  display: none;
}
.contact-list {
  margin: 8px 0;
  padding-left: 20px;
}
.idline {
  margin-top: 6px;
}
.codeform,
.devform {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
input[type="text"] {
  flex: 1 1 180px;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 16px;
  font-family: inherit;
  min-height: 44px;
}
input[type="text"]:focus-visible {
  border-color: var(--pink);
}
.code-input {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.check {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.msg {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
  min-height: 1.4em;
}
.msg.error {
  color: var(--warn);
}
.msg.ok {
  color: var(--ok);
}
.msg.info {
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 48px 16px;
}
.empty p + p {
  margin-top: 14px;
}
.noscript {
  padding: 16px;
  text-align: center;
}

/* o'quvchi */
.reader-page {
  height: 100dvh;
}
.reader {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.rbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.rbar h1 {
  font-size: 16px;
  letter-spacing: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.back {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}
.tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.lang-sel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  min-height: 36px;
}
.badge {
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  padding: 4px 10px;
  background: var(--soft);
}
.badge.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: var(--pink-bg);
  border-bottom: 1px solid #ffc6de;
  font-weight: 600;
  font-size: 14px;
}
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
}
.stage iframe {
  flex: 1;
  width: 100%;
  border: 0;
  min-height: 480px;
  background: #fff;
}
.reader-page .reader {
  flex: 1;
}

/* modal */
.modal {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.modal::backdrop {
  background: rgba(12, 12, 12, 0.55);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
}
.modal-body {
  padding: 16px 18px 20px;
}
.x {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}
.x:hover {
  background: var(--soft);
}

.foot {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 720px) {
  .top-in {
    padding: 10px 20px;
  }
  .top nav a {
    font-size: 15px;
    padding: 8px 13px;
  }
  .wrap {
    padding: 0 20px;
  }
  .panel {
    padding: 24px;
  }
  .rbar {
    padding: 8px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    /* biome-ignore lint/complexity/noImportantStyles: reduced-motion */
    transition: none !important;
  }
}

/* F5: qurilmalar, qadamlar, passkey kartasi, almashtirilgan overlay */
.msg.warn {
  color: var(--warn);
}
.login-step:empty {
  display: none;
}
.login-step {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  margin: 12px 0;
  background: var(--soft);
}
.dev-list {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.dev-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  background: #fff;
}
.dev-row.current {
  border-color: var(--ok);
}
.dev-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
}
.dev-main .hint {
  flex-basis: 100%;
  margin: 0;
}
.dev-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.btn.danger {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
}
.pk-card {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-width: 420px;
  margin-inline: auto;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 6px 24px rgb(0 0 0 / 18%);
  padding: 12px 14px;
}
.pk-card .hint {
  margin: 4px 0 8px;
}
.pk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fake-tg {
  border: 1px dashed var(--pink);
  border-radius: var(--r);
  padding: 8px 12px;
  margin-top: 12px;
  background: var(--pink-bg);
}
.fake-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.fake-id {
  width: 8em;
  padding: 4px 8px;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(12 12 12 / 72%);
}
.overlay-card {
  width: min(480px, 100%);
  max-height: 100%;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 18px 18px 14px;
}
.overlay-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
