/* Ames Routing Map — layout and components.
   Color, type, glass, and glow come from themes.css (data-theme="ion|frost|noir"). */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  background-color: hsl(var(--background));
  background-image: var(--canvas-image);
  background-attachment: fixed;
}

h1, h2, h3, .brand-title, .node-name, .phase h2, .chart-card h2, .risk-card h2, .risk-card h3 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight, 600);
  letter-spacing: -0.02em;
}

button, input, select { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  padding: 0.5rem 0.75rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.5rem 1rem 0.5rem 0.85rem;
  border-bottom: 1px solid hsl(var(--border));
  background: var(--header-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 0 0 1px hsl(var(--border)), 0 0 18px hsl(var(--primary) / 0.28);
  flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.brand-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.brand-title {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  text-wrap: balance;
  line-height: 1.2;
}
.brand-title span { color: hsl(var(--primary)); font-weight: 500; }

.meta-chip {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: hsl(var(--muted-foreground));
  padding: 0.28rem 0.55rem;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--secondary) / 0.6);
  white-space: nowrap;
}
@media (min-width: 900px) {
  .meta-chip { display: inline-flex; }
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.seg {
  display: inline-flex;
  padding: 3px;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  gap: 2px;
}
.seg button,
.toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  min-height: 36px;
  padding: 0 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease), transform 90ms ease-out;
}
.seg button[aria-pressed="true"],
.toggle[aria-pressed="true"] {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.25), 0 0 16px hsl(var(--primary) / 0.12);
}
.seg button:hover,
.toggle:hover { color: hsl(var(--foreground)); }
.seg button:focus-visible,
.toggle:focus-visible,
.tab:focus-visible,
.node:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}
.seg button:active,
.toggle:active,
.tab:active,
.node:active,
.icon-btn:active { transform: scale(0.96); }

.toggle {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  min-height: 42px;
}
.toggle[aria-pressed="true"] { border-color: hsl(var(--primary) / 0.45); }
.toggle.warn[aria-pressed="true"] {
  background: hsl(var(--destructive) / 0.14);
  color: hsl(var(--destructive));
  border-color: hsl(var(--destructive) / 0.4);
  box-shadow: 0 0 18px hsl(var(--destructive) / 0.12);
}

.icon-btn {
  appearance: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color var(--ease), transform 90ms ease-out;
}
.icon-btn:hover { background: hsl(var(--muted)); }

/* Banner */
.banner {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--accent) / 0.55);
  color: hsl(var(--accent-foreground));
}
body.is-present .banner.present { display: flex; }
body.is-outage .banner.outage { display: flex; }
body.is-outage .banner.present { display: none; }
body.is-present.is-outage .banner.outage { display: flex; }
.banner strong { font-weight: 600; }

/* Tabs */
.tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem 0.85rem;
  border-bottom: 1px solid hsl(var(--border));
  background: var(--header-bg);
  backdrop-filter: blur(var(--glass-blur));
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.86rem;
  white-space: nowrap;
  transition: color var(--ease), background-color var(--ease), transform 90ms ease-out;
}
.tab[aria-selected="true"] {
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
  box-shadow: inset 0 -2px 0 hsl(var(--primary));
}
.tab:hover { color: hsl(var(--foreground)); }

/* Stage */
html, body { height: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
}
main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.stage[hidden],
.panel-view[hidden] { display: none !important; }

.graph-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.graph-wrap.is-panning { cursor: grabbing; }
.graph-inner {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.col-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--foreground) / 0.55);
  pointer-events: none;
}

svg.edges {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
svg.edges path.electrode {
  fill: none;
  stroke-width: var(--electrode-width, 2.2);
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px currentColor);
}
svg.edges path.electrode.glow {
  stroke-width: var(--electrode-glow-width, 12);
  opacity: var(--electrode-glow-opacity, 0.32);
  filter: blur(3px);
}
svg.edges path.electrode.optional {
  stroke-dasharray: 5 7;
  opacity: 0.55;
}
svg.edges path.electrode.dead {
  opacity: 0.12;
  filter: none;
  stroke-dasharray: 2 6;
}

