/* ============================================================
   croweo — main stylesheet
   Light + dark (prefers-color-scheme), fully responsive.
   ============================================================ */

:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --surface-3: #e6e8f2;
  --text: #0f172a;
  --muted: #5b6478;
  --border: #e3e7f0;
  --accent: #6366f1;
  --accent-2: #a855f7;
  --accent-soft: #eef0fe;
  --grad: linear-gradient(135deg, #6366f1, #a855f7);
  --green: #16a34a;
  --green-soft: #e8f7ee;
  --danger: #dc2626;
  --danger-soft: #fdeaea;
  --amber: #d97706;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px -14px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 6px 16px -8px rgba(15, 23, 42, 0.12), 0 28px 56px -28px rgba(15, 23, 42, 0.25);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --surface: #121826;
    --surface-2: #1a2233;
    --surface-3: #232e45;
    --text: #e7eaf2;
    --muted: #9aa4bb;
    --border: #232e45;
    --accent: #818cf8;
    --accent-2: #c084fc;
    --accent-soft: #1b2138;
    --green: #4ade80;
    --green-soft: #12271b;
    --danger: #f87171;
    --danger-soft: #2c1618;
    --amber: #fbbf24;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 20px -10px rgba(0, 0, 0, 0.5), 0 32px 64px -32px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }

/* The `hidden` attribute must always win over any display rule —
   otherwise elements like the modal (display: grid) ignore `hidden`. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, canvas, svg { max-width: 100%; vertical-align: middle; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.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;
}

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 200; padding: 10px 16px;
  background: var(--accent); color: #fff; border-radius: var(--radius-xs);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; text-decoration: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.icon { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-accent { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: all 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(99, 102, 241, 0.6); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-sm { padding: 8px 13px; font-size: 0.86rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- pill ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
}
.pill-accent { background: var(--grad); color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.1rem; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-block; height: 34px; line-height: 0; flex-shrink: 0; }
.brand-mark img { height: 100%; width: auto; max-width: none; display: block; }
/* black crow silhouette on transparent — add a subtle backdrop in dark mode so it stays visible */
@media (prefers-color-scheme: dark) {
  .brand-mark img {
    /* background: var(--grad);
    border-radius: 5px;
    padding-left: 5px;
    padding-right: 5px; */
  }
}

/* croweo wordmark: "crow" is bold, "eo" is very thin */
.brand-name { font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-size: 2rem; margin-top: -5px; }
.brand-word { font-weight: 800; }
.brand-thin { font-weight: 100; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.site-nav .nav-pro { display: none; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-xs);
  color: var(--muted); font-weight: 500; font-size: 0.92rem;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-right: 0; margin-left: auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 8px; color: var(--text); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 64px;
  text-align: center;
}
/* Subtle brand glow behind the centered hero. */
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(40% 40% at 80% 10%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: center; max-width: 760px; }
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.75rem);
  line-height: 1.08; margin: 20px 0 16px; letter-spacing: -0.03em;
}
.hero-sub { font-size: 1.18rem; color: var(--muted); max-width: 34rem; margin: 0 auto 8px; }

/* hero tool search — the primary action */
.hero-search { position: relative; width: 100%; max-width: 560px; margin: 24px auto 0; }
.hero-search > .icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--muted); pointer-events: none;
}
.hero-search input {
  width: 100%; padding: 16px 20px 16px 52px; font-size: 1.05rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); transition: border-color .15s, box-shadow .15s;
}
.hero-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-search input::placeholder { color: var(--muted); opacity: 0.85; }
.hero-search input::-webkit-search-cancel-button { cursor: pointer; }
.hero-search-results {
  position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; right: 0;
  max-height: 420px; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 6px; text-align: left;
}
.hero-search-group {
  padding: 8px 10px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.hero-search-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text);
  cursor: pointer;
}
.hero-search-item.active { background: var(--accent-soft); }
.hero-search-item-icon {
  width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--surface-2); color: var(--accent);
}
.hero-search-item-icon .icon { width: 18px; height: 18px; }
.hero-search-item-body { display: flex; flex-direction: column; min-width: 0; }
.hero-search-item-name { font-weight: 650; font-size: 0.92rem; line-height: 1.2; }
.hero-search-item .tool-card-badge { margin-left: auto; flex: none; }
.hero-search-item-desc {
  font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-search-empty { padding: 14px 12px; color: var(--muted); font-size: 0.9rem; }

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 24px 0 8px; }
.hero-more { margin: 0 0 22px; font-size: 0.92rem; color: var(--muted); }
.hero-more a { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.hero-more a:hover { text-decoration: underline; }
.hero-more .icon { width: 14px; height: 14px; }
.hero-badges {
  list-style: none; display: flex; flex-wrap: wrap; gap: 18px; padding: 0; margin: 0;
  justify-content: center;
}
.hero-badges li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.88rem; font-weight: 500; }
.hero-badges .icon { color: var(--green); }

