:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #dce3ec;
  --text: #0f172a;
  --muted: #475569;
  --primary: #1a56db;
  --primary-hover: #1443b0;
  --primary-soft: #eef4ff;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.alif-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.alif-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.alif-topbar-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.alif-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 19px;
}

.alif-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.alif-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.alif-nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.alif-nav-link:hover,
.alif-nav-link.active {
  color: var(--primary);
}

.alif-hero {
  padding: 36px 0 24px;
  text-align: center;
}

.alif-badge {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.alif-hero-title {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.alif-hero-subtitle {
  margin: 0 auto;
  max-width: 680px;
  font-size: 16px;
  color: var(--muted);
}

.alif-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.alif-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.alif-dir-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.alif-label-inline {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.alif-select {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.alif-select:focus {
  outline: 2px solid rgba(26, 86, 219, 0.25);
  border-color: var(--primary);
}

.alif-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.alif-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.alif-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.alif-btn-primary {
  background: var(--primary);
  color: #fff;
}

.alif-btn-primary:hover {
  background: var(--primary-hover);
}

.alif-btn-secondary {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #c7d9ff;
}

.alif-btn-secondary:hover {
  background: #dfeaff;
}

.alif-btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.alif-btn-ghost:hover {
  background: #e5ebf3;
}

.alif-dropzone {
  border: 1.5px dashed #b9c7da;
  border-radius: 12px;
  background: #fafcff;
  padding: 14px 18px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.alif-dropzone:hover,
.alif-dropzone.is-dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.alif-dropzone-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alif-drop-icon { font-size: 24px; }
.alif-drop-hint { font-size: 12.5px; color: var(--muted); }

.alif-status {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #c7d9ff;
}

.alif-status.is-error {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

.alif-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 820px) {
  .alif-panes { grid-template-columns: 1fr; }
}

.alif-pane {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.alif-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.alif-pane-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.alif-pane-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alif-mini-btn {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.alif-mini-btn:hover { background: #eef2f7; }

.alif-mini-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.alif-mini-primary:hover { background: var(--primary-hover); }

.alif-mini-danger:hover {
  color: var(--danger);
  border-color: #fecaca;
  background: #fef2f2;
}

.alif-textarea {
  width: 100%;
  min-height: 290px;
  border: 0;
  padding: 14px;
  resize: vertical;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
}

.alif-textarea:focus { outline: none; }
.alif-textarea-out { background: #fcfdff; }

.alif-pane-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--muted);
}

.alif-export-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alif-alphabet-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .alif-alphabet-strip { grid-template-columns: repeat(2, 1fr); }
}

.alif-char-chip {
  text-align: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.alif-char-chip strong {
  color: var(--primary);
  font-size: 15px;
}

.alif-desktop-section { margin-top: 28px; }

.alif-desktop-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 820px) {
  .alif-desktop-card { grid-template-columns: 1fr; }
}

.alif-desktop-info h2 { margin: 0 0 8px; font-size: 20px; }
.alif-desktop-info p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }

.alif-feature-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--text);
}

.alif-feature-list li { margin-bottom: 7px; }

.alif-desktop-downloads {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alif-dl-btn {
  display: flex;
  flex-direction: column;
  padding: 13px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform 0.12s, box-shadow 0.12s;
}

.alif-dl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.alif-dl-mac {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.alif-dl-mac span { font-size: 12.5px; color: #cbd5e1; }

.alif-dl-win {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #c7d9ff;
}

.alif-dl-win span { font-size: 12.5px; color: var(--muted); }

.alif-guide-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-top: 2px;
}

.alif-guide-link:hover { text-decoration: underline; }

.alif-modal[hidden] { display: none; }

.alif-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.alif-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.alif-modal-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.alif-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.alif-modal-head h3 { margin: 0; font-size: 18px; }
.alif-modal-desc { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); }

.alif-exc-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.alif-input {
  flex: 1 1 160px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
}

.alif-exc-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alif-exc-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 13.5px;
  word-break: break-word;
}

.alif-footer {
  margin-top: 56px;
  padding: 52px 0 32px;
  background: #121614;
  color: #e5e7eb;
  text-align: left;
  font-size: 14px;
}
.alif-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
}
.alif-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.alif-footer-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.alif-footer-brand-name {
  font-size: 22px;
  font-weight: 800;
  color: #6ee787;
  letter-spacing: -0.02em;
}
.alif-footer-tagline {
  margin: 14px 0 0;
  max-width: 240px;
  font-size: 14px;
  line-height: 1.55;
  color: #9ca3af;
}
.alif-footer-heading {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}
.alif-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.alif-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f3f4f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.15s ease;
}
.alif-footer-links a:hover {
  color: #6ee787;
}
.alif-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}
@media (max-width: 760px) {
  .alif-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ALIF-ABOUT-START */
.alif-about-box { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.alif-demo-player {
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e293b;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}
.alif-demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #1e293b;
}
.alif-demo-dots { display: flex; gap: 6px; }
.alif-demo-dots span { width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.alif-demo-dots span:first-child { background: #ef4444; }
.alif-demo-dots span:nth-child(2) { background: #f59e0b; }
.alif-demo-dots span:nth-child(3) { background: #22c55e; }
.alif-demo-badge { font-size: 11.5px; font-weight: 700; color: #6ee787; }
.alif-demo-screen { padding: 24px 18px 18px; text-align: center; }
.alif-demo-text-row {
  font-size: 30px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
  min-height: 42px;
}
.alif-demo-cursor { color: #6ee787; animation: alifBlink 0.9s infinite; }
@keyframes alifBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.alif-demo-hint { margin-top: 8px; font-size: 12.5px; color: #94a3b8; transition: color 0.2s; }
.alif-demo-hint.is-converted { color: #6ee787; font-weight: 600; }
.alif-demo-keys {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.alif-demo-keys kbd {
  min-width: 32px;
  padding: 4px 10px;
  border-radius: 7px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.alif-demo-keys kbd.alif-demo-result.is-active {
  background: #059669;
  border-color: #34d399;
  color: #ffffff;
}
.alif-demo-plus, .alif-demo-arrow { color: #64748b; font-weight: 700; font-size: 13px; }
.alif-about-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.alif-copy-toast {
  background: #dcfce7;
  color: #15803d;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.alif-diff-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.alif-diff-card {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.alif-diff-card:hover { border-color: #059669; background: #ecfdf5; }
.alif-diff-pair { font-size: 14.5px; color: var(--text); }
.alif-diff-pair strong { color: #059669; font-size: 16px; }
.alif-diff-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
@media (max-width: 520px) { .alif-diff-grid { grid-template-columns: 1fr; } }

/* ALIF-TYPING-START */
.alif-typing-box { max-width: 580px; max-height: 90vh; overflow-y: auto; }
.alif-method-list { display: flex; flex-direction: column; gap: 11px; }
.alif-method-card {
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.alif-method-primary {
  background: #f0fdf4;
  border-color: #86efac;
}
.alif-method-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.alif-method-top strong { font-size: 14.5px; color: var(--text); }
.alif-method-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.alif-method-primary .alif-method-badge {
  background: #059669;
  color: #ffffff;
}
.alif-method-text {
  margin: 0 0 9px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.alif-shortcut-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.alif-shortcut-pills span {
  padding: 4px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}
.alif-shortcut-pills b { color: #059669; }
.alif-method-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(5, 150, 105, 0.18);
  font-size: 12px;
  color: var(--muted);
}
.alif-method-foot kbd {
  padding: 1px 6px;
  border-radius: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-weight: 700;
  color: var(--text);
}
.alif-inline-cta {
  font-weight: 700;
  color: #059669;
  text-decoration: none;
}
.alif-inline-cta:hover { text-decoration: underline; }
.alif-sandbox-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 9px;
  background: #ffffff;
}
.alif-quick-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.alif-key-btn {
  min-width: 34px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.alif-key-btn:hover {
  border-color: #059669;
  background: #ecfdf5;
  color: #059669;
}

/* ALIF-HERO-START */
.alif-hero {
  padding: 36px 0 28px;
}
.alif-hero-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}
.alif-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
.alif-hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}
.alif-hero-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}
.alif-hero-accent {
  color: #059669;
}
.alif-hero-sub {
  margin: 0 auto 18px;
  max-width: 610px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}
.alif-hero-rules {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.alif-rule-chip {
  padding: 5px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.alif-rule-chip b {
  color: #059669;
  font-weight: 800;
}
.alif-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.alif-hero-btn-primary {
  padding: 11px 20px;
  border-radius: 11px;
  background: #059669;
  color: #ffffff;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}
.alif-hero-btn-primary:hover {
  background: #047857;
  transform: translateY(-1px);
}
.alif-hero-btn-secondary {
  padding: 11px 20px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.alif-hero-btn-secondary:hover {
  border-color: #94a3b8;
  background: var(--surface-2);
}

/* Katta Jonli Ekran + Onlayn Klaviatura */
.alif-hero-stage {
  max-width: 820px;
  margin: 0 auto;
  background: #0f172a;
  border-radius: 20px;
  border: 1px solid #1e293b;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}
.alif-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.alif-stage-dots {
  display: flex;
  gap: 7px;
}
.alif-stage-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.alif-stage-dots span:nth-child(1) { background: #ef4444; }
.alif-stage-dots span:nth-child(2) { background: #f59e0b; }
.alif-stage-dots span:nth-child(3) { background: #22c55e; }
.alif-stage-title {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}
.alif-stage-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee787;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.alif-stage-status.is-paused {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}
.alif-stage-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
}
.alif-stage-status.is-paused .alif-stage-live-dot {
  background: #94a3b8;
}
.alif-stage-screen {
  padding: 28px 26px 26px;
  min-height: 144px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.alif-stage-badge-row {
  margin-bottom: 14px;
  min-height: 26px;
}
.alif-stage-badge {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.alif-stage-badge.is-active {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee787;
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.alif-stage-output {
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 800;
  line-height: 1.35;
  color: #f8fafc;
  letter-spacing: -0.015em;
  min-height: 44px;
}
.alif-hero-newchar {
  color: #34d399;
  text-shadow: 0 0 18px rgba(52, 211, 153, 0.35);
}
.alif-stage-caret {
  color: #34d399;
  font-weight: 400;
  margin-left: 2px;
  animation: alifHeroCaret 0.9s infinite;
}
@keyframes alifHeroCaret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Real Vaqt Onlayn Klaviatura (MacBook ANSI joylashuvi - Dark Navy Slate uyg'un) */
.alif-mac-kbd {
  padding: 14px 14px 20px;
  background: #0a101d;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 7px;
  user-select: none;
  box-sizing: border-box;
}
.alif-kbd-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.alif-key {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 50px;
  box-sizing: border-box;
  border-radius: 7px;
  background: linear-gradient(180deg, #1e293b 0%, #151e2e 100%);
  border: 1px solid #293548;
  border-bottom: 2.5px solid #070b14;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s ease, background 0.08s ease, border-color 0.08s ease, box-shadow 0.08s ease;
}
.alif-key-dual {
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0 8px;
  font-size: 11.5px;
  line-height: 1;
}
.alif-key-dual span:first-child {
  color: #64748b;
  font-size: 10.5px;
}
.alif-key-dual span:last-child {
  color: #e2e8f0;
  font-size: 12.5px;
}
.alif-key-accent {
  border-color: rgba(52, 211, 153, 0.28);
}
.alif-key-accent span:last-child {
  color: #34d399;
  font-weight: 700;
}
.alif-key-home::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 11px;
  height: 1.5px;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.45);
}
.alif-key-fn {
  background: linear-gradient(180deg, #172033 0%, #111827 100%);
  font-size: 11px;
  color: #94a3b8;
  align-items: flex-end;
  padding: 0 8px 8px;
}
.alif-key-left {
  justify-content: flex-start;
}
.alif-key-right {
  justify-content: flex-end;
}
.alif-caps-dot {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
}
.alif-key-mod {
  background: linear-gradient(180deg, #172033 0%, #111827 100%);
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px 8px;
  color: #94a3b8;
}
.alif-mod-sym {
  width: 100%;
  font-size: 11px;
  line-height: 1;
}
.alif-sym-l { text-align: left; }
.alif-sym-r { text-align: right; }
.alif-mod-lbl {
  font-size: 10.5px;
  line-height: 1;
}
.alif-key-space {
  min-width: 0;
}
.alif-key.is-pressed {
  transform: translateY(1.5px);
  background: linear-gradient(180deg, #334155 0%, #273449 100%);
  border-color: #64748b;
  border-bottom-width: 1px;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.25);
}
.alif-key.is-transform-key {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.65);
}
.alif-key.is-transform-key span {
  color: #ffffff !important;
}

@media (max-width: 680px) {
  .alif-stage-title { display: none; }
  .alif-stage-screen { padding: 20px 12px 18px; min-height: 120px; }
  .alif-mac-kbd { padding: 7px; gap: 4px; }
  .alif-kbd-row { gap: 3.5px; }
  .alif-key { height: 34px; font-size: 11px; border-radius: 5px; }
  .alif-key-dual { padding: 3px 0; }
  .alif-key-dual span:first-child { font-size: 8.5px; }
  .alif-key-dual span:last-child { font-size: 10px; }
  .alif-key-fn { font-size: 8.5px; padding: 0 4px 4px; }
  .alif-key-mod { padding: 3px 4px 4px; }
  .alif-mod-sym { font-size: 8.5px; }
  .alif-mod-lbl { font-size: 8px; }
}


/* ALIF-DARK-THEME-START */
.alif-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  margin-left: 4px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.alif-theme-btn:hover {
  border-color: #10b981;
  color: #34d399;
}
.alif-icon-sun { display: none; }
html[data-theme="dark"] .alif-icon-moon { display: none; }
html[data-theme="dark"] .alif-icon-sun { display: block; color: #fbbf24; }

html[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #283548;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background-color: #0b1120 !important;
  color: #f1f5f9 !important;
}

/* Yuqori menyu */
html[data-theme="dark"] .alif-header {
  background: rgba(11, 17, 32, 0.9) !important;
  border-bottom-color: #1e293b !important;
}
html[data-theme="dark"] .alif-nav-link,
html[data-theme="dark"] .alif-brand-name {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .alif-nav-link:hover,
html[data-theme="dark"] .alif-nav-link.active {
  color: #34d399 !important;
}

/* Kartochkalar, maydonlar va tugmalar */
html[data-theme="dark"] .alif-card,
html[data-theme="dark"] .alif-panel,
html[data-theme="dark"] .alif-box,
html[data-theme="dark"] .alif-section,
html[data-theme="dark"] .alif-dropzone,
html[data-theme="dark"] .alif-file-box {
  background-color: #111827 !important;
  border-color: #283548 !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] textarea,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] select {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] input::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] button:not(.alif-hero-btn-primary):not(.alif-diff-card):not(.alif-key):not(.alif-stage-status):not(.alif-theme-btn),
html[data-theme="dark"] .alif-btn-secondary,
html[data-theme="dark"] .alif-mini-btn {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] button:not(.alif-hero-btn-primary):not(.alif-diff-card):not(.alif-key):not(.alif-stage-status):not(.alif-theme-btn):hover {
  background-color: #273549 !important;
  border-color: #475569 !important;
}

/* Modal oynalar */
html[data-theme="dark"] .alif-modal-box,
html[data-theme="dark"] .alif-about-box,
html[data-theme="dark"] .alif-typing-box {
  background-color: #111827 !important;
  color: #f1f5f9 !important;
  border-color: #283548 !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65) !important;
}
html[data-theme="dark"] .alif-modal-head h3,
html[data-theme="dark"] .alif-modal-desc,
html[data-theme="dark"] .alif-method-top strong {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .alif-modal-desc code,
html[data-theme="dark"] .alif-hero-sub code,
html[data-theme="dark"] .alif-rule-chip code,
html[data-theme="dark"] .alif-shortcut-pills code {
  background: #1e293b !important;
  color: #6ee787 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .alif-method-card {
  background-color: #172033 !important;
  border-color: #283548 !important;
}
html[data-theme="dark"] .alif-method-primary {
  background-color: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
}
html[data-theme="dark"] .alif-method-text,
html[data-theme="dark"] .alif-method-foot,
html[data-theme="dark"] .alif-about-subhead {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .alif-shortcut-pills span,
html[data-theme="dark"] .alif-key-btn,
html[data-theme="dark"] .alif-method-foot kbd {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .alif-key-btn:hover {
  background-color: rgba(16, 185, 129, 0.18) !important;
  border-color: #34d399 !important;
  color: #6ee787 !important;
}
html[data-theme="dark"] .alif-diff-card {
  background-color: #172033 !important;
  border-color: #283548 !important;
}
html[data-theme="dark"] .alif-diff-card:hover {
  background-color: rgba(16, 185, 129, 0.14) !important;
  border-color: #34d399 !important;
}
html[data-theme="dark"] .alif-diff-pair {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .alif-diff-pair strong {
  color: #34d399 !important;
}
html[data-theme="dark"] .alif-diff-card small {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .alif-copy-toast {
  background-color: rgba(16, 185, 129, 0.2) !important;
  color: #6ee787 !important;
}

/* Hero qismi */
html[data-theme="dark"] .alif-hero-title {
  color: #f8fafc !important;
}
html[data-theme="dark"] .alif-hero-sub {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .alif-rule-chip {
  background-color: #111827 !important;
  border-color: #283548 !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .alif-rule-chip b {
  color: #34d399 !important;
}
html[data-theme="dark"] .alif-hero-btn-secondary {
  background-color: #111827 !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .alif-hero-btn-secondary:hover {
  background-color: #1e293b !important;
  border-color: #475569 !important;
}
html[data-theme="dark"] .alif-hero-pill {
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
  color: #6ee787 !important;
}

/* Footer */
html[data-theme="dark"] .alif-footer {
  background: #070b14 !important;
  border-top: 1px solid #1e293b;
}


/* ALIF-TRAINER-START */
.alif-trainer-sec { padding: 18px 0 38px; }
.alif-trainer-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); }
.alif-trainer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.alif-trainer-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; margin-bottom: 6px; }
.alif-trainer-title { margin: 0; font-size: 21px; font-weight: 800; color: var(--text); }
.alif-mt-toolbar { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.alif-mt-group { display: inline-flex; align-items: center; gap: 4px; }
.alif-mt-group[hidden] { display: none !important; }
.alif-mt-sep { width: 2px; height: 18px; background: var(--border); border-radius: 2px; margin: 0 4px; }
.alif-mt-opt { padding: 5px 10px; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.alif-mt-opt.is-active { color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.alif-mt-status-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 0 4px; }
.alif-mt-counter { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: #f59e0b; line-height: 1; }
.alif-mt-live-stats { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13.5px; color: var(--muted); }
.alif-mt-live-stats strong { color: var(--text); font-weight: 800; }
.alif-mt-live-stats strong.is-best { color: #059669; }
.alif-mt-stage { position: relative; border-radius: 14px; background: #232528; border: 1.5px solid #32353a; padding: 20px 22px; cursor: text; }
.alif-mt-stage.is-focused { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14); }
.alif-mt-hidden-input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.alif-mt-viewport { height: 118px; overflow: hidden; user-select: none; }
.alif-mt-words { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: clamp(19px, 2.3vw, 24px); line-height: 39px; color: #6b7280; transition: transform 0.14s ease-out; }
.mt-word { display: inline-block; margin-right: 0.35em; position: relative; }
.mt-word.is-word-err { text-decoration: underline; text-decoration-color: #ef4444; text-underline-offset: 5px; }
.mt-ch.is-ok { color: #f3f4f6; }
.mt-ch.is-err { color: #ef4444; }
.mt-ch.is-extra { color: #b91c1c; }
.mt-caret { display: inline-block; width: 2.5px; height: 1.15em; background: #f59e0b; vertical-align: text-bottom; margin: 0 -1.5px 0 -1px; border-radius: 2px; animation: mtCaretBlink 1s infinite; }
@keyframes mtCaretBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.alif-mt-focus-hint { margin-top: 10px; font-size: 12px; color: #9ca3af; text-align: right; }
.alif-mt-actions { display: flex; justify-content: center; margin-top: 14px; }
.alif-trainer-btn { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.alif-trainer-result { margin-top: 14px; padding: 14px 18px; border-radius: 12px; background: #ecfdf5; border: 1px solid #86efac; color: #065f46; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.alif-trainer-result[hidden] { display: none !important; }
html[data-theme="dark"] .alif-trainer-card { background: #111827 !important; border-color: #283548 !important; }
html[data-theme="dark"] .alif-mt-toolbar { background: #0f172a !important; border-color: #283548 !important; }
html[data-theme="dark"] .alif-mt-opt { background: transparent !important; border: none !important; }
html[data-theme="dark"] .alif-mt-opt.is-active { color: #fbbf24 !important; background: rgba(251, 191, 36, 0.14) !important; }
html[data-theme="dark"] .alif-mt-stage { background: #181a1d !important; border-color: #2c3038 !important; }

/* ALIF-ALPHABET-TABLE-START */
.alif-alpha-sec { padding: 18px 0 42px; }
.alif-alpha-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); }
.alif-alpha-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.alif-alpha-title { margin: 6px 0 6px; font-size: 22px; font-weight: 800; color: var(--text); }
.alif-alpha-sub { margin: 0; font-size: 14px; color: var(--muted); max-width: 560px; line-height: 1.55; }
.alif-law-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 20px; }
.alif-law-item { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.alif-law-item small { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.alif-law-item strong { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.35; }
.alif-law-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13.5px; font-weight: 700; color: #059669; text-decoration: none; }
.alif-law-link:hover { text-decoration: underline; }
.alif-alpha-filters { display: inline-flex; gap: 6px; padding: 4px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.alif-alpha-fbtn { padding: 6px 12px; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.alif-alpha-fbtn.is-active { background: var(--surface); color: #059669; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08); }
.alif-alpha-table-wrap { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.alif-alpha-row { display: grid; grid-template-columns: 44px 1.2fr 1fr; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface); transition: background 0.12s ease; }
.alif-alpha-row:last-child { border-bottom: none; }
.alif-alpha-row.is-head { background: var(--surface-2); font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; }
.alif-alpha-row.is-changed { background: rgba(16, 185, 129, 0.07); border-left: 4px solid #059669; padding-left: 12px; }
.alif-alpha-row[hidden] { display: none !important; }
.alif-alpha-num { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.alif-alpha-new { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; color: var(--text); }
.alif-alpha-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alif-alpha-old { font-size: 16.5px; font-weight: 500; color: var(--muted); }
html[data-theme="dark"] .alif-alpha-card, html[data-theme="dark"] .alif-alpha-row { background: #111827 !important; border-color: #283548 !important; }
html[data-theme="dark"] .alif-law-item, html[data-theme="dark"] .alif-alpha-filters, html[data-theme="dark"] .alif-alpha-row.is-head { background: #0f172a !important; border-color: #283548 !important; }
html[data-theme="dark"] .alif-alpha-row.is-changed { background: rgba(16, 185, 129, 0.12) !important; border-left-color: #34d399 !important; }
html[data-theme="dark"] .alif-alpha-tag { background: rgba(16, 185, 129, 0.2) !important; color: #6ee787 !important; border-color: rgba(52, 211, 153, 0.35) !important; }
html[data-theme="dark"] .alif-alpha-fbtn { background: transparent !important; border: none !important; }
html[data-theme="dark"] .alif-alpha-fbtn.is-active { background: #1e293b !important; color: #34d399 !important; }
html[data-theme="dark"] .alif-law-link { color: #34d399 !important; }

/* ALIF-BOOKMARKLET-START */
.alif-bm-sec { padding: 18px 0 42px; }
.alif-bm-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); }
.alif-bm-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: center; }
@media (max-width: 780px) { .alif-bm-grid { grid-template-columns: 1fr; } }
.alif-bm-title { margin: 6px 0 8px; font-size: 22px; font-weight: 800; color: var(--text); }
.alif-bm-sub { margin: 0 0 16px; font-size: 14px; color: var(--muted); line-height: 1.55; }
.alif-bm-steps { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text); }
.alif-bm-step { display: flex; align-items: center; gap: 10px; }
.alif-bm-step b { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #ecfdf5; color: #059669; font-size: 12px; flex-shrink: 0; }
.alif-bm-box { padding: 20px; border-radius: 16px; background: var(--surface-2); border: 1.5px dashed #10b981; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.alif-bm-drag { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #ffffff !important; font-size: 15px; font-weight: 800; text-decoration: none; cursor: grab; box-shadow: 0 10px 24px rgba(16, 185, 129, 0.3); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.alif-bm-drag:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(16, 185, 129, 0.4); }
.alif-bm-drag:active { cursor: grabbing; }
.alif-bm-hint { font-size: 12px; color: var(--muted); }
.alif-bm-copy { padding: 7px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 700; cursor: pointer; }
html[data-theme="dark"] .alif-bm-card { background: #111827 !important; border-color: #283548 !important; }
html[data-theme="dark"] .alif-bm-box { background: #0f172a !important; border-color: rgba(52, 211, 153, 0.45) !important; }
html[data-theme="dark"] .alif-bm-step b { background: rgba(16, 185, 129, 0.18) !important; color: #34d399 !important; }

/* ALIF-DOCS-GEN-START */
.alif-docs-sec { padding: 22px 0 46px; }
.alif-docs-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 26px; box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06); }
.alif-docs-hero { text-align: center; margin-bottom: 20px; }
.alif-docs-hero h2 { margin: 6px 0; font-size: 25px; font-weight: 800; color: var(--text); }
.alif-docs-hero p { margin: 0 auto 16px; font-size: 14px; color: var(--muted); max-width: 650px; }
.alif-docs-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.alif-doc-tab { padding: 8px 15px; border-radius: 10px; border: 1.5px solid #cbd5e1; background: #f8fafc; color: #334155; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all 0.14s ease; }
.alif-doc-tab:hover { background: #e2e8f0; color: #0f172a; border-color: #94a3b8; }
.alif-doc-tab:active, .alif-doc-sbtn:active, .alif-doc-scbtn:active { transform: scale(0.96); }
.alif-doc-tab.is-active { background: #0284c7 !important; color: #ffffff !important; border-color: #0284c7 !important; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28); }
.alif-docs-grid { display: grid; grid-template-columns: 365px 1fr; gap: 18px; align-items: start; }
@media (max-width: 960px) { .alif-docs-grid { grid-template-columns: 1fr; } }
.alif-doc-form-card, .alif-doc-preview-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.alif-doc-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.alif-doc-card-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 800; color: var(--text); }
.alif-doc-card-title::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #0284c7; }
.alif-doc-mini-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.alif-doc-sbtn { padding: 6px 11px; border-radius: 8px; border: 1.5px solid #cbd5e1; background: #ffffff; color: #1e293b; font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.14s ease; }
.alif-doc-sbtn:hover { background: #f1f5f9; border-color: #0284c7; color: #0284c7; }
.alif-doc-group-title { margin: 14px 0 8px; font-size: 12.5px; font-weight: 800; color: var(--text); }
.alif-doc-group-title:first-child { margin-top: 0; }
.alif-doc-field { margin-bottom: 10px; }
.alif-doc-field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.alif-doc-field input, .alif-doc-field select, .alif-doc-field textarea { width: 100%; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; box-sizing: border-box; }
.alif-doc-field textarea { min-height: 62px; resize: vertical; }
.alif-doc-field small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.alif-doc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.alif-doc-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text); margin: 8px 0; cursor: pointer; }
.alif-doc-check input { width: 16px; height: 16px; accent-color: #0284c7; }
.alif-doc-script-sw { display: inline-flex; padding: 3px; border-radius: 9px; background: #e2e8f0; border: 1px solid #cbd5e1; }
.alif-doc-scbtn { padding: 4px 10px; border-radius: 6px; border: none; background: transparent; color: #475569; font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.14s ease; }
.alif-doc-scbtn:hover { color: #0f172a; }
.alif-doc-scbtn.is-active { background: #0284c7 !important; color: #ffffff !important; box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25); }
.alif-doc-print-btn { background: #0284c7 !important; color: #ffffff !important; border-color: #0284c7 !important; }
.alif-doc-print-btn:hover { background: #0369a1 !important; border-color: #0369a1 !important; }
.alif-doc-paper-stage { background: #1e2229; border-radius: 12px; padding: 20px; display: flex; justify-content: center; overflow-x: auto; }
.alif-doc-paper { width: 100%; max-width: 620px; min-height: 760px; background: #ffffff; color: #111827; padding: 50px 54px; border-radius: 4px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35); font-family: "Times New Roman", Times, Georgia, serif; font-size: 15px; line-height: 1.72; box-sizing: border-box; }
@media (max-width: 640px) { .alif-doc-paper { padding: 26px 20px; min-height: 520px; font-size: 14px; } }
.alif-doc-paper-title { text-align: center; font-weight: 700; font-size: 16px; letter-spacing: 0.18em; margin: 18px 0 16px; }
.alif-doc-paper-addr { width: 58%; margin-left: auto; text-align: left; margin-bottom: 16px; line-height: 1.6; }
.alif-doc-paper p { margin: 0 0 11px; text-indent: 28px; text-align: justify; }
.alif-doc-paper p.no-indent { text-indent: 0; text-align: left; }
.alif-doc-sign-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 26px; }
.alif-doc-blank { display: inline-block; border-bottom: 1px solid #111827; min-width: 105px; height: 1em; vertical-align: baseline; }
.alif-doc-note { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Qora fon (Dark mode) tugma va karta holatlari */
html[data-theme="dark"] .alif-docs-wrap { background: #111827 !important; border-color: #283548 !important; }
html[data-theme="dark"] .alif-doc-form-card, html[data-theme="dark"] .alif-doc-preview-card { background: #0f172a !important; border-color: #283548 !important; }
html[data-theme="dark"] .alif-doc-card-title::before { background: #38bdf8; }
html[data-theme="dark"] .alif-doc-tab { background: #1e293b !important; border-color: #334155 !important; color: #cbd5e1 !important; }
html[data-theme="dark"] .alif-doc-tab:hover { background: #293548 !important; border-color: #475569 !important; color: #ffffff !important; }
html[data-theme="dark"] .alif-doc-tab.is-active { background: #38bdf8 !important; border-color: #38bdf8 !important; color: #082f49 !important; box-shadow: 0 4px 14px rgba(56, 189, 248, 0.32); }
html[data-theme="dark"] .alif-doc-script-sw { background: #1e293b !important; border-color: #334155 !important; }
html[data-theme="dark"] .alif-doc-scbtn { background: transparent !important; border: none !important; color: #94a3b8 !important; }
html[data-theme="dark"] .alif-doc-scbtn:hover { color: #ffffff !important; }
html[data-theme="dark"] .alif-doc-scbtn.is-active { background: #38bdf8 !important; color: #082f49 !important; }
html[data-theme="dark"] .alif-doc-sbtn { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
html[data-theme="dark"] .alif-doc-sbtn:hover { background: #293548 !important; border-color: #38bdf8 !important; color: #38bdf8 !important; }
html[data-theme="dark"] .alif-doc-print-btn { background: #38bdf8 !important; border-color: #38bdf8 !important; color: #082f49 !important; }
html[data-theme="dark"] .alif-doc-print-btn:hover { background: #7dd3fc !important; border-color: #7dd3fc !important; color: #082f49 !important; }

/* ALIF-UI-POLISH-START */
.alif-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.alif-nav-link:hover {
  background: rgba(16, 185, 129, 0.1);
}
.alif-nav-link:active {
  transform: scale(0.97);
}
button, .alif-btn, .alif-hero-btn-primary, .alif-hero-btn-secondary, .alif-trainer-btn, .alif-bm-copy, .alif-alpha-fbtn, .alif-mt-opt {
  transition: transform 0.12s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
button:active, .alif-btn:active, .alif-hero-btn-primary:active, .alif-hero-btn-secondary:active, .alif-trainer-btn:active, .alif-bm-copy:active {
  transform: scale(0.97);
}
.alif-hero-btn-primary:hover, .alif-trainer-btn:hover, .alif-bm-copy:hover {
  transform: translateY(-1px);
}
.alif-trainer-card, .alif-alpha-card, .alif-bm-card, .alif-docs-wrap {
  border-radius: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.alif-doc-field input:focus, .alif-doc-field select:focus, .alif-doc-field textarea:focus, .alif-trainer-input:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}
html[data-theme="dark"] .alif-doc-field input:focus,
html[data-theme="dark"] .alif-doc-field select:focus,
html[data-theme="dark"] .alif-doc-field textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
@media (max-width: 900px) {
  .alif-nav-link { font-size: 12.5px; padding: 6px 8px; }
}

/* ALIF-UI-POLISH-START */
.alif-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.alif-nav-link:hover {
  background: rgba(16, 185, 129, 0.1);
}
.alif-nav-link:active {
  transform: scale(0.97);
}
button, .alif-btn, .alif-hero-btn-primary, .alif-hero-btn-secondary, .alif-trainer-btn, .alif-bm-copy, .alif-alpha-fbtn, .alif-mt-opt {
  transition: transform 0.12s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
button:active, .alif-btn:active, .alif-hero-btn-primary:active, .alif-hero-btn-secondary:active, .alif-trainer-btn:active, .alif-bm-copy:active {
  transform: scale(0.97);
}
.alif-hero-btn-primary:hover, .alif-trainer-btn:hover, .alif-bm-copy:hover {
  transform: translateY(-1px);
}
.alif-trainer-card, .alif-alpha-card, .alif-bm-card, .alif-docs-wrap {
  border-radius: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.alif-doc-field input:focus, .alif-doc-field select:focus, .alif-doc-field textarea:focus, .alif-trainer-input:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}
html[data-theme="dark"] .alif-doc-field input:focus,
html[data-theme="dark"] .alif-doc-field select:focus,
html[data-theme="dark"] .alif-doc-field textarea:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
@media (max-width: 900px) {
  .alif-nav-link { font-size: 12.5px; padding: 6px 8px; }
}

/* ALIF-LAYOUT-POLISH-START */
html {
  scroll-behavior: smooth;
}
section[id] {
  scroll-margin-top: 84px;
}
.alif-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.alif-nav-link:hover {
  background: rgba(16, 185, 129, 0.12);
}
.alif-nav-link:active {
  transform: scale(0.96);
}
button, .alif-btn, .alif-hero-btn-primary, .alif-hero-btn-secondary, .alif-trainer-btn, .alif-bm-copy, .alif-alpha-fbtn, .alif-mt-opt, .alif-doc-tab, .alif-doc-sbtn {
  border-radius: 11px;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
button:active, .alif-btn:active, .alif-hero-btn-primary:active, .alif-hero-btn-secondary:active, .alif-trainer-btn:active, .alif-bm-copy:active {
  transform: scale(0.96);
}
.alif-hero-btn-primary:hover, .alif-hero-btn-secondary:hover, .alif-trainer-btn:hover, .alif-bm-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}
html[data-theme="dark"] .alif-hero-btn-primary:hover,
html[data-theme="dark"] .alif-hero-btn-secondary:hover,
html[data-theme="dark"] .alif-trainer-btn:hover,
html[data-theme="dark"] .alif-bm-copy:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
@media (max-width: 960px) {
  .alif-nav-link { font-size: 12.5px; padding: 6px 9px; }
}
