﻿/* ═══════════════════════════════════════════════════════
   Everyday Tools  |  Design System v2
   Ultra-modern, fast, dark-capable UI
   ═══════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────── */
:root {
  /* Brand */
  --brand:        #7c3aed;
  --brand-2:      #4f46e5;
  --brand-strong: #6d28d9;
  --accent:       #f97316;
  --accent-2:     #ec4899;

  /* Surfaces */
  --bg:           #f7f6ff;
  --surface:      #ffffff;
  --surface-soft: #f2f0fd;
  --surface-raised:#fdfcff;

  /* Text */
  --text:         #0d0a1e;
  --muted:        #6b6482;

  /* Borders */
  --border:       #e3e0f5;
  --border-strong:#c5c1de;

  /* Effects */
  --focus:        #7c3aed;
  --radius:       20px;
  --radius-sm:    13px;
  --radius-xs:    8px;
  --shadow:       0 24px 64px rgba(55,25,110,.14);
  --shadow-soft:  0 4px 28px rgba(55,25,110,.08);
  --shadow-card:  0 1px 3px rgba(55,25,110,.06), 0 6px 20px rgba(55,25,110,.05);

  /* Header */
  --header-h: 66px;

  /* Gradients */
  --grad:         linear-gradient(135deg,#7c3aed 0%,#4f46e5 100%);
  --grad-warm:    linear-gradient(135deg,#f97316 0%,#ec4899 100%);
  --grad-text:    linear-gradient(135deg,#7c3aed 0%,#6366f1 50%,#4f46e5 100%);
}

html.dark {
  --brand:        #a78bfa;
  --brand-2:      #818cf8;
  --brand-strong: #8b5cf6;
  --accent:       #fb923c;

  --bg:           #080810;
  --surface:      #0f0f1c;
  --surface-soft: #17172a;
  --surface-raised:#131322;

  --text:         #eeeaff;
  --muted:        #8a86a6;

  --border:       #232238;
  --border-strong:#3a3760;

  --shadow:       0 24px 64px rgba(0,0,0,.55);
  --shadow-soft:  0 4px 28px rgba(0,0,0,.38);
  --shadow-card:  0 1px 3px rgba(0,0,0,.45), 0 6px 20px rgba(0,0,0,.32);

  --grad:         linear-gradient(135deg,#a78bfa 0%,#818cf8 100%);
  --grad-text:    linear-gradient(135deg,#c4b5fd 0%,#a5b4fc 50%,#818cf8 100%);
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 55% at 60% -5%,  color-mix(in srgb,var(--brand) 13%,transparent), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 25%, color-mix(in srgb,var(--brand-2) 9%,transparent), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0%   70%, color-mix(in srgb,var(--accent) 7%,transparent),  transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: "Inter","Segoe UI",system-ui,-apple-system,sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { cursor: pointer; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }

/* ─── Layout ─────────────────────────────────────────── */
.wt-container { width: min(1300px, calc(100% - 1.8rem)); margin: 0 auto; }

/* ─── Header ─────────────────────────────────────────── */
.wt-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb,var(--surface) 80%,transparent);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.wt-header-inner {
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

/* ─── Logo ───────────────────────────────────────────── */
.wt-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  white-space: nowrap;
}
.wt-logo-icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; }
.wt-logo-text {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Header Search ──────────────────────────────────── */
.wt-header-search { max-width: 440px; width: 100%; justify-self: center; }
.wt-header-search .wt-input {
  border-radius: 999px;
  padding: 0.48rem 1.1rem;
  font-size: 0.88rem;
  background: var(--surface-soft);
  border-color: transparent;
  box-shadow: none;
}
.wt-header-search .wt-input:focus {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand) 14%,transparent);
}

.wt-header-actions { display: inline-flex; gap: 0.45rem; grid-column: 3; }

/* ─── Icon Buttons ───────────────────────────────────── */
.wt-btn-icon {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  transition: all .15s ease;
}
.wt-btn-icon:hover { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb,var(--brand) 8%,var(--surface)); }
.wt-btn-icon.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ─── Hero ───────────────────────────────────────────── */
.wt-hero { padding: 3.5rem 0 2.5rem; }
.wt-hero .wt-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ─── Hero Chips (merged eyebrow + benefits) ─────────── */
.wt-hero-chips {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.12rem, 0.6vw, 0.4rem);
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.wt-hero-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: clamp(0.12rem, 0.4vw, 0.26rem) clamp(0.32rem, 0.85vw, 0.78rem);
  background: color-mix(in srgb,var(--brand) 9%,transparent);
  border: 1px solid color-mix(in srgb,var(--brand) 24%,transparent);
  border-radius: 999px;
  color: var(--brand);
  font-size: clamp(0.38rem, 1.2vw, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wt-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(0.68rem, 3.25vw, 2.85rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: none;
  white-space: nowrap;
}

.wt-hero-copy {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: none;
  font-size: clamp(0.32rem, 1.65vw, 1rem);
  line-height: 1.35;
  white-space: nowrap;
}

/* ─── Hero Search ────────────────────────────────────── */
.wt-search-box { position: relative; width: 100%; max-width: 580px; margin-bottom: 0; }

.wt-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.wt-search-icon svg { width: 18px; height: 18px; }

.wt-search-box .wt-input {
  border-radius: 999px;
  padding: 1rem 4rem 1rem 3rem;
  font-size: clamp(0.72rem, 1.4vw, 1rem);
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: all .2s ease;
}
.wt-search-box .wt-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 5px color-mix(in srgb,var(--brand) 12%,transparent), var(--shadow-soft);
}

.wt-search-kbd {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 0.14rem 0.42rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-soft);
  pointer-events: none;
}

/* ─── Category Filter ────────────────────────────────── */
.wt-categories {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 auto 1.6rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ─── Homepage Ad Slots ─────────────────────────────── */
.wt-home-ad-band {
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: center;
}

.wt-ad-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed color-mix(in srgb,var(--border) 80%,transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb,var(--surface-soft) 70%,transparent);
  overflow: hidden;
}

.wt-ad-slot iframe {
  display: block;
  border: 0;
}

.wt-ad-slot-band {
  width: min(100%, 960px);
  min-height: 92px;
}

.wt-ad-slot-rail {
  width: 160px;
  min-height: 302px;
  flex-shrink: 0;
}

.wt-ad-slot-rail-primary { min-height: 602px; }

/* second side-slot appears after first scroll */
.wt-ad-slot-rail-secondary { display: none; }
body.wt-ads-scrolled.wt-ads-secondary-fit .wt-ad-slot-rail-secondary { display: block; }

.wt-ad-rail {
  position: fixed;
  top: calc(var(--header-h) + 0.5rem);
  z-index: 15;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  /* cap height so rails never overlap the footer */
  max-height: calc(100vh - var(--header-h) - 7rem);
  overflow: hidden;
}

.wt-ad-rail-left {
  /* just outside the left edge of the 1300px content container */
  left: calc((100vw - 1300px) / 2 - 160px - 0.75rem);
}
.wt-ad-rail-right {
  /* just outside the right edge of the 1300px content container */
  right: calc((100vw - 1300px) / 2 - 160px - 0.75rem);
}

.wt-cat-pill {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.36rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  transition: all .15s ease;
}
.wt-cat-pill:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.wt-cat-pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb,var(--brand) 38%,transparent);
}

