:root {
  --bg: #ffffff;
  --surface: #f6f6f6;
  --line: #e6e6e6;
  --line-strong: #d4d4d4;
  --text: #111111;
  --text-2: #555555;
  --text-3: #8a8a8a;
  --ink: #111111;
  --ink-text: #ffffff;
  --good: #111111;
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-3); }

/* header / hero banner */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero { position: relative; overflow: hidden; background: #0b0b0b; color: #fff; isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 38%; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.92) 0%, rgba(8, 8, 8, 0.72) 38%, rgba(8, 8, 8, 0.15) 75%, rgba(8, 8, 8, 0.05) 100%),
    linear-gradient(0deg, rgba(8, 8, 8, 0.65) 0%, rgba(8, 8, 8, 0) 45%);
}
.hero-inner { min-height: 380px; display: flex; flex-direction: column; padding-top: 18px; padding-bottom: 30px; }
.hero-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: auto; }
.hero-mark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.hero-mark .flag { width: 22px; height: 22px; border-color: #fff; background-color: #fff;
  background-image:
    linear-gradient(45deg, #111 25%, transparent 25%, transparent 75%, #111 75%),
    linear-gradient(45deg, #111 25%, transparent 25%, transparent 75%, #111 75%);
  background-size: 8px 8px; background-position: 2px 2px, 6px 6px; border-width: 2px; }
.gh { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #fff;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); transition: background .15s; }
.gh:hover { background: rgba(255, 255, 255, 0.18); }
.gh svg { width: 20px; height: 20px; fill: currentColor; }
.wordmark {
  margin: 48px 0 10px; font-family: "Barlow Condensed", var(--font); font-style: italic; font-weight: 800;
  font-size: clamp(56px, 10vw, 112px); line-height: 0.86; letter-spacing: -0.01em; text-transform: uppercase;
  display: flex; flex-wrap: wrap; gap: 0 0.18em;
}
.wm-a { color: transparent; -webkit-text-stroke: 2px #fff; }
.wm-b { color: #fff; position: relative; }
.wm-b::after {
  content: ""; position: absolute; left: 0.04em; right: -0.06em; bottom: -0.1em; height: 0.12em; transform: skewX(-14deg);
  background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%),
                    linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%);
  background-color: #111; background-size: 0.12em 0.12em; background-position: 0 0, 0.06em 0.06em;
}
.tagline { margin: 22px 0 0; max-width: 560px; font-size: 16px; color: rgba(255, 255, 255, 0.86); }
.credit { margin: 10px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.62); letter-spacing: 0.01em; }
.credit a { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.credit a:hover { border-bottom-color: #fff; }
/* keep the light-theme flag for other uses */
.flag {
  width: 26px; height: 26px; border-radius: 6px; background-color: var(--ink);
  background-image:
    linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%),
    linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%);
  background-size: 10px 10px; background-position: 3px 3px, 8px 8px;
  border: 3px solid var(--ink);
}

/* controls */
.controls {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0 10px;
}
.row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 10px; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 40px;
}
.search:focus-within { border-color: var(--text); background: #fff; }
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; height: 100%; }
.select { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.select select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23555' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line); border-radius: 10px; height: 40px; padding: 0 32px 0 12px; color: var(--text); cursor: pointer;
}
.select select:focus { outline: 2px solid var(--text); outline-offset: 1px; }

.range { flex: 1 1 360px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 14px; align-items: center; }
.range-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); grid-column: 1; }
.range-head output { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.range input { grid-column: 1; width: 100%; accent-color: var(--ink); margin: 0; }
.seg { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 11px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--ink-text); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--text-2);
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }

.more summary { cursor: pointer; font-size: 13px; color: var(--text-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 12px; line-height: 1; }
.more[open] summary::before { content: "-"; }
.more-grid { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 12px 0 4px; align-items: center; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--ink); width: 16px; height: 16px; }

/* list */
.summary { padding: 18px 0 12px; color: var(--text-2); font-size: 14px; }
.summary b { color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff;
  display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute; left: 10px; top: 10px; background: var(--ink); color: var(--ink-text);
  font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.badge.warn { background: #fff; color: var(--text); border: 1px solid var(--line-strong); }
.body { padding: 14px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.title-row h3 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }
.title-row h3 a { text-decoration: none; }
.title-row h3 a:hover { text-decoration: underline; }
.by { margin: -4px 0 0; color: var(--text-3); font-size: 13px; }

.lap-bar { position: relative; height: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.lap-bar span { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 999px; }
.lap-text { margin: 0; font-size: 13px; color: var(--text-2); }
.lap-text b { color: var(--text); }

.layout { margin: 2px 0 0; font-size: 12px; color: var(--text-3); }
.verify {
  display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text); border: 1px dashed var(--line-strong); border-radius: 6px; padding: 2px 7px; cursor: help;
}
.stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.stats li { display: inline-flex; align-items: center; gap: 5px; }
.stats svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; color: var(--text-2); background: var(--surface); border-radius: 6px; padding: 2px 8px; }
.laptag {
  display: flex; align-items: center; justify-content: space-between; margin-top: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px;
}
.laptag[hidden] { display: none; }
.laptag-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); }
.laptag-time { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.laptag-time svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.laptag:not([hidden]) + .actions { margin-top: 0; }
.actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 9px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--ink-text); border: 1px solid var(--ink); flex: 1; white-space: nowrap;
}
.btn:hover { background: #333; border-color: #333; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface); }
.more-btn { display: flex; margin: 26px auto 0; max-width: 220px; }
.empty { text-align: center; color: var(--text-2); padding: 60px 0; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 36px 0 48px; background: var(--surface); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px 48px; }
.foot h2 { font-size: 14px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.foot p { margin: 0 0 10px; color: var(--text-2); font-size: 14px; max-width: 560px; }

@media (max-width: 640px) {
  .hero-inner { min-height: 330px; padding-bottom: 22px; }
  .hero-img { object-position: 70% 40%; }
  .hero-shade { background: linear-gradient(0deg, rgba(8, 8, 8, 0.92) 0%, rgba(8, 8, 8, 0.6) 55%, rgba(8, 8, 8, 0.25) 100%); }
  .wordmark { margin-top: 70px; }
  .tagline { font-size: 15px; }
  .controls { position: static; }
  .range { grid-template-columns: 1fr; }
  .seg { grid-column: 1; grid-row: auto; justify-self: start; }
  .select { flex: 1 1 auto; }
  .select select { flex: 1; }
}
