/* =========================================================
   Utility Hub — style.css  (dark fintech / pro-tool look)
   1. Theme tokens (dark default, light alternate)
   2. Base
   3. Header bar (logo | filter pills | theme toggle)
   4. Groups & grid (3 / 2 / 1 columns)
   5. Widget card shell
   6. Shared widget controls (fields, buttons, tabs, stats)
   7. Widget-specific styles (scoped with .w-<id>)
   8. Responsive
   ========================================================= */

/* ---------- 1. Theme tokens ---------- */
:root,
[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-glow: radial-gradient(900px 480px at 15% -8%, rgba(79, 140, 255, 0.10), transparent 65%),
             radial-gradient(700px 420px at 95% -5%, rgba(34, 211, 238, 0.06), transparent 65%);
  --surface: #131926;
  --surface-2: #0f1520;
  --surface-3: #1b2333;
  --card-grad: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 40%);
  --border: #1f2838;
  --border-strong: #2c384d;
  --text: #e5e9f0;
  --muted: #8591a7;
  --faint: #5d6880;
  --accent: #4f8cff;
  --accent-2: #22d3ee;
  --accent-weak: rgba(79, 140, 255, 0.12);
  --accent-line: rgba(79, 140, 255, 0.25);
  --accent-glow: 0 0 0 1px rgba(79, 140, 255, 0.35), 0 0 18px -4px rgba(79, 140, 255, 0.45);
  --accent-text: #ffffff;
  --good: #34d399;
  --good-weak: rgba(52, 211, 153, 0.12);
  --bad: #f87171;
  --bad-weak: rgba(248, 113, 113, 0.12);
  --warn: #fbbf24;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 40px -20px rgba(0, 0, 0, 0.9);
  --topbar-bg: rgba(11, 15, 23, 0.72);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.09);
  --mini-bg: rgba(255, 255, 255, 0.06);
  --panel-bg: rgba(17, 22, 34, 0.86);
  --panel-solid: #121826;
  --scrim: rgba(4, 7, 12, 0.55);
  color-scheme: dark;
}

/* Light mode: soft, low-glare cool-stone canvas (only used after the visitor toggles it) */
[data-theme="light"] {
  --bg: #e8edf4;
  --bg-glow: radial-gradient(900px 480px at 15% -8%, rgba(79, 140, 255, 0.07), transparent 65%);
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --card-grad: none;
  --border: #d3dbe6;
  --border-strong: #bcc7d6;
  --text: #0f172a;
  --muted: #475569;
  --faint: #64748b;
  --accent: #2f6fef;
  --accent-2: #0891b2;
  --accent-weak: rgba(47, 111, 239, 0.1);
  --accent-line: rgba(47, 111, 239, 0.25);
  --accent-glow: 0 0 0 1px rgba(47, 111, 239, 0.35), 0 4px 14px -6px rgba(47, 111, 239, 0.45);
  --accent-text: #ffffff;
  --good: #059669;
  --good-weak: rgba(5, 150, 105, 0.1);
  --bad: #dc2626;
  --bad-weak: rgba(220, 38, 38, 0.08);
  --warn: #d97706;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 22px -14px rgba(15, 23, 42, 0.18);
  --shadow-hover: 0 1px 2px rgba(15, 23, 42, 0.06), 0 14px 32px -16px rgba(15, 23, 42, 0.25);
  --topbar-bg: rgba(232, 237, 244, 0.82);
  --glass: rgba(248, 250, 252, 0.62);
  --glass-border: rgba(15, 23, 42, 0.10);
  --mini-bg: rgba(15, 23, 42, 0.05);
  --panel-bg: rgba(236, 241, 247, 0.94);
  --panel-solid: #eef2f7;
  --scrim: rgba(15, 23, 42, 0.30);
  color-scheme: light;
}

