/* Themes: colours, type, shape and texture only. No layout, no behaviour.
   Two themes: Field Guide (the default) and Harbor. Pick one in Settings; it is stored per browser (localStorage "wl-theme") and set as data-theme on <html>. */

/* ── Harbor: its token values are the base block at the top of styles.css ── */

/* ── Harbor look: matches the "01 Harbor (today's look, evolved)" concept. Look only. ── */
:root:is(:not([data-theme]),[data-theme="harbor"]) .brand span { font: 500 12px var(--mono); letter-spacing: .16em; margin-top: 7px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .nav[aria-current="page"] { font-weight: 600; }
@media (min-width: 901px) { :root:is(:not([data-theme]),[data-theme="harbor"]) .rail .nav { padding-block: 7px; } :root:is(:not([data-theme]),[data-theme="harbor"]) .navgroup { padding-top: 13px; } :root:is(:not([data-theme]),[data-theme="harbor"]) .brand { padding-bottom: 22px; } }
:root:is(:not([data-theme]),[data-theme="harbor"]) .who { padding-top: 14px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .who b { color: #fff; font-weight: 600; font-size: 12.5px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .who-mono { background: var(--mark); color: var(--rail); }
:root:is(:not([data-theme]),[data-theme="harbor"]) h1 { font-size: 34px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .head p { font-size: 15px; margin-top: 8px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .dcard { padding: 20px 22px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .dhead { margin-bottom: 12px; align-items: center; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .dhead h2 { font: 600 16px/1.25 var(--display); letter-spacing: -.01em; color: var(--ink); }
:root:is(:not([data-theme]),[data-theme="harbor"]) .dcard:has(> .dbody.k-number) .dhead h2 { font: 500 13px/1.3 var(--font); letter-spacing: 0; color: var(--ink-2); }
:root:is(:not([data-theme]),[data-theme="harbor"]) .dbody.k-number .muted { font-size: 13px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .chart text { font: 10.5px var(--mono); }
:root:is(:not([data-theme]),[data-theme="harbor"]) .chart .col { fill: #bfe0de; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .chart .col.today, :root:is(:not([data-theme]),[data-theme="harbor"]) .chart .col.hl { fill: var(--accent); }
:root:is(:not([data-theme]),[data-theme="harbor"]) .chart .avglbl { font-weight: 500; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .tk-mini li { padding: 7px 0; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .tk-mini .t { font-weight: 600; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .tk-mini .t .muted { font-weight: 400; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .hcard .pill { font-weight: 600; font-size: 13px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .hcard .pill.bad { color: var(--bad); } :root:is(:not([data-theme]),[data-theme="harbor"]) .hcard .pill.warn { color: var(--warn); } :root:is(:not([data-theme]),[data-theme="harbor"]) .hcard .pill.ok { color: var(--ok); } :root:is(:not([data-theme]),[data-theme="harbor"]) .hcard .pill.info { color: var(--info); }
:root:is(:not([data-theme]),[data-theme="harbor"]) .hbars .trk { background: var(--wash); height: 8px; } :root:is(:not([data-theme]),[data-theme="harbor"]) .hbars .fill { height: 8px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .banner.attn { background: var(--rail-2); color: #fff; border-radius: 6px; padding: 18px 22px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .banner.attn > b { display: block; font: 600 18px/1.25 var(--display); letter-spacing: -.01em; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .banner.attn li { color: var(--rail-ink); } :root:is(:not([data-theme]),[data-theme="harbor"]) .banner.attn li::marker { color: var(--mark); }
:root:is(:not([data-theme]),[data-theme="harbor"]) .banner.attn .wl-btn--link { color: var(--mark); font-weight: 600; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .banner.attn .muted { color: var(--rail-ink); }

/* ── Harbor, crisp pass: tighter corners, square status marks, outlined cards with a hairline shadow. Look only. ── */
:root:is(:not([data-theme]),[data-theme="harbor"]) :is(.card, .tablewrap, .strip, .dcard, .tk-row, .plan, .mcard, .reserve, .detailcard, .hsum-i, .tk-day, .tile, .ctile, .shell.client .clist, .icard) { border-radius: 6px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) :is(.card, .tablewrap, .strip, .dcard, .tk-row, .panel, .hsum-i, .ctile, .shell.client .clist, .icard) { border: 1px solid #d7e0de; box-shadow: var(--shadow-card); }
:root:is(:not([data-theme]),[data-theme="harbor"]) :is(.panel, .tk-modal) { border-radius: 8px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) :is(.tk-pop, .wl-menu, .dghost, .banner, .note, .check-it, .sent.big, .perm, details.permbox, div.ok, p.ok, .toast, .themeopt, .opt, .opt.big) { border-radius: 6px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .nav { border-radius: 4px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .nav[aria-current="page"]::before { border-radius: 0; width: 3px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) :is(.status, .pill, .legend i, .tk-dot, .timeline li)::before { border-radius: 2px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) :is(.tk-dot, .legend i) { border-radius: 2px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) :is(.chip) { border-radius: 4px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) :is(.bar, .bar i, .meter, .meter i, .hbars .trk, .hbars .fill, .steps .st) { border-radius: 2px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .chart .col { rx: 2px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .tk-num { border-radius: 5px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .tk-chip { border-radius: 3px; }
:root:is(:not([data-theme]),[data-theme="harbor"]) .themesw { border-radius: 3px; }

/* ═════ Field Guide plumbing: shape and surface from its tokens ═════ */
  :root[data-theme="field"] h1, :root[data-theme="field"] h2, :root[data-theme="field"] h3, :root[data-theme="field"] .strip dd, :root[data-theme="field"] .brand b { text-transform: var(--head-case); letter-spacing: var(--head-track); }
:root[data-theme="field"] .card, :root[data-theme="field"] .tablewrap, :root[data-theme="field"] .strip, :root[data-theme="field"] .panel, :root[data-theme="field"] .dcard, :root[data-theme="field"] .tk-row, :root[data-theme="field"] .tk-modal, :root[data-theme="field"] .tk-pop, :root[data-theme="field"] .wl-menu, :root[data-theme="field"] .hsum-i, :root[data-theme="field"] .plan, :root[data-theme="field"] .mcard, :root[data-theme="field"] .tile, :root[data-theme="field"] .detailcard {
    border-radius: var(--radius-panel); border: var(--border-card); box-shadow: var(--shadow-card); }
:root[data-theme="field"] .chip { border-radius: var(--radius-chip); }
:root[data-theme="field"] .status::before, :root[data-theme="field"] .pill::before { border-radius: var(--radius-mark); }
:root[data-theme="field"] .banner { border-radius: var(--radius-ctl); }
:root[data-theme="field"] .nav { border-radius: var(--radius-ctl); }
:root[data-theme="field"] .card.soft, :root[data-theme="field"] .hsum-i { background: var(--surface); color: var(--ink); }
:root[data-theme="field"] .chip.pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
:root[data-theme="field"] .srcell.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
:root[data-theme="field"] .brand b { color: var(--rail-ink); }
:root[data-theme="field"] .nav:hover { color: var(--rail-ink); background: color-mix(in srgb, var(--rail-ink) 10%, transparent); }
:root[data-theme="field"] .nav[aria-current="page"] { color: var(--rail-ink); background: var(--rail-2); }
:root[data-theme="field"] .who { border-top-color: color-mix(in srgb, var(--rail-ink) 18%, transparent); }
:root[data-theme="field"] th { color: var(--ink-3); }
:root[data-theme="field"] td .id { color: var(--accent-strong); }
:root[data-theme="field"] .toast { background: var(--ink); color: var(--bg); }
:root[data-theme="field"] .tablewrap, :root[data-theme="field"] .card, :root[data-theme="field"] .panel { color: var(--ink); }
/* ═════ Field Guide: matches the "07 Field Guide" board. Olive rail, bone paper, safety-orange marks, square corners ═════ */
:root[data-theme="field"] {
  --mark: #e07a2e; --link: #a4501a; --focus: #e07a2e;
  --bg: #eeece4; --surface: #f8f7f2; --raise: #ffffff; --wash: #e9e6da;
  --line: #d9d6c8; --line-soft: #e2dfd2; --line-strong: #858b74;
  --ink: #1f261b; --ink-2: #4a5442; --ink-3: #5c6655;
  --accent: #4d6b2f; --accent-strong: #3a5222; --accent-ink: #ffffff; --accent-soft: #e6ecd8;
  --ok: #3f7a2a; --warn: #946000; --bad: #b23a26; --info: #3a5f9e; --idle: #8a8f7c;
  --rail: #2f3a2a; --rail-2: #435039; --rail-ink: #cfd6c3; --rail-dim: #a3ae95;
  --display: 'Chivo', system-ui, sans-serif; --font: 'Chivo', system-ui, sans-serif; --mono: 'Chivo Mono', ui-monospace, monospace;
  --fs-7: 40px; --head-case: none; --head-track: -.02em;
  --radius-panel: 3px; --radius-ctl: 3px; --radius-btn: 3px; --radius-chip: 2px; --radius-mark: 1px;
  --border-card: 1px solid #d9d6c8; --shadow-card: 0 1px 3px rgba(47,58,42,.18), 0 8px 24px rgba(47,58,42,.21); --shadow-btn: none;
}
:root[data-theme="field"] h1 { font-weight: 800; font-size: 40px; letter-spacing: -.025em; line-height: 1.05; }
:root[data-theme="field"] h2 { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
:root[data-theme="field"] .strip dd { font-weight: 800; font-size: 34px; letter-spacing: -.03em; text-transform: none; }
:root[data-theme="field"] th { font-family: var(--font); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; background: #f1efe6; }
:root[data-theme="field"] td { padding-block: var(--sp-5); }
:root[data-theme="field"] tbody tr[data-row]:hover td, :root[data-theme="field"] tbody tr[aria-selected="true"] td { background: #e6ecd8; }
:root[data-theme="field"] .mono, :root[data-theme="field"] .num { font-family: var(--mono); }
:root[data-theme="field"] td .id { color: var(--link); }
:root[data-theme="field"] a, :root[data-theme="field"] .banner .wl-btn--link { color: var(--link); }
:root[data-theme="field"] :is(.linkish, details.units summary, details.permbox > summary::after, .tk-pop-h, .wl-btn.is-filtered, .tk-clockbtn:hover, th.sortable:hover, th.sortable[aria-sort]::after, .docbody a, .tk-clockbtn[aria-expanded="true"]) { color: var(--link); }
:root[data-theme="field"] th.sortable { color: var(--ink-3); }
:root[data-theme="field"] .status, :root[data-theme="field"] .pill { font-weight: 600; }
:root[data-theme="field"] .rail { border-right: 0; }
:root[data-theme="field"] .brand b { font-weight: 800; letter-spacing: .14em; font-size: 16px; color: #f1efe6; }
:root[data-theme="field"] .brand span { font: 500 12px var(--mono); letter-spacing: .16em; color: var(--mark); }
:root[data-theme="field"] .nav[aria-current="page"] { color: #fff; font-weight: 600; background: var(--rail-2); }
:root[data-theme="field"] .nav[aria-current="page"]::before { background: var(--mark); border-radius: 0; }
:root[data-theme="field"] .nav:hover { color: #fff; }
:root[data-theme="field"] .who-mono { background: var(--mark); color: #1f1408; }
:root[data-theme="field"] .tab[aria-pressed="true"]::after { background: var(--mark); }
:root[data-theme="field"] .banner { background: var(--accent-soft); border: 1px solid #cdd5b6; }
:root[data-theme="field"] .chart .col, :root[data-theme="field"] .chart .bar { fill: #b9c4a6; rx: 1px; } :root[data-theme="field"] .chart .col.today, :root[data-theme="field"] .chart .bar.today, :root[data-theme="field"] .chart .col.hl { fill: var(--mark); }
:root[data-theme="field"] .meter i, :root[data-theme="field"] .bar i, :root[data-theme="field"] .hbars .fill { background: var(--accent); }
:root[data-theme="field"] .meter, :root[data-theme="field"] .bar, :root[data-theme="field"] .hbars .trk { background: #e2dfd2; border-radius: 1px; } :root[data-theme="field"] .meter i, :root[data-theme="field"] .bar i { border-radius: 1px; }
:root[data-theme="field"] .meter.low i { background: var(--warn); } :root[data-theme="field"] .meter.urgent i, :root[data-theme="field"] .meter.out i { background: var(--bad); }
:root[data-theme="field"] :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
:root[data-theme="field"] .toast { border-radius: 3px; }
:root[data-theme="field"] .themesw { border-radius: 2px; }
/* Overview card headers in Field Guide */
:root[data-theme="field"] .dlink { white-space: nowrap; }
:root[data-theme="field"] .dcard:has(> .dbody.k-number) .dhead h2 { font-size: 12px; letter-spacing: .06em; }
:root[data-theme="field"] .login .side h2 { font-size: 30px; text-transform: none; letter-spacing: -.02em; font-weight: 800; }

/* Short windows: the menu tightens in every theme (beats the per-theme spacing above) so it fits without scrolling where it can. */
@media (min-width: 901px) and (max-height: 980px) { :root:root:root .rail .nav { padding-block: 6px; } :root:root:root .navgroup { padding: 11px 12px 5px; } :root:root:root .navlist > .navgroup:first-child { padding-top: 0; } }
@media (min-width: 901px) and (max-height: 820px) { :root:root:root .rail .nav { padding-block: 4px; } :root:root:root .navgroup { padding: 8px 12px 3px; } }

/* Depth: a soft drop shadow behind the menu and every page card in Harbor and Field Guide. */
:root:is(:not([data-theme]),[data-theme="harbor"]) .rail { box-shadow: 4px 0 20px rgba(8,24,26,.30); z-index: 2; }
:root[data-theme="field"] .rail { box-shadow: 4px 0 20px rgba(20,28,16,.32); z-index: 2; }
@media (max-width: 720px) { :root:root:root:is(:not([data-theme]),[data-theme="harbor"],[data-theme="field"]) .tablewrap { box-shadow: none; } }
@media (min-width: 901px) and (max-width: 1180px) { :root:root:root:is(:not([data-theme]),[data-theme="harbor"],[data-theme="field"]) .split:not(.solo) .tablewrap { box-shadow: none; } }

@media (prefers-reduced-motion: reduce) {
  :root[data-theme] .wl-btn { transition: none; }
}

/* Settings > Appearance picker (all themes) */
.themepick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.themeopt { display: grid; gap: 4px; text-align: left; padding: 12px; background: var(--raise); color: var(--ink); border: 1.5px solid var(--line-strong, var(--line)); border-radius: 10px; cursor: pointer; font: inherit; }
.themeopt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.themeopt small { color: var(--ink-3); font-size: 12.5px; line-height: 1.35; }
.themesw { display: flex; height: 28px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-soft); margin-bottom: 6px; }
.themesw i { flex: 1; }

/* Client portal: its own card classes follow the same card spec as the admin side (Field Guide; Harbor is handled in the Harbor block above) */
:root[data-theme="field"] :is(.ctile, .shell.client .clist, .icard) { border-radius: var(--radius-panel); border: var(--border-card); box-shadow: var(--shadow-card); }
/* Field Guide: every client heading at section or card level gets the same small caps label as the admin side */
:root[data-theme="field"] .shell.client :is(.csec h3, .sheetsvc h3, .card > h3, .icard h2, h3.csub, .panel h2) { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
:root[data-theme="field"] .shell.client .card h4 { font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
