/* home-tier1.css — modern, non-hero home layout */

.home-tier1 {
  --bg: #fafbfc;
  --fg: #0f172a;
  --muted: #475569;
  --accent: #16a34a;
  --accent-2: #0891b2;
  --accent-3: #7c3aed;
  --line: rgba(15, 23, 42, 0.08);
  background: var(--bg);
  color: var(--fg);
}

body.dark-mode .home-tier1 {
  --bg: #0a0e1a;
  --fg: #f1f5f9;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.08);
}

.home-tier1 section { padding: 3rem 1.5rem; max-width: 1240px; margin: 0 auto; }

/* ── Marquee ─────────────────────────────────────────────────────────────── */
.home-marquee {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.home-marquee::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(22, 163, 74, 0.08), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(8, 145, 178, 0.07), transparent 50%);
  pointer-events: none;
}

.home-marquee-grid {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .home-marquee-grid { grid-template-columns: 1fr; }
}

.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(22, 163, 74, 0.1);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.home-eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: home-pulse 1.6s ease-in-out infinite;
}
@keyframes home-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
}

.home-marquee h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
}

.home-typed-line {
  display: inline-block;
  color: var(--accent);
}
.home-typed-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: -0.05em;
  animation: home-cursor 1s steps(1) infinite;
}
@keyframes home-cursor { 50% { opacity: 0; } }

.home-typed-credit {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  min-height: 1.5em;
}

