/* JL field cards: shared look + 4 color themes (Midnight, Copper, Forest, Ice).
   Screen only; print stays plain white. theme.js sets <html data-theme> and shows the color dots.
   Edit the tokens at the top to change a theme. No layout or logic lives here. */
@media screen {
  /* ---------- tokens: MIDNIGHT (default) ---------- */
  :root {
    color-scheme: dark;
    --bg-base: #050911;
    --orb-a: rgba(37,99,235,.40); --orb-b: rgba(14,165,233,.22); --orb-c: rgba(79,70,229,.28);
    --hdr1: #0b1d4a; --hdr2: #14408a;
    --surface: rgba(14,24,44,.78); --surface2: rgba(24,40,72,.92); --edge: rgba(110,150,255,.26);
    --shadow: 0 12px 32px rgba(0,0,0,.55), inset 0 1px 0 rgba(160,190,255,.10);
    --ink: #f4f8ff; --muted: #b0bdd6; --title: #ffffff;
    --brand: #2f6df6; --brand2: #1b4fd8; --line: rgba(150,180,255,.20);
    --ok: #4ade80; --ok-bg: #15803d; --warn: #fbbf24; --danger: #f87171; --danger-bg: #dc2626;
    --tint-note: rgba(59,130,246,.20); --tint-warn: rgba(245,158,11,.20); --tint-danger: rgba(239,68,68,.22); --tint-ok: rgba(34,197,94,.20);
    --input-bg: rgba(6,12,26,.78); --input-edge: rgba(120,160,255,.34);
    --font-title: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --font-label: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --title-weight: 900; --label-spacing: .12em; --label-case: uppercase;
  }
  html[data-theme="copper"] {
    --bg-base: #0a0806;
    --orb-a: rgba(217,122,58,.30); --orb-b: rgba(150,70,30,.22); --orb-c: rgba(120,60,28,.26);
    --hdr1: #2a150a; --hdr2: #5e2d11;
    --surface: rgba(28,20,15,.80); --surface2: rgba(44,31,22,.94); --edge: rgba(217,130,70,.30);
    --shadow: 0 12px 32px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,200,150,.08);
    --ink: #f8f0e7; --muted: #c4b3a2; --title: #ffd9b8;
    --brand: #c8651f; --brand2: #a24e14; --line: rgba(230,160,100,.22);
    --ok: #6ee7a7; --ok-bg: #15803d; --warn: #fbbf24; --danger: #fb8a7a; --danger-bg: #d9482f;
    --tint-note: rgba(217,122,58,.18); --tint-warn: rgba(245,158,11,.20); --tint-danger: rgba(239,68,68,.22); --tint-ok: rgba(34,197,94,.18);
    --input-bg: rgba(12,8,5,.80); --input-edge: rgba(217,130,70,.36);
    --font-title: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --font-label: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --title-weight: 700; --label-spacing: .14em; --label-case: uppercase;
  }
  html[data-theme="forest"] {
    --bg-base: #040b08;
    --orb-a: rgba(16,185,129,.28); --orb-b: rgba(5,150,105,.20); --orb-c: rgba(20,184,166,.20);
    --hdr1: #07301f; --hdr2: #0d5a3b;
    --surface: rgba(11,27,21,.80); --surface2: rgba(18,42,33,.94); --edge: rgba(80,210,160,.28);
    --shadow: 0 12px 32px rgba(0,0,0,.55), inset 0 1px 0 rgba(150,255,210,.08);
    --ink: #effaf5; --muted: #a3c4b6; --title: #c2f6dd;
    --brand: #0f8a5a; --brand2: #0b6b46; --line: rgba(110,220,170,.20);
    --ok: #4ade80; --ok-bg: #15803d; --warn: #fbbf24; --danger: #f87171; --danger-bg: #dc2626;
    --tint-note: rgba(16,185,129,.18); --tint-warn: rgba(245,158,11,.20); --tint-danger: rgba(239,68,68,.22); --tint-ok: rgba(34,197,94,.20);
    --input-bg: rgba(4,12,9,.80); --input-edge: rgba(80,210,160,.36);
  }
  html[data-theme="ice"] {
    color-scheme: light;
    --bg-base: #e6eefa;
    --orb-a: rgba(84,158,226,.55); --orb-b: rgba(64,198,188,.42); --orb-c: rgba(138,160,244,.42);
    --hdr1: #163b73; --hdr2: #0f7a8a;
    --surface: rgba(255,255,255,.76); --surface2: rgba(255,255,255,.9); --edge: rgba(255,255,255,.9);
    --shadow: 0 10px 28px rgba(22,59,115,.16), inset 0 1px 0 rgba(255,255,255,.9);
    --ink: #0c1730; --muted: #34435b; --title: #163b73;
    --brand: #163b73; --brand2: #0f7a8a; --line: #d9e0ea;
    --ok: #067647; --ok-bg: #067647; --warn: #b54708; --danger: #b42318; --danger-bg: #b42318;
    --tint-note: rgba(232,243,255,.7); --tint-warn: rgba(255,244,229,.75); --tint-danger: rgba(255,238,236,.78); --tint-ok: rgba(228,246,236,.75);
    --input-bg: rgba(255,255,255,.8); --input-edge: rgba(255,255,255,.95);
  }

  /* ---------- page ---------- */
  html { background: var(--bg-base); }
  body { background: transparent; color: var(--ink); font-size: 17px; }
  body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(900px 620px at 6% -6%, var(--orb-a), transparent 62%),
      radial-gradient(780px 560px at 104% 6%, var(--orb-b), transparent 62%),
      radial-gradient(900px 720px at 50% 110%, var(--orb-c), transparent 62%);
  }
  header {
    background: linear-gradient(135deg, var(--hdr1), var(--hdr2)) !important;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-radius: 0 0 26px 26px;
    box-shadow: 0 12px 30px rgba(0,0,0,.28);
    padding-bottom: 26px;
  }
  header h1 { font-family: var(--font-title); font-weight: var(--title-weight); font-size: 28px; letter-spacing: -.01em; color: #fff; }
  header p { color: rgba(255,255,255,.88); }

  /* ---------- surfaces ---------- */
  .card, .block, .job-info, details.sec, .item, .search, .clock, .l, .step:not(details), .progwrap {
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  }
  .card, .block, .job-info, details.sec, .item, .search, .clock, .step:not(details) {
    background: var(--surface); color: var(--ink);
    border: 1.5px solid var(--edge); border-radius: 20px; box-shadow: var(--shadow);
  }
  .progwrap { background: transparent; }
  .card { transition: transform .12s ease, background .2s ease; }
  .card:active { transform: scale(.985); background: var(--surface2); }
  .item { border-radius: 18px; }
  .item.elite { background: var(--tint-warn); border-color: var(--warn); }

  /* text */
  h1, h2, h3, .card h2, details.sec > summary .title, .t b, .step .tt b, .step h3, .block h2, .item .name, .item .n { color: var(--title); }
  .card h2, .block h2, .step h3, .t b, .step .tt b, details.sec > summary .title { font-family: var(--font-title); font-weight: var(--title-weight); letter-spacing: -.01em; }
  .card h2 { font-size: 20px; }
  details.sec > summary .title { font-size: 20px; }
  .card p, .tt span, .t span, .step p, .item .d, .block p, .field span, .texthint, .progtxt { color: var(--muted); font-weight: 600; }
  .block p { color: var(--ink); font-weight: 500; }
  .group-label, .sub, .rule i, details.sec > summary .count, .pill, .tag, .rule {
    font-family: var(--font-label); letter-spacing: var(--label-spacing); text-transform: var(--label-case);
  }
  .group-label { color: var(--muted); font-size: 13px; font-weight: 800; }
  .sub { color: var(--title); font-size: 13.5px; font-weight: 800; margin-top: 20px; }
  .rule { color: var(--title); }
  .check label { color: var(--ink); font-size: 17.5px; font-weight: 700; line-height: 1.35; }
  .check { border-bottom-color: var(--line); }
  .check input[type="checkbox"]:checked + label { color: var(--muted); font-weight: 600; }
  .check input[type="checkbox"] { accent-color: var(--brand); }
  details.sec > summary { color: var(--title); }
  details.sec[open] > summary { border-bottom-color: var(--line); }
  details.sec > summary .count, details.sec > summary .toggle, .step .chip, .tag { background: var(--surface2); color: var(--muted); }
  details.sec > summary .count.done { background: var(--tint-ok); color: var(--ok); }
  .chev { color: var(--muted); }

  /* ---------- callouts ---------- */
  .note, .speech, .say, .hcp-box, .hcp-job, .box.why, .here, .seqrow a.jump, .pill { background: var(--tint-note); color: var(--ink); border-radius: 14px; }
  .here { border-color: var(--brand); color: var(--title); }
  .warning, .draftbar, .tbd, .stuckbtn { background: var(--tint-warn); color: var(--ink); border-radius: 14px; }
  .stuckbtn { border: 2px solid var(--warn); color: var(--warn); font-weight: 800; }
  .tbd { color: var(--warn); border-color: var(--warn); }
  .danger, .never, .safety, .stop, .redflag, .here.bad, .clock.over { background: var(--tint-danger); color: var(--ink); border-radius: 14px; }
  .redflag { border-radius: 20px; border-color: var(--danger-bg); }
  .redflag h2, .stop, .here.bad { color: var(--danger); }
  .here.done, .box.prove, .tag.PLAN { background: var(--tint-ok); }
  .here.done { color: var(--ok); border-color: var(--ok); }
  .box.cjbox { background: var(--tint-danger); border-color: var(--danger-bg); }
  .box.cjbox b { color: var(--danger); }
  .box { color: var(--ink); border-radius: 16px; }
  .box.why b { color: var(--title); }
  .box.prove b { color: var(--ok); }
  .tag.ELITE { background: var(--tint-warn); color: var(--warn); }

  /* no-heat + truck card */
  details.sec.step { border-radius: 20px; }
  details.sec.step.ok { background: var(--tint-ok); }
  details.sec.step.bad { background: var(--tint-danger); }
  details.sec.step.next { box-shadow: 0 0 0 3px var(--brand), var(--shadow); }
  .clock { text-align: left; }
  .clock .big { color: var(--title); }
  .clock.run .big { color: var(--ok); } .clock.amber .big { color: var(--warn); } .clock.over .big { color: var(--danger); }
  .clock button.go, .passfail .pass { background: var(--ok-bg); color: #fff; }
  .passfail .fail { background: var(--danger-bg); color: #fff; }
  .clock button.alt, .passfail .undo { background: var(--surface2); color: var(--ink); border: 1.5px solid var(--edge); }
  .l { background: var(--surface); border-color: var(--edge); box-shadow: var(--shadow); border-radius: 16px; color: var(--ink); }
  .r { background: var(--tint-danger); border-color: var(--danger-bg); color: var(--ink); border-radius: 16px; }
  .top { border-radius: 20px; background: linear-gradient(135deg, var(--hdr1), var(--hdr2)) !important; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
  .why td { border-top-color: var(--line); color: var(--ink); } .why td:first-child { color: var(--title); }
  .tbl th { background: var(--surface2); color: var(--ink); } .tbl td, .tbl th { border-color: var(--line); }
  .links a { color: var(--title); }
  .seqrow a.jump { color: var(--title); }

  /* ---------- controls ---------- */
  button { font-weight: 800; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
  button.secondary, .secondary, .chip { background: var(--surface2); color: var(--ink); border: 1.5px solid var(--edge); }
  .chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
  button.danger-btn { background: var(--danger-bg); color: #fff; }
  .topbar a, .topbar button { border-radius: 14px; }
  input[type=text], input[type=date], input[type=tel], input[type=email], input[type=number], input:not([type]), textarea, select {
    background: var(--input-bg); color: var(--ink); border: 1.5px solid var(--input-edge); border-radius: 12px; box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
  }
  ::placeholder { color: var(--muted); opacity: .8; }
  .tri-seg button { background: var(--surface2); color: var(--ink); border: 1.5px solid var(--edge); }
  .tri-seg button.sel-g { background: var(--ok-bg); color: #fff; border-color: var(--ok-bg); }
  .tri-seg button.sel-y { background: #b45309; color: #fff; border-color: #b45309; }
  .tri-seg button.sel-r { background: var(--danger-bg); color: #fff; border-color: var(--danger-bg); }
  .tri-seg button.sel-n { background: var(--brand); color: #fff; border-color: var(--brand); }
  .progbar { background: rgba(150,170,200,.25); }
  #jlt-panel { background: var(--surface2) !important; color: var(--ink) !important; border: 1.5px solid var(--edge) !important; }
  .jlt-plain { background: var(--surface) !important; color: var(--ink) !important; }
  .callbar { border-radius: 20px 20px 0 0; overflow: hidden; }
  .gobtn { background: var(--brand); color: #fff; }
  a { color: inherit; }
  header a, .topbar a { color: #fff; }


  /* ---------- fixes for hard-coded colors inside the pages ---------- */
  .step .tt span { color: var(--muted) !important; }
  .top .call { background: #fff !important; color: #b42318 !important; }
  .top .call small { color: #172033 !important; }
  .callbar a, .callbar .c { background: var(--danger-bg) !important; color: #fff !important; }
  .callbar button, .callbar .b { background: var(--brand) !important; color: #fff !important; }
  .cj, .clock a.call { background: var(--danger-bg) !important; color: #fff !important; }
  details.sec.step.ok .num, details.sec.step.ok .chip { background: var(--ok-bg); color: #fff; }
  details.sec.step.bad .num, details.sec.step.bad .chip { background: var(--danger-bg); color: #fff; }
  .num { background: var(--brand); color: #fff; }
  .textdone { background: var(--ok-bg); color: #fff; }
  .step.ok, .step.bad { color: var(--ink); }
  .save-pill { background: rgba(255,255,255,.18); color: #fff; }
  .themedots.top { top: 14px; bottom: auto; }

  a.callbar { background: var(--danger-bg) !important; color: #fff !important; }
  .pr { color: var(--title); } .item.elite .pr { color: var(--warn); }
  details.d summary { color: var(--title); }
  .desc { color: var(--muted); border-left-color: var(--line); }
  .cat { font-family: var(--font-label); color: var(--muted); }
  .themedots.inline { position: static; flex: none; }

  /* ---------- color dots (theme picker) ---------- */
  .themedots { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 9px; z-index: 3; }
  .themedots button { width: 22px; height: 22px; min-width: 0; min-height: 0; max-height: 22px; flex: none; line-height: 0; margin: 0; padding: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
  .themedots button[aria-pressed="true"] { border-color: #fff; transform: scale(1.22); box-shadow: 0 0 0 2px rgba(255,255,255,.45); }
}

/* solid cards where blur is unsupported or the phone asks for less transparency */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media screen { .card, .block, .job-info, details.sec, .item, .search, .clock, .l, .step:not(details) { background: var(--surface2); } }
}
@media screen and (prefers-reduced-transparency: reduce) {
  .card, .block, .job-info, details.sec, .item, .search, .clock, .l, .step:not(details), .r, .box { background: var(--surface2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media print { .themedots { display: none !important; } }