/* ---------- trust strip ---------- */
.trust-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 20px 0; }
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-item .icon { color: var(--accent); }
.trust-item strong { display: block; font-size: 0.95rem; }
.trust-item span { color: var(--muted); font-size: 0.82rem; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--muted); }

/* ---------- tool groups + cards ---------- */
#tool-root {width: 100%;}
.tool-group { margin-bottom: 40px; }
.tool-group-title { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 16px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool-grid-compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tool-card {
  position: relative;
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--text); transition: all 0.16s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); text-decoration: none; }
.tool-card-image { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; gap: 0; }
.tool-card-media {
  display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  margin-top: 25px;
}
.tool-card-media img { width: 100%; object-fit: cover; display: block; }
.tool-card-inner { display: contents; }
.tool-card-image .tool-card-inner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-width: 0; }
.tool-card-image .tool-card-icon {
  width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.tool-card-icon {
  width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.tool-card-icon .icon { width: 22px; height: 22px; }
/* Plain (non-image) cards: badges flow on their own top row, then the icon sits
   to the left of the name/desc text. */
.tool-card:not(.tool-card-image) { flex-direction: row; align-items: center; text-align: left; flex-wrap: wrap; }
.tool-card:not(.tool-card-image) .tool-card-icon {
  width: 56px; height: 56px; flex: none; border-radius: 15px;
}
.tool-card:not(.tool-card-image) .tool-card-icon .icon { width: 26px; height: 26px; }
.tool-card:not(.tool-card-image) .tool-card-body { align-items: flex-start; flex: 1 1 0; min-width: 0; }
.tool-card-body { display: flex; flex-direction: column; min-width: 0; }
.tool-card-name { font-weight: 650; font-size: 0.98rem; }
.tool-card-desc { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }

/* ---------- tool card badges (AI / Premium) ---------- */
.tool-card-badges {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; gap: 6px; pointer-events: none;
}
/* On plain (non-image) cards the badges must not float over the name/desc text —
   they flow as their own full-width row above the icon + body. */
.tool-card:not(.tool-card-image) .tool-card-badges {
  position: static; flex-basis: 100%; margin: 0 0 12px;
}
.tool-card-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
  line-height: 1.4; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.tool-card-badge .icon { width: 12px; height: 12px; }
.badge-ai {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
}
.badge-premium {
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border: none;
  box-shadow: 0 2px 8px -2px rgba(217, 119, 6, 0.55);
}
.badge-free {
  background: color-mix(in srgb, var(--green) 16%, var(--surface));
  color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 40%, var(--border));
}
.badge-client {
  background: color-mix(in srgb, var(--muted) 12%, var(--surface));
  color: var(--muted); border: 1px solid var(--border);
}

/* ---------- AI spotlight ---------- */
.ai-spotlight { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ai-spotlight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ai-spot-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--text); transition: all 0.16s ease;
}
.ai-spot-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none;
  border-color: color-mix(in srgb, var(--amber) 50%, var(--border));
}
.ai-spot-media { aspect-ratio: 16 / 9; overflow: hidden; }
.ai-spot-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-spot-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.ai-spot-name { font-weight: 650; font-size: 0.95rem; }
.ai-spot-desc { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.ai-spot-card .tool-card-badge { position: absolute; top: 10px; left: 10px; }
.ai-spot-cta { text-align: center; margin-top: 28px; }
@media (max-width: 900px) { .ai-spotlight-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ai-spotlight-grid { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; padding: 24px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.step-num {
  position: absolute; top: -12px; right: 20px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 0.85rem; font-weight: 700;
}
.step-icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 10px; }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- privacy split ---------- */
.privacy-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.privacy-links { display: flex; gap: 12px; flex-wrap: wrap; }
.privacy-art { display: flex; flex-direction: column; gap: 14px; }
.meta-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.meta-card-clean { border-color: color-mix(in srgb, var(--green) 40%, var(--border)); }
.meta-card-title { font-weight: 650; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 10px; }
.meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px dashed var(--border); font-size: 0.9rem; }
.meta-row span { color: var(--muted); }
.meta-row .danger { color: var(--danger); }
.meta-row .ok { color: var(--green); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; font-weight: 600; cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--muted); transition: transform 0.18s ease; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { padding: 0 18px 16px; color: var(--muted); margin: 0; }

/* ---------- lead magnet ---------- */
.lead-section { padding: 48px 0; }
.lead-card {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 36px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--grad); color: #fff; box-shadow: var(--shadow-lg);
}
.lead-card h2 { margin: 0 0 6px; color: #fff; }
.lead-card p { margin: 0; color: rgba(255,255,255,.9); }
@media (max-width: 1120px) {
  .lead-card { border-radius: 0; }
}
.lead-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; max-width: 420px; width: 100%; }
.lead-form input {
  flex: 1; min-width: 200px; padding: 12px 14px; border-radius: var(--radius-sm); border: none;
  font-size: 0.95rem;
}
.lead-form .btn { background: #0f172a; }
.lead-form .btn:hover { background: #1e293b; }
.lead-note { flex-basis: 100%; font-size: 0.78rem !important; color: rgba(255,255,255,.75) !important; }

/* ---------- raffle ---------- */
.raffle-section { padding: 56px 0; }
.raffle-card {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 40px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--grad); color: #fff; box-shadow: var(--shadow-lg);
}
.raffle-copy { flex: 1 1 320px; max-width: 560px; }
.raffle-copy h2 { margin: 14px 0 8px; color: #fff; font-size: 1.9rem; }
.raffle-copy p { margin: 0; color: rgba(255,255,255,.92); }
.raffle-form { flex: 1 1 320px; max-width: 420px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; width: 100%; }
.raffle-form input {
  flex: 1; min-width: 200px; padding: 12px 14px; border-radius: var(--radius-sm); border: none;
  font-size: 0.95rem;
}
.raffle-form .btn { background: #0f172a; }
.raffle-form .btn:hover { background: #1e293b; }
.raffle-note { flex-basis: 100%; font-size: 0.78rem; color: rgba(255,255,255,.75); margin: 0; }
.raffle-countdown {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px;
}
.raffle-unit {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 74px; padding: 12px 10px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.14); backdrop-filter: blur(4px);
}
.raffle-num { font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.raffle-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,.8); }
.raffle-status { flex-basis: 100%; font-size: 0.9rem; margin: 2px 0 0; }
.raffle-status--ok { color: #d1fae5; }
.raffle-status--error { color: #fee2e2; }
.raffle-status--ended { color: rgba(255,255,255,.9); }
@media (max-width: 1120px) {
  .raffle-card { padding: 28px; border-radius: 0; }
  .raffle-copy h2 { font-size: 1.5rem; }
  .raffle-unit { min-width: 62px; padding: 10px 8px; }
  .raffle-num { font-size: 1.4rem; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-col h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--muted); font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; }

/* ---------- consent banner ---------- */
.consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 18px 20px; max-width: 720px; margin: 0 auto;
}
.consent-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.consent-title { font-weight: 650; margin: 0 0 4px; }
.consent-inner p { margin: 0; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 20px;
  background: rgba(10, 14, 28, 0.55); backdrop-filter: blur(4px);
}
.modal {
  position: relative; width: 100%; max-width: 460px; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 28px;
  max-height: 90vh; overflow: auto;
}
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--surface-2); border: none; border-radius: 8px; padding: 8px; color: var(--muted); }
.modal-close:hover { color: var(--text); }
.modal-body h2 { font-size: 1.4rem; margin: 12px 0 8px; }
.modal-body > p { color: var(--muted); }
.perk-list { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.perk-list li { display: flex; align-items: center; gap: 10px; font-size: 0.94rem; }
.perk-list .icon { color: var(--green); }

/* ---------- toasts ---------- */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 180; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg); font-weight: 550; font-size: 0.9rem;
  box-shadow: var(--shadow-lg); animation: toast-in 0.2s ease;
}
.toast .icon { color: var(--green); }
.toast-error .icon { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- breadcrumb ---------- */
.breadcrumb { padding-top: 18px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--border); }
.breadcrumb a { color: var(--muted); }

