/*
 * November redesign stylesheet. Spec: docs/superpowers/specs/2026-10-11-november-dormant-switch-design.md
 * Loaded only when NOVEMBER_DESIGN=true (src/components/design/NovemberHead.tsx).
 * EVERY rule must start with [data-design="november"]; src/lib/design/css-scope.test.ts enforces it.
 * Slices 1 to 6 port the frozen lab's eye-test rules here (../atdb_5.0-november, src/app/globals.css).
 */

@font-face {
  font-family: "Archivo November";
  src: url("/design/archivo-92-650-latin.woff2") format("woff2");
  font-weight: 650;
  font-style: normal;
  font-display: swap;
}

/* ── Slice 1: the look (s537) ─────────────────────────────────────────────────────────────────────────────
   Ported rule for rule from the frozen lab (mockup/november, src/app/globals.css, "Eye test prescription":
   accent navy, paper cool, type rx, chips square, heads caps). [data-mock-*] became the on-only scope
   markers: :is([data-nov-scope="site"], [data-nov-scope="admin"]) (public, auth, dashboard roots) and [data-nov-scope="home"] (inside site,
   home page only). The lab's own home exclusions are kept (owner, s537): home takes accent, paper and heading
   type; it does not take radius, square chips, the greys, or the broader icon-before-heading removal.
   Slice 6 (s539): admin takes this whole block, as the lab's admin scope took exactly these five areas plus the
   always-on base (MockShell ADMIN_AREAS, owner s535 "look only"); no later slice applies to admin, so its layouts
   and labels stay as they are (Cowork's contract). */

/* Accent: navy. On <html>, so portalled UI (menu sheet, dropdowns, dialogs) outside the layout root gets it. */
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) { --brand: oklch(0.36 0.11 258); --ring: oklch(0.36 0.11 258); }
[data-design="november"].dark:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) { --brand: oklch(0.75 0.09 255); --brand-foreground: oklch(0.17 0.02 258); --ring: oklch(0.75 0.09 255); }

/* Paper: cool white; dark counterpart (s535 dark pass: without it the cool paper forced a light page in dark mode). */
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) { --background: oklch(0.985 0.004 250); background: oklch(0.985 0.004 250); }
[data-design="november"].dark :is([data-nov-scope="site"], [data-nov-scope="admin"]) { --background: oklch(0.16 0.006 255); --card: oklch(0.21 0.006 255); background: oklch(0.16 0.006 255); }

/* Greys (not home). Light: the eye test's mutedL 0.52. Dark: lighter grey, no extra fading (s535 audit).
   --color-muted-foreground too: Tailwind's token resolves var(--muted-foreground) at :root. */
[data-design="november"]:not(.dark) :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) { --muted-foreground: oklch(0.52 0.005 260); --color-muted-foreground: oklch(0.52 0.005 260); }
[data-design="november"].dark :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) { --muted-foreground: oklch(0.78 0 0); --color-muted-foreground: oklch(0.78 0 0); }
[data-design="november"].dark :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) [class*="text-muted-foreground/"] { color: var(--muted-foreground) !important; }
[data-design="november"].dark :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) [class*="text-hero-muted/"] { color: var(--hero-fg-muted) !important; }

/* Body text in Geist (s541, owner; eye test bodyFont: Geist 3.5/4). Today's look never actually shows Geist:
   next/font puts --font-geist-sans on <body>, while Tailwind sets the page font on <html> from --font-sans, where
   that variable is undefined, so text falls back to the device font (San Francisco, Segoe UI, Roboto). Set it on
   <body>, where the variable exists, so portalled menus and dialogs get it too. Today's look is left as it is. */
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) body { font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif; }

/* Names and headings in the pinned Archivo (width 92, weight 650 baked into the file). */
/* In the base layer, as in the lab, so per-heading tracking-* utilities still win (review I3). */
@layer base {
  [data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) :is(h1, h2) { font-family: "Archivo November", var(--font-geist-sans), sans-serif; letter-spacing: -0.01em; }
}
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) .font-display { font-family: "Archivo November", var(--font-geist-sans), sans-serif !important; }
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) :is(h1, h2, .font-display) { font-weight: 650 !important; }

