/* =========================================================
   Vinnofit design system — light / dark, RTL / LTR
   ========================================================= */
:root,
[data-theme="dark"] {
  --bg: #111823;
  --bg-2: #0c121b;
  --surface: #1a2433;
  --surface-2: #212d3f;
  --surface-3: #2a3850;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef3f8;
  --text-2: #b4c0cf;
  --muted: #7f8ea3;
  --accent: #d0f252;
  --accent-ink: #18210a;
  --accent-soft: rgba(208, 242, 82, .12);
  --accent-line: rgba(208, 242, 82, .35);
  --link: #d0f252;
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, .12);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, .12);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --overlay: rgba(5, 8, 13, .6);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f5f8;
  --bg-2: #e9edf2;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eceff4;
  --line: rgba(17, 24, 35, .08);
  --line-2: rgba(17, 24, 35, .14);
  --text: #121a26;
  --text-2: #3f4b5c;
  --muted: #6b7789;
  --accent: #c5ea3c;
  --accent-ink: #18210a;
  --accent-soft: rgba(127, 173, 57, .14);
  --accent-line: rgba(127, 173, 57, .45);
  --link: #5d8a1f;
  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, .1);
  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, .1);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, .08);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, .08);
  --shadow: 0 10px 30px rgba(17, 24, 35, .08);
  --overlay: rgba(17, 24, 35, .35);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  transition: background .2s, color .2s;
}
html[lang="ar"] body { font-family: 'Cairo', 'Inter', -apple-system, 'Segoe UI', Tahoma, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 20px; font-weight: 800; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px;
}
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.nav-group { margin-top: 10px; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 600; font-size: 14px; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .nav-link.active { box-shadow: inset -3px 0 0 var(--accent); }
.nav-link svg { width: 19px; height: 19px; }
.nav-link .soon { margin-inline-start: auto; font-size: 10px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-2); border-radius: 20px; padding: 0 7px; }
.nav-link.disabled { opacity: .55; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .spacer { flex: 1; }
.content { padding: 28px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h2 { font-size: 24px; font-weight: 800; line-height: 1.3; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: transform .1s, background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.96); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-2); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); text-decoration: none; }
.icon-btn svg { width: 19px; height: 19px; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 16px; font-weight: 800; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-main { grid-template-columns: 2fr 1fr; }

.stat { display: flex; flex-direction: column; gap: 10px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
[data-theme="light"] .stat-ico { color: var(--link); }
.stat-ico svg { width: 19px; height: 19px; }
.stat-value { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 12.5px; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: start; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }
.cell-user { display: flex; align-items: center; gap: 12px; }
.cell-user b { display: block; font-weight: 700; color: var(--text); }
.cell-user span { color: var(--muted); font-size: 13px; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; text-transform: uppercase; flex-shrink: 0;
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--text); }

/* ---------- Toolbar / forms ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.search:focus-within { border-color: var(--accent-line); }
.search svg { width: 18px; height: 18px; color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; }
.select, .input, .textarea {
  height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; outline: none; width: 100%;
}
.select { width: auto; cursor: pointer; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
.select:focus, .input:focus, .textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .error { font-size: 12.5px; color: var(--bad); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.check input { width: 18px; height: 18px; accent-color: #7fad39; }

.seg { display: inline-flex; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; gap: 4px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--accent-line); }
.seg svg { width: 16px; height: 16px; }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.pager .btns { display: flex; gap: 8px; }

/* ---------- Empty / soon ---------- */
.empty { text-align: center; padding: 56px 20px; }
.empty-ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
[data-theme="light"] .empty-ico { color: var(--link); }
.empty-ico svg { width: 30px; height: 30px; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--surface-3);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; animation: vfIn .25s ease;
}
.toast.success { border-color: var(--accent-line); }
.toast.error { border-color: var(--bad); }
@keyframes vfIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Detail lists ---------- */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 12px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { color: var(--text); word-break: break-word; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 400px at 85% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); }
.auth-card .brand { padding: 0 0 22px; }
.auth-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-tools { position: fixed; top: 16px; inset-inline-end: 16px; display: flex; gap: 8px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- User dashboard ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid var(--line); border-radius: 22px; padding: 26px; position: relative; overflow: hidden; }
.hello::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: var(--accent-soft); inset-inline-end: -80px; top: -120px; }
.hello > * { position: relative; z-index: 1; }
.hello h2 { font-size: 24px; font-weight: 800; }
.hello p { color: var(--text-2); margin-top: 4px; }
.tool {
  display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); color: var(--text); position: relative; transition: transform .15s, border-color .15s;
}
.tool:hover { transform: translateY(-3px); border-color: var(--accent-line); text-decoration: none; }
.tool-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
[data-theme="light"] .tool-ico { color: var(--link); }
.tool-ico svg { width: 24px; height: 24px; }
.tool h3 { font-size: 16px; font-weight: 800; }
.tool p { color: var(--muted); font-size: 13.5px; }
.tool .badge { position: absolute; top: 18px; inset-inline-end: 18px; }

.bottom-nav { display: none; }

