:root{
  --bg:#07090d;
  --surface:#0f1624;
  --text:#f1f5f9;
  --muted:#a7b0bf;
  --muted2:#7f8aa0;
  --border:rgba(255,255,255,.10);
  --border2:rgba(255,255,255,.16);
  --accent:#ff6a00;
  --shadow:0 18px 46px rgba(0,0,0,.55);
  --shadow2:0 10px 26px rgba(0,0,0,.45);
  --radius:16px;
  --radius2:22px;
  --max:1160px;
  color-scheme: dark;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 18% -10%, rgba(255,106,0,.18), transparent 55%),
    radial-gradient(760px 520px at 88% 0%, rgba(0,200,255,.12), transparent 55%),
    radial-gradient(900px 720px at 40% 110%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(180deg, #07090d 0%, #05070a 100%);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
a{color:inherit;text-decoration:none}
.hidden{display:none !important}

/* Header */
.top-bar{
  position:sticky;
  top:0;
  z-index:50;
  width:100%;
  background:rgba(7,9,13,.78);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
.top-bar-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.top-bar-left{display:flex;align-items:center;gap:12px;min-width:200px}
.logo-circle{
  width:34px;height:34px;border-radius:999px;
  display:grid;place-items:center;
  font-weight:900;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,106,0,.90), rgba(255,106,0,.10) 55%),
    linear-gradient(180deg, #1a2232 0%, #0f131c 100%);
  border:1px solid var(--border2);
  box-shadow:var(--shadow2);
}
.brand-text{display:flex;flex-direction:column;gap:2px}
.brand-name{font-size:12px;font-weight:900;letter-spacing:.16em;text-transform:uppercase}
.brand-subtitle{font-size:11px;color:var(--muted)}
.top-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.nav-link{font-size:12px;color:var(--muted);padding:8px 11px;border-radius:999px;border:1px solid transparent}
.nav-link:hover{color:var(--text);border-color:var(--border);background:rgba(255,255,255,.05)}
.nav-active{color:var(--text);background:rgba(255,106,0,.16);border-color:rgba(255,106,0,.36)}
.nav-cta{color:#111;background:linear-gradient(180deg, rgba(255,106,0,1) 0%, rgba(255,106,0,.92) 100%);border-color:rgba(255,106,0,.55);font-weight:900}

/* Page */
.page{width:100%;max-width:var(--max);margin:0 auto;padding:18px 16px 26px;display:flex;flex-direction:column;gap:16px}
.page.tool-page{max-width:1480px;width:min(1480px, calc(100vw - 32px))}

.hero-card{
  border-radius:var(--radius2);
  border:1px solid var(--border);
  background:
    radial-gradient(820px 440px at 18% 10%, rgba(255,106,0,.20), transparent 58%),
    linear-gradient(180deg, rgba(17,26,43,.92) 0%, rgba(8,10,14,.92) 100%);
  box-shadow:var(--shadow);
  padding:22px;
}
.hero-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.hero-eyebrow{display:inline-flex;align-items:center;gap:10px;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.hero-eyebrow::before{content:"";width:12px;height:12px;border-radius:3px;background:#ff6a00;box-shadow:0 0 0 4px rgba(255,106,0,.18)}
h1{margin:0 0 10px 0;font-size:34px;line-height:1.08;letter-spacing:-.02em}
.hero-subtitle{margin:0;color:var(--muted);line-height:1.55;max-width:80ch}

.js-status{font-size:12px;font-weight:900;letter-spacing:.02em;padding:10px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.12);user-select:none;white-space:nowrap}
.js-status-ok{background:rgba(34,197,94,.12);color:rgba(220,252,231,.95)}
.js-status-warn{background:rgba(255,106,0,.12);color:rgba(255,226,204,.95)}

.card{
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(17,26,43,.90) 0%, rgba(10,12,16,.90) 100%);
  box-shadow:var(--shadow2);
  padding:16px;
}

/* Buttons */
.btn-primary,.btn-ghost{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border-radius:999px;
  padding:9px 12px;
  font-size:12px;
  font-weight:900;
  border:1px solid transparent;
  cursor:pointer;
  line-height:1;
}
.btn-primary{color:#111;background:linear-gradient(180deg, rgba(255,106,0,1) 0%, rgba(255,106,0,.92) 100%);border-color:rgba(255,106,0,.60)}
.btn-ghost{color:var(--muted);border-color:var(--border);background:transparent}
.btn-ghost:hover{color:var(--text);border-color:var(--border2);background:rgba(255,255,255,.05)}

/* Inputs */
label{font-size:12px;color:var(--muted);display:block;margin-bottom:8px;font-weight:900}
select, textarea, input[type="text"], input[type="email"], input[type="number"]{
  width:100%;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 12px;
  outline:none;
  font-size:13px;
}
select option{background:#0f1624;color:#f1f5f9}

/* Wizard layout */
.wizard-shell{display:grid;grid-template-columns:410px 1fr;gap:14px;align-items:start}
@media (max-width:980px){ .wizard-shell{grid-template-columns:1fr} }

/* Left card spacing */
.wizard-left .field{ margin-bottom:14px; }
.wizard-left textarea{ min-height:140px; }

/* Left buttons */
.wizard-left .button-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}
.wizard-left .button-row button{
  width:auto;
  min-width:190px;
}

/* View chips */
.view-label{display:none !important;}
.chip-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.chip{
  border-radius:999px;
  padding:9px 12px;
  min-height:34px;
  font-size:12px;
  font-weight:900;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(241,245,249,.88);
  cursor:pointer;
  line-height:1;
}
.chip-active{background:rgba(255,106,0,.16);border-color:rgba(255,106,0,.42);color:rgba(241,245,249,.95)}

/* Results header: sort+filters top-right */
.results-header{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}
.results-header-right{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-left:auto;
  justify-content:flex-end;
}
.sort-label{display:none !important;}
.sort-select, #sortBy{
  appearance:none;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:rgba(241,245,249,.92);
  font-weight:900;
  font-size:12px;
  padding:9px 34px 9px 12px;
  min-height:34px;
  cursor:pointer;
  line-height:1;
}
.filters-btn, #filtersBtn{
  min-height:34px;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:rgba(241,245,249,.92);
  font-weight:900;
  line-height:1;
}

/* Filters dropdown */
.filters-dropdown{
  display:none;
  width:280px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(17,26,43,.96) 0%, rgba(8,10,14,.96) 100%);
  box-shadow:var(--shadow);
  padding:12px;
}
.filters-dropdown.show{display:block}

/* Results box */
.results-grid, #results{
  margin-top:10px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  padding:12px;
  overflow:auto;
  min-height:calc(100vh - 320px);
  max-height:calc(100vh - 320px);
}

