/* Shared styles for /tools pages */
:root {
  --bg: #050815;
  --panel: #0b1224;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --border: #1e293b;
  --ok: #34d399;
  --warn: #fbbf24;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse at top left, rgba(79,70,229,0.25), transparent 45%),
    radial-gradient(ellipse at bottom right, rgba(14,165,233,0.12), transparent 40%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: #a5b4fc; text-decoration: none; }
a:hover { text-decoration: underline; }
.tools-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  background: rgba(5,8,21,0.85); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.tools-header nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.tools-header .logo {
  display: inline-flex; align-items: center; line-height: 0;
  text-decoration: none !important; flex-shrink: 0;
}
.tools-header .logo img {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(280px, 70vw);
  object-fit: contain;
  object-position: left center;
}
.cta {
  display: inline-block; padding: 0.65rem 1.1rem; border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff !important;
  font-weight: 700; text-decoration: none !important;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); margin: 0 0 0.75rem; line-height: 1.2; }
.lede { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 0 0 1.75rem; }
.hub-hero {
  margin: 0 0 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #020617;
  aspect-ratio: 16 / 9;
}
.hub-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem;
}
.card h2 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; flex: 1; }
.card .tag {
  align-self: flex-start; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2); border: 1px solid rgba(34,211,238,0.35); border-radius: 999px; padding: 0.2rem 0.55rem;
}
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem;
}
.form-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
input, select {
  background: #020617; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 0.65rem 0.75rem; font-size: 1rem;
}
button.run {
  margin-top: 1rem; border: 0; cursor: pointer; padding: 0.8rem 1.2rem; border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #0891b2); color: #fff; font-weight: 700; font-size: 1rem;
}
.results {
  margin-top: 1.25rem; padding: 1rem 1.1rem; border-radius: 12px;
  background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.3);
}
.results h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.results ul { margin: 0; padding-left: 1.1rem; color: var(--muted); line-height: 1.6; }
.metric { font-size: 1.6rem; font-weight: 800; color: #fff; }
.note { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }
.back { display: inline-block; margin-bottom: 1rem; color: var(--muted); }
table.rank { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: 0.92rem; }
table.rank th, table.rank td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--border); }
table.rank th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 640px) {
  .tools-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .tools-header .logo img { height: 32px; }
}