/* ---------- Responsive ---------- */
.menu-toggle { display: none; }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 60; transform: translateX(-105%);
    transition: transform .25s ease; box-shadow: var(--shadow);
  }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: var(--overlay); z-index: 50; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-value { font-size: 24px; }
  .card { padding: 18px; border-radius: 16px; }
  .page-head h2 { font-size: 20px; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .kv dd { margin-bottom: 10px; }
  .hide-sm { display: none; }
  .dash .content { padding-bottom: 110px; }
  .dash .bottom-nav {
    display: flex; position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    height: 66px; align-items: flex-end; justify-content: space-around; padding: 0 4px 8px; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  }
  .bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
  .bn-item:hover { text-decoration: none; }
  .bn-item svg { width: 22px; height: 22px; }
  .bn-item.active { color: var(--text); }
  .bn-center { position: relative; top: -14px; color: var(--text); }
  .bn-fab { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 4px solid var(--surface);
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
}

/* ---------- Usage bars ---------- */
.usage { margin-bottom: 14px; }
.usage-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.usage-top span { color: var(--text-2); font-weight: 600; }
.usage-bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.usage-bar span { display: block; height: 100%; border-radius: 8px; background: var(--accent); }
[data-theme="light"] .usage-bar span { background: #7fad39; }
.plan-mine-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.plan-mine-top b { display: block; font-size: 16px; }
.plan-mine-top span { color: var(--muted); font-size: 13px; }

/* ---------- Plan cards (admin) ---------- */
.plan-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); transition: transform .15s, border-color .15s; }
.plan-card:hover { transform: translateY(-3px); border-color: var(--accent-line); text-decoration: none; }
.plan-card.featured { border-color: var(--accent-line); box-shadow: inset 0 3px 0 var(--accent); }
.plan-top { display: flex; justify-content: space-between; align-items: center; }
.plan-code { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.plan-card h3 { font-size: 19px; font-weight: 800; margin-top: 6px; }
.plan-ar { color: var(--muted); font-size: 14px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.plan-price b { font-size: 24px; font-weight: 800; }
.plan-price s { color: var(--muted); font-size: 14px; }
.plan-price span { color: var(--muted); font-size: 13px; }
.plan-q { list-style: none; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.plan-q li { display: flex; justify-content: space-between; gap: 10px; }
.plan-q li span { color: var(--text-2); }
.plan-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.plan-foot span:last-child { color: var(--link); font-weight: 700; }
.input.filled, .textarea.filled { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Sign-in ---------- */
.google-btn { height: 48px; gap: 10px; }
.google-btn svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.fine { color: var(--muted); font-size: 12.5px; margin-top: 16px; text-align: center; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.otp { display: flex; gap: 8px; justify-content: center; margin: 6px 0 20px; }
.otp-box {
  flex: 1 1 0; min-width: 0; max-width: 52px; width: 100%; height: 56px; text-align: center; font-size: 24px; font-weight: 800; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); outline: none; font-variant-numeric: tabular-nums;
}
.otp-box:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.otp-links { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; }
.link-btn { background: none; border: 0; color: var(--link); font-weight: 700; cursor: pointer; padding: 0; }
.link-btn:disabled { color: var(--muted); cursor: default; }
@media (max-width: 480px) { .auth-card { padding: 26px 20px; border-radius: 18px; } .auth-wrap { padding: 72px 14px 24px; } }
@media (max-width: 380px) { .otp-box { height: 50px; font-size: 21px; } .otp { gap: 6px; } }

/* ---------- AI coach chat (inside the shared site header) ---------- */
.chat-page { overflow: hidden; }
.chat-app { display: flex; height: 100vh; height: 100dvh; padding-top: 84px; }
.chat-side { width: 270px; flex-shrink: 0; display: flex; flex-direction: column; padding: 16px 12px; margin: 0 0 16px; margin-inline-start: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow-y: auto; }
.chat-list { display: flex; flex-direction: column; gap: 2px; }
.chat-item { display: flex; align-items: center; border-radius: 10px; }
.chat-item a { flex: 1; min-width: 0; padding: 9px 10px; color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item a:hover { text-decoration: none; color: var(--text); }
.chat-item:hover, .chat-item.active { background: var(--surface-2); }
.chat-item.active a { color: var(--text); font-weight: 700; }
.chat-del { opacity: 0; border: 0; background: none; color: var(--muted); font-size: 18px; width: 30px; height: 30px; cursor: pointer; border-radius: 8px; }
.chat-item:hover .chat-del, .chat-item.active .chat-del { opacity: 1; }
.chat-del:hover { color: var(--bad); background: var(--bad-soft); }
.chat-empty { color: var(--muted); font-size: 13px; padding: 8px 10px; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-top { max-width: 780px; width: 100%; margin: 0 auto; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 4px 18px 10px; }
.chat-top .spacer { flex: 1; }
.chat-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.chat-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .18); }
.chat-side-toggle { display: none; }
.chat-count { font-size: 12.5px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); padding: 5px 11px; border-radius: 20px; white-space: nowrap; }
.chat-count.low { color: var(--warn); border-color: var(--warn-soft); background: var(--warn-soft); }
.chat-new-top svg { width: 16px; height: 16px; }
.chat-scroll { flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.chat-inner { max-width: 780px; margin: 0 auto; padding: 0 18px; }
.chat-welcome { text-align: center; padding: 6vh 0 24px; }
.welcome-mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px var(--accent-soft); }
.welcome-mark svg { width: 32px; height: 32px; }
.chat-welcome h1 { font-size: 26px; font-weight: 800; line-height: 1.35; }
.chat-welcome > p { color: var(--muted); margin-top: 6px; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; text-align: start; }
.chip-q { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; text-align: start; line-height: 1.5; transition: border-color .15s, color .15s; }
.chip-q:hover { border-color: var(--accent-line); color: var(--text); }
.chip-q:disabled { opacity: .5; cursor: default; }
.msgs { display: flex; flex-direction: column; gap: 18px; padding: 14px 0 10px; }
.msg { display: flex; flex-direction: column; }
.msg.user { align-items: flex-end; }
.msg .bubble { max-width: 100%; line-height: 1.85; font-size: 15.5px; overflow-wrap: anywhere; }
.msg.user .bubble { max-width: 85%; background: var(--accent); color: var(--accent-ink); padding: 11px 16px; border-radius: 18px; border-end-end-radius: 6px; white-space: pre-wrap; font-weight: 500; }
.msg.assistant .bubble { color: var(--text); }
.msg.assistant .bubble p { margin: 0 0 10px; }
.msg.assistant .bubble h4 { font-size: 16px; margin: 14px 0 6px; }
.msg.assistant .bubble ul, .msg.assistant .bubble ol { margin: 4px 0 12px; padding-inline-start: 22px; }
.msg.assistant .bubble li { margin: 4px 0; }
.msg.assistant .bubble li::marker { color: var(--link); }
.msg.assistant .bubble code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.msg.error .bubble { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 12px; }
.msg-tools { margin-top: 2px; }
.msg-tools button { background: none; border: 0; color: var(--muted); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 4px 0; }
.msg-tools button:hover { color: var(--text); }
.dots { display: inline-flex; gap: 5px; padding: 10px 0; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: vfDot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes vfDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.chat-bottom { flex-shrink: 0; padding: 8px 0 14px; }
.composer { display: flex; align-items: flex-end; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); }
[dir="rtl"] .composer { padding: 8px 16px 8px 8px; }
.composer:focus-within { border-color: var(--accent-line); }
.composer textarea { flex: 1; border: 0; outline: none; background: transparent; resize: none; min-height: 26px; max-height: 180px; padding: 8px 0; line-height: 1.6; font-size: 16px; }
.composer .send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.composer .send svg { width: 20px; height: 20px; }
.composer.busy .send { opacity: .5; cursor: wait; }
.chat-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 8px; }
.limit-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--accent-line); box-shadow: var(--shadow); }
.limit-card b { font-size: 16px; }
.limit-card p { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.limit-card .wait { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 1024px) { .chat-app { padding-top: 78px; } }
@media (max-width: 900px) {
  .chat-side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 2500; width: 280px; margin: 0; border-radius: 0; transform: translateX(-105%); transition: transform .25s; box-shadow: var(--shadow); }
  [dir="rtl"] .chat-side { transform: translateX(105%); }
  body.side-open .chat-side { transform: none; }
  body.side-open::after { content: ''; position: fixed; inset: 0; background: var(--overlay); z-index: 2400; }
  .chat-side-toggle { display: inline-flex; width: 36px; height: 36px; }
}
@media (max-width: 768px) {
  .chat-app { padding-top: 74px; padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
  .chat-top { padding: 2px 12px 8px; }
  .chat-new-top span { display: none; }
  .chat-inner { padding: 0 12px; }
  .chat-welcome { padding-top: 3vh; }
  .chat-welcome h1 { font-size: 21px; }
  .chips { grid-template-columns: 1fr; }
  .chip-q { padding: 12px 14px; }
  .msg .bubble { font-size: 15px; }
  .chat-note { display: none; }
  .chat-bottom { padding: 6px 0 8px; }
}
.defaults { margin: -6px 0 18px; }
.defaults summary { cursor: pointer; color: var(--link); font-size: 13px; font-weight: 700; }
.defaults pre { white-space: pre-wrap; font: inherit; font-size: 13px; color: var(--text-2); background: var(--surface-2); padding: 12px; border-radius: 12px; margin-top: 8px; line-height: 1.8; }
.log { display: flex; flex-direction: column; gap: 14px; }
.log-msg { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.log-msg.user { background: var(--accent-soft); }
.log-meta { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.log-text { line-height: 1.8; font-size: 14.5px; }
.site-auth { padding-top: 110px; }
@media (max-width: 768px) { .site-auth { padding: 92px 14px 110px; align-items: start; } }

/* ---------- AI tools ---------- */
.tool-big { gap: 16px; }
.tool-big .badge { position: absolute; top: 18px; inset-inline-end: 18px; }
.wizard-head, .res-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.wizard-head h2, .res-title h2 { font-size: 22px; font-weight: 800; line-height: 1.35; }
.wizard-head p, .res-title p { color: var(--muted); font-size: 14px; }
.wizard-head > div, .res-title { flex: 1; min-width: 200px; }
.res-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wizard { max-width: 760px; }
.wz-progress { margin-bottom: 20px; }
.wz-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.wz-bar { height: 6px; background: var(--surface-3); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.wz-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .3s; }
[data-theme="light"] .wz-bar span { background: #7fad39; }
.wz-title { font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.wz-field { margin-bottom: 20px; }
.wz-label-f { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.opt-grid.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; font-size: 14px; color: var(--text-2); transition: all .15s; line-height: 1.4; }
.opt:hover span { border-color: var(--accent-line); }
.opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.opt input:focus-visible + span { outline: 2px solid var(--accent-line); outline-offset: 2px; }
.opt.multi input:checked + span::before { content: '✓'; margin-inline-end: 6px; font-weight: 900; }
.num-wrap { display: flex; align-items: center; gap: 10px; max-width: 260px; }
.num-wrap .unit { color: var(--muted); font-weight: 700; font-size: 14px; }
.wz-field.has-error .opt span, .wz-field.has-error .input { border-color: var(--bad); }
.wz-err { display: block; margin-top: 6px; min-height: 0; }
.wz-nav { display: flex; gap: 10px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.btn.loading { opacity: .7; pointer-events: none; }

.making { text-align: center; padding: 48px 20px; }
.making h3 { font-size: 19px; margin: 18px 0 6px; }
.making p { color: var(--muted); max-width: 440px; margin: 0 auto; }
.making .queue { margin-top: 10px; color: var(--text-2); }
.spinner { display: inline-flex; gap: 8px; }
.spinner span { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: vfDot 1.1s infinite ease-in-out; }
.spinner span:nth-child(2) { animation-delay: .15s; } .spinner span:nth-child(3) { animation-delay: .3s; }

.res-sum { margin-bottom: 18px; line-height: 1.9; color: var(--text-2); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.res-block { margin-bottom: 18px; }
.res-block h3 { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.res-block p { color: var(--text-2); line-height: 1.9; }
.res-ul, .res-ol { padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); line-height: 1.8; }
.res-ul.warn li { color: var(--warn); }
.res-note { color: var(--muted); font-size: 13px; text-align: center; margin: 20px 0; }
.answers { margin-top: 18px; }
.answers summary { cursor: pointer; font-weight: 800; }
.session { margin-bottom: 18px; }
.session-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.session-head > div { flex: 1; min-width: 180px; }
.session-head h3 { font-size: 17px; font-weight: 800; }
.session-head p { color: var(--muted); font-size: 13.5px; }
.session-n { width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.ex-list { list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: ex; }
.ex { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); counter-increment: ex; }
.ex-top b { font-size: 15.5px; }
.ex-top b::before { content: counter(ex) ". "; color: var(--muted); }
.ex-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ex-chips span { display: inline-flex; flex-direction: column; padding: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 14px; }
.ex-chips small { font-weight: 600; font-size: 11px; color: var(--muted); }
.ex-notes { margin-top: 10px; }
.ex-notes summary { cursor: pointer; color: var(--link); font-weight: 700; font-size: 13.5px; }
.ex-notes p { color: var(--text-2); font-size: 14px; line-height: 1.9; margin-top: 8px; }
.macro-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.macro { display: flex; flex-direction: column; gap: 2px; padding: 16px; }
.macro small { color: var(--muted); font-weight: 700; }
.macro b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.macro span { color: var(--muted); font-size: 13px; }
.macro.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.macro.main small, .macro.main span { color: var(--accent-ink); opacity: .75; }
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.day-tab { flex-shrink: 0; padding: 9px 16px; border-radius: 30px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-weight: 700; cursor: pointer; }
.day-tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.day-head h3 { font-size: 17px; font-weight: 800; }
.meal-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.meal-head span { color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
.meal-items { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.meal-items li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.meal-items .amt { color: var(--text); font-weight: 700; text-align: end; }
.meal-macros { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.meal-macros b { color: var(--text); }
.shop { columns: 2; column-gap: 24px; padding-inline-start: 18px; color: var(--text-2); line-height: 2; }
.supp-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.supp-head h3 { font-size: 17px; font-weight: 800; }
.supp-en { color: var(--muted); font-size: 13px; }
.supp-why { color: var(--text-2); line-height: 1.85; margin-bottom: 12px; font-size: 14px; }
.supp-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; padding: 12px; background: var(--surface-2); border-radius: 12px; margin-bottom: 12px; font-size: 14px; }
.supp-dl dt { color: var(--muted); font-weight: 700; }
.supp h4 { font-size: 13.5px; margin: 10px 0 6px; }
.supp h4.warn-h { color: var(--warn); }
.supp-alt { color: var(--text-2); font-size: 14px; }
.prog-list { display: flex; flex-direction: column; gap: 10px; }
.prog-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.prog-row:hover { border-color: var(--accent-line); text-decoration: none; }
.prog-txt { flex: 1; min-width: 0; }
.prog-txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-txt span { color: var(--muted); font-size: 13px; }
@media (max-width: 640px) {
  .macro-row { grid-template-columns: 1fr 1fr; }
  .macro b { font-size: 22px; }
  .shop { columns: 1; }
  .opt-grid { grid-template-columns: repeat(2, 1fr); }
  .opt-grid.wide { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
  .card, .ex, .macro { break-inside: avoid; box-shadow: none; }
  section.day[hidden] { display: block !important; }
  .content { padding: 0; max-width: none; }
}
@media (max-width: 640px) { .topbar h1 { font-size: 16px; } }

/* ---------- Public pages: pricing, checkout ---------- */
.pub-main { max-width: 1180px; margin: 0 auto; padding: 116px 20px 80px; }
.pub-main.narrow { max-width: 920px; }
.pub-h1 { font-size: 28px; font-weight: 800; margin: 8px 0 22px; }
.pr-hero { text-align: center; max-width: 720px; margin: 0 auto 38px; }
.pr-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-weight: 700; font-size: 13px; border: 1px solid var(--accent-line); }
.pr-kicker svg { width: 16px; height: 16px; color: var(--accent); }
[data-theme="light"] .pr-kicker svg { color: var(--link); }
.pr-hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; line-height: 1.25; margin: 16px 0 12px; }
.pr-hero p { color: var(--text-2); font-size: 17px; line-height: 1.8; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: stretch; }
.pr-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px 22px; box-shadow: var(--shadow); }
.pr-card.featured { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), var(--shadow); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 42%); }
.pr-card.mine { border-color: var(--ok); }
.pr-badge { position: absolute; top: -12px; inset-inline-start: 22px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; }
.pr-card h3 { font-size: 20px; font-weight: 800; }
.pr-tag { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.6; min-height: 22px; }
.pr-price { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.pr-price b { font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pr-price s { color: var(--muted); font-size: 16px; }
.pr-period { color: var(--muted); font-size: 13.5px; margin-top: 8px; }
.pr-feats { list-style: none; margin: 20px 0 22px; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 11px; flex: 1; }
.pr-feats li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.pr-feats svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ok); }
.pr-cta { margin-top: auto; }
.pr-cta[aria-disabled] { pointer-events: none; opacity: .7; }
.pr-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 18px; }
.pr-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 46px 0; }
.pr-trust > div { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.pr-trust svg { grid-row: span 2; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
[data-theme="light"] .pr-trust svg, [data-theme="light"] .pr-feats svg { color: var(--link); }
.pr-trust span { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.pr-faq { max-width: 780px; margin: 0 auto; }
.pr-faq h2 { font-size: 24px; font-weight: 800; margin-bottom: 16px; text-align: center; }
.pr-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 10px; }
.pr-faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.pr-faq summary::after { content: '+'; color: var(--muted); font-size: 20px; line-height: 1; }
.pr-faq details[open] summary::after { content: '−'; }
.pr-faq details p { color: var(--text-2); margin-top: 10px; line-height: 1.8; font-size: 14.5px; }
.pr-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.pr-back svg { width: 16px; height: 16px; }
[dir="rtl"] .pr-back svg { transform: scaleX(-1); }
.pr-grid.in-dash { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.pr-grid.in-dash .pr-card { box-shadow: none; }

.co-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.co-pay h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.co-opt { display: block; margin-bottom: 10px; cursor: pointer; position: relative; }
.co-opt input { position: absolute; opacity: 0; }
.co-opt-box { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); transition: border-color .15s; }
.co-opt input:checked + .co-opt-box { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.co-opt input:focus-visible + .co-opt-box { outline: 2px solid var(--accent-line); }
.co-logos { grid-column: 1 / -1; display: flex; gap: 6px; margin-bottom: 6px; }
.co-logos .pm { font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 4px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); direction: ltr; }
.co-opt-box small { color: var(--muted); font-size: 13px; grid-column: 1; }
.co-opt-box .badge { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
.co-total { display: flex; justify-content: space-between; align-items: center; padding: 16px 2px; margin: 8px 0 12px; border-top: 1px solid var(--line); font-weight: 700; }
.co-total b { font-size: 22px; }
.co-fine { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 12px; line-height: 1.6; }
.done-card { text-align: center; padding: 44px 24px; }
.done-card h1 { font-size: 26px; font-weight: 800; margin: 18px 0 10px; }
.done-card p { color: var(--text-2); line-height: 1.8; }
.done-ico { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.done-ico svg { width: 34px; height: 34px; }
.done-ico.ok { background: var(--ok-soft); color: var(--ok); }
.done-ico.wait { background: var(--warn-soft); color: var(--warn); }
.done-ico.bad { background: var(--bad-soft); color: var(--bad); }
.done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 24px 0 8px; }

/* ---------- Dashboard: plans ---------- */
.pay-list { padding: 6px 18px; }
.pay-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pay-row:last-child { border-bottom: 0; }
.pay-row b { display: block; }
.pay-row small { color: var(--muted); font-size: 12.5px; }
.muted-p { color: var(--muted); padding: 16px 0; text-align: center; }

/* ---------- Dashboard: progress ---------- */
.pg-grid { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 18px; align-items: start; }
.pg-form h3 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.pg-form small { color: var(--muted); font-weight: 600; }
.pg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pg-more { margin-bottom: 8px; }
.pg-more summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; }
.pg-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pg-stats .stat { gap: 6px; padding: 16px; }
.pg-stats .stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.pg-stats .stat b { font-size: 22px; font-weight: 800; }
.pg-chart .card-head { margin-bottom: 8px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-y, .ch-x { fill: var(--muted); font-size: 13px; font-family: Inter, system-ui, sans-serif; }
.ch-y { text-anchor: end; }
.ch-x:first-of-type { text-anchor: start; }
.ch-x { text-anchor: middle; }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
[data-theme="light"] .ch-line { stroke: #7fad39; }
.ch-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
[data-theme="light"] .ch-dot { stroke: #7fad39; }
.chg { font-weight: 800; }
.pg-cmp td.ltr { white-space: nowrap; }
.pr-cur { font-size: 15px; font-weight: 700; color: var(--muted); margin-inline-start: 6px; }
.pg-note { display: block; color: var(--muted); font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-set { border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px 2px; margin: 0 0 14px; }
.gw-set legend { padding: 0 6px; font-weight: 800; font-size: 13px; color: var(--text-2); }
.check.sm { font-size: 12.5px; font-weight: 600; margin: 4px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .co-grid, .pg-grid { grid-template-columns: 1fr; }
  .pr-trust { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pub-main { padding: 92px 14px 120px; }
  .pg-stats .stat b { font-size: 18px; }
  .ch-y, .ch-x { font-size: 21px; }
  .ch-line { stroke-width: 4.5; }
  .pay-row { grid-template-columns: 1fr auto; }
  .pay-row .badge { grid-column: 2; }
}

/* ---------- AI tool landing pages ---------- */
.lp main { overflow: hidden; }
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.lp-hero { position: relative; padding: 128px 0 70px; }
.lp-glow { position: absolute; inset: -20% -10% auto; height: 620px; pointer-events: none;
  background: radial-gradient(600px 320px at 70% 30%, var(--accent-soft), transparent 70%), radial-gradient(500px 300px at 15% 60%, rgba(96,165,250,.10), transparent 70%); }
.lp-hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.lp-hero.center .lp-copy { text-align: center; max-width: 760px; position: relative; }
.lp-hero.center .lp-ctas, .lp-hero.center .lp-note { justify-content: center; }
.lp-copy h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; line-height: 1.2; margin: 18px 0 16px; letter-spacing: -.01em; }
.lp-sub { font-size: 17.5px; line-height: 1.85; color: var(--text-2); max-width: 600px; }
.lp-hero.center .lp-sub { margin: 0 auto; }
.lp-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.lp-btn { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.lp-arrow { width: 18px; height: 18px; }
[dir="ltr"] .lp-arrow { transform: scaleX(-1); }
.lp-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13.5px; }
.lp-note svg { width: 16px; height: 16px; color: var(--ok); }

.lp-demo { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35), 0 0 0 1px var(--accent-line); overflow: hidden; transform: rotate(-1.2deg); transition: transform .4s; }
[dir="ltr"] .lp-demo { transform: rotate(1.2deg); }
.lp-demo:hover { transform: none; }
[data-theme="light"] .lp-demo { box-shadow: 0 30px 70px rgba(17,24,35,.14), 0 0 0 1px var(--accent-line); }
.lp-demo-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.lp-demo-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.lp-demo-bar b { margin-inline-start: auto; font-size: 12px; color: var(--muted); font-weight: 700; }
.lp-demo-body { padding: 22px; }
.lp-demo-body h3 { font-size: 18px; font-weight: 800; }
.lp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 16px; }
.lp-chips span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.lp-tbl { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lp-tr { display: grid; grid-template-columns: 1.6fr 1fr .6fr; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: center; }
.lp-tr:last-child { border-bottom: 0; }
.lp-th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.lp-tr i { font-style: normal; display: inline-flex; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; align-items: center; justify-content: center; margin-inline-end: 8px; }
.lp-tip { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 11px 13px; border-radius: 12px; background: var(--ok-soft); color: var(--text); font-size: 13.5px; line-height: 1.6; }
.lp-tip svg { width: 17px; height: 17px; color: var(--ok); margin-top: 2px; }
.lp-tip.warn { background: var(--warn-soft); }
.lp-tip.warn svg { color: var(--warn); }
.lp-kcal { display: flex; align-items: center; gap: 20px; margin: 16px 0; }
.lp-ring { --p1: 33; --p2: 33; width: 118px; height: 118px; flex: none; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
  background: conic-gradient(var(--accent) 0 calc(var(--p1) * 1%), var(--info) 0 calc((var(--p1) + var(--p2)) * 1%), var(--warn) 0); }
.lp-ring::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.lp-ring b, .lp-ring small { position: relative; }
.lp-ring b { font-size: 22px; font-weight: 800; line-height: 1; }
.lp-ring small { color: var(--muted); font-size: 12px; }
.lp-kcal ul { list-style: none; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.lp-kcal li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.lp-kcal li b { margin-inline-start: auto; }
.lp-kcal li i { width: 10px; height: 10px; border-radius: 3px; }
.lp-kcal .m1 { background: var(--accent); } .lp-kcal .m2 { background: var(--info); } .lp-kcal .m3 { background: var(--warn); }
.lp-meals { display: flex; flex-direction: column; gap: 8px; }
.lp-meals div { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.lp-meals b { color: var(--muted); font-size: 12.5px; }
.lp-supps { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.lp-supp { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.lp-supp b { display: block; font-size: 14.5px; }
.lp-supp small { color: var(--muted); font-size: 12.5px; }
.lp-supp-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.lp-supp-ico svg { width: 19px; height: 19px; }

.lp-sec { padding-top: 64px; }
.lp-sec > h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; text-align: center; margin-bottom: 26px; }
.lp-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.lp-steps li { position: relative; padding: 24px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.lp-num { display: inline-flex; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 17px; align-items: center; justify-content: center; margin-bottom: 14px; }
.lp-steps b { display: block; font-size: 17px; margin-bottom: 6px; }
.lp-steps p, .lp-feat p, .lp-card p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.lp-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-feat { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.lp-feat:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.lp-ico { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; flex: none; }
[data-theme="light"] .lp-ico, [data-theme="light"] .lp-supp-ico { color: var(--link); }
.lp-ico svg { width: 22px; height: 22px; }
.lp-feat b, .lp-card b { display: block; font-size: 16px; margin-bottom: 6px; }
.lp-free { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 18px 22px; border-radius: 20px; border: 1px dashed var(--accent-line); background: var(--accent-soft); }
.lp-free .lp-ico { margin: 0; }
.lp-free div { flex: 1; }
.lp-free b { display: block; }
.lp-free span { color: var(--text-2); font-size: 14px; }
.lp-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.lp-card { display: flex; flex-direction: column; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: border-color .2s, transform .2s; }
.lp-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.lp-go { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--link); }
.lp-go .lp-arrow { width: 15px; height: 15px; }
.lp-more.big .lp-card { padding: 28px 24px; }
.lp-final { text-align: center; padding: 46px 24px; border-radius: 26px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 60%); border: 1px solid var(--accent-line); }
.lp-final h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
.lp-final p { color: var(--text-2); margin-top: 8px; }
.lp-final .lp-ctas, .lp-final .lp-note { justify-content: center; }
.lp-safety { text-align: center; color: var(--muted); font-size: 12.5px; margin: 26px auto 70px; max-width: 640px; line-height: 1.7; }
@media (max-width: 960px) {
  .lp-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .lp-demo, [dir="ltr"] .lp-demo { transform: none; }
  .lp-feats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .lp-hero { padding: 100px 0 36px; }
  .lp-wrap { padding: 0 14px; }
  .lp-sub { font-size: 16px; }
  .lp-btn { flex: 1; justify-content: center; }
  .lp-steps, .lp-feats { grid-template-columns: 1fr; }
  .lp-free { flex-direction: column; align-items: stretch; text-align: center; }
  .lp-free .lp-ico { margin: 0 auto; }
  .lp-tr { grid-template-columns: 1.5fr 1fr .7fr; font-size: 13px; padding: 10px; }
  .lp-sec { padding-top: 48px; }
  .lp-safety { margin-bottom: 120px; }
}

/* ---------- Free tools ---------- */
.tl-hero { position: relative; padding: 118px 0 26px; }
.tl-crumbs { position: relative; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.tl-crumbs a { color: var(--muted); }
.tl-crumbs [aria-current] { color: var(--text-2); font-weight: 600; }
.tl-hero-row { position: relative; display: flex; gap: 18px; align-items: flex-start; }
.tl-hero-ico { width: 64px; height: 64px; flex: none; border-radius: 20px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px var(--accent-soft); }
.tl-hero-ico svg { width: 32px; height: 32px; }
.tl-hero h1 { font-size: clamp(26px, 3.8vw, 40px); font-weight: 800; line-height: 1.25; }
.tl-hero .lp-sub { margin-top: 8px; font-size: 16.5px; }
.tl-free { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--ok); }
.tl-free svg { width: 15px; height: 15px; }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.tl-grid .field.wide { grid-column: 1 / -1; }
.tl-grid .field label small { color: var(--muted); font-weight: 600; }
.input.bad { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft); }
.tl-seg { display: flex; width: 100%; }
.tl-seg label { flex: 1; }
.tl-seg span { justify-content: center; }
.tl-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.tl-methods.two { grid-template-columns: repeat(2, 1fr); }
.tl-methods.four { grid-template-columns: repeat(4, 1fr); margin-bottom: 0; }
.tl-methods label { position: relative; cursor: pointer; }
.tl-methods input { position: absolute; opacity: 0; }
.tl-methods span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); transition: border-color .15s, box-shadow .15s; }
.tl-methods b { font-size: 14.5px; }
.tl-methods small { color: var(--muted); font-size: 12.5px; }
.tl-methods input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-methods input:focus-visible + span { outline: 2px solid var(--accent-line); }
.tl-tip { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.7; margin: 2px 0 14px; }
.tl-tip svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.tl-err { color: var(--bad); background: var(--bad-soft); padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; }
.tl-actions { display: flex; gap: 10px; }
.tl-actions .btn { min-width: 200px; justify-content: center; }
.tl-actions.split { justify-content: space-between; }
[hidden] { display: none !important; }

.tl-res { margin-top: 20px; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s; }
.tl-res.in { opacity: 1; transform: none; }
.tl-res-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; align-items: start; }
.tl-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; }
.tl-panel.center { text-align: center; border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 55%); }
.tl-gauge { position: relative; max-width: 300px; margin: 0 auto; }
.tl-gauge svg { width: 100%; height: auto; display: block; }
.tl-needle { transform-origin: 130px 128px; animation: tlNeedle .9s cubic-bezier(.3,1.4,.5,1); }
@keyframes tlNeedle { from { transform: rotate(-90deg); } }
.tl-gauge-val { margin-top: -6px; }
.tl-gauge-val b { display: block; font-size: 42px; font-weight: 800; line-height: 1.1; }
.tl-gauge-val span { color: var(--muted); font-size: 13px; font-weight: 600; }
.tl-pill { display: inline-block; margin-top: 12px; padding: 6px 16px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--text); background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); }
.tl-note { color: var(--text-2); font-size: 14px; margin-top: 10px; line-height: 1.7; }
.tl-kicker { display: block; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.tl-big { font-size: 52px; font-weight: 800; line-height: 1.1; margin-top: 6px; letter-spacing: -.02em; }
.tl-big small { font-size: 18px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.tl-h3 { font-size: 15px; font-weight: 800; margin: 20px 0 12px; text-align: start; }
.tl-panel > .tl-h3:first-child { margin-top: 0; }
.tl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tl-stat { background: var(--surface-2); border-radius: 14px; padding: 12px; }
.tl-stat span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.tl-stat b { font-size: 19px; font-weight: 800; }
.tl-stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 18px 0 10px; background: var(--surface-2); }
.tl-stack i { display: block; height: 100%; transition: width .8s; }
.tl-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); justify-content: center; }
.tl-panel:not(.center) .tl-legend { justify-content: flex-start; }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i, .tl-cats i, .tl-mac-list i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.tl-cats { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.tl-cats div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; border: 1px solid transparent; }
.tl-cats div b { margin-inline-start: auto; color: var(--muted); font-weight: 700; }
.tl-cats div.on { background: var(--accent-soft); border-color: var(--accent-line); font-weight: 800; }
.tl-cats div.on b { color: var(--text); }
.tl-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; text-align: start; }
.tl-bar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.tl-bar-l { color: var(--text-2); }
.tl-bar.on .tl-bar-l, .tl-bar.on b { color: var(--text); font-weight: 800; }
.tl-bar-t { display: block; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.tl-bar-t i { display: block; height: 100%; border-radius: 999px; background: var(--accent); animation: tlGrow .8s ease-out; }
[dir="rtl"] .tl-bar-t i { margin-inline-start: 0; }
@keyframes tlGrow { from { width: 0; } }
.tl-bar b { font-size: 13.5px; white-space: nowrap; }
.tl-warn { display: flex; gap: 8px; text-align: start; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); font-size: 13px; line-height: 1.6; }
.tl-warn svg { width: 16px; height: 16px; flex: none; color: var(--warn); margin-top: 2px; }
.tl-donut { width: 170px; height: 170px; border-radius: 50%; margin: 0 auto; position: relative; flex: none; animation: tlSpin .9s ease-out; }
@keyframes tlSpin { from { transform: rotate(-90deg) scale(.85); opacity: .3; } }
.tl-donut > div { position: absolute; inset: 20px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tl-donut b { font-size: 28px; font-weight: 800; line-height: 1; }
.tl-donut small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.tl-mac { display: flex; align-items: center; gap: 22px; }
.tl-mac .tl-donut { width: 140px; height: 140px; }
.tl-mac .tl-donut > div { inset: 16px; }
.tl-mac .tl-donut b { font-size: 22px; }
.tl-mac-list { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.tl-mac-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tl-mac-list b { margin-inline-start: auto; }
.tl-mcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; text-align: start; }
.tl-mcard { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 16px; }
.tl-mcard span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tl-mcard b { display: block; font-size: 22px; font-weight: 800; }
.tl-mcard small { font-size: 11.5px; color: var(--muted); }
.tl-mcard i { position: absolute; bottom: 0; inset-inline-start: 0; height: 4px; background: var(--c); }
.tl-meals { display: flex; flex-direction: column; gap: 10px; }
.tl-meals > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); align-items: center; }
.tl-meal-n { font-weight: 700; font-size: 14px; }
.tl-meal-b { grid-column: 1 / -1; grid-row: 2; display: block; height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.tl-meal-b i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.tl-meals small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.tl-tbl-wrap { overflow-x: auto; }
.tl-pct { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tl-pct td { padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tl-pct td:nth-child(2) { width: 30%; min-width: 70px; }
.tl-pct tr:first-child { background: var(--accent-soft); }
.tl-pct tr.z0 .tl-bar-t i { background: var(--bad); } .tl-pct tr.z1 .tl-bar-t i { background: var(--warn); }
.tl-pct tr.z2 .tl-bar-t i, .tl-pct tr.z3 .tl-bar-t i { background: var(--accent); } .tl-pct tr.z4 .tl-bar-t i { background: var(--info); }
.tl-glasses { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; color: var(--info); }
.tl-glass { width: 26px; height: 34px; }
.tl-glass .w { fill: var(--info); opacity: .55; animation: tlFill .8s ease-out backwards; }
.tl-glasses .tl-glass:nth-child(n) .w { animation-delay: calc(var(--d, 0) * 1s); }
@keyframes tlFill { from { opacity: 0; } }
.tl-glasses span { font-weight: 800; color: var(--text-2); }
.tl-sched { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 8px; }
.tl-sched li { counter-increment: s; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.tl-sched li::before { content: counter(s); width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--info-soft); color: var(--info); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.tl-sched b { margin-inline-start: auto; font-size: 13px; }
.tl-steps { margin-bottom: 22px; }
.tl-steps-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.tl-steps-bar i { display: block; height: 100%; background: var(--accent); transition: width .35s; }
.tl-steps ol { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.tl-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tl-steps li span { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.tl-steps li.on { color: var(--text); }
.tl-steps li.on span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tl-step-p { color: var(--text-2); margin-bottom: 16px; }
.tl-big-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tl-big-choice label { position: relative; cursor: pointer; }
.tl-big-choice input { position: absolute; opacity: 0; }
.tl-big-choice span { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 12px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface-2); font-weight: 800; font-size: 17px; transition: .15s; }
.tl-big-choice svg { width: 34px; height: 34px; color: var(--accent); }
[data-theme="light"] .tl-big-choice svg { color: var(--link); }
.tl-big-choice input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-q { border: 0; margin: 0 0 18px; padding: 0; }
.tl-q legend { display: flex; gap: 10px; align-items: flex-start; font-weight: 800; font-size: 15.5px; margin-bottom: 10px; line-height: 1.6; }
.tl-q legend span { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--accent-soft); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.tl-q.bad legend span { background: var(--bad-soft); color: var(--bad); }
.tl-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tl-q > .tl-opt { display: block; margin-bottom: 8px; }
.tl-opt { position: relative; cursor: pointer; }
.tl-opt input { position: absolute; opacity: 0; }
.tl-opt span { display: block; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 14px; transition: .15s; }
.tl-opt:hover span { border-color: var(--line-2); }
.tl-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.tl-opt input:focus-visible + span { outline: 2px solid var(--accent-line); }
.tl-type { font-size: 30px; font-weight: 800; margin-top: 4px; }
.tl-tri { width: 100%; max-width: 340px; margin: 14px auto 0; display: block; }
.tl-tri text { fill: var(--text-2); font-size: 14px; font-weight: 700; font-family: inherit; }
.tl-desc { color: var(--text-2); line-height: 1.85; margin-bottom: 14px; }
.tl-advice { padding: 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; }
.tl-advice b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tl-advice b svg { width: 18px; height: 18px; color: var(--accent); }
[data-theme="light"] .tl-advice b svg { color: var(--link); }
.tl-advice p { color: var(--text-2); font-size: 14px; line-height: 1.75; }
.tl-panel .tl-stats + .btn { margin-top: 14px; }
.tl-weak { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tl-weak li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.tl-weak li i { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); }
.tl-weak li.bad i { background: var(--bad); }
.tl-weak li b { margin-inline-start: auto; }
.tl-allgood { display: flex; justify-content: center; padding: 30px; color: var(--ok); }
.tl-allgood svg { width: 64px; height: 64px; }
.tl-ai { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 22px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 65%); border: 1px solid var(--accent-line); }
.tl-ai .lp-ico { margin: 0; }
.tl-ai div { flex: 1; }
.tl-ai b { font-size: 17px; }
.tl-ai p { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.tl-h2 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; text-align: center; margin-bottom: 20px; }
.tl-h2.start { text-align: start; margin-bottom: 14px; }
.tl-group { padding-top: 28px; }
.tl-card-all { justify-content: center; align-items: center; text-align: center; border-style: dashed; }
.tl-card-all .lp-ico { margin-bottom: 10px; }

/* long-form content */
.prose { max-width: 820px; margin: 0 auto; font-size: 16px; line-height: 1.95; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: clamp(21px, 2.6vw, 26px); font-weight: 800; line-height: 1.4; margin: 36px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: var(--text); font-size: 18.5px; font-weight: 800; margin: 26px 0 8px; }
.prose h4, .prose h5 { color: var(--text); font-size: 16px; font-weight: 800; margin: 20px 0 6px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent); font-weight: 800; }
[data-theme="light"] .prose li::marker { color: var(--link); }
.prose strong { color: var(--text); }
.prose a { color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; border-radius: 18px; margin: 10px 0 18px; display: block; }
.prose table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 14.5px; background: var(--surface); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); display: block; overflow-x: auto; }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 800; text-align: start; padding: 11px 12px; white-space: nowrap; }
.prose td { padding: 10px 12px; border-top: 1px solid var(--line); }
.prose blockquote { border-inline-start: 4px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: 12px; margin: 0 0 16px; }
.tl-faq { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.tl-faq summary { cursor: pointer; font-weight: 800; color: var(--text); }
.tl-faq p { margin: 10px 0 0; }
.tl-updated { font-size: 13px; color: var(--muted); margin-top: 26px; }

@media (max-width: 900px) {
  .tl-res-grid { grid-template-columns: 1fr; }
  .tl-methods.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tl-hero { padding: 94px 0 18px; }
  .tl-hero-row { flex-direction: column; gap: 12px; }
  .tl-hero-ico { width: 52px; height: 52px; border-radius: 16px; }
  .tl-card, .tl-panel { padding: 18px; border-radius: 20px; }
  .tl-methods { grid-template-columns: 1fr; }
  .tl-methods.two { grid-template-columns: 1fr 1fr; }
  .tl-grid { grid-template-columns: 1fr 1fr; }
  .tl-grid .field[data-n-wide], .tl-grid .field:has(select) { grid-column: 1 / -1; }
  .tl-actions .btn { flex: 1; min-width: 0; }
  .tl-big { font-size: 42px; }
  .tl-stats { grid-template-columns: 1fr 1fr; }
  .tl-mcards { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .tl-mcard b { font-size: 18px; }
  .tl-mac { flex-direction: column; }
  .tl-steps li { font-size: 0; justify-content: center; }
  .tl-ai { flex-direction: column; text-align: center; }
  .tl-ai .btn { width: 100%; justify-content: center; }
  .prose { font-size: 15.5px; }
}
.tl-res-grid > *, .tl-panel, .tl-card { min-width: 0; }
.tl-bar { grid-template-columns: minmax(70px, 32%) minmax(0, 1fr) auto; }
@media (max-width: 640px) { .tl-pct td { padding: 8px 5px; font-size: 12.5px; } .tl-pct td:nth-child(2) { min-width: 44px; width: 18%; } }

/* ---------- Home ---------- */
/* Hero: follows the light/dark theme; the gym photo sits in a framed card instead of filling the background */
.hm-hero { position: relative; isolation: isolate; overflow: hidden; padding: 128px 0 84px; background: var(--bg); color: var(--text); }
.hm-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hm-bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 30%, transparent 80%); }
.hm-bg::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(180deg, transparent, var(--bg)); }
.hm-glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.hm-glow.g1 { width: 520px; height: 520px; top: -160px; inset-inline-end: -120px; background: rgba(208, 242, 82, .16); }
.hm-glow.g2 { width: 380px; height: 380px; bottom: -140px; inset-inline-start: -100px; background: rgba(96, 165, 250, .10); }
[data-theme="light"] .hm-glow.g1 { background: rgba(197, 234, 60, .38); }
[data-theme="light"] .hm-glow.g2 { background: rgba(127, 173, 57, .16); }