.node {
  position: absolute;
  width: 200px;
  padding: 0.7rem 0.8rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-glass);
  border-color: var(--glass-border);
  cursor: pointer;
  text-align: left;
  color: inherit;
  appearance: none;
  transition: border-color var(--ease), box-shadow var(--ease), opacity var(--ease), transform 90ms ease-out, filter var(--ease);
}
.node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--node-accent, hsl(var(--primary)));
  box-shadow: 0 0 10px var(--node-accent, hsl(var(--primary)));
}
.node:hover,
.node[aria-pressed="true"] {
  border-color: hsl(var(--primary) / 0.45);
  box-shadow: var(--shadow-glass), 0 0 0 1px hsl(var(--primary) / 0.2), 0 0 28px hsl(var(--primary) / 0.12);
  z-index: 2;
}
.node.is-down {
  border-color: hsl(var(--destructive) / 0.4);
}
.node.is-down::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 8px,
    hsl(var(--destructive) / 0.05) 8px,
    hsl(var(--destructive) / 0.05) 16px
  );
}
.node.is-unverified { border-style: dashed; }
.node.is-planned {
  border-style: dashed;
  border-color: hsl(var(--primary) / 0.45);
  background: hsl(var(--accent) / 0.4);
}
.node.is-dimmed {
  opacity: 0.28;
  filter: grayscale(0.8);
  pointer-events: auto;
}

.node { overflow: hidden; max-width: 200px; }
.node-row { display: flex; align-items: flex-start; gap: 0.45rem; min-width: 0; }
.node-row > div { min-width: 0; flex: 1; overflow: hidden; }
.node-name {
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}
.node-sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.12rem;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.badge.working { color: hsl(var(--success)); border-color: hsl(var(--success) / 0.3); background: hsl(var(--success) / 0.08); }
.badge.down { color: hsl(var(--destructive)); border-color: hsl(var(--destructive) / 0.35); background: hsl(var(--destructive) / 0.08); }
.badge.unverified { color: hsl(var(--warning)); border-color: hsl(var(--warning) / 0.35); background: hsl(var(--warning) / 0.08); }
.badge.planned { color: hsl(var(--accent-foreground)); border-color: hsl(var(--primary) / 0.35); background: hsl(var(--accent)); }

.legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  max-width: calc(100% - 24px);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.7rem;
  color: hsl(var(--muted-foreground));
  padding-right: 0.4rem;
}
.swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  font-size: 0.7rem;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-mono);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0.35rem 0.55rem;
}

/* Detail drawer */
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100%);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-left: 1px solid hsl(var(--border));
  box-shadow: -24px 0 50px -30px hsl(223 50% 0% / 0.7);
  z-index: 8;
  transform: translateX(110%);
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow: auto;
  padding: 1rem 1.1rem 1.5rem;
}
.drawer.open { transform: translateX(0); }
.drawer h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.drawer .kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.15rem;
}
.drawer p { margin: 0.7rem 0; color: hsl(var(--foreground) / 0.92); }
.drawer .close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 44px;
  height: 44px;
}
.facts {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0;
}
.fact {
  padding: 0.6rem 0.7rem;
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
}
.fact dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.fact dd { margin: 0.15rem 0 0; font-variant-numeric: tabular-nums; }
.list-plain { margin: 0.4rem 0 0; padding-left: 1.1rem; color: hsl(var(--muted-foreground)); }
.list-plain li { margin: 0.2rem 0; }
.callout {
  margin-top: 0.8rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--warning) / 0.3);
  background: hsl(var(--warning) / 0.08);
  color: hsl(var(--foreground));
  font-size: 0.85rem;
}

