/* ───────────── WTF is this icon? — clean ───────────── */
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --fg-2: #3d3d3d;
  --muted: #8a8a8a;
  --line: #ececec;
  --surface: #f5f5f5;
  --surface-2: #ededed;

  --neon: #ccff00;        /* electric lime accent */
  --hot: #ff2e63;         /* neon red-pink, for "act now" */

  --red: #ff3b30;
  --amber: #ff9f0a;
  --green: #00c853;
  --blue: #2962ff;

  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.55 var(--font);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: var(--neon); color: var(--fg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1200px, 100% - 64px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10; text-decoration: none; }
.skip:focus { top: 12px; }

/* ───────────── Header ───────────── */
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; }
.logo::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--neon); box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.top__link { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .15s; }
.top__link:hover { color: var(--fg); }

/* ───────────── Hero ───────────── */
.hero { padding: 104px 0 88px; }
.hero__title {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(56px, 10.5vw, 136px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.055em;
}
.hero__title mark {
  background: var(--neon);
  color: inherit;
  padding: 0 .08em;
  margin: 0 -.02em;
  border-radius: .08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero__sub {
  max-width: 440px;
  margin: 32px 0 48px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 680px;
  height: 64px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.search:hover { background: var(--surface-2); }
.search:focus-within { background: var(--bg); border-color: var(--fg); box-shadow: 0 0 0 5px var(--neon); }
.search__icon { width: 20px; height: 20px; margin-left: 22px; color: var(--muted); flex: none; }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  padding: 0 14px;
  font-size: 17px; font-weight: 500;
}
.search input::placeholder { color: var(--muted); font-weight: 400; }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear {
  display: grid; place-items: center;
  width: 32px; height: 32px; margin-right: 14px;
  border: 0; border-radius: 50%; background: var(--surface-2); color: var(--fg-2);
}
.search__clear[hidden] { display: none; }
.search__clear svg { width: 16px; height: 16px; }
.search__clear:hover { background: #dedede; }
.search__kbd {
  margin-right: 18px;
  font: 500 12px/1 var(--font); color: var(--muted);
  border: 1px solid #dcdcdc; border-radius: 6px; padding: 4px 8px;
}
.search:focus-within .search__kbd, .search.has-q .search__kbd { display: none; }

.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; max-width: 680px; }
.try__label { font-size: 13px; color: var(--muted); margin-right: 6px; }
.try button {
  border: 0; background: none; padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px; color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .15s, box-shadow .15s;
}
.try button:hover { background: var(--neon); color: var(--fg); box-shadow: inset 0 0 0 1px transparent; }

/* While searching, the hero steps back so results come into view */
.hero, .hero__title, .hero__sub, .try { transition: padding .25s ease, font-size .25s ease, opacity .2s ease; }
.is-searching .hero { padding: 48px 0 40px; }
.is-searching .hero__title { font-size: clamp(40px, 5.5vw, 72px); }
.is-searching .hero__sub { margin: 20px 0 28px; }
.is-searching .try { display: none; }

/* ───────────── Toolbar: categories & colour filter ───────────── */
.main { padding: 0 0 120px; }
.toolbar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  margin: 0 -32px;
  padding: 0 32px;
}
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none;
  border: 0; background: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  color: var(--fg-2);
  transition: background .15s, color .15s;
}
.cat:hover { background: var(--surface); }
.cat[aria-pressed="true"] { background: var(--fg); color: var(--neon); }
.cat__n { margin-left: 6px; color: var(--muted); font-weight: 400; }
.cat[aria-pressed="true"] .cat__n { color: rgba(255, 255, 255, .5); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0 0 14px; }
.filters__label { font-size: 13px; color: var(--muted); margin-right: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; color: var(--fg-2);
  transition: background .15s;
}
.chip:hover { background: var(--surface); }
.chip[aria-pressed="true"] { background: var(--neon); color: var(--fg); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot--red { background: var(--red); } .dot--amber { background: var(--amber); } .dot--green { background: var(--green); } .dot--blue { background: var(--blue); }
.dot--any { background: conic-gradient(var(--red) 0 25%, var(--amber) 0 50%, var(--green) 0 75%, var(--blue) 0); }

.status { margin: 56px 0 0; font-size: 14px; color: var(--muted); }
.status[hidden] { display: none; }
.status q { quotes: "“" "”"; color: var(--fg); }

/* ───────────── Sections & grid ───────────── */
.section { margin-top: 96px; }
.status:not([hidden]) + #results .section:first-child,
.status:not([hidden]) + #results > .grid,
.status:not([hidden]) + #results > .empty { margin-top: 32px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section__title {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}
.section__blurb { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.section__more {
  border: 0; background: none; padding: 0;
  font-size: 14px; font-weight: 500; color: var(--fg);
  text-decoration: underline; text-decoration-color: var(--neon); text-decoration-thickness: 3px; text-underline-offset: 6px;
  transition: text-decoration-color .15s;
}
.section__more:hover { text-decoration-color: currentColor; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: -16px 0 40px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend b { color: var(--fg); font-weight: 500; }
.legend .dot--red { background: var(--hot); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 48px 24px; }
.card { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); }
.card .tile { transition: box-shadow .2s; }
.card:hover .tile { box-shadow: 0 0 0 3px var(--neon); }
.card:hover .tile .ico { transform: scale(1.07); }
.card:focus-visible { outline: none; box-shadow: none; }
.card:focus-visible .tile { box-shadow: 0 0 0 3px var(--fg), 0 0 0 7px var(--neon); }
.card__body { padding: 16px 2px 0; display: flex; flex-direction: column; gap: 4px; }
.card__name { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.card__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.card__num, .card__cat { display: none; }

/* Urgency: a coloured dot and a word */
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--fg-2); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--stop::before { background: var(--hot); box-shadow: 0 0 0 3px rgba(255, 46, 99, .18); }
.badge--soon::before { background: #ffb800; box-shadow: 0 0 0 3px rgba(255, 184, 0, .22); }
.badge--info::before { background: var(--green); box-shadow: 0 0 0 3px rgba(0, 200, 83, .16); }
.card__meta .badge { color: var(--muted); font-size: 12px; }

/* ───────────── Icon tiles ───────────── */
.tile {
  --tile-bg: var(--surface);
  display: grid; place-items: center;
  aspect-ratio: 1;
  background: var(--tile-bg);
  border-radius: var(--radius);
  color: var(--fg);
  overflow: hidden;
}
.tile .ico { width: 46%; height: 46%; transition: transform .2s; }
.ico { display: block; overflow: visible; }
.ico text { font-family: var(--font); font-weight: 700; fill: currentColor; stroke: none; text-anchor: middle; }
.ico .knock { fill: var(--tile-bg); stroke: var(--tile-bg); }
.tile.is-red   { color: var(--red); }
.tile.is-amber { color: var(--amber); }
.tile.is-green { color: var(--green); }
.tile.is-blue  { color: var(--blue); }

/* "How it looks lit up" swatch for dashboard lights */
.lit {
  --tile-bg: #111318;
  display: inline-grid; place-items: center; flex: none;
  width: 56px; height: 44px; border-radius: 10px;
  background: #111318; color: #eef1f5;
}
.lit .ico { width: 28px; height: 28px; filter: drop-shadow(0 0 2px currentColor) drop-shadow(0 0 6px color-mix(in srgb, currentColor 50%, transparent)); }
.lit.is-red { color: #ff453a; } .lit.is-amber { color: #ffb020; } .lit.is-green { color: #30d158; } .lit.is-blue { color: #4a90ff; }

/* ───────────── Empty state ───────────── */
.empty { margin-top: 32px; max-width: 560px; }
.empty .note { display: none; }
.empty h2 { margin: 0 0 12px; font-size: 32px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.empty p { margin: 0; color: var(--fg-2); }
.empty ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
.empty li::before { content: "—"; margin-right: 10px; color: #c4c4c4; }
.empty strong, .empty em { color: var(--fg); font-style: normal; font-weight: 500; }
.empty button { border: 0; background: none; padding: 0; color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }

/* ───────────── Detail sheet ───────────── */
.detail {
  width: min(960px, 100% - 48px);
  max-height: min(90vh, 960px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .3), 0 0 0 1px rgba(0, 0, 0, .04);
  overflow: hidden;
}
.detail::backdrop { background: rgba(10, 10, 10, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.detail[open] { animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { transform: translateY(16px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.detail__inner { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.detail__close {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  display: grid; place-items: center;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--fg);
  transition: background .15s;
}
.detail__close svg { width: 18px; height: 18px; }
.detail__close:hover { background: var(--surface-2); }

.detail__grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "tile main" "extra main";
  column-gap: 8px;
}
.detail__side { padding: 40px 0 0 40px; }
.detail__side--tile { grid-area: tile; }
.detail__side--extra { grid-area: extra; padding-bottom: 40px; }
.detail__side .tile .ico { width: 54%; height: 54%; }
.detail__lit { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.detail__side h3, .detail__label {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 500; letter-spacing: .02em;
  color: var(--muted);
}
.detail__side h3 { margin-top: 8px; }
.detail__looks { display: flex; flex-wrap: wrap; gap: 6px; }
.detail__looks button {
  border: 0; background: var(--surface); padding: 6px 11px; border-radius: 999px;
  font-size: 13px; color: var(--fg-2);
  transition: background .15s;
}
.detail__looks button:hover { background: var(--neon); color: var(--fg); }
.detail__actions { margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: var(--fg); color: var(--bg);
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  transition: opacity .15s;
}
.btn:hover { background: var(--neon); color: var(--fg); }

.detail__main { grid-area: main; padding: 48px 72px 48px 48px; min-width: 0; }
.detail__cat { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.detail__title { margin: 0; font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; line-height: 1; letter-spacing: -0.045em; }
.detail__aka { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.detail__main > .badge { margin-top: 20px; }
.detail__block { margin-top: 40px; }
.detail__block h3 { margin: 0 0 10px; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--muted); }
.detail__block p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--fg-2); }
.detail__block--todo { background: var(--neon); border-radius: var(--radius); padding: 24px 26px; }
.detail__block--todo h3 { color: rgba(10, 10, 10, .55); }
.detail__block--todo p { color: var(--fg); font-weight: 500; }
.detail__block--stop { background: var(--hot); }
.detail__block--stop h3 { color: rgba(255, 255, 255, .78); }
.detail__block--stop p { color: #fff; }
.detail__block--tip p { font-size: 14px; color: var(--muted); }

.detail__similar { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.detail__similar h3 { margin: 0 0 18px; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 20px 14px; }
.mini { display: flex; flex-direction: column; text-decoration: none; }
.mini .tile { border-radius: 12px; transition: box-shadow .15s; }
.mini:hover .tile { box-shadow: 0 0 0 3px var(--neon); }
.mini span { padding-top: 10px; font-size: 13px; font-weight: 500; line-height: 1.3; }
.mini small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }

/* ───────────── Footer ───────────── */
.foot { border-top: 1px solid var(--line); padding: 48px 0 64px; }
.foot__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot__brand { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.foot__small { max-width: 520px; margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.foot__credit {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.foot__credit strong { color: var(--fg); font-weight: 600; }

/* ───────────── Responsive ───────────── */
@media (max-width: 760px) {
  .wrap { width: min(1200px, 100% - 40px); }
  .toolbar { margin: 0 -20px; padding: 0 20px; }
  .top__inner { height: 60px; }
  .hero { padding: 56px 0 56px; }
  .hero__sub { margin: 24px 0 32px; font-size: 16px; }
  .is-searching .hero { padding: 24px 0 24px; }
  .is-searching .hero__title { font-size: 34px; }
  .is-searching .hero__sub { display: none; }
  .is-searching .search { margin-top: 20px; }
  .is-searching .status { margin-top: 32px; }
  .search { height: 56px; }
  .search__icon { margin-left: 18px; }
  .search__kbd { display: none; }
  .section { margin-top: 72px; }
  .section__head { margin-bottom: 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; }
  .card__text { display: none; }

  .detail { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .detail__grid { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "tile" "main" "extra"; }
  .detail__side { padding: 20px 20px 0; }
  .detail__side--tile { padding-right: 72px; }
  .detail__side--tile .tile { aspect-ratio: 16 / 10; }
  .detail__side--tile .tile .ico { width: 34%; height: 60%; }
  .detail__side--extra { padding: 0 20px 40px; }
  .detail__main { padding: 28px 20px 32px; }
  .detail__block { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
