/* ===========================================================================
   JumpKing HR — design system (dark-first)

   Dark is the designed state; light is the considered alternative, not an
   inversion. The dark palette is a cool near-black with a blue undertone rather
   than pure #000: on a screen full of numbers, true black makes every border
   vanish and every figure float off the surface.

   Self-hosted, no CDN. Same origin as the app, so nothing here can be slow,
   blocked, or quietly change under a working deployment.
   =========================================================================== */

/* --- tokens: dark (default) --------------------------------------------- */
:root {
  color-scheme: dark;

  --bg:          #080a0f;
  --bg-glow:     #0c1322;
  --surface:     #11141c;
  --surface-2:   #161a24;
  --surface-3:   #1d222e;
  --border:      #222838;
  --border-firm: #2f3647;

  --text:        #eef1f7;
  --text-2:      #9aa5bb;
  --text-3:      #646e85;

  --primary:       #7c6cff;
  --primary-hover: #8f82ff;
  --primary-soft:  #1a1733;
  --primary-ring:  #7c6cff40;
  --primary-text:  #ffffff;

  --brand:       #ff7a33;
  --brand-2:     #ffb224;
  --brand-soft:  #241506;

  --ok:        #34d399;  --ok-soft:   #06231a;  --ok-border:   #0d4433;
  --warn:      #fbbf24;  --warn-soft: #241b05;  --warn-border: #4a380c;
  --bad:       #fb7185;  --bad-soft:  #260d14;  --bad-border:  #4d1c28;
  --info:      #38bdf8;  --info-soft: #04212f;  --info-border: #0b4258;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
  --shadow:    0 2px 8px -2px rgb(0 0 0 / .55), 0 1px 2px rgb(0 0 0 / .4);
  --shadow-lg: 0 18px 44px -14px rgb(0 0 0 / .75), 0 6px 14px -8px rgb(0 0 0 / .5);

  --sidebar-w: 252px;
  --header-h:  62px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg:          #f7f8fa;
  --bg-glow:     #eef0ff;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --surface-3:   #eef1f6;
  --border:      #e4e8ef;
  --border-firm: #cdd4e0;

  --text:        #0d1220;
  --text-2:      #4a5568;
  --text-3:      #8e98ab;

  --primary:       #5b4ae0;
  --primary-hover: #4a3ad0;
  --primary-soft:  #efecff;
  --primary-ring:  #5b4ae033;
  --primary-text:  #ffffff;

  --brand:       #e35c13;
  --brand-2:     #f59e0b;
  --brand-soft:  #fff5ed;

  --ok:        #0f7a4f;  --ok-soft:   #effbf5;  --ok-border:   #b6e8d1;
  --warn:      #a86a07;  --warn-soft: #fffaeb;  --warn-border: #fae2a6;
  --bad:       #c01f3c;  --bad-soft:  #fff1f3;  --bad-border:  #fbccd4;
  --info:      #0369a1;  --info-soft: #f0f9ff;  --info-border: #bae6fd;

  --shadow-sm: 0 1px 2px rgb(15 23 42 / .05);
  --shadow:    0 1px 3px rgb(15 23 42 / .08), 0 1px 2px -1px rgb(15 23 42 / .05);
  --shadow-lg: 0 16px 40px -12px rgb(15 23 42 / .16), 0 4px 10px -6px rgb(15 23 42 / .08);
}

/* --- reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv05" 1, "ss01" 1;
  min-height: 100dvh;
}

/* One soft light source behind the whole page. It keeps a very dark UI from
   reading as a flat black rectangle, without putting a gradient on any card. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 16% -8%, var(--bg-glow) 0%, transparent 62%),
    radial-gradient(760px 460px at 102% 2%, var(--primary-soft) 0%, transparent 58%);
  opacity: .85;
}
.shell { position: relative; z-index: 1; }

img, svg { display: block; max-width: 100%; }
svg { flex: none; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 5px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--primary); color: var(--primary-text);
  padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- shell -------------------------------------------------------------- */
.shell { display: flex; min-height: 100dvh; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}

.sidebar__brand {
  height: var(--header-h);
  display: flex; align-items: center; gap: 11px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.sidebar__mark {
  width: 31px; height: 31px; border-radius: 9px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 12.5px; letter-spacing: -.3px;
  flex: none;
  box-shadow: 0 3px 12px -3px color-mix(in srgb, var(--brand) 60%, transparent);
}
.sidebar__name { font-weight: 640; letter-spacing: -.015em; font-size: 15px; }

.sidebar__nav { padding: 14px 11px; overflow-y: auto; flex: 1; }
.nav__group { margin-bottom: 20px; }
.nav__label {
  font-size: 10.5px; font-weight: 650; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-3);
  padding: 0 11px; margin-bottom: 7px;
}
.nav__item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 14px; font-weight: 500;
  min-height: 38px;
  transition: background .16s ease, color .16s ease;
}
.nav__item:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav__item.is-active {
  background: linear-gradient(90deg, var(--primary-soft), transparent 90%);
  color: var(--text); font-weight: 600;
}
/* The marker is the state, not just the tint — a colour-only cue disappears for
   anyone who cannot separate these two greys. */