/* ---------- tool hero + card ---------- */
.tool-hero { padding: 40px 0 8px; }
.tool-hero-inner { max-width: 720px; }
.tool-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 14px 0 8px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-top: 24px;
}
.noscript { text-align: center; color: var(--muted); padding: 20px; }

/* ---------- dropzone ---------- */
.dropzone {
  display: grid; place-items: center; gap: 10px; text-align: center;
  padding: 48px 24px; border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--surface-2); color: var(--muted); cursor: pointer; transition: all 0.15s ease;
}
.dropzone:hover, .dropzone.dz-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.dropzone .icon { width: 40px; height: 40px; }
.dropzone strong { color: var(--text); font-size: 1.05rem; }
.dropzone.dz-has { display: none; }

.dz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .dz-row { grid-template-columns: 1fr; } }

/* ---------- options panel ---------- */
.options-panel { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px; margin: 18px 0; }
/* outputControls() wrapper — same grid so format + quality sit side by side,
   both when dropped into an .opt-row and directly into .options-panel.
   width:100% forces it to fill its (flex) row so the columns spread evenly
   instead of hugging the left edge. */
.output-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px; width: 100%; }
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.opt input[type="number"], .opt select, .opt input[type="text"], .opt input[type="email"],
.opt input[type="password"], .opt input[type="search"], .opt textarea {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface-2); width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.opt input:focus, .opt select:focus, .opt textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.opt input::placeholder { color: var(--muted); opacity: 0.8; }
.opt textarea { resize: vertical; min-height: 52px; line-height: 1.45; }
.opt-range { display: flex; align-items: center; gap: 10px; }
.opt-range output { min-width: 42px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.opt-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 0.85rem; font-weight: 550; color: var(--muted); transition: all 0.12s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; user-select: none; }