/* ─── Grid Section ───────────────────────────────────── */
.wt-grid-section { padding-bottom: 4.5rem; }
.wt-grid-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; }
.wt-grid-heading h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.wt-grid-count {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.72rem;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ─── Tool Grid ──────────────────────────────────────── */
.wt-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 0.7rem;
}
@media (max-width: 1100px) { .wt-tool-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px)  { .wt-tool-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px)  { .wt-tool-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px)  { .wt-header-search { display: none; } }
@media (max-width: 640px)  { .wt-consent { inset: auto 0.75rem 0.75rem 0.75rem; } }
@media (max-width: 640px)  { .wt-hero-chips { gap: 0.1rem; } }
@media (max-width: 640px)  { .wt-hero-chips li { gap: 0.12rem; padding: 0.08rem 0.2rem; font-size: 0.31rem; letter-spacing: 0.01em; } }
@media (max-width: 640px)  { .wt-categories { flex-wrap: wrap; overflow: visible; } }
@media (min-width: 1700px) { .wt-ad-rail { display: flex; } }
@media (max-width: 1024px) { .wt-ad-slot-band { min-height: 252px; } }
@media (max-width: 640px)  { .wt-home-ad-band { margin-bottom: 1rem; } }
@media (max-width: 640px)  { .wt-ad-slot-band { min-height: 52px; } }

