/* ===========================================================================
 * Disorder's look on its own address (programme disorder-server-2026, map v4 rows D2 and D6).
 * Spec: .claude/reports/impl/2026-12-06-disorder-server-d2-d6/DISORDER_PAGES_LOOK_SPEC.md
 *
 * This sheet is linked LAST on every HTML page of disorder.trackbounty.com by web/client_look.py, which also sets
 * data-client="disorder" on <html>. Every rule is scoped to that attribute, so nothing here can reach the main
 * address. The pages are the website's own white system (tokens.css, portal.css, components.css): the look is its
 * token set turned to Disorder's four colours, and a short list of repairs where a rule wrote a colour by hand.
 *
 * Disorder's colours (brand file, 2026-12-03): black #000000, white-grey #EDEDED, grey #8C8C8C, pale yellow
 * #FFFF92. Yellow is the one accent: a fill, a rule, the mark of "here"; text on it is black.
 * Computed pairs (WCAG 2 relative luminance): ink #EDEDED on paper #000 17.9:1; ink-2 #BDBDBD 11.2:1; ink-3 #8C8C8C
 * 6.3:1 (the floor for readable text; on tint #0F0F0F 5.7:1, on the neutral box #1A1A1A 5.2:1); black on yellow
 * #FFFF92 20.0:1; ok #7BE0A0 on its background #0E2416 10.2:1; hold #FFE58A on #2A2408 12.4:1; bad #FF9A8F on
 * #2C1310 8.5:1; a field's edge #6E6E6E on black 4.1:1 and its placeholder #7E7E7E on the field 5.0:1.
 * =========================================================================== */

html[data-client="disorder"] {
  color-scheme: dark;

  /* the white system's tokens, in Disorder's colours */
  --tb-paper: #000000;
  --tb-tint: #0F0F0F;
  --tb-ink: #EDEDED;
  --tb-ink-2: #BDBDBD;
  --tb-ink-3: #8C8C8C;
  --tb-line: #262626;
  --tb-line-2: #3D3D3D;
  --tb-bolt: #FFFF92;
  --tb-bolt-hi: #FFFFC2;
  --tb-on-bolt: #000000;
  --tb-ok: #7BE0A0;
  --tb-ok-bg: #0E2416;
  --tb-hold: #FFE58A;
  --tb-hold-bg: #2A2408;
  --tb-bad: #FF9A8F;
  --tb-bad-bg: #2C1310;
  --tb-neutral-bg: #1A1A1A;
  --tb-prev: #6E6E6E;
  --tb-badge: #FFFF92;
  --tb-badge-ink: #000000;
  /* square corners: Disorder's system is bars and thin lines */
  --tb-radius-sm: 0px;
  --tb-radius-md: 0px;
  --tb-radius-lg: 0px;
  --tb-radius-pill: 0px;

  /* the older dark tokens some shared parts still read (base.html) */
  --bg: #000000;
  --bg-card: #0F0F0F;
  --bg-hover: #1A1A1A;
  --border: #262626;
  --text: #EDEDED;
  --text-muted: #8C8C8C;
  --accent: #FFFF92;
  --accent-bright: #FFFF92;
  --accent-dim: #1F1F12;
  --accent-gradient: #FFFF92;

  background: #000000;
}

html[data-client="disorder"] body {
  background: #000000;
  color: var(--tb-ink);
  /* Disorder's own face where the device has it; the brand's nearest relatives everywhere else (spec, section 3) */
  --font-sans: "Neue Haas Grotesk Display Pro", "Neue Haas Grotesk Display", "NHaasGroteskDSPro", "Helvetica Neue",
               Helvetica, "TB Inter", "Inter Variable", Arial, sans-serif;
  font-family: var(--font-sans);
}

