/* Field OS — readable in a parking lot at noon and in a dark core at 6pm.
   ------------------------------------------------------------------------
   The brand palette is unchanged: Charcoal #222222 ground, Electric Blue #007BFF for action,
   Signal Green #28A745 for good. What changes is CONTRAST and SIZE, because the guide was
   written for print and a screen held in sunlight is not paper.

   The measured problem (WCAG 2.1 contrast on #222222):
     Tungsten #6C757D  3.36:1   — the colour of nearly every label, caption and secondary line
     Electric Blue #007BFF  4.02:1 — as TEXT (as a fill behind white it is fine)
   Under 4.5:1 is below the readable floor for body text indoors; in direct sun, where the
   screen's own light competes with daylight, the effective contrast collapses further. Add
   8.5–10px type with wide letter-spacing and the small print simply disappears outside.

   So:
     - the Tungsten *token* is re-pointed to a lighter grey of the same hue for TEXT (9.0:1),
       and borders/rules lift with it. Fills, chips and brand marks keep the brand values.
     - NOTHING that carries a word renders under 13px. 543 selectors across the 65 pages set type
       smaller than that; ops/gen-display-overrides.py reads them out of the pages and re-declares
       them at the floor, so a new page cannot quietly reintroduce 9px labels.
     - three modes, on a chip in the bar (nav.js → display.js), remembered per device:
         AUTO   the tuned default above
         SUN    maximum contrast — white text, heavier weight, solid chips, firm borders
         NIGHT  glare cut — no pure white on black (halation in a dark room is what makes
                text bloom and shimmer), softer accents, same layout
   Sizes are px because the pages are px; a text-size bump in iOS Settings still applies on top.
*/

:root {
  /* text on the charcoal ground */
  --fv-ink: #ffffff;
  /* CEO, 09-23, third pass: "no gray text — it needs to be just white, bright text." A label is
     either worth reading, and then it is white, or it does not belong on the screen. Hierarchy is
     carried by size, weight and spacing from here on, never by dimming the words. */
  --fv-ink-2: #FFFFFF;            /* 17.7:1 on #222 */
  --fv-ink-3: #F2F5F7;            /* placeholders only — the one thing that must read as "not typed yet" */
  --fv-accent-text: #9CCBFF;      /* Electric Blue as TEXT, bright enough to read at arm's length (10.4:1) */
  --fv-good-text: #8CEFB3;
  --fv-warn-text: #FFDD8A;
  --fv-bad-text: #FFB3AC;
  /* Every page declares these in its own <style>; ours is the same token, moved to a readable
     value. !important because a page's inline <style> block loads after this file. */
  --tungsten: #FFFFFF !important;
  --line: rgba(255, 255, 255, 0.24) !important;
}

/* ---- size floor: nothing that carries a word is under 13px ---- */
.src, .cfnote, .cknote, .foot, .note, .hint, .chint { font-size: 13.5px !important; line-height: 1.6 !important; }
.kpi small, .kpi .d, .row small, .m, .s small, small, .sub, .meta { font-size: 13px !important; }
.tag, .via, .ckst, .pill, .badge, .chip, .bnkinst, .ckgrp, .pk-title, .ttl { font-size: 13px !important; letter-spacing: .05em !important; }
th, .cftab th, .bktab th, .tab th { font-size: 13px !important; letter-spacing: .04em !important; }
label, .lbl { font-size: 13px !important; }
.ts, .when { font-size: 13px !important; }

/* Body copy is the thing people read longest; 13px is a phone minimum, not a target. */
body { font-size: 15px; line-height: 1.55; }
/* Text dimmed with opacity reads as smudged rather than quiet — say it with colour instead. */
[style*="opacity:.5"], [style*="opacity: .5"], [style*="opacity:0.5"], [style*="opacity: 0.5"],
[style*="opacity:.6"], [style*="opacity: .6"], [style*="opacity:0.6"], [style*="opacity: 0.6"],
[style*="opacity:.7"], [style*="opacity: .7"] { opacity: .9 !important; }

/* ---- weight: thin type is the first thing sunlight eats ---- */
.src, .cfnote, .cknote, small, .kpi .d, .row small, .ts { font-weight: 500 !important; }
button, .btn, .newbtn, .bkbtn, .abtn, .chip, select, input, textarea { font-weight: 600; }
.tag, .via, .ckst, .pill, .badge, .bnkinst, .ckgrp, th { font-weight: 800 !important; }

