/* TuneM3U design system v10 — blue gradient banners, per-tool colour, colourful tools, Bricolage Grotesque + Figtree. Loaded after each page's own <style>, so it wins. */

/* ── Tokens: light ── */
html[data-theme="light"] {
  --accent:#0B63CE; --accent-strong:#0A52AB; --accent-soft:rgba(11,99,206,.09); --accent-text:#0A52AB; --on-accent:#FFFFFF;
  --green:#1C7C4E; --green-light:rgba(28,124,78,.10);
  --red:#C2303B;   --red-light:rgba(194,48,59,.09);
  --amber:#9A5B00; --amber-light:rgba(196,120,0,.12);
  --bg:#F7F9FC; --bg2:#EFF3F8;
  --surface:#FFFFFF; --surface2:#F3F6FA; --surface3:#E8EEF5;
  --border:rgba(20,40,70,.10); --border-mid:rgba(20,40,70,.20);
  --text:#121A26; --muted:#4F5B6B; --hint:#6B7889;
  --nav-bg:rgba(247,249,252,.80);
  --shadow:rgba(20,40,70,.18);
  --input-bg:#FFFFFF; --result-bg:#F7F9FC;
  --table-alt:#F7F9FC; --table-hover:#EFF3F8;
  --code-bg:#EFF3F8; --mono-bg:#EFF3F8;
  --ink:#121A26; --on-ink:#F7F9FC;
  --card-shadow:0 1px 2px rgba(20,40,70,.05), 0 8px 24px -12px rgba(20,40,70,.14);
  --lift-shadow:0 2px 4px rgba(20,40,70,.05), 0 22px 44px -18px rgba(20,40,70,.26);
}

/* ── Tokens: dark ── */
html[data-theme="dark"] {
  --accent:#7DB4FF; --accent-strong:#A3CBFF; --accent-soft:rgba(125,180,255,.14); --accent-text:#9CC6FF; --on-accent:#06152E;
  --green:#5FD39A; --green-light:rgba(95,211,154,.13);
  --red:#FF8A92;   --red-light:rgba(255,138,146,.13);
  --amber:#F5B547; --amber-light:rgba(245,181,71,.13);
  --bg:#0E131B; --bg2:#121923;
  --surface:#151C27; --surface2:#1C2532; --surface3:#253041;
  --border:rgba(225,238,255,.09); --border-mid:rgba(225,238,255,.19);
  --text:#EAF0F7; --muted:#A3AFBE; --hint:#7C899A;
  --nav-bg:rgba(14,19,27,.78);
  --shadow:rgba(0,0,0,.55);
  --input-bg:#101722; --result-bg:#101722;
  --table-alt:#121923; --table-hover:#1C2532;
  --code-bg:#101722; --mono-bg:#101722;
  --ink:#EAF0F7; --on-ink:#0E131B;
  --card-shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 12px 30px -16px rgba(0,0,0,.6);
  --lift-shadow:0 1px 0 rgba(255,255,255,.04) inset, 0 26px 50px -20px rgba(0,0,0,.75);
}