/* Roadmap + risks */
.panel-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.25rem 1.25rem 3rem;
}
.panel-view h1 {
  margin: 0 0 0.3rem;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede { color: hsl(var(--muted-foreground)); max-width: 62ch; margin: 0 0 1.4rem; }

.timeline {
  position: relative;
  display: grid;
  gap: 0.9rem;
  max-width: 920px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, hsl(var(--primary)), hsl(var(--business-bolo)));
  opacity: 0.45;
  box-shadow: 0 0 12px hsl(var(--primary) / 0.6);
}
.phase {
  position: relative;
  margin-left: 0;
  padding: 1rem 1.1rem 1rem 3.1rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-glass);
  border-color: var(--glass-border);
  text-align: left;
  color: inherit;
  width: 100%;
  cursor: pointer;
  appearance: none;
  transition: border-color var(--ease), box-shadow var(--ease), transform 90ms ease-out;
}
.phase:hover, .phase[aria-expanded="true"] {
  border-color: hsl(var(--primary) / 0.4);
  box-shadow: var(--shadow-glass), 0 0 24px hsl(var(--primary) / 0.08);
}
.phase::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 1.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: hsl(var(--primary));
  box-shadow: 0 0 14px hsl(var(--primary));
  z-index: 1;
}
.phase-head { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: baseline; }
.phase-id {
  font-family: var(--font-mono);
  color: hsl(var(--primary));
  font-weight: 500;
  letter-spacing: 0.08em;
}
.phase h2 { margin: 0; font-size: 1.05rem; letter-spacing: -0.02em; }
.phase .meta { font-size: 0.78rem; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.phase .body { margin-top: 0.55rem; color: hsl(var(--foreground) / 0.9); }
.tasks { display: none; margin: 0.8rem 0 0; padding: 0; list-style: none; }
.phase[aria-expanded="true"] .tasks { display: grid; gap: 0.45rem; }
.tasks li {
  padding: 0.55rem 0.7rem;
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
}
.tasks strong { display: block; font-size: 0.88rem; }
.tasks span { color: hsl(var(--muted-foreground)); font-size: 0.82rem; }

.risk-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .risk-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}
.charts {
  display: grid;
  gap: 1rem;
}
.chart-card, .risk-card {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-glass);
}
.chart-card h2, .risk-card h2, .risk-card h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.bar-row { display: grid; grid-template-columns: 10.5rem 1fr auto; gap: 0.55rem; align-items: center; margin: 0.4rem 0; }
.bar-label { font-size: 0.78rem; text-align: right; color: hsl(var(--muted-foreground)); }
.bar-track {
  height: 10px;
  border-radius: 999px;
  background: hsl(var(--secondary));
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent-foreground)));
  box-shadow: 0 0 12px hsl(var(--primary) / 0.55);
  width: 0;
}
.bar-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 0.78rem; }
.donut-wrap { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.donut { width: 132px; height: 132px; }
.risk-card p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 0.9rem; }
.risk-card + .risk-card { margin-top: 0.7rem; }
.sev {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}
.sev.high { color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.1); border: 1px solid hsl(var(--destructive) / 0.3); }
.sev.medium { color: hsl(var(--warning)); background: hsl(var(--warning) / 0.1); border: 1px solid hsl(var(--warning) / 0.3); }

/* Mobile flow list */
.mobile-flows {
  display: none;
  padding: 0.8rem 1rem 1.4rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.mobile-flows h2 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.flow {
  padding: 0.65rem 0.75rem;
  margin: 0.45rem 0;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: var(--glass-bg);
  font-size: 0.85rem;
}
.flow .path { font-family: var(--font-mono); font-size: 0.72rem; color: hsl(var(--accent-foreground)); margin-top: 0.2rem; }

@media (max-width: 720px) {
  body { height: auto; min-height: 100dvh; overflow: auto; }
  main { overflow: visible; height: auto; }
  .topbar { flex-wrap: wrap; gap: 0.55rem 0.7rem; }
  .brand-kicker { display: none; }
  .brand-title { font-size: 0.95rem; white-space: nowrap; }
  .top-actions { gap: 0.35rem; width: 100%; justify-content: flex-start; }
  .toggle { min-height: 40px; padding: 0 0.55rem; font-size: 0.74rem; }
  .node { width: 188px; max-width: 188px; padding: 0.55rem 0.6rem; }
  .node-name { font-size: 0.78rem; }
  .hint { display: none; }
  .mobile-flows { display: block; flex: 0 0 auto; }
  .stage { flex: 0 0 auto; height: 58dvh; min-height: 440px; }
  .panel-view { height: auto; flex: 0 0 auto; overflow: visible; }
  .bar-row { grid-template-columns: 1fr; }
  .bar-label { text-align: left; }
  .drawer { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.phase .more {
  display: inline-block;
  margin-top: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--accent-foreground));
}
.phase[aria-expanded="true"] .more { display: none; }

@media (max-width: 720px) { .wide-only { display: none; } }

/* Theme picker */
.theme-picker {
  display: inline-flex;
  padding: 3px;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  gap: 2px;
}
.theme-picker button {
  appearance: none;
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  min-height: 36px;
  min-width: 44px;
  padding: 0 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease), transform 90ms ease-out;
}
.theme-picker button[aria-pressed="true"] {
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.25), 0 0 16px hsl(var(--primary) / 0.12);
}
.theme-picker button:hover { color: hsl(var(--foreground)); }
.theme-picker button:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}
.theme-picker button:active { transform: scale(0.96); }
.theme-desc {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
@media (min-width: 1100px) {
  .theme-desc { display: inline-flex; align-items: center; }
}
html[data-theme="noir"] .brand-title {
  font-weight: 400;
  font-style: italic;
}
html[data-theme="noir"] .brand-title span { font-style: normal; font-family: var(--font-body); font-weight: 500; }
@media (max-width: 720px) {
  .theme-picker { order: -1; }
}

a.toggle {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
