/* ==========================================================================
   Early Trends — Midnight Radar
   Dark navy field, neon teal and lime. Colors live in these variables.
   ========================================================================== */

:root {
  --paper: #0b1220;
  --paper-2: #121c2f;
  --card: #141e32;
  --ink: #f4fffb;
  --ink-soft: #b7d9d1;
  --muted: #8fbfb6;
  --line: #2a3c52;
  --signal: #3ef0c8;       /* neon teal */
  --signal-dark: #d6ff62;  /* lime, used for hover and emphasis */
  --moss: #3ef0c8;
  --sun: #d6ff62;
  --teal: #2ee6c7;
  --lime: #d6ff62;
  --radius: 14px;
  --shadow: 0 0 0 1px rgba(46, 230, 199, .22), 0 12px 32px -18px rgba(0, 0, 0, .85);
  --glow: 0 0 0 1px rgba(46, 230, 199, .38), 0 0 22px rgba(46, 230, 199, .14);
  --max: 72rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background-color: #0b1220;
  background-image:
    linear-gradient(rgba(46, 230, 199, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 230, 199, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: #8dffe6; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--lime); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.skip-link {
  position: absolute; left: -999px; top: .5rem;
  background: var(--ink); color: var(--paper); padding: .5rem .9rem; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: .5rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.15rem; }
.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .45em; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid rgba(46, 230, 199, .22);
  background: #0b1220;
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.15rem; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 3.6rem; height: 3.6rem; flex: none; color: #5fffe0;
  display: block; filter: drop-shadow(0 0 8px rgba(95, 255, 224, .4));
}
.brand-mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.brand-mark .eye-white,
.brand-mark .pupil,
.brand-mark .glint {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 140ms ease;
}
.brand-mark.eyes-wide .eye-white { transform: scale(1.16, 1.32); }
.brand-mark.eyes-blink .eye-white { transform: scale(1.04, 0.14); transition-duration: 80ms; }
.brand-mark.eyes-blink .pupil,
.brand-mark.eyes-blink .glint { transform: scaleY(0.08); transition-duration: 80ms; }
@media (prefers-reduced-motion: reduce) {
  .brand-mark .eye-white,
  .brand-mark .pupil,
  .brand-mark .glint { transition: none; }
  .brand-mark.eyes-wide .eye-white,
  .brand-mark.eyes-blink .eye-white,
  .brand-mark.eyes-blink .pupil,
  .brand-mark.eyes-blink .glint { transform: none; }
}
.brand small { font-family: var(--mono); font-size: .68rem; color: var(--muted); font-weight: 400; letter-spacing: .04em; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .85rem; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
}
.site-nav { display: none; width: 100%; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: .25rem 0 .9rem; display: flex; flex-direction: column; gap: .15rem; }
.site-nav a {
  display: block; padding: .55rem .2rem; color: var(--ink-soft); text-decoration: none; font-weight: 500;
  border-bottom: 1px dashed var(--line);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--signal-dark); }
.header-inner { flex-wrap: wrap; }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: 100%; }
  .site-nav ul { flex-direction: row; flex-wrap: wrap; padding: 0; gap: .35rem 1.1rem; }
  .site-nav a { border: 0; padding: .3rem 0; font-size: .95rem; }
  .site-nav a[aria-current="page"] { box-shadow: 0 2px 0 var(--signal); }
  .header-inner { flex-wrap: wrap; }
}
@media (min-width: 1100px) {
  .header-inner { flex-wrap: nowrap; }
  .site-nav { width: auto; }
}
/* No-JS fallback: show nav if script never runs */
.no-js .site-nav { display: block; }
.no-js .nav-toggle { display: none; }

/* ---------- Hero ----------
   The pitch sits under the product cards on the homepage, so the block is
   shorter than when it opened the page. The radar rings stay inside the hero. */