/* Reading size (s535 owner pick): long body text 16px on phones, 15px from 1024px, darker grey; the lead line
   above it matches the size and is bold (aboutLead 600). Line height 1.58 = eye test. */
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) main p.whitespace-pre-line.leading-relaxed.text-muted-foreground { font-size: 16px; line-height: 1.58; color: oklch(0.42 0 0); }
[data-design="november"].dark :is([data-nov-scope="site"], [data-nov-scope="admin"]) main p.whitespace-pre-line.leading-relaxed.text-muted-foreground { color: oklch(0.82 0 0); }
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) main p.font-medium:has(+ p.whitespace-pre-line.leading-relaxed.text-muted-foreground) { font-size: 16px; line-height: 1.5; font-weight: 600; }
@media (min-width: 1024px) {
  [data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) main p.whitespace-pre-line.leading-relaxed.text-muted-foreground { font-size: 15px; }
  [data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) main p.font-medium:has(+ p.whitespace-pre-line.leading-relaxed.text-muted-foreground) { font-size: 15px; }
}
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) main [data-slot="card"]:has(> [data-slot="card-content"]:only-child) { padding-block: 0; gap: 0; }

/* Radius 3, square buttons (not home). The radius utilities read var(--radius) inline (@theme inline). */
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) { --radius: 3px; }
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) main [data-slot="button"] { border-radius: 2px; }

/* Square chips: any fully rounded element holding text (not dots, avatars, switches, images); not home. */
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) main .rounded-full:not(:empty):not([class*="w-"]):not([class*="size-"]):not([role="switch"]):not(:has(img)) { border-radius: 2px; }
/* Contributor labels are labels, not status: the eye test's grey square chip (banned keeps its colour). */
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) [data-slot="badge"]:is([data-variant="trust-new"], [data-variant="trust-contributor"], [data-variant="trust-editor"], [data-variant="trust-moderator"], [data-variant="founding"], [data-variant="early-adopter"]) {
  background: color-mix(in oklch, var(--foreground) 6%, transparent) !important; color: var(--foreground) !important; border-color: transparent !important; border-radius: 2px;
}

/* Section headings as small tracked capitals (entity hero headings excepted). */
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) main h2:not(.entity-hero h2) { font-family: var(--font-geist-sans) !important; font-variation-settings: normal !important; font-size: 12.5px !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: 0.08em; }
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) main h3.text-sm.font-semibold:not(.entity-hero h3) { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--foreground); }
/* No section icons: the leading icon in a caps heading (everywhere), and icons just before a heading (not home). */
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]) main h2:not(.entity-hero h2) > svg:first-child { display: none; }
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) main :is(h1, h2, h3) > svg:first-child,
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) main svg:has(+ :is(h1, h2, h3)),
[data-design="november"] :is([data-nov-scope="site"], [data-nov-scope="admin"]):not(:has([data-nov-scope="home"])) main :is(div, span):has(> svg:only-child):not(:has(> :not(svg))):has(+ :is(h1, h2, h3)) { display: none; }