.hm-hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: center; min-height: 460px; }
.hm-copy { animation: hmUp .7s ease-out both; }
.hm-copy h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 900; line-height: 1.28; color: var(--text); letter-spacing: -.01em; text-wrap: balance; }
.hm-checks { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hm-checks li { display: flex; align-items: center; gap: 12px; font-size: 16.5px; font-weight: 600; color: var(--text-2); }
.hm-checks svg { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); flex: none; box-shadow: 0 0 0 5px var(--accent-soft); }
.hm-hero .lp-ctas { margin-top: 32px; }
.hm-hero .btn-primary.lp-btn { box-shadow: 0 12px 30px rgba(208, 242, 82, .28); }
[data-theme="light"] .hm-hero .btn-primary.lp-btn { box-shadow: 0 12px 28px rgba(127, 173, 57, .30); }
.hm-hero .btn-ghost.hm-ghost { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.hm-hero .btn-ghost.hm-ghost:hover { border-color: var(--accent-line); }

.hm-visual { position: relative; height: 440px; animation: hmUp .8s .12s ease-out both; }
.hm-visual::before { content: ""; position: absolute; inset: 8% 4% 8% 12%; border-radius: 50%; border: 1px dashed var(--accent-line); transform: rotate(-8deg); }
.hm-media { position: absolute; inset: 24px 0 24px 0; inset-inline-start: 40px; border-radius: 28px; overflow: hidden; background: #0c121b; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .55); }
[data-theme="light"] .hm-media { border-color: rgba(255, 255, 255, .9); box-shadow: 0 40px 80px -24px rgba(17, 24, 35, .35), 0 0 0 6px rgba(255, 255, 255, .7); }
.hm-media img { width: 100%; height: 100%; object-fit: cover; object-position: 42% 50%; display: block; transform: scale(1.04); }
.hm-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 18, 27, .05) 40%, rgba(12, 18, 27, .55)); }