/* ── type: chopped, tight, upper-case labels ───────────────────────────────── */
html[data-client="disorder"] h1,
html[data-client="disorder"] h2,
html[data-client="disorder"] h3,
html[data-client="disorder"] .tbc-title,
html[data-client="disorder"] .tbc-sh { font-family: var(--font-sans); font-weight: 500; letter-spacing: -0.01em; }
html[data-client="disorder"] .tbc-title { text-transform: uppercase; letter-spacing: 0; }
html[data-client="disorder"] .tbc-eyebrow,
html[data-client="disorder"] .tbw-scope { letter-spacing: 0.12em; color: var(--tb-ink-3); }

/* ── the shell ─────────────────────────────────────────────────────────────── */
html[data-client="disorder"] .tbw-side { background: #000000; border-right: 1px solid var(--tb-line); }
html[data-client="disorder"] .tbw-side .tbw-brand img { height: 34px; width: auto; }
html[data-client="disorder"] .tbw-topbar { background: rgba(0, 0, 0, .94); border-bottom: 1px solid var(--tb-line); }
html[data-client="disorder"] .tbw-topbar .tbw-brand img { height: 32px; width: 32px; }
html[data-client="disorder"] .tbw-avatar { background: var(--tb-bolt); color: #000000; border-radius: 0; }
html[data-client="disorder"] .tbw-signout:hover,
html[data-client="disorder"] .tb-white .navlist a:hover,
html[data-client="disorder"] .tb-white .navlist button:hover { background: rgba(255, 255, 255, .07); }
html[data-client="disorder"] .tb-white .navlist [aria-current="page"] { background: #141414; color: var(--tb-ink); box-shadow: none; }
html[data-client="disorder"] .tbw-iconbtn { background: #000000; border-color: var(--tb-line-2); color: var(--tb-ink); }
html[data-client="disorder"] .tbw-iconbtn:hover { background: #141414; }
html[data-client="disorder"] #sidebar-overlay,
html[data-client="disorder"] .tb-white dialog::backdrop { background: rgba(0, 0, 0, .72); }
html[data-client="disorder"] .tbw-side.open { box-shadow: 0 0 0 1px var(--tb-line); }
html[data-client="disorder"] .tb-white .tb-bottom-nav { background: #000000; border-top: 1px solid var(--tb-line); }

/* ── light text that sat on the dark ink: now dark text on the light ink ─────
      (every rule of the website that writes white on var(--tb-ink) by hand; a test reads the sheets and the editor
      templates for such a rule and fails when one is missing here) */
html[data-client="disorder"] .tb-white .tb-skip-link,
html[data-client="disorder"] .tb-white .pill-ink,
html[data-client="disorder"] .tb-white.tb-client .navlist .count,
html[data-client="disorder"] .tb-white.tb-client .tb-bottom-nav .count,
html[data-client="disorder"] .tb-white .tb-msg-user,
html[data-client="disorder"] .tb-white .sc-listen,
html[data-client="disorder"] .tb-white .badge-ppp,
html[data-client="disorder"] .tbh-step .mark.done,
html[data-client="disorder"] .tbb-chips a[aria-checked="true"],
html[data-client="disorder"] .tba-genres label:has(input:checked),
html[data-client="disorder"] .tba-accounts a[aria-current="page"] { color: #000000; }
html[data-client="disorder"] .tbb-chips a[aria-checked="true"] *,
html[data-client="disorder"] .tba-accounts a[aria-current="page"] *,
html[data-client="disorder"] .tba-genres label:has(input:checked) * { color: #000000; }
html[data-client="disorder"] .btn.tbst-bad-solid { color: #000000; }
/* a code to scan stays black on white */
html[data-client="disorder"] .tbsc-qr img { background: #FFFFFF; }
/* the selected segment of a switch: a light bar on the dark track */
html[data-client="disorder"] .tbh-seg button[aria-pressed="true"] { background: var(--tb-ink); color: #000000; box-shadow: none; }

/* ── square corners everywhere: Disorder's system is bars and thin lines ──── */
html[data-client="disorder"] .tb-white *,
html[data-client="disorder"] .tb-white *::before,
html[data-client="disorder"] .tb-white *::after,
html[data-client="disorder"] .tb-toast,
html[data-client="disorder"] dialog { border-radius: 0 !important; }

/* ── buttons ────────────────────────────────────────────────────────────────── */
html[data-client="disorder"] .tb-white .btn { border-radius: 0; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; font-size: 14px; }
html[data-client="disorder"] .tb-white .btn-primary { background: var(--tb-bolt); color: #000000; }
html[data-client="disorder"] .tb-white .btn-primary:hover { background: var(--tb-bolt-hi); color: #000000; }
html[data-client="disorder"] .tb-white .btn-outline { background: #000000; color: var(--tb-ink); border-color: var(--tb-ink); }
html[data-client="disorder"] .tb-white .btn-outline:hover { background: var(--tb-bolt); border-color: var(--tb-bolt); color: #000000; }
html[data-client="disorder"] .tb-white :focus-visible { outline: 2px solid var(--tb-bolt); outline-offset: 3px; border-radius: 0; }

/* ── fields ─────────────────────────────────────────────────────────────────── */
html[data-client="disorder"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-client="disorder"] select,
html[data-client="disorder"] textarea {
  background: #0A0A0A; color: var(--tb-ink); border-color: #6E6E6E; border-radius: 0;
}
html[data-client="disorder"] input::placeholder,
html[data-client="disorder"] textarea::placeholder { color: #7E7E7E; }
html[data-client="disorder"] input:focus,
html[data-client="disorder"] select:focus,
html[data-client="disorder"] textarea:focus { border-color: var(--tb-bolt); outline: none; }
html[data-client="disorder"] input[type="checkbox"],
html[data-client="disorder"] input[type="radio"] { accent-color: #FFFF92; }

/* ── cards, pills, dialogs, skeletons ───────────────────────────────────────── */
html[data-client="disorder"] .tbc-card,
html[data-client="disorder"] .tbhp-card { border-radius: 0; }
html[data-client="disorder"] .tb-white .pill { border-radius: 0; text-transform: uppercase; letter-spacing: 0.06em; }
html[data-client="disorder"] .tb-white dialog { background: #0A0A0A; color: var(--tb-ink); border: 1px solid var(--tb-line-2); border-radius: 0; }
html[data-client="disorder"] .tb-white .skeleton::after { background: linear-gradient(90deg, transparent 0%, #1F1F1F 50%, transparent 100%); }
html[data-client="disorder"] .tb-toast { border-radius: 0; }

/* ── links in running text ──────────────────────────────────────────────────── */
/* (:where keeps this rule weaker than every repair above: a selected chip is a link without a class too) */
html[data-client="disorder"] .tb-white a:where(:not(.btn):not([class])) { color: var(--tb-ink); text-decoration-color: var(--tb-bolt); }

/* ── the signed-out pages (sign-in, sign-up, the notices): the public shell in Disorder's colours ── */
html[data-client="disorder"] .tb-site-header { background: rgba(0, 0, 0, .94); border-bottom: 1px solid var(--tb-line); }
html[data-client="disorder"] .tb-logo .tb-logo-lockup { height: 36px; width: auto; }
html[data-client="disorder"] .tb-logo .tb-logo-mark { height: 32px; width: 32px; }
html[data-client="disorder"] .tb-btn { border-radius: 0; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
/* the page's one main button is the accent, as in the editor pages */
html[data-client="disorder"] .tb-btn-black { background: var(--tb-bolt); color: #000000; border-color: var(--tb-bolt); }
html[data-client="disorder"] .tb-btn-black:hover { background: var(--tb-bolt-hi); border-color: var(--tb-bolt-hi); color: #000000; }
html[data-client="disorder"] .tb-btn-yellow { background: var(--tb-bolt); color: #000000; }
html[data-client="disorder"] .tb-btn-outline { background: #000000; color: var(--tb-ink); border-color: var(--tb-ink); }
html[data-client="disorder"] .tb-btn-outline:hover { background: var(--tb-bolt); border-color: var(--tb-bolt); color: #000000; }
html[data-client="disorder"] .tbp h1 { font-weight: 500; text-transform: uppercase; letter-spacing: 0; }
html[data-client="disorder"] .tbp *,
html[data-client="disorder"] .tb-site-header *,
html[data-client="disorder"] .tb-mobile-menu *,
html[data-client="disorder"] .landing-footer * { border-radius: 0 !important; }
html[data-client="disorder"] .landing-footer { background: #000000; border-top: 1px solid var(--tb-line); }
/* TrackBounty's own bolt is not Disorder's mark: the small glyph before a label, and the one inside a button */
html[data-client="disorder"] .tbp-bolt,
html[data-client="disorder"] svg.tb-bolt { display: none; }

/* ── the public layer's colours written by hand (components.css, the .tbp parts; a test reads that sheet too) ──
      white on the ink colour: now black on the light ink */
html[data-client="disorder"] .tb-skip,
html[data-client="disorder"] .tb-skip:hover,
html[data-client="disorder"] .wiz-skip,
html[data-client="disorder"] .tbp-pv.tbp-k,
html[data-client="disorder"] .tbp-tip,
html[data-client="disorder"] .tbp-tip small,
html[data-client="disorder"] .tbp-seg button[aria-pressed="true"],
html[data-client="disorder"] .tbp-modes button[aria-pressed="true"],
html[data-client="disorder"] .tbp-filters button[aria-pressed="true"],
html[data-client="disorder"] .notif-toast.notif-toast-white { color: #000000; }
/* a band on the ink colour: a tinted band with light text */
html[data-client="disorder"] .tbp-band { background: var(--tb-tint); color: var(--tb-ink); }
html[data-client="disorder"] .tbp-band h2 { color: var(--tb-ink); }
html[data-client="disorder"] .tbp-band p { color: var(--tb-ink-2); }
/* a white box written by hand: a black or near-black box */
html[data-client="disorder"] .tbp-chips button,
html[data-client="disorder"] .tbp-seg button,
html[data-client="disorder"] .tbp-modes button,
html[data-client="disorder"] .tbp-filters button,
html[data-client="disorder"] .tbp-pv.tbp-o,
html[data-client="disorder"] .tbp-cmp input::before { background: #000000; }
html[data-client="disorder"] .tbp-how[open] .tbp-how-in,
html[data-client="disorder"] .tbp-sheet,
html[data-client="disorder"] .tbp-chart-dlg,
html[data-client="disorder"] .tbp-browser-screen,
html[data-client="disorder"] .tbp-compo .tbp-screen { background: #0A0A0A; color: var(--tb-ink); }
html[data-client="disorder"] .tbp-sheet,
html[data-client="disorder"] .tbp-chart-dlg { border: 1px solid var(--tb-line-2); }
html[data-client="disorder"] .tbp-toast { background: var(--tb-ink); color: #000000; }
html[data-client="disorder"] .tbp-spinner { border-color: rgba(0, 0, 0, .3); border-top-color: #000000; }
/* the states: each with its own dark background and its own colour */
html[data-client="disorder"] .tbp-status.tbp-ok { border-color: var(--tb-ok); background: var(--tb-ok-bg); }
html[data-client="disorder"] .tbp-status.tbp-warn { border-color: var(--tb-hold); background: var(--tb-hold-bg); }
html[data-client="disorder"] .tbp-status.tbp-bad { border-color: var(--tb-bad); background: var(--tb-bad-bg); }
html[data-client="disorder"] .tbp-pill.tbp-ok { background: var(--tb-ok-bg); color: var(--tb-ok); }
html[data-client="disorder"] .tbp-pill.tbp-hold,
html[data-client="disorder"] .tbp-tag-ill { background: var(--tb-hold-bg); color: var(--tb-hold); }
html[data-client="disorder"] .tbp-pill.tbp-no { background: var(--tb-bad-bg); color: var(--tb-bad); }
html[data-client="disorder"] .tbp-pill.tbp-paid { background: var(--tb-neutral-bg); color: var(--tb-ink-2); }
html[data-client="disorder"] .tbp-status-row i { background: var(--tb-ok); }
html[data-client="disorder"] .tbp-delta.tbp-up { color: var(--tb-ok); }
html[data-client="disorder"] .tbp-delta.tbp-down,
html[data-client="disorder"] .tbp-err { color: var(--tb-bad); }
html[data-client="disorder"] .tbp-field.is-error input,
html[data-client="disorder"] .tbp-field.is-error select,
html[data-client="disorder"] .tbp-field.is-error textarea { border-color: var(--tb-bad); }

/* ── the legal texts: the words are TrackBounty LTD's and stay; the sheet they stand on follows the look ── */
html[data-client="disorder"] .tbp-legal { background: #000000; color: var(--tb-ink); }
html[data-client="disorder"] .tbp-legal .legal-callout { background: var(--tb-tint); color: var(--tb-ink); }
html[data-client="disorder"] .tbp-legal .legal-content .legal-version { background: var(--tb-neutral-bg); color: var(--tb-ink-2); }

/* ── the two error pages: they carry their colours by hand so that they render when nothing else does (and they
      still do when this sheet cannot be fetched: white with dark text). With the sheet: Disorder's colours, and
      TrackBounty's mark and bolt left out. Only those two pages have the mark as the first child of main. ── */
html[data-client="disorder"] main:has(> svg.mark) h1,
html[data-client="disorder"] main:has(> svg.mark) .eyebrow,
html[data-client="disorder"] main:has(> svg.mark) a,
html[data-client="disorder"] main:has(> svg.mark) strong { color: #EDEDED; }
html[data-client="disorder"] main:has(> svg.mark) h1 { font-weight: 500; text-transform: uppercase; letter-spacing: 0; }
html[data-client="disorder"] main:has(> svg.mark) .lede { color: #BDBDBD; }
html[data-client="disorder"] main:has(> svg.mark) .support,
html[data-client="disorder"] main:has(> svg.mark) .ref { color: #8C8C8C; }
html[data-client="disorder"] main:has(> svg.mark) nav { border-top-color: #FFFF92; }
html[data-client="disorder"] main:has(> svg.mark) a:focus-visible { outline-color: #FFFF92; border-radius: 0; }
html[data-client="disorder"] main:has(> svg.mark) > svg.mark,
html[data-client="disorder"] main:has(> svg.mark) .eyebrow svg { display: none; }

/* ── what a client address does not show (spec, section 6) ────────────────────
      web/client_look.py marks a link that leads to a page outside the client's address (data-elsewhere="page")
      and a link the look switches off (data-elsewhere="off"). The link goes, and with it the sentence, the menu
      or the column that only existed for it. */
html[data-client="disorder"] a[data-elsewhere],
html[data-client="disorder"] .tb-nav,
html[data-client="disorder"] .tb-menu-btn,
html[data-client="disorder"] .tb-mobile-menu > a,
html[data-client="disorder"] .tb-footer-brand p,
html[data-client="disorder"] .footer-col:not(:has(a:not([data-elsewhere]))),
html[data-client="disorder"] .tbp-join-alt span:has(a[data-elsewhere="page"]),
html[data-client="disorder"] .tbp p:has(a[data-elsewhere="page"]),
html[data-client="disorder"] .tbp span:has(> a[data-elsewhere="page"]),
html[data-client="disorder"] .navlist a[href="/dashboard/pricing"] { display: none !important; }