/* The lab's always-on base (not preset options; s534 "Press box" base kept through the eye test): near-square
   radius tokens, cards without the soft shadow, square badges. The lab set these in Tailwind's @theme and in
   card.tsx / badge.tsx, which would change production CSS; here they are overrides, site and admin
   scope (home included, as in the lab). @theme inline inlines the token VALUES into the radius
   utilities, so the six radius classes in use (s537 inventory) are overridden by name. Scoped from <html> (not the
   layout root) so portalled dialogs, menus and popovers get them too, as in the lab (review I1). These rules are
   unlayered, so they would beat conditional utilities on the same element: skip elements with a variant radius
   (`data-[...]:rounded-none`) and cards with a hover shadow, which the lab keeps (review I2). */
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) .rounded-sm:not([class*=":rounded-"]) { border-radius: 1px; }
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) .rounded-t-sm:not([class*=":rounded-"]) { border-top-left-radius: 1px; border-top-right-radius: 1px; }
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) .rounded-md:not([class*=":rounded-"]) { border-radius: 2px; }
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) .rounded-lg:not([class*=":rounded-"]) { border-radius: 2px; }
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) .rounded-xl:not([class*=":rounded-"]) { border-radius: 2px; }
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) .rounded-2xl:not([class*=":rounded-"]) { border-radius: 3px; }
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) [data-slot="card"].shadow-sm:not([class*="hover:shadow"]) { --tw-shadow: 0 0 #0000; }
[data-design="november"]:has(:is([data-nov-scope="site"], [data-nov-scope="admin"])) [data-slot="badge"].rounded-full { border-radius: 2px; }

/* ── Slice 3: entity pages (s537) ─────────────────────────────────────────────────────────────────────────
   From the lab's hero=blueflat and body=rx options (mockup/november src/app/globals.css 402-409, 439-467,
   519-521, 539-550) plus its ungated hero rules (326-332). [data-mock-part] hooks became the on-only
   [data-nov-part] hooks; the tab rules apply site-wide, as in the lab. */

/* Header band: the home hero's look (owner s541, option B from four labelled variants in Chrome: home look in
   the box, chosen over the flat blue band, a full-width dark band and blue + glow): home's near-black with the
   same top-right glow, which EntityHero already draws (s537 hid it). A larger name, a stronger summary, a quiet
   provenance line, square pills, and "Verified from N sources" as plain green check text. */
[data-design="november"] [data-nov-scope="site"] .entity-hero { --hero-bg: oklch(0.17 0.022 266); --hero-fg-muted: oklch(0.72 0.03 266); --hero-border: oklch(1 0 0 / 12%); }
[data-design="november"] [data-nov-scope="site"] .entity-hero h1 { font-size: 2.125rem; }
/* Lab 326 + 521 (its blueflat colour, 88%, wins the cascade there). */
[data-design="november"] [data-nov-scope="site"] .entity-hero [data-nov-part="hero-blurb"] {
  font-size: 16px; line-height: 1.5; max-width: 36rem; margin-top: 0.75rem;
  color: color-mix(in oklch, var(--hero-fg) 88%, transparent);
}
[data-design="november"] [data-nov-scope="site"] .entity-hero [data-nov-part="hero-meta"] { font-size: 12px; line-height: 1.4; margin-top: 0.875rem; color: var(--hero-fg-muted); }
[data-design="november"] [data-nov-scope="site"] .entity-hero :is(span, a, button).rounded-full { border-radius: 2px; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="seal"] { border-color: transparent !important; background: transparent !important; padding-left: 0 !important; color: oklch(0.85 0.12 160) !important; }

/* Side tabs + fact box on the right. Tabs lose their pill borders; the active tab is an ink bar. */
[data-design="november"] [data-nov-scope="site"] main .max-w-4xl:has([data-nov-part="company-body"]) { max-width: 72rem; }
[data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"] { overflow: visible; }
[data-design="november"] [data-nov-scope="site"] [data-slot="tabs-trigger"] { border-top-width: 0 !important; border-right-width: 0 !important; border-bottom-width: 0 !important; box-shadow: none !important; }
[data-design="november"] [data-nov-scope="site"] [data-slot="tabs-trigger"]::after { display: none; }

/* Phone + tablet (s535 owner pick "swipe strip"): below 1024px the side tabs are one sideways-scrolling row
   with an ink underline on the active tab; the right edge fades to hint that it scrolls. Only the vertical
   (entity) tab lists: in the lab these rules hit every tab row, and without its slice-4 category-tab rule they
   clipped the active underline on category, compare, submit and feedback tabs (review I2, s537). */
@media (max-width: 1023.98px) {
  [data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"][aria-orientation="vertical"] {
    flex-direction: row !important; justify-content: flex-start; width: 100%;
    overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none;
    border-bottom: 1px solid color-mix(in oklch, var(--foreground) 15%, transparent);
  }
  /* s541: fade only a row that actually scrolls (BodyTabs sets data-overflows). */
  [data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"][aria-orientation="vertical"][data-overflows="true"] {
    mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
  }
  [data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"][aria-orientation="vertical"]::-webkit-scrollbar { display: none; }
  [data-design="november"] [data-nov-scope="site"] [aria-orientation="vertical"] > [data-slot="tabs-trigger"] {
    flex: 0 0 auto; width: auto !important; min-height: 44px; padding: 0.5rem 0.75rem !important; font-size: 16px !important;
    border-left-width: 0 !important; border-bottom-width: 3px !important; border-bottom-color: transparent; margin-bottom: -1px;
  }
  [data-design="november"] [data-nov-scope="site"] [aria-orientation="vertical"] > [data-slot="tabs-trigger"][data-state="active"] { border-bottom-color: var(--foreground) !important; }
}
@media (min-width: 1024px) {
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="company-body"] { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; column-gap: 2.5rem; row-gap: 2rem; align-items: start; }
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="company-body"] > * { grid-column: 1; margin-block: 0 !important; } /* s541: Tailwind 4 space-y sets margin-bottom, which doubled the row gap */
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="company-body"] > [data-nov-part="glance"] { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 5rem; max-height: calc(100dvh - 6rem); overflow-y: auto; } /* s541: a fact box taller than the window scrolls itself instead of hiding its bottom */
}
/* The fact box: a hairline box, small-capital title, facts as plain rows (no accent borders). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glance"] { background: var(--card) !important; border: 1px solid color-mix(in oklch, var(--foreground) 15%, transparent); border-radius: 3px; padding: 1rem !important; --tw-ring-shadow: 0 0 #0000; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glance"] h2 { font-family: var(--font-geist-sans) !important; font-variation-settings: normal !important; font-size: 12px !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: 0.08em; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glance"] p { font-size: 14px; line-height: 1.45; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glance"] dl { grid-template-columns: 1fr !important; gap: 0 !important; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glance"] dl > div { border-left: 0 !important; padding-left: 0 !important; padding-block: 0.45rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glance"] dd { text-align: right; margin-top: 0 !important; }

/* Action row (the owner's s535 blind test): right of the breadcrumbs, icons only in square bordered 28px
   buttons, 14px icons; the words stay in the DOM, visually hidden, so names and tooltips survive. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] { gap: 4px; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] > :is(a, button) {
  width: 28px !important; height: 28px !important; min-width: 28px !important; min-height: 28px !important; padding: 0 !important; gap: 0 !important;
  border: 1px solid color-mix(in oklch, var(--foreground) 16%, transparent) !important; border-radius: 2px !important;
  background: transparent !important; color: var(--foreground) !important; box-shadow: none !important; filter: none !important;
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] > :is(a, button):hover { background: color-mix(in oklch, var(--foreground) 6%, transparent) !important; }
/* The row rule cancels the button's focus ring (a box-shadow) and border colour, so give keyboard focus its own
   outline (review I1, WCAG 2.4.7; the lab had the same gap). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] > :is(a, button):focus-visible { outline: 2px solid var(--ring) !important; outline-offset: 2px; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] > :is(a, button) svg { width: 14px !important; height: 14px !important; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] [data-nov-part="act-label"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Signed in (owner, s537; the lab could not show signed-in pages): the fact box header holds the Accurate? votes
   AND the report flag, which squeezed the title onto two lines in the 17rem column. Then the title takes its own
   line and the controls the next. Signed out (only the flag) it stays one row, as in the lab. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glance"] > div:first-child:has(> div > :nth-child(2)) { flex-wrap: wrap; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glance"] > div:first-child:has(> div > :nth-child(2)) > h2 { flex: 1 0 100%; }

/* Touch screens (owner, s537): the action buttons still LOOK 28px, but each taps at 44px through an invisible
   margin (inset -9px: it is measured inside the 1px border, so 26 + 18 = 44). The gap grows from 4px to 18px so
   neighbouring tap areas never overlap. Desktop is unchanged. */
