/* Website V2 — flow pages: subscribe, search, 404 + mobile nav. Prefixes: .w2sb-, .w2se-, .w2nf-, .w2-mnav */

/* ============================ Mobile nav ============================ */
.w2-burger { display: none; width: 40px; height: 40px; border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
  background: none; cursor: pointer; place-items: center; color: var(--text); transition: var(--transition-colors); }
.w2-burger:hover { background: var(--surface-2); }
@media (max-width: 860px) {
  .w2-hdr__nav { display: none; }
  .w2-burger { display: grid; }
  .w2-hdr__cta-lbl { display: none; }
}
/* Opaque (not 92% + backdrop-filter): iOS Safari fails backdrop-filter on a
   fixed element over a scrolled page, leaving the menu see-through with the
   article bleeding through. A solid fill covers regardless. */
.w2-mnav { position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; padding: 96px clamp(24px, 7vw, 48px) 40px;
  overscroll-behavior: contain;
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease-out); }
.w2-mnav--in { opacity: 1; pointer-events: auto; }
.w2-mnav__x { position: absolute; top: 14px; right: clamp(20px, 4vw, 48px); width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-full); background: none; color: var(--text); cursor: pointer; }
.w2-mnav__link { display: flex; align-items: baseline; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-subtle);
  text-decoration: none; overflow: hidden; }
.w2-mnav__link span { font-family: var(--font-display); font-size: clamp(2rem, 8vw, 3rem); line-height: 1.05; letter-spacing: -0.02em;
  color: var(--text); display: block; transform: translateY(110%); transition: transform .6s var(--ease-out); transition-delay: var(--d, 0ms); }
.w2-mnav--in .w2-mnav__link span { transform: none; }
.w2-mnav__link small { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); letter-spacing: .14em; }
.w2-mnav__link:active span { color: var(--accent-text); }
.w2-mnav__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }

/* ============================ Subscribe ============================ */
.w2sb { max-width: var(--container-wide); margin: 0 auto; padding: 150px clamp(20px, 4vw, 48px) 110px; }
.w2sb__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 90px); align-items: start; margin-top: 40px; }
@media (max-width: 920px) { .w2sb__grid { grid-template-columns: 1fr; } }
.w2sb__h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 1.4rem + 5.6vw, 6rem); line-height: .99; letter-spacing: -0.022em;
  color: var(--text); margin: 18px 0 0; }
.w2sb__h1 em { font-style: italic; color: var(--accent-text); }
.w2sb__sub { max-width: 32rem; margin: 22px 0 0; font-size: var(--text-md); line-height: 1.65; color: var(--text-secondary); }

.w2sb__sec { margin-top: 34px; }
.w2sb__lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px; }
.w2sb__doms { display: flex; gap: 8px; flex-wrap: wrap; }
.w2sb__dom { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; font-family: var(--font-sans); font-size: 13.5px;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
  cursor: pointer; transition: var(--transition-colors), transform .2s var(--ease-out); }
.w2sb__dom:hover { transform: translateY(-2px); color: var(--text-secondary); }
.w2sb__dom i { width: 8px; height: 8px; border-radius: 50%; background: var(--dc); opacity: .45; transition: opacity .2s, box-shadow .2s; }
.w2sb__dom--on { color: var(--text); border-color: color-mix(in oklab, var(--dc) 50%, var(--border)); background: color-mix(in oklab, var(--dc) 7%, var(--surface)); }
.w2sb__dom--on i { opacity: 1; box-shadow: 0 0 9px color-mix(in oklab, var(--dc) 75%, transparent); }