:root {
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --gap: 14px;
  --maxw: 1360px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip-link {
  position: absolute; left: 12px; top: -40px; padding: 6px 10px; z-index: 100;
  background: var(--accent); color: var(--accent-text); border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 10px; }

/* ---------- 3. Header bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
  display: grid; grid-template-columns: 1fr minmax(0, 440px) 1fr; align-items: center; gap: 14px;
}
.topbar-inner > .brand, .topbar-inner > .brand-wrap { justify-self: start; }
.brand-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* Hub · Media · Trade sister-site switcher pill (shared look across the sister sites).
   The active item is whichever link has aria-current="page" (or .active). */
.site-switch {
  display: inline-flex; align-items: center; flex-shrink: 0; gap: 2px; padding: 2px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
}
.site-switch a {
  padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; line-height: 1.35; white-space: nowrap;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); text-decoration: none;
  background: none; background-image: none; box-shadow: none;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.site-switch a:hover { color: var(--text); }
/* Active: subtle translucent blue tint. No gradient, no glow. */
.site-switch a.active,
.site-switch a[aria-current="page"] {
  background-color: rgba(79, 140, 255, 0.14); background-image: none;
  border: 1px solid rgba(79, 140, 255, 0.30);
  color: #6aa2ff;
  box-shadow: none;
}
[data-theme="light"] .site-switch a.active,
[data-theme="light"] .site-switch a[aria-current="page"] { color: #2563eb; }
.site-switch a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.topbar-inner > .theme-toggle { justify-self: end; }

/* Search pill + results dropdown */
.search { position: relative; width: 100%; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 34px; padding: 0 64px 0 36px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13px; outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-weak); }
.search-kbd {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap;
  padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-3);
  pointer-events: none;
}
.search.open .search-kbd, .search input:not(:placeholder-shown) ~ .search-kbd { display: none; }
.search-results {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  width: max(100%, 420px); max-width: calc(100vw - 24px); max-height: min(420px, 70vh); overflow-y: auto;
  padding: 6px; border-radius: 16px;
  background: var(--panel-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  z-index: 60;
}
.sr-item {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 7px 9px; border-radius: 10px; cursor: pointer;
}
.sr-item.active { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.sr-icon {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--tint);
  background: color-mix(in srgb, var(--tint) 14%, transparent);
}
.sr-text { display: flex; flex-direction: column; min-width: 0; }
.sr-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-desc { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-group {
  font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border);
}
.sr-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 12.5px; }
.brand { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.brand-logo {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px -4px var(--accent);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand-accent { color: var(--accent); margin-left: 1px; }
.theme-toggle {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-icon { display: grid; }
[data-theme="dark"] .theme-icon-dark,
[data-theme="light"] .theme-icon-light { display: none; }

/* ---------- 4. Home screen: clock + folder tiles ---------- */
.home {
  /* 56px top bar + ~65px footer (line + margins), so the footer sits inside the first screen */
  min-height: calc(100vh - 122px);
  min-height: calc(100dvh - 122px);
  max-width: var(--maxw); margin: 0 auto; padding: max(14px, calc(6vh - 22px)) 20px 18px;
  display: flex; flex-direction: column; align-items: center;
}
.home-hero { text-align: center; margin-bottom: 12px; }

/* Live forex sessions bar */
.sessions {
  width: min(880px, 100%);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: max(14px, calc(5vh - 22px));
  border-radius: 16px; border: 1px solid var(--glass-border); background: var(--glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
.sess { padding: 9px 14px 10px; min-width: 0; border-left: 1px solid var(--glass-border); }
.sess:first-child { border-left: 0; }
.sess-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.sess-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.sess.open .sess-dot { background: var(--good); box-shadow: 0 0 0 3px var(--good-weak); animation: sess-pulse 2s ease-in-out infinite; }
.sess-name { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sess-state {
  margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border);
}
.sess.open .sess-state { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: var(--good-weak); }
.sess-time { margin-top: 4px; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.sess:not(.open) .sess-time { color: var(--muted); }
.sess-hours { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes sess-pulse { 50% { box-shadow: 0 0 0 5px transparent; } }
.home-time {
  font-size: clamp(56px, 9vw, 96px); font-weight: 250; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.home-date { margin-top: 8px; font-size: 15px; color: var(--muted); font-weight: 500; }
.home-zone { margin-top: 3px; font-size: 12.5px; color: var(--faint); font-weight: 500; letter-spacing: 0.01em; }

.folders {
  /* 6 folders: one row of 6 on wide screens, 3 + 3 on laptops/tablets, 2 + 2 + 2 on phones */
  --fw: 196px;
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 34px 24px;
  width: 100%;
  outline: none;
}
.folders > .folder { flex: 0 0 var(--fw); width: var(--fw); min-width: 0; }
.folder {
  --tint: #4f8cff;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 0; border: 0; background: none; color: inherit; border-radius: 40px;
  -webkit-tap-highlight-color: transparent;
}
.folder:focus-visible { outline: none; }
.folder:focus-visible .folder-box { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--tint); }
.folder-box {
  width: 100%; aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 16px;
  border-radius: 25%; /* One UI-style rounded square */
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--tint) 30%, transparent), transparent 60%),
    var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.22s cubic-bezier(.2, .8, .2, 1), box-shadow 0.22s, border-color 0.22s;
}
.folder:hover .folder-box {
  transform: translateY(-4px) scale(1.03);
  border-color: color-mix(in srgb, var(--tint) 55%, transparent);
  box-shadow: 0 26px 50px -22px color-mix(in srgb, var(--tint) 60%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.folder:active .folder-box { transform: scale(0.96); transition-duration: 0.08s; }
.folder-top { display: flex; align-items: flex-start; justify-content: space-between; }
.folder-badge {
  width: 34px; height: 34px; display: grid; place-items: center; color: var(--tint);
  border-radius: 11px; background: color-mix(in srgb, var(--tint) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint) 35%, transparent);
}
.folder-num {
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 2px 8px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border);
}
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; align-content: end; }
.mini { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.mini-icon {
  width: 100%; max-width: 38px; aspect-ratio: 1 / 1; display: grid; place-items: center;
  color: var(--tint); border-radius: 30%;
  background: var(--mini-bg); border: 1px solid var(--glass-border);
}
.mini-name {
  max-width: 100%; font-size: 9px; line-height: 1.2; font-weight: 600; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-empty { grid-column: 1 / -1; text-align: center; color: var(--faint); font-size: 12px; }
.folder-label { font-size: 14px; font-weight: 650; letter-spacing: -0.005em; text-align: center; }

.home-hint { margin: max(16px, calc(6vh - 22px)) 0 0; color: var(--faint); font-size: 12px; text-align: center; }
.home-hint kbd {
  font-family: var(--mono); font-size: 11px; padding: 0 5px; border-radius: 5px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
}
.group-empty {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 18px; text-align: center; color: var(--muted); font-size: 13px; grid-column: 1 / -1;
}
.noscript { padding: 12px; border-radius: var(--radius-sm); background: var(--bad-weak); color: var(--bad); }
.site-footer {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px 24px;
  text-align: center; color: var(--faint); font-size: 12px;
}

/* ---------- 4b. Folder overlay ---------- */
body.modal-open { overflow: hidden; }
.folder-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(4, 7, 12, 0);
  backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
  transition: background 0.28s ease, backdrop-filter 0.28s ease, -webkit-backdrop-filter 0.28s ease;
}
.folder-overlay.is-open {
  background: var(--scrim);
  backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%);
}
.folder-panel {
  --tint: #4f8cff;
  position: relative;
  width: min(1280px, 100%);
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 20px 22px;
  border-radius: 32px;
  background:
    radial-gradient(80% 60% at 50% -20%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 70%),
    var(--panel-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: scale(0.6);
  transition: transform 0.34s cubic-bezier(.2, .9, .25, 1), opacity 0.22s ease;
  scrollbar-width: thin;
}
.folder-overlay.is-open .folder-panel { opacity: 1; transform: none; }
.folder-head {
  position: sticky; top: -18px; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: -18px -20px 14px; padding: 18px 64px 14px;
  background: linear-gradient(180deg, var(--panel-solid) 70%, transparent);
}
.folder-head-icon {
  width: 36px; height: 36px; display: grid; place-items: center; color: var(--tint); border-radius: 11px;
  background: color-mix(in srgb, var(--tint) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint) 35%, transparent);
}
.folder-head-text { display: flex; flex-direction: column; line-height: 1.15; }
.folder-title { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.015em; }
.folder-count { font-size: 11.5px; color: var(--muted); }
.folder-close {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--glass-border); background: var(--glass); color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.folder-close:hover { color: var(--text); background: var(--surface-3); }
.folder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
}

/* ---------- 5. Widget card shell ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card-grad), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.card:hover::before { opacity: 0.7; }

.card-head {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.card-icon {
  width: 26px; height: 26px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 8px; color: var(--tint, var(--accent));
  background: color-mix(in srgb, var(--tint, var(--accent)) 14%, transparent);
}
.card:focus { outline: none; }
.card:focus-visible { border-color: var(--tint, var(--accent)); }
.card.flash { animation: card-flash 1.6s ease-out; }
@keyframes card-flash {
  0%, 30% { border-color: var(--tint, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint, var(--accent)) 35%, transparent), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}
.card-titles { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.card-title { margin: 0; font-size: 13.5px; font-weight: 650; line-height: 1.25; }
.card-desc { margin: 0; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 10px 12px 12px; min-width: 0; }
.card-error { padding: 10px; border-radius: var(--radius-sm); background: var(--bad-weak); color: var(--bad); font-size: 13px; }

/* ---------- 6. Shared widget controls ---------- */

/* Compact field tiles: tiny label inside the box, value right below it */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.field {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
  padding: 5px 9px 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.field.full { grid-column: 1 / -1; }
.field > span, .label {
  font-size: 10px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.4;
}
.field .input, .field .select {
  height: 24px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.field .input:focus, .field .select:focus { box-shadow: none; background: transparent; }

/* Standalone inputs (outside a field tile) */
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 32px; padding: 0 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.input { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.input::placeholder { color: var(--faint); font-family: var(--font); }
.input.invalid { color: var(--bad); }
.field:has(.input.invalid) { border-color: var(--bad); }
.select { cursor: pointer; font-size: 13px; }
.select option { background: var(--surface); color: var(--text); }
.textarea { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; font-size: 13px; }

.row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-3);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.btn:hover { border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { box-shadow: var(--accent-glow); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.icon { width: 30px; padding: 0; }
.btn.success { background: var(--good-weak); border-color: var(--good); color: var(--good); }

/* Segmented control + tabs */
.seg {
  display: inline-flex; padding: 2px; gap: 2px;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
}
.seg button {
  border: 0; background: transparent; padding: 3px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"],
.seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

/* Stats / results */
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 6px; }
.stat {
  min-width: 0; padding: 5px 9px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.stat .k {
  font-size: 9.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.35;
}
.stat .v {
  font-family: var(--mono); font-size: 13.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.35;
}
.stat.hero {
  grid-column: 1 / -1;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 10px;
  background: linear-gradient(90deg, var(--accent-weak), transparent);
  border-color: var(--accent-line);
}
.stat.hero .v { font-size: 19px; font-weight: 700; color: var(--accent); text-align: right; }
.stat.good .v { color: var(--good); }
.stat.bad .v { color: var(--bad); }

.note { font-size: 11.5px; color: var(--faint); margin: 0; line-height: 1.4; }
.msg { font-size: 12px; padding: 6px 9px; border-radius: var(--radius-sm); background: var(--bad-weak); color: var(--bad); }
.msg.info { background: var(--accent-weak); color: var(--accent); }

.bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.bar > span { display: block; height: 100%; transition: width 0.3s ease; }
.bar .b-bad { background: var(--bad); }
.bar .b-good { background: var(--good); }
.bar .b-accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar .b-muted { background: var(--border-strong); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.mt-auto { margin-top: auto; }
.tab-panel { display: flex; flex-direction: column; gap: 9px; }

/* ---------- 7. Widget-specific styles ---------- */

/* World clock */
.w-world-clock .clock-local {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--accent-weak), transparent);
  border: 1px solid var(--accent-line);
}
.w-world-clock .clock-time {
  font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap;
}
.w-world-clock .clock-meta { font-size: 0; text-align: right; } /* font-size 0 hides the " · " separator */
.w-world-clock .clock-meta span { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; }
.w-world-clock .row.between .select { height: 26px; font-size: 12px; }
.w-world-clock .city-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow-y: auto; max-height: 176px; background: var(--surface-2);
}
.w-world-clock .city {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px;
  padding: 5px 6px 5px 10px; border-bottom: 1px solid var(--border);
}
.w-world-clock .city:last-child { border-bottom: 0; }
.w-world-clock .city > div:first-child { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.w-world-clock .city-name { font-weight: 600; font-size: 13px; white-space: nowrap; }
.w-world-clock .city-sub { font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-world-clock .city-time { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13.5px; text-align: right; }
.w-world-clock .city-remove {
  width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent;
  color: var(--faint); font-size: 15px; line-height: 1;
}
.w-world-clock .city-remove:hover { background: var(--bad-weak); color: var(--bad); }
.w-world-clock .night .city-time::before { content: "☾ "; color: var(--faint); font-size: 11px; }

/* Timer */
.w-timer .timer-display {
  text-align: center; font-family: var(--mono); font-size: 36px; font-weight: 700;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; padding: 4px 0 0; line-height: 1.1;
}
.w-timer .timer-display.done { color: var(--bad); animation: uw-pulse 0.9s ease-in-out infinite; }
.w-timer .timer-status { text-align: center; font-size: 10.5px; color: var(--muted); min-height: 15px; text-transform: uppercase; letter-spacing: 0.08em; }
.w-timer .time-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.w-timer .presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.w-timer .presets .btn { padding: 0; font-family: var(--mono); }
.w-timer .controls { display: flex; gap: 7px; }
.w-timer .controls .btn { flex: 1; }
.w-timer .laps {
  list-style: none; margin: 0; padding: 0; max-height: 110px; overflow-y: auto;
  font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.w-timer .laps:empty { display: none; }
.w-timer .laps li { display: flex; justify-content: space-between; padding: 4px 10px; border-bottom: 1px solid var(--border); }
.w-timer .laps li:last-child { border-bottom: 0; }
@keyframes uw-pulse { 50% { opacity: 0.45; } }

/* Risk:Reward */
.w-risk-reward .rr-bar { height: 8px; }

/* Unit converter */
.w-unit-converter .conv-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.w-unit-converter .seg button { padding: 3px 6px; }

/* Password / word counter */
.w-text-tools .pw-out { font-size: 13.5px; letter-spacing: 0.03em; color: var(--accent); }
.w-text-tools .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.w-text-tools .check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.w-text-tools .check:has(input:checked) { color: var(--text); }
.w-text-tools .check input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.w-text-tools .field strong { font-family: var(--mono); font-size: 12px; }
.w-text-tools .range { width: 100%; height: 18px; margin: 0; accent-color: var(--accent); }
.w-text-tools .strength { height: 4px; }
.w-text-tools .results { grid-template-columns: repeat(3, 1fr); }

/* Date calculator */
.check-inline { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.check-inline input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.field .input[type="date"] { color-scheme: inherit; }
[data-theme="dark"] .field .input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

/* QR code */
.w-qr-code .qr-text { height: auto; min-height: 40px; resize: vertical; padding: 2px 0; line-height: 1.4; font-size: 12.5px; }
.w-qr-code .qr-row, .w-wifi-qr .qr-row { display: grid; grid-template-columns: 148px 1fr; gap: 10px; align-items: start; }
.w-qr-code .qr-preview, .w-wifi-qr .qr-preview {
  aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden;
  background: #fff; border: 1px solid var(--border); display: grid; place-items: center;
}
.w-qr-code .qr-preview canvas, .w-wifi-qr .qr-preview canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.w-qr-code .qr-preview.empty canvas, .w-wifi-qr .qr-preview.empty canvas { visibility: hidden; }
.w-qr-code .qr-opts { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.w-qr-code .qr-colors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; }
.w-qr-code .qr-colors .field { min-width: 0; }
.w-qr-code .qr-colors .field > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-qr-code .qr-colors .color { min-width: 0; }
.w-qr-code .color { width: 100%; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.w-qr-code .color::-webkit-color-swatch-wrapper { padding: 0; }
.w-qr-code .color::-webkit-color-swatch { border: 1px solid var(--border-strong); border-radius: 4px; }

/* 3-column field row */
.fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Label/value ladders (Fibonacci, pivots, reference tables) */
.ladder, .ref-grid { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.lrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 10px; border-bottom: 1px solid var(--border); }
.lrow:last-child { border-bottom: 0; }
.lk { font-size: 11.5px; color: var(--muted); }
.lv { font-family: var(--mono); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lrow.key { background: var(--accent-weak); }
.lrow.key .lk, .lrow.key .lv { color: var(--accent); }
.lrow.ext .lk { color: var(--faint); }
.lrow.res .lv { color: var(--bad); }
.lrow.sup .lv { color: var(--good); }
.lrow.bad .lv { color: var(--bad); }
.ref-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ref-grid .lrow { flex-direction: column; gap: 0; padding: 4px 6px; border-right: 1px solid var(--border); text-align: center; }
.ref-grid .lrow:nth-child(4n) { border-right: 0; }
.ref-grid .lrow:nth-last-child(-n+4) { border-bottom: 0; }
.ref-grid .lv { font-size: 12px; color: var(--good); }

/* Meeting overlap bars */
.mt-grid { display: flex; flex-direction: column; gap: 4px; }
.mt-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px; }
.mt-name { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-bar { display: grid; grid-template-columns: repeat(48, 1fr); gap: 1px; height: 12px; }
.mt-bar i { background: var(--surface-3); border-radius: 2px; }
.mt-bar i.on { background: color-mix(in srgb, var(--tint, var(--accent)) 70%, transparent); }
.mt-bar i.ov { background: var(--good); }
.mt-ov .mt-name { color: var(--good); font-weight: 600; }
.mt-axis .mt-ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9.5px; color: var(--faint); }

/* Unix */
.unix-now { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--accent-weak), transparent); border: 1px solid var(--accent-line); }
.unix-now-v { flex: 1; font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* VAT presets */
.presets-row .btn { flex: 1; font-family: var(--mono); }

/* Image compressor */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 22px 12px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.drag { border-color: var(--tint, var(--accent)); background: color-mix(in srgb, var(--tint, var(--accent)) 8%, var(--surface-2)); }
.drop-ico { color: var(--tint, var(--accent)); }
.drop-t { font-size: 13px; font-weight: 600; }
.drop-t u { color: var(--tint, var(--accent)); text-decoration: none; }
.drop-s { font-size: 11px; color: var(--faint); }
.drop.compact { flex-direction: row; padding: 8px 12px; gap: 8px; }
.drop.compact .drop-s { display: none; }
.img-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; align-items: start; }
.img-prev {
  aspect-ratio: 1 / 1; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border);
  background: repeating-conic-gradient(var(--surface-3) 0 25%, var(--surface-2) 0 50%) 0 0 / 14px 14px;
  display: grid; place-items: center;
}
.img-prev img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.img-stats { grid-template-columns: 1fr; }
.range { width: 100%; height: 18px; margin: 0; accent-color: var(--accent); }
.field strong { font-family: var(--mono); font-size: 12px; }

/* Text case */
.chip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.chip-grid .btn { padding: 0 4px; font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.w-text-case .textarea { min-height: 96px; font-family: var(--mono); font-size: 12.5px; }

/* Color */
.clr-top { display: flex; gap: 8px; align-items: stretch; }
.clr-swatch {
  width: 64px; flex-shrink: 0; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  cursor: pointer; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.clr-swatch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.clr-vals { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.clr-val { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; border-bottom: 1px solid var(--border); }
.clr-val:last-child { border-bottom: 0; }
.clr-val code { font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clr-shades { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.shade { height: 26px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.08); padding: 0; transition: transform 0.12s; }
.shade:hover { transform: translateY(-2px); }
.shade.base { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--text); }

/* ---------- 8. Responsive ---------- */
@media (max-width: 1100px) {
  .folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1399px) and (min-width: 961px) {
  .folders { gap: 34px 28px; max-width: 660px; }
}
@media (max-width: 960px) {
  .folders { --fw: 184px; gap: 30px 30px; max-width: 460px; }
  .home { padding-top: max(14px, calc(5vh - 20px)); }
}
@media (max-width: 760px) {
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .brand-name { display: none; }
  .brand-wrap { gap: 8px; }
  .site-switch a { padding: 2px 7px; font-size: 11px; }
  /* Sessions stay on one row: compact cells, dot shows open/closed */
  .sess { padding: 8px 8px 9px; text-align: center; }
  .sess-top { justify-content: center; gap: 5px; }
  .sess-state { display: none; }
  .sess-name { font-size: 12px; }
  .sess-time .lbl { display: block; font-family: var(--font); font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
  .sess-time .val { font-size: 12.5px; }
  .sess-hours { display: none; }
  .sr-group { display: none; }
}
@media (max-width: 720px) {
  .folder-grid { grid-template-columns: minmax(0, 1fr); }
  .folder-overlay { padding: 10px; align-items: flex-end; }
  .folder-panel {
    max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px);
    border-radius: 26px; padding: 14px 12px 16px;
  }
  .folder-head { top: -14px; margin: -14px -12px 10px; padding: 14px 56px 12px; }
  .folder-close { right: 12px; }
  .folder-title { font-size: 18px; }
}
@media (max-width: 480px) {
  .topbar-inner { padding: 8px 14px; gap: 10px; }
  .search input { padding-right: 12px; }
  .search-kbd { display: none; }
  .home { padding: 4vh 14px 20px; }
  .home-hero { margin-bottom: 4vh; }
  .folders { --fw: calc((100% - 16px) / 2); gap: 22px 16px; max-width: 360px; }
  .folder-box { padding: 12px; }
  .folder-badge { width: 28px; height: 28px; border-radius: 9px; }
  .folder-badge .ico { width: 16px; height: 16px; }
  .mini-grid { gap: 4px 6px; }
  .mini-icon { max-width: 30px; }
  .mini-icon .ico { width: 14px; height: 14px; }
  .mini-name { font-size: 8px; }
  .sess { padding: 7px 4px 8px; }
  .sess-name { font-size: 11px; }
  .sess-time .val { font-size: 11.5px; }
  .search-results { position: fixed; top: 54px; left: 12px; right: 12px; transform: none; width: auto; max-width: none; }
  .folder-label { font-size: 13px; }
  .w-qr-code .qr-row, .w-wifi-qr .qr-row { grid-template-columns: 120px 1fr; }
  .fields-3 { grid-template-columns: 1fr 1fr; }
  .chip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-grid .lrow:nth-child(2n) { border-right: 0; }
  .ref-grid .lrow:nth-last-child(-n+4) { border-bottom: 1px solid var(--border); }
  .ref-grid .lrow:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 380px) {
  .fields { grid-template-columns: 1fr; }
  .w-timer .presets { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 9. PDF & File Tools ---------- */
.flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 232px; overflow-y: auto; }
.flist:empty { display: none; }
.fitem {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 6px 6px 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.fitem.bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.fitem.bad .fm { color: var(--bad); }
.fnum {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font: 600 11px var(--mono); color: var(--tint, var(--accent)); background: color-mix(in srgb, var(--tint, var(--accent)) 14%, transparent);
}
.fthumb { flex-shrink: 0; width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); background: var(--bg); }
.fname { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.fn { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm { font-size: 11px; color: var(--faint); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbtns { flex-shrink: 0; display: flex; gap: 3px; }
.btn.icon.sm { width: 26px; height: 26px; padding: 0; display: inline-grid; place-items: center; }
.fcard {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.fcard .ico { color: var(--tint, var(--accent)); flex-shrink: 0; }
.mono-ta, .out-ta { font-family: var(--mono) !important; font-size: 12px !important; line-height: 1.45; word-break: break-all; }
.out-ta { background: var(--bg); }
.mono-ta { min-height: 110px; }
.sel-sm { height: 28px; font-size: 12px; padding: 0 8px; width: auto; }
.search-sm { height: 28px; font-size: 12px; max-width: 170px; }
.badge-fmt {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px;
  font: 600 10.5px var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--tint, var(--accent)); background: color-mix(in srgb, var(--tint, var(--accent)) 14%, transparent);
}
.tbl-wrap { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 5px 9px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--panel-solid, var(--surface)); font-size: 11px; font-weight: 600; color: var(--muted); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--tint, var(--accent)) 7%, transparent); }
.tbl .rn { color: var(--faint); font-family: var(--mono); font-size: 10.5px; width: 1%; }
.hash-list { display: flex; flex-direction: column; gap: 6px; }
.hash-row {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 6px 6px 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.hash-row .lk { font-size: 11px; font-weight: 600; color: var(--muted); }
.hash-row code { font-family: var(--mono); font-size: 11.5px; word-break: break-all; line-height: 1.4; }
.hash-row.match { border-color: var(--good); background: var(--good-weak); }
.hash-row.match .lk { color: var(--good); }
.verdict { font-size: 12px; font-weight: 600; min-height: 16px; }
.verdict.ok { color: var(--good); }
.verdict.no { color: var(--bad); }

/* ---------- 10. Text & Web Tools + new tools in other folders ---------- */
.faint { color: var(--faint); }
.wrap-row { flex-wrap: wrap; row-gap: 6px; column-gap: 12px; }
.msg.ok { background: var(--good-weak); color: var(--good); }
.stat.warn .v { color: var(--warn); }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-size: 11px; color: var(--tint, var(--accent)); cursor: pointer; text-transform: none; letter-spacing: 0; }
.label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }

/* Text diff */
.diff-out {
  max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); font-family: var(--mono); font-size: 12px; line-height: 1.5;
}
.diff-out.words { padding: 8px 10px; white-space: pre-wrap; word-break: break-word; }
.diff-out del, .diff-out .del mark { background: var(--bad-weak); color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 55%, transparent); border-radius: 3px; }
.diff-out ins, .diff-out .add mark { background: var(--good-weak); color: var(--good); text-decoration: none; border-radius: 3px; }
.diff-out .add mark, .diff-out .del mark { padding: 0 1px; }
.diff-out .del mark { background: color-mix(in srgb, var(--bad) 30%, transparent); }
.diff-out .add mark { background: color-mix(in srgb, var(--good) 30%, transparent); }
.dl { display: grid; grid-template-columns: 30px 30px 14px minmax(0, 1fr); min-width: 0; }
.dl .dn { color: var(--faint); text-align: right; padding-right: 6px; font-size: 10.5px; user-select: none; border-right: 1px solid var(--border); }
.dl .ds { text-align: center; user-select: none; }
.dl .dt { white-space: pre-wrap; word-break: break-word; padding-right: 8px; }
.dl.add { background: color-mix(in srgb, var(--good) 10%, transparent); }
.dl.add .ds, .dl.add .dt { color: var(--good); }
.dl.del { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.dl.del .ds, .dl.del .dt { color: var(--bad); }
.dl.skip, .dl.same-note { display: block; padding: 3px 10px; color: var(--faint); font-family: var(--font); font-size: 11px; background: var(--surface-3); }
.dl.same-note { color: var(--good); background: var(--good-weak); }

/* Markdown preview */
.md-preview {
  max-height: 280px; overflow: auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); font-size: 13px; line-height: 1.55; word-break: break-word;
}
.md-preview > :first-child { margin-top: 0; }
.md-preview > :last-child { margin-bottom: 0; }
.md-preview h1, .md-preview h2, .md-preview h3, .md-preview h4, .md-preview h5, .md-preview h6 { margin: 0.9em 0 0.4em; line-height: 1.25; }
.md-preview h1 { font-size: 1.45em; } .md-preview h2 { font-size: 1.25em; } .md-preview h3 { font-size: 1.1em; }
.md-preview p, .md-preview ul, .md-preview ol, .md-preview blockquote, .md-preview pre, .md-preview table { margin: 0 0 0.7em; }
.md-preview ul, .md-preview ol { padding-left: 1.4em; }
.md-preview a { color: var(--tint, var(--accent)); }
.md-preview code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.md-preview pre { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; overflow: auto; }
.md-preview pre code { background: none; padding: 0; }
.md-preview blockquote { border-left: 3px solid var(--tint, var(--accent)); padding: 2px 0 2px 10px; color: var(--muted); }
.md-preview hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
.md-preview img { max-width: 100%; border-radius: 6px; }
.md-preview table { border-collapse: collapse; font-size: 12.5px; }
.md-preview th, .md-preview td { border: 1px solid var(--border); padding: 4px 8px; }
.md-preview th { background: var(--surface-3); }

/* JSON */
.err-snip {
  margin: 0; padding: 6px 10px; overflow-x: auto; border-radius: var(--radius-sm);
  background: var(--bad-weak); color: var(--bad); font-family: var(--mono); font-size: 11.5px; line-height: 1.45;
}

/* JWT */
.jwt-tok {
  font-family: var(--mono); font-size: 11px; line-height: 1.45; word-break: break-all; color: var(--faint);
  max-height: 64px; overflow: auto; padding: 6px 9px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border);
}
.jwt-tok:empty { display: none; }
.jwt-tok .j-h { color: #fb7185; } .jwt-tok .j-p { color: #c084fc; } .jwt-tok .j-s { color: #22d3ee; }
[data-theme="light"] .jwt-tok .j-h { color: #e11d48; }
[data-theme="light"] .jwt-tok .j-p { color: #9333ea; }
[data-theme="light"] .jwt-tok .j-s { color: #0891b2; }
.jwt-json { min-height: 96px; }
.ladder .lv { text-align: right; overflow-wrap: anywhere; }
.ladder:empty { display: none; }

/* Wi-Fi QR */
.qr-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wifi-payload { font-family: var(--mono); font-size: 11px; color: var(--faint); word-break: break-all; }

/* Scratchpad */
.notepad { min-height: 220px; font-size: 13.5px; line-height: 1.55; }
.save-state { color: var(--good); }

/* Image converter / EXIF */
.fitem.tall { align-items: flex-start; }
.mchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mchip {
  font-size: 10.5px; line-height: 1; padding: 4px 7px; border-radius: 999px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--surface-3); color: var(--muted);
}
.mchip.risk { background: var(--bad-weak); color: var(--bad); font-weight: 600; }
.mchip.ok { background: var(--good-weak); color: var(--good); }
.fm.done { color: var(--good); margin-top: 3px; white-space: normal; }

/* Win-rate simulator */
.sim-box { display: flex; flex-direction: column; gap: 6px; }
.sim-box .label { margin: 0; }
.sim-svg { width: 100%; height: 110px; display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.sim-svg polyline { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-opacity: 0.55; }
.sim-svg polyline.up { stroke: var(--good); }
.sim-svg polyline.down { stroke: var(--bad); }
.sim-svg .sim-base { stroke: var(--faint); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }

/* Scale-out targets */
.tp-grid { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr); gap: 6px 7px; align-items: center; }
.tp-grid .label { margin: 0; }
.tp-l { font: 600 11.5px var(--mono); color: var(--tint, var(--accent)); }
.tbl td.pos { color: var(--good); }

/* Business days */
.field-lite { display: flex; flex-direction: column; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wd {
  min-width: 38px; height: 28px; padding: 0 6px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer;
}
.wd[aria-pressed="true"] { background: color-mix(in srgb, var(--tint, var(--accent)) 18%, transparent); border-color: var(--tint, var(--accent)); color: var(--text); }
.wd-pre { display: inline-flex; gap: 4px; margin-left: auto; }
.hol-ta { min-height: 64px; }
.check-inline .mini-in { width: 52px; height: 26px; padding: 0 6px; font-size: 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text); font-family: var(--mono); }
.jwt-key { min-height: 52px; }
.jwt-in { min-height: 60px; }

/* ---------- 11. Valuation, capital budgeting, ratios, entries, Kelly ---------- */
.tbl td.neg { color: var(--bad); }
.cf-ta { min-height: 64px; }
.lrow.good .lv { color: var(--good); }
.ratio-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.ratio { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
.ratio:last-child { border-bottom: 0; }
.ratio.good { border-left-color: var(--good); }
.ratio.warn { border-left-color: var(--warn); }
.ratio.bad { border-left-color: var(--bad); }
.ratio-k { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ratio-k b { font-size: 12.5px; font-weight: 600; }
.ratio-k span { font-size: 10.5px; color: var(--faint); }
.ratio-v { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; line-height: 1.25; }
.ratio-v strong { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.ratio-v em { font-style: normal; font-size: 10.5px; font-weight: 600; }
.ratio.good .ratio-v em { color: var(--good); }
.ratio.warn .ratio-v em { color: var(--warn); }
.ratio.bad .ratio-v em { color: var(--bad); }
.entry-grid { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 26px; gap: 6px; align-items: center; }
.entry-grid .label { margin: 0; }
.entry-rows { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }

.w-kelly .tbl th, .w-kelly .tbl td, .w-npv-irr .tbl th, .w-npv-irr .tbl td { padding: 5px 7px; }

/* ---------- 12. Put-call ratio + compounding ---------- */
.pcr-read { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); border-left: 3px solid var(--border-strong); }
.pcr-read strong { font-size: 14px; }
.pcr-read span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.pcr-read.bull { border-left-color: var(--good); } .pcr-read.bull strong { color: var(--good); }
.pcr-read.neutral { border-left-color: var(--muted); }
.pcr-read.bear { border-left-color: var(--bad); } .pcr-read.bear strong { color: var(--bad); }
.pcr-read.xlow, .pcr-read.xhigh { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface-2)); }
.pcr-read.xlow strong, .pcr-read.xhigh strong { color: var(--warn); }
.pcr-scale { padding: 2px 0 14px; }
.pcr-track { position: relative; display: flex; height: 8px; border-radius: 999px; overflow: visible; }
.pcr-track > span { height: 100%; opacity: 0.75; }
.pcr-track > span:first-child { border-radius: 999px 0 0 999px; }
.pcr-track > span:last-of-type { border-radius: 0 999px 999px 0; }
.pcr-track .xlow, .pcr-track .xhigh { background: var(--warn); }
.pcr-track .bull { background: var(--good); }
.pcr-track .neutral { background: var(--border-strong); }
.pcr-track .bear { background: var(--bad); }
.pcr-mark { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--bg); }
.pcr-ticks { position: relative; height: 12px; margin-top: 3px; }
.pcr-ticks span { position: absolute; transform: translateX(-50%); font: 10px var(--mono); color: var(--faint); }

/* ---------- 13. CAGR, Sharpe/Sortino, EPS, DCA, DRIP ---------- */
.qb {
  display: inline-block; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
.qb.bad  { color: var(--bad);  background: var(--bad-weak);  border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.qb.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.qb.good { color: var(--good); background: var(--good-weak); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.qb.top  { color: var(--accent); background: var(--accent-weak); border-color: var(--accent-line); }
.qb-legend { display: flex; flex-wrap: wrap; gap: 5px; }
.ratio.top { border-left-color: var(--accent); }
.ratio .ratio-v em.qb { margin-top: 3px; }
.w-sharpe-sortino .ratio-v em.qb { color: inherit; }
.w-sharpe-sortino .ratio.bad .qb { color: var(--bad); }
.w-sharpe-sortino .ratio.warn .qb { color: var(--warn); }
.w-sharpe-sortino .ratio.good .qb { color: var(--good); }
.w-sharpe-sortino .ratio.top .qb { color: var(--accent); }
.w-eps .fields .field > span, .w-drip .fields .field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-dca-sim .seg button, .w-drip .seg button { padding: 3px 6px; }
.drip-cmp td:not(:first-child), .drip-cmp th:not(:first-child) { text-align: right; }
.drip-cmp td:first-child { color: var(--muted); }
.w-cagr .tbl td:not(:first-child), .w-cagr .tbl th:not(:first-child),
.w-dca-sim .tbl td:not(:first-child), .w-dca-sim .tbl th:not(:first-child),
.w-drip .tbl td:not(:first-child), .w-drip .tbl th:not(:first-child) { text-align: right; }
.drip-cmp .tbl th, .drip-cmp .tbl td { padding: 5px 8px; }

/* ---------- 14. Black-Scholes, margin/liquidation, correlation, unit economics, Pomodoro ---------- */
.bs-tbl td:not(:first-child), .bs-tbl th:not(:first-child) { text-align: right; font-family: var(--mono); }
.bs-tbl td:first-child { color: var(--muted); }
.bs-tbl td b { color: var(--text); }
.corr-ta { min-height: 54px; }
.w-corr-beta .seg button, .w-pomodoro .seg button { padding: 3px 6px; }
.w-pomodoro .pomo-phase { text-align: center; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.w-pomodoro .pomo-display {
  text-align: center; font-family: var(--mono); font-size: 40px; font-weight: 700;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.w-pomodoro .pomo-break .pomo-display, .w-pomodoro .pomo-break .pomo-phase { color: var(--good); }
.w-pomodoro .pomo-break .bar .b-accent { background: var(--good); }
.pomo-rounds { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pomo-rounds b { font-family: var(--mono); color: var(--text); font-size: 14px; }
.w-pomodoro .controls { display: flex; gap: 7px; }
.w-pomodoro .controls .btn { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.bs-wrap { max-height: none; }

/* ---------- 15. Email (.eml) to PDF ---------- */
.eml-pv { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12px; min-width: 0; }
.eml-r { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 6px; line-height: 1.4; }
.eml-r b { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 1px; }
.eml-r span { overflow-wrap: anywhere; }
.eml-body-pv { margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--border); max-height: 150px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); line-height: 1.45; unicode-bidi: plaintext; }
.eml-body { min-height: 130px; font-size: 12.5px; unicode-bidi: plaintext; }
.w-eml-pdf .eml-in { font-family: var(--font); font-size: 12.5px; }

/* ---------- 16. Scientific calculator + audio tools ---------- */
.calc-screen { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.calc-top { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: var(--faint); font-family: var(--mono); }
.calc-ang { color: var(--tint, var(--accent)); }
.calc-ans { text-transform: none; letter-spacing: 0; font-weight: 500; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-expr { width: 100%; border: 0; background: transparent; color: var(--text); font-family: var(--mono); font-size: 15px; text-align: right; padding: 2px 0; outline: none; }
.calc-res { min-height: 28px; text-align: right; font-family: var(--mono); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); overflow-wrap: anywhere; line-height: 1.25; }
.calc-res.final { color: var(--accent); }
.calc-res.err { color: var(--bad); font-size: 13px; font-weight: 600; font-family: var(--font); padding-top: 6px; }
.calc-keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.ck {
  height: 34px; min-width: 0; padding: 0 2px; border-radius: var(--radius-xs); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 600; font-family: var(--mono);
  white-space: nowrap; overflow: hidden; transition: background 0.12s, border-color 0.12s, transform 0.06s;
}
.ck:hover { border-color: var(--border-strong); background: var(--surface-3); }
.ck:active { transform: translateY(1px); }
.ck.fn { font-family: var(--font); font-size: 12px; color: var(--muted); }
.ck.op { color: var(--tint, var(--accent)); font-size: 16px; }
.ck.warn { color: var(--bad); font-family: var(--font); font-size: 12px; }
.ck.eq { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-size: 16px; }
.ck.eq:hover { box-shadow: var(--accent-glow); background: var(--accent); }
.ck.span2 { grid-column: span 2; }
.ck b { color: var(--tint, var(--accent)); }
.calc-hist { list-style: none; margin: 0; padding: 0; max-height: 116px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.calc-hist li { border-bottom: 1px solid var(--border); }
.calc-hist li:last-child { border-bottom: 0; }
.calc-hist button { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 4px 9px; border: 0; background: none; color: var(--muted); font: 12px var(--mono); text-align: left; }
.calc-hist button:hover { background: color-mix(in srgb, var(--tint, var(--accent)) 8%, transparent); color: var(--text); }
.calc-hist .ce { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-hist .cr { flex-shrink: 0; color: var(--text); font-weight: 600; }
.calc-hist-empty { padding: 6px 9px; font-size: 12px; color: var(--faint); }

.wave-wrap { display: flex; flex-direction: column; gap: 3px; }
.wave { width: 100%; height: 96px; display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); cursor: ew-resize; touch-action: none; }
.wave-t { display: flex; justify-content: space-between; font: 10.5px var(--mono); color: var(--faint); }

.tone-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tone-hz-wrap { display: flex; align-items: baseline; gap: 6px; }
.tone-hz-wrap span { font-size: 14px; color: var(--muted); font-weight: 600; }
.tone-hz { width: 130px; height: 42px; font-size: 26px; font-weight: 700; text-align: right; }
.tone-note { font: 12px var(--mono); color: var(--faint); }
.tone-scale { display: flex; justify-content: space-between; font: 10px var(--mono); color: var(--faint); margin-top: -4px; }
.tone-pre .btn.on { border-color: var(--tint, var(--accent)); color: var(--tint, var(--accent)); }
.tone-vol { display: grid; grid-template-columns: auto minmax(0, 1fr) 40px; align-items: center; gap: 10px; }
.tone-vol b { font: 600 12px var(--mono); text-align: right; }
.w-tone-gen .seg button { padding: 3px 4px; }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }

.memo-top { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.memo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.memo-dot.on { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-weak); animation: uw-pulse 1.2s ease-in-out infinite; }
.memo-dot.paused { background: var(--warn); }
.memo-time { font: 700 30px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.memo-state { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.memo-meter { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.memo-meter span { display: block; height: 100%; width: 0; background: var(--good); border-radius: 999px; transition: width 0.06s linear; }
.memo-meter span.hot { background: var(--warn); }
.memo-meter span.clip { background: var(--bad); }
.memo-ctl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.memo-out { display: flex; flex-direction: column; gap: 7px; }
.memo-audio { width: 100%; height: 36px; }

/* Below ~1100px the centred search would meet the Hub / Media pill: let it fill the space instead */
@media (max-width: 1100px) {
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .topbar-inner > .search { max-width: 440px; justify-self: center; }
}

/* Hub / Media switcher on very narrow phones */
@media (max-width: 380px) {
  .topbar-inner { gap: 8px; }
  .brand-wrap { gap: 6px; }
  .site-switch a { padding: 2px 4px; font-size: 10.5px; }
  .search input { padding-left: 32px; }
  .search-icon { left: 11px; }
}