/* ---------- preview area ---------- */
.preview-area { display: none; }
.preview-area.show { display: block; }
.canvas-shell {
  position: relative; display: flex; align-items: center; justify-content: center; overflow: auto;
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 0 0 / 20px 20px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); min-height: 200px; padding: 16px;
  max-height: 520px;
}
.canvas-shell canvas { max-width: 100%; max-height: 480px; border-radius: 4px; box-shadow: var(--shadow); }

/* interactive crop */
.crop-wrap { position: relative; display: inline-block; line-height: 0; }
.crop-wrap img { display: block; }
.crop-box {
  position: absolute; border: 2px solid #fff; border-radius: 2px; cursor: move;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 0 0 9999px rgba(15,23,42,.5);
}
.crop-handle {
  position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px;
  background: #fff; border: 3px solid var(--accent); border-radius: 50%;
  cursor: se-resize; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.result-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface-2); font-size: 0.86rem; font-weight: 600;
}
.meta-chip .icon { color: var(--accent); }
.meta-chip.good { background: var(--green-soft); color: var(--green); }

.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- transfer-to-tool dropdown ---------- */
.transfer-wrap { position: relative; display: inline-flex; }
.transfer-menu {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; min-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 6px; max-height: 340px; overflow-y: auto;
}
.transfer-group + .transfer-group { margin-top: 4px; }
.transfer-group-label {
  padding: 6px 10px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}