.w2sb__freq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.w2sb__fopt { padding: 14px; text-align: left; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  cursor: pointer; transition: var(--transition-colors), transform .2s var(--ease-out); font-family: inherit; }
.w2sb__fopt:hover { transform: translateY(-2px); }
.w2sb__fopt--on { border-color: var(--border-signal); background: var(--accent-bg); }
.w2sb__fopt b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.w2sb__fopt span { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
@media (max-width: 560px) { .w2sb__freq { grid-template-columns: 1fr; } }

/* threshold slider */
.w2sb__slider { padding: 18px; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.w2sb__slider-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.w2sb__slider-val { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--accent-text); }
.w2sb__slider-val small { font-size: 11px; color: var(--text-faint); font-weight: 400; }
.w2sb__slider-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.w2sb__range { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--surface-inset) var(--p, 50%)); outline: none; cursor: pointer; }
.w2sb__range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent);
  border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--border-signal), 0 4px 14px -4px color-mix(in oklab, var(--accent) 70%, transparent);
  cursor: grab; transition: transform .15s var(--ease-out); }
.w2sb__range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.w2sb__range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 4px solid var(--bg); cursor: grab; }

.w2sb__cta { margin-top: 36px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.w2sb__hint { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* phone mock */
.w2sb__phonewrap { position: sticky; top: 90px; display: flex; justify-content: center; perspective: 1200px; }
@media (max-width: 920px) { .w2sb__phonewrap { position: static; margin-top: 10px; } }
.w2sb__phone { width: min(360px, 88vw); border-radius: 38px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.65), inset 0 0 0 6px var(--bg-subtle); padding: 16px 14px 20px;
  will-change: transform; transition: transform .2s var(--ease-out); transform-style: preserve-3d; }
.w2sb__notch { width: 110px; height: 22px; margin: 0 auto 12px; background: var(--bg-subtle); border-radius: var(--radius-full); }
.w2sb__chat { display: flex; flex-direction: column; gap: 10px; min-height: 430px; }
.w2sb__chat-head { display: flex; align-items: center; gap: 10px; padding: 6px 4px 12px; border-bottom: 1px solid var(--border-subtle); }
.w2sb__chat-ava { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-bg); border: 1px solid var(--border-signal);
  display: grid; place-items: center; color: var(--accent); }
.w2sb__chat-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.w2sb__chat-status { font-family: var(--font-mono); font-size: 10px; color: var(--success-text); }
.w2sb__msg { max-width: 94%; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
  opacity: 0; transform: translateY(14px) scale(.97); animation: w2sb-pop .5s var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
@keyframes w2sb-pop { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .w2sb__msg { animation: none; opacity: 1; transform: none; } }
.w2sb__msg-head { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.w2sb__msg-t { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); letter-spacing: -0.01em; }
.w2sb__msg-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.w2sb__msg-meta i { width: 6px; height: 6px; border-radius: 50%; background: var(--dc); }
.w2sb__msg-meta b { color: var(--accent-text); }
.w2sb__typing { display: inline-flex; gap: 4px; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm); align-self: flex-start; }
.w2sb__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); animation: w2sb-ty 1.2s infinite; }
.w2sb__typing i:nth-child(2) { animation-delay: .15s; } .w2sb__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes w2sb-ty { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.w2sb__empty { margin: auto; text-align: center; color: var(--text-faint); font-size: 12.5px; padding: 40px 20px; line-height: 1.6; }

/* ============================ Search ============================ */
.w2se { max-width: 880px; margin: 0 auto; padding: 170px clamp(20px, 4vw, 48px) 120px; }
.w2se__box { position: relative; display: flex; align-items: center; gap: 16px; border-bottom: 2px solid var(--border); padding: 0 0 18px; }
.w2se__box:focus-within { border-color: var(--accent); }
.w2se__box svg { color: var(--text-faint); flex: none; }
.w2se__input { flex: 1; background: none; border: none; outline: none; font-family: var(--font-display);
  font-size: clamp(1.8rem, 1rem + 3.4vw, 3.4rem); letter-spacing: -0.015em; color: var(--text); min-width: 0; }
.w2se__input::placeholder { color: var(--text-faint); opacity: .55; }
.w2se__kbd { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 4px 7px; flex: none; }
.w2se__sugs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.w2se__sug { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); background: var(--surface);
  border: 1px solid var(--border-subtle); padding: 7px 13px; border-radius: var(--radius-full); cursor: pointer;
  transition: var(--transition-colors), transform .2s var(--ease-out); }
