:root {
  --bg: #f6f7f4; --surface: #ffffff; --surface-2: #f0f2ee; --ink: #16213a; --ink-2: #3d4a63; --muted: #66718a;
  --line: #dde2dc; --line-2: #cbd3cb; --accent: #0f766e; --accent-ink: #ffffff; --accent-soft: #e3f3f0; --accent-2: #134e4a;
  --action: #b42318; --action-soft: #fdecea; --review: #a15c07; --review-soft: #fdf3e2; --notes: #475467; --notes-soft: #eef0f3;
  --clear: #067647; --clear-soft: #e6f5ec; --info: #2459a8; --info-soft: #e8f0fc;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 20px rgba(16,24,40,.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412; --surface: #151d1b; --surface-2: #1b2522; --ink: #e8efec; --ink-2: #bfcac6; --muted: #8f9c98;
    --line: #26332f; --line-2: #33443f; --accent: #2dd4bf; --accent-ink: #062a26; --accent-soft: #123330; --accent-2: #99f6e4;
    --action: #f97066; --action-soft: #3a1714; --review: #fdb022; --review-soft: #36260c; --notes: #b3bdcb; --notes-soft: #232b37;
    --clear: #47cd89; --clear-soft: #0f2e1f; --info: #84adff; --info-soft: #162341; --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1412; --surface: #151d1b; --surface-2: #1b2522; --ink: #e8efec; --ink-2: #bfcac6; --muted: #8f9c98;
  --line: #26332f; --line-2: #33443f; --accent: #2dd4bf; --accent-ink: #062a26; --accent-soft: #123330; --accent-2: #99f6e4;
  --action: #f97066; --action-soft: #3a1714; --review: #fdb022; --review-soft: #36260c; --notes: #b3bdcb; --notes-soft: #232b37;
  --clear: #47cd89; --clear-soft: #0f2e1f; --info: #84adff; --info-soft: #162341; --shadow: 0 1px 2px rgba(0,0,0,.3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main:focus, main:focus-visible { outline: none; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 16px 48px; outline: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 5vw, 44px); } h2 { font-size: 24px; } h3 { font-size: 18px; }
p { margin: 0 0 .8em; } a { color: var(--accent); } small, .muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: .86em; word-break: break-all; }
button, input, select, textarea { font: inherit; color: inherit; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand img { width: 28px; height: 28px; } .brand span { font-family: var(--serif); font-size: 20px; }
.brand small { font-family: var(--sans); font-weight: 500; font-size: 11px; color: var(--muted); display: block; margin-top: -3px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .nav button.linkish { text-decoration: none; color: var(--ink-2); padding: 7px 10px; border-radius: 8px; font-size: 14px; border: 0; background: none; cursor: pointer; }
.nav a:hover, .nav a.active { background: var(--surface-2); color: var(--ink); }
.btn.menu-btn { display: none; margin-left: auto; }
@media (max-width: 760px) {
  .btn.menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 8px 16px 14px; }
  .nav.open { display: flex; } .nav a, .nav button.linkish { padding: 10px; text-align: left; }
}

/* ---------- basics */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); padding: 9px 15px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; min-height: 40px; }
.btn:hover { border-color: var(--ink-2); } .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--action); border-color: color-mix(in srgb, var(--action) 45%, var(--line)); }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: 13px; } .btn.ghost { border-color: transparent; background: transparent; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; } .card + .card { margin-top: 14px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
label.field { display: block; margin-bottom: 12px; } label.field > span { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); min-height: 42px; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap; }
.pill.action { background: var(--action-soft); color: var(--action); } .pill.review { background: var(--review-soft); color: var(--review); }
.pill.notes { background: var(--notes-soft); color: var(--notes); } .pill.clear { background: var(--clear-soft); color: var(--clear); }
.pill.info { background: var(--info-soft); color: var(--info); } .pill.not_checked, .pill.muted { background: var(--surface-2); color: var(--muted); }
.pill.error { background: var(--action-soft); color: var(--action); }
.sev-critical, .sev-high { color: var(--action); } .sev-medium { color: var(--review); } .sev-low { color: var(--notes); } .sev-info { color: var(--info); }
.banner { border-radius: var(--radius); padding: 14px 16px; border: 1px solid; margin-bottom: 14px; }
.banner.action { background: var(--action-soft); border-color: color-mix(in srgb, var(--action) 30%, transparent); }
.banner.review { background: var(--review-soft); border-color: color-mix(in srgb, var(--review) 30%, transparent); }
.banner.clear { background: var(--clear-soft); border-color: color-mix(in srgb, var(--clear) 30%, transparent); }
.banner.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 14px; } th, td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

/* ---------- hero / upload */
.hero { display: grid; gap: 18px 28px; grid-template-columns: 1.1fr .9fr; grid-template-areas: "title card" "prom card";
  grid-template-rows: auto 1fr; align-items: start; margin: 18px 0 26px; }
