/* ============================================================
   VHA Report Builder: the new interface (v2), styles

   Every rule here starts with body.v2, the class v2 puts on <body> only while
   it is drawing the screen, so none of it can reach the classic screens.
   scripts/check.mjs fails if a selector here does not.

   The classic stylesheet is not scoped, so its element rules (button, input,
   h1, .card, ...) still apply in here; v2 styles everything through its own
   classes, which are more specific and win.
   ============================================================ */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/PublicSans-latin.woff2") format("woff2");
}

body.v2 {
  --v2-accent: #13586B;
  --v2-accent-dark: #0B3F4D;
  --v2-tint: #E4EFF1;
  --v2-tint-ink: #0F4E5E;
  --v2-bg: #F5F6F4;
  --v2-bg-report: #ECEEEC;
  --v2-card: #FFFFFF;
  --v2-line: #DDE2E0;
  --v2-line-soft: #EEF1EF;
  --v2-ink: #1A2326;
  --v2-ink-2: #3E4A4D;
  --v2-muted: #5A6669;
  --v2-faint: #9AA5A3;
  --v2-input: #C9D1CF;
  --v2-done: #3B6B4F;
  --v2-draft-bg: #FFF3D6;
  --v2-draft-ink: #7A4B00;
  --v2-note-bg: #FFF8E1;
  --v2-note-line: #F0D98C;
  --v2-note-ink: #6B4600;
  --v2-danger: #A33A2F;
  --v2-radius: 14px;
  --v2-font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  margin: 0;
  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: var(--v2-font);
  font-size: 15px;
  line-height: 1.45;
}
/* the classic top bar and screen stay in the page, untouched, just not shown */
body.v2 > .topbar,
body.v2 > #app { display: none; }