@media (pointer: coarse) {
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] { gap: 18px; }
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] > :is(a, button) { position: relative; z-index: 1; overflow: visible !important; } /* above the header band drawn after it */
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="action-row"] > :is(a, button)::after { content: ""; position: absolute; inset: -9px; }
}

/* ── Slice 2: site frame (s537) ───────────────────────────────────────────────────────────────────────────
   From the lab's nav=inkbar, footer=ink and breadcrumb rules (mockup/november src/app/globals.css 247-253,
   305-315, 494-500, 551-572), keyed on the on-only [data-nov-part] hooks. Relative specificity and the lab's
   !importants are kept, so its cascade (including the dark-mode home hairline, which stays at 0.16 alpha
   because the hairline rule is !important) behaves the same. */

/* Ink nav bar: white text, the current page underlined, "Sign up free" as an underlined link. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="header"] {
  background: oklch(0.2 0.006 260) !important; color: oklch(0.97 0 0); border-bottom: 0;
  --brand: oklch(0.97 0 0); --foreground: oklch(0.97 0 0); --muted-foreground: oklch(0.97 0 0 / 0.7); --accent: oklch(1 0 0 / 0.1);
  /* s537 review: lines and fields inside the bar (phone search) were light hairlines on ink. */
  --border: oklch(1 0 0 / 0.18); --input: oklch(1 0 0 / 0.24);
  /* The signed-in avatar (bg-brand + text-brand-foreground): a white disc with an ink initial. */
  --brand-foreground: oklch(0.2 0.006 260);
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="header"] a, [data-design="november"] [data-nov-scope="site"] [data-nov-part="header"] button { color: inherit; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="header"] nav[aria-label="Main"] a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
/* Only the Sign up link (s537 review: the lab's `.bg-brand` also hit the signed-in avatar, leaving an underlined bare initial). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="header"] a.bg-brand[href="/register"] { background: transparent !important; color: inherit !important; box-shadow: none !important; text-decoration: underline; text-underline-offset: 4px; }
/* Keyboard focus on the ink bars (s537; the lab had the same gap): the site's navy ring measures 1.67:1 on ink and
   the brand-link rule above removes Sign up's ring entirely, so focus gets a solid white outline here (>= 3:1). */