/* ---- colour: anything that was Tungsten now reads at 9:1; links lift off the ground ---- */
.src, .cfnote, .cknote, .kpi small, .kpi .d, .row small, small, th, label, .ts { color: var(--fv-ink-2) !important; }
a:not(.chip):not(.btn):not(.newbtn):not(.bkbtn) { color: var(--fv-accent-text); }
/* the greys that were hard-coded past the token, one class of fix for the whole platform */
[style*="color:#6C757D"], [style*="color: #6C757D"],
[style*="color:#6c757d"], [style*="color: #6c757d"] { color: var(--fv-ink-2) !important; }
[style*="color:#8bc4ff"], [style*="color: #8bc4ff"] { color: var(--fv-accent-text) !important; }
/* A browser rewrites an inline style into rgb() form, so the hex selectors above never match what
   JavaScript painted — these do. Every grey the nav, the pickers and the panels set by hand. */
[style*="rgb(108, 117, 125)"],   /* #6C757D Tungsten */
[style*="rgb(154, 163, 171)"], [style*="rgb(154, 163, 173)"], [style*="rgb(154, 160, 166)"],
[style*="rgb(138, 138, 138)"], [style*="rgb(136, 136, 136)"], [style*="rgb(119, 119, 119)"],
[style*="rgb(111, 119, 125)"], [style*="rgb(125, 132, 138)"], [style*="rgb(93, 101, 107)"] {
  color: var(--fv-ink-2) !important;
}
[style*="rgb(139, 196, 255)"] { color: var(--fv-accent-text) !important; }

/* Counters and status pills are the smallest thing on a busy screen and the most likely to be
   glanced at from arm's length: give them the same floor as everything else. */
.ucount, .udot, .badge, .count, .pillnum { font-size: 13px !important; font-weight: 800 !important; }
/* White on the light blue measured 3.3:1 — the count of what is new should not be the least
   readable thing on the page. */
