/* Hallmark · shape: app screen · theme: WipeScout after dark · genre: atmospheric · signature: the paired wipe lists · v2.0.0 */
/* Critique: a compact landscape sets the scene; the first working surface is the server comparison. */

@font-face { font-family: Barlow; src: url('./assets/fonts/barlow-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url('./assets/fonts/barlow-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Barlow; src: url('./assets/fonts/barlow-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Barlow; src: url('./assets/fonts/barlow-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('./assets/fonts/barlow-condensed-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('./assets/fonts/barlow-condensed-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;
  --paper: #1b191c;
  --surface: #252227;
  --ink: #e8e2d9;
  --sub: #c7bec0;
  --muted: #afa5ad;
  --edge: #443e46;
  --rule: #8b7c88;
  --accent: #e1ac89;
  --green: #acc4aa;
  --mast: #242126;
  --selected: #443630;
  --hover: #343036;
  --recent-surface: #2b3430;
  --upcoming-surface: #382e2c;
  --button: #bd9072;
  --button-ink: #261d19;
  --warning-bg: #3a302b;
  --overlay: rgb(13 11 15 / 74%);
  --focus: #edbd93;
  --body: Barlow, 'Segoe UI', sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font: 100%/1.45 var(--body);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; color: var(--ink); background: var(--paper); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { min-width: 0; text-wrap: balance; overflow-wrap: break-word; }
button, select, input, kbd { font: inherit; color: inherit; }
button, select, a { touch-action: manipulation; }
button { border: 0; background: transparent; padding: 0; cursor: pointer; }
a { color: inherit; text-underline-offset: .18em; }
select { cursor: pointer; }
button:disabled { cursor: wait; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:active:not(:disabled) { filter: brightness(.91); }
.wrap { width: min(81rem, calc(100% - clamp(2rem, 8vw, 8rem))); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus { position: absolute; z-index: 10; inset: 8px auto auto 8px; padding: 8px 16px; background: var(--surface); color: var(--ink); }
.ico { width: 18px; height: 18px; display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.topbar, .hero { background: var(--mast); color: var(--ink); }
.topbar { border-bottom: 1px solid var(--edge); }
.top-inner, .brand, .topbar nav, .nav-link, .feed, .hero-stats, .finder-bar, .chip,
.filter-trigger, .section-title, .filter-heading, .filter-heading h2, .list-toolbar, .list-bottom,
.primary, .secondary, .detail-actions, .footer { display: flex; align-items: center; }
.top-inner { min-height: 52px; gap: 48px; }
.brand { gap: 8px; font: 800 1.7rem/1 var(--display); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.topbar nav { align-self: stretch; gap: 24px; }
.nav-link { position: relative; gap: 8px; color: var(--sub); font-weight: 500; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.nav-link .ico { width: 16px; height: 16px; }
.nav-short { display: none; }
.nav-link.active, .nav-link:hover { color: var(--ink); }
.nav-link.active::after { content: ''; position: absolute; height: 3px; inset: auto 0 0; background: var(--accent); }
.feed { margin-left: auto; gap: 4px; font-size: .875rem; color: var(--sub); }
#saved-count { font-variant-numeric: tabular-nums; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 4px; color: var(--muted); }
.icon-button:hover { background: var(--hover); color: var(--ink); }
#refresh .ico { width: 16px; height: 16px; }
#refresh:disabled .ico { animation: rotate 1s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; min-height: 148px; padding-block: 20px; }
.mast-copy { width: 56%; }
.hero h1 { font: 800 clamp(2.75rem, 4.7vw, 4.5rem)/.98 var(--display); letter-spacing: -.024em; }
.hero-stats { flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; font-size: .9375rem; color: var(--sub); font-variant-numeric: tabular-nums; }
.hero-stats strong { color: var(--ink); font-weight: 600; }
.hero-stats > span + span { border-left: 1px solid var(--rule); padding-left: 16px; }
.mast-landscape {
  position: absolute; inset: 0 0 0 auto; width: max(44%, calc(50% - 9rem)); height: 100%;
  object-fit: cover; object-position: 70% 44%; clip-path: polygon(3rem 0, 100% 0, 100% 100%, 0 100%);
  filter: brightness(.76) saturate(.8);
}

.workspace { padding-block: 20px 48px; min-height: 24rem; }
.finder-bar { gap: 8px; margin-bottom: 20px; }
.search-box { position: relative; min-width: 0; flex: 1; }
.search-box > .ico, .select-wrap > .ico, .minimum-input > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); width: 16px; height: 16px; }
.search-box input, select, .minimum-input input {
  display: block; width: 100%; min-width: 0; min-height: 42px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 4px; padding: 8px 32px 8px 36px; font-size: 1rem;
}
.search-box input::placeholder, .minimum-input input::placeholder { color: var(--muted); opacity: 1; }
.search-box kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding-inline: 4px; border: 1px solid var(--edge); border-radius: 2px; color: var(--muted); font-size: .8125rem; }
.search-box:focus-within kbd, .search-box:has(input:not(:placeholder-shown)) kbd { display: none; }
.filter-trigger, .more, .secondary { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 8px 12px; font-weight: 600; font-size: .9375rem; }
.filter-trigger { gap: 8px; min-height: 42px; white-space: nowrap; }
.filter-trigger .ico { width: 16px; height: 16px; }
.filter-trigger .count { color: var(--green); border-left: 1px solid var(--edge); padding-left: 8px; }
.count { font-variant-numeric: tabular-nums; font-size: .875rem; color: var(--muted); font-weight: 600; }
.quick-filters { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 12px; }
.chip, .choice { color: var(--sub); border-radius: 3px; font-weight: 500; font-size: .9375rem; }
.chip { gap: 4px; padding: 8px; min-height: 40px; white-space: nowrap; }
.chip .ico { width: 15px; height: 15px; }
.chip:hover, .choice:hover, .more:hover, .secondary:hover, .filter-trigger:hover { background: var(--hover); color: var(--ink); }
.chip.selected, .choice.selected { background: var(--selected); border-color: var(--accent); color: var(--accent); box-shadow: inset 0 -2px var(--accent); }

.results { min-width: 0; }
.list-toolbar, .list-bottom, .footer { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.list-toolbar { border-top: 2px solid var(--edge); padding-block: 16px; }
.section-title { gap: 12px; }
.section-title h2 { font: 700 2rem/1 var(--display); }
.section-title .count { border-left: 1px solid var(--edge); padding-left: 12px; }
.select-wrap, .minimum-input { position: relative; }
select { appearance: none; }
.select-wrap::after { content: ''; position: absolute; right: 16px; top: calc(50% - 5px); width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.sort-wrap select { min-height: 36px; padding-block: 4px; font-size: .9375rem; }
.list-bottom { margin-top: 16px; font-size: .9375rem; color: var(--sub); }
.loading, .empty { padding: 32px 16px; text-align: center; border-block: 1px solid var(--edge); color: var(--sub); }
.empty > .ico { margin: 0 auto 8px; color: var(--muted); }
.empty h3 { font: 700 1.75rem/1.1 var(--display); color: var(--ink); }
.empty p { margin: 8px 0 16px; }
.notice { margin-bottom: 16px; background: var(--warning-bg); color: var(--ink); padding: 8px 12px; font-size: .9375rem; }
.footer { border-top: 1px solid var(--edge); color: var(--muted); padding-block: 16px 24px; font-size: .875rem; }
.footer > span:first-child { font: 700 1.25rem/1 var(--display); color: var(--ink); }
.footer a:hover, .detail-source:hover { color: var(--accent); }
#analytics-settings { color: var(--sub); text-decoration: underline; text-underline-offset: .18em; }
#analytics-consent {
  position: fixed; z-index: 12; right: 1rem; bottom: 1rem;
  width: min(25rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto;
  padding: 1rem; border: 1px solid var(--rule); border-radius: 6px;
  background: var(--surface); color: var(--ink); box-shadow: 0 6px 24px #0004;
}
#analytics-consent h2 { font: 700 1.35rem/1.1 var(--display); }
#analytics-consent p { margin-top: .4rem; color: var(--sub); font-size: .925rem; }
.analytics-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.analytics-actions button { flex: 1 1 auto; justify-content: center; }

dialog { width: min(31rem, calc(100% - 24px)); max-height: 88dvh; margin: auto; padding: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: var(--overlay); }
.filter-panel { width: min(26rem, calc(100% - 24px)); }
.filter-heading, .detail-head { padding: 12px 20px; gap: 8px; border-bottom: 1px solid var(--edge); }
.filter-heading h2, .detail-head h2 { font: 700 1.75rem/1.1 var(--display); }
.filter-heading h2 { gap: 8px; }
.quiet { margin-left: auto; color: var(--sub); padding: 8px; text-decoration: underline; text-underline-offset: 3px; }
.filter-body, .detail-body { padding: 20px; }
.filter-group { padding: 0; margin: 0 0 16px; border: 0; min-width: 0; }
.filter-group label, .filter-group legend { display: block; padding: 0; margin: 0 0 4px; font-size: .9375rem; font-weight: 600; }
.minimum-input input { padding-right: 64px; }
.minimum-input > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); font-size: .875rem; }
.choice-set { display: flex; flex-wrap: wrap; gap: 4px; }
.choice { min-height: 36px; padding: 4px 12px; border: 1px solid var(--edge); }
#player-choices { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 8px; }
#player-choices .choice { padding-inline: 0; }
.filter-switch { display: flex; align-items: center; justify-content: space-between; padding-block: 8px; }
.filter-switch label { cursor: pointer; }
.filter-switch input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); cursor: pointer; }
.primary, .secondary { justify-content: center; gap: 8px; min-height: 40px; }
.primary { padding: 8px 16px; border-radius: 4px; background: var(--button); color: var(--button-ink); font-weight: 600; text-decoration: none; }
.primary:hover { background: var(--accent); }
.filter-body .primary { width: 100%; margin-top: 12px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; }
.detail-head > div { min-width: 0; }
.detail-head h2 { overflow-wrap: anywhere; }
.detail-head .icon-button { flex: none; }
.detail-head .row-tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--muted); margin-top: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0 0 20px; }
.detail-grid dt, .address-label { font-size: .875rem; color: var(--muted); }
.detail-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.detail-grid > :nth-child(-n+2) dd { font: 700 1.75rem/1.15 var(--display); }
.address-box { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-left: 12px; margin-top: 4px; background: var(--paper); border: 1px solid var(--edge); border-radius: 4px; }
.address-box code { overflow-wrap: anywhere; }
.detail-actions { flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.detail-source { display: inline-block; margin-top: 16px; color: var(--muted); font-size: .9375rem; }
#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 10; max-width: 90%; padding: 8px 16px; border: 1px solid var(--rule); border-radius: 4px; background: var(--hover); color: var(--ink); text-align: center; }

@media (max-width: 68rem) {
  .finder-bar { flex-wrap: wrap; }
  .quick-filters { width: 100%; margin-left: 0; }
}
@media (max-width: 45rem) {
  .top-inner { gap: 20px; }
  .topbar nav { gap: 16px; }
  .mast-landscape { width: 35%; clip-path: polygon(20px 0, 100% 0, 100% 100%, 0 100%); }
  .mast-copy { width: 68%; }
  .hero-inner { min-height: 128px; }
  .hero-stats { gap: 0 8px; }
  .hero-stats > span + span { padding-left: 8px; }
}
@media (max-width: 34rem) {
  .wrap { width: calc(100% - 32px); }
  .top-inner { min-height: 52px; gap: 12px; }
  .brand { font-size: 1.425rem; gap: 4px; }
  .brand img { width: 24px; height: 24px; }
  .topbar nav { gap: 12px; }
  .nav-link { font-size: .875rem; gap: 4px; }
  .nav-link .ico, .nav-link .nav-full { display: none; }
  .nav-link .nav-short { display: inline; }
  .feed { gap: 0; }
  #refresh { width: 32px; }
  #feed-text { font-size: .8rem; }
  .hero-inner { min-height: 116px; padding-block: 16px; }
  .mast-copy { width: 72%; }
  .mast-landscape { width: 28%; object-position: 73% 48%; }
  .hero h1 { font-size: clamp(2rem, 8.4vw, 2.65rem); }
  .hero-stats { display: grid; gap: 0; margin-top: 8px; font-size: .875rem; }
  .hero-stats > span + span { border: 0; padding: 0; }
  .workspace { padding-top: 16px; }
  .finder-bar { gap: 8px; margin-bottom: 12px; }
  .quick-filters { gap: 4px; }
  .chip { min-height: 36px; padding: 4px 8px; font-size: .875rem; }
  .chip .ico, .search-box kbd { display: none; }
  .search-box input { padding-right: 8px; }
  .filter-trigger { gap: 4px; padding-inline: 8px; }
  .filter-trigger .count { padding-left: 4px; }
  .list-toolbar { gap: 8px; }
  .section-title h2 { font-size: 1.625rem; }
  .footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 23rem) {
  .top-inner { gap: 8px; }
  .topbar nav { gap: 8px; }
  .brand { font-size: 1.25rem; }
  #feed-text { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .chip { padding-inline: 4px; }
  .filter-trigger .ico { display: none; }
  .sort-wrap > .ico { display: none; }
  .sort-wrap select { padding-left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