.hero { padding: 2.05rem 0 1.85rem; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; right: -14rem; top: -7rem; width: 34rem; height: 34rem; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 2.2rem, rgba(46, 230, 199, .16) 2.2rem 2.32rem);
  pointer-events: none;
}
.hero .eyebrow { margin-bottom: .65rem; }
.hero .lede { margin-bottom: .15rem; }
.hero .actions { margin-top: 1.05rem; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: #9ef6e4; background: rgba(46, 230, 199, .08); border: 1px solid rgba(46, 230, 199, .35); border-radius: 999px; padding: .2rem .7rem; margin-bottom: 1rem;
}
.hero h1 { max-width: 19ch; color: #f7fffc; }
.hero h1 em { font-style: italic; color: #7dffe8; }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--ink-soft); max-width: 38rem; }
.page-head { padding: 2.6rem 0 1.6rem; border-bottom: 1px solid var(--line); }
.page-head .lede { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .75rem 1.2rem; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 1rem;
  border: 2px solid var(--teal); transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.btn-primary { background: var(--lime); color: #07140c; border-color: var(--lime); }
.btn-primary:hover { background: var(--teal); border-color: var(--teal); color: #041510; transform: translateY(-1px); box-shadow: 0 0 18px rgba(46, 230, 199, .35); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(46, 230, 199, .12); color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 2.8rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; }
/* Homepage opener: product cards sit directly under the nav. */
.section-lead { padding: 1.45rem 0 1.65rem; border-bottom: 1px solid var(--line); }
.section-lead .section-head { margin-bottom: .85rem; }
.section-lead .notice { margin-bottom: .95rem; }
/* The hidden leaderboard slot sits between the category grid and Follow, so the
   adjacent-section border does not apply. Restore that divider on the homepage. */
.section-tight + .slot[hidden] + #subscribe { border-top: 1px solid var(--line); }

/* ---------- Trend cards ---------- */
.card-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.trend-card {
  background: #121c30; border: 1px solid rgba(46, 230, 199, .32); border-radius: var(--radius);
  box-shadow: var(--glow); display: flex; flex-direction: column; height: 100%; overflow: hidden; position: relative;
}
/* Author display:flex would otherwise override the hidden attribute, so filtered cards stay on screen. */
.trend-card[hidden] { display: none; }
.trend-card .swatch {
  position: relative; aspect-ratio: 16 / 10; width: 100%; height: auto; flex: 0 0 auto;
  display: grid; place-items: center; overflow: hidden; background: #0c1626;
}
.trend-card .swatch img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: center; display: block;
}
.product-hero { margin: 1.2rem 0 0; }
.product-hero img { width: auto; max-width: min(100%, 36rem); height: auto; max-height: 32rem; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.product-hero figcaption { font-family: var(--mono); font-size: .75rem; color: var(--muted); margin-top: .45rem; }
.product-hero figcaption a { color: var(--muted); }
.trend-card .swatch span { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 0 rgba(0,0,0,.12)); }
.swatch-a { background: radial-gradient(circle at 30% 30%, #ffd2c4, #f6a48e 60%, #e2492f); }
.swatch-b { background: radial-gradient(circle at 70% 30%, #e5efd9, #b7cfa3 60%, #2f5d50); }
.swatch-c { background: radial-gradient(circle at 40% 60%, #fff1c9, #f6d275 60%, #d39a17); }
.trend-card .body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.trend-card h3 { margin: 0; font-size: 1.3rem; }
.trend-card h3 a { color: var(--ink); text-decoration: none; }
.trend-card h3 a:hover { color: var(--signal-dark); }
.trend-card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .6rem; }

.badge {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: .18rem .6rem; border: 1px solid var(--line); color: var(--ink-soft); background: var(--paper);
}
.badge-example { position: absolute; top: .7rem; left: .7rem; background: var(--ink); color: var(--paper); border-color: var(--ink); z-index: 2; }
.badge-case { position: absolute; top: .7rem; left: .7rem; background: var(--moss); color: #fff; border-color: var(--moss); z-index: 2; }
.badge-stage { background: rgba(214, 255, 98, .12); border-color: rgba(214, 255, 98, .5); color: var(--lime); }

/* Identified-on date for published picks */
.identified-on { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin: 0 0 1rem; }
.identified-on time { color: var(--ink-soft); font-style: normal; }
.trend-card .identified-on { margin: 0; }

/* Signal meter (illustrative only) */
.meter { display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.meter-bars { display: inline-flex; gap: 3px; }
.meter-bars i { width: 6px; height: 14px; border-radius: 2px; background: var(--line); display: inline-block; }
.meter-bars i.on { background: var(--signal); }

/* ---------- Notice / callouts ---------- */
.notice {
  border: 1px dashed rgba(94, 240, 214, .7); background: rgba(20, 48, 58, .72); color: var(--ink-soft);
  border-radius: var(--radius); padding: .85rem 1rem; font-size: .95rem; margin: 0 0 1.4rem;
}
.notice strong { color: #f4fffb; }
.notice a { color: #9dffe9; }
.callout { border-left: 4px solid #5ff0d6; background: #122433; color: var(--ink-soft); padding: 1rem 1.15rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }

/* ---------- Steps (method) ---------- */
.steps { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: step; display: grid; gap: 1rem; }
.steps > li {
  counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.1rem 3.1rem; position: relative; margin: 0;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: .85rem; top: 1rem;
  font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--signal);
}
.steps h3 { margin-bottom: .3rem; }
.steps p:last-child { margin-bottom: 0; }

/* Feature trio on home */
.trio { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .trio { grid-template-columns: repeat(3, 1fr); } }
.trio > div { padding: 1.1rem 0; border-top: 3px solid var(--teal); }
.trio h3 { font-size: 1.15rem; }
.trio p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* Filter chips (listing page) */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.chips button {
  font: inherit; font-size: .88rem; padding: .35rem .85rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
}
.chips button[aria-pressed="true"] { background: var(--lime); color: #07140c; border-color: var(--lime); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.2rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--card); }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Placeholder slots (ads / affiliate) ----------
   These stay invisible until real code is added. Remove `hidden` when live. */
.slot { margin: 1.5rem 0; }
.slot[hidden] { display: none; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; background: #070d16; color: #c9e7e1; padding: 2.4rem 0 1.6rem; font-size: .94rem; border-top: 1px solid rgba(46, 230, 199, .25); }
.site-footer a { color: var(--teal); }
.site-footer a:hover { color: var(--lime); }
.footer-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 { font-size: 1rem; color: var(--lime); font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-note { border-top: 1px solid #1c3144; margin-top: 1.8rem; padding-top: 1rem; font-size: .84rem; color: #93c4ba; }

/* ==========================================================================
   Categories (v2)
   ========================================================================== */
.sw-toys-collectibles { background: radial-gradient(circle at 30% 30%, #fffdf8, #ffd2c4 55%, #e2492f); }
.sw-toys-collectibles-edge { --cat: #ff7a68; --cat-soft: #3a2426; }
.sw-fashion-apparel { background: radial-gradient(circle at 30% 30%, #fffdf8, #f3e3d3 55%, #8a5a3b); }
.sw-fashion-apparel-edge { --cat: #e2b48a; --cat-soft: #33261c; }
.sw-beauty-makeup { background: radial-gradient(circle at 30% 30%, #fffdf8, #ffe0e6 55%, #c8506e); }
.sw-beauty-makeup-edge { --cat: #ff8aa8; --cat-soft: #3a222b; }
.sw-food-drink { background: radial-gradient(circle at 30% 30%, #fffdf8, #fff1c9 55%, #d39a17); }
.sw-food-drink-edge { --cat: #ffd15a; --cat-soft: #332a14; }
.sw-books-media { background: radial-gradient(circle at 30% 30%, #fffdf8, #e6e0d0 55%, #5b4a32); }
.sw-books-media-edge { --cat: #e4d2b0; --cat-soft: #2c261c; }
.sw-tech-gadgets { background: radial-gradient(circle at 30% 30%, #fffdf8, #dde8ee 55%, #2d5f78); }
.sw-tech-gadgets-edge { --cat: #7fd0ea; --cat-soft: #172833; }
.sw-home-decor { background: radial-gradient(circle at 30% 30%, #fffdf8, #e5efd9 55%, #2f5d50); }
.sw-home-decor-edge { --cat: #8ee0c8; --cat-soft: #16302a; }
.sw-sports-outdoors { background: radial-gradient(circle at 30% 30%, #fffdf8, #dcefe9 55%, #1f7a63); }
.sw-sports-outdoors-edge { --cat: #5eecc8; --cat-soft: #143028; }
.sw-baby-kids { background: radial-gradient(circle at 30% 30%, #fffdf8, #e1ecfa 55%, #4f7fbf); }
.sw-baby-kids-edge { --cat: #9ec4ff; --cat-soft: #1a2740; }
.sw-health-wellness { background: radial-gradient(circle at 30% 30%, #fffdf8, #eef3df 55%, #6f8a2f); }
.sw-health-wellness-edge { --cat: #c6f07a; --cat-soft: #243016; }
.sw-pet-supplies { background: radial-gradient(circle at 30% 30%, #fffdf8, #f6e6d4 55%, #b86b2b); }
.sw-pet-supplies-edge { --cat: #ffb07a; --cat-soft: #332218; }
.sw-kitchen-dining { background: radial-gradient(circle at 30% 30%, #fffdf8, #fde5d6 55%, #c7532c); }
.sw-kitchen-dining-edge { --cat: #ff8d66; --cat-soft: #331c16; }
.sw-case-studies { background: radial-gradient(circle at 30% 30%, #fffdf8, #e4dff8 55%, #3d3a78); }
.sw-case-studies-edge { --cat: #c4b6ff; --cat-soft: #221c33; }

.section-tight { padding: 2rem 0; }
.cat-grid { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-grid-compact { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
@media (min-width: 640px) { .cat-grid-compact { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .cat-grid-compact { grid-template-columns: repeat(4, 1fr); } }

.cat-tile {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .75rem; row-gap: .25rem;
  background: var(--card); border: 1px solid rgba(46, 230, 199, .28); border-left: 5px solid var(--cat, var(--signal));
  border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--ink);
  box-shadow: var(--glow); transition: transform .12s ease, border-color .12s ease;
}
.cat-tile:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--cat, var(--signal)); }
.cat-emoji {
  grid-row: span 3; align-self: start; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.35rem; background: var(--cat-soft, var(--paper-2));
}
.cat-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.cat-tile p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.cat-count { font-family: var(--mono); font-size: .74rem; color: var(--cat, var(--signal-dark)); letter-spacing: .03em; }
.cat-grid-compact .cat-tile { padding: .65rem .75rem; }
.cat-grid-compact .cat-emoji { grid-row: auto; width: 2.1rem; height: 2.1rem; font-size: 1.1rem; align-self: center; }
.cat-grid-compact .cat-name { font-size: .98rem; }

.cat-links { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.cat-links a {
  display: inline-block; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); text-decoration: none; color: var(--ink-soft); font-size: .92rem;
}
.cat-links a:hover { border-color: var(--signal); color: var(--signal-dark); }
.prose .cat-links { padding-left: 0; }
.prose .cat-links li { margin: 0; }

.crumbs { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: .8rem; }
.crumbs a { color: var(--muted); }
.site-nav ul { column-gap: 1.1rem; }
.cat-tile { align-items: start; }
.cat-grid-compact .cat-tile { align-items: center; }
/* Keep long-form text left-aligned with the page header instead of centered */
.wrap.prose { max-width: var(--max); }
.wrap.prose > * { max-width: 42rem; }
.wrap.prose > .table-wrap { max-width: 52rem; }

/* Trend of the week archive. One new <li> per week; see trend-of-the-week/index.html. */
.prose .week-archive { list-style: none; padding-left: 0; margin-top: .4rem; }
.week-archive li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem 1rem; margin: 0 0 .6rem;
}
.week-archive time { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.week-archive .badge { margin-left: .35rem; }
.where-to-buy { margin-top: 1rem; }