.w2se__sug:hover { color: var(--accent-text); border-color: var(--border-signal); transform: translateY(-2px); }
.w2se__count { margin: 40px 0 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.w2se__count b { color: var(--accent-text); }
.w2se__hit { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: baseline; padding: 22px 6px;
  border-bottom: 1px solid var(--border-subtle); text-decoration: none; transition: background .3s, padding .3s var(--ease-out); }
.w2se__hit:hover { background: color-mix(in oklab, var(--surface) 55%, transparent); padding-left: 14px; padding-right: 14px; }
.w2se__hit-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.w2se__hit-meta i { width: 7px; height: 7px; border-radius: 50%; background: var(--dc); }
.w2se__hit-t { font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1.4vw, 1.8rem); line-height: 1.12; letter-spacing: -0.012em;
  color: var(--text); margin: 0; transition: color .25s; }
.w2se__hit:hover .w2se__hit-t { color: var(--accent-text); }
.w2se__hit-t mark { background: var(--selection-bg); color: var(--accent-text); border-radius: 2px; padding: 0 2px; }
.w2se__hit-side { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.w2se__hit-side b { color: var(--text); font-weight: 600; }
.w2se__none { padding: 70px 0; text-align: center; color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* ============================ 404 ============================ */
.w2nf { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: clip; padding: 100px clamp(20px, 4vw, 48px); }
.w2nf__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }
.w2nf__in { position: relative; }
.w2nf__code { font-family: var(--font-mono); font-weight: 600; font-size: clamp(110px, 22vw, 280px); line-height: 1; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--border-strong); user-select: none; }
.w2nf__code b { color: var(--accent-text); -webkit-text-stroke: 0; }
.w2nf__t { font-family: var(--font-display); font-size: clamp(1.5rem, 1rem + 2vw, 2.2rem); color: var(--text); margin: 18px 0 10px; letter-spacing: -0.014em; }
.w2nf__d { max-width: 26rem; margin: 0 auto 30px; font-size: var(--text-sm); line-height: 1.65; color: var(--text-secondary); }
.w2nf__row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================ Responsive comfort pass ============================ */
@media (max-width: 860px) {
  .w2-hero { padding-top: 104px; }
  .w2-hero__stats { gap: 20px 28px; }
  .w2-scrollcue { display: none; }
  .w2-hdr { height: 58px; }
}
@media (max-width: 720px) {
  .w2rd-bar { top: auto; bottom: 14px; transform: translate(-50%, 16px); max-width: calc(100vw - 24px); overflow-x: auto; }
  .w2rd-bar--in { transform: translate(-50%, 0); }
  .w2rd-bar::-webkit-scrollbar { display: none; }
  .w2rd-hero { min-height: 64vh; padding-top: 110px; }
  .w2rd-scores { padding: 18px; gap: 14px; }
  .w2kg__legend { left: 12px; right: 12px; bottom: 16px; gap: 6px; max-width: none; }
  .w2kg__legend-lbl { margin-top: 4px !important; }
  .w2kg__chips, .w2kg__types { flex-wrap: nowrap; overflow-x: auto; max-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .w2kg__chips::-webkit-scrollbar, .w2kg__types::-webkit-scrollbar { display: none; }
  /* legend now owns the bottom — move the HUD to the top-right so the reset
     button doesn't sit on the filter panel; stats/hint are decorative here */
  .w2kg__hud { top: 70px; bottom: auto; right: 12px; }
  .w2kg__stats, .w2kg__hint { display: none; }
  .w2kg__panel { top: auto; bottom: 0; right: 0; left: 0; width: auto; max-height: 58vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(30px); }
  .w2kg__panel--in { transform: none; }
  .w2fd-head { padding-top: 112px; }
  .w2se { padding-top: 130px; }
}
@media (hover: none) {
  .w2-card:hover { transform: none; }
  .w2fd-row:hover { padding-left: 6px; padding-right: 6px; }
}