.transfer-item {
  display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px;
  border: none; background: none; color: var(--text); font: inherit; font-size: 0.9rem;
  border-radius: var(--radius-xs); cursor: pointer; text-align: left;
}
.transfer-item:hover, .transfer-item:focus-visible {
  background: var(--surface-2); color: var(--accent); outline: none;
}
.transfer-empty { padding: 12px; color: var(--muted); font-size: 0.88rem; }

.progress { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 14px 0; }
.progress-bar { height: 100%; width: 0%; background: var(--grad); border-radius: 999px; transition: width 0.15s ease; }

/* ---------- before/after slider ---------- */
.before-after {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  border: 1px solid var(--border); user-select: none; touch-action: none;
  /* checkerboard so transparent PNGs (e.g. remove-background results) show
     their transparency instead of flattening to a solid panel color */
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 0 0 / 20px 20px;
}
.before-after img { display: block; width: 100%; height: auto; pointer-events: none; }
/* The after layer sits on top of the full before image. Without an opaque
   background here, a transparent result PNG lets the before image show through
   its empty pixels — so the "after" side renders its own checkerboard stage. */
.before-after .ba-after-wrap {
  position: absolute; inset: 0; overflow: hidden;
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 0 0 / 20px 20px;
}
.before-after .ba-after-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.before-after .ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff;
  box-shadow: 0 0 12px rgba(0,0,0,.35); cursor: ew-resize; transform: translateX(-50%);
}
.before-after .ba-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.before-after .ba-handle::before {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad);
}
.ba-label {
  position: absolute; top: 10px; padding: 4px 10px; border-radius: 6px;
  background: rgba(15,23,42,.72); color: #fff; font-size: 0.76rem; font-weight: 600; pointer-events: none;
}
.ba-label-before { left: 10px; }
.ba-label-after { right: 10px; }

/* shown when one of the slider images fails to paint */
before-after-slider { display: block; position: relative; }
before-after-slider.img-error::after {
  content: "One side of the comparison failed to load. Try switching the output format or re-uploading.";
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  padding: 24px; background: rgba(15, 23, 42, .82); color: #fff; font-size: .9rem; z-index: 2;
}

/* ---------- tool-specific ---------- */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.swatch { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); cursor: pointer; transition: transform 0.12s ease; }
.swatch:hover { transform: translateY(-2px); }
.swatch-color { height: 64px; }
.swatch-meta { padding: 8px 10px; background: var(--surface); font-size: 0.78rem; font-family: var(--mono); }

.ascii-out {
  margin: 0; padding: 14px; background: #0f172a; color: #d4d4d8; border-radius: var(--radius-sm);
  overflow: auto; line-height: 1.15; font-family: var(--mono); font-size: 12px;
}
.ascii-out pre { margin: 0; }
.ascii-opt { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.diff-cell { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.diff-cell img { width: 100%; display: block; }
.diff-cell figcaption { padding: 8px 10px; font-size: 0.8rem; font-weight: 600; color: var(--muted); background: var(--surface); }

.file-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.file-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--surface-2); border-radius: var(--radius-xs); font-size: 0.9rem;
}
.file-row .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fsize { color: var(--muted); margin-left: auto; white-space: nowrap; }
.file-row .icon { color: var(--green); }

.tile-grid { display: grid; gap: 6px; }
.tile-grid img { width: 100%; border-radius: 4px; border: 1px solid var(--border); }

.kv-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.kv-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.kv-table td:first-child { color: var(--muted); font-weight: 600; width: 34%; }
.kv-table td:last-child { font-family: var(--mono); font-size: 0.84rem; word-break: break-all; }

.kv-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.kv-col { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--bg); overflow: auto; max-height: 380px; }
@media (max-width: 720px) { .kv-split { grid-template-columns: 1fr; } }