.nav__item.is-active::before {
  content: ""; position: absolute; left: -11px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 19px; border-radius: 0 3px 3px 0;
  background: var(--primary);
}
.nav__item svg { width: 17px; height: 17px; stroke-width: 1.85; }
.nav__item.is-active svg { color: var(--primary); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h);
  flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar__title { font-size: 16px; font-weight: 650; letter-spacing: -.018em; }
.topbar__sub { font-size: 12.5px; color: var(--text-3); margin-top: -1px; }
.topbar__spacer { flex: 1; }

.content { padding: 22px 22px 64px; flex: 1; }
.content > * + * { margin-top: 18px; }

@media (max-width: 1024px) {
  .sidebar { position: fixed; z-index: 60; transform: translateX(-100%); transition: transform .22s cubic-bezier(.4,0,.2,1); }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .nav-toggle { display: inline-flex !important; }
  .scrim { position: fixed; inset: 0; background: rgb(3 5 10 / .6); backdrop-filter: blur(2px); z-index: 50; }
  .content { padding: 18px 16px 56px; }
}
@media (min-width: 1025px) { .scrim { display: none; } }

/* --- typography --------------------------------------------------------- */
.h1 { font-size: 22px; font-weight: 680; letter-spacing: -.028em; }
.h2 { font-size: 16.5px; font-weight: 650; letter-spacing: -.016em; }
.h3 { font-size: 13.5px; font-weight: 650; letter-spacing: -.008em; }
.muted  { color: var(--text-2); }
.dim    { color: var(--text-3); }
.small  { font-size: 13px; }
.tiny   { font-size: 11.5px; }
/* Figures in a column have to line up; proportional digits make a table jitter. */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* --- cards -------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card__head {
  padding: 14px 17px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card__body { padding: 17px; }
.card__body--flush { padding: 0; }
.card__foot {
  padding: 13px 17px; border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

.grid { display: grid; gap: 15px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(192px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.row--between { justify-content: space-between; }
.stack > * + * { margin-top: 15px; }
.spacer { flex: 1; }

/* --- stat tiles --------------------------------------------------------- */
.stat {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 17px;
  box-shadow: var(--shadow-sm);
}
.stat::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-firm), transparent);
}
.stat__label {
  font-size: 11px; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.stat__value {
  font-size: 27px; font-weight: 680; letter-spacing: -.035em;
  margin-top: 5px; font-variant-numeric: tabular-nums; line-height: 1.15;
}
.stat__hint { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.stat--ok   .stat__value { color: var(--ok); }
.stat--warn .stat__value { color: var(--warn); }
.stat--bad  .stat__value { color: var(--bad); }

/* --- tables ------------------------------------------------------------- */
/* Wide tables scroll inside their own box. The page itself never scrolls
   sideways — on a phone that reads as the whole layout being broken. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 10.5px; font-weight: 680;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
  padding: 11px 15px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.tbl td { padding: 11px 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .13s ease; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num, .tbl .right { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nowrap { white-space: nowrap; }
.tbl--compact td { padding: 8px 13px; }

/* --- badges ------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 620; line-height: 1.75;
  border: 1px solid transparent; white-space: nowrap;
}
.badge--ok     { background: var(--ok-soft);   color: var(--ok);     border-color: var(--ok-border); }
.badge--warn   { background: var(--warn-soft); color: var(--warn);   border-color: var(--warn-border); }
.badge--bad    { background: var(--bad-soft);  color: var(--bad);    border-color: var(--bad-border); }
.badge--info   { background: var(--info-soft); color: var(--info);   border-color: var(--info-border); }
.badge--muted  { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }
.badge__dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 15px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-firm);
  background: var(--surface-2); color: var(--text);
  font-size: 13.5px; font-weight: 560; cursor: pointer;
  touch-action: manipulation;
  transition: background .15s ease, border-color .15s ease, transform .07s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-firm); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; stroke-width: 2; }

.btn--primary {
  background: linear-gradient(180deg, var(--primary-hover), var(--primary));
  border-color: var(--primary); color: var(--primary-text);
  box-shadow: 0 2px 10px -3px var(--primary-ring);
}
.btn--primary:hover {
  background: linear-gradient(180deg, var(--primary-hover), var(--primary-hover));
  box-shadow: 0 4px 16px -4px var(--primary-ring);
}
.btn--danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn--danger:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--sm { min-height: 32px; padding: 5px 11px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.nav-toggle { display: none; }

/* --- forms -------------------------------------------------------------- */
.field { display: block; margin-bottom: 15px; }
.field__label {
  display: block; font-size: 12.5px; font-weight: 620;
  color: var(--text-2); margin-bottom: 6px; letter-spacing: -.005em;
}
.field__label .req { color: var(--bad); margin-left: 2px; }
.field__hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.field__error { font-size: 12px; color: var(--bad); margin-top: 6px; font-weight: 540; }

.input, .select, .textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  /* 16px on small screens — anything less makes iOS zoom the page on focus. */
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-firm);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border-firm)); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.input[readonly] { background: var(--surface-3); color: var(--text-2); }
.textarea { min-height: 86px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23646e85' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
/* The native date/time picker glyph is near-invisible on a dark field. */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.62); cursor: pointer; }
:root[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
:root[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator { filter: none; }

.check { display: flex; align-items: center; gap: 9px; cursor: pointer; min-height: 38px; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; flex: none; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 17px; }
.form-grid--3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.fieldset__legend {
  font-size: 11px; font-weight: 680; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); padding: 0 0 10px;
  margin-bottom: 15px; border-bottom: 1px solid var(--border); width: 100%;
}

/* --- avatars ------------------------------------------------------------ */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--primary-soft), var(--surface-3));
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: -.02em;
  flex: none; overflow: hidden; border: 1px solid var(--border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 60px; height: 60px; font-size: 20px; }
