/* Brewly — Toggle Panel visual styles, included via each page's <style>.
 * Section 1: Toggle panel chrome (top-right floating)
 * Section 2: Reusable card grid + hero primitives
 * Section 3: Page-specific header + nav
 */

.brewly-toggles {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
}

/* Two-knob toggle (theme + font) — sliding thumb */
.bt-toggle {
  position: relative;
  width: 56px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.bt-toggle .bt-track {
  position: absolute;
  inset: 2px;
  display: flex;
  border-radius: 999px;
  overflow: hidden;
}
.bt-toggle .bt-thumb {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: color 180ms ease, transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.bt-toggle .bt-thumb-r { transform: translateX(0); }
.bt-toggle.bt-on .bt-thumb:first-child { color: var(--text-soft); }
.bt-toggle.bt-on .bt-thumb-r { color: var(--text); }

.bt-glyph {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.bt-glyph-serif {
  font-family: "Iowan Old Style", "Charter", Georgia, serif;
  font-style: italic;
  font-weight: 500;
}

/* Language pill */
.bt-pill {
  height: 28px;
  min-width: 44px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  transition: background-color 180ms ease;
}
.bt-pill .bt-pill-knob {
  font: 600 11.5px/1 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--text);
}
.bt-pill.bt-on {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

/* Section 2: card + hero primitives */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 28px 64px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: 500 var(--fs-tiny)/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.hero .eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.hero h1 {
  margin: 22px auto 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-display);
  letter-spacing: -0.025em;
  line-height: 1.04;
  max-width: 14ch;
}
.hero .lede {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.55;
}
.hero .cta-row {
  margin-top: 28px;
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font: 500 14px/1 var(--font-body);
  border: 1px solid transparent;
  transition: transform 120ms ease, background-color 160ms ease, border-color 160ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--text);
  background: color-mix(in srgb, var(--surface) 70%, var(--surface-2));
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 28px 80px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 22ch;
}
.section-head .meta {
  font: 500 var(--fs-meta)/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Card grid — shadcn/ui pattern */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 160ms ease, box-shadow 200ms ease, border-color 200ms ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}
.card .card-thumb {
  display: grid;
  place-items: center;
  height: 86px;
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-bottom: 4px;
}
.card .card-label {
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
}
.card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.card .card-foot {
  margin-top: auto;
  padding-top: 8px;
  font: 500 12px/1 var(--font-mono);
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

/* Mini chart bits (pure SVG, not image) */
.spark {
  width: 100%;
  height: 30px;
  display: block;
}
.bar-mini {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 38px;
  width: 100%;
}
.bar-mini span {
  flex: 1;
  background: var(--accent);
  border-radius: 3px 3px 1px 1px;
  opacity: 0.75;
  transition: height 280ms ease, opacity 160ms ease;
}
.bar-mini span:hover { opacity: 1; }
.bar-mini span:nth-child(2) { background: color-mix(in srgb, var(--accent) 60%, var(--text-soft)); }
.bar-mini span:nth-child(4) { background: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.bar-mini span:nth-child(5) { background: color-mix(in srgb, var(--accent) 45%, var(--text-soft)); }

/* Page header (nav) */
.page-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--accent-fg);
  font: 600 12px/1 var(--font-display);
}
.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.nav-links a {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 160ms ease, background 160ms ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  background: var(--surface-2);
  color: var(--text);
}
.nav-cta { display: inline-flex; gap: 8px; align-items: center; }
@media (max-width: 720px) {
  .page-nav .nav-links { display: none; }
}

/* Footer */
.page-foot {
  max-width: var(--maxw);
  margin: 32px auto 0;
  padding: 32px 28px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.page-foot .links { display: inline-flex; gap: 18px; }
.page-foot .links a:hover { color: var(--text); }
@media (max-width: 560px) {
  .page-foot { flex-direction: column; gap: 12px; align-items: start; }
}

/* pill / tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: 0.06em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
}
.tag-muted { background: var(--surface-2); color: var(--text-muted); }

/* "AI-slop" guard: nothing else glowy. keep it quiet. */
