/* Toolinger front-end. All rules are scoped to .tl-scope so the site theme is not affected. */
:root {
  --tl-primary: #071B36;
  --tl-accent: #10B981;
  --tl-radius: 12px;
  --tl-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tl-bg: #ffffff;
  --tl-surface: #ffffff;
  --tl-surface-2: #f4f6f8;
  --tl-text: #13202f;
  --tl-muted: #5b6b7d;
  --tl-border: #dde3ea;
  --tl-danger: #c9302c;
  --tl-danger-bg: #fdecea;
  --tl-ok-bg: #e7f8f1;
  --tl-ok: #0b7a55;
  --tl-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
}
html[data-tl-theme="dark"] {
  --tl-bg: #0b1424;
  --tl-surface: #111d31;
  --tl-surface-2: #172640;
  --tl-text: #e8eef6;
  --tl-muted: #9aabc0;
  --tl-border: #24364f;
  --tl-danger: #ff8a80;
  --tl-danger-bg: #3a1d1f;
  --tl-ok-bg: #0f3127;
  --tl-ok: #6ee7b7;
  --tl-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
}

.tl-scope { font-family: var(--tl-font); color: var(--tl-text); box-sizing: border-box; line-height: 1.5; }
.tl-scope *, .tl-scope *::before, .tl-scope *::after { box-sizing: inherit; }
.tl-scope [hidden] { display: none !important; }

.tl-card { background: var(--tl-surface); border: 1px solid var(--tl-border); border-radius: var(--tl-radius); box-shadow: var(--tl-shadow); padding: 24px; }
.tl-auth { max-width: 440px; margin: 24px auto; position: relative; }
.tl-auth-top { display: flex; justify-content: flex-end; margin: -8px -8px 4px 0; }
.tl-title { font-size: 1.4rem; font-weight: 700; margin: 0 0 16px; color: var(--tl-text); line-height: 1.25; }
.tl-subtitle { font-size: 1.05rem; font-weight: 650; margin: 0 0 14px; color: var(--tl-text); }
.tl-muted { color: var(--tl-muted); font-size: .92rem; }
.tl-row { margin: 12px 0 0; text-align: center; font-size: .92rem; line-height: 1.5; }
.tl-row .tl-link { font-size: inherit; }

.tl-label { display: block; font-size: .9rem; font-weight: 600; margin: 0 0 14px; color: var(--tl-text); }
.tl-input { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; font-weight: 400; font-size: 16px; color: var(--tl-text); background: var(--tl-bg); border: 1px solid var(--tl-border); border-radius: calc(var(--tl-radius) - 4px); outline: none; transition: border-color .15s, box-shadow .15s; }
.tl-input:focus { border-color: var(--tl-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tl-accent) 25%, transparent); }
.tl-code { letter-spacing: .4em; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.tl-check { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin: 0 0 16px; color: var(--tl-text); }

.tl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 16px; font: inherit; font-weight: 650; font-size: 15px; border-radius: calc(var(--tl-radius) - 4px); border: 1px solid transparent; cursor: pointer; text-decoration: none !important; transition: filter .15s, background .15s; }
.tl-btn:disabled { opacity: .6; cursor: progress; }
.tl-btn-primary { background: var(--tl-accent); color: #fff !important; }
.tl-btn-primary:hover { filter: brightness(.94); }
.tl-btn-google { background: var(--tl-surface); color: var(--tl-text) !important; border-color: var(--tl-border); }
.tl-btn-google:hover { background: var(--tl-surface-2); }
.tl-btn-ghost { background: transparent; color: var(--tl-text); border-color: var(--tl-border); width: auto; }
.tl-btn-sm { min-height: 36px; padding: 6px 14px; width: auto; font-size: 14px; }
.tl-link { color: var(--tl-accent); text-decoration: none; font-weight: 600; }
.tl-link:hover { text-decoration: underline; }

.tl-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--tl-muted); font-size: .85rem; }
.tl-divider::before, .tl-divider::after { content: ""; flex: 1; height: 1px; background: var(--tl-border); }

.tl-alert { padding: 10px 14px; border-radius: calc(var(--tl-radius) - 4px); margin: 0 0 16px; font-size: .92rem; background: var(--tl-ok-bg); color: var(--tl-ok); }
.tl-alert.is-error { background: var(--tl-danger-bg); color: var(--tl-danger); }

.tl-theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--tl-border); background: var(--tl-surface); color: var(--tl-text); cursor: pointer; padding: 0; }
html[data-tl-theme="dark"] .tl-theme-toggle .tl-i-moon, html:not([data-tl-theme="dark"]) .tl-theme-toggle .tl-i-sun { display: none; }