.hm-bubble, .hm-plan, .hm-chip { position: absolute; z-index: 2; background: rgba(22, 31, 45, .78); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; color: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
[data-theme="light"] .hm-bubble, [data-theme="light"] .hm-plan, [data-theme="light"] .hm-chip { background: rgba(255, 255, 255, .86); border-color: rgba(17, 24, 35, .08); color: var(--text); box-shadow: 0 22px 50px rgba(17, 24, 35, .16); }
.hm-bubble { top: 0; inset-inline-start: 0; display: flex; gap: 10px; align-items: center; padding: 12px 16px; animation: hmFloat 6s ease-in-out infinite; }
.hm-bubble b { display: block; font-size: 14px; }
.hm-bubble small { color: #aab6c6; font-size: 12px; }
[data-theme="light"] .hm-bubble small { color: var(--muted); }
.hm-dot { width: 10px; height: 10px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .22); flex: none; animation: hmPulse 2s ease-in-out infinite; }
.hm-plan { bottom: 0; inset-inline-end: -8px; width: 280px; padding: 16px 16px 14px; animation: hmFloat 7s ease-in-out infinite reverse; }
.hm-plan-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hm-plan-h b { font-size: 15px; }
.hm-plan-h span { font-size: 11.5px; font-weight: 800; background: var(--accent); color: var(--accent-ink); padding: 3px 10px; border-radius: 999px; }
.hm-plan-r { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
[data-theme="light"] .hm-plan-r { border-top-color: var(--line); }
.hm-plan-r svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.hm-plan-r b { margin-inline-start: auto; color: var(--accent); font-weight: 800; }
[data-theme="light"] .hm-plan-r svg, [data-theme="light"] .hm-plan-r b { color: var(--link); }
.hm-plan-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); margin-top: 10px; overflow: hidden; }
[data-theme="light"] .hm-plan-bar { background: var(--surface-3); }
.hm-plan-bar i { display: block; height: 100%; width: 66%; background: linear-gradient(90deg, #7fad39, #d0f252); border-radius: 999px; }
.hm-chip { top: 46%; inset-inline-start: 4px; display: flex; align-items: center; gap: 6px; padding: 9px 14px; font-weight: 800; font-size: 13px; color: var(--accent); animation: hmFloat 5s ease-in-out infinite; }
[data-theme="light"] .hm-chip { color: var(--link); }
.hm-chip svg { width: 18px; height: 18px; }

@keyframes hmFloat { 50% { transform: translateY(-10px); } }
@keyframes hmUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hmPulse { 50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, .08); } }
@media (prefers-reduced-motion: reduce) { .hm-bubble, .hm-plan, .hm-chip, .hm-dot, .hm-copy, .hm-visual { animation: none; } }