/* Tool pages: rails start right below header (no hero section to clear) */
body[data-tool-id] .wt-ad-rail { top: calc(var(--header-h) + 0.5rem); }

/* Tool page band ad */
.wt-tool-ad-band {
  margin: 1.6rem 0 0;
  display: flex;
  justify-content: center;
}

/* Pre-footer ad (homepage + tool pages) */
.wt-prefooter-ad {
  padding: 2.5rem 0 0.5rem;
  display: flex;
  justify-content: center;
}

.wt-ad-slot-prefooter {
  width: min(100%, 960px);
  min-height: 92px;
}

/* ─── Inline Ad Card (in tool grid) ─────────────────── */
/* keeps ad items as normal tool cards within the grid */
.wt-ad-card {
  grid-column: auto;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 1rem;
  min-height: 104px;
}

.wt-ad-card-label {
  position: absolute;
  top: 0.28rem;
  right: 0.5rem;
  font-size: 0.62rem;
  color: var(--muted);
  opacity: 0.65;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  pointer-events: none;
}

/* ─── Tool Card ──────────────────────────────────────── */
.wt-tool-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.7rem;
  align-items: start;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 1rem;
  overflow: hidden;
  will-change: transform;
  transition:
    transform .22s cubic-bezier(.34,1.56,.64,1),
    box-shadow .22s ease,
    border-color .18s ease;
}
/* accent stripe */
.wt-tool-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.wt-tool-card:hover {
  border-color: color-mix(in srgb,var(--brand) 38%,var(--border));
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.wt-tool-card:hover::before { transform: scaleX(1); }

.wt-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 4px 12px rgba(0,0,0,.18);
}
.wt-tool-name {
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 0.16rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.wt-tool-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ─── Fav Button ─────────────────────────────────────── */
.wt-fav-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  padding: 0.1rem;
  opacity: 0;
  transition: opacity .15s ease;
}
.wt-tool-card:hover .wt-fav-btn,
.wt-fav-btn.is-fav { opacity: 1; color: var(--accent); }

/* ─── Empty State ────────────────────────────────────── */
.wt-empty-state {
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ─── Footer ─────────────────────────────────────────── */
.wt-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3rem 0 1.5rem;
}
.wt-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 860px) { .wt-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .wt-footer-grid { grid-template-columns: 1fr; } }
.wt-footer h3, .wt-footer h4 {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.wt-footer p { color: var(--muted); font-size: 0.84rem; margin: 0.5rem 0 0; line-height: 1.65; }
.wt-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.wt-footer li { font-size: 0.84rem; color: var(--muted); }
.wt-footer a:hover { color: var(--brand); }
.wt-footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ─── Content Pages ───────────────────────────────────── */
.wt-page {
  flex: 1;
  padding: 1.25rem 0 4rem;
}
.wt-page-header {
  padding: 1.25rem 0 1rem;
}
.wt-page-header h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.wt-page-header p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
}
.wt-page-grid {
  display: grid;
  gap: 1rem;
}
.wt-page-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}
.wt-page-card h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wt-page-card p,
.wt-page-card li {
  color: var(--muted);
  font-size: 0.92rem;
}
.wt-page-card ul {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
}
.wt-page-card li + li {
  margin-top: 0.45rem;
}
.wt-note {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb,var(--brand) 18%,var(--border));
  background: color-mix(in srgb,var(--brand) 7%,var(--surface));
  color: var(--muted);
}