.tl-account { max-width: 960px; margin: 24px auto; }
.tl-account-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tl-account-head .tl-title { margin: 0; }
.tl-account-who { flex: 1; min-width: 180px; }
.tl-account-who p { margin: 2px 0 0; }
.tl-account-actions { display: flex; gap: 8px; align-items: center; }
.tl-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--tl-surface-2); }
.tl-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--tl-ok-bg); color: var(--tl-ok); font-size: .78rem; font-weight: 650; }
.tl-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.tl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tl-signed-in p { margin: 0 0 6px; }

@media (max-width: 720px) {
  .tl-grid, .tl-two { grid-template-columns: 1fr; gap: 0 12px; }
  .tl-grid { gap: 16px; }
  .tl-card { padding: 18px 16px; }
  .tl-auth { margin: 12px auto; }
}

/* ---- 1.1: layouts, floating toggle, logo ---- */
.tl-scope .tl-title, .tl-scope .tl-subtitle { color: var(--tl-heading, var(--tl-text)); }
.tl-scope select.tl-input { appearance: auto; }
.tl-auth-wrap { margin: 24px auto; }
.tl-auth-wrap .tl-auth { margin: 0 auto; max-width: var(--tl-auth-width, 440px); }
.tl-auth-logo { display: block; max-height: 44px; width: auto; margin: 0 0 14px; }
.tl-auth-brand { display: block; font-weight: 800; font-size: 1.2rem; margin: 0 0 12px; color: var(--tl-heading, var(--tl-text)); }
.tl-terms { font-size: .82rem; color: var(--tl-muted); margin: 10px 0 0; text-align: center; }