[data-design="november"] [data-nov-scope="site"] :is([data-nov-part="header"], [data-nov-part="footer"]) :is(a, button, input):focus-visible { outline: 2px solid oklch(0.97 0 0) !important; outline-offset: 2px; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="beta"] { background: transparent !important; border: 1px solid color-mix(in oklch, currentColor 40%, transparent); border-radius: 2px; color: inherit !important; }

/* Ink footer. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="footer"] {
  background: oklch(0.2 0.006 260); color: oklch(0.97 0 0); border-top: 0;
  --foreground: oklch(0.97 0 0); --muted-foreground: oklch(0.97 0 0 / 0.65); --border: oklch(1 0 0 / 0.18); --brand: oklch(0.97 0 0);
}
/* s537 review: the pressed theme button used bg-muted (light grey) behind a now-white icon, about 1:1 on ink.
   A 35% white disc: the icon reads on it and the pressed state reads against the footer (>= 3:1). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="footer"] button[aria-pressed="true"] { background: oklch(1 0 0 / 0.35); }

/* Home (s535 owner pick): a 1px light hairline where the ink nav meets a full-bleed dark hero. The lab matched
   `main > section.bg-hero`; the home page now sits inside the slice-1 marker, hence the second form. */
[data-design="november"] [data-nov-scope="site"]:has(> main > section.bg-hero, > main > [data-nov-scope="home"] > section.bg-hero) [data-nov-part="header"] { border-bottom: 1px solid oklch(1 0 0 / 0.16) !important; }
/* Dark mode (s535 owner pick "lifted + hairline"): the ink bars sit a step above the near-black page. */
[data-design="november"].dark [data-nov-scope="site"] [data-nov-part="header"] { background: oklch(0.235 0.008 258) !important; border-bottom: 1px solid oklch(1 0 0 / 0.12); }
[data-design="november"].dark [data-nov-scope="site"] [data-nov-part="footer"] { background: oklch(0.235 0.008 258); border-top: 1px solid oklch(1 0 0 / 0.12); }

/* Breadcrumbs: the full trail with " / " at every width (was a "‹ Parent" back link on phones, chevrons on desktop). */
[data-design="november"] [data-nov-scope="site"] nav[aria-label="Breadcrumb"] a.md\:hidden { display: none; }
[data-design="november"] [data-nov-scope="site"] nav[aria-label="Breadcrumb"] ol { display: flex; flex-wrap: wrap; row-gap: 8px; }
/* s537 review (WCAG 2.5.8): the trail's text-xs links are ~16px tall; padding makes each a 24px target and the
   negative margin keeps the layout where it was (an ::before hit area is clipped by the links' `truncate`). Rows
   sit 8px apart so the targets never overlap. */
[data-design="november"] [data-nov-scope="site"] nav[aria-label="Breadcrumb"] ol a { padding-block: 4px; margin-block: -4px; }
[data-design="november"] [data-nov-scope="site"] nav[aria-label="Breadcrumb"] ol svg { display: none; }
[data-design="november"] [data-nov-scope="site"] nav[aria-label="Breadcrumb"] ol li + li::before { content: "/"; opacity: 0.6; }

/* Phone menu sheet (s535 owner pick "match the ink nav"): no row icons except Ask ATDb's sparkle, small-capital
   group labels with hairlines, Log in as an underlined link, a square navy Sign up. Portalled to <body>, outside
   the layout root, so these hang off <html>. */
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] nav svg { display: none; }
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] nav a[href="/ask"] svg { display: inline-block; }
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] nav a[href="/ask"] { gap: 0.5rem; }
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] nav a,
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] nav button { border-radius: 0; gap: 0; }
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] nav > p {
  margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid color-mix(in oklch, var(--foreground) 15%, transparent);
  font-size: 11px; letter-spacing: 0.08em;
}
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] [data-nov-part="menu-auth"] { display: flex; align-items: center; justify-content: space-between; }
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] [data-nov-part="menu-auth"] a:first-child {
  border: 0; background: transparent; box-shadow: none; padding-left: 0.25rem; text-decoration: underline; text-underline-offset: 4px;
}
[data-design="november"]:has([data-nov-scope="site"]) [data-nov-part="menu-sheet"] [data-nov-part="menu-auth"] a:last-child { border-radius: 2px; padding-inline: 1.5rem; }

