/* China Building Products: navy top bar, light grey page, white cards, one blue accent (29 Oct 2026). */

:root {
  --chrome: #0f2a44;
  --chrome-ink: #ffffff;
  --chrome-line: #1e3d5c;
  --page: #f1f5f9;
  --panel: #ffffff;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #5b6b7f;
  --line: #d9e1ea;
  --line-soft: #edf2f7;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: #e0e9ff;
  --blue: #1d4ed8;
  --blue-soft: #e0e9ff;
  --good: #15803d;
  --good-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --radius: 12px;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.55 "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--page);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  -webkit-text-size-adjust: 100%;
}
button, select, input, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--cond); font-weight: 700; letter-spacing: .01em; margin: 0 0 .4em; line-height: 1.15; }
h1 { font-size: 30px; } h2 { font-size: 24px; } h3 { font-size: 19px; } h4 { font-size: 16px; }
p { margin: 0 0 .7em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.stack > * + * { margin-top: 10px; }
.mt { margin-top: 14px; } .mt0 { margin-top: 0 !important; }

/* ---------- top bar ---------- */
.top {
  background: var(--chrome); color: var(--chrome-ink); display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--chrome-line); position: relative; z-index: 30;
}
.brand { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; min-width: 0; }
.brand b { font: 700 24px/1 var(--cond); text-transform: uppercase; letter-spacing: .03em; color: var(--chrome-ink); }
.brand span { font-size: 12.5px; opacity: .8; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.burger { display: none; border: 1px solid var(--chrome-line); background: transparent; color: var(--chrome-ink); border-radius: 8px; padding: 4px 10px; font-size: 18px; cursor: pointer; }
.pill { border: 1px solid var(--chrome-line); background: transparent; color: var(--chrome-ink); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.pill.ok { color: var(--good); } .pill.wait { color: var(--warn); } .pill.off { color: var(--bad); }
.me { display: flex; align-items: center; gap: 6px; border: 1px solid var(--chrome-line); background: transparent; color: var(--chrome-ink); border-radius: 999px; padding: 3px 12px 3px 4px; cursor: pointer; font-weight: 600; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; }
.side { background: var(--chrome); border-right: 1px solid var(--chrome-line); overflow-y: auto; padding: 10px 8px 24px; }
.side h5 { font: 700 12px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: #8fb0cf; margin: 16px 10px 6px; }
.side a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: var(--chrome-ink); text-decoration: none; font-weight: 500; }
.side a:hover { background: rgba(255,255,255,.08); }
.side a.on { background: var(--accent); color: #fff; }
.side a .n { margin-left: auto; font-size: 11.5px; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.side a .ic { width: 22px; text-align: center; }
.main { overflow-y: auto; padding: 18px 20px 60px; min-width: 0; scroll-behavior: smooth; }
.main > .view { max-width: 1180px; margin: 0 auto; }

.bottom { display: none; }

/* ---------- cards / layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card.flat { background: var(--panel); }
.card h3 { margin-bottom: 6px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gauto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi b { display: block; font: 700 30px/1.05 var(--cond); color: var(--accent); }
.kpi span { font-size: 12.5px; color: var(--muted); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.head h1, .head h2 { margin: 0; }
.head p { margin: 2px 0 0; color: var(--muted); }
.callout { border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.callout.warn { border-color: var(--warn); background: var(--warn-soft); }
.callout.bad { border-color: var(--bad); background: #f8e6e6; }
.callout.good { border-color: var(--good); background: var(--good-soft); }

/* ---------- controls ---------- */
.btn { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 14px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--line-soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: #e2b8b8; }
.btn.sm { padding: 4px 10px; font-size: 13px; font-weight: 500; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field { display: block; margin: 0 0 10px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
input[type=text], input[type=search], input[type=tel], input[type=email], input[type=url], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=password], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; min-height: 40px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #e8b3ab; border-color: var(--accent); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 11px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 12px; background: var(--blue-soft); color: var(--blue); margin: 1px 3px 1px 0; }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: #f8e6e6; color: var(--bad); }
.tag.red { background: var(--accent-soft); color: var(--accent); }
.badge-v { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 5px; margin-right: 5px; }
.badge-v.ok { background: var(--good-soft); color: var(--good); }
.badge-v.un { background: var(--warn-soft); color: var(--warn); }

.av { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 12px var(--cond); color: #fff; flex: none; }
.av.lg { width: 38px; height: 38px; font-size: 16px; }

/* ---------- tables / lists ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; font: 700 12.5px var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line); padding: 6px 8px; }
table.tbl td { border-bottom: 1px solid var(--line-soft); padding: 7px 8px; vertical-align: top; }
.tblwrap { overflow-x: auto; }
.list > .item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); }
.item.click { cursor: pointer; }
.item.click:hover { background: #fbf7ee; }
.sup { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); cursor: pointer; }
.sup:hover { border-color: var(--accent); }
.sup .logo { width: 46px; height: 46px; border-radius: 8px; background: var(--line-soft); object-fit: contain; flex: none; display: flex; align-items: center; justify-content: center; font: 700 18px var(--cond); color: var(--muted); }
.sup h4 { margin: 0; }
.stars { color: #e0a01a; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #ddd; }
.status { border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ---------- photos ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; background: var(--line-soft); display: block; }
.photos figcaption { font-size: 11.5px; color: var(--muted); }
.photos .wait { position: absolute; top: 4px; left: 4px; background: var(--warn); color: #fff; border-radius: 4px; font-size: 10px; padding: 0 5px; }

/* ---------- timeline / chat ---------- */
.tl > div { border-left: 3px solid var(--line); padding: 2px 0 12px 12px; margin-left: 6px; position: relative; }
.tl > div::before { content: ""; position: absolute; left: -7px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; gap: 8px; max-width: 760px; }
.msg .bub { background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 7px 12px; min-width: 0; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bub { background: var(--accent-soft); border-color: #eec9c3; border-radius: 14px 4px 14px 14px; }
.msg.pinned .bub { border-color: var(--warn); background: var(--warn-soft); }
.msg .who { font-size: 12px; color: var(--muted); }
.msg img { max-width: 240px; border-radius: 8px; display: block; margin-top: 4px; }
.mention { background: #ffe9a8; border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 30, 36, .55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 620px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal.wide { max-width: 900px; }
.modal h3 { font-size: 22px; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%) translateY(20px); background: #1f2a33; color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fab { position: fixed; right: 18px; bottom: 22px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 30px; line-height: 1; box-shadow: 0 6px 18px rgba(180, 55, 43, .45); cursor: pointer; }

/* ---------- accordion (guide sections) ---------- */
details.acc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 8px; }
details.acc > summary { cursor: pointer; padding: 10px 14px; font: 700 18px var(--cond); list-style: none; display: flex; align-items: center; gap: 8px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::before { content: "▸"; color: var(--accent); transition: .15s; }
details.acc[open] > summary::before { transform: rotate(90deg); }
details.acc > .body { padding: 2px 16px 12px; }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 6px 0; border-bottom: 1px solid var(--line-soft); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.facts li:last-child { border: 0; }
.facts a.src { font-size: 12px; margin-left: 4px; }

/* ---------- maps ---------- */
.mapbox { height: 520px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: #dfe9ee; }
svg.plan { width: 100%; height: auto; background: #fbf8f0; border: 1px solid var(--line); border-radius: var(--radius); }
svg.plan text { font-family: "Barlow", sans-serif; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  body { grid-template-rows: auto minmax(0, 1fr) auto; }
  .top { gap: 6px; padding: 6px 10px; min-width: 0; }
  .brand b { font-size: 20px; }
  .me span.small { display: none; }
  .me { padding: 3px; }
  .pill { padding: 3px 8px; font-size: 12px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
  .burger { display: block; }
  .brand span { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: fixed; z-index: 60; inset: 48px 0 0 0; padding-bottom: 90px; }
  .side.open { display: block; }
  .main { padding: 14px 14px 90px; }
  .bottom { display: flex; background: var(--chrome); border-top: 1px solid var(--chrome-line); padding-bottom: var(--safe-b); z-index: 50; }
  .bottom a { flex: 1; text-align: center; padding: 6px 2px 5px; color: var(--chrome-ink); text-decoration: none; font-size: 11.5px; position: relative; }
  .bottom a .ic { display: block; font-size: 20px; line-height: 1.1; }
  .bottom a.on { color: var(--accent); font-weight: 700; }
  .bottom a .n { position: absolute; top: 2px; left: 55%; background: var(--accent); color: #fff; border-radius: 999px; font-size: 10.5px; padding: 0 5px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 26px; }
  .fab { bottom: calc(74px + var(--safe-b)); }
  .toast { bottom: calc(86px + var(--safe-b)); }
  .mapbox { height: 420px; }
}
@media (max-width: 520px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .kpis.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .top, .side, .bottom, .fab, .btn, .toast { display: none !important; }
  body { display: block; background: #fff; }
  .main { overflow: visible; padding: 0; }
}

.stickybar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 12px; align-items: center; background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-top: 14px; box-shadow: 0 -4px 18px rgba(0,0,0,.10); }
@media (max-width: 860px) { .stickybar { bottom: 8px; flex-wrap: wrap; } .stickybar .btn { width: 100%; justify-content: center; } }

/* ---------- calendar ---------- */
.cal-grid { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cal-hr { border-top: 1px solid var(--line-soft); position: relative; cursor: pointer; }
.cal-hr:first-child { border-top: 0; }
.cal-hr.half { border-top: 1px dotted var(--line-soft); }
.cal-hr.half span { font-size: 10px; opacity: .55; }
.cal-hr:hover { background: #fbf7ee; }
.cal-hr span { position: absolute; left: 8px; top: 2px; font-size: 11.5px; color: var(--muted); }
.cal-blk { position: absolute; border-radius: 8px; padding: 3px 7px; font-size: 12.5px; line-height: 1.25; overflow: hidden; cursor: pointer; z-index: 2; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.cal-blk .av { width: 18px; height: 18px; font-size: 10px; }
.cal-task { position: absolute; left: 58px; right: 8px; background: #fff6d6; border: 1px dashed #d9b84a; border-radius: 6px; padding: 1px 8px; font-size: 12px; z-index: 3; cursor: pointer; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: #d21f2b; z-index: 4; }
.cal-ev { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; margin: 3px 0; cursor: pointer; font-size: 13px; }
.cal-ev .av { width: 18px; height: 18px; font-size: 10px; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-day { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-height: 150px; cursor: pointer; }
.cal-day.today, .cal-mc.today { outline: 2px solid var(--accent); }
.cal-dh { margin-bottom: 4px; }
.cal-month .cal-mh { display: grid; grid-template-columns: repeat(7, 1fr); font: 700 12px var(--cond); text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 4px; }
.cal-mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-mc { background: #fff; border: 1px solid var(--line-soft); border-radius: 8px; min-height: 84px; padding: 4px; cursor: pointer; overflow: hidden; }
.cal-mc.empty { background: transparent; border: 0; cursor: default; }
.cal-dot { color: #fff; border-radius: 4px; font-size: 11px; padding: 0 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .cal-week { grid-template-columns: minmax(0, 1fr); }
  .cal-day { min-height: 0; }
  .cal-mc { min-height: 58px; }
  .cal-dot { font-size: 10px; }
}

/* ---------- pipeline board ---------- */
.pl-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.pl-col { background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 240px; scroll-snap-align: start; }
.pl-head { background: #fff; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.pl-head .btn { margin-left: auto; }
.pl-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; cursor: grab; }
.pl-card:hover { border-color: var(--accent); }
.pl-card .av { width: 22px; height: 22px; font-size: 11px; }

/* ---------- supplier overview ---------- */
.supplier-overview { min-width: 0; }
.so-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 2px 0 22px; }
.so-heading h1 { font-size: 36px; margin: 0 0 7px; }
.so-heading p:not(.so-eyebrow) { max-width: 660px; color: var(--muted); margin: 0; }
.so-heading > .btn { flex: none; }
.so-eyebrow { display: block; margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.so-search { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(160px, 1fr) auto; gap: 12px; align-items: end; background: var(--panel); border: 1px solid var(--line); padding: 16px; border-radius: var(--radius); }
.so-search label, .so-category-controls label { min-width: 0; }
.so-search label > span, .so-category-controls label > span { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--muted); }
.so-search input, .so-search select, .so-search button, .so-category-controls input, .so-category-controls select { min-height: 46px; }
.so-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; border: 1px solid var(--chrome-line); border-radius: var(--radius); overflow: hidden; background: var(--chrome-ink); color: #fff; }
.so-totals > div { padding: 18px 22px; border-right: 1px solid rgba(255,255,255,.18); min-width: 0; overflow-wrap: anywhere; }
.so-totals > div:last-child { border: 0; }
.so-totals b { display: block; font: 700 34px/1.1 var(--cond); }
.so-totals b small { font-size: 21px; color: #c7dfd2; }
.so-totals span { display: block; font-size: 12px; color: #d8e8de; margin-top: 5px; }
.so-summary-note { margin: 8px 2px 0; color: var(--muted); font-size: 12px; }
.so-section { margin-top: 28px; scroll-margin-top: 18px; }
.so-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.so-section-heading h2 { margin: 0 0 4px; }
.so-section-heading p { color: var(--muted); font-size: 13px; margin: 0; }
.so-focus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.so-focus-card { display: flex; flex-direction: column; padding: 20px; min-width: 0; }
.so-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.so-card-heading h3 { margin: 0; font-size: 24px; }
.so-card-heading .tag { margin: 0; font-size: 11px; }
.so-source-count { display: flex; gap: 12px; align-items: baseline; margin: 8px 0 15px; }
.so-source-count b { font: 700 38px/1 var(--cond); color: var(--chrome-ink); }
.so-source-count span { color: var(--muted); font-size: 13px; }
.so-coverage { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.so-coverage > * { grid-column: span 2; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 8px; padding: 9px; color: var(--ink); text-decoration: none; min-width: 0; }
.so-coverage > :nth-child(n+4) { grid-column: span 3; }
.so-coverage a:hover { border-color: var(--accent); }
.so-coverage b { display: block; font: 700 22px/1.2 var(--cond); }
.so-coverage b small { font: 400 12px/1.2 Barlow, sans-serif; color: var(--muted); }
.so-coverage span { font-size: 11.5px; color: var(--muted); }
.so-contact-gap { font-size: 12px; color: var(--muted); margin: -7px 0 16px; }
.so-progress { border-top: 1px solid var(--line-soft); padding-top: 12px; margin: 0 0 16px; }
.so-progress-title { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; font-size: 12px; margin-bottom: 7px; }
.so-progress-title span { color: var(--muted); }
.so-progress-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.so-progress-counts dt { font-size: 11px; color: var(--muted); }
.so-progress-counts dd { margin: 2px 0 0; font: 700 24px/1.1 var(--cond); }
.so-progress p:last-child { margin-bottom: 0; }
.so-progress-note { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.so-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.so-card-actions .btn { min-height: 44px; justify-content: center; }
.so-card-footer { margin: 9px 0 0; }
.so-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.so-phase { display: flex; flex-direction: column; padding: 16px 18px; border-right: 1px solid var(--line); }
.so-phase:last-child { border: 0; }
.so-phase h3 { font-size: 23px; }
.so-phase > p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.so-phase > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.so-phase a { font-size: 13px; font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.so-category-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.so-category-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.so-category { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.so-category:hover { border-color: var(--accent); background: var(--panel); }
.so-category > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.so-category b { display: block; font-size: 13px; font-weight: 600; }
.so-category small { display: block; color: var(--muted); font-size: 11px; }
.so-category-count { text-align: right; font-weight: 700; flex: none; }
.so-category-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.so-category-empty { border: 1px dashed var(--line); border-radius: 10px; padding: 18px; color: var(--muted); font-size: 13px; }
.so-sources { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.so-source-row { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(60px, .55fr) minmax(70px, .65fr) minmax(140px, 1.2fr) auto; align-items: center; gap: 14px; padding: 15px 16px; border-bottom: 1px solid var(--line-soft); }
.so-source-row:last-child { border: 0; }
.so-source-name { min-width: 0; }
.so-source-name h3 { margin: 0 0 3px; }
.so-source-name .small { display: block; }
.so-coverage-line { color: var(--muted); font-size: 11.5px; margin: 5px 0 0; }
.so-coverage-line b { color: var(--ink); }
.so-source-stat b { display: block; font: 700 24px/1.2 var(--cond); }
.so-source-stat span { font-size: 11px; color: var(--muted); }
.so-source-state { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.so-source-state .tag { margin: 0; font-size: 10.5px; }
.so-next { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; padding: 20px; margin-top: 28px; }
.so-next h2 { margin-bottom: 8px; }
.so-next p:last-child { margin-bottom: 0; }
.so-next .so-card-actions { align-content: center; margin-top: 0; }
@media (max-width: 1100px) {
  .so-search { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .so-search > button { grid-column: 1 / -1; justify-content: center; }
  .so-source-row { grid-template-columns: minmax(0, 2fr) minmax(55px, .6fr) minmax(65px, .6fr) auto; }
  .so-source-state { grid-column: 1 / 4; grid-row: 2; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .so-source-row > .btn { grid-column: 4; grid-row: 1 / 3; }
  .so-category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .so-heading { flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .so-heading h1 { font-size: 31px; }
  .so-search, .so-focus-grid, .so-phases, .so-next { grid-template-columns: minmax(0, 1fr); }
  .so-focus-card { padding: 16px; }
  .so-totals > div { padding: 13px 12px; }
  .so-totals b { font-size: 29px; }
  .so-totals b small { font-size: 17px; }
  .so-totals span { font-size: 11px; }
  .so-phase { border-right: 0; border-bottom: 1px solid var(--line); }
  .so-category-controls { grid-template-columns: minmax(0, 1fr); }
  .so-source-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
  .so-source-name { grid-column: 1 / -1; }
  .so-source-state { grid-column: 1 / -1; grid-row: 3; }
  .so-source-row > .btn { grid-column: 3; grid-row: 2; min-height: 44px; }
  .so-category { padding: 11px; }
  .so-category-count { font-size: 13px; }
  .so-next { gap: 14px; padding: 16px; }
}
@media (max-width: 390px) {
  .so-category-list { grid-template-columns: minmax(0, 1fr); }
  .so-coverage { gap: 5px; }
  .so-coverage > * { padding: 8px 6px; }
  .so-totals > div { padding: 12px 9px; }
}
@media (max-width: 520px) {
  .top .brand { flex: 1; overflow: hidden; }
  .top .brand b { overflow: hidden; text-overflow: ellipsis; }
  .top > .spacer { display: none; }
}

/* Layout pass (29 Oct 2026): shorter scrolling. Lower-priority detail is folded away, the phone header is compact and a back-to-top button appears on long pages. */
.so-more { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 4px; }
.so-more > summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
.so-more > .so-sources { margin-top: 8px; }
.totop { position: fixed; right: 14px; bottom: 76px; z-index: 30; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 16px; min-height: 44px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: pointer; }
.totop[hidden] { display: none; }
@media (min-width: 861px) { .totop { bottom: 18px; } }
@media (max-width: 520px) {
  .top { gap: 6px; }
  .top .brand b { font-size: 17px; letter-spacing: .02em; }
  .top .brand span { display: none; }
  #syncPill { font-size: 0; padding: 7px 10px; min-width: 36px; }
  #syncPill::before { content: "⟳"; font-size: 14px; }
}

/* Front page: every page as a tile (29 Oct 2026). */
.all-pages { margin: 0 0 18px; }
.ap-group h3 { font-size: 14px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 14px 0 8px; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ap-tile { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 52px; color: var(--ink); text-decoration: none; font-weight: 700; }
.ap-tile:hover { border-color: var(--accent); color: var(--accent); }
.ap-tile .ic { font-size: 20px; }

/* ===================== Design system (29 Oct 2026) =====================
   One look across the app: navy header with a logo mark, white side menu, light grey page, white cards with soft
   shadows, one blue accent, normal-case headings in Barlow (condensed only for big numbers). This block comes last
   and overrides the older rules above it. */
:root {
  --page: #f3f5f9; --line: #e2e8f0; --line-soft: #eef2f7; --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .05);
  --navy: #0b1f35; --navy-2: #12345a; --side-ink: #334155;
}
h1, h2, h3, h4 { font-family: "Barlow", system-ui, sans-serif; font-weight: 700; letter-spacing: -.01em; text-transform: none; }
h1 { font-size: 30px; } h2 { font-size: 21px; } h3 { font-size: 17px; }

/* header */
.top { background: linear-gradient(90deg, var(--navy), var(--navy-2)); border-bottom: 0; padding: 10px 18px; box-shadow: 0 2px 12px rgba(2, 8, 23, .22); }
.brand { align-items: center; gap: 11px; }
.brand::before { content: "CB"; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px;
  background: linear-gradient(135deg, #60a5fa, #1d4ed8); color: #fff; font: 800 13px/1 "Barlow", sans-serif; letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.brand b { font: 700 18px/1.1 "Barlow", sans-serif; text-transform: none; letter-spacing: -.01em; color: #fff; }
.brand span { color: #9fb4cc; font-size: 13px; opacity: 1; }
.burger, .pill, .me { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; }
.burger { border-radius: 10px; padding: 5px 11px; }
.pill.ok { color: #86efac; } .pill.wait { color: #fcd34d; } .pill.off { color: #fca5a5; }

/* side menu */
.side { background: #fff; border-right: 1px solid var(--line); padding: 14px 12px 24px; }
.side h5 { font: 700 11px/1 "Barlow", sans-serif; letter-spacing: .1em; color: #94a3b8; margin: 18px 12px 8px; }
.side a { color: var(--side-ink); font-weight: 600; font-size: 14.5px; padding: 9px 12px; border-radius: 10px; }
.side a:hover { background: #f1f5f9; }
.side a.on { background: #e8efff; color: #1d4ed8; box-shadow: inset 3px 0 0 #1d4ed8; }

/* page, cards, controls */
.main { padding: 26px 30px 70px; }
.card { border-color: var(--line); box-shadow: var(--shadow); }
.btn { border-color: #d5dde8; border-radius: 10px; min-height: 40px; transition: background .15s, border-color .15s; }
.btn:hover { background: #f8fafc; border-color: #c3cedc; }
.btn.primary { background: #1d4ed8; border-color: #1d4ed8; box-shadow: 0 1px 2px rgba(29, 78, 216, .3); }
.btn.primary:hover { background: #1e40af; border-color: #1e40af; }
input, select, textarea { border-color: #d5dde8; border-radius: 10px; }

/* overview hero: heading, search and key figures in one block */
.so-hero { background: radial-gradient(900px 320px at 90% -30%, rgba(96, 165, 250, .35), transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 70%, #1d4ed8 160%);
  color: #fff; border-radius: 20px; padding: 28px 30px 22px; box-shadow: 0 12px 32px rgba(11, 31, 53, .22); }
.so-hero .so-heading { margin-bottom: 18px; }
.so-hero .so-heading h1 { color: #fff; font-size: 34px; margin-bottom: 8px; }
.so-hero .so-heading p:not(.so-eyebrow) { color: #c7d5e6; }
.so-hero .so-eyebrow { color: #93c5fd; }
.so-hero .so-heading > .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff; }
.so-hero .so-search { background: #fff; border: 0; border-radius: 14px; box-shadow: 0 8px 28px rgba(2, 8, 23, .28); color: var(--ink); }
.so-totals { background: var(--navy); }
.so-hero .so-totals { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); }
.so-hero .so-totals > div { border-right-color: rgba(255, 255, 255, .12); }
.so-totals b { font: 700 32px/1.1 "Barlow", sans-serif; letter-spacing: -.02em; }
.so-totals b small { color: #9fb4cc; }
.so-totals span { color: #b8c8da; }
.so-hero .so-summary-note { color: #9fb4cc; margin-top: 10px; }
.so-source-count b { color: var(--ink); font-family: "Barlow", sans-serif; letter-spacing: -.02em; }
.so-sources, .so-phases { box-shadow: var(--shadow); }

/* quick access tiles */
.all-pages { margin-top: 28px; }
.ap-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ap-tile { border-color: var(--line); box-shadow: var(--shadow); font-size: 14.5px; padding: 11px 13px; transition: transform .12s, border-color .12s; min-width: 0; }
.ap-tile:hover { transform: translateY(-1px); border-color: #93b4f5; color: #1d4ed8; }
.ap-tile .ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #eef3ff; font-size: 18px; flex: none; }
.ap-tile > span:last-child { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .bottom { background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); }
  .bottom a { color: #64748b; font-weight: 600; padding: 8px 2px 7px; }
  .bottom a.on { color: #1d4ed8; }
  .side { inset: 52px 0 0 0; }
  .main { padding: 16px 14px 96px; }
  h1 { font-size: 24px; }
}
@media (max-width: 520px) {
  .top { padding: 8px 12px; }
  .top .brand b { font-size: 16px; }
  .brand::before { width: 28px; height: 28px; font-size: 12px; }
  .so-hero { padding: 20px 16px 16px; border-radius: 16px; }
  .so-hero .so-heading { flex-direction: column; }
  .so-hero .so-heading h1 { font-size: 25px; }
  .so-search { grid-template-columns: minmax(0, 1fr); }
  .so-totals > div { padding: 12px 10px; }
  .so-totals b { font-size: 21px; }
  .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ap-tile { font-size: 13.5px; padding: 9px 10px; gap: 8px; }
  .ap-tile .ic { width: 30px; height: 30px; font-size: 16px; }
}

.ap-group h3 { font: 700 12px/1 "Barlow", sans-serif; letter-spacing: .09em; color: #94a3b8; }

/* ---- Companies tab ---- */
.cmp-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.cmp-chip-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; }
.cmp-chip-btn span { color: var(--muted); margin-left: 4px; }
.cmp-chip-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cmp-chip-btn.on span { color: #dbe7ff; }
.cmp-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.cmp-tools input, .cmp-tools select { flex: 1 1 220px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.cmp-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.cmp-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cmp-head h3 { margin: 0 0 6px; font-size: 17px; }
.cmp-areas { display: flex; flex-wrap: wrap; gap: 4px; }
.cmp-chip { background: #eef2f7; color: #334155; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.cmp-thumbs { display: flex; gap: 4px; flex: none; }
.cmp-thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.cmp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cmp-badge { font-size: 12px; border-radius: 999px; padding: 3px 9px; background: #eef2f7; color: #334155; }
.cmp-badge.one { background: #fff4e5; color: #b45309; }
.cmp-badge.ok { background: #dcfce7; color: #15803d; }
.cmp-badge.off { background: #f1f5f9; color: #64748b; }
.cmp-badge.good { background: #dcfce7; color: #15803d; }
.cmp-badge.mid { background: #fef3c7; color: #92400e; }
.cmp-badge.low { background: #f1f5f9; color: #475569; }
.cmp-badge.bad { background: #fee2e2; color: #b91c1c; }
.cmp-badge.map { background: #e0e9ff; color: #1d4ed8; }
.cmp-foot { margin-top: 10px; font-size: 14px; }
.cmp-more { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; font-weight: 600; }
.cmp-more-btn { border: 1px solid var(--accent); background: #fff; color: var(--accent); border-radius: 8px; padding: 8px 16px; cursor: pointer; font: inherit; }
.cmp-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cmp-detail h4 { font-size: 14px; margin: 10px 0 4px; }
.cmp-detail .cmp-wide { grid-column: 1 / -1; }
.cmp-list { margin: 0; padding-left: 18px; font-size: 14px; }
.cmp-list li { margin: 3px 0; }
.cmp-list.warn li { color: #92400e; }
.cmp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.cmp-photos img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
@media (max-width: 640px) { .cmp-head { flex-direction: column; } .cmp-thumbs img { width: 96px; height: 70px; } }

/* ---------- Companies: category tiles + list/detail (30 Oct 2026) ---------- */
.cx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin: 4px 0 12px; }
.cx-tile { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; text-align: left; gap: 0 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; cursor: pointer; min-height: 46px; }
.cx-tile span { grid-row: 1 / 3; font-size: 20px; text-align: center; }
.cx-tile b { font: 600 13.5px/1.15 var(--cond); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cx-tile i { font-style: normal; font-size: 12px; color: var(--muted); }
.cx-tile:hover { border-color: var(--accent); }
.cx-tile.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cx-tile.on i { color: #dbe6ff; }
.cx-tile.add { border-style: dashed; border-color: var(--accent); color: var(--accent); }
.cx-tools { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.cx-tools input, .cx-tools select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
.cmp-chip-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cmp-chip-btn.on span { color: #dbe6ff; }
.cx { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 14px; align-items: start; }
.cx-left { position: sticky; top: 0; }
.cx-list { max-height: calc(100vh - 230px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.cx-count { margin: 0 0 6px 2px; }
.cx-row { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-soft); padding: 9px 10px; cursor: pointer; }
.cx-row:hover { background: #f6f9fc; }
.cx-row.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.cx-thumb { flex: 0 0 54px; height: 54px; border-radius: 8px; background: #eef2f7; display: grid; place-items: center; font-size: 22px; overflow: hidden; }
.cx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cx-rowtext { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cx-rowtext b { font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cx-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-icons { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; align-items: center; }
.cx-icons i { font-style: normal; }
.cx-icons em { font-style: normal; font-size: 11px; background: var(--line-soft); border-radius: 999px; padding: 0 7px; color: var(--muted); }
.cx-more { display: block; width: 100%; padding: 10px; border: 0; background: #f6f9fc; color: var(--accent); font-weight: 600; cursor: pointer; }
.cx-right { background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 420px; }
.cx-empty { padding: 40px 24px; text-align: center; }
.cx-detail { padding: 16px 18px 20px; }
.cx-dhead h2 { margin: 2px 0 6px; font-size: 26px; }
.cx-back { display: none; border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0 0 6px; cursor: pointer; }
.cx-edit { border: 1px dashed var(--accent); color: var(--accent); background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; }
.cx-catbox { border: 1px solid var(--line); background: #f8fafc; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.cx-catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; margin: 8px 0; font-size: 14px; }
.cx-catgrid label { display: flex; gap: 6px; align-items: center; }
.cx-gal { margin: 12px 0; }
.cx-main { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #0f172a; cursor: zoom-in; }
.cx-main img { display: block; width: 100%; height: 340px; object-fit: contain; }
.cx-main span { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; font-size: 12.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); text-align: left; }
.cx-main.broken img { display: none; } .cx-main.broken { min-height: 60px; }
.cx-strip { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 2px; }
.cx-strip button { flex: 0 0 84px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: zoom-in; background: #eef2f7; }
.cx-strip img { width: 100%; height: 100%; object-fit: cover; }
.cx-nophoto { margin: 12px 0; padding: 18px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: 14px; }
.cx-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cx-sec { margin: 10px 0; }
.cx-sec h3 { font-size: 18px; border-bottom: 2px solid var(--accent-soft); padding-bottom: 3px; }
.cx-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; }
.cx-btns input { flex: 1; min-width: 180px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.cx-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 11px; font-size: 14px; text-decoration: none; color: var(--ink); cursor: pointer; word-break: break-all; }
.cx-btn:hover { border-color: var(--accent); }
.cx-btn.call { background: var(--good-soft); border-color: #bbf7d0; }
.cx-btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.cx-btn.mail { background: var(--accent-soft); border-color: #c7d7fe; }
.cx-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.cx-copy { border: 0; background: none; color: var(--accent); font-size: 13px; padding: 0; cursor: pointer; }
.cx-kind { font-size: 12px; border-radius: 4px; padding: 0 6px; color: #fff; background: #64748b; }
.cx-kind.factory { background: #ea580c; } .cx-kind.office { background: #2563eb; }
.cx-mapwrap { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); height: 240px; margin: 6px 0; background: #eef2f7; }
.cx-mapwrap iframe { width: 100%; height: 100%; border: 0; }
.cx-lb { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .88); display: grid; place-items: center; padding: 16px; }
.cx-lb figure { margin: 0; max-width: 96vw; text-align: center; }
.cx-lb img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 6px; background: #fff; }
.cx-lb figcaption { color: #e2e8f0; font-size: 13px; margin-top: 8px; }
.cx-lb figcaption a { color: #93c5fd; }
.cx-lbx, .cx-lbp, .cx-lbn { position: fixed; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; }
.cx-lbx { top: 14px; right: 14px; } .cx-lbp { left: 14px; top: 50%; } .cx-lbn { right: 14px; top: 50%; }
.cx-form { background: #fff; border-radius: 14px; padding: 18px 20px; width: min(640px, 96vw); max-height: 90vh; overflow-y: auto; display: grid; gap: 8px; }
.cx-form label { display: grid; gap: 3px; font-size: 14px; }
.cx-form .cx-catgrid label { display: flex; }
.cx-form input, .cx-form textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 900px) {
  .cx { grid-template-columns: minmax(0, 1fr); }
  .cx-left { position: static; }
  .cx-list { max-height: none; }
  .cx-right { display: none; }
  .cx.has-open .cx-left { display: none; }
  .cx.has-open .cx-right { display: block; }
  .cx-back { display: inline-block; }
  .cx-two { grid-template-columns: minmax(0, 1fr); }
  .cx-main img { height: 240px; }
  .cx-tiles { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .cx-tile { flex: 0 0 150px; scroll-snap-align: start; }
  .cx-tools { grid-template-columns: minmax(0, 1fr); }
}
.cx-tilehead { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 6px; }
.cx-tiles.focus { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cx-tiles.focus .cx-tile { min-height: 64px; border: 2px solid #c7d7fe; background: linear-gradient(180deg, #fff, #f3f7ff); }
.cx-tiles.focus .cx-tile span { font-size: 28px; }
.cx-tiles.focus .cx-tile b { font-size: 16px; }
.cx-tiles.focus .cx-tile.on { background: var(--accent); border-color: var(--accent); }
.cx-dl { font: 600 13px/1 "Barlow", sans-serif; text-transform: none; letter-spacing: 0; margin-left: 10px; }
