:root {
  --navy: #0f2a5c; --navy-2: #0b1f45; --ink: #14233f; --muted: #5b6b86;
  --blue: #1d7bff; --blue-d: #1560d6; --purple: #8a3ffc; --purple-d: #6f27d8; --green: #14b88a; --orange: #ffa11a;
  --radius: 28px; --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #f4f8ff; line-height: 1.5; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ----- navigatsiya ----- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(15, 42, 92, .96); backdrop-filter: blur(8px); color: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .2); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.45rem; text-decoration: none; color: #fff; white-space: nowrap; }
.logo svg { width: 44px; height: 44px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; margin-left: 24px; }
.nav a.link { text-decoration: none; padding: 24px 14px 20px; font-weight: 700; font-size: .98rem; border-bottom: 3px solid transparent; opacity: .92; }
.nav a.link:hover { opacity: 1; border-color: rgba(255, 255, 255, .45); }
.nav a.link.on { border-color: var(--blue); opacity: 1; }
.nav .grow { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 10px 22px; border-radius: 999px; font-weight: 800; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, filter .15s; color: #fff; font-size: 1rem; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn-ghost { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .06); }
.btn-blue { background: linear-gradient(#2b8bff, #1560d6); box-shadow: 0 6px 16px rgba(29, 123, 255, .4); }
.btn-purple { background: linear-gradient(#9d52ff, #6f27d8); box-shadow: 0 6px 18px rgba(138, 63, 252, .5); }
.btn-lg { min-height: 54px; padding: 12px 30px; font-size: 1.1rem; }
.menu-btn { display: none; margin-left: auto; background: none; border: 2px solid rgba(255, 255, 255, .4); color: #fff; border-radius: 12px; width: 46px; height: 42px; font-size: 1.4rem; cursor: pointer; }

/* ----- bosh qism ----- */
.hero { position: relative; color: #fff; padding: 44px 0 110px; overflow: hidden; background: #4aa8f0; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero h1 { text-align: center; font-size: clamp(1.9rem, 4.6vw, 3.3rem); font-weight: 900; text-shadow: 0 3px 14px rgba(8, 40, 90, .55); margin-bottom: .3em; }
.hero .sub { text-align: center; font-size: clamp(1rem, 2vw, 1.25rem); text-shadow: 0 2px 8px rgba(8, 40, 90, .6); margin: 0 auto 34px; max-width: 760px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.card { position: relative; min-height: 580px; border-radius: var(--radius); overflow: hidden; color: #fff; border: 3px solid rgba(255, 255, 255, .45); box-shadow: 0 18px 44px rgba(10, 30, 80, .4); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; display: flex; flex-direction: column; justify-content: flex-end; }
.card:hover, .card:focus-within { transform: translateY(-10px); box-shadow: 0 28px 60px rgba(10, 30, 80, .5); }
.card .art { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .6s ease; }
.card:hover .art { transform: scale(1.04); }
.card-body { position: relative; padding: 70px 30px 30px; background: linear-gradient(180deg, transparent 0, rgba(12, 14, 56, .88) 42%); display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; }
.card-kb .card-body { background: linear-gradient(180deg, transparent 0, rgba(28, 12, 80, .92) 42%); }
.card-hm .card-body { background: linear-gradient(180deg, transparent 0, rgba(8, 36, 100, .92) 42%); }
.badge { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(0, 0, 0, .3); }
.badge svg { width: 38px; height: 38px; }
.badge-kb { background: linear-gradient(#b266ff, #7a2fe0); } .badge-hm { background: linear-gradient(#2bb5ff, #1673f0); }
.card h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 900; margin: 0 0 4px; }
.card p { margin: 0; opacity: .94; font-size: 1.02rem; }
.card .btn { margin-top: 16px; grid-column: 2; justify-self: start; }
.card .btn::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* butun karta bosiladi */
.card .btn svg { width: 18px; height: 18px; }

/* ----- bo'limlar ----- */
.feat { margin-top: -62px; position: relative; z-index: 2; }
.feat-box { background: #fff; border-radius: 28px; box-shadow: 0 14px 40px rgba(15, 42, 92, .14); padding: 26px 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.feat-item { display: flex; gap: 16px; align-items: flex-start; }
.ico { flex: none; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; color: #fff; }
.feat-item h3 { font-size: 1.05rem; margin: 2px 0 4px; } .feat-item p { margin: 0; font-size: .9rem; color: var(--muted); }
section.block { padding: 64px 0 8px; }
.block h2.title { text-align: center; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; }
.block .lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 34px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; counter-reset: s; }
.step { background: #fff; border-radius: 22px; padding: 26px 22px; box-shadow: 0 8px 24px rgba(15, 42, 92, .09); position: relative; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(#2b8bff, #1560d6); color: #fff; font-weight: 900; font-size: 1.2rem; margin-bottom: 12px; }
.step h3 { font-size: 1.1rem; } .step p { margin: 0; color: var(--muted); font-size: .95rem; }
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: 18px; padding: 16px 20px; box-shadow: 0 6px 18px rgba(15, 42, 92, .08); }
.faq summary { cursor: pointer; font-weight: 800; } .faq p { margin: 10px 0 0; color: var(--muted); }
.help-contact { text-align: center; margin-top: 18px; color: var(--muted); }

/* ----- login / register ----- */
.auth { padding: 56px 0 80px; }
.auth h1 { text-align: center; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; }
.auth .lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; max-width: 980px; margin: 0 auto; }
.tile { background: #fff; border-radius: 24px; padding: 26px; box-shadow: 0 10px 30px rgba(15, 42, 92, .1); display: flex; flex-direction: column; gap: 10px; }
.tile h2 { font-size: 1.4rem; margin: 0; } .tile p { margin: 0; color: var(--muted); }
.tile .actions { display: grid; gap: 10px; margin-top: 8px; }
.note { max-width: 760px; margin: 26px auto 0; background: #fff8e1; border: 1px solid #f3dc92; border-radius: 16px; padding: 14px 18px; font-size: .94rem; }

/* ----- footer ----- */
.foot { background: var(--navy-2); color: #dbe5ff; padding: 36px 0 26px; margin-top: 70px; }
.foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; align-items: start; }
.foot .logo svg { width: 40px; height: 40px; } .foot p { margin: 10px 0 0; opacity: .85; font-size: .95rem; }
.foot h3 { font-size: 1rem; color: #fff; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .foot a { text-decoration: none; opacity: .9; } .foot a:hover { opacity: 1; text-decoration: underline; }
.copy { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 16px; font-size: .88rem; opacity: .75; }

/* ----- mobil ----- */
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--navy); margin: 0; padding: 8px 20px 20px; display: none; gap: 2px; box-shadow: 0 14px 24px rgba(0, 0, 0, .3); }
  .nav.open { display: flex; }
  .nav a.link { padding: 14px 8px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .nav .grow { display: none; }
  .nav .btn { margin-top: 10px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 520px; }
  .foot .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero { padding-top: 30px; }
  .card-body { grid-template-columns: 1fr; padding: 80px 20px 24px; }
  .card .btn { grid-column: 1; width: 100%; }
  .badge { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }


/* Shashka va Bilimdon kartalari (4 o'yinli 2x2 setka) */
.btn-teal { background: linear-gradient(#19c9a3, #0a8f75); box-shadow: 0 6px 18px rgba(13, 160, 130, .45); }
.btn-indigo { background: linear-gradient(#8274ee, #5446cf); box-shadow: 0 6px 18px rgba(84, 70, 207, .45); }
.card-sc .card-body { background: linear-gradient(180deg, transparent 0, rgba(4, 46, 40, .93) 42%); }
.card-bd .card-body { background: linear-gradient(180deg, transparent 0, rgba(23, 37, 84, .94) 42%); }
.badge-sc { background: linear-gradient(#2fd3b2, #0b8f78); }
.badge-bd { background: linear-gradient(#8274ee, #5446cf); }
.card-iq .card-body { background: linear-gradient(180deg, transparent 0, rgba(46, 16, 84, .94) 42%); }
.badge-iq { background: linear-gradient(#fbbf24, #d97706); }
.card-doska .card-body { background: linear-gradient(180deg, transparent 0, rgba(8, 23, 48, .94) 42%); }
.badge-doska { background: linear-gradient(#38bdf8, #0284c7); }
.tiles { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .tiles { grid-template-columns: 1fr; } }

/* Umumiy ro'yxatdan o'tish / kirish formasi */
.auth-card{max-width:560px;margin:24px auto 36px;padding:28px;background:#fff;border:1px solid #dbe6f5;border-radius:20px;box-shadow:0 14px 40px rgba(20,35,63,.12);color:#14233f}
.auth-card form{display:grid;gap:16px}
.auth-card label{display:grid;gap:6px;font-weight:600;font-size:15px}
.auth-card input{font:inherit;padding:13px 14px;border:1.5px solid #cdd9ee;border-radius:12px;background:#fff;color:#14233f;min-height:48px;width:100%;box-sizing:border-box}
.auth-card input:focus{outline:none;border-color:#6c5ce7;box-shadow:0 0 0 4px rgba(108,92,231,.18)}
.auth-card label.invalid input{border-color:#e5484d}
.auth-card .pw{position:relative;display:block}.auth-card .pw input{padding-right:84px}
.pw-toggle{position:absolute;right:6px;top:6px;bottom:6px;padding:0 12px;border:0;border-radius:9px;background:#eef2fb;color:#14233f;font-weight:700;cursor:pointer}
.auth-card .hint,.auth-card .fe{font-weight:400;font-size:13px;color:#5b6b86}.auth-card .fe{color:#c4282d}
.form-error{margin:0;padding:12px 14px;border-radius:12px;background:#ffe9ea;color:#a3191f;font-weight:600}
.err-apps{margin:0;padding:10px 14px 10px 30px;border-radius:12px;background:#fff6e0;color:#7a5200;font-size:14px}
.auth-card .alt{margin:18px 0 0;text-align:center;color:#5b6b86}.auth-card .alt a{color:#5446cf;font-weight:700}
.auth-card form .btn{justify-content:center;width:100%}
.app-list{list-style:none;margin:14px 0 22px;padding:0;display:grid;gap:10px}
.app-list li{display:grid;grid-template-columns:1fr auto auto;gap:4px 12px;align-items:center;padding:12px 14px;border-radius:12px;background:#f3f7ff;border:1px solid #dbe6f5}
.app-list li small{grid-column:1/-1;color:#7a5200;font-size:13px}
.app-list .chip{padding:3px 10px;border-radius:999px;font-size:13px;font-weight:700;background:#dcf6ec;color:#0a7556}
.app-list .app-warn .chip{background:#fff3cc;color:#8a5a00}.app-list .app-bad .chip{background:#ffe9ea;color:#a3191f}
.app-list .open{font-weight:700;color:#5446cf}
.auth .sub{text-align:center;margin:30px 0 10px;font-size:20px}
.who{font-weight:700;color:#14233f;padding:8px 12px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:520px){.auth-card{padding:20px;margin-inline:0}}

#nav a,#nav .btn,#nav .who{white-space:nowrap}
@media(max-width:1180px) and (min-width:861px){#nav{gap:4px}#nav .btn{padding-inline:14px}}
/* menyu 1120px gaça yig'iladi (nowrap bilan sig'maydi) */
@media (max-width: 1120px) and (min-width: 961px) {
  .menu-btn { display: block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--navy); margin: 0; padding: 8px 20px 20px; display: none; gap: 2px; box-shadow: 0 14px 24px rgba(0, 0, 0, .3); }
  .nav.open { display: flex; }
  .nav a.link { padding: 14px 8px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .nav .grow { display: none; }
  .nav .btn { margin-top: 10px; }
}
.auth-card input::placeholder{font-weight:400;color:#8a98b0}