.ucount { color: #fff !important; background: #0A62C8 !important; }

/* Status colours are read at a glance from a ladder: the muted versions go too. */
.up, .posv, .good { color: var(--fv-good-text) !important; }
.bad, .neg, .err, .late { color: var(--fv-bad-text) !important; }
.warn, .pend { color: var(--fv-warn-text) !important; }

/* ---- edges: a hairline at 10% white is invisible outdoors ---- */
.card, .kpi, .row, .rfi, .tab td, .cftab td, .bktab td { border-color: rgba(255, 255, 255, 0.20); }
.rule { height: 3px !important; }

/* Electric Blue is a fill colour. As TEXT on charcoal it measures 4.0:1, so every blue button
   label, link and action lifts to the readable blue instead. */
/* A button carries its own ground, so its label is white — the lifted blue is for text sitting
   directly on the charcoal (links, inline actions), where white would look like body copy. */
button, .btn, .newbtn, .bkbtn, .abtn, .sbtn, .csend, input[type="submit"] { color: #fff !important; }
.tact, .act, .link, .more, .back, a.attc { color: var(--fv-accent-text) !important; }
.newbtn, .bkbtn { border-color: rgba(156, 203, 255, .6) !important; }

/* ---- controls: bigger targets, firmer outlines, and a focus ring you can see ---- */
input, select, textarea, button { font-size: 15px; }
input, select, textarea { border-color: rgba(255, 255, 255, 0.28) !important; }
:focus-visible { outline: 3px solid #8FC6FF !important; outline-offset: 2px !important; }

/* ================= SUN — direct daylight ================= */
:root[data-display="sun"] {
  --tungsten: #FFFFFF !important;         /* 17.7:1 — as far as this ground goes */
  --line: rgba(255, 255, 255, 0.34) !important;
  --fv-ink-2: #FFFFFF;
  --fv-ink-3: #EDF1F4;
  --fv-accent-text: #A9D2FF;
}
:root[data-display="sun"] body { -webkit-font-smoothing: antialiased; }
:root[data-display="sun"] .src, :root[data-display="sun"] .cfnote, :root[data-display="sun"] .cknote,
:root[data-display="sun"] small, :root[data-display="sun"] .kpi .d, :root[data-display="sun"] .row small {
  color: #FFFFFF !important; font-weight: 600 !important; font-size: 14.5px !important;
}
:root[data-display="sun"] .tag, :root[data-display="sun"] .via, :root[data-display="sun"] .ckst,
:root[data-display="sun"] .pill, :root[data-display="sun"] .badge { font-size: 13.5px !important; }
/* translucent chips wash out against a bright screen — give them a solid ground */
:root[data-display="sun"] .chip { background: rgba(255, 255, 255, 0.16) !important; color: #fff !important; border-color: rgba(255, 255, 255, 0.4) !important; }
:root[data-display="sun"] .chip.on { background: #0A6FE0 !important; border-color: #8FC6FF !important; color: #fff !important; }
:root[data-display="sun"] .card, :root[data-display="sun"] .kpi { border-color: rgba(255, 255, 255, 0.34) !important; }
:root[data-display="sun"] .btn, :root[data-display="sun"] .newbtn, :root[data-display="sun"] .bkbtn { border-width: 1.5px !important; font-weight: 800 !important; }
:root[data-display="sun"] .bad, :root[data-display="sun"] .neg { color: #FFB3AC !important; }
:root[data-display="sun"] .up, :root[data-display="sun"] .posv { color: #8CEFB3 !important; }
:root[data-display="sun"] .warn { color: #FFDD8A !important; }

/* ================= NIGHT — dark interiors ================= */
/* Pure white on near-black blooms (halation) and leaves an after-image when you look up at a
   ceiling grid. Everything steps down together so the page keeps its shape. */
:root[data-display="night"] {
  --tungsten: #F2F5F7 !important;         /* still white to read; NIGHT dims images and fills, never words */
  --line: rgba(255, 255, 255, 0.18) !important;
  --fv-ink: #F5F7F9;
  --fv-ink-2: #F2F5F7;
  --fv-accent-text: #8FC6FF;
}
:root[data-display="night"] body { color: #F5F7F9; }
:root[data-display="night"] h1, :root[data-display="night"] h2, :root[data-display="night"] h3,
:root[data-display="night"] b, :root[data-display="night"] .num, :root[data-display="night"] .v { color: #F5F7F9 !important; }
:root[data-display="night"] .src, :root[data-display="night"] .cfnote, :root[data-display="night"] .cknote,
:root[data-display="night"] small, :root[data-display="night"] .kpi .d { color: #F2F5F7 !important; }
:root[data-display="night"] img, :root[data-display="night"] video, :root[data-display="night"] canvas { filter: brightness(0.88); }
:root[data-display="night"] .chip.on { background: rgba(0, 123, 255, 0.22) !important; }
:root[data-display="night"] .btn, :root[data-display="night"] .newbtn { filter: brightness(0.92); }
:root[data-display="night"] .up, :root[data-display="night"] .posv { color: #78C99A !important; }
:root[data-display="night"] .bad, :root[data-display="night"] .neg { color: #E89A93 !important; }

/* ---- the mode chip itself (nav bar) ---- */
#fv-display { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px; padding: 6px 11px; margin-left: 4px; background: transparent; color: #C9D1D8;
  font-family: inherit; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
#fv-display:hover { border-color: rgba(255,255,255,.4); color: #fff; }
:root[data-display="sun"] #fv-display { background: rgba(255,210,100,.18); border-color: rgba(255,210,100,.6); color: #FFDD8A; }
:root[data-display="night"] #fv-display { background: rgba(0,123,255,.16); border-color: rgba(111,182,255,.5); color: #9CC9FF; }

/* Someone who has asked iOS for bolder or higher-contrast text gets it everywhere here too. */
@media (prefers-contrast: more) {
  :root { --tungsten: #EDF1F4 !important; --line: rgba(255,255,255,.34) !important; }
  .src, .cfnote, .cknote, small { color: #EDF1F4 !important; font-weight: 600 !important; }
}

/* ==== BEGIN generated overrides (ops/gen-display-overrides.py) ==== */
/* 543 selectors set type below 13px across the pages; the floor wins. */
#asbar span,
#consent,
#lbmeta .k,
#modal label,
#sheet .sub,
#upstatus,
#vhead .t,
#who p,
.abtn,
.acc td,
.acc th,
.act,
.act .d,
.act.big,
.aday .ev span,
.aday h3,
.age,
.answered,
.aprx,
.archhd,
.ask p,
.asof,
.assign .hint,
.assignbar b.t,
.assignbar select,
.att .m,
.att .n,
.att a,
.attached a,
.attc,
.attc.slim,
.attitem,
.attnote,
.attzone,
.ava,
.back,
.badge,
.band,
.banner,
.banner small,
.bar .amt small,
.bigbtn,
.binrow,
.bkact .when,
.bkbar input,
.bkbar label,
.bkbar select,
.bkbtn,
.bkhead small,
.bkmsg,
.bktab,
.bktab th,
.blocker,
.bnkcmp,
.bnkinst,
.bnkrow,
.bnkrow .av,
.bnkrow small,
.bnkrow.bnkhd,
.board td.un,
.board td.un small,
.board th,
.bot .purpose,
.bot .sub,
.box,
.brand,
.brief h3,
.btn,
.btn.sm,
.bub .by,
.bub .ts,
.bub .who,
.bucks,
.c-site,
.c-state small,
.c-timer small,
.cam,
.card h2,
.card h3,
.card small,
.cell,
.cell .d,
.cell .sub,
.cell .who small,
.cell b,
.cell i,
.cell u,
.cfnote,
.cftab,
.cftab th,
.chint,
.chip,
.chip.pend,
.chip2,
.chipmat,
.ckgrp,
.cknote,
.ckrow,
.ckrow .t,
.ckrow small,
.ckst,
.cktile .n,
.cnote,
.co-note,
.col .blurb,
.col .none,
.col > .h b,
.col > .h em,
.col > .h i,
.comp,
.comp .desc,
.comp .prize,
.consulted,
.count,
.cov,
.coverbar button,
.crew .note,
.crew-pill b,
.crew-pill small,
.crit .ce,
.crit .cs,
.crit .ct,
.crit .mark,
.crumb,
.ctool,
.d-date small,
.d-hrs small,
.d-mid,
.dangerbtn,
.dateinp,
.dec .dm,
.dec .dp,
.dec .dq,
.dec .dr,
.dec .tag2,
.decform input,
.decform label,
.decform textarea,
.delta,
.demo-pill b,
.demo-pill small,
.dhead .s,
.diff pre,
.dlv,
.dn,
.doc .m,
.doc a,
.dow,
.drop,
.drop select,
.due,
.dup,
.edithist,
.empty,
.epin .eb,
.err,
.ev,
.ev b,
.ev small,
.ev span,
.ev time,
.ext small,
.eyebrow,
.face .cam,
.fact small,
.fbox,
.fbox .noteic,
.fbox .pcttx,
.fchip,
.file,
.file .rm,
.file .sz,
.find,
.flag,
.fld small,
.fnote,
.fold,
.foot,
.foot-in,
.form label,
.frow label,
.gate h4,
.gate p,
.ghead .m,
.ghead a,
.go,
.grid,
.grid th,
.grow .lbl,
.grp,
.hero .ot,
.hero .sub,
.hero .t small,
.hint,
.holder,
.home-link,
.inv .who small,
.item .m,
.item .s,
.jump a,
.kind,
.kpi .d,
.kpi .sub,
.kpi .u,
.kpi em,
.kpi small,
.kv .sub,
.kv small,
.lang b,
.langs,
.langs button,
.lbl,
.lead,
.lede,
.leg,
.legend,
.lg,
.lineedit td input,
.live,
.livechip,
.lk,
.ln .sp,
.ln-h .qt,
.ln-h .tg,
.lockchip,
.log,
.lvl .ln small,
.lvlbadge small,
.lvltab,
.mail,
.mark,
.matbox .sub,
.mchip,
.mcount,
.mediagrid .mby,
.met small,
.meta,
.mini,
.mod .st,
.mod .t small,
.mod .v,
.modetile small,
.mono,
.months span,
.more,
.mpin .mb,
.ms,
.ms .why,
.msg,
.muted,
.mv,
.n .ast,
.n .who em,
.n .who i.mono,
.n .who img,
.n b,
.n i.tr,
.n small.h,
.nbbtn,
.newbtn,
.nm small,
.none,
.note,
.note .nb,
.note .nt,
.obtn,
.offlbl,
.ok,
.opt .rk,
.opt .t,
.opt .w,
.opt small,
.orow .lbl,
.orow .pct,
.other .r,
.out,
.out button,
.p-id .role,
.pbig i.mono,
.pbig img,
.pbig small,
.pcard .bl,
.pcard .m,
.pcard .o,
.pchip em,
.pchip i.mono,
.pchip img,
.pchip s,
.pct,
.pdt .cap,
.pend span,
.person small,
.ph,
.ph .n small,
.ph .seq,
.ph .t,
.ph .tag,
.ph .w,
.ph .why,
.pick,
.pill,
.pk-hd,
.pk-title,
.planctl .ttl,
.pmsg .empty,
.pnum,
.po .m,
.po .r,
.po-hd .id,
.po-hd .p,
.prem,
.prem .pe,
.prem .ps,
.proj,
.proj .ad,
.prop .m,
.prop .noimg,
.prop input.note,
.pt,
.pt .ta,
.pt .tc,
.pt .tr,
.punch,
.q .qs,
.race .who small,
.rcard .rl,
.rcard .rs,
.read h3,
.read ul,
.rec,
.receipt .meta,
.recnote,
.recstat,
.reg .of,
.reg small,
.regcount,
.regnone,
.rel b,
.rel small,
.replybox textarea,
.replyhint,
.rfi .m,
.rfi .r,
.ring .v small,
.roborow,
.role,
.row,
.row .l .s,
.row .m,
.row .r,
.row .sub,
.row .txt small,
.row small,
.rowh,
.rowh small,
.rule,
.run,
.rung,
.rung b,
.rungnote,
.runlink,
.saved,
.sbtn,
.seal b,
.seal small,
.season,
.seatrow .t,
.sec,
.sec .m,
.sec .snip,
.sec-h .n,
.sec-h .t,
.sec-h .who,
.sect,
.sedit .msg,
.sedit h4,
.seg button,
.sel,
.sgear,
.shield b,
.shield small,
.shot,
.shot small,
.sig,
.signin .btn,
.signin .link,
.signin .say,
.signin label,
.smsbar,
.smsst,
.soon,
.spg input,
.spg span,
.src,
.st,
.st .n,
.st .nm,
.st .sub,
.st .v,
.st .w,
.st b,
.stagebox select,
.stagebox small,
.stallnote,
.stamp,
.stat,
.stat .k,
.state,
.stg,
.stg .n small,
.stg .v,
.stg .why,
.stop,
.stop:before,
.sub,
.subwarn,
.sug,
.tab,
.tab th,
.tab tr.det td,
.tab tr.grp td,
.tab tr.tot td,
.tabs .tab-link,
.tabs button,
.tact,
.tag,
.tagx,
.task,
.tbtn,
.tclock button,
.tclock small,
.tcnag .go,
.tcnag small,
.team .lead-lbl,
.team .owns,
.team input.addm,
.team select,
.terms div small,
.terms div span,
.tgt .lbl,
.tick-run span,
.tick-tag,
.ticker h2,
.tile .d,
.tile small,
.tk,
.tk .ref,
.tk .tph,
.tk .tw,
.tk .who,
.tl .today small,
.tline,
.tline .t,
.tline .w,
.tr,
.tr-chip small,
.trail,
.tv,
.u-chev,
.u-meta .t,
.u-sub,
.uchip,
.ucount,
.uhot .cnt,
.unit,
.ut b,
.ut small,
.vadd h3,
.vbtn,
.vchip,
.ver .vs,
.ver .vw,
.verb,
.verdict small,
.vh,
.vh i,
.vhead .sub,
.via,
.viewonly,
.vopt.add,
.vopt.none,
.vrd,
.vrow .ev,
.vrow .m,
.vrow .r,
.vrow .st,
.vrow .vm,
.vrow .vo,
.vs .sd small,
.vtitle .m,
.warn,
.watching,
.watchnote,
.weekbar .lbl small,
.wform input,
.wform label,
.wform select,
.wfrow,
.wfrow small,
.who,
.who .nm,
.who .rl,
.who b,
.who button,
.why,
.wordmark small,
.wpill,
.wpin .bub,
.xp .row b,
.xr .ans,
.xr .ask,
.xr .meta,
.xr .rnd,
.xr.open .waiting,
.zc button.w,
a.mod .t b:after,
button,
details summary,
footer,
h1,
h1 small,
h2,
input,
input.f,
input.lvlin,
input[type=password],
input[type=text],
label,
label.lb,
nav button,
p,
select,
select.f,
table,
table.g,
table.tab,
table.tab th,
td,
textarea,
th,
th .arrow,
tr.filters input,
tr.filters select { font-size: 13px !important; }
/* 28 selectors paint a mid grey on the dark ground; they read at 11:1 instead. */
.attzone,
.chint,
.consulted,
.crit .cs,
.crit .mark,
.crumb span,
.csend:disabled,
.dec .dm,
.opt .rk,
.pbig i.mono,
.pbig img,
.pchip i.mono,
.pchip img,
.prem .pe,
.prem .ps,
.replyhint,
.t-in_progress,
.t-na,
.t-no_checklist,
.t-pending,
.t-spot,
.t-unseen,
.tag.closed,
.tag.draft,
.tag.oh,
.vrow .vm,
.xr .meta,
.xr .rnd { color: var(--fv-ink-2) !important; }
.composer textarea::placeholder { color: var(--fv-ink-3) !important; }
/* ==== END generated overrides ==== */