/* Sections */
.hm-sec { padding: 72px 0; }
.hm-sec.alt { background: var(--surface-2); border-block: 1px solid var(--line); }
[data-theme="light"] .hm-sec.alt { background: var(--surface); }
[data-theme="dark"] .hm-sec.alt { background: rgba(255, 255, 255, .02); }
.hm-h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; text-align: center; line-height: 1.4; }
.hm-h2::after { content: ""; display: block; width: 44px; height: 4px; border-radius: 999px; background: var(--accent); margin: 12px auto 0; }
.hm-sub { color: var(--muted); text-align: center; margin: 12px auto 32px; max-width: 620px; line-height: 1.8; }
.hm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 1000px; margin: 0 auto; }
.hm-grid.four { grid-template-columns: repeat(4, 1fr); max-width: 1180px; }
.hm-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: border-color .2s, transform .2s, box-shadow .2s; min-height: 78px; }
.hm-sec.alt .hm-card { background: var(--bg); }
[data-theme="dark"] .hm-sec.alt .hm-card { background: var(--surface); }
.hm-card:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow); }
.hm-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
[data-theme="light"] .hm-ico { color: var(--link); }
.hm-ico svg { width: 22px; height: 22px; }
.hm-card h3 { flex: 1; font-size: 15px; font-weight: 700; line-height: 1.5; margin: 0; }
.hm-ai { position: absolute; top: 8px; inset-inline-end: 52px; font-size: 10px; font-weight: 800; color: var(--accent-ink); background: var(--accent); padding: 1px 7px; border-radius: 999px; }
.hm-go { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--text); transition: background .2s; }
.hm-go svg { width: 15px; height: 15px; }
[dir="ltr"] .hm-go svg { transform: scaleX(-1); }
.hm-card:hover .hm-go { background: var(--accent); color: var(--accent-ink); }
.hm-card.more { border-style: dashed; }