.avatar--sm { width: 27px; height: 27px; font-size: 10.5px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person__name { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person__meta { font-size: 12px; color: var(--text-3); }

/* --- flash & empty ------------------------------------------------------ */
.flash {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 15px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13.5px; line-height: 1.55;
}
.flash svg { width: 18px; height: 18px; margin-top: 1px; }
.flash--success { background: var(--ok-soft);   border-color: var(--ok-border);   color: var(--ok); }
.flash--error   { background: var(--bad-soft);  border-color: var(--bad-border);  color: var(--bad); }
.flash--warning { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }
.flash--info    { background: var(--info-soft); border-color: var(--info-border); color: var(--info); }
.flash code { background: color-mix(in srgb, currentColor 12%, transparent); padding: 1px 5px; border-radius: 4px; }

.empty { padding: 48px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 32px; height: 32px; margin: 0 auto 11px; opacity: .5; }
.empty__title { font-weight: 620; color: var(--text-2); margin-bottom: 4px; font-size: 14px; }

/* --- timeline ----------------------------------------------------------- */
.timeline { display: flex; flex-wrap: wrap; gap: 8px; }
.tl {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px; background: var(--surface-2); min-width: 110px;
}
.tl__k { font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.tl__v { font-size: 15px; font-weight: 640; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tl--ok   { border-color: var(--ok-border);   background: var(--ok-soft); }
.tl--warn { border-color: var(--warn-border); background: var(--warn-soft); }
.tl--bad  { border-color: var(--bad-border);  background: var(--bad-soft); }
.tl--none .tl__v { color: var(--text-3); font-weight: 500; }

/* --- meters ------------------------------------------------------------- */
.meter { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter__fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.meter__fill--ok   { background: linear-gradient(90deg, var(--ok), #6ee7b7); }
.meter__fill--warn { background: linear-gradient(90deg, var(--warn), #fcd34d); }
.meter__fill--bad  { background: linear-gradient(90deg, var(--bad), #fda4af); }

/* --- calc sheet --------------------------------------------------------- */
.calc { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.calc td { padding: 7px 13px; border-bottom: 1px solid var(--border); }
.calc tr:last-child td { border-bottom: 0; }
.calc .op {
  width: 30px; text-align: center; font-weight: 700; font-size: 13px;
  color: #fff; padding: 7px 0;
}
.calc .op--add { background: var(--ok); }
.calc .op--sub { background: var(--bad); }
.calc .val { text-align: right; font-variant-numeric: tabular-nums; width: 152px; }
.calc .val input { text-align: right; }
.calc tr.is-total td { background: var(--surface-3); font-weight: 680; }
.calc tr.is-grand td {
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  color: #fff; font-weight: 700; font-size: 15px;
}
.calc tr.is-grand td a { color: #fff; }
.calc .spacer-row td { background: transparent; padding: 5px; border-bottom: 0; }

/* --- tabs & misc -------------------------------------------------------- */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  padding: 9px 14px; font-size: 13.5px; font-weight: 560; color: var(--text-2);
  border-bottom: 2px solid transparent; white-space: nowrap; min-height: 40px;
  display: inline-flex; align-items: center;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 640; }

.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 15px; font-size: 13.5px; }
.kv dt { color: var(--text-3); font-size: 12.5px; }
.kv dd { margin: 0; font-weight: 540; }

code.mono { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
hr.rule { border: 0; border-top: 1px solid var(--border); margin: 17px 0; }
details summary::-webkit-details-marker { display: none; }

/* Print is always light — nobody wants a page of black toner. */
@media print {
  :root { color-scheme: light; }
  .sidebar, .topbar, .no-print, body::before { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border-color: #ddd; box-shadow: none; break-inside: avoid; background: #fff; }
  .content { padding: 0; }
  .tbl td, .tbl th { border-color: #e5e5e5; }
}