.home-typed-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.home-btn-primary, .home-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.12s, background 0.15s;
}
.home-btn-primary { background: var(--accent); color: #fff; }
.home-btn-primary:hover { background: #15803d; transform: translateY(-1px); }
.home-btn-secondary { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.home-btn-secondary:hover { background: rgba(15,23,42,0.04); }
body.dark-mode .home-btn-secondary:hover { background: rgba(255,255,255,0.05); }

/* ── OS snap card (auto-detect) ──────────────────────────────────────────── */
.home-marquee-right { display: flex; flex-direction: column; gap: 1rem; }

.home-os-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1rem;
  position: relative;
  box-shadow: 0 8px 28px -10px rgba(15, 23, 42, 0.12);
  animation: home-os-snap 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.dark-mode .home-os-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  box-shadow: 0 8px 28px -10px rgba(0,0,0,0.5);
}

@keyframes home-os-snap {
  0%   { opacity: 0; transform: scale(0.93) translateY(8px); }
  60%  { opacity: 1; transform: scale(1.02) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.home-os-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 50%, var(--accent-2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.home-os-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.home-os-head > i {
  font-size: 2rem;
  color: var(--fg);
  flex: 0 0 auto;
}
body.dark-mode .home-os-head > i { color: #f1f5f9; }

.home-os-titles { flex: 1; min-width: 0; }
.home-os-tag {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.home-os-tag::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: home-pulse 1.6s ease-in-out infinite;
}
.home-os-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-top: 0.15rem;
}
body.dark-mode .home-os-name { color: #f8fafc; }
.home-os-detected {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.home-os-switch {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.15s, color 0.15s;
}
.home-os-switch:hover { background: rgba(15,23,42,0.05); color: var(--fg); }
body.dark-mode .home-os-switch:hover { background: rgba(255,255,255,0.06); color: #f1f5f9; }

.home-os-cmd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #0f172a;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  margin-bottom: 0.85rem;
}
body.dark-mode .home-os-cmd { background: #020617; }
.home-os-prompt { color: #4ade80; font-weight: 700; flex: 0 0 auto; }
.home-os-cmd code {
  flex: 1;
  font-size: 0.78rem;
  color: #e2e8f0;
  background: transparent;
  padding: 0;
  white-space: nowrap;
  overflow-x: auto;
}
.home-os-cmd code::-webkit-scrollbar { height: 4px; }
.home-os-cmd code::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 2px; }

.home-os-copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
  transition: background 0.15s;
}
.home-os-copy:hover { background: rgba(255,255,255,0.18); }
.home-os-copy.ok { background: var(--accent); border-color: var(--accent); }

.home-os-mobile-note {
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.18);
  color: var(--fg);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
body.dark-mode .home-os-mobile-note { color: #f1f5f9; background: rgba(22,163,74,0.18); }
.home-os-mobile-note > i { color: var(--accent); }

.home-os-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.home-os-btn-primary, .home-os-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
}
.home-os-btn-primary {
  background: var(--accent);
  color: #fff;
}
.home-os-btn-primary:hover { background: #15803d; transform: translateY(-1px); }
.home-os-btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.home-os-btn-secondary:hover { background: rgba(15,23,42,0.04); }
body.dark-mode .home-os-btn-secondary { color: #f1f5f9; }
body.dark-mode .home-os-btn-secondary:hover { background: rgba(255,255,255,0.05); }

.home-os-hint {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.home-os-hint > i { color: var(--accent); }

/* ── Live counter ────────────────────────────────────────────────────────── */
.home-counter {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: 14px;
  padding: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.home-counter::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(22,163,74,0.15), transparent 30%);
  animation: home-rotate 6s linear infinite;
  pointer-events: none;
}
@keyframes home-rotate { to { transform: rotate(360deg); } }

.home-counter-inner { position: relative; z-index: 1; }
.home-counter h3 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  margin: 0 0 0.4rem;
}
.home-counter-num {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.home-counter-since { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 0.25rem; }

.home-counter-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.home-counter-mini > div { font-size: 0.8rem; }
.home-counter-mini .v {
  display: block;
  font-family: ui-monospace, "SF Mono", monospace;
  font-weight: 700;
  font-size: 1.25rem;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
}
.home-counter-mini .l { color: rgba(255,255,255,0.55); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Branch cards ────────────────────────────────────────────────────────── */
.home-branch-q {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--muted);
}
.home-branch-q strong { color: var(--fg); font-weight: 800; }

.home-branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.home-branch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
body.dark-mode .home-branch-card { background: rgba(255,255,255,0.03); }
.home-branch-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px -8px rgba(22,163,74,0.25);
}
.home-branch-card .home-branch-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}
.home-branch-card h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.home-branch-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.home-branch-card .home-branch-arrow {
  position: absolute;
  top: 1rem; right: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  transition: transform 0.15s, color 0.15s;
}
.home-branch-card:hover .home-branch-arrow { color: var(--accent); transform: translateX(3px); }

/* ── Byte stream ─────────────────────────────────────────────────────────── */
.home-bytes {
  background: linear-gradient(180deg, transparent 0%, rgba(22,163,74,0.04) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4rem 1.5rem;
}
.home-bytes-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 900px) { .home-bytes-inner { grid-template-columns: 1fr; } }

.home-bytes h2 { font-size: 1.8rem; font-weight: 800; margin: 0 0 0.6rem; line-height: 1.15; }
.home-bytes p { color: var(--muted); line-height: 1.65; margin-bottom: 1rem; }

.home-bytes-figure {
  background: #0f172a;
  border-radius: 12px;
  padding: 1.25rem;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.7;
  overflow-x: auto;
  position: relative;
}
.home-bytes-figure::before {
  content: "OPP/1.0 wire format · 23 bytes minimum";
  position: absolute;
  top: 0.5rem; right: 0.85rem;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.home-bytes-row { display: flex; gap: 0.3rem; flex-wrap: wrap; padding: 0.4rem 0; }
.home-bytes-row .b {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.home-bytes-row .b.h { background: rgba(22,163,74,0.18); border-color: rgba(22,163,74,0.4); color: #86efac; }
.home-bytes-row .b.s { background: rgba(8,145,178,0.18); border-color: rgba(8,145,178,0.4); color: #67e8f9; }
.home-bytes-row .b.t { background: rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.4); color: #c4b5fd; }
.home-bytes-legend { display: flex; gap: 1rem; margin-top: 0.85rem; font-size: 0.72rem; color: rgba(255,255,255,0.55); }
.home-bytes-legend > span > i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }

/* ── Receipt ticker ──────────────────────────────────────────────────────── */
.home-ticker {
  padding: 3rem 1.5rem;
}
.home-ticker h2 { font-size: 1.5rem; font-weight: 800; margin: 0 0 1rem; }
.home-ticker-feed {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  background: rgba(255,255,255,0.5);
}
body.dark-mode .home-ticker-feed { background: rgba(255,255,255,0.02); }
.home-ticker-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: ui-monospace, "SF Mono", monospace;
  background: rgba(15,23,42,0.025);
  animation: home-ticker-in 0.45s ease-out;
}
body.dark-mode .home-ticker-row { background: rgba(255,255,255,0.03); }
@keyframes home-ticker-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-ticker-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.home-ticker-row .hash { color: var(--muted); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-ticker-row .src { color: var(--accent-2); font-size: 0.78rem; }
.home-ticker-row .age { color: var(--muted); font-size: 0.75rem; }

/* ── Closing CTA ─────────────────────────────────────────────────────────── */
.home-closing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding-bottom: 4rem;
}
.home-closing-card {
  padding: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  text-decoration: none;
}
.home-closing-card.alt { background: linear-gradient(135deg, var(--accent), #0f766e); }
.home-closing-card.alt2 { background: linear-gradient(135deg, var(--accent-3), #5b21b6); }
.home-closing-card h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.home-closing-card p { margin: 0.4rem 0 0.75rem; opacity: 0.9; font-size: 0.88rem; line-height: 1.55; }
.home-closing-card span { font-weight: 700; font-size: 0.9rem; }

/* ── Plugin showcase strip ───────────────────────────────────────────────── */
.home-plugins {
  position: relative;
  padding: 3.5rem 1.5rem;
  margin: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(22,163,74,0.03) 50%, transparent 100%);
  overflow: hidden;
}
body.dark-mode .home-plugins { background: linear-gradient(180deg, transparent 0%, rgba(22,163,74,0.06) 50%, transparent 100%); }

.home-plugins-head {
  max-width: 1240px;
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.home-plugins-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(22,163,74,0.12);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.home-plugins-head h2 {
  margin: 0.6rem 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.1;
}
.home-plugins-head p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}
.home-plugins-allcta {
  flex: 0 0 auto;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}
.home-plugins-allcta:hover { background: #15803d; }

.home-plugins-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.home-plugins-track {
  display: flex;
  gap: 0.7rem;
  width: max-content;
  animation: home-plugins-scroll 90s linear infinite;
}
.home-plugins-marquee:hover .home-plugins-track { animation-play-state: paused; }

@keyframes home-plugins-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.home-plugin-tile {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 130px;
  height: 110px;
  padding: 0.85rem 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--fg);
  position: relative;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
body.dark-mode .home-plugin-tile { background: rgba(255,255,255,0.04); }
.home-plugin-tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px -8px rgba(22,163,74,0.25);
}
.home-plugin-tile > i {
  font-size: 1.7rem;
  color: var(--accent);
}
.home-plugin-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}
.home-plugin-dl {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(15,23,42,0.06);
  color: var(--muted);
  font-size: 0.7rem;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.home-plugin-tile:hover .home-plugin-dl { opacity: 1; }
.home-plugin-dl:hover { background: var(--accent); color: #fff; }

.home-plugins-foot {
  max-width: 1240px;
  margin: 1.5rem auto 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.home-plugins-cta, .home-plugins-cta-alt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.home-plugins-cta { background: var(--accent); color: #fff; }
.home-plugins-cta:hover { background: #15803d; }
.home-plugins-cta-alt { background: transparent; color: inherit; border: 1px solid var(--line); }
.home-plugins-cta-alt:hover { background: rgba(15,23,42,0.04); }
body.dark-mode .home-plugins-cta-alt:hover { background: rgba(255,255,255,0.05); }

/* ── Instant search (in-marquee) ─────────────────────────────────────── */
.home-instant-search { position: relative; margin: 1.25rem 0 1.4rem; max-width: 640px; }
.home-search-pill {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 0.75rem 0.55rem 0.95rem;
  background: rgba(255,255,255,0.92); border: 1.5px solid rgba(15,118,110,0.25);
  border-radius: 999px; box-shadow: 0 1px 0 rgba(15,23,42,0.04), 0 8px 24px -12px rgba(15,118,110,0.25);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.home-search-pill:focus-within { border-color: #0F766E; box-shadow: 0 0 0 4px rgba(15,118,110,0.12), 0 8px 24px -12px rgba(15,118,110,0.4); }
.home-search-pill > i { color: #0F766E; }
.home-search-pill input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 0.95rem; color: inherit; min-width: 0; }
.home-search-pill input::placeholder { color: rgba(15,23,42,0.5); }
.home-search-clear { background: transparent; border: 0; padding: 0.25rem 0.45rem; cursor: pointer; opacity: 0.5; border-radius: 999px; }
.home-search-clear:hover { opacity: 1; background: rgba(15,23,42,0.06); }
.home-search-kbd {
  font-size: 0.68rem; padding: 0.15rem 0.4rem; border: 1px solid rgba(15,23,42,0.15);
  border-radius: 4px; opacity: 0.55; background: rgba(15,23,42,0.04); font-family: ui-monospace, Menlo, monospace;
}
body.dark-mode .home-search-pill { background: rgba(15,23,42,0.65); border-color: rgba(95,215,210,0.35); }
body.dark-mode .home-search-pill input::placeholder { color: rgba(255,255,255,0.5); }
body.dark-mode .home-search-kbd { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: rgba(255,255,255,0.7); }

.home-search-results {
  position: absolute; top: calc(100% + 0.4rem); left: 0; right: 0;
  margin: 0; padding: 0.35rem; list-style: none;
  background: #fff; border: 1px solid rgba(15,23,42,0.1); border-radius: 12px;
  box-shadow: 0 14px 40px -12px rgba(15,23,42,0.18);
  max-height: 360px; overflow: auto; z-index: 50;
}
body.dark-mode .home-search-results { background: #0f172a; border-color: rgba(255,255,255,0.12); }
.home-search-results li {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 0.75rem; border-radius: 8px; cursor: pointer; font-size: 0.88rem;
}
.home-search-results li.active, .home-search-results li:hover { background: rgba(15,118,110,0.08); }
body.dark-mode .home-search-results li.active, body.dark-mode .home-search-results li:hover { background: rgba(95,215,210,0.12); }
.home-search-results li > i { color: #0F766E; width: 18px; text-align: center; }
.home-search-results li > span:nth-of-type(1) { flex: 1; }
.home-search-route { font-family: ui-monospace, Menlo, monospace; font-size: 0.74rem; opacity: 0.55; }
.home-search-empty { cursor: default; padding: 0.6rem 0.75rem; opacity: 0.7; font-size: 0.82rem; }
.home-search-empty:hover { background: transparent; }

/* ── Masthead ticker (sticky, fixed height, viewport-aware) ─────────── */
.oapf-masthead-ticker {
  background: linear-gradient(90deg, rgba(15,118,110,0.08), rgba(22,163,74,0.05) 70%);
  border-bottom: 1px solid rgba(15,23,42,0.06);
  height: 38px;
  overflow: hidden;
  display: flex; align-items: center;
}
body.dark-mode .oapf-masthead-ticker {
  background: linear-gradient(90deg, rgba(95,215,210,0.08), rgba(22,163,74,0.05) 70%);
  border-bottom-color: rgba(255,255,255,0.08);
}
.oapf-masthead-ticker-inner {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 0 1rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.86rem;
  white-space: nowrap; overflow: hidden;
}
.oapf-masthead-icon { color: #0F766E; flex: 0 0 auto; }
body.dark-mode .oapf-masthead-icon { color: #5fd7d2; }
.oapf-masthead-typed { font-weight: 700; flex: 0 0 auto; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
.oapf-masthead-text { display: inline-block; }
.oapf-masthead-cursor {
  display: inline-block; width: 1px; height: 1em;
  background: currentColor; margin-left: 2px;
  vertical-align: text-bottom;
  animation: oapf-masthead-blink 1s steps(2) infinite;
}
@keyframes oapf-masthead-blink { 50% { opacity: 0; } }
.oapf-masthead-meta {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  opacity: 0.78; font-weight: 400;
}
.oapf-masthead-excerpt { margin-right: 0.4rem; }
.oapf-masthead-author { font-size: 0.82rem; opacity: 0.75; }
.oapf-masthead-cta {
  flex: 0 0 auto; padding: 0.25rem 0.7rem;
  background: rgba(15,118,110,0.12); color: #0F766E;
  border-radius: 999px; text-decoration: none; font-size: 0.78rem; font-weight: 700;
  white-space: nowrap;
}
.oapf-masthead-cta:hover { background: rgba(15,118,110,0.22); }
body.dark-mode .oapf-masthead-cta { background: rgba(95,215,210,0.18); color: #5fd7d2; }
.oapf-masthead-cta-short { display: none; }
@media (max-width: 1023.98px) {
  .oapf-masthead-typed { max-width: calc(100vw - 180px); }
  .oapf-masthead-excerpt { display: none; }
}
@media (max-width: 639.98px) {
  .oapf-masthead-ticker { height: 32px; }
  .oapf-masthead-ticker-inner { font-size: 0.78rem; padding: 0 0.7rem; gap: 0.45rem; }
  .oapf-masthead-meta { display: none; }
  .oapf-masthead-typed { max-width: calc(100vw - 110px); }
  .oapf-masthead-cta-full { display: none; }
  .oapf-masthead-cta-short { display: inline; }
}

/* Brand icon — sized consistently with original FA shield */
.meganav-brand-icon { display: inline-block; vertical-align: middle; }

/* ── Static headline (replaces typed h1) — pin height per viewport so font load doesn't shift ── */
.home-static-headline {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0.4rem 0;
  min-height: 6.6rem;        /* desktop — fits 2 lines max */
}
@media (max-width: 1023.98px) {
  .home-static-headline { min-height: 5.4rem; font-size: clamp(1.7rem, 5.5vw, 2.6rem); }
}
@media (max-width: 639.98px)  {
  .home-static-headline { min-height: 4.4rem; font-size: clamp(1.5rem, 7vw, 2.1rem); }
}
.home-typed-credit {
  font-size: 1rem; opacity: 0.78; min-height: 3em;
  margin-bottom: 1rem;
}
@media (max-width: 639.98px) {
  .home-typed-credit { font-size: 0.9rem; min-height: 2.6em; }
}

/* ── Typed-h1 height pin (every page using useTyped on a marquee H1) ─ */
.oapf-typed-h1 {
  min-height: 6.6rem;       /* desktop — fits 2 lines max at clamp(...,3.4rem) */
  display: block;
}
@media (max-width: 1023.98px) { .oapf-typed-h1 { min-height: 5.4rem; } }
@media (max-width: 639.98px)  { .oapf-typed-h1 { min-height: 3rem; }   }

/* ── PageMasthead — branded inline marquee, fixed-height typed area ── */
.oapf-page-masthead {
  position: relative; padding: 2.5rem 1.5rem 2rem;
  margin: 0 0 2rem; border-radius: 16px;
  background: linear-gradient(135deg, rgba(15,118,110,0.08), rgba(22,163,74,0.05) 70%);
  border: 1px solid rgba(15,23,42,0.08);
  overflow: hidden;
}
body.dark-mode .oapf-page-masthead {
  background: linear-gradient(135deg, rgba(95,215,210,0.1), rgba(22,163,74,0.06) 70%);
  border-color: rgba(255,255,255,0.08);
}
.oapf-page-masthead-inner {
  display: grid; grid-template-columns: 60px 1fr; gap: 1.25rem;
  align-items: start; max-width: 1100px; margin: 0 auto;
}
.oapf-page-masthead-icon-block {
  width: 60px; height: 60px; display: grid; place-items: center;
  border-radius: 14px; background: linear-gradient(135deg, #0F766E, #16a34a);
  box-shadow: 0 4px 14px -4px rgba(15,118,110,0.4);
}
.oapf-page-masthead-icon { width: 36px; height: 36px; filter: brightness(10); }
.oapf-page-masthead-text-block { min-width: 0; overflow: hidden; }
.oapf-page-masthead-eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(15,118,110,0.12); color: #0F766E;
  font-size: 0.74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; padding: 0.3rem 0.7rem; border-radius: 999px;
  margin-bottom: 0.85rem;
}
body.dark-mode .oapf-page-masthead-eyebrow {
  background: rgba(95,215,210,0.18); color: #5fd7d2;
}
.oapf-page-masthead-h1 {
  font-size: clamp(1.85rem, 4.5vw, 3.2rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
  margin: 0; color: inherit;
  display: flex; align-items: baseline; gap: 0.15em;
  overflow: hidden; min-width: 0;
}
.oapf-page-masthead-text {
  color: #0F766E;
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
  /* Tablet+: allow wrap up to 2 lines */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
body.dark-mode .oapf-page-masthead-text { color: #5fd7d2; }
.oapf-page-masthead-cursor {
  display: inline-block; width: 3px; height: 0.85em;
  background: #0F766E; vertical-align: -0.05em;
  animation: oapf-pm-blink 1s steps(1) infinite; flex: 0 0 auto;
}
body.dark-mode .oapf-page-masthead-cursor { background: #5fd7d2; }
@keyframes oapf-pm-blink { 50% { opacity: 0; } }
.oapf-page-masthead-sub {
  margin: 0.95rem 0 0; font-size: 1rem; line-height: 1.55;
  max-width: 680px; opacity: 0.82;
}
.oapf-page-masthead-actions {
  display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.1rem;
}
.oapf-page-masthead-cta-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.1rem; border-radius: 8px;
  background: linear-gradient(135deg, #0F766E, #16a34a);
  color: #fff; font-weight: 700; font-size: 0.92rem;
  text-decoration: none; transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px -4px rgba(15,118,110,0.4);
}
.oapf-page-masthead-cta-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(15,118,110,0.5); }
.oapf-page-masthead-cta-secondary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.1rem; border-radius: 8px;
  background: transparent; color: inherit;
  border: 1px solid rgba(15,23,42,0.15);
  font-weight: 700; font-size: 0.92rem; text-decoration: none;
}
body.dark-mode .oapf-page-masthead-cta-secondary { border-color: rgba(255,255,255,0.18); }
.oapf-page-masthead-cta-secondary:hover { background: rgba(15,23,42,0.04); }
body.dark-mode .oapf-page-masthead-cta-secondary:hover { background: rgba(255,255,255,0.06); }

@media (max-width: 1023.98px) {
  .oapf-page-masthead { padding: 2rem 1.25rem 1.75rem; }
  .oapf-page-masthead-inner { grid-template-columns: 48px 1fr; gap: 1rem; }
  .oapf-page-masthead-icon-block { width: 48px; height: 48px; border-radius: 12px; }
  .oapf-page-masthead-icon { width: 28px; height: 28px; }
  .oapf-page-masthead-h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
  .oapf-page-masthead-text { -webkit-line-clamp: 2; }
}
@media (max-width: 639.98px) {
  .oapf-page-masthead { padding: 1.5rem 1rem 1.25rem; border-radius: 12px; margin-bottom: 1.25rem; }
  .oapf-page-masthead-inner { grid-template-columns: 40px 1fr; gap: 0.75rem; }
  .oapf-page-masthead-icon-block { width: 40px; height: 40px; border-radius: 10px; }
  .oapf-page-masthead-icon { width: 22px; height: 22px; }
  .oapf-page-masthead-eyebrow { font-size: 0.66rem; padding: 0.2rem 0.55rem; margin-bottom: 0.5rem; }
  .oapf-page-masthead-h1 { font-size: clamp(1.3rem, 6vw, 1.85rem); }
  /* mobile: single line, ellipsis */
  .oapf-page-masthead-text { -webkit-line-clamp: 1; white-space: nowrap; }
  .oapf-page-masthead-sub { font-size: 0.9rem; margin-top: 0.7rem; }
  .oapf-page-masthead-actions { gap: 0.4rem; margin-top: 0.85rem; }
  .oapf-page-masthead-cta-primary, .oapf-page-masthead-cta-secondary {
    padding: 0.55rem 0.9rem; font-size: 0.85rem;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   Wave 16 — Light-mode harmonization (BINDING brand contrast rules)
   Applies sitewide. Dark-mode tokens already work; light-mode was sloppy.
   Single source of truth — every page that uses .oapf-card / code / table / a
   inherits these.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --oapf-turquoise:      #0F766E;   /* primary brand teal */
  --oapf-turquoise-deep: #115E59;   /* hover/active */
  --oapf-green:          #16a34a;   /* secondary brand green */
  --oapf-green-deep:     #15803d;
  --oapf-ink:            #1A1A1A;   /* body text light mode */
  --oapf-ink-2:          #475569;   /* secondary text */
  --oapf-ink-muted:      #64748b;   /* tertiary / hints */
  --oapf-paper:          #FAFBFC;   /* page bg */
  --oapf-paper-card:     #FFFFFF;   /* card bg */
  --oapf-line:           rgba(15, 23, 42, 0.10);
  --oapf-line-strong:    rgba(15, 23, 42, 0.18);
  --oapf-shadow:         0 1px 3px rgba(15,23,42,0.04), 0 4px 12px -4px rgba(15,23,42,0.06);
}
body.dark-mode {
  --oapf-ink:            #f1f5f9;
  --oapf-ink-2:          #cbd5e1;
  --oapf-ink-muted:      #94a3b8;
  --oapf-paper:          #0f172a;
  --oapf-paper-card:     #1e293b;
  --oapf-line:           rgba(255, 255, 255, 0.10);
  --oapf-line-strong:    rgba(255, 255, 255, 0.18);
  --oapf-shadow:         0 1px 3px rgba(0,0,0,0.3), 0 4px 12px -4px rgba(0,0,0,0.4);
}

/* Body baseline — explicit colors so OS dark-mode pref doesn't ghost us */
body { color: var(--oapf-ink); background: var(--oapf-paper); }

/* Cards: enforced light-mode contrast */
.oapf-card, .oapf-card-soft {
  background: var(--oapf-paper-card);
  color: var(--oapf-ink);
  border: 1px solid var(--oapf-line);
  box-shadow: var(--oapf-shadow);
}
.oapf-card-soft { background: rgba(15, 118, 110, 0.04); border-color: rgba(15, 118, 110, 0.18); }
body.dark-mode .oapf-card-soft { background: rgba(95, 215, 210, 0.06); border-color: rgba(95, 215, 210, 0.22); }

/* Inputs: pin colors so the OS form-color doesn't break contrast */
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="url"], input[type="date"], input[type="number"], input[type="tel"],
textarea, select {
  color: var(--oapf-ink);
  background: var(--oapf-paper-card);
  border: 1px solid var(--oapf-line-strong);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35); outline-offset: 1px;
  border-color: var(--oapf-turquoise);
}
input::placeholder, textarea::placeholder { color: var(--oapf-ink-muted); }

/* Code blocks: was unreadable on light mode (light text on light bg) */
code, pre, kbd, samp {
  color: var(--oapf-ink);
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--oapf-line);
}
body.dark-mode code, body.dark-mode pre, body.dark-mode kbd, body.dark-mode samp {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
pre { padding: 0.75rem 1rem; border-radius: 8px; overflow-x: auto; }
code { padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }
pre code { background: transparent; border: 0; padding: 0; }

/* Tables: header row must contrast */
table th {
  color: var(--oapf-ink); background: rgba(15, 23, 42, 0.04);
  border-bottom: 1px solid var(--oapf-line-strong);
}
body.dark-mode table th { background: rgba(255, 255, 255, 0.04); }
table td { color: var(--oapf-ink); }
table tr { border-bottom: 1px solid var(--oapf-line); }

/* Links: enforce brand turquoise in body text — never default browser blue */
main a:not(.meganav-cta):not(.home-btn-primary):not(.home-btn-secondary):not(.oapf-page-masthead-cta-primary):not(.oapf-page-masthead-cta-secondary):not(.oapf-card):not(.oapf-card-soft):not(.home-branch-card):not(.home-closing-card):not(.home-plugin-tile) {
  color: var(--oapf-turquoise);
}
main a:hover:not(.meganav-cta) { color: var(--oapf-turquoise-deep); }
body.dark-mode main a:not(.meganav-cta):not(.home-btn-primary):not(.home-btn-secondary):not(.oapf-page-masthead-cta-primary):not(.oapf-page-masthead-cta-secondary):not(.oapf-card):not(.oapf-card-soft):not(.home-branch-card):not(.home-closing-card):not(.home-plugin-tile) {
  color: #5fd7d2;
}

/* Headings: pin contrast */
h1, h2, h3, h4, h5, h6 { color: var(--oapf-ink); }

/* Muted / secondary text */
.oapf-muted, .text-muted { color: var(--oapf-ink-muted); }

/* Chips / pills (used for tags, status, severity) — fix the "white-on-white" cases */
.oapf-chip, [class*="chip"], [class*="pill"] {
  /* don't override existing inline backgrounds, just ensure default text contrast */
}
.oapf-chip { color: var(--oapf-ink); background: rgba(15, 23, 42, 0.06); border-radius: 999px; padding: 0.2rem 0.6rem; font-size: 0.78rem; font-weight: 600; }
body.dark-mode .oapf-chip { background: rgba(255, 255, 255, 0.08); }

/* The /developers/extensions page (and any static HTML page in /developers)
   ships its own inline CSS that targets `body { color: #1A1A1A }` only for
   the static body. When the React app embeds it via iframe / wraps it, the
   outer light-mode tokens take over. Force explicit text color anywhere a
   bare `<div>` with no class lives in `main`. */
main > section, main > article, main > div { color: var(--oapf-ink); }
body.dark-mode main > section, body.dark-mode main > article, body.dark-mode main > div { color: var(--oapf-ink); }
