:root {
  --bg: #eef1f6;
  --bg-2: #f6f8fb;
  --card: #f8fafc;
  --card-solid: #ffffff;
  --border: #dde3ec;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --cyan: #22c3dd;
  --cyan-2: #3cc8de;
  --pink: #e8479e;
  --pink-2: #f0609f;
  --grad: linear-gradient(90deg, #e8479e 0%, #ef5aa0 55%, #f37ab0 100%);
  --grad-logo: linear-gradient(135deg, #22d3ee, #ec4899);
  --glow: 0 0 0 1px rgba(34, 211, 238, 0.55), 0 0 18px rgba(34, 211, 238, 0.55);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 500px at 50% -10%, #ffffff 0%, var(--bg) 60%) fixed, var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-glow { background: var(--grad); box-shadow: var(--glow); }
.btn-glow:hover { filter: brightness(1.05); box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.8), 0 0 26px rgba(34, 211, 238, 0.7); }
.btn-glow:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-block { width: 100%; padding: 12px; margin-top: 6px; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 10px; z-index: 50; padding: 0 16px; }
.header-inner {
  max-width: 1320px;
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 10px 8px 14px;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo-mark { width: 30px; height: 30px; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.45)); }
.logo b { background: var(--grad-logo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; color: var(--text-2); }
.main-nav a { text-decoration: none; }
.main-nav a:hover { color: var(--pink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; flex-direction: column; gap: 4px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px 4px 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-logo); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; text-transform: uppercase; }
.plan-badge { font-size: 12px; font-weight: 600; color: var(--muted); }
.plan-badge.pro { color: var(--pink); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  padding: 6px; display: none;
}
.dropdown.open { display: block; }
.dropdown-email { font-size: 13px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }
.dropdown button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.dropdown button:hover { background: var(--bg-2); }

/* ---------- Hero ---------- */
.hero { max-width: 900px; margin: 0 auto; padding: 48px 16px 20px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 800; margin: 0 0 16px; }
.lead { font-size: 17px; color: var(--text-2); margin: 0 0 26px; }
.url-form {
  display: flex; align-items: center; gap: 10px;
  max-width: 720px; margin: 0 auto;
  background: #e9edf3; border: 1px solid var(--border); border-radius: 12px; padding: 5px 5px 5px 14px;
}
.url-form:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 195, 221, 0.18); }
.url-icon { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.url-form input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 17px; color: var(--text); padding: 12px 0; }
.hero-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* ---------- Workspace ---------- */
.workspace { max-width: 1320px; margin: 0 auto; padding: 22px 20px 48px; }
.panels { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: stretch; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-title { font-size: 20px; font-weight: 700; margin: 2px 2px 16px; letter-spacing: -0.01em; }

.progress { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.progress strong { display: block; font-size: 16px; }
.progress span { font-size: 14px; color: var(--muted); }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #e2e8f0; border-top-color: var(--pink); animation: spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.player-wrap { position: relative; aspect-ratio: 16 / 9; background: #0b0f1a; border-radius: 10px; overflow: hidden; }
.player-wrap iframe, #player { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #94a3b8; background: radial-gradient(circle at 50% 40%, #1e293b, #0b0f1a); }
.player-empty svg { width: 46px; height: 46px; margin: 0 auto 8px; color: #fff; opacity: 0.85; }
.player-empty p { margin: 0; font-size: 13px; }

.video-meta { padding: 10px 2px 2px; }
.video-title { font-weight: 700; font-size: 17px; line-height: 1.35; }
.video-sub { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.source-badge { background: #e0f7fb; color: #0e7490; border-radius: 999px; padding: 1px 8px; font-weight: 600; }

.tabs-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0 8px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; background: #e9edf3; padding: 3px; border-radius: 9px; }
.tab { border: 0; background: transparent; padding: 8px 18px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.tool-buttons { display: flex; gap: 6px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #b8c0cc; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.chip-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip-btn:not(:disabled):hover { background: #9aa4b3; }
.chip-btn:disabled { opacity: 0.6; cursor: default; }

.tab-panel { max-height: 560px; min-height: 320px; overflow-y: auto; padding-right: 4px; }
.tab-panel::-webkit-scrollbar { width: 6px; }
.tab-panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.empty-state { font-size: 15px; color: var(--muted); padding: 18px 6px; text-align: center; }

.search-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; position: sticky; top: 0; background: var(--card); padding-bottom: 4px; z-index: 1; }
.search-row input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px; background: #fff; outline: none; }
.search-row input:focus { border-color: var(--cyan); }
.follow { font-size: 14px; color: var(--muted); display: flex; gap: 4px; align-items: center; white-space: nowrap; }

.line { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; font-size: 16px; line-height: 1.55; color: var(--text-2); border: 2px solid transparent; }
.line:hover { background: #eef2f7; }
.line .ts { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; padding-top: 1px; }
.line.active { background: rgba(34, 195, 221, 0.12); border-color: var(--cyan); box-shadow: 0 0 12px rgba(34, 211, 238, 0.35); color: var(--text); }
.line.active .ts { background: var(--cyan); color: #fff; border-radius: 5px; padding: 1px 5px; align-self: start; text-align: center; }
mark { background: #fde68a; color: inherit; border-radius: 3px; }

.tldr { background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(236, 72, 153, 0.10)); border: 1px solid rgba(34, 195, 221, 0.35); border-radius: 12px; padding: 14px 16px; font-size: 16px; line-height: 1.55; margin-bottom: 10px; }
.tldr b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pink); margin-bottom: 3px; }
.kp { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 12px 8px; border-radius: 8px; cursor: pointer; }
.kp:hover { background: #eef2f7; }
.kp .ts { font-size: 14px; font-weight: 600; color: #0e7490; background: #e0f7fb; border-radius: 5px; padding: 2px 4px; text-align: center; align-self: start; font-variant-numeric: tabular-nums; }
.kp h4 { margin: 0 0 4px; font-size: 16px; }
.kp p { margin: 0; font-size: 15px; color: var(--text-2); line-height: 1.5; }
.skeleton { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #e2e8f0, #f1f5f9, #e2e8f0); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin: 10px 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Chat ---------- */
.panel-right { display: flex; flex-direction: column; }
.chat-head { margin: 0 -20px; padding: 16px 20px; background: #e2e7ee; font-size: 24px; font-weight: 600; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chat-log { flex: 1; min-height: 420px; max-height: 680px; overflow-y: auto; padding: 18px 2px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 14px; font-size: 16px; line-height: 1.5; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--cyan-2); color: #fff; border-bottom-right-radius: 4px; box-shadow: 0 0 10px rgba(34, 211, 238, 0.35); }
.msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--border); color: var(--text-2); border-bottom-left-radius: 4px; }
.msg.ai.accent { background: var(--pink-2); color: #fff; border: 0; box-shadow: 0 0 10px rgba(236, 72, 153, 0.3); }
.msg p { margin: 0 0 6px; }
.msg p:last-child { margin: 0; }
.msg ul, .msg ol { margin: 4px 0 6px; padding-left: 18px; }
.msg .tslink { border: 0; background: #e0f7fb; color: #0e7490; font-weight: 600; font-size: 14px; border-radius: 5px; padding: 0 5px; }
.msg.error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; margin-right: 3px; animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 50% { opacity: 0.25; } }

.suggestions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 6px 0 10px; }
.suggestion { border: 0; background: #e2e7ee; color: var(--text-2); border-radius: 999px; padding: 9px 16px; font-size: 15px; text-align: left; }
.suggestion:hover { background: #d5dce6; }
.chat-form { display: flex; align-items: center; gap: 8px; background: #eef1f5; border: 1px solid var(--border); border-radius: 12px; padding: 6px 6px 6px 16px; }
.chat-form:focus-within { border-color: var(--cyan); }
.chat-form input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; padding: 10px 0; }
.send-btn { border: 0; background: transparent; color: var(--muted); width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; }
.send-btn:hover { color: var(--pink); background: #fff; }
.send-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- Sections ---------- */
.section { max-width: 1000px; margin: 0 auto; padding: 56px 16px; scroll-margin-top: 80px; }
.section-title { text-align: center; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; margin: 0 0 10px; }
.section-lead { text-align: center; color: var(--text-2); margin: 0 auto 32px; max-width: 620px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.f-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(236, 72, 153, 0.18)); margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan { position: relative; background: var(--card-solid); border: 1px solid var(--border); border-radius: 16px; padding: 22px 18px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--grad-logo) border-box; box-shadow: 0 10px 30px rgba(236, 72, 153, 0.15); }
.plan .badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; box-shadow: var(--glow); }
.plan h3 { margin: 0 0 12px; font-size: 16px; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.compare { font-size: 17px; font-weight: 600; color: #94a3b8; text-decoration: line-through; text-decoration-color: var(--pink); text-decoration-thickness: 2px; }
.save { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; color: #be185d; background: #fce7f3; padding: 2px 8px; border-radius: 999px; align-self: flex-start; }
.per { color: var(--muted); font-size: 13px; margin: 8px 0 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 18px; font-size: 13.5px; color: var(--text-2); display: grid; gap: 6px; }
.plan li::before { content: "✓"; color: var(--cyan); font-weight: 800; margin-right: 6px; }
.plan .btn { margin-top: auto; width: 100%; }
.pricing-note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.pricing.compact { grid-template-columns: repeat(2, 1fr); }
.pricing.compact .plan ul { display: none; }
.pricing.compact .plan { padding: 18px 14px 14px; }

/* ---------- Docs ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 30px; }
.step { background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; margin-bottom: 8px; }
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.55; }
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }

.site-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1000px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.modal-box { position: relative; background: #fff; border-radius: 18px; padding: 28px; width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25); }
.auth-box { max-width: 400px; }
.pay-box { max-width: 640px; }
.modal-box h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.modal-lead { margin: 0 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #eef1f5; border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.auth-tab { border: 0; background: none; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.auth-tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.field { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.field input { display: block; width: 100%; margin-top: 5px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px; outline: none; }
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 195, 221, 0.18); }
.form-error { background: #fef2f2; color: #b91c1c; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 200; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.error { background: #b91c1c; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pricing { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .panels { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .main-nav { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; }
  .menu-toggle { display: flex; }
  .header-inner { position: relative; gap: 8px; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .features, .pricing, .pricing.compact { grid-template-columns: 1fr; }
  .url-form { flex-wrap: wrap; padding: 8px; }
  .url-form input { flex-basis: calc(100% - 30px); }
  .url-form .btn { width: 100%; }
  .header-actions #loginBtn { padding: 8px 12px; font-size: 14px; }
  .logo { font-size: 17px; }
  .modal-box { padding: 22px 18px; }
}

/* ---------- Language picker ---------- */
.lang-picker { position: relative; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 0 8px; height: 40px; }
.lang-picker svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex-shrink: 0; }
.lang-picker select { border: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--text-2); outline: none; cursor: pointer; padding: 8px 2px; }
.url-form .btn { padding: 13px 22px; font-size: 16px; }

/* ---------- Right-to-left languages (Persian, Arabic) ---------- */
html[dir="rtl"] body { font-family: "Vazirmatn", "Inter", system-ui, sans-serif; }
html[dir="rtl"] .dropdown { right: auto; left: 0; }
html[dir="rtl"] .dropdown button { text-align: right; }
html[dir="rtl"] .msg.user { border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }
html[dir="rtl"] .msg.ai { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
html[dir="rtl"] .send-btn svg { transform: scaleX(-1); }
html[dir="rtl"] .plan li::before { margin-right: 0; margin-left: 6px; }
.ts, .tslink, .price, .compare { direction: ltr; unicode-bidi: isolate; }

/* ---------- Progress ring 0–100 % ---------- */
.ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: #e2e8f0; }
.ring-fg { stroke: url(#lg); stroke: var(--pink); stroke-linecap: round; transition: stroke-dashoffset 0.15s linear; filter: drop-shadow(0 0 3px rgba(236, 72, 153, 0.35)); }
.ring-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; direction: ltr; }
.loading-box { display: flex; align-items: center; gap: 18px; padding: 22px 14px; background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(236, 72, 153, 0.08)); border: 1px solid rgba(34, 195, 221, 0.3); border-radius: 14px; }
.loading-box b { display: block; font-size: 16px; margin-bottom: 4px; }
.loading-box span { font-size: 14px; color: var(--muted); line-height: 1.5; }
#progressRing .ring { width: 56px; height: 56px; }

/* ---------- Plans: Basic / Pro + monthly / yearly ---------- */
.pricing.two { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
.billing-toggle { display: flex; width: fit-content; margin: 0 auto 26px; background: #e2e7ee; border-radius: 12px; padding: 4px; gap: 4px; }
.bt { border: 0; background: transparent; padding: 9px 20px; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.bt.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.bt-save { font-size: 11px; font-weight: 700; color: #be185d; background: #fce7f3; padding: 2px 7px; border-radius: 999px; }
.plan .hours { font-size: 14px; font-weight: 700; color: #0e7490; background: #e0f7fb; border-radius: 8px; padding: 5px 10px; align-self: flex-start; margin: -4px 0 14px; }
.price-unit { font-size: 15px; color: var(--muted); font-weight: 600; }
.modal .billing-toggle { margin-bottom: 18px; }
.dropdown-usage { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.usage-text { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.usage-bar { height: 6px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.usage-bar span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 6px; }
.usage-note { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 560px) { .pricing.two { grid-template-columns: 1fr; } }

/* ---------- Detailed summary ---------- */
.tabs { flex-wrap: wrap; }
.dsec { padding: 14px 8px; border-bottom: 1px solid var(--border); }
.dsec:last-of-type { border-bottom: 0; }
.dsec-head { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 8px; }
.dsec-head:hover h4 { color: var(--pink); }
.dsec-head .ts { font-size: 14px; font-weight: 600; color: #0e7490; background: #e0f7fb; border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.dsec h4 { margin: 0; font-size: 17px; }
.dsec p { margin: 0 0 8px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }
.dsec ul, .takeaways ul { margin: 0; padding-inline-start: 22px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.dsec li, .takeaways li { margin: 3px 0; }
.takeaways { margin-top: 12px; background: #fdf2f8; border: 1px solid #fbcfe8; border-radius: 12px; padding: 14px 16px; }
.takeaways b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pink); margin-bottom: 6px; }

@media (max-width: 1100px) {
  .panels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .panels { grid-template-columns: 1fr; }
  .chat-log { min-height: 320px; }
}
@media (max-width: 560px) {
  .lang-picker select { max-width: 92px; }
  .card { padding: 14px; }
  .chat-head { margin: 0 -14px; }
  .line, .kp { grid-template-columns: 56px 1fr; font-size: 15px; }
}