body.v2 #v2-root { min-height: 100vh; }
body.v2 #v2-root *,
body.v2 #v2-root *::before,
body.v2 #v2-root *::after { box-sizing: border-box; }
body.v2 #v2-root a { color: var(--v2-accent); }
body.v2 #v2-root a:hover { color: var(--v2-accent-dark); }
body.v2 #v2-root h1,
body.v2 #v2-root h2,
body.v2 #v2-root h3 { margin: 0; line-height: 1.25; }
body.v2 #v2-root :focus-visible { outline: 3px solid rgba(19, 88, 107, .35); outline-offset: 2px; }
body.v2 .v2-icon { flex-shrink: 0; display: block; }
body.v2 .v2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- header ---------------- */
body.v2 .v2-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--v2-card); border-bottom: 1px solid var(--v2-line);
}
body.v2 .v2-header-in {
  max-width: 1280px; margin: 0 auto; padding: 0 32px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; min-height: 64px;
}
body.v2 .v2-header-in.is-wide { max-width: none; padding: 0 24px; gap: 12px 16px; }
body.v2 #v2-root .v2-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--v2-ink); font-weight: 700; font-size: 16px;
}
body.v2 .v2-logo {
  width: 32px; height: 32px; border-radius: 8px; background: var(--v2-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
body.v2 .v2-nav { display: flex; gap: 4px; flex-wrap: wrap; }
body.v2 #v2-root .v2-nav-link {
  text-decoration: none; padding: 10px 14px; border-radius: 8px;
  color: var(--v2-ink-2); font-weight: 500;
}
body.v2 #v2-root .v2-nav-link:hover { background: var(--v2-bg); color: var(--v2-ink); }
body.v2 #v2-root .v2-nav-link.is-on { background: var(--v2-tint); color: var(--v2-tint-ink); font-weight: 600; }
body.v2 .v2-header-end { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
body.v2 .v2-who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--v2-ink-2); }
body.v2 .v2-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #D7E6E9; color: var(--v2-tint-ink);
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
body.v2 .v2-save { font-size: 13px; color: var(--v2-muted); min-width: 0; white-space: nowrap; }
body.v2 .v2-save.is-saved { color: var(--v2-done); }
body.v2 .v2-save.is-error { color: var(--v2-danger); font-weight: 600; }
body.v2 #v2-root .v2-classic-link {
  font: inherit; font-size: 13px; color: var(--v2-muted); background: none; border: 0;
  padding: 6px 4px; text-decoration: underline; cursor: pointer; border-radius: 6px; min-height: 0;
}
body.v2 #v2-root .v2-classic-link:hover { color: var(--v2-ink); background: none; }
body.v2 .v2-head-title { display: flex; flex-direction: column; min-width: 0; }
body.v2 .v2-head-title b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v2 .v2-head-title span { font-size: 13px; color: var(--v2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v2 .v2-head-sep { width: 1px; height: 28px; background: var(--v2-line); }
body.v2 .v2-head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------------- page frame ---------------- */
body.v2 .v2-main {
  max-width: 1280px; margin: 0 auto; padding: 32px;
  display: flex; flex-direction: column; gap: 24px;
}
body.v2 .v2-titlebar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
body.v2 #v2-root .v2-h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
body.v2 .v2-sub { color: var(--v2-muted); margin-top: 4px; }
body.v2 .v2-titlebar-end { margin-left: auto; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
body.v2 .v2-card {
  background: var(--v2-card); border: 1px solid var(--v2-line); border-radius: var(--v2-radius);
}
body.v2 .v2-card-pad { padding: 20px 24px; }
body.v2 #v2-root .v2-h2 { font-size: 18px; font-weight: 700; }
body.v2 #v2-root .v2-h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--v2-muted); }
body.v2 .v2-hint { color: var(--v2-muted); font-size: 13.5px; }
body.v2 .v2-eyebrow { font-size: 13px; color: var(--v2-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
body.v2 .v2-empty { color: var(--v2-muted); padding: 28px 24px; text-align: center; }

/* ---------------- buttons ---------------- */
body.v2 #v2-root .v2-btn,
body.v2 .modal .v2-btn {
  font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--v2-input); background: var(--v2-card); color: var(--v2-ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
body.v2 #v2-root .v2-btn:hover { background: #F0F3F2; color: var(--v2-ink); }
body.v2 #v2-root .v2-btn:disabled { opacity: .5; cursor: default; background: var(--v2-card); }
body.v2 #v2-root .v2-btn.is-primary { background: var(--v2-accent); border-color: var(--v2-accent); color: #fff; }
body.v2 #v2-root .v2-btn.is-primary:hover { background: var(--v2-accent-dark); border-color: var(--v2-accent-dark); color: #fff; }
body.v2 #v2-root .v2-btn.is-danger { color: var(--v2-danger); }
body.v2 #v2-root .v2-btn.is-danger:hover { background: #FBEFED; }
body.v2 #v2-root .v2-btn.is-small { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
body.v2 #v2-root .v2-btn.is-icon { width: 40px; min-height: 40px; padding: 0; }
body.v2 #v2-root .v2-btn.is-small.is-icon { width: 36px; min-height: 36px; }
body.v2 #v2-root .v2-btn.is-ghost { border-color: transparent; background: none; }
body.v2 #v2-root .v2-btn.is-ghost:hover { background: var(--v2-bg); }
body.v2 #v2-root .v2-link {
  font: inherit; font-size: 14px; font-weight: 600; background: none; border: 0; padding: 4px 2px;
  color: var(--v2-accent); cursor: pointer; text-decoration: none; border-radius: 6px; min-height: 0;
}
body.v2 #v2-root .v2-link:hover { color: var(--v2-accent-dark); text-decoration: underline; background: none; }
body.v2 #v2-root .v2-link.is-danger { color: var(--v2-danger); }
body.v2 #v2-root .v2-link:disabled { color: var(--v2-faint); cursor: default; text-decoration: none; }

/* pill-shaped filter buttons and choice buttons */
body.v2 #v2-root .v2-pill {
  font: inherit; font-size: 14px; font-weight: 500; min-height: 36px; padding: 6px 14px; line-height: 1.3;
  border-radius: 999px; border: 1px solid var(--v2-line); background: var(--v2-card); color: var(--v2-ink-2);
  cursor: pointer; text-align: left;
}
body.v2 #v2-root .v2-pill:hover { border-color: var(--v2-input); background: #FAFBFA; }
body.v2 #v2-root .v2-pill.is-on { border-color: var(--v2-accent); background: var(--v2-tint); color: var(--v2-tint-ink); font-weight: 600; }
body.v2 #v2-root .v2-pill.is-on:hover { background: #D6E7EA; }

/* segmented buttons (None / One side / Both) */
body.v2 .v2-seg { display: inline-flex; border: 1px solid var(--v2-input); border-radius: 10px; overflow: hidden; }
body.v2 #v2-root .v2-seg button {
  font: inherit; font-size: 14px; font-weight: 500; min-height: 40px; padding: 0 12px;
  border: 0; border-radius: 0; background: var(--v2-card); color: var(--v2-ink-2); cursor: pointer;
}
body.v2 #v2-root .v2-seg button + button { border-left: 1px solid var(--v2-input); }
body.v2 #v2-root .v2-seg button:hover { background: #F0F3F2; }
body.v2 #v2-root .v2-seg button.is-on { background: var(--v2-tint); color: var(--v2-tint-ink); font-weight: 700; }

/* ---------------- form controls ---------------- */
body.v2 #v2-root .v2-label { display: block; font-size: 14px; font-weight: 600; color: var(--v2-ink); margin-bottom: 6px; }
body.v2 #v2-root .v2-input,
body.v2 .modal .v2-input {
  font: inherit; font-size: 15px; width: 100%; min-height: 44px;
  border: 1px solid var(--v2-input); border-radius: 10px; padding: 9px 12px;
  background: #fff; color: var(--v2-ink); outline: none;
}
body.v2 #v2-root textarea.v2-input { resize: vertical; line-height: 1.45; display: block; }
body.v2 #v2-root select.v2-input { padding-right: 32px; }
body.v2 #v2-root .v2-input:focus { border-color: var(--v2-accent); box-shadow: 0 0 0 3px rgba(19, 88, 107, .16); outline: none; }
body.v2 #v2-root .v2-input.is-invalid { border-color: var(--v2-danger); }
body.v2 #v2-root .v2-input.is-small { min-height: 36px; padding: 5px 10px; font-size: 14px; border-radius: 8px; width: auto; }
body.v2 #v2-root .v2-check { width: 20px; height: 20px; accent-color: var(--v2-accent); cursor: pointer; flex-shrink: 0; margin: 0; }
body.v2 .v2-error { color: var(--v2-danger); font-size: 13px; margin-top: 6px; }
/* A field's label sits 6px over its own input; the next field starts 22px
   down, so each label reads as belonging to the input below it. */
body.v2 .v2-field + .v2-field,
body.v2 .v2-field + .v2-grid2,
body.v2 .v2-grid2 + .v2-field,
body.v2 .v2-grid2 + .v2-grid2 { margin-top: 22px; }
body.v2 .v2-label-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
body.v2 .v2-label-row .v2-label { margin: 0; flex: 1; }

/* a switch: a real checkbox, drawn as a track and knob */
body.v2 .v2-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14.5px; user-select: none; }
body.v2 .v2-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
body.v2 .v2-switch-track { width: 40px; height: 24px; border-radius: 999px; background: #C3CBC9; position: relative; transition: background .15s; flex-shrink: 0; }
body.v2 .v2-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
body.v2 .v2-switch input:checked + .v2-switch-track { background: var(--v2-accent); }
body.v2 .v2-switch input:checked + .v2-switch-track::after { transform: translateX(16px); }
body.v2 .v2-switch input:focus-visible + .v2-switch-track { outline: 3px solid rgba(19, 88, 107, .35); outline-offset: 2px; }

/* ---------------- chips and progress ---------------- */
body.v2 .v2-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
body.v2 .v2-chip.is-draft { background: var(--v2-draft-bg); color: var(--v2-draft-ink); }
body.v2 .v2-chip.is-ready { background: #E2F0F2; color: var(--v2-tint-ink); }
body.v2 .v2-chip.is-sent { background: #ECEEED; color: var(--v2-ink-2); }
body.v2 .v2-chip.is-off { background: #ECEEED; color: var(--v2-muted); }
body.v2 .v2-progress { display: block; width: 120px; height: 6px; border-radius: 3px; background: #E6EAE8; overflow: hidden; }
body.v2 .v2-progress > span { display: block; height: 100%; background: var(--v2-accent); border-radius: 3px; }

/* ---------------- menus ---------------- */
body.v2 .v2-menu-wrap { position: relative; }
body.v2 .v2-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px;
  background: var(--v2-card); border: 1px solid var(--v2-line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20, 35, 40, .14); padding: 6px; display: flex; flex-direction: column;
}
body.v2 .v2-menu[hidden] { display: none; }
body.v2 #v2-root .v2-menu button {
  font: inherit; font-size: 14px; text-align: left; border: 0; background: none; border-radius: 8px;
  padding: 10px 12px; color: var(--v2-ink); cursor: pointer; min-height: 40px;
}
body.v2 #v2-root .v2-menu button:hover { background: var(--v2-bg); }
body.v2 #v2-root .v2-menu button.is-danger { color: var(--v2-danger); }

/* ---------------- the classic dialogs, in v2 colours ----------------
   openDialog() and the report preview append themselves to <body>, so they
   pick these up only while v2 is showing. */
body.v2 .modal-back { background: rgba(20, 35, 40, .45); font-family: var(--v2-font); }
body.v2 .modal { border-radius: var(--v2-radius); box-shadow: 0 20px 50px rgba(20, 35, 40, .25); color: var(--v2-ink); }
body.v2 .modal .dialog-title { font-size: 18px; }
body.v2 .modal .dialog-msg { color: var(--v2-ink-2); font-size: 14.5px; }
body.v2 .modal .dialog-body { padding: 24px 24px 8px; }
body.v2 .modal .dialog-actions { padding: 18px 24px 22px; }
body.v2 .modal button {
  font: inherit; font-size: 14.5px; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--v2-input); background: var(--v2-card); color: var(--v2-ink);
}
body.v2 .modal button:hover { background: #F0F3F2; }
body.v2 .modal button.primary { background: var(--v2-accent); border-color: var(--v2-accent); color: #fff; }
body.v2 .modal button.primary:hover { background: var(--v2-accent-dark); }
body.v2 .modal button.danger-solid { background: var(--v2-danger); border-color: var(--v2-danger); color: #fff; }
body.v2 .modal input[type="text"] {
  font: inherit; min-height: 44px; border: 1px solid var(--v2-input); border-radius: 10px; padding: 9px 12px;
}
body.v2 .modal input[type="text"]:focus { border-color: var(--v2-accent); outline: 3px solid rgba(19, 88, 107, .16); }
body.v2 .modal label.f-label { font-size: 14px; color: var(--v2-ink); }
body.v2 .modal .modal-head { padding: 12px 16px; gap: 8px; }
body.v2 .modal .pv-widths button.is-on { background: var(--v2-accent); border-color: var(--v2-accent); color: #fff; }
body.v2 .modal-body.pv-body { background: var(--v2-bg-report); }
body.v2 .pv-frame { background: var(--v2-bg-report); }
body.v2 .drag-ghost { border-color: var(--v2-accent); border-radius: 10px; font-family: var(--v2-font); }

@media (max-width: 900px) {
  body.v2 .v2-header-in { padding: 0 16px; gap: 8px 16px; }
  body.v2 .v2-main { padding: 20px 16px; }
  body.v2 .v2-who-name { display: none; }
}

/* ============ dashboard ============ */
body.v2 .v2-search {
  display: flex; align-items: center; gap: 8px; background: var(--v2-card); color: var(--v2-muted);
  border: 1px solid var(--v2-input); border-radius: 10px; padding: 0 12px; height: 44px; width: 300px; max-width: 100%;
}
body.v2 .v2-search:focus-within { border-color: var(--v2-accent); box-shadow: 0 0 0 3px rgba(19, 88, 107, .16); }
body.v2 #v2-root .v2-search input {
  border: 0; outline: none; font: inherit; font-size: 14px; flex: 1; min-width: 0; background: transparent;
  padding: 0; width: auto; color: var(--v2-ink); box-shadow: none;
}
body.v2 .v2-continue { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
body.v2 .v2-continue-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--v2-draft-bg); color: var(--v2-draft-ink);
  display: flex; align-items: center; justify-content: center;
}
body.v2 .v2-continue-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.v2 .v2-continue-name { font-size: 17px; font-weight: 600; }
body.v2 .v2-continue-actions { display: flex; gap: 10px; flex-wrap: wrap; }
body.v2 .v2-listbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 20px; border-bottom: 1px solid #E6EAE8;
}
body.v2 .v2-filters { display: flex; flex-wrap: wrap; gap: 8px; }
body.v2 .v2-sortbar { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--v2-muted); }
body.v2 .v2-table-wrap { overflow-x: auto; }
body.v2 .v2-table { width: 100%; border-collapse: collapse; min-width: 860px; font-size: 14px; }
body.v2 .v2-table thead tr { text-align: left; color: var(--v2-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
body.v2 .v2-table th { padding: 12px; font-weight: 600; }
body.v2 .v2-table td { padding: 14px 12px; vertical-align: middle; color: var(--v2-ink-2); }
body.v2 .v2-table th:first-child, body.v2 .v2-table td:first-child { padding-left: 20px; }
body.v2 .v2-table th:last-child, body.v2 .v2-table td:last-child { padding-right: 20px; }
body.v2 .v2-table tbody tr { border-top: 1px solid var(--v2-line-soft); }
body.v2 .v2-table tbody tr[data-id]:hover { background: #FAFBFA; }
body.v2 .v2-table .v2-group-row th {
  background: #F8F9F8; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--v2-muted); padding-top: 10px; padding-bottom: 10px;
}
body.v2 .v2-col-client { min-width: 220px; }
body.v2 #v2-root .v2-rowlink {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--v2-ink); background: none; border: 0;
  padding: 0; text-align: left; cursor: pointer; border-radius: 4px; min-height: 0;
}
body.v2 #v2-root .v2-rowlink:hover { color: var(--v2-accent); text-decoration: underline; background: none; }
body.v2 .v2-col-client .v2-hint { font-size: 13px; }
body.v2 .v2-prog { display: flex; align-items: center; gap: 10px; }
body.v2 .v2-row-actions { display: flex; gap: 8px; justify-content: flex-end; }
body.v2 .v2-list-foot { padding: 12px 20px 16px; }

/* ============ assessment form ============ */
body.v2 #v2-root .v2-back {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600;
  color: var(--v2-ink-2); padding: 8px 10px 8px 4px; border-radius: 8px; white-space: nowrap;
}
body.v2 #v2-root .v2-back:hover { background: var(--v2-bg); color: var(--v2-ink); }
body.v2 .v2-form-layout {
  display: grid; grid-template-columns: 264px minmax(0, 1fr) 440px; gap: 24px;
  max-width: 1600px; margin: 0 auto; padding: 24px; align-items: start;
}
body.v2 .v2-form-layout.no-preview { grid-template-columns: 264px minmax(0, 1fr); max-width: 1180px; }
body.v2 .v2-secnav {
  position: sticky; top: 88px; background: var(--v2-card); border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius); padding: 16px 12px; max-height: calc(100vh - 112px); overflow-y: auto;
}
body.v2 .v2-secnav-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 8px 10px; }
body.v2 .v2-progress.is-full { width: auto; margin: 0 8px 12px; }
body.v2 .v2-secnav-list { display: flex; flex-direction: column; gap: 2px; }
body.v2 #v2-root .v2-secnav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: var(--v2-ink); font-weight: 500; font-size: 14.5px; min-height: 40px;
}
body.v2 #v2-root .v2-secnav-item:hover { background: var(--v2-bg); color: var(--v2-ink); }
body.v2 #v2-root .v2-secnav-item.is-empty { color: var(--v2-muted); }
body.v2 #v2-root .v2-secnav-item.is-on { background: var(--v2-tint); color: var(--v2-tint-ink); font-weight: 700; }
body.v2 .v2-secnav-name { flex: 1; min-width: 0; }
body.v2 .v2-secnav-foot { border-top: 1px solid var(--v2-line-soft); margin-top: 12px; padding: 12px 8px 0; font-size: 14px; }
body.v2 .v2-sicon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
body.v2 .v2-sicon.is-done { background: var(--v2-done); color: #fff; }
body.v2 .v2-sicon.is-partial { color: #B07A12; }
body.v2 .v2-sicon.is-empty { color: #B8C1BF; }

body.v2 .v2-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
body.v2 .v2-visit-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 14px 20px; }
body.v2 .v2-vs-cell .v2-hint { font-size: 12.5px; }
body.v2 .v2-vs-val { font-weight: 600; }
body.v2 .v2-visit-summary .v2-btn { margin-left: auto; }
body.v2 .v2-faint { color: var(--v2-faint); font-weight: 400; }
body.v2 .v2-sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 22px 28px 18px; border-bottom: 1px solid var(--v2-line-soft); }
body.v2 #v2-root .v2-sec-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
body.v2 .v2-sec-off { margin: 16px 28px 0; padding: 12px 14px; border-radius: 10px; background: #F1F3F2; color: var(--v2-ink-2); font-size: 14px; }
body.v2 .v2-sec-off[hidden] { display: none; }
body.v2 .v2-sec-body { padding: 8px 28px 24px; }
body.v2 .v2-sec-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 28px; border-top: 1px solid var(--v2-line-soft); }
body.v2 .v2-block { margin-top: 22px; }
body.v2 .v2-block > .v2-h3 { margin-bottom: 10px; }
body.v2 .v2-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
body.v2 .v2-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
body.v2 .v2-grid2.v2-block { margin-top: 18px; }
body.v2 .v2-span2 { grid-column: 1 / -1; }
body.v2 .v2-unit { display: flex; align-items: center; gap: 8px; }
body.v2 #v2-root .v2-unit .v2-input { max-width: 120px; }
body.v2 .v2-unit span { color: var(--v2-muted); font-size: 14px; }
body.v2 .v2-pills { display: flex; flex-wrap: wrap; gap: 8px; }
body.v2 .v2-opts { display: flex; flex-wrap: wrap; gap: 8px; }
body.v2 .v2-opt.is-wide { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
body.v2 .v2-ent { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14px; }
body.v2 .v2-ent thead th { text-align: left; color: var(--v2-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding: 6px 10px 8px 0; }
body.v2 .v2-ent tbody th { text-align: left; font-weight: 600; padding: 10px 12px 10px 0; vertical-align: middle; width: 80px; }
body.v2 .v2-ent td { padding: 8px 10px 8px 0; vertical-align: middle; }
body.v2 .v2-ent tbody tr + tr { border-top: 1px solid var(--v2-line-soft); }
body.v2 .v2-eqs { display: flex; flex-direction: column; gap: 10px; }
body.v2 .v2-eq { border: 1px solid var(--v2-line); border-radius: 12px; padding: 14px 16px; background: #FCFDFC; }
body.v2 .v2-eq.is-on { border-color: #9CC2CB; background: #F3F8F9; }
body.v2 .v2-eq-top { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
body.v2 #v2-root .v2-eq-top .v2-check { margin-top: 2px; }
body.v2 .v2-eq-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.v2 .v2-eq-name { font-weight: 600; }
body.v2 .v2-eq-desc { font-size: 13.5px; color: var(--v2-muted); }
body.v2 .v2-eq-pic { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--v2-line); flex-shrink: 0; }
body.v2 .v2-eq-note { margin: 12px 0 0 32px; }
body.v2 .v2-worknotes { background: var(--v2-note-bg); border: 1px solid var(--v2-note-line); border-radius: 12px; padding: 14px 16px; }
body.v2 #v2-root .v2-worknotes .v2-label { color: var(--v2-note-ink); font-size: 13.5px; }
body.v2 #v2-root .v2-worknotes .v2-input { background: #FFFDF4; border-color: var(--v2-note-line); }
body.v2 .v2-inst { border: 1px solid var(--v2-line); border-radius: 12px; margin-top: 16px; background: #FCFDFC; }
body.v2 .v2-inst.is-single { border: 0; background: none; margin-top: 0; }
body.v2 .v2-inst-head { display: flex; align-items: center; gap: 8px; padding-right: 14px; }
body.v2 #v2-root .v2-inst-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font: inherit; text-align: left;
  border: 0; background: none; padding: 12px 14px; cursor: pointer; border-radius: 12px; color: var(--v2-ink); min-height: 48px;
}
body.v2 #v2-root .v2-inst-toggle:hover { background: var(--v2-bg); }
body.v2 .v2-inst-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v2 .v2-inst-name.is-unnamed { font-weight: 500; font-style: italic; color: var(--v2-muted); }
body.v2 .v2-inst-toggle .v2-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.v2 .v2-inst-body { padding: 0 16px 18px; border-top: 1px solid var(--v2-line-soft); }
body.v2 .v2-inst-body > .v2-block:first-child { margin-top: 16px; }
body.v2 .v2-inst-tools { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
body.v2 .v2-more { margin-top: 22px; border-top: 1px solid var(--v2-line-soft); padding-top: 14px; }
body.v2 .v2-more > summary { cursor: pointer; font-weight: 600; color: var(--v2-accent); padding: 6px 0; }
body.v2 .v2-more > p { margin: 8px 0 14px; }
body.v2 .v2-flash { animation: v2flash 1.2s ease-out; border-radius: 10px; }
@keyframes v2flash { 0% { box-shadow: 0 0 0 4px rgba(19, 88, 107, .35); } 100% { box-shadow: 0 0 0 4px rgba(19, 88, 107, 0); } }

body.v2 .v2-live {
  position: sticky; top: 88px; display: flex; flex-direction: column;
  background: var(--v2-bg-report); border: 1px solid var(--v2-line); border-radius: var(--v2-radius);
  max-height: calc(100vh - 112px); overflow: hidden;
}
body.v2 .v2-live[hidden] { display: none; }
body.v2 .v2-live-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 10px; }
body.v2 .v2-live-scroll { overflow-y: auto; padding: 0 16px; flex: 1; position: relative; }
body.v2 .v2-live-foot { padding: 10px 16px 14px; font-size: 12.5px; }
body.v2 .v2-sheet {
  background: #fff; color: #1b2733; border-radius: 6px; padding: 28px 28px 36px;
  box-shadow: 0 1px 3px rgba(20, 35, 40, .12); font-size: 10.5pt; line-height: 1.5;
}
body.v2 .v2-sheet .blk ul, body.v2 .v2-sheet .blk ol { margin: 4px 0; padding-left: 26px; }
body.v2 #v2-root .v2-sheet a { color: #0b5f7d; word-break: break-word; }
body.v2 .v2-sheet img { max-width: 100%; }
body.v2 .v2-pv-blk { cursor: pointer; border-radius: 4px; margin: 0 -6px; padding: 0 6px; }
body.v2 .v2-pv-blk:hover { background: #F2F7F8; box-shadow: inset 2px 0 0 var(--v2-accent); }

@media (max-width: 1280px) {
  body.v2 .v2-form-layout { grid-template-columns: 240px minmax(0, 1fr) 360px; gap: 18px; padding: 18px; }
}
@media (max-width: 1080px) {
  body.v2 .v2-form-layout,
  body.v2 .v2-form-layout.no-preview { grid-template-columns: minmax(0, 1fr); }
  body.v2 .v2-secnav { position: static; max-height: none; }
  body.v2 .v2-secnav-list { flex-direction: row; flex-wrap: wrap; }
  body.v2 .v2-live { position: static; max-height: 70vh; }
  body.v2 .v2-grid2 { grid-template-columns: 1fr; }
  body.v2 .v2-sec-head, body.v2 .v2-sec-body, body.v2 .v2-sec-foot { padding-left: 18px; padding-right: 18px; }
}
body.v2 .v2-ent { table-layout: fixed; }
body.v2 .v2-ent th:nth-child(1) { width: 72px; }
body.v2 .v2-ent th:nth-child(3) { width: 132px; }
body.v2 .v2-ent th:nth-child(4) { width: 252px; }

/* ============ report editor ============ */
body.v2 .v2-rep-layout {
  display: grid; grid-template-columns: 248px minmax(0, 1fr) 300px; gap: 24px;
  max-width: 1600px; margin: 0 auto; padding: 24px; align-items: start;
}
body.v2 #v2-root:has(.v2-rep-layout) { background: var(--v2-bg-report); }
body.v2 .v2-outline {
  position: sticky; top: 88px; background: var(--v2-card); border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius); padding: 16px 10px; max-height: calc(100vh - 112px); overflow-y: auto;
}
body.v2 .v2-outline > .v2-h3 { padding: 0 8px 10px; }
body.v2 .v2-outline-list { display: flex; flex-direction: column; gap: 2px; }
body.v2 .v2-ol-row { display: flex; align-items: center; gap: 2px; border-radius: 8px; background: var(--v2-card); }
body.v2 .v2-ol-row:hover { background: var(--v2-bg); }
body.v2 .v2-ol-row.is-current { background: var(--v2-tint); }
body.v2 #v2-root .v2-ol-name {
  flex: 1; min-width: 0; padding: 9px 4px; text-decoration: none; color: var(--v2-ink); font-weight: 500;
  font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.v2 #v2-root .v2-ol-row.is-current .v2-ol-name { color: var(--v2-tint-ink); font-weight: 700; }
body.v2 #v2-root .v2-ol-row.is-off .v2-ol-name { color: var(--v2-faint); text-decoration: line-through; }
body.v2 #v2-root .v2-outline-add { margin: 12px 8px 0; }
body.v2 #v2-root .v2-grip {
  border: 0; background: none; color: #A3AEAC; padding: 6px 3px; border-radius: 6px; cursor: grab;
  min-height: 0; line-height: 1; font-size: inherit; touch-action: none; display: flex; align-items: center;
}
body.v2 #v2-root .v2-grip:hover { background: #E8ECEB; color: var(--v2-ink); }
body.v2 .drag-src { opacity: .3; }

body.v2 .v2-page-wrap { position: relative; min-width: 0; }
body.v2 .v2-page {
  background: #fff; color: #1b2733; max-width: 8.5in; margin: 0 auto; padding: 0.75in 0.8in;
  box-shadow: 0 2px 18px rgba(20, 35, 40, .10); border-radius: 4px;
  font-size: 11.5pt; line-height: 1.5;
}
body.v2 .v2-fg + .v2-fg { margin-top: 2px; }
body.v2 .v2-fg.is-off { margin: 8px 0; }
body.v2 .v2-fg-off {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px;
  background: #F3F5F4; color: var(--v2-muted); font-family: var(--v2-font); font-size: 13.5px;
}
body.v2 .v2-fg-off span { flex: 1; }
body.v2 .v2-fb { position: relative; display: flex; align-items: flex-start; gap: 2px; margin: 0 -0.55in 0 -0.62in; padding: 0 0.55in 0 0; }
body.v2 .v2-fb-gutter {
  width: 0.62in; flex-shrink: 0; display: flex; justify-content: flex-end; gap: 0; padding: 2px 4px 0 0;
  opacity: 0; transition: opacity .12s;
}
body.v2 .v2-fb:hover .v2-fb-gutter, body.v2 .v2-fb:focus-within .v2-fb-gutter, body.v2 .v2-fb.is-hidden .v2-fb-gutter { opacity: 1; }
body.v2 #v2-root .v2-fb-tool {
  border: 0; background: none; color: #8B9795; padding: 6px 3px; border-radius: 6px; cursor: pointer; min-height: 0;
  display: flex; align-items: center;
}
body.v2 #v2-root .v2-fb-tool:hover { background: #E8ECEB; color: var(--v2-ink); }
body.v2 .v2-fb-body { flex: 1; min-width: 0; border-radius: 4px; }
body.v2 .v2-fb:hover .v2-fb-body { box-shadow: 0 0 0 1px #E3E8E7; }
body.v2 .v2-fb.is-edited > .v2-fb-body { box-shadow: inset 3px 0 0 var(--v2-accent); }
body.v2 #v2-root .v2-fb .fb-content { outline: none; border-radius: 4px; padding: 1px 6px; background: none; box-shadow: none; }
body.v2 #v2-root .v2-fb .fb-content:focus { background: #F2F8F9; box-shadow: 0 0 0 2px var(--v2-accent); }
body.v2 .v2-fb .fb-content:empty::before { content: "Type here"; color: var(--v2-faint); font-style: italic; }
body.v2 .v2-fb .fb-content ul, body.v2 .v2-fb .fb-content ol { margin: 4px 0; padding-left: 26px; }
body.v2 .v2-fb .fb-content li { margin: 0 0 3px; }
body.v2 #v2-root .v2-fb .fb-content a { color: #0b5f7d; }
body.v2 .v2-fb .fb-content img { cursor: pointer; max-width: 100%; }
body.v2 .v2-fb .fb-content img.img-picked { outline: 2px solid var(--v2-accent); outline-offset: 2px; }
body.v2 .v2-fb.is-hidden .fb-content { opacity: .4; text-decoration: line-through; }
body.v2 .v2-fb-end {
  position: absolute; right: 0; top: 0; width: 0.55in; display: flex; justify-content: center; padding-top: 2px;
  opacity: 0; transition: opacity .12s; font-family: var(--v2-font);
}
body.v2 .v2-fb:hover .v2-fb-end, body.v2 .v2-fb:focus-within .v2-fb-end { opacity: 1; }
body.v2 #v2-root .v2-fb-end .v2-link { font-size: 12px; font-weight: 600; }
body.v2 #v2-root .v2-resolve {
  display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 10px 6px; font: 600 13px var(--v2-font);
  border: 1px solid var(--v2-note-line); background: var(--v2-note-bg); color: var(--v2-note-ink);
  border-radius: 8px; padding: 0 10px; min-height: 30px; cursor: pointer;
}
body.v2 #v2-root .v2-resolve:hover { background: #FFF0C2; }
body.v2 #v2-root .v2-addp {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px 4px; font: 500 13px var(--v2-font);
  border: 1px dashed #C9D1CF; background: none; color: var(--v2-muted); border-radius: 8px;
  padding: 0 10px; min-height: 30px; cursor: pointer; opacity: .75;
}
body.v2 #v2-root .v2-addp:hover { opacity: 1; color: var(--v2-accent); border-color: var(--v2-accent); background: #F7FAFA; }

/* the toolbar that floats over the paragraph being edited */
body.v2 .v2-tools {
  position: absolute; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  background: #1F2B2E; color: #fff; border-radius: 10px; padding: 5px; max-width: 100%;
  box-shadow: 0 8px 24px rgba(20, 35, 40, .28); font-family: var(--v2-font);
}
body.v2 .v2-tools[hidden] { display: none; }
body.v2 #v2-root .v2-tools button {
  font: inherit; font-size: 13.5px; color: #fff; background: none; border: 0; border-radius: 6px;
  min-height: 34px; min-width: 32px; padding: 0 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
body.v2 #v2-root .v2-tools button:hover { background: rgba(255, 255, 255, .12); }
body.v2 #v2-root .v2-tools button.is-on { background: #fff; color: #1F2B2E; }
body.v2 #v2-root .v2-tools select {
  font: inherit; font-size: 13px; background: #2C3A3E; color: #fff; border: 1px solid #3F5056; border-radius: 6px;
  height: 34px; padding: 0 2px; width: auto; max-width: 5.6em;
}
body.v2 .v2-tools-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .2); margin: 0 2px; }
body.v2 .v2-tools-color {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 14px;
}
body.v2 .v2-tools-color:hover { background: rgba(255, 255, 255, .12); }
body.v2 #v2-root .v2-tools-color input { position: absolute; inset: auto 4px 3px 4px; width: auto; height: 4px; padding: 0; border: 0; opacity: .99; cursor: pointer; }
body.v2 .v2-hl-swatch { width: 16px; height: 16px; border-radius: 4px; background: #FFF07A; display: block; }

/* the picture panel over the page */
body.v2 .v2-imgbar {
  position: absolute; z-index: 26; display: flex; align-items: center; gap: 2px; background: #1F2B2E; color: #fff;
  border: 0; border-radius: 10px; padding: 4px; box-shadow: 0 8px 24px rgba(20, 35, 40, .28); font-family: var(--v2-font);
}
body.v2 .v2-imgbar[hidden], body.v2 .v2-imggrip[hidden] { display: none; }
body.v2 .v2-imgbar .img-lbl { color: #C9D4D2; font-size: 12px; padding: 0 6px; }
body.v2 #v2-root .v2-imgbar button {
  font: inherit; font-size: 12.5px; color: #fff; background: none; border: 0; border-radius: 6px; min-height: 30px; padding: 0 8px; cursor: pointer;
}
body.v2 #v2-root .v2-imgbar button:hover { background: rgba(255, 255, 255, .12); }
body.v2 #v2-root .v2-imgbar button.is-danger { color: #FFB4AB; }
body.v2 .v2-imggrip {
  position: absolute; z-index: 26; width: 16px; height: 16px; border-radius: 4px; background: var(--v2-accent);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(20, 35, 40, .4); cursor: nwse-resize; touch-action: none;
}

/* before you send */
body.v2 .v2-checklist { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
body.v2 .v2-ck-card { padding: 18px; }
body.v2 .v2-ck-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
body.v2 .v2-ck-list { display: flex; flex-direction: column; gap: 12px; }
body.v2 .v2-ck { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
body.v2 .v2-ck.is-ok { color: var(--v2-muted); }
body.v2 .v2-ck-icon {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
body.v2 .v2-ck-icon.is-ok { background: #E3EFE7; color: var(--v2-done); }
body.v2 .v2-ck-icon.is-todo { background: var(--v2-draft-bg); color: var(--v2-draft-ink); }
body.v2 .v2-ck-icon.is-info { background: #ECEEED; color: var(--v2-ink-2); }
body.v2 .v2-ck-text { min-width: 0; }
body.v2 .v2-ck-text > div:first-child { font-weight: 600; }
body.v2 .v2-ck.is-ok .v2-ck-text > div:first-child { font-weight: 500; }
body.v2 .v2-ck-detail { color: var(--v2-muted); font-size: 13px; margin-top: 2px; word-break: break-word; }
body.v2 #v2-root .v2-ck .v2-link { font-size: 13px; padding: 2px 0; }
body.v2 .v2-ck-foot { border-top: 1px solid var(--v2-line-soft); margin-top: 16px; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

@media (max-width: 1280px) {
  body.v2 .v2-rep-layout { grid-template-columns: 220px minmax(0, 1fr) 260px; gap: 16px; padding: 16px; }
  body.v2 .v2-page { padding: 0.6in 0.6in; }
  body.v2 .v2-fb { margin: 0 -0.5in 0 -0.55in; padding-right: 0.5in; }
  body.v2 .v2-fb-gutter { width: 0.55in; }
  body.v2 .v2-fb-end { width: 0.5in; }
}
@media (max-width: 1080px) {
  body.v2 .v2-rep-layout { grid-template-columns: minmax(0, 1fr); }
  body.v2 .v2-outline, body.v2 .v2-checklist { position: static; max-height: none; }
}

/* ============ equipment library ============ */
body.v2 #v2-root [hidden] { display: none !important; }
body.v2 .v2-lib-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
body.v2 .v2-lib-nav { position: sticky; top: 88px; padding: 10px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 112px); overflow-y: auto; }
body.v2 #v2-root .v2-lib-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: var(--v2-ink); font-size: 14.5px; font-weight: 500; min-height: 40px;
}
body.v2 #v2-root .v2-lib-nav a:hover { background: var(--v2-bg); }
body.v2 .v2-lib-secs { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
body.v2 .v2-lib-sec > .v2-h2 { margin-bottom: 8px; }
body.v2 .v2-lib-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--v2-line-soft); }
body.v2 .v2-lib-thumbs { display: grid; grid-template-columns: repeat(2, 56px); gap: 6px; flex-shrink: 0; }
body.v2 .v2-lib-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--v2-line); display: block; }
body.v2 .v2-lib-thumbs img:only-child { grid-column: span 2; width: 118px; height: 80px; }
body.v2 .v2-lib-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
body.v2 .v2-lib-main .v2-eq-desc { word-break: break-word; }
body.v2 .v2-lib-actions { display: flex; gap: 8px; flex-shrink: 0; }
body.v2 .v2-lib-add { padding-top: 14px; border-top: 1px solid var(--v2-line-soft); }
body.v2 .v2-lib-form { border: 1px solid #9CC2CB; background: #F6FAFA; border-radius: 12px; padding: 18px; margin: 4px 0 16px; }
body.v2 .v2-thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; align-items: center; }
body.v2 .v2-thumb { position: relative; }
body.v2 .v2-thumb img { width: 96px; height: 96px; object-fit: cover; display: block; border-radius: 10px; border: 1px solid var(--v2-line); background: #fff; }
body.v2 #v2-root .v2-thumb button {
  position: absolute; top: -8px; width: 26px; height: 26px; min-height: 0; border-radius: 50%; border: 2px solid #fff;
  background: #1F2B2E; color: #fff; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.v2 #v2-root .v2-thumb .v2-thumb-x { right: -8px; }
body.v2 #v2-root .v2-thumb .v2-thumb-mv { left: -8px; }
body.v2 .v2-lib-picrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
body.v2 .v2-form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 900px) {
  body.v2 .v2-lib-layout { grid-template-columns: minmax(0, 1fr); }
  body.v2 .v2-lib-nav { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  body.v2 .v2-lib-item { flex-wrap: wrap; }
}

/* ============ settings ============ */
body.v2 .v2-set-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
body.v2 .v2-set-tabs { position: sticky; top: 88px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
body.v2 #v2-root .v2-set-tabs a {
  display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--v2-ink-2);
  font-weight: 500; min-height: 40px;
}
body.v2 #v2-root .v2-set-tabs a:hover { background: var(--v2-bg); color: var(--v2-ink); }
body.v2 #v2-root .v2-set-tabs a.is-on { background: var(--v2-tint); color: var(--v2-tint-ink); font-weight: 700; }
body.v2 .v2-set-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
body.v2 .v2-set-body > .v2-card > .v2-hint { margin-top: 6px; }
body.v2 .v2-set-row { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--v2-line-soft); display: flex; flex-direction: column; gap: 6px; }
body.v2 .v2-set-row .v2-hint { margin-left: 50px; }
body.v2 .v2-set-list { margin-top: 14px; border-top: 1px solid var(--v2-line-soft); }
body.v2 .v2-set-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--v2-line-soft);
  background: var(--v2-card); flex-wrap: wrap;
}
body.v2 .v2-set-item.is-off .v2-set-item-name { color: var(--v2-muted); font-weight: 500; }
body.v2 .v2-set-item-main { flex: 1; min-width: 160px; display: flex; flex-direction: column; cursor: pointer; }
body.v2 .v2-set-item-name { font-weight: 600; }
body.v2 .v2-set-slot:empty { display: none; }
body.v2 .v2-btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
body.v2 .drag-ghost.v2-set-item { display: flex; }
@media (max-width: 900px) {
  body.v2 .v2-set-layout { grid-template-columns: minmax(0, 1fr); }
  body.v2 .v2-set-tabs { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ============ phone ============ */
body.v2.v2-phone { background: var(--v2-bg); }
body.v2 .v2-ph-head {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  background: var(--v2-card); border-bottom: 1px solid var(--v2-line); padding: 10px 16px; min-height: 60px;
}
body.v2 #v2-root .v2-ph-title { font-size: 20px; font-weight: 700; flex: 1; }
body.v2 .v2-ph-head-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
body.v2 .v2-ph-head-title b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v2 .v2-ph-head-title span { font-size: 13px; color: var(--v2-muted); }
body.v2 .v2-ph-main { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
body.v2 .v2-ph-notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--v2-tint); color: var(--v2-tint-ink); font-size: 14px; line-height: 1.4;
}
body.v2 .v2-ph-notice .v2-icon { margin-top: 1px; }
body.v2 .v2-ph-search { width: 100%; }
body.v2 .v2-ph-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
body.v2 #v2-root .v2-ph-chips .v2-pill { white-space: nowrap; min-height: 40px; }
body.v2 .v2-ph-list { display: flex; flex-direction: column; gap: 10px; }
body.v2 #v2-root .v2-ph-card {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--v2-radius);
  background: var(--v2-card); border: 1px solid var(--v2-line); text-decoration: none; color: var(--v2-ink);
}
body.v2 #v2-root .v2-ph-card:active { background: #F3F6F5; }
body.v2 .v2-ph-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
body.v2 .v2-ph-card-name { font-weight: 700; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.v2 .v2-ph-card .v2-progress.is-full { width: 100%; margin: 4px 0 0; }
body.v2 .v2-ph-foot { text-align: center; color: var(--v2-muted); font-size: 13.5px; padding: 8px 0 24px; }
body.v2 .v2-ph-notes {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--v2-draft-bg);
  color: var(--v2-draft-ink); font-size: 14px; font-weight: 600;
}
body.v2 .v2-ph-notes span:nth-child(2) { flex: 1; }
body.v2 .v2-ph-jump {
  position: sticky; top: 60px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px;
  background: var(--v2-bg); border-bottom: 1px solid var(--v2-line);
}
body.v2 #v2-root .v2-ph-jump a {
  flex-shrink: 0; padding: 8px 12px; border-radius: 999px; background: var(--v2-card); border: 1px solid var(--v2-line);
  text-decoration: none; color: var(--v2-ink-2); font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