.tl-split { display: grid; grid-template-columns: 1fr 1fr; max-width: 980px; margin: 24px auto; border-radius: var(--tl-radius); overflow: hidden; border: 1px solid var(--tl-border); box-shadow: var(--tl-shadow); background: var(--tl-surface); }
.tl-split .tl-auth { box-shadow: none; border: 0; border-radius: 0; margin: 0; max-width: none; align-self: center; width: 100%; }
.tl-split-side { position: relative; min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; padding: 32px; color: #fff; background-size: cover; background-position: center; }
.tl-split-side::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.55)); }
.tl-split-side > * { position: relative; }
.tl-split-side h2 { color: #fff; font-size: 1.6rem; margin: 0 0 8px; line-height: 1.25; }
.tl-split-side p { margin: 0; opacity: .9; }
.tl-split.is-right .tl-split-side { order: 2; }
@media (max-width: 760px) {
  .tl-split { grid-template-columns: 1fr; margin: 12px auto; }
  .tl-split-side { min-height: 160px; padding: 20px; }
  .tl-split.is-right .tl-split-side { order: 0; }
}

.tl-float-toggle { position: fixed; bottom: 18px; z-index: 99990; }
.tl-float-toggle.is-right { right: 18px; }
.tl-float-toggle.is-left { left: 18px; }
.tl-theme-toggle-float { width: 46px; height: 46px; box-shadow: var(--tl-shadow); }

.tl-account-sections > * { margin-bottom: 16px; }

/* ---------- Tool limits: popup, usage line, plan card ---------- */
.tl-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(4, 10, 20, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tl-modal-box { width: 100%; max-width: 420px; text-align: center; }
.tl-modal-box p { margin: 0 0 18px; color: var(--tl-muted); }
.tl-modal-actions { display: flex; flex-direction: column; gap: 8px; }
.tl-modal-actions .tl-btn-ghost { width: 100%; }
.tl-usage { font-size: .9rem; color: var(--tl-muted); margin: 8px 0; }
.tl-usage.is-empty { color: var(--tl-danger); font-weight: 600; }
.tl-plan-card { margin-top: 16px; }
.tl-plan-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.tl-plan-top .tl-subtitle { margin: 2px 0 0; }
.tl-meter { height: 10px; border-radius: 999px; background: var(--tl-surface-2); overflow: hidden; margin: 6px 0 8px; }
.tl-meter span { display: block; height: 100%; background: var(--tl-accent); border-radius: inherit; }
.tl-small { font-size: .82rem; }

/* ================= Customer portal ================= */
body.tl-portal-body { margin: 0; background: var(--tl-bg); color: var(--tl-text); font-family: var(--tl-font); -webkit-font-smoothing: antialiased; }
body.tl-portal-body img { max-width: 100%; }
.tl-portal { --tl-p-side: 232px; background: var(--tl-bg); color: var(--tl-text); }
.tl-portal.is-full, .tl-portal-guest { min-height: 100vh; min-height: 100dvh; }
.tl-p-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; padding: 0 max(16px, calc((100vw - 1240px) / 2)); background: color-mix(in srgb, var(--tl-surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--tl-border); }
.tl-portal:not(.is-full) .tl-p-top { position: static; padding: 0 16px; border: 1px solid var(--tl-border); border-radius: var(--tl-radius) var(--tl-radius) 0 0; }
.tl-p-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tl-text); font-size: 17px; }
.tl-p-logo { height: 34px; width: auto; }
.tl-p-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--tl-accent); color: #fff; display: grid; place-items: center; font-weight: 800; }
.tl-p-top-right { display: flex; align-items: center; gap: 8px; }
.tl-p-back { display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 10px; color: var(--tl-muted); text-decoration: none; font-size: 14px; }
.tl-p-back:hover { background: var(--tl-surface-2); color: var(--tl-text); }
.tl-p-me { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--tl-border); background: var(--tl-surface); color: var(--tl-text); font: inherit; font-size: 14px; cursor: pointer; }
.tl-p-me img { width: 32px; height: 32px; border-radius: 50%; }
.tl-p-body { display: grid; grid-template-columns: var(--tl-p-side) minmax(0, 1fr); gap: 28px; max-width: 1240px; margin: 0 auto; padding: 28px 16px 48px; align-items: start; }
.tl-p-nav { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 4px; }
.tl-p-nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--tl-muted); text-decoration: none; font-weight: 550; font-size: 15px; transition: background .15s, color .15s; }
.tl-p-nav-item:hover { background: var(--tl-surface-2); color: var(--tl-text); }
.tl-p-nav-item.is-active { background: color-mix(in srgb, var(--tl-accent) 14%, transparent); color: var(--tl-text); }
.tl-p-nav-item.is-active .tl-i { color: var(--tl-accent); }
.tl-p-tabbar { display: none; }
.tl-p-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.tl-p-main > .tl-alert { margin: 0; }
.tl-p-main .tl-card { margin: 0; }
.tl-p-head .tl-title { font-size: 1.7rem; margin: 0 0 4px; }
.tl-p-head p { margin: 0; }
.tl-p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tl-p-stat { padding: 16px 18px; }
.tl-p-stat span { display: block; color: var(--tl-muted); font-size: .85rem; }
.tl-p-stat strong { display: block; font-size: 1.7rem; line-height: 1.2; margin-top: 4px; }
.tl-p-stat strong.tl-p-date { font-size: 1.25rem; }
.tl-p-stat em { font-style: normal; color: var(--tl-muted); font-size: .8rem; }
.tl-p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.tl-p-grid > div { display: flex; flex-direction: column; gap: 16px; }
.tl-p-list { list-style: none; margin: 0; padding: 0; }
.tl-p-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--tl-border); }
.tl-p-list li:last-child { border-bottom: 0; }
.tl-p-section-title { margin: 8px 0 0; }
.tl-p-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tl-p-tool { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--tl-text); padding: 16px 18px; transition: border-color .15s, transform .15s; }
.tl-p-tool:hover { border-color: var(--tl-accent); transform: translateY(-1px); }
.tl-p-bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.tl-p-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; background: var(--tl-surface-2); border-radius: 4px; overflow: hidden; }
.tl-p-bar i { display: block; width: 100%; background: var(--tl-accent); border-radius: 4px 4px 0 0; }
.tl-p-table { width: 100%; border-collapse: collapse; }
.tl-p-table th, .tl-p-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--tl-border); font-size: .92rem; }
.tl-p-table th { color: var(--tl-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.tl-p-table tr:last-child td { border-bottom: 0; }
.tl-p-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tl-p-plan { display: flex; flex-direction: column; gap: 6px; }
.tl-p-plan .tl-plan-top { margin: 0; }
.tl-p-plan.is-current { border-color: var(--tl-accent); box-shadow: 0 0 0 1px var(--tl-accent); }
.tl-p-plan-big { font-size: 1.9rem; font-weight: 750; line-height: 1.15; }
.tl-p-plan-big small { font-size: .85rem; font-weight: 500; color: var(--tl-muted); }
.tl-p-facts { margin: 4px 0 10px; padding: 0; list-style: none; color: var(--tl-muted); font-size: .9rem; }
.tl-p-facts li { padding: 3px 0; }
.tl-p-plan .tl-btn { margin-top: auto; }
.tl-p-identity { display: flex; align-items: center; gap: 14px; }
.tl-p-identity p { margin: 2px 0 0; }
.tl-btn-block { width: 100%; }
.tl-portal .tl-plan-card { margin-top: 0; }
.tl-p-guest-main { padding: 32px 16px 48px; }

@media (max-width: 860px) {
  .tl-p-body { grid-template-columns: 1fr; gap: 0; padding: 16px 14px 96px; }
  .tl-p-nav { display: none; }
  .tl-p-grid { grid-template-columns: 1fr; }
  .tl-p-back span, .tl-p-me span { display: none; }
  .tl-p-me { padding: 0 4px; }
  .tl-p-top { height: 56px; }
  .tl-portal.is-full .tl-p-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--tl-surface); border-top: 1px solid var(--tl-border); box-shadow: 0 -4px 20px rgba(0,0,0,.06); }
  .tl-portal.is-full .tl-p-tabbar .tl-p-nav-item { flex: 1; flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 11px; border-radius: 10px; text-align: center; min-width: 0; }
  .tl-portal.is-full .tl-p-tabbar .tl-p-nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .tl-portal:not(.is-full) .tl-p-tabbar { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px; border-bottom: 1px solid var(--tl-border); order: -1; }
  .tl-portal:not(.is-full) .tl-p-tabbar .tl-p-nav-item { white-space: nowrap; padding: 8px 12px; }
  .tl-portal:not(.is-full) { display: flex; flex-direction: column; }
  .tl-portal:not(.is-full) .tl-p-top { order: -2; }
  .tl-portal:not(.is-full) .tl-p-body { padding-bottom: 24px; }
  .tl-p-stats { grid-template-columns: 1fr 1fr; }
  .tl-p-stat strong { font-size: 1.4rem; }
}
.tl-p-main form[data-tl-form="profile"] > .tl-subtitle:first-child { display: none; }
/* Keep portal navigation colors when site-wide dark mode colors every link. */
html .tl-portal a.tl-p-nav-item, html .tl-portal a.tl-p-back { color: var(--tl-muted); }
html .tl-portal a.tl-p-nav-item.is-active, html .tl-portal a.tl-p-nav-item:hover, html .tl-portal a.tl-p-brand, html .tl-portal-guest a.tl-p-brand, html .tl-portal a.tl-p-tool { color: var(--tl-text); }

