:root {
  --navy: #0b2540; --navy2: #12365c; --sea: #1f6fb2; --sea-l: #e8f1fa;
  --ink: #17202a; --muted: #6b7785; --line: #e1e6ec; --bg: #f4f6f9; --card: #fff;
  --red: #c62828; --red-l: #fdecea; --amber: #b26a00; --amber-l: #fff4e0;
  --green: #2e7d32; --green-l: #e8f5e9; --grey-l: #eef0f3;
  --radius: 10px; --nav-w: 230px; --top-h: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; margin: 0 0 .25rem; }
h2 { font-size: 1.12rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.muted, .sub { color: var(--muted); }
.sub { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.prose { white-space: pre-wrap; }

/* layout */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top-h); background: var(--navy); color: #fff; display: flex; align-items: center; gap: 16px; padding: 0 16px; z-index: 30; }
.brand { color: #fff; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.anchor { opacity: .8; }
.search { flex: 1; max-width: 560px; }
.search input { width: 100%; border: 0; border-radius: 8px; padding: 9px 12px; background: var(--navy2); color: #fff; font-size: .95rem; }
.search input::placeholder { color: #9fb3c8; }
.who { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: .9rem; white-space: nowrap; }
.who a, .linkbtn { color: #cfe0f1; }
.linkbtn { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.sidebar { position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--nav-w); background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 8px 0 20px; z-index: 20; }
.sidebar a { display: block; padding: 6px 20px; color: var(--ink); font-size: .93rem; }
.sidebar a:hover { background: var(--sea-l); text-decoration: none; }
.sidebar a.active { background: var(--sea-l); color: var(--sea); font-weight: 600; border-left: 3px solid var(--sea); padding-left: 17px; }
.navgroup { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 20px 4px; font-weight: 600; }
.navfoot { font-size: .75rem; color: var(--muted); padding: 18px 20px 0; }
main.with-nav { margin-left: var(--nav-w); padding: calc(var(--top-h) + 22px) 28px 40px; max-width: 1400px; }
main.bare { max-width: 440px; margin: 8vh auto; padding: 0 16px; }
.scrim { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 2px 0 12px rgba(0,0,0,.15); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 15; }
  main.with-nav { margin-left: 0; padding: calc(var(--top-h) + 14px) 12px 30px; }
  .who a { display: none; }
  .search input { font-size: 16px; }
}
@media (max-width: 600px) {
  .topbar .search { display: none; }
  .hide-sm { display: none; }
  .stat .n { font-size: 1.5rem; }
}
.only-sm, .sidebar a.only-sm { display: none; }
@media (max-width: 600px) { .sidebar a.only-sm { display: block; } }

/* page header */
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }

/* cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.card > h2:first-child { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card h2 .more { font-size: .82rem; font-weight: 500; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3 { grid-template-columns: 1fr; } }
.grid > .card { margin-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: block; color: var(--ink); border-top: 4px solid var(--line); }
.stat:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.stat .n { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat .l { font-size: .85rem; color: var(--muted); }
.stat.red { border-top-color: var(--red); } .stat.red .n { color: var(--red); }
.stat.amber { border-top-color: #f0a020; } .stat.amber .n { color: var(--amber); }
.stat.green { border-top-color: var(--green); } .stat.green .n { color: var(--green); }
.stat.blue { border-top-color: var(--sea); }

/* tables */
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.list td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
table.list tr.row-soon td:first-child { box-shadow: inset 3px 0 0 #f0a020; }
.tablewrap { overflow-x: auto; }
table.kv { width: 100%; border-collapse: collapse; }
table.kv th { text-align: left; width: 34%; color: var(--muted); font-weight: 500; padding: 6px 10px 6px 0; vertical-align: top; font-size: .9rem; }
table.kv td { padding: 6px 0; vertical-align: top; }
table.kv tr + tr th, table.kv tr + tr td { border-top: 1px solid var(--line); }

/* badges */
.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: var(--grey-l); color: #4a5563; }
.b-overdue, .b-bad, .b-Critical, .b-expired { background: var(--red-l); color: var(--red); }
.b-soon, .b-due, .b-warn, .b-High, .b-Waiting.parts { background: var(--amber-l); color: var(--amber); }
.b-ok, .b-done, .b-Closed, .b-OK { background: var(--green-l); color: var(--green); }
.b-Open, .b-In { background: var(--sea-l); color: var(--sea); }
.b-Issue { background: var(--red-l); color: var(--red); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #c3cad3; margin-right: 6px; vertical-align: middle; }
.dot.overdue { background: var(--red); } .dot.soon { background: #f0a020; } .dot.ok { background: var(--green); }

/* buttons & forms */
.btn { display: inline-block; background: #fff; border: 1px solid #c9d2dc; color: var(--ink); padding: 7px 14px; border-radius: 8px; font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn.primary { background: var(--sea); border-color: var(--sea); color: #fff; }
.btn.primary:hover { background: #185d96; }
.btn.danger { color: var(--red); border-color: #efc4c4; }
.btn.small { padding: 3px 10px; font-size: .82rem; }
.btn.big { padding: 11px 20px; font-size: 1rem; }
form.stack .field { margin-bottom: 14px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.help { font-size: .8rem; color: var(--muted); margin-top: 3px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=email], input:not([type]), select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #c9d2dc; border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc4ea; border-color: var(--sea); }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.formgrid .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .formgrid { grid-template-columns: 1fr; } }
.formactions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters input, .filters select { width: auto; min-width: 180px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--sea-l); border: 1px solid #c4dcf2; }
.flash.ok { background: var(--green-l); border-color: #bfe0c1; }
.flash.error { background: var(--red-l); border-color: #f2c0bb; }
.flash.warn { background: var(--amber-l); border-color: #f3d39b; }

/* equipment */
.eqhead { display: flex; gap: 18px; flex-wrap: wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; margin-top: 6px; }
.facts b { color: var(--muted); font-weight: 500; margin-right: 4px; }
.callout { border-left: 4px solid #f0a020; background: var(--amber-l); padding: 10px 14px; border-radius: 6px; }
.callout.blue { border-left-color: var(--sea); background: var(--sea-l); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active, .tabs a:hover { color: var(--sea); border-bottom-color: var(--sea); text-decoration: none; }

/* overview */
.system { margin-bottom: 22px; }
.system h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.eqcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.eqcard { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--ink); display: block; border-left: 4px solid #c3cad3; }
.eqcard:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.eqcard.overdue { border-left-color: var(--red); } .eqcard.soon { border-left-color: #f0a020; } .eqcard.ok { border-left-color: var(--green); }
.eqcard .name { font-weight: 600; }

/* checklist run */
.checkitem { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.checkitem .note { grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1px solid #c9d2dc; border-radius: 8px; overflow: hidden; }
.seg input { display: none; }
.seg label { margin: 0; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: .85rem; border-right: 1px solid #c9d2dc; user-select: none; }
.seg label:last-of-type { border-right: 0; }
.seg input:checked + label.ok { background: var(--green); color: #fff; }
.seg input:checked + label.issue { background: var(--red); color: #fff; }
.seg input:checked + label.na { background: #8a96a3; color: #fff; }

/* rest grid */
.restgrid { border-collapse: collapse; font-size: .75rem; user-select: none; }
.restgrid th { font-weight: 500; color: var(--muted); padding: 2px 0; text-align: left; }
.restgrid td.slot { width: 15px; height: 26px; border: 1px solid #dfe5ec; background: #fff; cursor: pointer; padding: 0; }
.restgrid td.slot.w { background: var(--sea); border-color: #185d96; }
.restgrid td.slot.h { border-left: 2px solid #9aa6b3; }
.restgrid td.slot.unset { background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 3px, #f0f2f5 3px, #f0f2f5 6px); }
.restgrid td.daylab { padding-right: 10px; white-space: nowrap; font-size: .85rem; }
.restgrid td.res { padding-left: 10px; white-space: nowrap; font-size: .82rem; }

/* plans gallery */
.plan-group-head { margin: 1.6rem 0 .7rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1.2rem; }
.plan-group-head:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: .4rem; }
.gallery .item { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gallery img { width: 100%; height: 200px; object-fit: contain; background: #f7f8fa; display: block; }
.gallery .pdf { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; background: #f7f8fa; color: var(--muted); }
.gallery .cap { padding: 8px 12px; }

.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.authcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.authcard h1 { text-align: center; }
.logo { text-align: center; font-size: 2.6rem; color: var(--navy); }

@media print {
  .topbar, .sidebar, .actions, .btn, .filters, .flash, form.inline { display: none !important; }
  main.with-nav { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; font-size: 11px; }
  .card { border: 0; padding: 0; break-inside: avoid; }
  a { color: inherit; }
}

/* ---------- v1.1: plans, manuals, import ---------- */
.planlayout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .planlayout { grid-template-columns: 1fr; } }
.planwrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: 78vh; position: relative; }
.planinner { position: relative; width: 100%; margin: 0 auto; }
.planinner img { width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.planwrap.editing .planinner { cursor: crosshair; }
.pin { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: #8a96a3;
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); z-index: 2; display: block; }
.pin:hover { text-decoration: none; transform: scale(1.25); z-index: 5; }
.pin.overdue { background: var(--red); } .pin.soon { background: #f0a020; } .pin.ok { background: var(--green); } .pin.unknown { background: #8a96a3; }
.pin .tip { display: none; position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff;
  font-size: .78rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.pin:hover .tip, .pin.hl .tip, .showlabels .pin .tip { display: block; }
.showlabels .pin .tip { background: rgba(11,37,64,.85); font-size: .7rem; padding: 2px 6px; }
.pin.hl { transform: scale(1.4); z-index: 6; animation: pulse 1.2s ease-in-out infinite; }
.pin.defect::after { content: "!"; position: absolute; right: -9px; top: -9px; background: var(--red); color: #fff; font-size: 10px;
  font-weight: 700; width: 14px; height: 14px; border-radius: 50%; text-align: center; line-height: 14px; }
.pin.hidden { display: none; }
.planwrap.editing .pin { cursor: grab; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(31,111,178,.6); } 50% { box-shadow: 0 0 0 10px rgba(31,111,178,0); } }
.pinlist a.pi { display: flex; gap: 8px; align-items: center; padding: 4px 0; color: var(--ink); font-size: .9rem; }
.pinlist .sys { font-size: .72rem; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; letter-spacing: .05em; }
.newpin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px dashed var(--sea); background: rgba(31,111,178,.2); z-index: 4; }
.minimap { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: block; }
.minimap img { width: 100%; display: block; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photos img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; display: block; }
.eqcard .thumb { float: right; width: 52px; height: 52px; object-fit: cover; border-radius: 6px; margin-left: 8px; }
.hit { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hit:last-child { border-bottom: 0; }
.hit .snip { font-size: .88rem; color: #3a4654; }
.hit mark { background: #fff1a8; padding: 0 1px; }
.answer { white-space: pre-wrap; line-height: 1.55; }
a.cite { font-size: .8rem; background: var(--sea-l); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.change { display: grid; grid-template-columns: 24px 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.change .det { font-size: .84rem; color: #3a4654; }
.change.child { padding-left: 22px; }
.kindtag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: 6px; }
.working::after { content: " …"; }

/* ---------- simple view ---------- */
.hello { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px; color: var(--ink);
  display: block; border-bottom: 6px solid var(--sea); min-height: 150px; }
.tile:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.tile .ico { font-size: 2.4rem; line-height: 1; }
.tile .big { font-size: 1.35rem; font-weight: 700; margin-top: 10px; }
.tile .small { color: var(--muted); margin-top: 4px; }
.tile.red { border-bottom-color: var(--red); } .tile.red .small { color: var(--red); font-weight: 700; }
.tile.amber { border-bottom-color: #f0a020; } .tile.amber .small { color: var(--amber); font-weight: 700; }
.tile.green { border-bottom-color: var(--green); }
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tile { min-height: 120px; padding: 16px 14px; }
  .tile .big { font-size: 1.1rem; } .tile .ico { font-size: 2rem; } }
.simpleh { font-size: 1.6rem; margin-bottom: 14px; }
.job { background: #fff; border: 1px solid var(--line); border-left: 6px solid #f0a020; border-radius: 12px; padding: 14px 16px;
  margin-bottom: 10px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.job.late { border-left-color: var(--red); }
.job .jobtext { flex: 1; min-width: 0; }
.job .jobtitle { font-size: 1.12rem; font-weight: 600; }
.simpleform { max-width: 620px; font-size: 1.05rem; }
.simpleform textarea, .simpleform select, .simpleform input { font-size: 1.05rem; padding: 12px; }
.simpleform label { font-size: 1rem; }
.urgent { font-size: 1.1rem; padding: 10px 0; }
.urgent input { width: 22px; height: 22px; }

/* ---------- v1.3 components ---------- */
details.comp { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; background: #fbfcfd; }
details.comp > summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
details.comp[open] { background: #fff; }
.pn { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: #34495e; }
a.manlink { font-size: .8rem; background: var(--sea-l); padding: 1px 7px; border-radius: 5px; white-space: nowrap; margin-left: auto; }
.compfilter { margin-bottom: 10px; max-width: 360px; }
table.parts { font-size: .88rem; margin-top: 4px; }

/* ---------- v1.3 simple layout: no sidebar, one column, day steps ---------- */
main.simple-main { max-width: 980px; margin: 0 auto; padding: calc(var(--top-h) + 24px) 20px 50px; }
.simplebar .homebtn { background: #fff; color: var(--navy); font-weight: 700; padding: 7px 14px; border-radius: 8px; }
.simplebar .homebtn:hover { text-decoration: none; background: var(--sea-l); }
.simplebar .who { gap: 16px; }
@media (max-width: 600px) { .simplebar .brand { font-size: .9rem; } .simplebar .who a { display: none; } }
.day { position: relative; }
.step { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 12px; position: relative; }
.step::after { content: ""; position: absolute; left: 39px; bottom: -13px; height: 13px; border-left: 3px dotted #c3cfdb; }
.step:last-child::after { display: none; }
.step .num { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--sea); color: #fff; font-weight: 700;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.step .stepbody { flex: 1; min-width: 0; }
.step .when { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.step .steptitle { font-size: 1.2rem; font-weight: 700; }
.step.done { background: #f6fbf6; border-color: #cfe6d0; }
.step.done .num { background: var(--green); }
.step.done .steptitle { color: #4a6b4c; }
.step.late { border-left: 6px solid var(--red); }
.step.late .num { background: var(--red); }
@media (max-width: 600px) { .step { flex-wrap: wrap; padding: 14px; } .step .btn { width: 100%; text-align: center; } }
.moves { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.moves .btn { flex: 1; min-width: 220px; text-align: center; }
.moves .sub { display: block; font-size: .78rem; }
.simple-main.wide { max-width: 1500px; }

/* ---------- v1.5: tabs header (replaces sidebar) ---------- */
.sidebar, .scrim, .topbar { display: none !important; }
.hdr { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); }
.hdr-top { display: flex; align-items: center; gap: 16px; padding: 10px 20px 6px; max-width: 1440px; margin: 0 auto; }
.hdr .brand { color: #fff; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.hdr .brand:hover { text-decoration: none; }
.hdr .search { flex: 1; max-width: 560px; }
.hdr .search input { width: 100%; border: 0; border-radius: 8px; padding: 9px 12px; background: var(--navy2); color: #fff; font-size: .95rem; }
.hdr .search input::placeholder { color: #9fb3c8; }
.hdr .who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.hdr .searchicon { display: none; color: #fff; font-size: 1.2rem; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; color: #dbe7f3; padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-size: .92rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary, .menu summary:hover { background: var(--navy2); }
.menu-pop { position: absolute; right: 0; top: 40px; background: #fff; color: var(--ink); border-radius: 10px; min-width: 250px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 6px; z-index: 50; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; color: var(--ink);
  background: none; border: 0; font: inherit; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--sea-l); text-decoration: none; }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu-pop form { margin: 0; }
.tabs-main { display: flex; gap: 2px; padding: 0 14px; max-width: 1440px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.tabs-main::-webkit-scrollbar { display: none; }
.tabs-main a { color: #b9cbe0; padding: 10px 16px 11px; border-radius: 10px 10px 0 0; white-space: nowrap; font-weight: 600; font-size: .98rem; }
.tabs-main a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.06); }
.tabs-main a.active { background: var(--bg); color: var(--navy); }
.subtabs { display: flex; gap: 6px; padding: 12px 20px 0; max-width: 1440px; margin: 0 auto; overflow-x: auto; }
.subtabs a { padding: 6px 14px; border-radius: 99px; color: #4a5563; white-space: nowrap; font-size: .9rem; border: 1px solid var(--line); background: #fff; }
.subtabs a:hover { text-decoration: none; border-color: #b9c6d4; }
.subtabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
main.page { max-width: 1440px; margin: 0 auto; padding: 22px 20px 50px; }
main.page.narrow { max-width: 980px; }
@media (max-width: 760px) {
  .hdr .search { display: none; }
  .hdr .searchicon { display: inline; }
  .hdr-top { padding: 10px 12px 4px; }
  .tabs-main { padding: 0 6px; }
  .tabs-main a { padding: 9px 11px 10px; font-size: .92rem; }
  main.page { padding: 16px 12px 40px; }
  .subtabs { padding: 10px 12px 0; }
}
@media print { .hdr, .subtabs { display: none !important; } main.page { padding: 0; max-width: none; } }
.modpick { display: grid; gap: 8px; margin: 4px 0 6px; }
.modpick .mod { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; align-items: start; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-weight: 400; cursor: pointer; background: #fff; }
.modpick .mod input { margin-top: 3px; width: 17px; height: 17px; }
.modpick .mod span { grid-column: 2; font-size: .82rem; color: var(--muted); }
.modpick .mod.on { background: #f6fbf6; cursor: default; }
.modpick .mod:has(input:checked) { border-color: #9cc4ea; background: #f5f9fd; }
.authcard { max-width: 560px; margin: 0 auto; }
main.bare { max-width: 600px; }

/* ---------- v2.0: centred header ---------- */
.hdr-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,560px) minmax(0,1fr); gap: 16px; }
.hdr .brand { justify-self: start; overflow: hidden; text-overflow: ellipsis; }
.hdr .search { max-width: none; width: 100%; justify-self: center; }
.hdr .who { justify-self: end; margin-left: 0; }
.tabs-main a:first-child, .subtabs a:first-child { margin-left: auto; }
.tabs-main a:last-child, .subtabs a:last-child { margin-right: auto; }
@media (max-width: 760px) {
  .hdr-top { grid-template-columns: minmax(0,1fr) auto; }
  .tabs-main a:first-child, .subtabs a:first-child { margin-left: 0; }
  .tabs-main a:last-child, .subtabs a:last-child { margin-right: 0; }
}

/* ---------- v2.0: boat hero on Home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); background: #fff; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
.hero.nophoto { grid-template-columns: 1fr; }
.hero-photo { background: var(--navy); min-height: 260px; }
.hero-photo img { width: 100%; height: 100%; max-height: 380px; object-fit: cover; display: block; }
.hero-info { padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; }
.hero-name { font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.hero-sub { color: var(--muted); margin: 4px 0 14px; }
.hero-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.hero-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.hero-facts dd { margin: 0; font-weight: 600; }
.hero-extra { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; margin-top: 12px; color: #3a4654; }
.hero-extra b { color: var(--muted); font-weight: 500; }
.hero-hours { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; }
.hero-hours a { color: var(--ink); }
.hero.small .hero-photo { min-height: 180px; }
.hero.small .hero-photo img { max-height: 240px; }
.hero.small .hero-name { font-size: 1.5rem; }
.hero.small .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { min-height: 0; }
  .hero-photo img { max-height: 230px; }
  .hero-info { padding: 14px 16px; }
  .hero-name { font-size: 1.5rem; }
  .hero.small .hero-facts, .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
}

/* ---------- v2.0: pin labels stay on screen ---------- */
.pin .tip { transform: translateX(calc(-50% + var(--dx, 0px))); }
.pin.tip-below .tip { bottom: auto; top: 24px; }
.pin.tapped .tip { display: block; z-index: 8; }
.pin.tapped { z-index: 7; }
.minimap .pin { pointer-events: auto; }

/* ---------- v2.0: floating Ask assistant ---------- */
.askfab-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; gap: 10px; align-items: center; }
.fab { border: 0; border-radius: 99px; background: var(--navy); color: #fff; font: inherit; font-weight: 700; font-size: 1rem;
  padding: 13px 20px; box-shadow: 0 6px 20px rgba(11,37,64,.35); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.fab:hover { background: var(--navy2); text-decoration: none; }
.fab-report { background: #fff; color: var(--ink); padding: 12px 15px; font-size: 1.15rem; }
.only-phone { display: none !important; }
body.ask-open .askfab-wrap { display: none; }
.askpanel { position: fixed; right: 20px; bottom: 20px; width: 420px; max-width: calc(100vw - 24px); height: min(620px, calc(100vh - 120px));
  background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25); z-index: 45; display: flex; flex-direction: column; overflow: hidden; }
.askpanel[hidden] { display: none; }
.askpanel header { background: var(--navy); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 6px; }
.askpanel header .sub { color: #b9cbe0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.askpanel header .linkbtn { color: #cfe0f1; margin-left: auto; font-size: .85rem; }
.askpanel header .askx { margin-left: 10px; font-size: 1.1rem; }
.asklog { flex: 1; overflow-y: auto; padding: 12px 14px; background: var(--bg); }
.askhint { color: var(--muted); font-size: .9rem; padding: 6px 2px 10px; }
.askmsg { margin: 8px 0; padding: 10px 12px; border-radius: 12px; font-size: .92rem; }
.askmsg.me { background: var(--sea); color: #fff; margin-left: 48px; white-space: pre-wrap; }
.askmsg.bot { background: #fff; border: 1px solid var(--line); margin-right: 16px; }
.askmsg.bot p { margin: 0 0 6px; }
.askmsg.working::after { content: " …"; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.ask-hit { display: block; color: var(--ink); padding: 7px 0; border-top: 1px solid var(--line); }
.ask-hit:hover { text-decoration: none; background: var(--sea-l); }
.ask-hit .snip { font-size: .82rem; color: #3a4654; }
.ask-hit mark { background: #fff1a8; }
.ask-src { margin-top: 8px; }
.ask-err { color: var(--red); }
#askForm { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
#askForm input { font-size: 16px; }
@media (max-width: 760px) {
  .only-phone { display: inline-flex !important; }
  .askfab-wrap { right: 12px; bottom: 12px; }
  .askpanel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 88vh; border-radius: 16px 16px 0 0; }
  main.page { padding-bottom: 90px; }
}
@media print { .askfab-wrap, .askpanel { display: none !important; } }

/* ---------- v2.0: equipment key features, drawings ---------- */
ul.features { margin: 0; padding-left: 20px; }
ul.features li { margin: 3px 0; }
.howto { line-height: 1.6; }
.figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.fig { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.fig img { width: 100%; height: 190px; object-fit: contain; background: #f7f8fa; display: block; cursor: zoom-in; }
.fig figcaption { padding: 8px 10px; font-size: .88rem; display: flex; flex-direction: column; gap: 2px; position: relative; }
.fig .figedit { position: absolute; right: 8px; top: 8px; }
.lightbox { position: fixed; inset: 0; background: rgba(8,20,35,.92); z-index: 60; display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-bar { display: flex; gap: 8px; align-items: center; padding: 10px 14px; color: #fff; }
.lb-bar span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-img { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 0 10px 10px; }
.lb-img img { max-width: 100%; max-height: 100%; background: #fff; cursor: zoom-in; }
.lb-img.zoom { display: block; }
.lb-img.zoom img { max-width: none; max-height: none; width: 220%; cursor: zoom-out; }
.cite-inline { font-size: .76rem; background: var(--sea-l); color: #34506b; padding: 0 5px; border-radius: 4px; white-space: nowrap; }
@media print { #drawings, .lightbox { display: none !important; } }

/* ---------- v2.0: job steps ---------- */
.howto-steps p { margin: 6px 0; }
ol.steps { margin: 6px 0 10px; padding-left: 0; list-style: none; counter-reset: st; }
ol.steps li { counter-increment: st; position: relative; padding: 8px 0 8px 40px; border-bottom: 1px solid var(--line); line-height: 1.5; }
ol.steps li:last-child { border-bottom: 0; }
ol.steps li::before { content: counter(st); position: absolute; left: 0; top: 7px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--sea-l); color: var(--sea); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.safety { background: var(--amber-l); border-left: 4px solid #f0a020; padding: 8px 12px; border-radius: 0; margin: 4px 0 8px; }
.gp { background: var(--sea-l); padding: 6px 10px; border-radius: 6px; font-size: .88rem; margin: 6px 0; list-style: none; }
.source { margin-top: 8px; }
ul.needs { margin: 4px 0; padding-left: 0; list-style: none; }
ul.needs li { padding: 5px 0 5px 26px; position: relative; border-bottom: 1px dashed var(--line); }
ul.needs li:not(.gp)::before { content: "☐"; position: absolute; left: 2px; color: var(--muted); }
ul.needs li.gp { padding-left: 10px; border-bottom: 0; margin-top: 6px; }

/* v2.0.1: pins on the small maps are their own links */
.minimap .mapbg { display: block; }
.minimap a.pin { text-decoration: none; }

/* layered boat map */
.layertabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.layertabs .lgroup { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 2px 0 8px; }
.layertabs .lgroup:first-child { margin-left: 0; }
.ltab { border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.ltab:hover { border-color: var(--sea); text-decoration: none; }
.ltab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.ltab .dot { margin: 0; }
.layerbox[hidden] { display: none; }
.layertabs.sticky { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 8px 0; margin-top: 0; }
.layercard { scroll-margin-top: 70px; }
.layernote { margin-top: 6px; }

.layertabs .lgroup { border: 0; border-left: 3px solid var(--line); background: none; font: inherit; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 2px 4px 2px 8px; margin: 0 4px 0 12px; cursor: pointer; text-decoration: none; }
.layertabs .lgroup:first-child { margin-left: 0; }
.layertabs .lgroup:hover { color: var(--navy); text-decoration: none; }

.hidden { display: none !important; }

/* yard drawings on the Plans page (v2.8) */
.dwg-search { display: flex; gap: 12px; align-items: center; margin: 1.4rem 0 .4rem; }
.dwg-search input { flex: 1; max-width: 520px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; }
.dwg-count { font-size: .9rem; font-weight: 400; }
.dwg-group { margin: 1.4rem 0 .4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.dwg-group > summary { cursor: pointer; font-size: 1.2rem; font-weight: 600; list-style: none; }
.dwg-group > summary::before, .dwg-sub > summary::before { content: '▸'; display: inline-block; width: 1.1em; color: var(--muted); transition: transform .15s; }
.dwg-group[open] > summary::before, .dwg-sub[open] > summary::before { transform: rotate(90deg); }
.dwg-group > summary::-webkit-details-marker, .dwg-sub > summary::-webkit-details-marker { display: none; }
.dwg-sub { margin: .5rem 0 0 1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dwg-sub > summary { cursor: pointer; padding: 9px 12px; font-weight: 500; list-style: none; }
.dwg-row { display: flex; align-items: baseline; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); color: var(--ink); }
.dwg-row:hover { background: #f7f8fa; text-decoration: none; }
.dwg-no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; color: var(--muted); min-width: 108px; }
.dwg-title { flex: 1; }
.dwg-tag { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 10px; background: #e8f0fb; color: #1d4f91; white-space: nowrap; }
.dwg-tag.layout { background: #e6f4ea; color: #1e6b34; }
.dwg-tag.system { background: #fdf0e1; color: #8a4b0f; }
.dwg-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; position: sticky; top: var(--top-h, 0); background: var(--bg); padding: 8px 0; z-index: 5; }
.dwg-nav select { flex: 1; min-width: 240px; max-width: 640px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; }
.dwg-nav .btn.disabled { opacity: .4; pointer-events: none; }
.dwg-page img { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.dwg-pageno { text-align: center; margin: 4px 0 16px; font-size: .85rem; }
@media (max-width: 700px) { .dwg-no { min-width: 0; } .dwg-row { flex-wrap: wrap; } }

/* v3.0 hosted boats: import warnings, banners, billing, getting started */
.callout.red { border-left-color: #c2412d; background: #fbe9e6; }
.callout.amber { border-left-color: #f0a020; background: var(--amber-l); }
label.change.variant { background: #fff7e6; }
.boatnote { padding: 9px 16px; font-size: .92rem; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.boatnote.info { background: #e3f1f3; color: #0f4a55; }
.boatnote.warn { background: #fff3d6; color: #6b4a00; }
.boatnote.bad { background: #fbe9e6; color: #8a2a1c; }
.boatnote a { font-weight: 600; }
.meter { height: 8px; border-radius: 6px; background: #e8edf2; overflow: hidden; margin: 6px 0 2px; }
.meter > i { display: block; height: 100%; background: var(--sea); }
.meter.full > i { background: #c2412d; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.gs-steps { counter-reset: s; list-style: none; padding: 0; }
.gs-steps > li { counter-increment: s; position: relative; padding: 14px 16px 14px 54px; border: 1px solid #dde3e9; border-radius: 10px; margin: 10px 0; background: #fff; }
.gs-steps > li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--sea); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.gs-steps > li.done::before { content: "✓"; background: #2f8a57; }
.engine-rows .row { display: grid; grid-template-columns: 1.2fr 1fr 1fr .7fr 1fr .7fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 760px) { .engine-rows .row { grid-template-columns: 1fr 1fr; } }

/* component delete links (equipment page) */
.linkbtn.danger-text { color: var(--red); text-decoration: underline; font-size: inherit; }
.comp-actions form.inline { display: inline; }
details.removed-comps > summary b { color: var(--muted, #667); }
details.removed-comps table { opacity: .85; }

/* ---- phones: tables as cards, nothing wider than the screen (v3.3) */
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
  main, .card, .pagehead, .page { min-width: 0; max-width: 100%; }
  td, .sub, .muted, p, li, dd, summary, label { overflow-wrap: anywhere; }
  h1, h2, h3, .card { overflow-wrap: break-word; }
  .card h2 { flex-wrap: wrap; row-gap: 2px; }
  .card h2 > .sub { flex: 1 1 100%; order: 3; margin-left: 0; }
  .card { padding-left: 12px; padding-right: 12px; }
  .tablewrap { overflow-x: visible; }
  table.list.stack, table.list.stack tbody, table.list.stack tr, table.list.stack td { display: block; width: 100%; }
  table.list.stack thead, table.list.stack tr:has(> th) { display: none; }
  table.list.stack tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; background: var(--card); }
  table.list.stack tr:last-child td { border-bottom: 0; }
  table.list.stack td { border: 0; padding: 4px 0; text-align: right; min-width: 0; }
  table.list.stack td::after { content: ""; display: table; clear: both; }
  table.list.stack td::before { content: attr(data-label); float: left; max-width: 42%; margin-right: 12px; text-align: left;
                                font-size: .74rem; line-height: 1.9; text-transform: uppercase; letter-spacing: .04em;
                                color: var(--muted); font-weight: 600; }
  table.list.stack td[data-label=""] { display: block; text-align: left; }
  table.list.stack td[data-label=""]::before { content: none; }
  table.list.stack td:first-child { display: block; text-align: left; font-weight: 600; font-size: .98rem; }
  table.list.stack td:first-child::before { float: none; display: block; max-width: none; margin-bottom: 2px; }
  table.list.stack td:empty, table.list.stack td.hide-sm { display: none; }
  table.list.stack td > * { min-width: 0; }
  table.list.stack tr.row-overdue { box-shadow: inset 4px 0 0 var(--red); }
  table.list.stack tr.row-soon { box-shadow: inset 4px 0 0 #f0a020; }
  table.list.stack tr.row-overdue td:first-child, table.list.stack tr.row-soon td:first-child { box-shadow: none; }
  table.list.stack td input, table.list.stack td select { max-width: 60%; }
  .pagehead { flex-wrap: wrap; gap: 8px; }
  .pagehead .actions, .btnrow { flex-wrap: wrap; }
  img, video, iframe, svg, canvas { max-width: 100%; height: auto; }
  pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .kv th { white-space: normal; }
  .grid > *, .formgrid > *, .field { min-width: 0; }
  input, select, textarea { max-width: 100%; }
  input[type=file] { width: 100%; }
  .btn { white-space: normal; max-width: 100%; }
}

/* v3.6 diagnose conversation */
.chat{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.msg{border:1px solid var(--line,#e3e6ea);border-radius:12px;padding:10px 14px;background:#fff;max-width:100%}
.msg.user{background:#f3f7fb;margin-left:min(12%,60px)}
.msg.assistant{margin-right:min(6%,30px)}
.msg .who{font-size:13px;font-weight:700;margin-bottom:4px}
.msg .body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.msgphoto{max-width:min(320px,100%);border-radius:8px;display:block;margin:4px 0 6px}

.eqhead h1{margin:0;line-height:1.25}
.eqhead h1 .mm{font-weight:500;color:#3d4a57}
.eqhead .sn{font-size:.95rem;color:var(--muted);margin:3px 0 8px}
.eqhead .sn b{color:var(--ink);font-weight:600}
.cardedit{font-size:.8rem;font-weight:600;border:1px solid var(--line);border-radius:6px;padding:3px 10px;color:var(--ink);background:#f7f9fb;white-space:nowrap}
.cardedit:hover{background:#eef2f6;text-decoration:none}
.eqlayout{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:14px;align-items:start}
.eqcol{display:flex;flex-direction:column;gap:14px;min-width:0}
.eqcol>.card{margin:0}
.notes-body{position:relative;overflow:hidden;transition:max-height .25s}
.notes-body.clamped:after{content:"";position:absolute;left:0;right:0;bottom:0;height:56px;background:linear-gradient(rgba(255,255,255,0),#fff)}
.notes-body h3{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:14px 0 4px}
.notes-body h3:first-child{margin-top:0}
.notes-body .issues{background:#fff8e6;border-left:3px solid #e0a100;padding:6px 10px;border-radius:4px}
.notes-toggle{display:block;width:100%;margin-top:6px;border:0;border-top:1px solid var(--line);background:none;padding:8px 0 0;color:var(--accent,#1f6feb);font-weight:600;cursor:pointer;font-size:.88rem}
.galsec h3{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:12px 0 6px}
.galsec h3:first-child{margin-top:0}
.gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.gal a{display:block;border-radius:6px;overflow:hidden;border:1px solid var(--line);background:#f4f6f9}
.gal img{width:100%;height:92px;object-fit:cover;display:block}
.gal span{display:block;font-size:.75rem;padding:4px 6px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:900px){.eqlayout{grid-template-columns:1fr}}
.filters label.check{display:inline-flex;align-items:center;gap:6px;width:auto;flex:0 0 auto;white-space:nowrap}
.filters label.check input{width:auto;min-width:0;margin:0}
.grid + .card, .grid + .tablewrap{margin-top:18px}