body.v2 .v2-ph-sheet {
  background: #fff; color: #1b2733; border-radius: 10px; padding: 22px 16px; font-size: 12.5pt; line-height: 1.6;
  border: 1px solid var(--v2-line);
}
body.v2 .v2-ph-sheet .blk ul, body.v2 .v2-ph-sheet .blk ol { margin: 4px 0; padding-left: 26px; }
body.v2 #v2-root .v2-ph-sheet a { color: #0b5f7d; word-break: break-word; }
body.v2 .v2-ph-sheet img { max-width: 100%; }
/* pictures stack full width, as they do in the shared file on a phone */
body.v2 .v2-ph-sheet .rep-imgs { display: block !important; }
body.v2 .v2-ph-sheet .rep-img { max-width: 100% !important; width: 100% !important; flex-basis: auto !important; margin-bottom: 10px; }
body.v2 .v2-ph-sheet .rep-img img { height: auto !important; max-height: 60vh; }
body.v2 .v2-ph-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ============ report editor: edit history ============ */
body.v2 .v2-checklist { max-height: calc(100vh - 112px); overflow-y: auto; padding-bottom: 4px; }
body.v2 .v2-col { display: flex; flex-direction: column; gap: 16px; }
body.v2 .v2-col:empty { display: none; }
body.v2 .v2-undo-pair { display: inline-flex; gap: 4px; margin-right: 4px; }
body.v2 .v2-hist-note { margin: 0 0 12px; font-size: 12.5px; }
body.v2 #v2-root .v2-hist-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--v2-line-soft); }
body.v2 .v2-hist-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--v2-line-soft); font-size: 13.5px;
}
body.v2 .v2-hist-text { flex: 1; min-width: 0; }
body.v2 .v2-hist-text > div:first-child { word-break: break-word; }
body.v2 .v2-hist-text .v2-hint { font-size: 12px; }
body.v2 .v2-hist-row.is-now .v2-hist-text > div:first-child { font-weight: 700; }
body.v2 .v2-hist-row.is-undone { opacity: .55; }
body.v2 #v2-root .v2-hist-row .v2-link { font-size: 12.5px; white-space: nowrap; }
body.v2 #v2-root .v2-hist > .v2-link { margin-top: 8px; font-size: 13px; }
body.v2 .v2-menu.is-floating { position: fixed; right: auto; z-index: 60; }
