/* ARA wordmark (3D red A, gunship R) and legacy logo-mark size helpers. */
.wordmark { display: block; height: 28px; width: auto; flex-shrink: 0; }
.wordmark--lg { height: 72px; }
.chat-title .wordmark { height: 30px; }
.logo-mark { width: 28px; height: 28px; display: block; flex-shrink: 0; }
.logo-mark--lg { width: 96px; height: 96px; }

/* Secondary pages + additions. Reuses tokens from styles.css. Mobile-first. */
.msg.error { border-color: #7a2e2e; color: #f3b4b4; }
.rail-links { border-top: 1px solid var(--border); margin-top: 4px; }
.rail-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 4px 12px; }
a.nav-item { text-decoration: none; display: block; }
.rail-foot { margin-top: auto; padding: 12px 16px; color: var(--muted); font-size: 12px; }
.rail { padding-bottom: env(safe-area-inset-bottom); }

body.page-body { overflow: auto; height: auto; min-height: 100dvh; padding-top: env(safe-area-inset-top); }
.site-header {
  position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 16px; height: var(--header-h);
}
.site-header .brand { display: flex; align-items: center; gap: 0; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: 0.02em; }
.site-header .brand .wordmark { height: 28px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--border); color: var(--text); }

.page { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }
.page.center { text-align: center; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.page h1 { font-size: 24px; margin-bottom: 6px; }
.page h2 { font-size: 17px; margin: 24px 0 10px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid #8a6d1d; color: #f0c75e; background: #2a2210;
}
.btn {
  background: var(--accent); border: none; color: #0a0a0a; border-radius: 20px; padding: 10px 20px;
  cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit; text-decoration: none; display: inline-block;
}
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--border); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.site-foot { border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; text-align: center; padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

/* Chip Swap demo */
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin: 14px 0; }
.kpi .v { font-size: 22px; font-weight: 700; }
.kpi .l { color: var(--muted); font-size: 12px; }
.kpi.warn .v { color: #f0c75e; } .kpi.bad .v { color: #f07878; }
.charts { display: grid; gap: 12px; grid-template-columns: 1fr; }
.charts canvas { width: 100%; height: 140px; display: block; }
.chart-title { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.fleet { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); }
.node { aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--border); background: #1c2a1c; cursor: pointer; font-size: 9px; color: #9ab; display: flex; align-items: center; justify-content: center; padding: 0; }
.node.hot { background: #3a2c10; border-color: #8a6d1d; }
.node.straggler { background: #10263a; border-color: #2d6aa8; }
.node.dead { background: #3a1414; border-color: #a83a3a; color: #f99; }
.node.sel { outline: 2px solid var(--accent); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 8px 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.detail { font-size: 13px; line-height: 1.7; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.tbl th { color: var(--muted); font-weight: 500; }

/* Search */
.searchbar { display: flex; gap: 8px; margin: 14px 0; }
.searchbar input {
  flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  color: var(--text); padding: 12px 16px; font-size: 16px; outline: none; font-family: inherit;
}
.searchbar input:focus { border-color: var(--accent); }
.result { display: block; text-decoration: none; color: inherit; margin-bottom: 10px; }
.result h3 { font-size: 15px; color: var(--accent); margin-bottom: 4px; }
.answer { border-color: #2d6aa8; margin: 12px 0; line-height: 1.5; font-size: 14px; }

/* Pricing */
.tier .btn[data-buy], .tier button[data-buy] {
  background: var(--brand-red);
  color: #fff;
}
.tier .btn[data-buy]:not([disabled]):hover, .tier button[data-buy]:not([disabled]):hover {
  background: var(--brand-red-bright);
}
.tier h3 { font-size: 18px; margin-bottom: 4px; }
.tier .price { font-size: 22px; font-weight: 700; margin: 10px 0; min-height: 30px; }
.tier .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.notice { margin: 12px 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); font-size: 14px; }
.notice.ok { border-color: #2e7a4a; color: #a9e4bf; } .notice.err { border-color: #7a2e2e; color: #f3b4b4; }

@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .charts { grid-template-columns: 1fr 1fr; }
  .grid.tiers { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) { .grid.tiers { grid-template-columns: repeat(4, 1fr); } }

#notice:empty { display: none; }
.page > .muted { margin-bottom: 12px; }

/* Banana decoy */
.banana-main { display: flex; justify-content: center; padding-top: 36px; padding-bottom: 72px; }
.banana-fig { margin: 0; max-width: 420px; text-align: center; }
.banana-img {
  width: min(72vw, 320px); height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 16px 28px rgba(240, 199, 94, 0.18));
}
.banana-caption { margin-top: 20px; }
.banana-caption-line {
  font-size: 18px; font-style: italic; font-weight: 500; color: #f0c75e;
  letter-spacing: 0.01em; line-height: 1.4;
}
.banana-caption-sub {
  margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.5;
}