/* ── Banner colours: default (home / legal) ── */
html[data-theme] {
  --hg-1:#06214A; --hg-2:#0A4DB8; --hg-3:#0891B2;
  --hg-a:rgba(56,224,200,.42); --hg-b:rgba(60,130,255,.55);
  --hg-shadow:rgba(10,77,184,.60); --hg-cta:#0A3D8F;
}
/* ── Per-tool colours: banner + accent (buttons, focus, tabs) ── */
body[data-tool="bulk"] { --hg-1:#032F2E; --hg-2:#0B7A70; --hg-3:#14B8A6; --hg-a:rgba(130,255,225,.40); --hg-b:rgba(10,140,130,.60); --hg-shadow:rgba(11,122,112,.60); }
body[data-tool="m3u"]  { --hg-1:#0B1F5C; --hg-2:#1D4ED8; --hg-3:#3B82F6; --hg-a:rgba(120,205,255,.45); --hg-b:rgba(50,90,255,.55); --hg-shadow:rgba(29,78,216,.60); }
body[data-tool="ids"]  { --hg-1:#4D0A26; --hg-2:#BE1E56; --hg-3:#F0568C; --hg-a:rgba(255,175,120,.45); --hg-b:rgba(220,40,110,.55); --hg-shadow:rgba(190,30,86,.55); }
body[data-tool="od"]   { --hg-1:#4A1803; --hg-2:#D9480F; --hg-3:#FF8A3D; --hg-a:rgba(255,215,100,.45); --hg-b:rgba(230,80,20,.55); --hg-shadow:rgba(217,72,15,.55); }

html[data-theme="light"] body[data-tool="bulk"] { --accent:#0B7A70; --accent-strong:#096860; --accent-soft:rgba(11,122,112,.10); --accent-text:#096860; }
html[data-theme="light"] body[data-tool="m3u"]  { --accent:#1D4ED8; --accent-strong:#1A44BC; --accent-soft:rgba(29,78,216,.09); --accent-text:#1A44BC; }
html[data-theme="light"] body[data-tool="ids"]  { --accent:#BE1E56; --accent-strong:#A31948; --accent-soft:rgba(190,30,86,.09); --accent-text:#A31948; }
html[data-theme="light"] body[data-tool="od"]   { --accent:#C2410C; --accent-strong:#A63608; --accent-soft:rgba(217,72,15,.10); --accent-text:#A63608; }
html[data-theme="dark"] body[data-tool="bulk"]  { --accent:#4FE0CC; --accent-strong:#8AF0E1; --accent-soft:rgba(79,224,204,.14); --accent-text:#6FE9D7; }
html[data-theme="dark"] body[data-tool="m3u"]   { --accent:#7FA8FF; --accent-strong:#A9C4FF; --accent-soft:rgba(127,168,255,.15); --accent-text:#A3C0FF; }
html[data-theme="dark"] body[data-tool="ids"]   { --accent:#FF8FB5; --accent-strong:#FFB3CD; --accent-soft:rgba(255,143,181,.14); --accent-text:#FFA8C6; }
html[data-theme="dark"] body[data-tool="od"]    { --accent:#FFA765; --accent-strong:#FFC194; --accent-soft:rgba(255,167,101,.14); --accent-text:#FFB683; }

/* Existing pages use --blue*, so map to accent */
body { --blue:var(--accent); --blue-light:var(--accent-soft); --blue-text:var(--accent-text); --blue-mid:var(--accent-text); }

html[data-theme] {
  --nav-h:68px;
  --radius-md:12px; --radius-lg:18px; --radius-xl:26px;
  --font:'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display:'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --mono:ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ── Base ── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family:var(--font); font-size:16px; line-height:1.65; color:var(--text);
  background-color:var(--bg); background-image:radial-gradient(70% 560px at 50% 0, var(--accent-soft), transparent 75%); background-repeat:no-repeat;
  padding-top:0; min-height:100vh;
  display:flex; flex-direction:column; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
body > .page, body > main { flex:1 0 auto; width:100%; }
body { overflow-x:hidden; }
h1, h2, h3 { font-family:var(--display); letter-spacing:-0.03em; font-weight:700; }
a { color:inherit; }
::selection { background:var(--accent); color:var(--on-accent); }
:focus-visible { outline:2px solid var(--accent) !important; outline-offset:2px; }

/* No shouting: neutralise uppercase labels everywhere (page styles and inline styles) */
th, label, .card-title, .info-label, .section-label, .field-section-label, [style*="text-transform:uppercase"], [style*="text-transform: uppercase"] {
  text-transform:none !important; letter-spacing:0 !important;
}
.src-chip, .src-badge, code, pre, .code-block { font-family:var(--mono); }

/* ── Header ── */
.site-header {
  position:sticky; top:0; z-index:200; padding:0;
  background:var(--nav-bg); border-bottom:1px solid var(--border);
  -webkit-backdrop-filter:blur(16px) saturate(1.4); backdrop-filter:blur(16px) saturate(1.4);
}
.site-header-inner {
  max-width:1160px; margin:0 auto; height:var(--nav-h);
  padding:0 28px; display:flex; align-items:center; gap:28px;
}
.brand {
  display:inline-flex; align-items:center;
  font-family:var(--display); font-weight:800; font-size:20px; letter-spacing:-0.045em;
  color:var(--text); text-decoration:none;
}
.site-links { display:flex; align-items:center; gap:4px; margin-left:auto; }
.site-links a {
  font-size:14.5px; font-weight:500; color:var(--muted); text-decoration:none;
  padding:9px 14px; border-radius:999px; transition:color .15s, background .15s;
}
.site-links a:hover { color:var(--text); background:var(--surface2); }
.site-links a[aria-current="page"] { color:var(--accent-text); font-weight:600; background:var(--accent-soft); }

/* Icon-font-free toggle + hamburger (drawn with masks so they always render) */
.theme-toggle i, .hamburger i { display:none !important; }
.theme-toggle, .hamburger { position:relative; }
.theme-toggle::before, .hamburger::before {
  content:""; width:18px; height:18px; background:currentColor;
  -webkit-mask:var(--glyph) center/contain no-repeat; mask:var(--glyph) center/contain no-repeat;
}
html[data-theme="light"] .theme-toggle { --glyph:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E"); }
html[data-theme="dark"] .theme-toggle { --glyph:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.hamburger { --glyph:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E"); }

.site-header .theme-toggle {
  width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px; border:1px solid var(--border-mid); background:var(--surface); color:var(--muted);
  cursor:pointer; transition:background .15s, color .15s, border-color .15s;
}
.site-header .theme-toggle:hover { background:var(--surface2); color:var(--text); }

.site-header .hamburger {
  display:none; margin-left:auto; width:42px; height:42px; align-items:center; justify-content:center;
  background:var(--surface); border:1px solid var(--border-mid); border-radius:999px; color:var(--text); cursor:pointer;
}
.site-header .mobile-menu {
  display:none; flex-direction:column; gap:2px; position:absolute; top:100%; left:0; right:0;
  background:var(--surface); border-bottom:1px solid var(--border); padding:10px 16px 16px;
  box-shadow:0 24px 32px -20px var(--shadow);
}
.site-header .mobile-menu.open { display:flex; }
.site-header .mobile-menu a {
  display:block; padding:13px 14px; border-radius:12px; font-size:15.5px; font-weight:500; color:var(--text); text-decoration:none;
}
.site-header .mobile-menu a:hover, .site-header .mobile-menu a[aria-current="page"] { background:var(--accent-soft); color:var(--accent-text); }
.site-header .mobile-theme-row {
  display:flex; align-items:center; justify-content:space-between; margin-top:8px; padding:12px 14px 0;
  border-top:1px solid var(--border); font-size:14.5px; font-weight:500; color:var(--muted);
}
.site-header .mobile-theme-row span { display:inline-flex; align-items:center; gap:8px; }
.site-header .mobile-theme-row span i { display:none !important; }
@media (max-width:860px) {
  .site-links, .site-header-inner > .theme-toggle { display:none; }
  .site-header .hamburger { display:inline-flex; }
}

/* ── Footer ── */
.site-footer { margin-top:112px; border-top:1px solid var(--border); background:var(--bg2); flex-shrink:0; padding:0; }
.site-footer-inner {
  max-width:1160px; margin:0 auto; padding:36px 28px;
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px 32px;
}
.site-footer .brand { font-size:17px; }
.footer-links { display:flex; flex-wrap:wrap; gap:8px 26px; }
.footer-links a { font-size:14px; font-weight:500; color:var(--muted); text-decoration:none; }
.footer-links a:hover { color:var(--accent-text); }
.footer-copy { font-size:13.5px; color:var(--hint); }

/* ── Page shell ── */
.page { max-width:1160px; margin:0 auto; padding:28px 28px 0; }
.page-hero { display:block; width:100%; max-width:1160px; margin:0 auto; padding:36px 28px 0; }
.hero-card, .hero-panel {
  position:relative; display:block; overflow:hidden; color:#fff; isolation:isolate;
  padding:48px 52px; border-radius:var(--radius-xl); border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(55% 110% at 100% 0%, var(--hg-a), transparent 62%),
    radial-gradient(50% 90% at 0% 100%, var(--hg-b), transparent 60%),
    linear-gradient(135deg,var(--hg-1) 0%,var(--hg-2) 58%,var(--hg-3) 100%);
  box-shadow:0 34px 60px -34px var(--hg-shadow);
}
.hero-card::before, .hero-panel::before {
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.4px); background-size:22px 22px;
  -webkit-mask-image:linear-gradient(100deg, transparent 20%, #000 100%); mask-image:linear-gradient(100deg, transparent 20%, #000 100%);
}
.page-hero .hero-card { display:flex; align-items:center; gap:28px; }
.page-hero .hero-icon {
  display:flex; align-items:center; justify-content:center; flex:none; width:76px; height:76px; border-radius:24px;
  background:rgba(255,255,255,.15); box-shadow:inset 0 0 0 1px rgba(255,255,255,.32), 0 16px 30px -14px rgba(0,0,0,.45);
  color:#fff; font-size:36px;
}
.page-hero .hero-card::after { display:block; content:""; position:absolute; right:-60px; bottom:-90px; width:300px; height:300px; border-radius:50%; background:radial-gradient(closest-side, rgba(255,255,255,.18), transparent); pointer-events:none; z-index:-1; }
.page-hero h1 { font-size:clamp(30px,4vw,44px); font-weight:800; line-height:1.08; letter-spacing:-0.035em; color:#fff; margin-bottom:12px; }
.page-hero p { font-size:17.5px; color:rgba(255,255,255,.84); max-width:60ch; margin:0; line-height:1.6; }

/* ── Cards ── */
.card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:30px; margin-bottom:18px; box-shadow:var(--card-shadow);
}
.card { position:relative; transition:box-shadow .2s, border-color .2s; }
.card:hover { box-shadow:var(--lift-shadow); border-color:color-mix(in srgb, var(--accent) 28%, var(--border)); }
.card::before {
  display:block; content:""; position:absolute; top:0; left:30px; width:72px; height:4px; border-radius:0 0 6px 6px;
  background:linear-gradient(90deg, var(--accent), var(--accent-strong));
}
.card-title {
  font-family:var(--display); font-size:17px; font-weight:700; color:var(--text);
  margin-bottom:20px; padding-bottom:0; border-bottom:0; display:flex; align-items:center; gap:12px;
}
.card-title::before {
  content:""; flex:none; width:6px; height:22px; border-radius:6px;
  background:linear-gradient(180deg, var(--accent), var(--accent-strong));
}
.field-section-label, .section-label { font-size:14px; font-weight:600; color:var(--text); }
.field label, .info-label, .imp-field label { font-size:13px; font-weight:600; color:var(--muted); }
.info-card { background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-lg); }
.info-card-title i { color:var(--accent); }
.code-block, .status-bar, .header-loaded-banner, .queue-item, .cat-item, .result-entry, .table-wrap, .vtable-wrap, .upload-area { border-radius:var(--radius-md); }
.status-bar { background:var(--accent-soft); color:var(--accent-text); }
.modal-box { border-radius:var(--radius-xl); border:1px solid var(--border-mid); box-shadow:0 30px 70px -20px var(--shadow); }

/* ── Controls ── */
input[type="text"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], select, textarea { border-radius:var(--radius-md); }
.field select, .field textarea, .field input[type="text"] { border-width:1px; }
.field select:focus, .field textarea:focus, .field input:focus, .modal-box input:focus, .modal-box textarea:focus,
.search-box:focus, .toolbar-search:focus-within { border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.upload-area { border:1.5px dashed var(--border-mid); background:var(--surface2); }
.upload-area:hover, .upload-area.dragover { border-color:var(--accent); background:var(--accent-soft); }

.btn-run, .btn-primary, .btn-action, .btn, .btn-blue, .btn-green, .btn-red, .btn-outline, .btn-ghost, .btn-subtle, .btn-filter, .btn-copy {
  font-weight:600; border-radius:999px; transition:background .15s, border-color .15s, color .15s, box-shadow .15s, filter .15s;
}
.btn-run, .btn-primary, .btn-action:not(.secondary):not(.danger):not(.green), .btn-blue,
html[data-theme="dark"] .btn-run, html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-action:not(.secondary):not(.danger):not(.green), html[data-theme="dark"] .btn-blue {
  background:var(--accent); color:var(--on-accent); box-shadow:0 6px 16px -8px var(--accent);
}
.btn-green, .btn-action.green { background:var(--accent); color:var(--on-accent); }
.btn-red, .btn-action.danger { background:var(--red); color:#fff; }
html[data-theme="dark"] .btn-red, html[data-theme="dark"] .btn-action.danger { color:#2a0509; }
.btn-run:hover, .btn-primary:hover, .btn-action:hover, .btn:hover { opacity:1; filter:brightness(1.07); transform:none; }
.btn-outline, .btn-ghost, .btn-action.secondary, .btn-subtle, .btn-filter, .btn-copy {
  background:var(--surface); color:var(--text); border:1px solid var(--border-mid); box-shadow:none;
}
.btn-outline:hover, .btn-ghost:hover, .btn-action.secondary:hover, .btn-subtle:hover, .btn-filter:hover, .btn-copy:hover { background:var(--surface2); filter:none; }
.btn-filter.active { background:var(--accent-soft); color:var(--accent-text); border-color:var(--accent); }

.proxy-tabs { border:0; border-radius:999px; padding:4px; gap:2px; background:var(--surface3); }
.proxy-tab { border-radius:999px; font-weight:600; }
.proxy-tab.active { background:var(--surface); color:var(--text); box-shadow:0 1px 3px rgba(30,22,39,.18); }
html[data-theme="dark"] .proxy-tab.active { background:var(--accent-soft); color:var(--accent-text); box-shadow:none; }
.tab-bar { gap:4px; border-bottom:1px solid var(--border); }
.tab-btn { font-weight:600; border-radius:0; padding:11px 18px; }
.tab-btn.active { color:var(--accent-text); border-bottom:2px solid var(--accent) !important; background:none; }
.import-tab.active { border-bottom-color:var(--accent); color:var(--accent-text); }
.step-num { background:var(--accent); color:var(--on-accent); }

/* Blue leftovers in page styles */
.cat-item.selected { border-color:var(--accent); background:var(--accent-soft); }
.cat-item.selected .cat-count { background:var(--accent-soft); color:var(--accent-text); }
.btn-edit { background:var(--accent-soft); color:var(--accent-text); }
.btn-edit:hover { background:var(--accent-soft); filter:brightness(1.1); }
.sel-bar { border-color:var(--accent); }

/* Tables & results */
th { font-weight:600; }
.result-status { font-weight:600; }
.result-entry, .table-wrap, .vtable-wrap { border-color:var(--border); }

/* ── Legal pages ── */
.legal .page, .legal .page-hero { max-width:820px; }
.legal .page { padding-top:12px; }
.page-header { border-bottom:0; }
.doc-section { background:none; border:0; border-radius:0; padding:30px 0; margin:0; }
.doc-section + .doc-section, .doc-section + .divider + .doc-section { border-top:1px solid var(--border); }
.doc-section h2 { font-size:20px; font-weight:700; gap:0; margin-bottom:10px; color:var(--text); }
.doc-section h2 i { display:none; }
.doc-section p, .doc-section li { font-size:16px; line-height:1.8; color:var(--muted); max-width:70ch; }
.doc-section strong { color:var(--text); font-weight:600; }
.doc-section a { color:var(--accent-text); border-bottom:1px solid var(--accent-soft); text-decoration:none; }
.doc-section a:hover { border-color:var(--accent-text); }
.doc-list li::before { color:var(--accent); }
.contact-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--card-shadow); }
.divider { display:none; }

/* ── Home ── */
.home-hero { max-width:1160px; margin:0 auto; padding:36px 28px 0; display:block; }
.home-hero .hero-panel { padding:68px 56px; }
.hero-grid { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); gap:56px; align-items:center; }
.home-hero h1 { font-size:clamp(38px,5vw,62px); font-weight:800; line-height:1.03; letter-spacing:-0.04em; margin-bottom:20px; color:#fff; max-width:14ch; }
.home-hero p.lede { font-size:19px; color:rgba(255,255,255,.86); max-width:44ch; margin-bottom:32px; line-height:1.6; }
.cta-row { display:flex; flex-wrap:wrap; gap:12px; }
.cta {
  display:inline-flex; align-items:center; font:700 15.5px var(--font);
  padding:14px 26px; border-radius:999px; text-decoration:none; transition:transform .15s, background .15s, box-shadow .15s;
}
.cta-primary { background:#fff; color:var(--hg-cta); box-shadow:0 14px 28px -14px rgba(0,0,0,.55); }
.cta-primary:hover { transform:translateY(-1px); }
.cta-secondary { background:rgba(255,255,255,.12); color:#fff; box-shadow:inset 0 0 0 1px rgba(255,255,255,.38); }
.cta-secondary:hover { background:rgba(255,255,255,.2); }
.hero-perks { display:flex; flex-wrap:wrap; gap:8px 10px; margin-top:26px; list-style:none; }
.hero-perks li { font-size:13.5px; font-weight:600; color:rgba(255,255,255,.92); padding:6px 13px; border-radius:999px; background:rgba(255,255,255,.12); }

/* Product preview */
.preview {
  background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:22px;
  box-shadow:0 40px 70px -30px rgba(10,0,40,.7); padding:20px; max-width:470px; margin-left:auto; width:100%;
}
.pv-head { display:flex; align-items:center; justify-content:space-between; padding:4px 6px 14px; }
.pv-title { font-family:var(--display); font-weight:700; font-size:17px; letter-spacing:-0.02em; }
.pv-sub { font-size:13px; color:var(--hint); margin-top:1px; }
.pv-badge { font-size:12.5px; font-weight:700; color:var(--accent-text); background:var(--accent-soft); padding:6px 12px; border-radius:999px; }
.pv-list { display:flex; flex-direction:column; gap:8px; }
.pv-row { display:flex; align-items:center; gap:14px; padding:12px 16px; border-radius:14px; background:var(--surface2); border:1px solid transparent; }
.pv-row.on { background:var(--accent-soft); border-color:color-mix(in srgb, var(--accent) 30%, transparent); }
.pv-name { font-weight:700; font-size:15px; flex:1; }
.pv-count { font-size:13px; color:var(--hint); }
.pv-switch { width:38px; height:22px; border-radius:999px; background:var(--surface3); position:relative; flex:none; }
.pv-switch::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:var(--surface); box-shadow:0 1px 2px rgba(0,0,0,.3); }
.pv-row.on .pv-switch { background:var(--accent); }
.pv-row.on .pv-switch::after { left:19px; background:var(--on-accent); }
.pv-foot { display:flex; align-items:center; justify-content:space-between; margin-top:16px; padding:0 6px; }
.pv-foot span { font-size:13.5px; color:var(--muted); }
.pv-foot .pv-btn { font:700 14px var(--font); color:var(--on-accent); background:var(--accent); padding:10px 18px; border-radius:999px; }

.home-section { max-width:1160px; margin:0 auto; padding:80px 28px 0; }
.section-head { margin-bottom:30px; max-width:60ch; }
.section-head h2 { font-size:clamp(28px,3.2vw,38px); font-weight:800; letter-spacing:-0.035em; margin-bottom:8px; }
.section-head p { color:var(--muted); font-size:17.5px; }

.tool-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.tool {
  position:relative; overflow:hidden; display:flex; flex-direction:column; gap:8px; padding:32px; min-height:244px;
  background:var(--surface); color:var(--text); text-decoration:none;
  border:1px solid var(--border); border-radius:var(--radius-xl); box-shadow:var(--card-shadow);
  transition:transform .2s, box-shadow .2s, border-color .2s;
}
.tool::before {
  content:""; position:absolute; right:-70px; top:-70px; width:220px; height:220px; border-radius:50%;
  background:radial-gradient(closest-side, var(--c-soft), transparent); pointer-events:none;
}
.tool:hover { transform:translateY(-3px); box-shadow:var(--lift-shadow); border-color:color-mix(in srgb, var(--c) 40%, var(--border)); }
.tool-icon {
  position:relative; width:52px; height:52px; border-radius:16px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(140deg, var(--c), var(--c2)); color:#fff; font-size:25px; margin-bottom:16px;
  box-shadow:0 12px 22px -10px var(--c);
}
.tool h3 { font-size:23px; font-weight:800; letter-spacing:-0.03em; }
.tool p { color:var(--muted); font-size:16.5px; line-height:1.6; flex:1; max-width:42ch; }
.tool-go { margin-top:16px; font-weight:700; font-size:15.5px; color:var(--c-text); }
.tool-go i { display:none; }
.tool:hover .tool-go { text-decoration:underline; text-underline-offset:4px; }
.tool[data-tool="bulk"] { --c:#0E9488; --c2:#2BB8A0; --c-soft:rgba(14,148,136,.16); --c-text:#0B7A70; }
.tool[data-tool="m3u"]  { --c:#2563EB; --c2:#60A5FA; --c-soft:rgba(37,99,235,.15); --c-text:#1D4ED8; }
.tool[data-tool="ids"]  { --c:#D6336C; --c2:#F0609A; --c-soft:rgba(214,51,108,.14); --c-text:#B8255A; }
.tool[data-tool="od"]   { --c:#E8590C; --c2:#FF8A3D; --c-soft:rgba(232,89,12,.15); --c-text:#C24A08; }
html[data-theme="dark"] .tool[data-tool="bulk"] { --c-text:#4FE0CC; --c-soft:rgba(45,212,191,.16); }
html[data-theme="dark"] .tool[data-tool="m3u"]  { --c-text:#8DB6FF; --c-soft:rgba(96,165,250,.20); }
html[data-theme="dark"] .tool[data-tool="ids"]  { --c-text:#FF9EC2; --c-soft:rgba(240,96,154,.18); }
html[data-theme="dark"] .tool[data-tool="od"]   { --c-text:#FFA765; --c-soft:rgba(255,138,61,.18); }

.why { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.why > div { padding:28px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--card-shadow); }
.why i { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:12px; background:var(--accent-soft); color:var(--accent-text); font-size:22px; }
.why h3 { font-size:19px; font-weight:800; margin:14px 0 6px; }
.why p { color:var(--muted); font-size:16px; }

@media (max-width:960px) {
  .home-hero { padding:24px 20px 0; }
  .home-hero .hero-panel { padding:44px 28px; }
  .hero-grid { grid-template-columns:1fr; gap:36px; }
  .showcase { margin:0; max-width:none; }
  .tool-grid, .why { grid-template-columns:1fr; }
  .tool { min-height:0; padding:28px; }
  .home-section { padding:56px 20px 0; }
}
@media (max-width:560px) {
  .site-header-inner, .page, .page-hero, .site-footer-inner { padding-left:18px; padding-right:18px; }
  .hero-card, .hero-panel, .home-hero .hero-panel { padding:32px 22px; border-radius:22px; }
  .page-hero .hero-card { flex-direction:column; align-items:flex-start; gap:18px; }
  .page-hero .hero-icon { width:60px; height:60px; border-radius:18px; font-size:28px; }
  .page-hero { padding-top:24px; }
  .card { padding:22px 18px; }
}
@media (prefers-reduced-motion:reduce) { * { transition:none !important; scroll-behavior:auto !important; } }


/* ── User-chosen accent (site.js sets html[data-accent]); overrides per-tool colours everywhere ── */
html[data-accent="blue"] body, html[data-accent="blue"] body[data-tool] { --hg-1:#06214A; --hg-2:#0A4DB8; --hg-3:#0891B2; --hg-a:rgba(56,224,200,.42); --hg-b:rgba(60,130,255,.55); --hg-shadow:rgba(10,77,184,.60); --hg-cta:#0A3D8F; }
html[data-theme="light"][data-accent="blue"] body, html[data-theme="light"][data-accent="blue"] body[data-tool] { --accent:#0B63CE; --accent-strong:#0A52AB; --accent-soft:rgba(11,99,206,0.09); --accent-text:#0A52AB; }
html[data-theme="dark"][data-accent="blue"] body, html[data-theme="dark"][data-accent="blue"] body[data-tool] { --accent:#7DB4FF; --accent-strong:#A3CBFF; --accent-soft:rgba(125,180,255,0.14); --accent-text:#9CC6FF; }
html[data-accent="teal"] body, html[data-accent="teal"] body[data-tool] { --hg-1:#032F2E; --hg-2:#0B7A70; --hg-3:#14B8A6; --hg-a:rgba(130,255,225,.40); --hg-b:rgba(10,140,130,.60); --hg-shadow:rgba(11,122,112,.60); --hg-cta:#095F57; }
html[data-theme="light"][data-accent="teal"] body, html[data-theme="light"][data-accent="teal"] body[data-tool] { --accent:#0B7A70; --accent-strong:#096860; --accent-soft:rgba(11,122,112,0.09); --accent-text:#096860; }
html[data-theme="dark"][data-accent="teal"] body, html[data-theme="dark"][data-accent="teal"] body[data-tool] { --accent:#4FE0CC; --accent-strong:#8AF0E1; --accent-soft:rgba(79,224,204,0.14); --accent-text:#6FE9D7; }
html[data-accent="green"] body, html[data-accent="green"] body[data-tool] { --hg-1:#052E16; --hg-2:#15803D; --hg-3:#22C55E; --hg-a:rgba(200,255,130,.40); --hg-b:rgba(20,150,70,.55); --hg-shadow:rgba(21,128,61,.55); --hg-cta:#0E5C2B; }
html[data-theme="light"][data-accent="green"] body, html[data-theme="light"][data-accent="green"] body[data-tool] { --accent:#15803D; --accent-strong:#116B33; --accent-soft:rgba(21,128,61,0.09); --accent-text:#116B33; }
html[data-theme="dark"][data-accent="green"] body, html[data-theme="dark"][data-accent="green"] body[data-tool] { --accent:#5FD39A; --accent-strong:#8DE6B9; --accent-soft:rgba(95,211,154,0.14); --accent-text:#7FE0AE; }
html[data-accent="rose"] body, html[data-accent="rose"] body[data-tool] { --hg-1:#4D0A26; --hg-2:#BE1E56; --hg-3:#F0568C; --hg-a:rgba(255,175,120,.45); --hg-b:rgba(220,40,110,.55); --hg-shadow:rgba(190,30,86,.55); --hg-cta:#8F1642; }
html[data-theme="light"][data-accent="rose"] body, html[data-theme="light"][data-accent="rose"] body[data-tool] { --accent:#BE1E56; --accent-strong:#A31948; --accent-soft:rgba(190,30,86,0.09); --accent-text:#A31948; }
html[data-theme="dark"][data-accent="rose"] body, html[data-theme="dark"][data-accent="rose"] body[data-tool] { --accent:#FF8FB5; --accent-strong:#FFB3CD; --accent-soft:rgba(255,143,181,0.14); --accent-text:#FFA8C6; }
html[data-accent="orange"] body, html[data-accent="orange"] body[data-tool] { --hg-1:#4A1803; --hg-2:#D9480F; --hg-3:#FF8A3D; --hg-a:rgba(255,215,100,.45); --hg-b:rgba(230,80,20,.55); --hg-shadow:rgba(217,72,15,.55); --hg-cta:#9A3408; }
html[data-theme="light"][data-accent="orange"] body, html[data-theme="light"][data-accent="orange"] body[data-tool] { --accent:#C2410C; --accent-strong:#A63608; --accent-soft:rgba(217,72,15,0.09); --accent-text:#A63608; }
html[data-theme="dark"][data-accent="orange"] body, html[data-theme="dark"][data-accent="orange"] body[data-tool] { --accent:#FFA765; --accent-strong:#FFC194; --accent-soft:rgba(255,167,101,0.14); --accent-text:#FFB683; }

/* ── Accent picker ── */
.accent-wrap { position:relative; flex:none; }
.accent-btn {
  width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
  border-radius:999px; border:1px solid var(--border-mid); background:var(--surface); transition:background .15s, border-color .15s;
}
.accent-btn:hover { background:var(--surface2); border-color:var(--accent); }
.accent-btn-dot { width:20px; height:20px; border-radius:50%; background:var(--accent); box-shadow:inset 0 0 0 2px rgba(255,255,255,.55), 0 0 0 1px var(--border-mid); }
.accent-pop {
  display:none; position:absolute; top:calc(100% + 12px); right:0; z-index:300; width:252px; padding:16px;
  background:var(--surface); border:1px solid var(--border-mid); border-radius:var(--radius-lg); box-shadow:var(--lift-shadow);
}
.accent-wrap.open .accent-pop { display:block; }
.accent-pop-title { font-family:var(--display); font-weight:700; font-size:15px; margin-bottom:12px; }
.accent-row { display:flex; flex-wrap:wrap; gap:10px; }
.accent-swatch {
  width:30px; height:30px; border-radius:50%; border:0; cursor:pointer; padding:0;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.5), 0 0 0 1px var(--border-mid); transition:transform .12s, box-shadow .12s;
}
.accent-swatch:hover { transform:scale(1.12); }
.accent-swatch.active { box-shadow:inset 0 0 0 2px rgba(255,255,255,.75), 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
.accent-current { margin-top:12px; font-size:13.5px; font-weight:600; color:var(--muted); }
.accent-mobile-row { display:none; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; padding:12px 14px 0; border-top:1px solid var(--border); font-size:14.5px; font-weight:500; color:var(--muted); }
@media (max-width:860px) {
  .accent-wrap { display:none; }
  .accent-mobile-row { display:flex; }
  .accent-mobile-row .accent-row { gap:8px; justify-content:flex-end; }
  .accent-mobile-row .accent-swatch { width:26px; height:26px; }
}

/* Hero showcase carousel (real tool screenshots) */
.showcase { width:100%; max-width:560px; margin-left:auto; min-width:0; }
.sc-track { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; border-radius:22px; box-shadow:0 40px 70px -30px rgba(0,10,40,.7); }
.sc-track::-webkit-scrollbar { display:none; }
.sc-slide { flex:0 0 100%; scroll-snap-align:start; display:flex; flex-direction:column; background:var(--surface); color:var(--text); text-decoration:none; border:1px solid var(--border); border-radius:22px; overflow:hidden; --c:var(--accent); }
.sc-slide[data-tool="bulk"] { --c:#0B7A70; } .sc-slide[data-tool="m3u"] { --c:#1D4ED8; } .sc-slide[data-tool="ids"] { --c:#BE1E56; } .sc-slide[data-tool="od"] { --c:#C2410C; }
html[data-theme="dark"] .sc-slide[data-tool="bulk"] { --c:#4FE0CC; } html[data-theme="dark"] .sc-slide[data-tool="m3u"] { --c:#8DB6FF; } html[data-theme="dark"] .sc-slide[data-tool="ids"] { --c:#FF9EC2; } html[data-theme="dark"] .sc-slide[data-tool="od"] { --c:#FFA765; }
.sc-frame { background:var(--surface2); border-bottom:1px solid var(--border); }
.sc-bar { display:flex; align-items:center; gap:6px; padding:9px 14px; background:var(--surface3); }
.sc-bar i { width:9px; height:9px; border-radius:50%; background:var(--hint); opacity:.45; }
.sc-bar span { margin-left:10px; font:600 11.5px var(--mono, monospace); color:var(--hint); }
.sc-frame img { display:block; width:100%; height:auto; aspect-ratio:1000/520; object-fit:cover; object-position:top; }
.sc-frame picture { display:block; }
.sc-frame .img-dark { display:none; }
html[data-theme="dark"] .sc-frame .img-light { display:none; }
html[data-theme="dark"] .sc-frame .img-dark { display:block; }
@media (max-width:560px) { .sc-frame img { aspect-ratio:3/4; } }
.sc-cap { padding:16px 20px 18px; border-top:3px solid var(--c); }
.sc-name { font-family:var(--display); font-weight:700; font-size:18px; letter-spacing:-0.02em; color:var(--c); }
.sc-cap p { font-size:14px; line-height:1.5; color:var(--muted); margin-top:4px; min-height:3em; }
.sc-open { display:inline-flex; align-items:center; gap:6px; margin-top:8px; font-weight:700; font-size:13.5px; color:var(--c); }
.sc-slide:hover .sc-open i { transform:translateX(3px); } .sc-open i { transition:transform .15s; }
.sc-nav { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:14px; }
.sc-btn { width:34px; height:34px; border-radius:50%; border:1px solid rgba(255,255,255,.35); background:rgba(255,255,255,.14); color:#fff; cursor:pointer; display:grid; place-items:center; font-size:16px; }
.sc-btn:hover { background:rgba(255,255,255,.26); }
.sc-dots { display:flex; gap:8px; }
.sc-dot { width:9px; height:9px; padding:0; border-radius:99px; border:0; background:rgba(255,255,255,.4); cursor:pointer; transition:width .2s, background .2s; }
.sc-dot.on { width:26px; background:#fff; }
.sc-btn:focus-visible, .sc-dot:focus-visible, .sc-slide:focus-visible { outline:3px solid #fff; outline-offset:2px; }
@media (prefers-reduced-motion: reduce) { .sc-track { scroll-behavior:auto; } }


/* ══════════ Extra accents (purple, amber) ══════════ */
html[data-accent="purple"] body, html[data-accent="purple"] body[data-tool] { --hg-1:#2E1065; --hg-2:#6D28D9; --hg-3:#A78BFA; --hg-a:rgba(220,180,255,.42); --hg-b:rgba(140,80,240,.55); --hg-shadow:rgba(109,40,217,.55); --hg-cta:#4C1D95; }
html[data-theme="light"][data-accent="purple"] body, html[data-theme="light"][data-accent="purple"] body[data-tool] { --accent:#6D28D9; --accent-strong:#5B21B6; --accent-soft:rgba(109,40,217,0.09); --accent-text:#5B21B6; }
html[data-theme="dark"][data-accent="purple"] body, html[data-theme="dark"][data-accent="purple"] body[data-tool] { --accent:#B79CFF; --accent-strong:#D0BBFF; --accent-soft:rgba(183,156,255,0.14); --accent-text:#C7B2FF; }
html[data-accent="amber"] body, html[data-accent="amber"] body[data-tool] { --hg-1:#451A03; --hg-2:#B45309; --hg-3:#F59E0B; --hg-a:rgba(255,230,120,.45); --hg-b:rgba(230,140,10,.55); --hg-shadow:rgba(180,83,9,.55); --hg-cta:#8A4208; }
html[data-theme="light"][data-accent="amber"] body, html[data-theme="light"][data-accent="amber"] body[data-tool] { --accent:#B45309; --accent-strong:#92400E; --accent-soft:rgba(180,83,9,0.09); --accent-text:#92400E; }
html[data-theme="dark"][data-accent="amber"] body, html[data-theme="dark"][data-accent="amber"] body[data-tool] { --accent:#FBBF4A; --accent-strong:#FCD34D; --accent-soft:rgba(251,191,74,0.14); --accent-text:#FCCB6B; }

/* ── OLED PURE BLACK THEME WITH PER-TOOL ACCENT COLORS ── */
html[data-oled] {
  --bg: #000000 !important;
  --surface: #0a0a0a !important;
  --surface2: #121212 !important;
  --surface3: #181818 !important;
  --border: #222222 !important;
  --border-subtle: #191919 !important;
  --border-mid: #282828 !important;
  --border-strong: #383838 !important;
  --input-bg: #0d0d0d !important;
  --input-border: #262626 !important;
  --card-bg: #0a0a0a !important;
  --panel-bg: #080808 !important;
  --text: #f3f3f1 !important;
  --text-muted: #9e9e98 !important;
  --hint: #7a7a74 !important;
  --sub: #8a8a84 !important;
  --shadow: rgba(0,0,0,0.8) !important;
}

html[data-oled] body {
  background-color: #000000 !important;
  color: #f3f3f1 !important;
}

/* OLED: Preserve each tool's distinct signature accent & button identity */
html[data-oled] body[data-tool="m3u"] {
  --accent: #7FA8FF !important;
  --accent-strong: #A9C4FF !important;
  --accent-soft: rgba(127,168,255,0.18) !important;
  --accent-text: #A3C0FF !important;
  --blue: #7FA8FF !important;
  --blue-text: #A3C0FF !important;
  --blue-light: rgba(127,168,255,0.18) !important;
  --blue-mid: #A3C0FF !important;
  --c-text: #8DB6FF !important;
  --c-soft: rgba(96,165,250,0.20) !important;
}

html[data-oled] body[data-tool="bulk"] {
  --accent: #4FE0CC !important;
  --accent-strong: #8AF0E1 !important;
  --accent-soft: rgba(79,224,204,0.18) !important;
  --accent-text: #6FE9D7 !important;
  --blue: #4FE0CC !important;
  --blue-text: #6FE9D7 !important;
  --blue-light: rgba(79,224,204,0.18) !important;
  --blue-mid: #6FE9D7 !important;
  --c-text: #4FE0CC !important;
  --c-soft: rgba(45,212,191,0.20) !important;
}

html[data-oled] body[data-tool="ids"] {
  --accent: #FF8FB5 !important;
  --accent-strong: #FFB3CD !important;
  --accent-soft: rgba(255,143,181,0.18) !important;
  --accent-text: #FFA8C6 !important;
  --blue: #FF8FB5 !important;
  --blue-text: #FFA8C6 !important;
  --blue-light: rgba(255,143,181,0.18) !important;
  --blue-mid: #FFA8C6 !important;
  --c-text: #FF9EC2 !important;
  --c-soft: rgba(240,96,154,0.20) !important;
}

html[data-oled] body[data-tool="od"] {
  --accent: #FFA765 !important;
  --accent-strong: #FFC194 !important;
  --accent-soft: rgba(255,167,101,0.18) !important;
  --accent-text: #FFB683 !important;
  --blue: #FFA765 !important;
  --blue-text: #FFB683 !important;
  --blue-light: rgba(255,167,101,0.18) !important;
  --blue-mid: #FFB683 !important;
  --c-text: #FFA765 !important;
  --c-soft: rgba(255,138,61,0.20) !important;
}

/* OLED Buttons maintain high visibility and per-tool color theme */
html[data-oled] .btn-primary,
html[data-oled] .action-btn,
html[data-oled] button.btn-blue,
html[data-oled] input[type="submit"] {
  background: var(--accent) !important;
  color: #050505 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 0 16px var(--accent-soft) !important;
}

html[data-oled] .btn-primary:hover,
html[data-oled] .action-btn:hover {
  background: var(--accent-strong) !important;
}

html[data-oled] .card,
html[data-oled] .panel,
html[data-oled] .step-card,
html[data-oled] .box,
html[data-oled] .table-wrap,
html[data-oled] .drop-zone,
html[data-oled] .cat-item,
html[data-oled] .cfg-row {
  background-color: #0a0a0a !important;
  border-color: #222222 !important;
}

html[data-oled] input[type="text"],
html[data-oled] input[type="url"],
html[data-oled] input[type="password"],
html[data-oled] textarea,
html[data-oled] select {
  background-color: #0d0d0d !important;
  border-color: #262626 !important;
  color: #ffffff !important;
}

html[data-oled] input:focus,
html[data-oled] textarea:focus,
html[data-oled] select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-soft) !important;
}

/* ══════════ Settings button (header) ══════════ */
.site-header .tm-settings-btn {
  width:40px; height:40px; flex:none; display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px; border:1px solid var(--border-mid); background:var(--surface); color:var(--muted);
  cursor:pointer; transition:background .15s, color .15s, border-color .15s;
}
.site-header .tm-settings-btn:hover { background:var(--surface2); color:var(--text); border-color:var(--accent); }
.tm-settings-mobile {
  display:none; align-items:center; gap:10px; width:100%; margin-top:8px; padding:12px 14px 4px;
  background:none; border:0; border-top:1px solid var(--border); color:var(--muted);
  font:500 14.5px/1.2 inherit; font-family:inherit; cursor:pointer; text-align:left;
}
@media (max-width:860px) {
  .site-header .tm-settings-btn { display:none; }
  .tm-settings-mobile { display:flex; }
}

/* ══════════ Clear all (tool pages) ══════════ */
.tm-restart {
  position:absolute; top:18px; right:16px; z-index:3; display:inline-flex; align-items:center; gap:6px;
  padding:7px 12px; border-radius:999px; border:1px solid rgba(224,92,92,.5); background:rgba(224,92,92,.10);
  color:#d64545; font:600 12.5px/1 inherit; font-family:inherit; cursor:pointer; transition:background .15s, color .15s;
}
.tm-restart:hover, .tm-restart:active { background:#d64545; color:#fff; }
html[data-theme="dark"] .tm-restart { color:#ef6b6b; }
html[data-theme="dark"] .tm-restart:hover { color:#fff; }
.tm-restart-host > .card-title { padding-right:120px; flex-wrap:wrap; }
.tm-restart-host > .card-title > span { flex:0 0 100%; }

/* ══════════ Settings window ══════════ */
html.tm-lock, html.tm-lock body { overflow:hidden; }
.tm-overlay {
  position:fixed; inset:0; z-index:10000; display:flex; align-items:center; justify-content:center;
  padding:16px; background:rgba(8,12,20,.60); backdrop-filter:blur(3px);
}
.tm-panel {
  width:min(760px,100%); max-height:min(92vh,860px); display:flex; flex-direction:column; overflow:hidden;
  background:var(--surface); color:var(--text); border:1px solid var(--border-mid); border-radius:20px;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.55);
}
.tm-head, .tm-tabs, .tm-foot { flex:none; }
.tm-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:20px 24px 14px; }
.tm-head h3 { font-family:var(--display); font-size:20px; font-weight:700; margin:0; }
.tm-head p { margin:4px 0 0; font-size:13.5px; color:var(--muted); }
.tm-x { flex:none; width:36px; height:36px; border-radius:999px; border:1px solid var(--border-mid); background:var(--surface2); color:var(--muted); font-size:22px; line-height:1; cursor:pointer; }
.tm-x:hover { color:var(--text); }
.tm-tabs { display:flex; align-items:center; gap:8px; padding:2px 24px 12px; overflow-x:auto; border-bottom:1px solid var(--border); }
.tm-tab {
  flex:none; padding:8px 14px; border-radius:999px; border:1px solid transparent; background:none;
  color:var(--muted); font:600 13.5px/1 inherit; font-family:inherit; cursor:pointer; white-space:nowrap;
}
.tm-tab:hover { color:var(--text); background:var(--surface2); }
.tm-tab.on { color:var(--accent-text); background:var(--accent-soft); border-color:var(--accent); }
.tm-body { padding:6px 24px 18px; overflow-y:auto; flex:1 1 auto; }
.tm-tool h3 { font-family:var(--display); font-size:16px; font-weight:700; margin:16px 0 0; color:var(--accent-text); }
.tm-sec { padding:16px 0; border-bottom:1px solid var(--border); }
.tm-sec:last-child { border-bottom:0; }
.tm-sec-h h4 { margin:0; font-size:11.5px; letter-spacing:.07em; text-transform:uppercase; color:var(--text); font-weight:700; }
.tm-sec-h p { margin:5px 0 0; font-size:13px; color:var(--muted); }
.tm-sec > .tm-grid, .tm-sec > .tm-in, .tm-sec > .tm-row, .tm-sec > .tm-chk, .tm-sec > .tm-hint, .tm-sec > .tm-note { margin-top:12px; }
.tm-grid { display:grid; gap:8px; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.tm-grid.c2 { grid-template-columns:repeat(2,1fr); }
.tm-grid.c3 { grid-template-columns:repeat(3,1fr); }
.tm-grid.c4 { grid-template-columns:repeat(4,1fr); }
@media (max-width:620px) { .tm-grid.c3, .tm-grid.c4 { grid-template-columns:repeat(2,1fr); } .tm-body, .tm-head { padding-left:16px; padding-right:16px; } .tm-tabs { padding-left:16px; padding-right:16px; } }
.tm-opt {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; text-align:left;
  padding:11px 13px; border-radius:12px; border:1px solid var(--border-mid); background:var(--surface2);
  color:var(--muted); font-family:inherit; font-size:13.5px; cursor:pointer; transition:border-color .12s, background .12s, color .12s;
}
.tm-opt:hover { border-color:var(--accent); color:var(--text); }
.tm-opt b { font-weight:600; color:inherit; }
.tm-opt small { font-size:12px; color:var(--hint); font-weight:400; line-height:1.35; }
.tm-opt.on { border-color:var(--accent); background:var(--accent-soft); color:var(--text); box-shadow:0 0 0 1px var(--accent); }
.tm-opt.on b { color:var(--accent-text); }
.tm-acc { flex-direction:row; align-items:center; justify-content:flex-start; gap:10px; }
.tm-acc i { width:18px; height:18px; border-radius:50%; flex:none; box-shadow:inset 0 0 0 2px rgba(255,255,255,.5), 0 0 0 1px var(--border-mid); }
.tm-in {
  display:block; width:100%; padding:11px 13px; border-radius:12px; border:1px solid var(--border-mid);
  background:var(--input-bg); color:var(--text); font-family:var(--mono, monospace); font-size:13px;
}
.tm-in:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.tm-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.tm-row small, .tm-hint { font-size:12.5px; color:var(--muted); }
.tm-hint { margin-bottom:0; }
.tm-chk { display:flex; align-items:flex-start; gap:11px; padding:10px 0; cursor:pointer; }
.tm-chk input { margin-top:3px; width:17px; height:17px; accent-color:var(--accent); flex:none; }
.tm-chk b { display:block; font-size:14px; font-weight:600; color:var(--text); }
.tm-chk small { display:block; font-size:12.5px; color:var(--muted); margin-top:2px; line-height:1.4; }
.tm-btn {
  display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:10px 16px; border-radius:12px;
  border:1px solid var(--border-mid); background:var(--surface2); color:var(--text); font:600 13.5px/1.2 inherit; font-family:inherit; cursor:pointer; text-align:center;
}
.tm-btn:hover { border-color:var(--accent); }
.tm-btn.big { align-items:flex-start; text-align:left; padding:13px 15px; }
.tm-btn.big small { font-size:12px; font-weight:400; color:var(--muted); }
.tm-btn.primary { background:var(--accent); border-color:var(--accent); color:var(--on-accent, #fff); }
.tm-btn.danger { color:#d64545; border-color:rgba(214,69,69,.45); }
.tm-note { padding:10px 13px; border-radius:10px; background:var(--accent-soft); color:var(--accent-text); font-size:13px; font-weight:500; margin-top:12px; }
.tm-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 24px; border-top:1px solid var(--border); background:var(--surface); }
.tm-foot > div { display:flex; gap:8px; }
.tm-foot .tm-btn { flex-direction:row; }
.tm-ver { font-size:12.5px; color:var(--hint); }