/* ── Slice 4: lists, category, search (s538) ───────────────────────────────────────────────────────────────
   From the lab's body=rx and list=rx options (mockup/november src/app/globals.css 413-422 stat line, 430-438
   category tabs, 502 page-title rule, 505-517 tier meter, 528-535 filter bar). The eye-test card itself is
   markup (EntityCardRx.tsx), not CSS. The tier meter rule restyles EVERY TierBadge on site pages (hero pill,
   category tier headers, compare, insights, home's featured strip), as in the lab. */

/* Category stats: each stat card becomes an outline chip reading "77% Avg Completeness", one wrapping row, no icons. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="stat-line"] { display: flex !important; flex-wrap: wrap; gap: 8px; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="stat-line"] > * {
  display: inline-flex; flex-direction: row-reverse; align-items: baseline; gap: 4px; width: auto;
  border: 1px solid color-mix(in oklch, var(--foreground) 22%, transparent); box-shadow: none; background: transparent;
  padding: 2px 8px; border-radius: 2px;
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="stat-line"] [data-slot="card-content"] { display: inline-flex; flex-direction: row-reverse; align-items: baseline; gap: 4px; padding: 0; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="stat-line"] svg { display: none; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="stat-line"] :is(span.text-xs, span.text-sm) { font-size: 12px; color: var(--foreground); }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="stat-line"] .text-2xl { font-size: 12px; font-weight: 700; margin: 0; line-height: 1.6; }

/* Category tabs: one hairline row, the active tab underlined in ink. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="cat-tabs"] [data-slot="tabs-list"] {
  background: transparent; padding: 0; border-radius: 0; width: 100%; justify-content: flex-start; height: auto;
  border-bottom: 1px solid color-mix(in oklch, var(--foreground) 15%, transparent); scrollbar-width: none;
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="cat-tabs"] [data-slot="tabs-trigger"] {
  flex: 0 0 auto; min-height: 44px; padding: 0.5rem 0.75rem !important; font-size: 15px; border-radius: 0;
  border: 0 !important; border-bottom: 3px solid transparent !important; margin-bottom: -1px; background: transparent !important;
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="cat-tabs"] [data-slot="tabs-trigger"][data-state="active"] { border-bottom-color: var(--foreground) !important; color: var(--foreground); }
/* Keyboard focus: the trigger's own ring is a box-shadow, which the tab rules remove (s538 review). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="cat-tabs"] [data-slot="tabs-trigger"]:focus-visible { outline: 2px solid var(--ring) !important; outline-offset: -2px; }
/* Phone + tablet: the lab's swipe-strip rule (globals.css 443-456) covered every tab row; for the category tabs
   that means 16px labels, a sideways scroll and the right-edge fade. */
@media (max-width: 1023.98px) {
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="cat-tabs"] [data-slot="tabs-list"] {
    overflow-x: auto !important; overflow-y: hidden !important; mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
  }
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="cat-tabs"] [data-slot="tabs-list"]::-webkit-scrollbar { display: none; }
  [data-design="november"] [data-nov-scope="site"] [data-nov-part="cat-tabs"] [data-slot="tabs-trigger"] { font-size: 16px !important; }
}

/* Page titles sit on a 4px rule (not entity/category heroes, dark heroes, centred form titles or home). */
[data-design="november"] [data-nov-scope="site"]:not(:has([data-nov-scope="home"])) main h1:not(.entity-hero h1):not([data-nov-part="cathero"] h1):not(section.bg-hero h1):not(.text-center h1):not(h1.text-center) { border-top: 4px solid var(--foreground); padding-top: 0.5rem; }

/* Tier badges become the 5-step meter: the letter stays as text, the bar is drawn before it. Popover content is
   portalled outside the site scope, so it is named too (s541: the tier popover's own chip stayed a filled circle). */