/* ─── Consent Banner ──────────────────────────────────── */
.wt-consent {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 120;
  display: flex;
  justify-content: center;
}
.wt-consent-card {
  width: min(920px, 100%);
  border: 1.5px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb,var(--surface) 92%,transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 1.15rem;
}
.wt-consent-copy h2 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.wt-consent-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.wt-consent-copy a {
  color: var(--brand);
}
.wt-consent-eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wt-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}
.wt-consent-panel {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.wt-consent-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
.wt-consent-option input[type=checkbox] {
  margin-top: 0.15rem;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.wt-consent-option span {
  display: grid;
  gap: 0.22rem;
}
.wt-consent-option strong {
  font-size: 0.88rem;
}
.wt-consent-option small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.wt-consent-save {
  display: flex;
  justify-content: flex-end;
}

/* "Recommended" badge inside the Accept all button */
.wt-consent-recommended {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 0.08rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* ─── Breadcrumb ─────────────────────────────────────── */
.wt-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.1rem;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1rem 0 0;
}
.wt-breadcrumb .sep { margin: 0 0.25rem; opacity: 0.45; }
.wt-breadcrumb a:hover { color: var(--brand); }

/* ─── Buttons ────────────────────────────────────────── */
.wt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.48rem 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all .15s ease;
  white-space: nowrap;
}
.wt-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.wt-btn-primary {
  background: var(--grad);
  color: #fff;
  border: none;
  box-shadow: 0 4px 18px color-mix(in srgb,var(--brand) 36%,transparent);
}
.wt-btn-primary:hover {
  color: #fff;
  box-shadow: 0 7px 26px color-mix(in srgb,var(--brand) 50%,transparent);
  transform: translateY(-2px);
}
.wt-btn:disabled { opacity: 0.48; cursor: not-allowed; transform: none; box-shadow: none; }

/* ─── Inputs ─────────────────────────────────────────── */
.wt-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.52rem 0.85rem;
  font-size: 0.9rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.wt-input {
  resize: vertical;
  font-family: "Cascadia Code",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size: 0.84rem;
  line-height: 1.6;
}
select.wt-input { appearance: auto; }
.wt-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand) 14%,transparent);
}

/* ─── Toast ──────────────────────────────────────────── */
.wt-toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  background: var(--text);
  color: var(--surface);
  border-radius: 999px;
  padding: 0.52rem 1.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
  z-index: 9999;
}
.wt-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ─── Skip Link ──────────────────────────────────────── */
.wt-skip-link { position: absolute; left: -999px; top: -999px; }
.wt-skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Tool styles merged from tools.css
   -------------------------------------------------------------------------- */
/* ═══════════════════════════════════════════════════════
   Everyday Tools  |  Tool Page Styles v2
   ═══════════════════════════════════════════════════════ */

/* ─── Tool Page Layout ───────────────────────────────── */
.wt-tool-page { flex: 1; padding-bottom: 4rem; }

.wt-tool-header { padding: 1.8rem 0 0.8rem; }
.wt-tool-header h1 {
  margin: 0.25rem 0 0.55rem;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.wt-tool-header p { margin: 0; color: var(--muted); max-width: 64ch; font-size: 0.95rem; line-height: 1.65; }

.wt-tool-root { margin-top: 1.6rem; display: grid; gap: 1rem; }

.wt-loading {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  font-size: 0.9rem;
}

.wt-tool-about {
  margin-top: 1.4rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-soft) 92%, transparent));
  box-shadow: var(--shadow-card);
}

.wt-tool-about-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.3fr repeat(2, minmax(0, 1fr));
}

.wt-tool-about-main,
.wt-tool-about-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 6px);
  background: color-mix(in srgb, var(--surface-raised) 96%, transparent);
}

.wt-tool-about-main h3,
.wt-tool-about-card h4,
.wt-tool-about-faq h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wt-tool-about-copy,
.wt-tool-about-faq p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.wt-tool-features,
.wt-tool-use-cases {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wt-tool-features li,
.wt-tool-use-cases li {
  padding-left: 1rem;
  position: relative;
  color: var(--text);
  line-height: 1.55;
}

.wt-tool-features li::before,
.wt-tool-use-cases li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

.wt-tool-about-faq {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}

.wt-tool-faq-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 8px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.wt-tool-faq-item h5 {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .wt-tool-about-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Panel ──────────────────────────────────────────── */
.wt-panel {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 1.4rem;
}
.wt-panel h3 {
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ─── Layout Helpers ─────────────────────────────────── */
.wt-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.wt-col { flex: 1; min-width: 200px; }
.wt-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .wt-split { grid-template-columns: 1fr; } }

/* ─── Form Fields ────────────────────────────────────── */
.wt-field { display: grid; gap: 0.4rem; margin-bottom: 0.85rem; }
.wt-field label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wt-field .hint { font-size: 0.74rem; color: var(--muted); }

/* ─── Toolbar ────────────────────────────────────────── */
.wt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

/* ─── Output / Code Area ─────────────────────────────── */
.wt-output {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 1rem;
  font-family: "Cascadia Code",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  max-height: 540px;
  color: var(--text);
}

/* ─── Stats ──────────────────────────────────────────── */
.wt-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); gap: 0.65rem; }
.wt-stat {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 0.85rem 0.6rem;
  text-align: center;
}
.wt-stat b {
  display: block;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.wt-stat span { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; }

/* ─── Dropzone ───────────────────────────────────────── */
.wt-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all .18s ease;
  background: var(--surface-soft);
}
.wt-dropzone:hover,
.wt-dropzone.dragover {
  border-color: var(--brand);
  background: color-mix(in srgb,var(--brand) 6%,var(--surface));
  color: var(--brand);
}
.wt-dropzone input[type=file] { display: none; }