.hero .h-title { grid-area: title; } .hero .h-card { grid-area: card; } .hero .h-prom { grid-area: prom; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; grid-template-areas: "title" "card" "prom"; } }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 17.5px; color: var(--ink-2); max-width: 36em; }
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 18px; }
.promise { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.promise b { color: var(--ink); display: block; }
.promise .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; flex: none; font-weight: 800; }
.drop { border: 2px dashed var(--line-2); border-radius: 18px; padding: 26px 18px; text-align: center; background: var(--surface); transition: .15s; cursor: pointer; }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop .big { font-family: var(--serif); font-size: 21px; margin: 8px 0 4px; }
.drop input[type=file] { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.modes { display: grid; gap: 8px; }
.mode { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mode input { accent-color: var(--accent); margin-top: 4px; }
.mode b { display: block; font-size: 14px; } .mode small { display: block; }
details.adv summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 6px 0; }

/* ---------- workspace */
.doc-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.doc-head > .grow { min-width: min(100%, 420px); }
.doc-head h2 { word-break: break-word; margin-bottom: 4px; }
.facts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; margin: 6px 0 16px; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 13px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.tabs .count { font-size: 11px; background: var(--surface-2); border-radius: 999px; padding: 0 7px; }
.dim { display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 14px; min-height: 108px; transition: border-color .15s; }
.dim:hover { border-color: var(--ink-2); } .dim .t { font-weight: 700; } .dim .s { font-size: 13px; color: var(--muted); }
.dim.action { border-left: 4px solid var(--action); } .dim.review { border-left: 4px solid var(--review); } .dim.clear { border-left: 4px solid var(--clear); }
.dim.notes { border-left: 4px solid var(--notes); } .dim.not_checked, .dim.error { border-left: 4px solid var(--line-2); }
.progress { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width .4s; }
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; }
.steps li { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 14px; }
.steps li.done { color: var(--ink); } .steps li.now { color: var(--accent); font-weight: 700; }
.steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.steps li.done::before { background: currentColor; }
.finding { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 12px 14px; }
.finding + .finding { margin-top: 10px; }
.finding .ft { display: flex; gap: 10px; align-items: flex-start; }
.finding .ft b { flex: 1; font-size: 14.5px; }
.finding .fd { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.finding .ev { margin-top: 8px; font-size: 13px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; }
.finding .meta { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
@media (max-width: 700px) { .pair { grid-template-columns: 1fr; } }
.pair > div { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; }
.pair > div small { display: block; font-weight: 700; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; font-size: 10.5px; }
.pair mark { background: color-mix(in srgb, var(--review) 25%, transparent); color: inherit; border-radius: 3px; }
.sug { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sug input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 3px; }
.diff del { background: var(--action-soft); color: var(--action); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
.diff ins { background: var(--clear-soft); color: var(--clear); text-decoration: none; border-radius: 3px; padding: 0 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi b { display: block; font-family: var(--serif); font-size: 24px; } .kpi span { font-size: 12.5px; color: var(--muted); }
.bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.bar i { display: block; height: 100%; } .bar .l1 { background: var(--action); } .bar .l2 { background: var(--review); } .bar .l3 { background: #c4a55a; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cert { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 16px; }
.cert .code { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: .06em; }

/* ---------- overlays */
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(92vw, 520px); }
.toast { background: var(--ink); color: var(--bg); padding: 11px 14px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; }
.toast.err { background: var(--action); color: #fff; }
.modal-bg { position: fixed; inset: 0; background: rgba(10, 16, 14, .5); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; max-width: 640px; width: 100%; max-height: 88vh; overflow: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; } .modal header h3 { flex: 1; margin: 0; }
.boot { display: grid; place-items: center; min-height: 50vh; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-in { max-width: 1180px; margin: 0 auto; padding: 18px 16px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--muted); }
.prose { max-width: 760px; } .prose h2 { margin-top: 1.4em; } .prose li { margin-bottom: 6px; }
.noscript { padding: 20px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- phone app (installed PWA / Android / iOS) */
html { -webkit-text-size-adjust: 100%; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); overscroll-behavior-y: none; }
.topbar { padding-top: env(safe-area-inset-top); }
.footer { padding-bottom: env(safe-area-inset-bottom); }
#toast { bottom: calc(22px + env(safe-area-inset-bottom)); }
.netbanner { position: sticky; top: 0; z-index: 30; background: var(--review); color: #fff; text-align: center; font-size: 13.5px;
  padding: calc(6px + env(safe-area-inset-top)) 14px 6px; }
.netbanner[hidden] { display: none; }
.toast.row { display: flex; gap: 10px; align-items: center; }
.toast .btn.small { background: var(--bg); color: var(--ink); border-color: transparent; }
.install-btn { border-color: var(--accent); color: var(--accent); }
.install-steps li { margin-bottom: 8px; }
.scan-link { width: 100%; min-height: 44px; }
.scan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.scan-page { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.scan-page img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #fff; }
.scan-page figcaption { display: flex; align-items: center; gap: 2px; padding: 4px; }
.scan-page figcaption b { flex: 1; padding-left: 6px; font-size: 13px; }
.scan-page .btn.small { padding: 4px 7px; min-height: 30px; }
@media (display-mode: standalone) {
  .brand small { display: none; }               /* the installed app already shows its name */
  .footer-in { padding-top: 12px; padding-bottom: 12px; }
}
@media (pointer: coarse) {
  .btn, .chip, .tabs button, .nav a, .nav button.linkish { min-height: 44px; }   /* comfortable touch targets */
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
  input, select, textarea { font-size: 16px; }                                     /* stops iOS zooming into fields */
}
@media (max-width: 760px) {
  .nav { top: calc(56px + env(safe-area-inset-top)); max-height: calc(100vh - 70px); overflow-y: auto; }
  .tabs { position: sticky; top: calc(57px + env(safe-area-inset-top)); z-index: 10; background: var(--bg); margin-left: -16px; margin-right: -16px; padding: 0 12px; }
  .modal-bg { place-items: end center; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
.menu-label { display: none; }
@media (max-width: 760px) { .menu-label { display: inline; } }

/* ---------- live updates & service status */
.livedot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; margin-left: -4px; }
.livedot[data-state="live"] { background: var(--clear); box-shadow: 0 0 0 3px var(--clear-soft); }
.livedot[data-state="connecting"], .livedot[data-state="retry"] { background: var(--review); animation: pulse 1.2s ease-in-out infinite; }
.livedot[data-state="offline"] { background: var(--action); }
.livedot[hidden] { display: none; }
@keyframes pulse { 50% { opacity: .35; } }
.statusbanner { background: var(--info-soft); color: var(--info); text-align: center; font-size: 14px; padding: 7px 14px; border-bottom: 1px solid var(--line); }
.statusbanner.maint { background: var(--review-soft); color: var(--review); font-weight: 600; }
.statusbanner[hidden] { display: none; }

/* ---------------------------------------------------------------- document viewer, side-by-side evidence, diff */
.legendrow { gap: 8px; margin: 6px 0 10px; font-size: 13px; }
.docview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 16px; align-items: start; }
.paper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow);
  font-family: var(--serif, Georgia, serif); font-size: 16px; line-height: 1.7; max-height: 78vh; overflow: auto; overflow-wrap: anywhere; }
.paper p { margin: 0 0 1em; }
.paper .hidden-block { opacity: .75; border-left: 3px solid var(--action); padding-left: 10px; }
.docside { position: sticky; top: 74px; max-height: 78vh; overflow: auto; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; }
mark.hl, span.hl, button.hl { border-radius: 4px; padding: 0 2px; color: inherit; cursor: pointer; border: 0; font: inherit; }
.hl.l1 { background: var(--action-soft); box-shadow: inset 0 -2px 0 var(--action); }
.hl.l2 { background: var(--review-soft); box-shadow: inset 0 -2px 0 var(--review); }
.hl.l3 { background: var(--notes-soft); box-shadow: inset 0 -2px 0 var(--notes); }
.hl.priv { background: var(--info-soft); box-shadow: inset 0 -2px 0 var(--info); }
span.hl { display: inline-block; padding: 1px 8px; cursor: default; }
.hl.badge { font-size: 12px; padding: 1px 6px; }
mark.hl:focus-visible { outline-offset: 1px; }
.matchpanel .pair { margin-top: 8px; }
.matchpanel .pair > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; font-size: 14px; }
.matchpanel .only, .diffview .only { background: var(--review-soft); border-radius: 3px; }
.matchpanel .eq, .diffview .eq { color: var(--ink); }
.diffview { line-height: 1.8; overflow-wrap: anywhere; }
.diffview del { background: var(--action-soft); color: var(--action); text-decoration: line-through; border-radius: 3px; }
.diffview ins { background: var(--clear-soft); color: var(--clear); text-decoration: none; border-radius: 3px; }
.decision { border-left: 4px solid var(--accent); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 4px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.btn.sso { width: 100%; justify-content: center; text-align: center; }
.banner.lms { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.file-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
table.conn { table-layout: fixed; width: 100%; }
table.conn td { vertical-align: top; padding: 8px 6px; }
table.conn td:nth-child(1) { width: 42%; } table.conn td:nth-child(2) { width: 130px; } table.conn td:nth-child(3) { width: 70px; }
.conn-result { font-size: 12.5px; overflow-wrap: anywhere; }
.setting { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.setting:last-child { border-bottom: 0; }
.setting-in { gap: 6px; align-items: center; min-width: 260px; }
.setting-in input:not([type="checkbox"]), .setting-in textarea { min-width: 200px; flex: 1; }
@media (max-width: 900px) {
  .docview { grid-template-columns: 1fr; }
  .docside { position: static; max-height: none; }
  .paper { padding: 18px 16px; max-height: none; font-size: 15.5px; }
}
@media (max-width: 760px) {
  table.conn td:nth-child(n) { width: auto; }
  table.conn tr { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 8px; }
  table.conn td:last-child { grid-column: 1 / -1; }
  .setting-in { min-width: 0; width: 100%; }
}
