/* Public pages (home gallery + info placeholders). Chrome partial:
   app/views/shared/_public_topbar.html.erb. Tokens only — no literals. */

/* ── Page archetype ──────────────────────────────────────────────────────── */

.br-public {
  margin: 0;
  background: var(--nv-bg);
  color: var(--nv-text);
}

.br-public .br-sheet {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Top bar: wordmark + account actions ─────────────────────────────────── */

.br-topbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1rem;
}

.br-topbar-logo img {
  width: 108px;
  display: block;
}

.br-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ── Main nav — its own row: always visible, always one line ─────────────── */

.br-mainnav {
  display: flex;
  gap: 1.75rem;
  padding: 0.2rem 0.1rem 0.85rem;
  overflow-x: auto;
}

.br-mainnav a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nv-muted);
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}

.br-mainnav a:hover {
  color: var(--nv-text);
}

.br-mainnav a.active {
  color: var(--nv-text);
  border-bottom-color: var(--br-turquoise);
}

/* ── Hero — pitch on the left, the briora girl on the right ──────────────── */

.br-hero {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 3rem 0 2.5rem;
}

.br-hero-copy {
  flex: 1;
  max-width: 620px;
}

.br-hero h1 {
  font-size: 40px;
  letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
  line-height: 1.15;
}

.br-hero p {
  font-size: 16px;
  color: var(--nv-muted);
  margin: 0;
  line-height: 1.65;
}

/* Private-beta chip */
.br-beta {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--br-agent);
  border: 1px dashed var(--br-agent);
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  margin-bottom: 1.25rem;
}

/* The girl: identical artwork in both themes — dark swaps to a variant with
   white-filled interiors and a white rim (no CSS filter). */
.br-girl {
  width: 528px;
  max-width: 55%;
  flex-shrink: 0;
}

.br-girl-dark { display: none; }
[data-bs-theme="dark"] .br-girl-light { display: none; }
[data-bs-theme="dark"] .br-girl-dark { display: block; }

@media (max-width: 780px) {
  .br-girl { display: none !important; }
}

.br-counter {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 0.25rem;
  border-top: 1px solid var(--nv-text);
}

/* ── Onboarding steps — vertical spec-sheet timeline. Active steps carry ink
     numerals and CTAs; future steps (.br-step-soon) are dashed and faint. ── */

.br-steps {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.br-steps li {
  display: flex;
  gap: 2rem;
  padding: 0 0.25rem;
}

.br-step-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.2rem;
  flex-shrink: 0;
}

.br-step-num {
  font-family: var(--nv-mono);
  font-size: 24px;
  line-height: 1;
  color: var(--nv-text);
  padding: 1.6rem 0 0.6rem;
}

.br-step-line {
  flex: 1;
  border-left: 1px dashed var(--br-faint);
}

.br-steps li:last-child .br-step-line { display: none; }

.br-step-entry {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0 1.9rem;
  border-bottom: 1px solid var(--nv-border);
}

.br-steps li:last-child .br-step-entry { border-bottom: 0; }

.br-step-body {
  flex: 1;
  min-width: 0;
}

.br-step-body h2 {
  font-size: 18px;
  margin: 0 0 0.35rem;
}

.br-step-body p {
  font-size: 14px;
  color: var(--nv-muted);
  margin: 0;
  max-width: 560px;
  line-height: 1.6;
}

.br-step-entry .btn { flex-shrink: 0; }

.br-step-soon .br-step-num,
.br-step-soon .br-step-body h2,
.br-step-soon .br-step-body p {
  color: var(--br-faint);
}

.br-step-tag {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--br-faint);
  border: 1px dashed var(--br-faint);
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
}

@media (max-width: 640px) {
  .br-step-entry {
    flex-wrap: wrap;
    gap: 0.9rem 1.5rem;
  }
}

/* ── Info-page placeholder body ──────────────────────────────────────────── */

.br-page {
  padding: 3rem 0;
  max-width: 640px;
}

