/* JMS app: one stylesheet for admin, proposals and the client hub. Brand: navy and gold on ivory. */
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: url(fonts/figtree-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(fonts/figtree-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 800; font-display: swap; src: url(fonts/figtree-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url(fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url(fonts/source-serif-4-latin-700-normal.woff2) format("woff2"); }

:root {
  --navy: #18303A; --navy2: #213E4B; --line-dark: #2C4A57; --gold: #BD852E; --gold-ink: #7E5714;
  --ivory: #F5F3EB; --on-navy: #F5F3EB; --sand: #EFE7DA; --white: #FFFFFF; --ink: #18303A; --body: #2B3445; --muted: #5A6273;
  --line: #E3DBCD; --line2: #EEE7DB; --field: #8C8475;
  --ok: #24622A; --ok-bg: #E3F1E4; --warn: #7A4F00; --warn-bg: #FFF1D6; --bad: #9A2B1F; --bad-bg: #FBE4E1; --info: #2B4296; --info-bg: #E4EAFB;
  --sans: Figtree, "Segoe UI", system-ui, sans-serif; --serif: "Source Serif 4", Georgia, serif;
  --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--line-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
svg { flex-shrink: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.vh { position: absolute !important; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--gold); color: var(--navy); padding: 10px 14px; border-radius: 8px; font-weight: 700; z-index: 10; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tnum { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cols-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.cols-2 > * { min-width: 0; }
@media (max-width: 960px) { .cols-2 { grid-template-columns: 1fr; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid #CFC5B3;
  background: var(--white); color: var(--ink); font: 700 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.btn.primary:hover { background: var(--line-dark); color: var(--on-navy); }
.btn.gold { background: #C68E36; border-color: #C68E36; color: var(--navy); } /* 0.38: 4.8:1 for navy text */
.btn.ghost { border-color: transparent; background: transparent; text-decoration: underline; }
.btn.danger { color: var(--bad); border-color: #E2B8B1; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.full { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* Cards, panels and tables */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.dark { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.card.dark .muted { color: #B7C0CE; }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; }
.kpi .l { font-size: 14px; color: var(--muted); }
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); } /* relative keeps visually-hidden labels inside the scroll box */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FBF9F5; }
td { padding: 12px 16px; border-top: 1px solid var(--line2); vertical-align: top; }
tr:first-child td { border-top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
dl.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* Pills and alerts */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--sand); color: var(--ink); }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }
.pill.gold { background: var(--gold); color: var(--navy); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: 15px; }
.alert.ok { background: var(--ok-bg); border-color: #BFDCC3; color: #173F1B; }
.alert.error { background: var(--bad-bg); border-color: #EDB7AF; color: #6E1F16; }
.alert.info { background: var(--info-bg); border-color: #C9D3F2; color: #1F2F6B; }
.alert.warn { background: var(--warn-bg); border-color: #EBCB8B; color: #5C3B00; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--muted); }
.field .err { font-size: 14px; color: var(--bad); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], input[type=date], input[type=month], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); color: var(--ink); font: 16px/1.4 var(--sans); }
textarea { min-height: 110px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; }
.choice:has(input:checked) { border: 2px solid var(--navy); padding: 13px 15px; background: var(--ivory); }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }

/* Admin shell: eight areas along the top, the open area's pages in a row below, content centred. */
.admin-body { background: var(--ivory); }
.status-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; font-weight: 800; font-size: 13px; text-decoration: none; }
.status-chip.ok { background: var(--ok-bg); color: var(--ok); }
.status-chip.bad { background: var(--bad-bg); color: var(--bad); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--ivory); }
.content { padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 22px; max-width: 1400px; width: 100%; margin: 0 auto; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pagehead p { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.pagehead > div { min-width: 0; }
.pagehead h1 { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban section { background: var(--sand); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.kanban h2 { font-family: var(--sans); font-size: 14px; font-weight: 800; display: flex; justify-content: space-between; }
.kanban a.cardlink { display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; }
.kanban a.cardlink:hover { border-color: var(--ink); }

/* Public pages (proposal portal, client hub, sign-in) */
.pub-top { background: var(--ivory); border-bottom: 1px solid var(--line); }
.pub-top .inner, .pub-main, .pub-foot .inner { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.pub-top .inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.pub-body { min-height: 100vh; display: flex; flex-direction: column; }
.pub-body .pub-main { flex: 1 0 auto; width: 100%; }
.pub-main { padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }
.pub-foot { background: #0E1F26; color: #CFD5DE; padding: 28px 0; font-size: 14px; }
.pub-foot a { color: #E6E9EE; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: min(440px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 18px; }
.logo svg { color: currentColor; }

/* Steps and bank details */
.steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.steps li span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--sand); font-weight: 800; font-size: 13px; }
.steps li[aria-current="step"] { border-color: var(--navy); }
.steps li[aria-current="step"] span { background: var(--gold); }
.steps li.done span { background: var(--ok-bg); color: var(--ok); }
.bank { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 10px 16px; align-items: center; }
.bank dt { color: var(--muted); } .bank dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copy { min-height: 36px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .topbar, .pub-foot, .btn { display: none !important; } body { background: #fff; } }
.logo-light { color: var(--on-navy); }

/* ===== 0.13 ============================================================================================== */
/* Dark mode: light, dark or follow the device (the jms_theme cookie sets data-theme on <html>). The tokens change;
   the few places that need more get html.dark rules (set by the server for "dark", by ux.js for "system"). */
:root { color-scheme: light; --toast-bg: #18303A; --toast-ink: #F5F3EB; --shadow: 0 12px 32px rgba(16, 32, 40, .16); --th-bg: #FBF9F5; --track: #E9ECEF; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --ivory: #0E1A1F; --white: #15262D; --sand: #1D323A; --ink: #EDF1F2; --body: #D3DBDE; --muted: #A3B3B9; --line: #2A4049; --line2: #22363E; --field: #6F8790;
    --gold: #E9B85F; --gold-ink: #F0C56E; --line-dark: #3B5A67;
    --ok: #86D491; --ok-bg: #16331F; --warn: #F3C567; --warn-bg: #362B10; --bad: #FF9E92; --bad-bg: #3B1B17; --info: #AFC0FF; --info-bg: #1C2547;
    --th-bg: #1A2D34; --track: #24383F; --shadow: 0 12px 32px rgba(0, 0, 0, .45); --toast-bg: #E9B85F; --toast-ink: #10202A; }
}
:root[data-theme="dark"] { color-scheme: dark;
  --ivory: #0E1A1F; --white: #15262D; --sand: #1D323A; --ink: #EDF1F2; --body: #D3DBDE; --muted: #A3B3B9; --line: #2A4049; --line2: #22363E; --field: #6F8790;
  --gold: #E9B85F; --gold-ink: #F0C56E; --line-dark: #3B5A67;
  --ok: #86D491; --ok-bg: #16331F; --warn: #F3C567; --warn-bg: #362B10; --bad: #FF9E92; --bad-bg: #3B1B17; --info: #AFC0FF; --info-bg: #1C2547;
  --th-bg: #1A2D34; --track: #24383F; --shadow: 0 12px 32px rgba(0, 0, 0, .45); --toast-bg: #E9B85F; --toast-ink: #10202A; }
th { background: var(--th-bg); }
html.dark .btn { border-color: var(--line); }
html.dark .btn.primary, html.dark .btn.primary:hover { background: var(--gold); border-color: var(--gold); color: #10202A; }
html.dark .alert.ok { border-color: #2C5A36; color: var(--ok); } html.dark .alert.error { border-color: #6A2C25; color: var(--bad); }
html.dark .alert.info { border-color: #34417A; color: var(--info); } html.dark .alert.warn { border-color: #6A5320; color: var(--warn); }
html.dark .pill.gold { color: #10202A; }
html.dark img:not([src$=".svg"]) { filter: brightness(.94); }
html.dark ::selection { background: #E9B85F; color: #10202A; }

/* Accessibility (WCAG 2.2 AA): visible focus never hidden under the sticky bars, 24px targets, reduced motion. */
html { scroll-padding-top: 84px; scroll-padding-bottom: 80px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.linkbtn, .chips a, .pill a { min-height: 24px; }
a:focus-visible, button:focus-visible { box-shadow: 0 0 0 6px rgba(233, 184, 95, .25); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
kbd { font: 600 12px/1 ui-monospace, Menlo, Consolas, monospace; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--white); color: var(--ink); }

/* Toasts, messages and Undo */
.toasts { position: fixed; z-index: 90; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 12px; background: var(--toast-bg); color: var(--toast-ink); box-shadow: var(--shadow); font-size: 15px; font-weight: 600; animation: toast-in .28s cubic-bezier(.2, .8, .2, 1); }
.toast span { flex: 1; }
.toast.error { background: #9A2B1F; color: #FFF; }
.toast .btn.ghost { color: inherit; min-height: 32px; }
.toast-x { background: none; border: 0; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.undo-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .5; transform-origin: left; animation: undo-bar 10s linear forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes undo-bar { to { transform: scaleX(0); } }
.flash-stack { display: flex; flex-direction: column; gap: 10px; }
.flash-stack:empty { display: none; }
.alert .undo-form { margin-left: auto; }
.autosave-badge { margin-left: auto; }
.autosave-note { background: var(--info-bg); color: var(--info); padding: 8px 12px; border-radius: 10px; }
.err { display: block; color: var(--bad); font-size: 14px; font-weight: 600; margin-top: 6px; }

/* Empty states, error and offline pages */
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-ic, .empty-state > svg { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sand); color: var(--ink); margin-bottom: 4px; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 12px; color: var(--body); }
.empty-state > svg { padding: 14px; width: 56px; height: 56px; }
.err-page { max-width: 640px; margin: 40px auto; text-align: left; }
.err-ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--sand); color: var(--ink); }
.err-code { font: 600 13px/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Theme and search buttons in the top bars */
.theme-form { margin: 0; display: inline-flex; }
.icon-btn, .h2-iconbtn { display: inline-grid; place-items: center; position: relative; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--on-navy); cursor: pointer; text-decoration: none; }
.icon-btn:hover, .h2-iconbtn:hover { background: rgba(255, 255, 255, .1); color: var(--on-navy); }
.search-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px 0 12px; border-radius: 10px; border: 1px solid #2C4A57; color: #D6DCDF; text-decoration: none; font-size: 14px; }
.search-btn:hover { color: var(--on-navy); border-color: #4B6B78; }
.search-btn kbd { background: transparent; color: #AEBBC0; border-color: #3B5A67; }

/* Command palette (Ctrl+K) and the shortcuts list */
.palette, .kbd-help { position: fixed; inset: 0; z-index: 95; background: rgba(8, 18, 22, .55); display: grid; align-items: start; justify-items: center; padding: 10vh 16px 16px; }
.palette[hidden], .kbd-help[hidden] { display: none; }
.pal-in, .kbd-in { width: min(640px, 100%); background: var(--white); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.pal-in input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 56px; padding: 0 20px; font: 500 18px var(--sans); background: var(--white); color: var(--ink); }
.pal-in input:focus { outline: none; }
.pal-in ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.pal-in li[role=option] a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.pal-in li[aria-selected=true] a { background: var(--sand); box-shadow: inset 3px 0 0 var(--gold); }
.pal-group { padding: 10px 14px 4px; font: 600 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pal-hint { padding: 14px; }
.pal-foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line2); }
.kbd-in { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.kbd-in dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; align-items: center; }
.kbd-in dd { margin: 0; color: var(--body); }
body.pal-open { overflow: hidden; }

/* Admin on phones: a bottom bar, and tables become cards */
.abottom { display: none; }
@media (max-width: 760px) {
  .admin-body { padding-bottom: 72px; }
  .search-btn span, .search-btn kbd { display: none; }
  .abottom { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--navy); padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right)); }
  .abottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center; color: #C9D3D7; text-decoration: none; font-size: 11px; font-weight: 700; border-radius: 10px; }
  .abottom a[aria-current] { color: var(--navy); background: #E9B85F; }
  table.cardable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.cardable, table.cardable tbody, table.cardable tr, table.cardable td { display: block; width: 100%; }
  table.cardable tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  table.cardable tr:first-child { border-top: 0; }
  table.cardable td { border: 0; padding: 4px 0; display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 10px; text-align: left !important; }
  table.cardable td::before { content: attr(data-label); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  table.cardable td[data-label=""]::before { content: none; }
  .table-wrap { overflow-x: visible; }
}

/* Print: invoices, proposals and reports print cleanly on white, without menus and buttons */
@media print {
  :root, :root[data-theme="dark"] { --ivory: #FFF; --white: #FFF; --ink: #000; --body: #111; --muted: #444; --line: #CCC; --line2: #DDD; color-scheme: light; }
  body { background: #FFF !important; color: #000; font-size: 11pt; }
  .st-side, .st-top, .actx, .abottom, .h2-band, .h2-rail, .h2-bottom, .h2-foot, .h2-chipnav, .toasts, .flash-stack, .btn, .linkbtn, form .row, .skip, .pub-top, .hub-nav, .theme-form, .tour, .upgrade-card, [data-print], .kbd-help, .palette { display: none !important; }
  .card { border: 0; padding: 0; break-inside: avoid; }
  .h2-shell, .content, .h2-main { display: block; padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  h1, h2 { break-after: avoid; }
  table { font-size: 10pt; } th { background: #EEE !important; }
  @page { margin: 16mm; }
}
@media (max-width: 1500px) { .search-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .search-btn { padding: 0 8px; } }

/* 0.17: the person menu in the admin and hub top bars */
.me-menu { position: relative; margin-left: 6px; }
.me-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.me-menu summary::-webkit-details-marker { display: none; }
.me-av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.me-menu summary:hover .me-av, .me-menu[open] .me-av { box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); }
.me-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 250px; padding: 8px; border-radius: 14px; background: var(--white); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .18); display: grid; gap: 2px; }
.me-pop .me-name { margin: 0 0 6px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; font-size: 14px; }
.me-pop .me-name span { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.me-pop a, .me-pop .me-out { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font: 600 14px var(--sans); background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.me-pop a:hover, .me-pop .me-out:hover { background: var(--sand); }
.me-pop kbd { margin-left: auto; font-size: 11px; }
.me-pop form { margin: 0; }

/* 0.17: process feedback form and answers */
.fb-card { max-width: 720px; margin: 24px auto; display: grid; gap: 14px; }
.fb-card fieldset { border: 0; padding: 0; margin: 0; }
.fb-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.fb-scale label { position: relative; }
.fb-scale input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.fb-scale span { display: grid; place-items: center; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-weight: 800; font-size: 18px; }
.fb-scale input:checked + span { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.fb-scale input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.fb-ends { display: flex; justify-content: space-between; margin: 4px 2px 0; }
.fb-answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fb-answers h3 { font-size: 17px; margin: 0; }
.fb-scores { display: flex; gap: 18px; flex-wrap: wrap; }
[hidden] { display: none !important; }
/* 0.23 contrast (axe): navy text on the lighter gold */
.pill.gold, .me-av { background: #E9B85F; }