[data-design="november"]:has([data-nov-scope="site"]) :is([data-nov-scope="site"], [data-slot="popover-content"]) [data-slot="badge"][data-variant^="tier-"] {
  --fill: 6px; position: relative; width: auto !important; padding-left: 33px !important; overflow: visible;
  background: transparent !important; border-color: transparent !important; color: inherit !important;
}
[data-design="november"]:has([data-nov-scope="site"]) :is([data-nov-scope="site"], [data-slot="popover-content"]) [data-slot="badge"][data-variant^="tier-"]::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 29px; height: 10px;
  background: linear-gradient(90deg, currentColor var(--fill), color-mix(in oklch, currentColor 15%, transparent) var(--fill));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 6px); mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 6px);
}
[data-design="november"]:has([data-nov-scope="site"]) :is([data-nov-scope="site"], [data-slot="popover-content"]) [data-slot="badge"][data-variant="tier-s"] { --fill: 30px; }
[data-design="november"]:has([data-nov-scope="site"]) :is([data-nov-scope="site"], [data-slot="popover-content"]) [data-slot="badge"][data-variant="tier-a"] { --fill: 24px; }
[data-design="november"]:has([data-nov-scope="site"]) :is([data-nov-scope="site"], [data-slot="popover-content"]) [data-slot="badge"][data-variant="tier-b"] { --fill: 18px; }
[data-design="november"]:has([data-nov-scope="site"]) :is([data-nov-scope="site"], [data-slot="popover-content"]) [data-slot="badge"][data-variant="tier-c"] { --fill: 12px; }

/* Filter bars: one wrapping row of 32px outline chips; the search box takes its own line on phones. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="filter-bar"] { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 6px !important; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="filter-bar"] > .relative:first-child { flex: 1 1 100%; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="filter-bar"] [data-slot="select-trigger"] {
  width: auto !important; height: 32px !important; min-height: 32px; padding: 0 10px !important; gap: 6px; font-size: 13px;
  background: transparent !important; box-shadow: none !important; border-radius: 2px !important;
  border: 1px solid color-mix(in oklch, var(--foreground) 22%, transparent) !important;
}
/* Keyboard focus: the trigger's own ring is a box-shadow, which the rule above removes (s538 review). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="filter-bar"] [data-slot="select-trigger"]:focus-visible { outline: 2px solid var(--ring) !important; outline-offset: 2px; }
@media (min-width: 640px) { [data-design="november"] [data-nov-scope="site"] [data-nov-part="filter-bar"] > .relative:first-child { flex: 1 1 220px; } }

/* ── Slice 5a: icons, tags, glows (s538) ───────────────────────────────────────────────────────────────────
   From the lab's heads=caps and body=rx options (mockup/november src/app/globals.css 472 head/meta icons, 425
   kind-tag) and the slop ledger's row 18 (no radial glow on the register and Ask pages; the lab had no rule
   for them). The glow rule has no `main`: the register panel sits in the auth layout, which has none. */
[data-design="november"] [data-nov-scope="site"] main :is([data-nov-part="head-icon"], [data-nov-part="meta-icon"]) { display: none; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="kind-tag"] { align-self: flex-start; padding: 1px 6px; border-radius: 2px; line-height: 1.5; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="glow"] { display: none; }

/* ── Slice 5c: dates, tab strips, the "In the news" panel (s538) ───────────────────────────────────────────
   The header's news panel without its box (slop ledger row 28, owner s538 option B) and with a still dot
   (row 29): one hairline on the left marks the boundary (owner s534: one line per boundary). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="news-panel"] {
  border: 0 !important; border-left: 1px solid var(--hero-border) !important; background: transparent !important;
  border-radius: 0 !important; padding: 0 0 0 1.25rem !important;
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="news-panel"] .animate-pulse { animation: none; }
/* Home Live dot still (owner s541, slop row 29, picked from labelled variants in Chrome): the green dot stays, the ping ring goes. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="live-ping"] { display: none; }
/* Home headline second line in solid hero blue, no gradient text (owner s541, slop row 22, labelled variants in Chrome). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="hero-emph"] { background: none; -webkit-text-fill-color: currentColor; color: var(--hero-accent); }
/* Home "The AdTech Database · free beta" as a plain small-capital label, not a pill above the headline (owner s541, slop row 13). */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="hero-kicker"] { border: 0; background: none; padding: 0; color: var(--hero-fg-muted); letter-spacing: 0.08em; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="hero-kicker-dot"] { display: none; }
/* Home headline 44px from 1024px, not 52 (owner s541, slop row 14); phones keep 36px. */
@media (min-width: 1024px) { [data-design="november"] [data-nov-scope="site"] [data-nov-part="hero-title"] { font-size: 44px; } }
/* Phone + tablet: the other horizontal tab rows (compare, the agency explorer, submit, feedback) as the swipe
   strip, built like the category tabs (the lab's raw rule clipped their active underline: review I2, s537). */