/* ---------- Portal 1.4: hero, notices, onboarding, favorites, tools, activity ---------- */
.tl-p-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 28px; border-radius: calc(var(--tl-radius) + 4px); color: #fff; background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--tl-accent) 75%, transparent) 0%, transparent 55%), linear-gradient(135deg, var(--tl-primary) 0%, color-mix(in srgb, var(--tl-primary) 70%, var(--tl-accent)) 100%); }
.tl-p-hero h1 { margin: 0 0 8px; font-size: 1.8rem; line-height: 1.2; color: #fff; }
.tl-p-hero p { margin: 0 0 14px; color: rgba(255,255,255,.88); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-p-hero-text { flex: 1 1 300px; }
.tl-p-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font-weight: 650; font-size: .85rem; }
.tl-portal a.tl-p-hero-btn, .tl-p-hero-btn { width: auto; background: #fff; color: var(--tl-primary) !important; min-height: 40px; }
.tl-p-hero-search { flex: 1 1 260px; max-width: 380px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 0 12px; color: #fff; }
.tl-p-hero-search input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: #fff; font: inherit; font-size: 15px; outline: none; }
.tl-p-hero-search input::placeholder { color: rgba(255,255,255,.75); }
.tl-p-notice { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--tl-radius); border: 1px solid var(--tl-border); border-left: 4px solid var(--tl-accent); background: var(--tl-surface); }
.tl-p-notice.is-warning { border-left-color: #f59e0b; }
.tl-p-notice.is-success { border-left-color: #10b981; }
.tl-p-notice.is-info { border-left-color: #3b82f6; }
.tl-p-notice p { margin: 4px 0 10px; color: var(--tl-muted); }
.tl-p-x { border: 0; background: transparent; color: var(--tl-muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; height: 28px; }
.tl-link-btn { border: 0; background: transparent; color: var(--tl-muted); cursor: pointer; font: inherit; font-size: .85rem; text-decoration: underline; }
.tl-p-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.tl-p-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--tl-surface-2); }
.tl-p-steps li.is-done { color: var(--tl-muted); text-decoration: line-through; }
.tl-p-steps a { color: var(--tl-text) !important; font-weight: 600; text-decoration: none; }
.tl-p-check { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--tl-border); display: grid; place-items: center; }
.tl-p-steps li.is-done .tl-p-check { background: var(--tl-accent); border-color: var(--tl-accent); color: #fff; }
.tl-p-check .tl-i { width: 14px; height: 14px; }
.tl-p-tool { position: relative; padding: 0; }
.tl-portal a.tl-p-tool-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 44px 16px 18px; color: var(--tl-text); text-decoration: none; height: 100%; }
.tl-p-star { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--tl-muted); display: grid; place-items: center; cursor: pointer; }
.tl-p-star:hover { background: var(--tl-surface-2); }
.tl-p-star.is-on { color: #f5b301; }
.tl-p-star.is-on svg path { fill: currentColor; }
.tl-p-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tl-p-toolbar { display: flex; flex-direction: column; gap: 10px; }
.tl-p-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--tl-border); border-radius: 12px; background: var(--tl-surface); color: var(--tl-muted); }
.tl-p-search input { flex: 1; height: 46px; border: 0; background: transparent; color: var(--tl-text); font: inherit; font-size: 16px; outline: none; }
.tl-p-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tl-p-chip { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--tl-border); background: var(--tl-surface); color: var(--tl-text); font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.tl-p-chip.is-on { background: var(--tl-accent); border-color: var(--tl-accent); color: #fff; }
.tl-p-timeline { list-style: none; margin: 0; padding: 0; }
.tl-p-timeline li { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.tl-p-timeline li.tl-p-day { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tl-muted); font-weight: 700; padding-top: 16px; }
.tl-p-timeline li.tl-p-day:first-child { padding-top: 0; }
.tl-p-dot { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--tl-surface-2); display: grid; place-items: center; color: var(--tl-accent); }
.tl-p-dot .tl-i { width: 16px; height: 16px; }
.tl-p-what { flex: 1; min-width: 0; }
.tl-p-bell { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--tl-text); border: 1px solid var(--tl-border); background: var(--tl-surface); }
.tl-portal a.tl-p-bell { color: var(--tl-text); }
.tl-p-bell b { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.tl-p-preview { background: #fff7e0; color: #7a5200; padding: 10px 16px; text-align: center; font-size: .92rem; border-bottom: 1px solid #f5d98b; }
.tl-p-preview a { color: inherit; font-weight: 700; }
.tl-portal.is-preview form, .tl-portal.is-preview [data-tl-fav], .tl-portal.is-preview [data-tl-signout-others] { opacity: .65; }
@media (max-width: 860px) {
  .tl-p-hero { padding: 20px; }
  .tl-p-hero h1 { font-size: 1.45rem; }
  .tl-p-hero-search { max-width: none; }
  .tl-portal.is-full .tl-p-tabbar { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .tl-portal.is-full .tl-p-tabbar .tl-p-nav-item { flex: 0 0 auto; min-width: 72px; }
}

/* ---------- Tool inside the dashboard ---------- */
.tl-p-runner-head { display: flex; flex-direction: column; gap: 6px; }
.tl-portal a.tl-p-crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--tl-muted); text-decoration: none; font-size: .9rem; width: fit-content; }
.tl-p-runner-title { display: flex; align-items: center; gap: 10px; }
.tl-p-runner-title .tl-title { margin: 0; }
.tl-p-runner-title .tl-p-star { position: static; }
.tl-p-runner { overflow-x: auto; }
.tl-p-runner input[type=file] { max-width: 100%; }

/* ---------- Ads & affiliate ---------- */
.tl-ad { margin: 16px 0; text-align: center; min-height: 90px; }
.tl-ad-label { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tl-muted); margin-bottom: 4px; }
.tl-p-copy { display: flex; gap: 8px; }
.tl-p-copy input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--tl-border); border-radius: 10px; background: var(--tl-surface-2); color: var(--tl-text); font: inherit; font-size: 14px; }
.tl-p-copy .tl-btn { width: auto; }