/* Filament cards */
.card-result{
  position:relative;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%);
  box-shadow:0 10px 22px rgba(0,0,0,.35);
  padding:12px 12px 10px;
  margin:10px 0;
}
.card-result-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:950;
}

/* Icon fills the container (emoji/img/svg) */
.filament-icon{
  width:34px;height:34px;
  display:grid;place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  line-height:1;
  font-size:32px;
  padding:0;
}
.filament-icon img,.filament-icon svg{
  width:32px;height:32px;display:block;
}

/* Score + Copy pinned top-right */
.score-stack{
  position:absolute;
  top:12px;
  right:12px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  z-index:3;
}
.card-result-score{font-weight:950;color:rgba(241,245,249,.92)}
.btn-copy-profile.copy-under-score{
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(241,245,249,.90);
  font-weight:950;
  padding:8px 10px;
  cursor:pointer;
  line-height:1;
}

/* Print profile float */
.card-result.has-profile-float{ padding-right: 360px; }
.profile-float{
  position:absolute;
  top:92px;
  right:12px;
  width:332px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  padding:12px;
  z-index:2;
}
.profile-float .profile-title{margin:0 0 8px 0;font-weight:950}
.profile-float .profile-list{margin:0 0 0 18px;color:rgba(241,245,249,.90)}
@media (max-width: 1100px){
  .card-result.has-profile-float{ padding-right: 12px; }
  .profile-float{ position:static; margin:10px 0 0; width:auto; }
}

/* ===== Restore count visibility explicitly ===== */
.results-count{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:950;
  color:rgba(241,245,249,.90);
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
}
.inline-meta-count #resultsCount{
  display:inline-flex !important;
}

/* ===== Tools page ===== */
.tools-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}
@media (max-width: 900px){
  .tools-grid{ grid-template-columns:1fr; }
}

.tool-card{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%);
  box-shadow:0 10px 22px rgba(0,0,0,.35);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:260px;
}
.tool-thumb{
  height:160px;
  background:
    radial-gradient(680px 260px at 20% 30%, rgba(255,106,0,.18), transparent 55%),
    linear-gradient(180deg, rgba(17,26,43,.75) 0%, rgba(8,10,14,.75) 100%);
  border-bottom:1px solid rgba(255,255,255,.10);
}
.tool-body{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.tool-title{
  font-size:16px;
  font-weight:950;
  letter-spacing:-.01em;
}
.tool-desc{
  color:rgba(241,245,249,.80);
  line-height:1.45;
  font-size:13px;
}
.tool-actions{
  margin-top:auto;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