@media (max-width: 1023.98px) {
  [data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"][aria-orientation="horizontal"]:not([data-nov-part="cat-tabs"] *) {
    background: transparent; padding: 0; border-radius: 0; width: 100%; height: auto; justify-content: flex-start;
    overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none;
    border-bottom: 1px solid color-mix(in oklch, var(--foreground) 15%, transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
  }
  [data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"][aria-orientation="horizontal"]:not([data-nov-part="cat-tabs"] *)::-webkit-scrollbar { display: none; }
  [data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"][aria-orientation="horizontal"]:not([data-nov-part="cat-tabs"] *) > [data-slot="tabs-trigger"] {
    flex: 0 0 auto; min-height: 44px; padding: 0.5rem 0.75rem !important; font-size: 16px !important; border-radius: 0;
    border: 0 !important; border-bottom: 3px solid transparent !important; margin-bottom: -1px; background: transparent !important;
  }
  [data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"][aria-orientation="horizontal"]:not([data-nov-part="cat-tabs"] *) > [data-slot="tabs-trigger"][data-state="active"] { border-bottom-color: var(--foreground) !important; color: var(--foreground); }
  [data-design="november"] [data-nov-scope="site"] [data-slot="tabs-list"][aria-orientation="horizontal"]:not([data-nov-part="cat-tabs"] *) > [data-slot="tabs-trigger"]:focus-visible { outline: 2px solid var(--ring) !important; outline-offset: -2px; }
}

/* ── Slice 5d: quiet connection groups (slop ledger row 2, owner s538) ─────────────────────────────────────
   One colour cue per group: the dot. No colour bar or gradient on the header, one hairline under it; cards plain. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="conn-head"] {
  border-left-width: 0 !important; background-image: none !important; border-radius: 0 !important; padding-left: 0 !important;
  border-bottom: 1px solid color-mix(in oklch, var(--foreground) 15%, transparent);
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="conn-bar"] { display: none; }

/* ── Slice 5e: ruled rows (slop ledger row 27, owner s538) ─────────────────────────────────────────────────
   Boxed row lists become ruled rows: one hairline per boundary (above the first row, between rows, under the
   last), no boxes and no gap between rows. In a multi-column grid the column gap becomes right padding, so every
   rule runs across the whole list (review, s539). Under a connection-group header, the header's hairline is the top
   rule (no second line, no 8px gap). Rows sit flush left inside clipping cards, so focus rings are drawn inset. */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="ruled"] {
  row-gap: 0 !important;
  border-top: 1px solid color-mix(in oklch, var(--foreground) 15%, transparent);
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="ruled"] > li {
  margin: 0 !important; border-style: solid; border-width: 0 0 1px !important; border-radius: 0 !important;
  border-color: color-mix(in oklch, var(--foreground) 15%, transparent) !important; padding-inline: 0 !important;
}
[data-design="november"] [data-nov-scope="site"] [data-nov-part="ruled"] > li > [class~="border"] {
  border-width: 0 !important; border-radius: 0 !important; padding-inline-start: 0 !important; box-shadow: none !important;
}
/* a row, not a tile: no card fill at rest (hover keeps its tint) */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="ruled"] > li > [class~="border"]:not(:hover) { background-color: transparent !important; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="ruled"][class~="grid"] { column-gap: 0 !important; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="ruled"][class~="grid"] > li { padding-inline-end: 1rem !important; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="ruled"] > li :is(a, button):focus-visible { outline: 2px solid var(--ring) !important; outline-offset: -2px !important; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="conn-head"]:has(+ [data-nov-part="ruled"]) { margin-bottom: 0 !important; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="conn-head"] + [data-nov-part="ruled"] { border-top-width: 0 !important; }

/* ── Compact pages (s541): folds. Ruled, square, no motion; the marker inherits muted text. ── */
[data-design="november"] [data-nov-scope="site"] [data-nov-part="fold"] > summary { -webkit-tap-highlight-color: transparent; }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="fold"] > summary:hover { background: color-mix(in oklch, var(--foreground) 3%, transparent); }
[data-design="november"] [data-nov-scope="site"] [data-nov-part="fold"][data-fold-tone="inline"] > summary:hover { background: none; }