/* ─── Preview Box ────────────────────────────────────── */
.wt-preview-box {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  overflow: auto;
}
.wt-preview-box img,
.wt-preview-box video,
.wt-preview-box canvas { max-width: 100%; max-height: 450px; border-radius: 10px; }

/* ─── Slider Row ─────────────────────────────────────── */
.wt-slider-row { display: flex; align-items: center; gap: 0.75rem; }
.wt-slider-row input[type=range] { flex: 1; accent-color: var(--brand); }
.wt-slider-row output { min-width: 50px; text-align: right; font-weight: 700; font-size: 0.88rem; color: var(--brand); }

/* ─── Table ──────────────────────────────────────────── */
.wt-table-wrap {
  overflow: auto;
  max-height: 540px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
table.wt-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
table.wt-table th {
  background: var(--surface-soft);
  position: sticky;
  top: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  border-bottom: 2px solid var(--border);
}
table.wt-table td { padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--border); }
table.wt-table tbody tr:hover { background: color-mix(in srgb,var(--brand) 4%,var(--surface)); }

/* ─── Tabs ───────────────────────────────────────────── */
.wt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1.5px solid var(--border);
}
.wt-tab {
  border: none;
  background: transparent;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-xs);
  transition: all .15s ease;
}
.wt-tab:hover { color: var(--brand); background: color-mix(in srgb,var(--brand) 8%,transparent); }
.wt-tab.active { color: var(--brand); background: color-mix(in srgb,var(--brand) 11%,var(--surface)); }

/* ─── Color Swatches ─────────────────────────────────── */
.wt-swatch-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(56px,1fr)); gap: 0.5rem; }
.wt-swatch {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 0.6rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  padding-bottom: 5px;
  transition: transform .15s ease;
}
.wt-swatch:hover { transform: scale(1.07); }

/* ─── Symbol Grid ────────────────────────────────────── */
.wt-symbol-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(46px,1fr)); gap: 0.4rem; }
.wt-symbol {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface-soft);
  padding: 0.5rem 0.2rem;
  text-align: center;
  font-size: 1.15rem;
  transition: all .15s ease;
}
.wt-symbol:hover { border-color: var(--brand); color: var(--brand); transform: scale(1.06); }

/* ─── Related Tools ──────────────────────────────────── */
.wt-related { margin-top: 3rem; }
.wt-related h3 { margin: 0 0 1rem; font-size: 1rem; font-weight: 800; letter-spacing: -0.02em; }
.wt-related-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(185px,1fr)); gap: 0.65rem; }
.wt-related-card {
  display: block;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-card);
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.wt-related-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.wt-related-card b { display: block; margin-bottom: 0.22rem; font-size: 0.85rem; font-weight: 700; }
.wt-related-card span { color: var(--muted); font-size: 0.75rem; line-height: 1.4; }

/* ─── Misc ───────────────────────────────────────────── */
.wt-list-plain { list-style: none; margin: 0; padding: 0; }
.wt-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.wt-checkbox-row input[type=checkbox] { accent-color: var(--brand); width: 15px; height: 15px; }

