/* ============================================================
   Pixelpaper — SITE CHROME styles only
   Header, side rail, hub grid, footer, SEO blocks, ad slots.
   Tools carry their own scoped styles in tools/<id>/tool.css;
   this file styles only the site shell. Tokens live in theme.css.
   ============================================================ */

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; line-height: 1;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.30);
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.privacy-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; color: var(--ink-dim);
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 999px;
}
.privacy-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.btn-upgrade {
  font-size: 13px; font-weight: 600; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  padding: 8px 15px; border-radius: 9px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: filter 0.15s ease, transform 0.05s ease;
}
.btn-upgrade:hover { filter: brightness(1.06); }
.btn-upgrade:active { transform: translateY(1px); }

/* ---------- Layout ---------- */
.layout { flex: 1; display: grid; grid-template-columns: 248px 1fr; min-height: 0; }

/* ---------- Tool rail (registry-driven) ---------- */
.rail { border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.rail-group { display: flex; flex-direction: column; gap: 3px; margin-bottom: 18px; }
.rail-cat { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); padding: 4px 12px 7px; }
.rail-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: transparent; border: 1px solid transparent; color: var(--ink-dim);
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left;
  text-decoration: none; transition: background 0.15s ease, color 0.15s ease;
}
.rail-item .rail-ico { font-size: 16px; line-height: 1; }
.rail-item:hover:not(.is-soon) { background: var(--bg-soft); color: var(--ink); }
.rail-item.is-active { background: var(--accent-weak); color: var(--accent-strong); font-weight: 600; }
.rail-item.is-soon { opacity: 0.55; cursor: not-allowed; }
.rail-item .soon {
  margin-left: auto; font-size: 9px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--ink-faint); background: var(--bg-soft); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 5px; text-transform: uppercase;
}

/* ---------- Stage + tool head ---------- */
.stage { padding: 40px 44px; overflow-y: auto; max-width: 1100px; }
.tool-head { margin-bottom: 26px; }
.tool-head h1, .tool-head h2 {
  font-family: var(--sans); font-weight: 800; font-size: 36px; line-height: 1.05; letter-spacing: -0.035em; color: var(--ink);
}
.tool-head p { color: var(--ink-dim); margin-top: 10px; font-size: 14.5px; max-width: 62ch; }
.tool-head .pro-flag {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-weak); padding: 4px 8px; border-radius: 6px;
}

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 32px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-faint); background: var(--bg);
}

/* ---------- Hub (homepage) ---------- */
.hub { padding: 56px 40px 72px; max-width: 1080px; margin: 0 auto; width: 100%; }
.hub-hero { margin-bottom: 14px; text-align: center; }
.hub-badge {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px;
  font-size: 12.5px; font-weight: 500; color: var(--accent-strong);
  background: var(--accent-weak); padding: 6px 13px; border-radius: 999px;
}
.hub-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.hub-hero h1 { font-family: var(--sans); font-weight: 800; font-size: 54px; line-height: 1.02; letter-spacing: -0.04em; color: var(--ink); }
.hub-hero h1 .acc { color: var(--accent); }
.hub-hero p { color: var(--ink-dim); margin: 16px auto 0; font-size: 16px; max-width: 56ch; }
.hub-section { margin-top: 48px; }
.hub-section > h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }
.hub-card {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.hub-card:hover { border-color: rgba(37, 99, 235, 0.4); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.hub-card.is-soon { opacity: 0.6; pointer-events: none; box-shadow: none; }
.hub-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 21px; background: var(--accent-weak); margin-bottom: 4px;
}
.hub-title { font-size: 15.5px; color: var(--ink); font-weight: 600; }
.hub-desc { font-size: 13px; color: var(--ink-dim); line-height: 1.55; }
.card-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; margin-left: 6px; vertical-align: middle; }
.card-badge.soon { color: var(--ink-faint); background: var(--bg-soft); border: 1px solid var(--line); }
.card-badge.pro { color: var(--accent-strong); background: var(--accent-weak); }

/* ---------- SEO landing copy (per tool page) ---------- */
.seo-intro { max-width: 70ch; margin: 8px 0 28px; }
.seo-intro p { margin-bottom: 13px; line-height: 1.75; font-size: 14px; color: var(--ink-dim); }
.seo-block { max-width: 75ch; margin: 52px 0 8px; border-top: 1px solid var(--line); padding-top: 32px; }
.seo-block h2 { font-family: var(--sans); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; margin-bottom: 18px; color: var(--ink); }
.faq-item { margin-bottom: 20px; }
.faq-item h3 { font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.faq-item p { font-size: 13.5px; color: var(--ink-dim); line-height: 1.65; }

/* ---------- Ad slots (only when config.adsEnabled) ---------- */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-faint);
  min-height: 90px; margin: 20px 0; background: var(--bg-soft);
}
.ad-slot .ad-label { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Responsive (chrome) ---------- */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .rail { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 12px; }
  .rail-group { flex-direction: row; align-items: center; gap: 4px; margin-bottom: 0; }
  .rail-cat { display: none; }
  .rail-item { white-space: nowrap; padding: 8px 12px; }
  .stage { padding: 28px 20px; }
  .tool-head h1, .tool-head h2 { font-size: 28px; }
  .hub { padding: 40px 20px 56px; }
  .hub-hero h1 { font-size: 38px; }
  .topbar { padding: 12px 18px; }
  .privacy-badge { display: none; }
}
