/* 10-shell — header, footer, hero, section chrome, toasts */

/* ── header ─────────────────────────────────────────────────────────────── */
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.1) blur(6px); }
.hdr-in { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.wordmark { font-family: var(--disp); font-weight: 800; font-size: 1.06rem; letter-spacing: 0.02em; color: var(--ink); }
.wordmark em { font-style: normal; color: var(--accent); }
.brand-tag {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.22em;
  color: var(--paper); background: var(--ink); padding: 2px 6px; border-radius: 2px;
  transform: translateY(-1px);
}
.hdr-nav { display: flex; gap: 20px; margin-left: 6px; }
.hdr-nav a { font-family: var(--mono); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.06em; text-decoration: none; color: var(--muted); }
.hdr-nav a:hover { color: var(--accent); }
.hdr-nav a.ext { color: var(--ink); }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.cart-btn {
  font-family: var(--mono); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em;
  text-decoration: none; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 2px;
  padding: 7px 12px; display: inline-flex; align-items: center; gap: 8px;
}
.cart-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-count {
  font-size: 0.7rem; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--line); color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
}
.cart-btn.has .cart-count { background: var(--accent); color: #fff; }
.hdr-rule {
  height: 6px;
  background:
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 8px) left bottom / 100% 3px no-repeat,
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 40px) left bottom / 100% 6px no-repeat;
  opacity: .85;
}

/* ── page + section scaffolding ─────────────────────────────────────────── */
.view { flex: 1 0 auto; }
.section { padding: 40px 0; }
.calstrip {
  display: flex; align-items: flex-end; gap: 16px; border-bottom: 2px solid var(--ink);
  padding-bottom: 10px; margin-bottom: 26px;
}
.calstrip h2 { font-weight: 800; font-size: clamp(1.4rem, 3vw, 2rem); }
.calstrip .code { margin-bottom: 4px; }
.calstrip .ticks { flex: 1; height: 14px; align-self: flex-end;
  background: repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 14px) left bottom / 100% 10px no-repeat;
  opacity: .5; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 46px 0 20px; }
.hero .eyebrow { font-family: var(--mono); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.16em; color: var(--muted); margin: 0 0 16px; text-transform: uppercase; }
.hero .eyebrow b { color: var(--accent); font-weight: 600; }
.hero h1 { font-weight: 800; font-size: clamp(2.1rem, 6vw, 3.5rem); line-height: 1.02; margin: 0 0 16px; }
.hero h1 .dot { color: var(--accent); }
.hero .lede { max-width: 60ch; color: var(--muted); font-size: 1.06rem; margin: 0 0 22px; }
.hero .lede b { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* system diagram strip under the hero: controller -> nodes */
.sysrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding: 16px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.sysrow .node {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 3px; padding: 6px 10px; background: var(--label);
}
.sysrow .node b { color: var(--ink); font-weight: 600; }
.sysrow .arrow { align-self: center; color: var(--accent); font-family: var(--mono); }

/* ── footer ─────────────────────────────────────────────────────────────── */
.ftr { flex-shrink: 0; margin-top: 40px; border-top: 2px solid var(--ink); background: var(--band); }
.ftr-in { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; padding-top: 26px; padding-bottom: 30px; }
.ftr-code { font-family: var(--mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; color: var(--accent); margin: 0 0 6px; }
.ftr-line { color: var(--muted); font-size: 0.95rem; margin: 0; max-width: 42ch; }
.ftr-meta { text-align: right; font-family: var(--mono); font-size: 0.82rem; }
.ftr-meta p { margin: 0 0 4px; }
.ftr-pay { color: var(--muted); }

/* ── toasts ─────────────────────────────────────────────────────────────── */
.toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em;
  background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: 3px;
  box-shadow: var(--shadow-lift); animation: toastin .18s ease-out;
}
.toast.accent { background: var(--accent); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── generic loading / empty ────────────────────────────────────────────── */
.loading, .empty { padding: 60px 0; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.04em; }
.empty h3 { font-family: var(--disp); color: var(--ink); font-size: 1.3rem; margin-bottom: 8px; }
.empty p { max-width: 44ch; margin: 0 auto 18px; }

/* ── breadcrumb / back ──────────────────────────────────────────────────── */
.crumb { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--muted); margin: 22px 0 0; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .hdr-nav { display: none; }
  .ftr-in { flex-direction: column; }
  .ftr-meta { text-align: left; }
}
