/* The WriteUp look (Jordan, 30 Oct 2026): "the theme and styling more like WriteUp: the colouring, the way the tables
   and the buttons look". A third look beside light and dark, chosen in the menu under your name; nothing here applies
   unless data-theme="writeup". Its colours are WriteUp's own (lib/views.js there): charcoal #16171b ground, flat
   #1e2026 panels with a #343843 line, #262933 raised rows and fields, amber #b45309 for primary actions and the current
   page, #e2a86a amber for links and flags, the system font, 14px cards and 9px controls. The contrast lifts are the
   ones the Campaigns WriteUp skin made: faint ink #8e939d, primary hover #bc580a. Every colour is a token in the one
   block below; the rules after it use only those tokens. */
:root[data-theme="writeup"] {
  color-scheme: dark;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; --serif: var(--sans);
  --r-card: 14px; --r-ctl: 9px; --r-in: 9px; --r-page: 14px;
  --bg: #16171b; --surface: #1e2026; --surface-2: #262933; --hairline: #343843; --ctrl: #8e939d;
  --ink: #eceef2; --ink-2: #b4b8c1; --ink-3: #8e939d; --primary: #b45309; --on-primary: #ffffff;
  --late: #df8a76; --their: #262933; --mark: #000000; --on-mark: #ffffff; --focus: #e2a86a;
  --need-bg: #231f19; --need-chip: #3a2d17; --need-ink: #e2a86a; --soon-bg: #231f19; --soon-line: #4a3a1e; --soon-ink: #e2a86a;
  --frame: #16171b; --frame-ink: #eceef2; --frame-muted: #9ea3ad; --frame-hover: #262933;
  --scrim: rgba(0, 0, 0, .6); --pop-shadow: 0 18px 60px rgba(0, 0, 0, .5);
  --page: #16171b; --panel: #1e2026; --panel-line: #343843; --tile: #262933; --summary: #262933;
  --t-title: 700 17px/24px var(--sans); --t-section: 700 18px/26px var(--sans); --t-figure: 700 28px/32px var(--sans); --t-h1: 700 26px/32px var(--sans);
  --k-test_drive: #5b9be0; --k-visit: #4fb37a; --k-closing: #a382e0; --k-delivery: #d4720f; --k-meeting: #8e939d; --k-busy: #5d616b;
  /* WriteUp's own extras. */
  --wu-raise: #2d313c; --wu-amber: #b45309; --wu-amber-hover: #bc580a; --wu-amber-soft: rgba(180, 83, 9, .16); --wu-amber-ring: rgba(180, 83, 9, .25);
  --wu-link: #e2a86a; --wu-link-line: rgba(226, 168, 106, .45); --wu-late-line: rgba(223, 138, 118, .55); --wu-on-amber: #ffffff;
  --wu-bar: linear-gradient(180deg, #1a1c22, #16171b); --wu-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}
:root[data-theme="writeup"] :is(p, li, dd, .sub) > a:not(.btn) { color: var(--wu-link); text-decoration-color: var(--wu-link-line); }
:root[data-theme="writeup"] .appbar { background: var(--wu-bar); border-bottom: 1px solid var(--hairline); }
:root[data-theme="writeup"] .side-nav { border-right: 1px solid var(--hairline); }
:root[data-theme="writeup"] .side-nav a[aria-current=page], :root[data-theme="writeup"] .side-nav summary.current,
:root[data-theme="writeup"] .side-nav details a[aria-current=page] { background: var(--wu-amber-soft); color: var(--wu-link); }

/* Buttons and fields: raised charcoal with a hairline, 9px corners; primary is solid amber with white text. */
:root[data-theme="writeup"] .btn { border: 1px solid var(--hairline); background: var(--surface-2); color: var(--ink); font-weight: 600; border-radius: 9px; }
:root[data-theme="writeup"] .btn:hover { background: var(--wu-raise); }
:root[data-theme="writeup"] .btn.primary, :root[data-theme="writeup"] a.btn.primary,
:root[data-theme="writeup"] .appbar .walkin, :root[data-theme="writeup"] .appbar .walkin:hover { background: var(--wu-amber); border-color: var(--wu-amber); color: var(--wu-on-amber); }
:root[data-theme="writeup"] .btn.primary:hover { background: var(--wu-amber-hover); border-color: var(--wu-amber-hover); }
:root[data-theme="writeup"] :is(input, select, textarea) { background: var(--surface-2); border-color: var(--hairline); color: var(--ink); border-radius: 9px; }
:root[data-theme="writeup"] :is(input, select, textarea):focus { outline: none; border-color: var(--wu-amber); box-shadow: 0 0 0 3px var(--wu-amber-ring); }
:root[data-theme="writeup"] :is(.section-tabs a[aria-current=page], .seg button[aria-pressed="true"], .dw-scope button[aria-pressed=true]) { background: var(--wu-amber-soft); color: var(--wu-link); }
:root[data-theme="writeup"] ::selection { background: var(--wu-amber); color: var(--wu-on-amber); }
:root[data-theme="writeup"] dialog { border: 1px solid var(--hairline); }

/* Tables: WriteUp's uppercase column labels, hairline rows that lift on hover. */
:root[data-theme="writeup"] .table th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }
:root[data-theme="writeup"] .table td { border-top-color: var(--hairline); }
:root[data-theme="writeup"] .table tbody tr:hover td { background: var(--surface-2); }

/* The dealer screens: 9px controls instead of the square 3px ones, amber for a chosen chip, uppercase box labels. */
:root[data-theme="writeup"] .dealer-workflow :is(.btn, input, select, textarea) { border-radius: 9px; }
:root[data-theme="writeup"] .dealer-workflow h1 { font-weight: 700; letter-spacing: -.2px; }
:root[data-theme="writeup"] .dealer-workflow .dw-chip { background: var(--surface-2); border-color: var(--hairline); border-radius: 9px; font-family: var(--sans); }
:root[data-theme="writeup"] .dealer-workflow .dw-chip[aria-pressed=true] { background: var(--wu-amber); border-color: var(--wu-amber); color: var(--wu-on-amber); }
:root[data-theme="writeup"] .dealer-workflow .dw-seg .btn { background: transparent; border: 0; }
:root[data-theme="writeup"] .dealer-workflow .dw-seg .btn[aria-pressed=true] { background: var(--wu-amber-soft); color: var(--wu-link); box-shadow: none; }
:root[data-theme="writeup"] :is(.dw-list, .dw-cal-wrap, .dw-cal-day) { background: var(--panel); border-color: var(--hairline); border-radius: 14px; }
:root[data-theme="writeup"] :is(.dw-row, .dw-done):hover { background: var(--surface-2); }
:root[data-theme="writeup"] .dw-box-head h2 { text-transform: uppercase; letter-spacing: .08em; font-size: 12px !important; color: var(--ink-2); }
:root[data-theme="writeup"] .dw-count { background: var(--surface-2); color: var(--ink-2); }
:root[data-theme="writeup"] .dw-icon { background: var(--surface-2); border-color: var(--hairline); border-radius: 9px; }
:root[data-theme="writeup"] .dw-icon:hover { background: var(--wu-amber); border-color: var(--wu-amber); color: var(--wu-on-amber); }
:root[data-theme="writeup"] .dw-actions.late .dw-icon { border-color: var(--wu-late-line); color: var(--late); }
:root[data-theme="writeup"] .dw-actions.late .dw-icon:hover { background: var(--late); color: var(--bg); }
:root[data-theme="writeup"] .dw-score { background: var(--surface-2); }
:root[data-theme="writeup"] .dw-bar i { background: var(--wu-amber); }
:root[data-theme="writeup"] .dw-ra-label { letter-spacing: .1em; color: var(--ink-3); }
:root[data-theme="writeup"] .dw-sheet.dw-modal { border: 1px solid var(--hairline); box-shadow: var(--wu-shadow); }
:root[data-theme="writeup"] :is(.dw-ra-head, .dealer-workflow .dw-ra > footer, .dw-cal-colhead, .dw-cal-corner, .dw-cal-gutter) { background: var(--panel); }
:root[data-theme="writeup"] .dw-cal-colhead.is-today strong { color: var(--wu-link); }
:root[data-theme="writeup"] :is(.dw-cal-now, .dw-cal-now::before) { background: var(--k-delivery); }
:root[data-theme="writeup"] .dw-invite:has(input:checked) { border-color: var(--wu-amber); background: var(--wu-amber-soft); }
:root[data-theme="writeup"] .dealer-workflow .dw-invite input { accent-color: var(--wu-amber); }