/* ─── Badges ─────────────────────────────────────────── */
.wt-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.wt-badge.ok   { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.wt-badge.warn { background: #fef9c3; color: #a16207; border-color: #fde047; }
.wt-badge.err  { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
html.dark .wt-badge.ok   { background: #14532d; color: #86efac; border-color: #166534; }
html.dark .wt-badge.warn { background: #713f12; color: #fde68a; border-color: #854d0e; }
html.dark .wt-badge.err  { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }

/* ─── Diff ───────────────────────────────────────────── */
.diff-add { background: #dcfce7; color: #15803d; border-radius: 3px; padding: 0 3px; }
.diff-del { background: #fee2e2; color: #dc2626; border-radius: 3px; padding: 0 3px; text-decoration: line-through; }
html.dark .diff-add { background: rgba(20,83,45,.5);  color: #86efac; }
html.dark .diff-del { background: rgba(127,29,29,.5); color: #fca5a5; }

/* ─── Color Preview ──────────────────────────────────── */
.wt-color-preview {
  width: 100%;
  height: 90px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}

/* ─── Code Block (dark) ──────────────────────────────── */
.wt-code-block {
  background: #09090f;
  color: #c4b5fd;
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  overflow: auto;
  font-family: "Cascadia Code",ui-monospace,monospace;
  font-size: 0.82rem;
  line-height: 1.65;
}


/* ─── Segment Control (mode tabs) ───────────────────── */
.wt-segment {
  display: inline-flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px;
  gap: 2px;
  background: var(--surface-soft);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.wt-segment button {
  border: none;
  background: transparent;
  padding: 0.28rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.wt-segment button:hover { color: var(--brand); background: color-mix(in srgb,var(--brand) 8%,transparent); }
.wt-segment button.active { color: var(--surface); background: var(--brand); }

/* ─── Strength Bar ───────────────────────────────────── */
.wt-strength-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  margin: 6px 0;
}
.wt-strength-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .35s ease, background .35s ease;
}
.wt-strength-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ─── Inline Flag Row (regex) ────────────────────────── */
.wt-flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  margin-bottom: 0.75rem;
}
.wt-flag-row label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.wt-flag-row label:hover { color: var(--brand); }
.wt-flag-row input[type=checkbox] { accent-color: var(--brand); }

/* ─── Sortable Table ─────────────────────────────────── */
table.wt-table.wt-sortable th { cursor: pointer; user-select: none; }
table.wt-table.wt-sortable th:hover { color: var(--brand); }
table.wt-table.wt-sortable th[data-dir]::after {
  content: '';
  display: inline-block;
  margin-left: 5px;
  opacity: 0.7;
}
table.wt-table.wt-sortable th[data-dir="asc"]::after { content: '▲'; }
table.wt-table.wt-sortable th[data-dir="desc"]::after { content: '▼'; }

/* ─── Color History Row ──────────────────────────────── */
.wt-color-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}
.wt-color-chip {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s ease, border-color .15s ease;
}
.wt-color-chip:hover { transform: scale(1.15); border-color: var(--brand); }

/* ─── Preset Grid (gradient/lorem) ──────────────────── */
.wt-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.wt-preset-btn {
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--text);
  transition: all .15s ease;
}
.wt-preset-btn:hover { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb,var(--brand) 6%,var(--surface)); }

/* ─── Inline Stats Bar ───────────────────────────────── */
.wt-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.4rem 0.2rem;
}
.wt-stats-inline span { white-space: nowrap; }
.wt-stats-inline strong { color: var(--brand); font-weight: 700; }

/* ─── Diff Side-by-side ──────────────────────────────── */
.diff-add  { background: color-mix(in srgb,#16a34a 14%,transparent); color: #16a34a; font-family: ui-monospace,monospace; padding: 1px 4px; white-space: pre-wrap; }
.diff-del  { background: color-mix(in srgb,#dc2626 14%,transparent); color: #dc2626; font-family: ui-monospace,monospace; padding: 1px 4px; white-space: pre-wrap; }
.diff-sbs  { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.diff-sbs-col { font-family: ui-monospace,monospace; font-size: 0.82rem; overflow: auto; }
.diff-sbs-col .diff-add, .diff-sbs-col .diff-del, .diff-sbs-col .diff-eq { display: block; padding: 1px 8px; white-space: pre-wrap; }
.diff-eq { white-space: pre-wrap; font-family: ui-monospace,monospace; padding: 1px 8px; }
html.dark .diff-add { background: color-mix(in srgb,#4ade80 12%,transparent); }
html.dark .diff-del { background: color-mix(in srgb,#f87171 12%,transparent); }

/* ─── Markdown toolbar ───────────────────────────────── */
.wt-md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 5px 6px;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}
.wt-md-toolbar button {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text);
  transition: all .15s ease;
  font-family: ui-monospace,monospace;
}
.wt-md-toolbar button:hover { border-color: var(--brand); color: var(--brand); }

/* ─── Gradient stop editor ───────────────────────────── */
.wt-stop-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.wt-stop-row input[type=color] { width: 36px; height: 32px; border-radius: 6px; border: 1.5px solid var(--border); cursor: pointer; padding: 0; }
.wt-stop-row input[type=range] { flex: 1; accent-color: var(--brand); }
.wt-stop-row .wt-btn { padding: 0.2rem 0.5rem; font-size: 0.78rem; }