/* Muscle map (home only — the dashboard recovery map keeps its own look) */
.mm-subtitle { color: var(--muted); text-align: center; font-size: 15px; margin: -10px auto 30px; }
.mm-stage { display: flex; justify-content: center; align-items: flex-start; gap: 30px; }
.mm-figure { flex: 1 1 0; max-width: 340px; display: flex; flex-direction: column; align-items: center; }
.mm-svg { width: 100%; height: auto; display: block; user-select: none; }
.mm-caption { margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); padding: 5px 16px; border-radius: 999px; }
.mm-base { fill: #aab6c6; stroke: var(--bg, #1a2332); stroke-width: 2; pointer-events: none; }
.mm-muscle { fill: #cfd8e3; stroke: var(--bg, #1a2332); stroke-width: 2; cursor: pointer; transition: fill .18s, filter .18s; }
[data-theme="light"] .mm-base { fill: #6f7f94; stroke: #fff; }
[data-theme="light"] .mm-muscle { fill: #a3b1c2; stroke: #fff; }
[data-theme="light"] .mm-muscle:hover, [data-theme="light"] .mm-muscle:focus-visible { fill: #c5ea3c; }
.mm-muscle:hover { fill: #e3ec61; }
.mm-muscle:focus-visible { outline: none; fill: #e3ec61; }
.mm-muscle.active { fill: #D0F252; filter: drop-shadow(0 0 6px rgba(208,242,82,.55)); }
[data-theme="light"] .mm-muscle.active { fill: #9fc531; filter: drop-shadow(0 0 5px rgba(122,160,20,.45)); }

#muscleMap .mm-subtitle { margin: -14px auto 22px; font-size: 14px; }
#muscleMap .mm-stage { max-width: 860px; margin: 0 auto; padding: 32px 24px 24px; border-radius: 28px; border: 1px solid var(--line); background: radial-gradient(ellipse 60% 55% at 50% 45%, var(--accent-soft), transparent 70%), var(--surface); }
#muscleMap .mm-base { fill: #5c6b80; stroke: var(--surface); }
#muscleMap .mm-muscle { fill: #b9c5d3; stroke: var(--surface); }
#muscleMap .mm-muscle:hover, #muscleMap .mm-muscle:focus-visible { fill: #e3ec61; }
#muscleMap .mm-muscle.active { fill: #d0f252; }
[data-theme="light"] #muscleMap .mm-base { fill: #cfd7e1; stroke: #fff; }
[data-theme="light"] #muscleMap .mm-muscle { fill: #8696ab; stroke: #fff; }
[data-theme="light"] #muscleMap .mm-muscle:hover, [data-theme="light"] #muscleMap .mm-muscle:focus-visible { fill: #b5dc2e; }
[data-theme="light"] #muscleMap .mm-muscle.active { fill: #9fc531; }
#muscleMap .mm-caption { background: var(--bg); }

.mm-panel { margin: 24px auto 0; max-width: 560px; min-height: 64px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: 18px; display: flex; align-items: center; justify-content: center; padding: 14px 22px; position: sticky; bottom: 96px; z-index: 5; box-shadow: var(--shadow); }
.mm-panel-hint { color: var(--muted); }
.mm-panel-active { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.mm-panel-name { font-size: 21px; font-weight: 800; }

/* Articles */
.hm-blog { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.hm-post { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: transform .2s, border-color .2s, box-shadow .2s; }
[data-theme="dark"] .hm-post { background: var(--surface); }
.hm-post:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.hm-post img { width: 100%; height: 130px; object-fit: cover; display: block; background: var(--surface-2); }
.hm-post span { padding: 12px 14px 14px; }
.hm-post h3 { font-size: 14.5px; font-weight: 800; line-height: 1.5; margin: 0 0 4px; }
.hm-post small { color: var(--muted); font-size: 12.5px; line-height: 1.6; display: block; }
.hm-more { text-align: center; margin-top: 24px; }
.hm-blurb { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.9; margin: 26px auto 0; max-width: 720px; }

@media (max-width: 1024px) { .hm-grid.four { grid-template-columns: repeat(3, 1fr); } .hm-blog { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .hm-hero { padding: 104px 0 56px; }
  .hm-hero-grid { grid-template-columns: 1fr; gap: 34px; min-height: 0; }
  .hm-copy { text-align: center; }
  .hm-checks { align-items: center; }
  .hm-hero .lp-ctas { justify-content: center; }
  .hm-visual { height: 340px; max-width: 520px; width: 100%; margin: 0 auto; }
  .hm-grid, .hm-grid.four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hm-hero { padding: 92px 0 36px; }
  .hm-copy h1 { font-size: 24px; line-height: 1.55; }
  .hm-checks { margin-top: 16px; gap: 8px; }
  .hm-checks li { font-size: 14px; gap: 9px; }
  .hm-checks svg { width: 20px; height: 20px; padding: 4px; box-shadow: 0 0 0 3px var(--accent-soft); }
  .hm-hero .lp-ctas { margin-top: 22px; gap: 10px; }
  .hm-hero .lp-btn { padding: 12px 14px; font-size: 15px; }
  .hm-visual { height: 230px; }
  .hm-visual::before { display: none; }
  .hm-media { inset: 0; border-radius: 22px; }
  .hm-media img { object-position: 38% 50%; }
  .hm-bubble { display: none; }
  .hm-glow.g1 { width: 300px; height: 300px; top: -120px; inset-inline-end: -110px; }
  .hm-glow.g2 { display: none; }
  [data-theme="light"] .hm-glow.g1 { background: rgba(197, 234, 60, .30); }
  .hm-plan { bottom: 12px; inset-inline-end: 12px; width: 205px; padding: 10px 12px; border-radius: 14px; }
  .hm-plan-h { margin-bottom: 2px; }
  .hm-plan-h b { font-size: 13px; }
  .hm-plan-h span { font-size: 10.5px; padding: 2px 8px; }
  .hm-plan-r { font-size: 12px; padding: 5px 0; }
  .hm-plan-r svg { width: 14px; height: 14px; }
  .hm-plan-bar { margin-top: 6px; height: 5px; }
  .hm-chip { display: none; }

  .hm-sec { padding: 48px 0; }
  .hm-h2::after { width: 36px; margin-top: 10px; }
  .hm-sub { margin: 10px auto 22px; font-size: 14px; }

  /* services: compact 3 × 3 icon tiles */
  .hm-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hm-card { flex-direction: column; justify-content: center; text-align: center; gap: 8px; padding: 14px 6px 12px; min-height: 0; border-radius: 16px; }
  .hm-card h3 { flex: none; font-size: 12.5px; line-height: 1.45; }
  .hm-ico { width: 40px; height: 40px; border-radius: 12px; }
  .hm-ico svg { width: 20px; height: 20px; }
  .hm-go { display: none; }
  .hm-ai { top: 6px; inset-inline-end: 6px; font-size: 9px; padding: 0 6px; }

  /* tools and articles: one swipeable row each, the next card peeks in so it is clear there is more */
  .hm-grid.four, .hm-blog { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -14px; padding: 4px 14px 10px; scroll-padding-inline: 14px; }
  .hm-grid.four::-webkit-scrollbar, .hm-blog::-webkit-scrollbar { display: none; }
  .hm-grid.four .hm-card { flex: 0 0 31%; scroll-snap-align: start; }
  .hm-post { flex: 0 0 72%; scroll-snap-align: start; }
  .hm-post img { height: 130px; }
  .hm-post h3 { font-size: 14px; }

  #muscleMap .mm-stage { gap: 8px; padding: 20px 10px 16px; border-radius: 22px; }
  .mm-caption { font-size: 12.5px; padding: 4px 12px; }
  .mm-panel { bottom: 92px; padding: 12px 16px; }
  .mm-panel-name { font-size: 18px; }
}
@media (max-width: 380px) {
  .hm-copy h1 { font-size: 22px; }
  .hm-plan { width: 190px; }
}

/* ---------- Blog index ---------- */
.bl-h1 { font-size: clamp(26px, 4vw, 42px); font-weight: 800; line-height: 1.3; margin: 14px 0 10px; max-width: 820px; }
.bl-feat { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--accent-line); color: var(--text); text-decoration: none !important; transition: transform .2s; }
.bl-feat:hover { transform: translateY(-3px); }
.bl-feat img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; display: block; background: var(--surface-2); }
.bl-feat-body { padding: 30px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.bl-feat h2 { font-size: clamp(20px, 2.4vw, 27px); font-weight: 800; line-height: 1.45; }
.bl-feat p { color: var(--text-2); line-height: 1.8; }
.bl-badge, .bl-tag { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text); }
.bl-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 30px 0 18px; }
.bl-filter button { font: inherit; font-weight: 700; font-size: 14px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); cursor: pointer; }
.bl-filter button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bl-card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: transform .2s, border-color .2s; }
.bl-card:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.bl-card img, .bl-ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--surface-2); }
.bl-ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); color: var(--accent); }
[data-theme="light"] .bl-ph { color: var(--link); }
.bl-ph svg { width: 54px; height: 54px; }
.bl-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bl-card h3 { font-size: 16px; font-weight: 800; line-height: 1.55; }
.bl-card p { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.bl-card .lp-go { padding-top: 6px; }
@media (max-width: 960px) { .bl-grid { grid-template-columns: 1fr 1fr; } .bl-feat { grid-template-columns: 1fr; } .bl-feat img { min-height: 0; aspect-ratio: 16 / 9; } }
@media (max-width: 640px) { .bl-grid { grid-template-columns: 1fr; gap: 12px; } .bl-feat-body { padding: 20px; } .bl-card { flex-direction: row; } .bl-card img, .bl-card .bl-ph { width: 120px; aspect-ratio: auto; height: auto; min-height: 100%; flex: none; } .bl-card p, .bl-card .lp-go { display: none; } .bl-card h3 { font-size: 14px; } .bl-body { padding: 12px 14px; } }

/* admin: unread counter in the sidebar + contact messages */
.nav-count { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.msg-new td:first-child b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 8px; vertical-align: middle; }
.msg-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.msg-tabs a { font-size: 13.5px; font-weight: 700; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); text-decoration: none; }
.msg-tabs a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.msg-tabs a span { opacity: .7; margin-inline-start: 4px; }
.msg-body { white-space: pre-wrap; line-height: 1.9; font-size: 15px; }
.msg-meta { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14px; }
.msg-meta dt { color: var(--muted); }
.msg-meta dd { margin: 0; word-break: break-word; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
textarea.input { height: auto; min-height: 140px; padding-top: 10px; padding-bottom: 10px; line-height: 1.8; resize: vertical; }

/* checkout / receipt / refund */
.co-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); line-height: 1.8; margin: 4px 0 14px; cursor: pointer; }
.co-agree input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.co-agree a { color: var(--link); font-weight: 700; }
.co-conv { display: block; margin-top: 4px; color: var(--text-2); }
.co-usd { font-size: 13px; color: var(--muted); font-weight: 600; }
.pr-usd { margin: -4px 0 6px; color: var(--muted); font-size: 13px; }
.receipt { margin: 18px 0 8px; display: grid; gap: 8px; text-align: start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.receipt div { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 700; text-align: end; }
.pay-row { grid-template-columns: 1fr auto auto auto; }
.pay-refund { margin-inline-start: auto; }
.usage-bar.unl span { background: linear-gradient(90deg, var(--accent), var(--accent-line)); opacity: .55; }

/* ===== Training: library, workout log, recovery (update 22) ===== */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.back-link svg { width: 16px; height: 16px; }
[dir="rtl"] .back-link svg { transform: scaleX(-1); }
.ex-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lib-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.lib-filters .input { flex: 1 1 220px; }
.lib-fav-toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-2); cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.lib-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.lib-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.lib-card[hidden] { display: none; }
.lib-thumb { position: relative; aspect-ratio: 16/10; background: var(--surface-2); display: block; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-play { position: absolute; inset-inline-end: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; color: #fff; }
.lib-play svg { width: 18px; height: 18px; }
.lib-star { position: absolute; top: 8px; inset-inline-start: 10px; color: var(--accent); font-size: 20px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.lib-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.lib-body b { font-size: 15px; line-height: 1.4; }
.lib-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ex-grid { align-items: start; }
.ex-video { padding: 0; overflow: hidden; }
.ex-video video { width: 100%; display: block; max-height: 70vh; background: #000; }
.ex-sec { margin-top: 14px; }
.ex-sec h3 { font-size: 16px; margin-bottom: 8px; }
.ex-sec ul { padding-inline-start: 20px; display: grid; gap: 6px; color: var(--text-2); }
.ex-sec.warn { border-color: var(--warn); }
.ex-big { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.ex-advice { margin-top: 14px; border-color: var(--accent-line); }
.ex-advice p { font-weight: 600; }
aside > .card + .card { margin-top: 14px; }
.ex-hist { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.ex-hist:first-of-type { border-top: 0; }
.ex-hist > span { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-hist small { color: var(--muted); }
.ltr-num { unicode-bidi: plaintext; }
.rest-bar { position: sticky; top: 8px; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.rest-bar[hidden] { display: none; }
.rest-bar svg { width: 20px; height: 20px; color: var(--accent); }
.rest-bar b { font-size: 18px; min-width: 52px; }
.rest-bar.done b { font-size: 14px; color: var(--ok); }
.rest-track { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.rest-track span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s linear; }
.wo-block { margin-bottom: 14px; scroll-margin-top: 80px; }
.wo-head { display: flex; align-items: center; gap: 12px; }
.wo-thumb { position: relative; width: 84px; flex: 0 0 84px; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.wo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wo-thumb .lib-play { width: 24px; height: 24px; inset-inline-end: 4px; bottom: 4px; }
.wo-thumb .lib-play svg { width: 13px; height: 13px; }
.wo-title { flex: 1; min-width: 0; }
.wo-title a { color: inherit; }
.wo-advice { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; font-size: 14px; }
.wo-advice svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--accent); margin-top: 2px; }
.wo-sets { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.wo-sets li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.wo-sets li form { margin-inline-start: auto; }
.wo-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 12px; font-weight: 800; color: var(--muted); }
.icon-x { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.icon-x:hover { color: var(--bad); }
.wo-log { display: grid; gap: 10px; }
.wo-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.wo-fields .field { display: grid; gap: 4px; margin: 0; }
.wo-fields .field span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.wo-feel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wo-feel > span { font-size: 13px; color: var(--muted); font-weight: 700; }
.wo-feel .seg input:checked + span { background: var(--accent); color: #111; }
.wo-add, .wo-finish { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.wo-add .field { flex: 1 1 240px; display: grid; gap: 4px; margin: 0; }
.wo-add .select { width: 100%; }
.wo-finish .input { flex: 1 1 220px; }
.wo-done { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rec-map .mm-stage { gap: 6px; }
.rec-map .mm-caption { font-size: 12px; padding: 3px 10px; }
.rec-map .mm-muscle.rec-fresh { fill: #4ade80; }
.rec-map .mm-muscle.rec-recovering { fill: #fbbf24; }
.rec-map .mm-muscle.rec-tired { fill: #f87171; }
[data-theme="light"] .rec-map .mm-muscle.rec-fresh { fill: #22c55e; }
[data-theme="light"] .rec-map .mm-muscle.rec-recovering { fill: #f59e0b; }
[data-theme="light"] .rec-map .mm-muscle.rec-tired { fill: #ef4444; }
.rec-map .mm-muscle:hover { filter: brightness(1.15); }
.rec-legend { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 12px 0 6px; font-size: 13px; font-weight: 700; }
.rl::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; vertical-align: middle; }
.rl.fresh::before { background: #4ade80; } .rl.recovering::before { background: #fbbf24; } .rl.tired::before { background: #f87171; }
.rec-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.rec-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.rec-list li.tired b { color: var(--bad); } .rec-list li.recovering b { color: var(--warn); }
.ws-row { display: grid; grid-template-columns: 110px 1fr 28px; gap: 10px; align-items: center; font-size: 13.5px; padding: 4px 0; }
.ws-bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.ws-bar i { display: block; height: 100%; max-width: 100%; background: var(--accent); border-radius: 8px; }
.tr-notes { display: grid; gap: 8px; margin-bottom: 18px; }
.tr-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.tr-note::before { content: "•"; font-size: 20px; line-height: 1; }
.tr-note.good { border-color: var(--ok); background: var(--ok-soft); } .tr-note.good::before { color: var(--ok); }
.tr-note.warn { border-color: var(--warn); background: var(--warn-soft); } .tr-note.warn::before { color: var(--warn); }
.tr-note.info::before { color: var(--accent); }
.dash-train { margin-top: 18px; }
.dash-train .dt-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
@media (max-width: 640px) {
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lib-body { padding: 10px; } .lib-body b { font-size: 13.5px; }
  .ws-row { grid-template-columns: 90px 1fr 24px; }
}
.ex-target .muted-p { text-align: start; margin-top: 6px; }
.ex-grid section > p { margin-top: 12px; }
.dash-train-top { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: var(--accent-line); }
.dash-train-top h3 { font-size: 18px; margin-bottom: 4px; }
.dtt-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .dtt-btns { width: 100%; } .dtt-btns > * { flex: 1 1 auto; } .dtt-btns form .btn { width: 100%; } }
.rest-bar { top: 76px; }

/* ===== Clear structure: Today / Train / Nutrition, guides, plan labels (update 23) ===== */
.nav-sub { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 14px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.top-acc { padding: 0; }
.top-acc.on .avatar { box-shadow: 0 0 0 2px var(--accent); }
.hub-tabs { display: flex; gap: 6px; margin: -6px 0 18px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.hub-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.hub-tabs a svg { width: 18px; height: 18px; }
.hub-tabs a.on { background: var(--accent); color: #111; }
.guide-box { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.guide-box summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 700; color: var(--text-2); list-style: none; }
.guide-box summary::-webkit-details-marker { display: none; }
.guide-box summary::after { content: "+"; margin-inline-start: auto; font-size: 18px; color: var(--muted); }
.guide-box[open] summary::after { content: "–"; }
.guide-box summary svg { width: 18px; height: 18px; color: var(--accent); }
.guide-box > div { padding: 0 16px 14px; color: var(--text-2); font-size: 14px; line-height: 1.8; }
.guide-box > div p + p { margin-top: 6px; }
.guide-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; border-color: var(--accent-line); }
.guide-cta h3 { font-size: 16px; } .guide-cta p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.guide-steps { margin-top: 18px; border-color: var(--accent-line); }
.gs-head { display: flex; align-items: flex-start; gap: 12px; }
.gs-head > div { flex: 1; } .gs-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.gs-count { font-weight: 800; color: var(--accent); }
.gs-bar { height: 6px; border-radius: 6px; background: var(--surface-2); margin: 12px 0 6px; overflow: hidden; }
.gs-bar i { display: block; height: 100%; background: var(--accent); }
.gs-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.gs-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.gs-list li > div { flex: 1; } .gs-list p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.gs-list li.done b { text-decoration: line-through; color: var(--muted); }
.gs-n { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--surface-2); color: var(--text-2); }
.gs-list li.done .gs-n { background: var(--ok-soft); color: var(--ok); }
.today-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.today-main { grid-row: span 2; border-color: var(--accent-line); }
.today-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.tc-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 38px; }
.tc-ico svg { width: 20px; height: 20px; }
.tc-big { font-size: 19px; font-weight: 800; }
.tc-list { list-style: none; padding: 0; margin: 2px 0 6px; display: grid; gap: 4px; width: 100%; }
.tc-list li { padding: 7px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.tc-list li small { color: var(--muted); }
.tc-list li.more { color: var(--muted); justify-content: center; }
.tc-foot { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--muted); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-line { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.plan-line > div { flex: 1; min-width: 200px; display: grid; gap: 4px; }
.plan-line > div > span { color: var(--muted); font-size: 13px; line-height: 1.8; }
.plan-line > div > span b { color: var(--text); }
.ai-use { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.ai-use.lock { background: var(--warn-soft); color: var(--warn); }
.ai-use.free { background: var(--ok-soft); color: var(--ok); }
.np-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.np-card > p { color: var(--muted); font-size: 14px; }
.np-opts { display: grid; gap: 8px; width: 100%; }
.np-opt { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: var(--surface-2); transition: border-color .15s; }
.np-opt:hover { border-color: var(--accent-line); }
.np-opt small { color: var(--muted); font-size: 13px; }
.np-opt .ai-use { justify-self: start; margin-top: 4px; }
.np-opt.locked { opacity: .8; }
.np-sep { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.list-rows { display: grid; gap: 8px; }
.lr { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lr > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lr small { color: var(--muted); font-size: 12.5px; }
.prog-card .card-head { align-items: flex-start; }
.day-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.day-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; }
.day-list li.next { border-color: var(--accent-line); background: var(--accent-soft); }
.dl-n { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); color: var(--accent); }
.dl-body { flex: 1; display: grid; gap: 2px; min-width: 0; }
.dl-body small { color: var(--muted); font-size: 12.5px; }
.pr-name { display: flex; gap: 8px; align-items: center; margin: 4px 0 6px; }
.pr-name-in { font-size: 20px; font-weight: 800; max-width: 420px; }
.day-card { margin-bottom: 14px; scroll-margin-top: 80px; }
.day-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.day-title { display: flex; gap: 6px; flex: 1; min-width: 200px; }
.day-title .input { font-weight: 700; }
.pr-items { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.pr-items li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.pr-items img, .pr-noimg { width: 56px; height: 36px; border-radius: 8px; object-fit: cover; flex: 0 0 56px; display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.pr-it { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pr-it a { color: inherit; } .pr-it small { color: var(--muted); font-size: 12.5px; }
.pr-move { display: flex; }
.pr-add { display: grid; grid-template-columns: minmax(0, 2fr) 80px 100px auto; gap: 8px; align-items: center; }
.pr-add .select { width: 100%; }
.day-del { margin-top: 10px; text-align: end; }
.wo-date { font-size: 15px; color: var(--muted); font-weight: 700; }
.wo-plan { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.wo-plan span { color: var(--muted); font-weight: 700; } .wo-plan small { color: var(--muted); }
.wo-novideo { margin-top: 10px; font-size: 13px; color: var(--warn); }
.pg-top { margin-bottom: 20px; align-items: start; }
.ins-card.locked .ins-sample { filter: blur(1.5px); opacity: .7; margin: 8px 0 12px; }
@media (max-width: 760px) {
  .today-grid { grid-template-columns: 1fr; } .today-main { grid-row: auto; }
  .pr-add { grid-template-columns: 1fr 1fr; } .pr-add .select { grid-column: 1 / -1; } .pr-add .btn { grid-column: 1 / -1; }
  .hub-tabs a { padding: 9px 8px; font-size: 13px; }
  .lr { flex-wrap: wrap; } .lr > div { flex-basis: 100%; }
}
.today-card .muted-p, .np-card .muted-p, .guide-cta .muted-p, .prog-card .muted-p, .day-card .muted-p, .ins-card .muted-p, .pg-chart .muted-p { text-align: start; }
.today-card .ai-use { margin-top: -2px; }
/* calculators inside the panel (update 24) */
.calc-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.calc-link svg { width: 14px; height: 14px; }
.calc-dlg { width: min(860px, 96vw); max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--text); overflow: hidden; }
.calc-dlg[open] { display: flex; flex-direction: column; }
.calc-dlg::backdrop { background: rgba(0, 0, 0, .6); }
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.calc-body { overflow-y: auto; padding: 16px; flex: 1; }
.calc-body .tl-app { margin: 0; }
.calc-use { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--accent-line); background: var(--accent-soft); font-weight: 700; }
.calc-use[hidden] { display: none; }
.wo-fields .field .calc-link { justify-self: start; }
.pr-add { grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) 70px 90px auto; }
.wo-cancel { margin: -4px 0 14px; text-align: end; }
@media (max-width: 760px) { .pr-add .pr-own { grid-column: 1 / -1; } }
.calc-dlg { position: fixed; inset: 0; margin: auto; height: fit-content; }
.pr-off { border-color: var(--warn); }
.pr-off-row { opacity: .85; }
/* update 27 — workout overview: tiles + sheet */
.wo-overview { margin-bottom: 14px; scroll-margin-top: 80px; }
.wo-prog-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.wo-prog-line b { font-size: 16px; }
.wo-prog-line span { color: var(--muted); font-weight: 700; font-size: 13px; }
.wo-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.wo-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.wo-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.wo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.wo-tile { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-align: start; cursor: pointer; font: inherit; transition: border-color .15s, transform .15s; }
.wo-tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.wo-tile:focus-visible { outline: 2px solid var(--accent-line); }
.wo-tile.is-now { border: 2px solid var(--accent); }
.wo-tile.is-done { border-color: rgba(74, 222, 128, .45); }
.wo-tile.is-skipped { border-style: dashed; opacity: .7; }
.wo-tile-img { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; }
.wo-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.wo-tile-img svg { width: 28px; height: 28px; color: var(--muted); }
.wo-tile.is-done .wo-tile-img img { filter: brightness(.55); }
.wo-tile-mark { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: var(--text); }
.wo-tile-mark.ok { color: var(--ok); }
.wo-tile-name { font-weight: 800; font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.wo-tile-st { display: flex; gap: 6px; flex-wrap: wrap; }
.wo-sheet { width: min(640px, 96vw); max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--text); overflow: hidden; position: fixed; inset: 0; margin: auto; height: fit-content; }
.wo-sheet[open] { display: flex; flex-direction: column; }
.wo-sheet::backdrop { background: rgba(0, 0, 0, .6); }
.wo-sheet-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wo-sheet-head .wo-title { display: grid; gap: 4px; }
.wo-sheet-head .icon-x { margin-inline-start: auto; font-size: 26px; }
.wo-sheet-body { overflow-y: auto; padding: 16px; display: grid; gap: 12px; }
.wo-sheet-body > * { margin: 0; }
.wo-sheet .rest-bar { position: static; margin: 0; }
.wo-plan { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wo-setof { margin-inline-start: auto; }
.wo-goal-done { padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 800; }
.wo-extra > summary { cursor: pointer; color: var(--text-2); font-weight: 700; font-size: 13.5px; padding: 4px 0 10px; }
.wo-sheet-acts { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.wo-sheet-acts form { margin: 0; }
.wo-swap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.wo-swap-opt { position: relative; display: grid; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; font-size: 13px; font-weight: 700; }
.wo-swap-opt img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; }
.wo-swap-opt input { position: absolute; opacity: 0; }
.wo-swap-opt:has(input:checked) { border: 2px solid var(--accent); }
.wo-swap .field { display: grid; gap: 4px; }
.wo-check { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13.5px; }
.wo-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--warn-soft); line-height: 1.8; }
.wo-warn svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--warn); margin-top: 4px; }
.wo-actions { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.wo-actions .wo-finish { flex: 1 1 380px; margin: 0; }
.wo-more > summary { cursor: pointer; font-weight: 700; color: var(--text-2); }
.wo-more[open] > summary { margin-bottom: 12px; }
.wo-more .wo-add { margin-bottom: 10px; }
@media (max-width: 640px) {
  .wo-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wo-sheet { width: 100vw; max-width: 100vw; max-height: 90vh; margin: auto 0 0; inset: auto 0 0 0; border-radius: 18px 18px 0 0; }
  .wo-actions .btn { width: 100%; }
}