.gps-card { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; background: var(--bg); }
.gps-status { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.gps-status code { font-family: var(--mono); background: var(--surface-3); padding: 3px 8px; border-radius: 6px; }
.gps-status .icon { width: 20px; height: 20px; }

.placeholder-msg { text-align: center; padding: 40px 20px; color: var(--muted); }
.placeholder-msg .icon { width: 48px; height: 48px; margin-bottom: 12px; color: var(--surface-3); }

/* checkerboard transparency (clear background) */
.checkerboard {
  background:
    repeating-conic-gradient(#e3e7f0 0% 25%, #ffffff 0% 50%) 0 0 / 20px 20px;
}
@media (prefers-color-scheme: dark) {
  .checkerboard { background: repeating-conic-gradient(#232e45 0% 25%, #121826 0% 50%) 0 0 / 20px 20px; }
}

/* RGB histogram (auto white balance) */
.histogram-wrap { margin: 14px 0; }
.histogram-wrap .canvas-shell { min-height: 0; padding: 10px; }
.histogram { display: block; width: 100%; height: 120px; border-radius: 4px; }

/* sprite sheet slicer */
.sprite-grid { display: grid; gap: 6px; width: 100%; }
.sprite-grid .sprite-cell { position: relative; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: var(--surface); }
.sprite-grid .sprite-cell img { width: 100%; display: block; }
.sprite-grid .sprite-cell span { position: absolute; left: 4px; top: 4px; background: rgba(15,23,42,.72); color: #fff; font-size: 0.68rem; font-weight: 600; padding: 1px 6px; border-radius: 4px; }

/* photo mosaic */
.mosaic-out { width: 100%; image-rendering: pixelated; border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* animated GIF editor */
.gif-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.gif-controls .btn .icon { width: 16px; height: 16px; }
.gif-timeline { overflow-x: auto; display: flex; gap: 8px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.gif-frame { flex: none; width: 92px; cursor: pointer; border-radius: 6px; overflow: hidden; border: 2px solid transparent; background: var(--surface); transition: border-color 0.1s ease; }
.gif-frame img { width: 100%; display: block; aspect-ratio: 1; object-fit: contain; background: var(--surface-3); }
.gif-frame .gif-frame-meta { display: flex; justify-content: space-between; padding: 3px 6px; font-size: 0.7rem; color: var(--muted); font-family: var(--mono); }
.gif-frame.on { border-color: var(--accent); }
.gif-frame:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.gif-scrub { width: 100%; margin: 8px 0; accent-color: var(--accent); }

/* raster -> vector */
.vector-out { display: block; width: 100%; max-height: 480px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.svg-code { margin: 0; padding: 14px; background: #0f172a; color: #d4d4d8; border-radius: var(--radius-sm); overflow: auto; max-height: 320px; font-family: var(--mono); font-size: 11px; white-space: pre-wrap; word-break: break-all; }

/* ---------- prose ---------- */
.prose-block { margin-bottom: 32px; }
.prose-block h2 { font-size: 1.4rem; margin-top: 0.4em; }
.prose-block p, .prose-block li { color: var(--muted); }
.prose-page { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; }
.prose-page h1 { font-size: 2rem; }
.prose-page h2 { margin-top: 1.5em; font-size: 1.3rem; }
.prose-page p, .prose-page li { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { gap: 32px; }
  .privacy-split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); margin-left: 21px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 10px 20px 16px; display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .trust-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .prose-page { padding: 24px; }
  .tool-grid { grid-template-columns: 1fr; }
}

/* On very narrow screens the "Get Pro" button leaves the header row and sits
   under the (dropdown) nav menu so the logo and wordmark never get crowded. */
@media (max-width: 600px) {
  .header-actions .js-open-paywall { display: none; }
  .site-nav .nav-pro {
    display: inline-flex; width: 100%; justify-content: center; margin-top: 6px;
  }
}

/* ============ AI tools (BRIA-backed) ============ */
.ai-unconfigured {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.ai-unconfigured .icon { width: 42px; height: 42px; color: var(--accent); margin-bottom: 10px; }
.ai-unconfigured code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* ---------- "AI is working" overlay ---------- */
.ai-overlay {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 52%, transparent);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border-radius: var(--radius-sm);
  animation: aiOverlayIn 0.22s ease both;
}
.ai-overlay-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 34px 26px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  animation: aiCardIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ai-loader { position: relative; width: 88px; height: 88px; display: grid; place-items: center; margin-bottom: 6px; }
.ai-loader-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 8%, var(--accent) 38%, var(--accent-2) 62%, transparent 92%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  animation: aiSpin 1.15s linear infinite;
}
.ai-loader-ring-2 {
  inset: 9px; opacity: 0.55;
  background: conic-gradient(from 180deg, transparent 20%, var(--accent-2) 50%, transparent 80%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: aiSpin 2.4s linear infinite reverse;
}
.ai-loader-icon { width: 30px; height: 30px; color: var(--accent); animation: aiIconPulse 1.5s ease-in-out infinite; }
.ai-overlay-title { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.ai-overlay-status { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; min-height: 1.3em; }

@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiIconPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50% { transform: scale(1.05); opacity: 1; }
}
@keyframes aiOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes aiCardIn { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .ai-loader-ring, .ai-loader-ring-2, .ai-loader-icon { animation: none; }
  .ai-overlay, .ai-overlay-card { animation-duration: 0.01s; }
}
.ai-help { margin-top: 14px; max-width: 56ch; }
.ai-note {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2); color: var(--muted); font-size: 0.85rem; max-width: 64ch;
}
.ai-note .icon { flex: none; margin-top: 1px; color: var(--accent); }

/* mask drawing (magic eraser) */
.mask-stage { position: relative; user-select: none; }
.mask-stage canvas { display: block; max-width: 100%; height: auto; touch-action: none; }
.mask-canvas { position: absolute; inset: 0; cursor: crosshair; }
.mask-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.btn-group { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.btn-group button {
  border: 0; background: var(--surface-2); padding: 8px 14px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
}
.btn-group button.active { background: var(--accent); color: #fff; }
.dropzone-mini {
  display: flex; align-items: center; gap: 10px; border: 1.5px dashed var(--border);
  border-radius: 10px; padding: 14px 16px; cursor: pointer; background: var(--surface-2);
  font-size: 0.85rem; flex: 1; min-width: 240px;
}
.dropzone-mini .icon { color: var(--accent); flex: none; }
.dropzone-mini strong { font-weight: 600; }
.mask-hint { font-size: 0.82rem; color: var(--muted); }
.mask-size { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.mask-size input[type="range"] { width: 120px; }

/* ============ accounts (auth modal + header chip + /account/) ============ */
.btn-link {
  background: none; border: 0; padding: 0; color: var(--accent);
  font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-link:hover { text-decoration: underline; }
.danger { color: var(--danger); }

.header-actions .auth-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
/* The account chip shows only the user icon + Log out — no email label — so a
   long address can never crowd the header. */
@media (max-width: 1180px) {
  .header-inner { gap: 14px; }
}
.auth-error { margin: 0 0 12px; }
.auth-switch { margin: 14px 0 6px; }

.pw-msg { margin: 10px 0 0; color: var(--green); font-size: 0.88rem; }
.pw-msg.danger { color: var(--danger); }

.page-head { text-align: center; max-width: 560px; margin: 0 auto 28px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }

.account-grid { display: grid; gap: 14px; }
.account-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.account-card h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.05rem; margin-bottom: 8px;
}
.account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.wallet-card { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.wallet-balance { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; }
.wallet-balance strong { font-size: 2.4rem; line-height: 1; letter-spacing: -0.03em; }
.wallet-balance span { color: var(--muted); font-size: 0.92rem; }

.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.pack-card {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg);
}
.pack-name { font-weight: 650; text-transform: capitalize; }
.pack-credits { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.pack-credits strong { color: var(--text); font-size: 1.1rem; }

.ledger-table thead th {
  text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); border-bottom: 1px solid var(--border); padding: 6px 12px;
}

.account-gate { text-align: center; padding: 40px 24px; }
.account-gate-icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 10px; }
.account-gate .action-row { justify-content: center; }