.br-page h1 {
  font-size: 32px;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

/* ── Background page diagrams ────────────────────────────────────────────── */
/* Rebuilt from the three briora_overview slides. Tokens only, so the fills
   and the text on them resolve in both themes (see --br-on-* in briora-theme). */

.br-dg {
  margin: 1.25rem 0 2rem;
  max-width: 640px;
}

.br-dg-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.br-dg-sub {
  font-family: var(--nv-mono);
  font-size: 11.5px;
  line-height: 1.35;
  margin-top: 5px;
  opacity: 0.85;
}

.br-dg-cell {
  display: grid;
  place-items: center;
  border: 1px solid var(--br-hairline);
  background: var(--br-paper);
  color: var(--br-muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  padding: 9px 4px;
}

.br-dg-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.br-dg-group-head {
  border: 1px solid var(--br-hairline);
  background: var(--br-tint-plum);
  color: var(--br-ink);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  padding: 10px 6px;
}

/* 1 · Use cases */

.br-dg-uses {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 14px;
}

.br-dg-use {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.br-dg-use-icon {
  width: 100%;
  max-width: 116px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--br-tint);
  border: 1px solid var(--br-hairline);
  border-radius: var(--bs-border-radius-lg);
  color: var(--br-agent);
  font-size: 42px;
}

.br-dg-use-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

/* 2 · Firmware stack */

.br-dg-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.br-dg-layer {
  padding: 16px 20px;
  text-align: center;
}

.br-dg-layer-cli  { background: var(--br-turquoise); color: var(--br-on-turquoise); }
.br-dg-layer-vm   { background: var(--br-bluegray);  color: var(--br-on-turquoise); }
.br-dg-layer-plum { background: var(--br-plum);      color: var(--br-on-plum); }

.br-dg-hw {
  display: grid;
  grid-template-columns: 4fr 2fr 4fr;
  gap: 3px;
  margin-top: 10px;
}

.br-dg-cells {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
}

/* 3 · IDE and agent */

.br-dg-ide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto 30px auto;
  grid-template-areas:
    "ed ch ch"
    "ed m1 m2"
    ".  l1 l2"
    "dv tc kb";
  gap: 6px;
}

.br-dg-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 14px;
  text-align: center;
}

.br-dg-ide-editor { grid-area: ed; background: var(--br-turquoise); color: var(--br-on-turquoise); }
.br-dg-ide-chat   { grid-area: ch; background: var(--br-bluegray);  color: var(--br-on-turquoise); }
.br-dg-ide-tools  { background: var(--br-plum); color: var(--br-on-plum); padding-block: 20px; }
.br-dg-ide-tools-toolchain { grid-area: m1; }
.br-dg-ide-tools-kb        { grid-area: m2; }

.br-dg-ide-device {
  grid-area: dv;
  justify-content: flex-start;
  padding: 14px 12px 12px;
  background: var(--br-plum);
  color: var(--br-on-plum);
}

.br-dg-ide-cli {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  align-self: flex-end;
  padding-top: 22px;
}

.br-dg-chip {
  background: var(--br-turquoise);
  color: var(--br-on-turquoise);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 8px;
}

.br-dg-arrow {
  font-size: 16px;
  line-height: 1;
  color: var(--br-turquoise);
}

.br-dg-link { position: relative; }
.br-dg-link-toolchain { grid-area: l1; }
.br-dg-link-kb        { grid-area: l2; }

.br-dg-link::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 7px;
  border-left: 2px solid var(--br-bluegray);
  transform: translateX(-1px);
}

.br-dg-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--br-bluegray);
}

.br-dg-ide-toolchain { grid-area: tc; }
.br-dg-ide-kb        { grid-area: kb; }

.br-dg-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.br-dg-tiles .br-dg-cell { min-height: 46px; }

@media (max-width: 520px) {
  .br-dg-uses { grid-template-columns: repeat(2, 1fr); }
  .br-dg-hw { grid-template-columns: 1fr; }

  .br-dg-ide {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto 30px auto auto;
    grid-template-areas:
      "ed ed"
      "ch ch"
      "m1 m2"
      "l1 l2"
      "tc kb"
      "dv dv";
  }

  .br-dg-ide-editor { padding-block: 22px; }

  .br-dg-ide-device {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .br-dg-ide-cli { margin-top: 0; padding-top: 0; }
}

/* ── Hardware page (board list + browser flasher) ────────────────────────── */

.br-hw-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.br-hw-board {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px dashed var(--br-faint);
}

.br-hw-name {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
}

.br-hw-info .br-label {
  margin-right: 0.75rem;
}

.br-hw-purchase {
  color: var(--br-bluegray);
}

.br-hw-firmware {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  text-align: right;
  flex-shrink: 0;
}

.br-hw-badge {
  font-size: 13px;
  color: var(--br-muted);
  border: 1px dashed var(--br-faint);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  white-space: nowrap;
}

.br-hw-download {
  font-size: 14px;
  color: var(--br-bluegray);
}

/* STM32 WebUSB DFU flasher (dfu-flash controller) */
.br-hw-dfu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.br-hw-dfu-progress {
  width: 10rem;
  height: 0.5rem;
}

.br-hw-dfu-status {
  font-size: 13px;
  max-width: 22rem;
}

.br-hw-dfu-note {
  font-size: 13px;
  max-width: 22rem;
  text-align: left;
}

.br-hw-win-hint {
  font-size: 13px;
  max-width: 22rem;
  color: var(--br-bluegray);
}

.br-hw-win-hint summary {
  cursor: pointer;
}

.br-hw-win-hint[open] {
  text-align: left;
}

@media (max-width: 576px) {
  .br-hw-board {
    flex-direction: column;
  }
  .br-hw-firmware {
    align-items: flex-start;
    text-align: left;
  }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.br-public-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--br-faint);
}

.br-public-footer a {
  color: inherit;
}

/* The round Swiss-cross badge next to the copyright line. */
.br-swiss-badge {
  height: 0.875rem;
  width: auto;
  vertical-align: -0.1875rem;
  margin-left: 0.25rem;
}