/* ---------- 1.7 Billing, pricing, wallet ---------- */
.tl-p-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tl-p-flash { padding: 12px 14px; border-radius: var(--tl-radius); background: var(--tl-surface-2); border: 1px solid var(--tl-border); margin: 0 0 14px; }
.tl-p-flash.is-ok { background: var(--tl-ok-bg); color: var(--tl-ok); border-color: transparent; font-weight: 600; }
.tl-p-flash.is-bad { background: var(--tl-danger-bg); color: var(--tl-danger); border-color: transparent; }
.tl-badge.is-bad { background: var(--tl-danger-bg); color: var(--tl-danger); }
.tl-center { text-align: center; }
.tl-p-mini { margin: 16px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tl-muted); }
.tl-bill-plan { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
.tl-bill-plan strong { font-size: 1.35rem; }
.tl-wallet-big { font-size: 2rem; font-weight: 800; line-height: 1.15; margin: 6px 0; color: var(--tl-text); }
.tl-packs { display: grid; gap: 8px; }
.tl-pack { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--tl-border); border-radius: calc(var(--tl-radius) - 2px); background: var(--tl-surface-2); }
.tl-pack strong { flex: 1; }
.tl-num { text-align: right; font-weight: 700; white-space: nowrap; }
.tl-num.is-plus { color: var(--tl-ok); }
.tl-p-table-card { overflow-x: auto; }
.tl-sim { position: relative; border: 2px dashed var(--tl-accent); margin-bottom: 16px; }
.tl-sim-tag { position: absolute; top: 12px; right: 12px; background: var(--tl-accent); color: #fff; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; letter-spacing: .08em; }
.tl-sim-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--tl-border); border-bottom: 1px solid var(--tl-border); margin: 10px 0; }

.tl-pricing { margin: 6px 0 18px; }
.tl-price-toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--tl-surface-2); border: 1px solid var(--tl-border); margin: 0 0 16px; }
.tl-price-toggle button { border: 0; background: transparent; color: var(--tl-muted); padding: 7px 16px; border-radius: 999px; font: inherit; font-weight: 650; cursor: pointer; }
.tl-price-toggle button.is-on { background: var(--tl-surface); color: var(--tl-text); box-shadow: var(--tl-shadow); }
.tl-price-toggle em { font-style: normal; font-size: .75rem; color: var(--tl-accent); margin-left: 4px; }
.tl-price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: stretch; }
.tl-pcard { position: relative; display: flex; flex-direction: column; gap: 8px; }
.tl-pcard .tl-plan-top { margin: 0; }
.tl-pcard.is-hot { border-color: var(--tl-accent); box-shadow: 0 0 0 1px var(--tl-accent), var(--tl-shadow); }
.tl-pcard.is-current { border-color: var(--tl-accent); }
.tl-pcard-hot { position: absolute; top: -11px; left: 18px; background: var(--tl-accent); color: #fff; font-size: .75rem; padding: 2px 10px; border-radius: 99px; }
.tl-price { min-height: 2.6rem; }
.tl-price strong { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.tl-price small { color: var(--tl-muted); }
.tl-pricing[data-interval="month"] .tl-pcard[data-has-month="1"] .tl-py,
.tl-pricing[data-interval="year"] .tl-pcard[data-has-year="1"] .tl-pm { display: none; }
.tl-ptrial { margin: 0; color: var(--tl-accent); font-weight: 650; font-size: .88rem; }
.tl-pfacts { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.tl-pfacts li { padding-left: 22px; position: relative; }
.tl-pfacts li::before { content: "✓"; position: absolute; left: 0; color: var(--tl-accent); font-weight: 800; }
.tl-pcard .tl-btn, .tl-pcard > p:last-child { margin-top: auto; }
.tl-pricing-page { max-width: 1100px; margin: 0 auto; }
.tl-p-actions .tl-btn { width: auto; flex: 0 0 auto; }

/* ---------- 1.8 Public profiles ---------- */
.tl-pp-main { width: 100%; }
.tl-pp { max-width: 1040px; margin: 24px auto 48px; padding: 0 16px; box-sizing: border-box; }
.tl-pp *, .tl-pp *::before, .tl-pp *::after { box-sizing: border-box; }
.tl-pp-crumbs { font-size: .85rem; color: var(--tl-muted); margin: 0 0 12px; }
.tl-pp-crumbs a { color: var(--tl-muted); text-decoration: none; }
.tl-pp-crumbs a:hover { color: var(--tl-accent); }
.tl-pp-ownerbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--tl-radius); background: var(--tl-surface-2); border: 1px dashed var(--tl-border); margin-bottom: 14px; font-size: .9rem; }
.tl-pp-ownerbar .tl-btn { width: auto; }
.tl-pp-hero { padding: 0; overflow: hidden; }
.tl-pp-cover { height: 120px; background: linear-gradient(120deg, var(--tl-primary), var(--tl-accent)); }
.tl-pp-id { display: flex; gap: 22px; padding: 0 28px 26px; align-items: flex-start; flex-wrap: wrap; }
.tl-pp-id > .tl-pp-avatar { margin-top: -60px; border: 4px solid var(--tl-surface); box-shadow: var(--tl-shadow); }
.tl-pp-avatar { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; flex: 0 0 auto; }
.tl-pp-who { flex: 1; min-width: 240px; padding-top: 14px; }
.tl-pp-name { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; letter-spacing: -.02em; color: var(--tl-text); }
.tl-pp-badge { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--tl-accent); color: #fff; font-size: 13px; align-items: center; justify-content: center; vertical-align: middle; }
.tl-pp-handle { color: var(--tl-muted); margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-pp-headline { margin: 10px 0 0; font-size: 1.08rem; color: var(--tl-text); }
.tl-pp-meta { margin: 8px 0 0; display: flex; gap: 16px; flex-wrap: wrap; color: var(--tl-muted); font-size: .9rem; }
.tl-pp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tl-pp-actions .tl-btn { width: auto; }
.tl-pp-copy { position: relative; display: inline-flex; }
.tl-pp-copy input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.tl-pp-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.tl-pp-col { display: grid; gap: 16px; }
.tl-pp-col > .tl-card { margin: 0; }
.tl-pp-bio { line-height: 1.7; color: var(--tl-text); overflow-wrap: anywhere; }
.tl-pp-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tl-pp-links li { display: grid; gap: 2px; }
.tl-pp-links span { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tl-muted); }
.tl-pp-links a { color: var(--tl-accent); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.tl-pp-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tl-pp-tool { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--tl-border); border-radius: calc(var(--tl-radius) - 2px); text-decoration: none; color: var(--tl-text); background: var(--tl-surface-2); }
.tl-pp-tool:hover { border-color: var(--tl-accent); }
.tl-pp-tool span { font-size: .8rem; color: var(--tl-muted); }
.tl-pp-cta { background: linear-gradient(160deg, var(--tl-surface), var(--tl-surface-2)); border-color: var(--tl-accent); }
.tl-pp-more { margin-top: 28px; }
.tl-pp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tl-pp-card { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--tl-text); margin: 0; padding: 14px; }
.tl-pp-card:hover { border-color: var(--tl-accent); }
.tl-pp-card-text { display: grid; gap: 1px; min-width: 0; }
.tl-pp-card-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-pp-card-text em { font-style: normal; font-size: .82rem; color: var(--tl-muted); }
.tl-pp-card-text span { font-size: .85rem; color: var(--tl-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-pp-dir-head { margin: 8px 0 16px; }
.tl-pp-search { margin: 0 0 16px; max-width: 420px; }
.tl-pp-pager { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; }
.tl-pp-pager .tl-btn { width: auto; }
.tl-pp-dir .tl-pp-cta { margin-top: 24px; }
.tl-pp-addr { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tl-pp-addr > div { flex: 1; min-width: 260px; }
.tl-pp-addr .tl-p-copy { margin-top: 6px; }
.tl-pp-views { display: inline-flex; align-items: center; gap: 6px; color: var(--tl-muted); font-size: .9rem; }
.tl-pp-photo { display: flex; gap: 16px; align-items: center; }
.tl-pp-photo img { border-radius: 50%; object-fit: cover; }
.tl-pp-photo label.tl-btn { width: auto; display: inline-flex; cursor: pointer; }
.tl-pp-handle-in { display: flex; align-items: stretch; border: 1px solid var(--tl-border); border-radius: 10px; overflow: hidden; background: var(--tl-surface); }
.tl-pp-handle-in em { font-style: normal; padding: 0 10px; display: flex; align-items: center; background: var(--tl-surface-2); color: var(--tl-muted); font-size: .85rem; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.tl-pp-handle-in .tl-input { border: 0; border-radius: 0; margin: 0; }
@media (max-width: 760px) {
  .tl-pp-grid { grid-template-columns: 1fr; }
  .tl-pp-id { padding: 0 18px 20px; gap: 12px; }
  .tl-pp-id > .tl-pp-avatar { width: 96px !important; height: 96px !important; margin-top: -48px; }
  .tl-pp-cover { height: 90px; }
}

/* ---------- 1.9 Community blog ---------- */
.tl-badge.is-wait { background: #fef3c7; color: #92400e; }
.tl-badge.is-draft { background: var(--tl-surface-2); color: var(--tl-muted); }
.tl-bp-note { margin-top: 6px; font-size: .85rem; color: var(--tl-danger); }
.tl-bp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.tl-bp-wrap > .tl-card { margin: 0; }
.tl-bp-title { font-size: 1.15rem; font-weight: 650; }
.tl-editor { border: 1px solid var(--tl-border); border-radius: 10px; overflow: hidden; background: var(--tl-surface); margin-top: 6px; font-weight: 400; }
.tl-editor-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--tl-border); background: var(--tl-surface-2); position: sticky; top: 0; z-index: 2; }
.tl-editor-bar button, .tl-editor-img { border: 0; background: transparent; color: var(--tl-text); padding: 6px 9px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .85rem; line-height: 1; }
.tl-editor-bar button:hover, .tl-editor-img:hover { background: var(--tl-surface); }
.tl-editor-area { min-height: 320px; padding: 16px; outline: none; line-height: 1.7; color: var(--tl-text); overflow-wrap: anywhere; }
.tl-editor-area:empty::before { content: "Start writing…"; color: var(--tl-muted); }
.tl-editor-area h2 { font-size: 1.4rem; margin: 1em 0 .4em; }
.tl-editor-area h3 { font-size: 1.15rem; margin: 1em 0 .4em; }
.tl-editor-area img { max-width: 100%; height: auto; border-radius: 8px; }
.tl-editor-area blockquote { border-left: 3px solid var(--tl-accent); margin: 1em 0; padding: 2px 14px; color: var(--tl-muted); }
.tl-editor-area a { color: var(--tl-accent); }
.tl-editor-foot { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; border-top: 1px solid var(--tl-border); }
.tl-editor-foot .is-low { color: var(--tl-danger); }
.tl-bp-thumb { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.tl-bp-thumb img { width: 160px; height: 90px; object-fit: cover; border-radius: 8px; }
.tl-bp-thumb label.tl-btn { width: auto; cursor: pointer; }
.tl-bp-guide ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--tl-muted); font-size: .9rem; }
.tl-rv { display: grid; gap: 10px; }
.tl-rv-links code { background: var(--tl-surface-2); padding: 1px 6px; border-radius: 4px; }
.tl-rv-body summary { cursor: pointer; color: var(--tl-accent); font-weight: 600; }
.tl-rv-content { line-height: 1.7; margin-top: 8px; overflow-wrap: anywhere; }
.tl-rv-content img, .tl-rv-thumb { max-width: 100%; height: auto; border-radius: 8px; }
.tl-rv .tl-danger { color: var(--tl-danger); }
.tl-pp-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tl-pp-posts li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tl-pp-posts a { color: var(--tl-text); font-weight: 600; text-decoration: none; }
.tl-pp-posts a:hover { color: var(--tl-accent); }
.tl-pp-posts span { color: var(--tl-muted); font-size: .85rem; }
.tl-author-box { display: flex; gap: 16px; align-items: flex-start; margin: 32px 0 8px; padding: 18px; border: 1px solid var(--tl-border); border-radius: var(--tl-radius); background: var(--tl-surface-2); }
.tl-author-box img { border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.tl-author-box strong { display: block; font-size: 1.05rem; margin: 2px 0 4px; color: var(--tl-text); }
.tl-author-box p { margin: 0 0 6px; color: var(--tl-muted); }
@media (max-width: 860px) { .tl-bp-wrap { grid-template-columns: 1fr; } }
.tl-editor-wp { border: 0; overflow: visible; background: transparent; }
.tl-editor-wp .tl-editor-tools { margin: 0 0 6px; }
.tl-editor-wp .tl-editor-tools label { cursor: pointer; width: auto; }
.tl-editor-wp .wp-editor-wrap { border: 1px solid var(--tl-border); border-radius: 10px; overflow: hidden; }
.tl-editor-wp .wp-editor-tabs { float: right; }
.tl-editor-wp .wp-switch-editor { border-radius: 6px 6px 0 0; font-size: 13px; }
.tl-editor-wp .mce-panel { background: var(--tl-surface-2) !important; }
.tl-editor-wp .wp-editor-area { color: #1f2937; }
.tl-editor-wp .tl-editor-foot { border-top: 0; padding: 6px 2px; }

/* ---------- 2.0 Support / team / work ---------- */
.tl-thread { display: grid; gap: 12px; }
.tl-msg { padding: 12px 14px; border-radius: 12px; background: var(--tl-surface-2); border: 1px solid var(--tl-border); max-width: 88%; overflow-wrap: anywhere; }
.tl-msg.is-mine { margin-left: auto; background: var(--tl-ok-bg); border-color: transparent; }
.tl-msg-head { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--tl-muted); margin-bottom: 4px; }
.tl-msg-head strong { color: var(--tl-text); }
.tl-p-notice-info { border-left: 4px solid var(--tl-accent); }
.tl-p-notice-info p { margin: 4px 0 0; color: var(--tl-muted); }

/* 2.5.1 — pay-as-you-go card, Earn page, invite friends */
.tl-pcard-credits .tl-packs-card { margin-top: auto; gap: 6px; }
.tl-pcard-credits .tl-pack { padding: 8px 10px; gap: 8px; font-size: .92rem; }
.tl-pcard-credits .tl-pack .tl-btn { margin-top: 0; }
.tl-pack-save { font-style: normal; font-size: .75rem; font-weight: 700; color: #059669; background: rgba(16,185,129,.12); padding: 1px 6px; border-radius: 99px; }
.tl-aff-rewards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tl-aff-reward { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.tl-aff-reward strong { display: block; font-size: 1.02rem; }
.tl-aff-reward span.tl-small { display: block; }
.tl-aff-ico { font-size: 1.6rem; line-height: 1; }
.tl-aff-link .tl-aff-copy input { height: 46px; font-size: 15px; font-weight: 600; }
.tl-aff-link .tl-aff-copy .tl-btn { height: 46px; padding: 0 22px; }
.tl-aff-share { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.tl-aff-edit { margin-top: 6px; }
.tl-aff-edit summary { cursor: pointer; color: var(--tl-accent); font-weight: 600; font-size: .9rem; }
.tl-aff-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.tl-aff-form .tl-input { width: 200px; max-width: 100%; }
.tl-aff-prefix { color: var(--tl-muted); font-size: .9rem; }
.tl-aff-steps { margin: 0 0 8px 18px; padding: 0; display: grid; gap: 6px; }
.tl-invite-form { display: grid; gap: 8px; max-width: 520px; }
.tl-invite-form .tl-input { width: 100%; }
@media (max-width: 600px) { .tl-aff-link .tl-aff-copy { flex-direction: column; } }
