/* Nostos design system. All colours, radii and shadows live in :root. */
:root {
  --navy: #0f2a43; --teal: #0e6b73; --teal-dark: #0a5057; --teal-soft: #e4f2f3;
  --ink: #12263a; --muted: #5f7081; --line: #e1e7ec; --bg: #f6f9fb; --card: #ffffff;
  --ok: #1b8a4b; --ok-soft: #e3f5eb; --warn: #b26a00; --warn-soft: #fff1d6; --bad: #b3261e; --wine: #722f37; --bad-soft: #fde8e6;
  --info: #3b6ea5;
  --accent: var(--teal); --accent-ink: #ffffff; --accent-soft: var(--teal-soft);
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(15,42,67,.06), 0 4px 14px rgba(15,42,67,.05);
  --gap: 18px;
  --solid: #0f2a43; --soft: #eef2f5; --on-solid: #ffffff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; }
a { color: var(--teal); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header and navigation */
header.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
header.top .wrap { display: flex; align-items: center; gap: 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 21px; color: var(--navy); text-decoration: none; }
.brand .ico { color: var(--teal); }
nav.main { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
nav.main a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; }
nav.main a:hover { background: var(--teal-soft); }
nav.main a.on { background: var(--solid); color: var(--on-solid); }
.who { margin-left: auto; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.who-row { display: flex; gap: 10px; align-items: center; }
.who-note { color: var(--wine); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.wine { color: var(--wine); font-weight: 800; }
.subnav { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 8px 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--teal); }
.subnav a.on { color: var(--navy); border-bottom-color: var(--teal); }
.who .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.who .name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  header.top .wrap { flex-wrap: wrap; gap: 8px 12px; }
  nav.main { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  nav.main a { white-space: nowrap; }
  .who .name { display: none; }
}

main { padding: 28px 0 56px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; color: var(--navy); }
h2 { font-size: 19px; margin: 28px 0 10px; color: var(--navy); }
h3 { font-size: 16px; margin: 0 0 4px; color: var(--navy); }
p { margin: 0 0 10px; }
.lead { font-size: 16px; color: var(--muted); max-width: 46em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 0; color: var(--muted); }

/* Icons */
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico.lg { width: 26px; height: 26px; }

/* Cards, grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.stat .label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.15; margin-top: 4px; }
.stat .value small { font-size: 15px; font-weight: 500; color: var(--muted); }
.stat.ok { border-top: 4px solid var(--ok); } .stat.warn { border-top: 4px solid var(--warn); }
.stat.bad { border-top: 4px solid var(--bad); } .stat.none { border-top: 4px solid var(--line); }
.two { display: grid; grid-template-columns: 3fr 2fr; gap: var(--gap); margin-bottom: var(--gap); }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } h1 { font-size: 24px; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

/* Provider tiles (Connect) */
.provider { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.provider .top { display: flex; align-items: center; gap: 10px; }
.provider .icon-badge { width: 38px; height: 38px; border-radius: 10px; background: var(--teal-soft); color: var(--teal); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.provider h3 { margin: 0; font-size: 16px; }
.provider .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.provider .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.provider.later { background: var(--soft); box-shadow: none; }
.provider.later .icon-badge { background: var(--soft); color: var(--muted); }

/* Tags */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.tag.amber { background: var(--warn-soft); color: var(--warn); }
.tag.red { background: var(--bad-soft); color: var(--bad); }
.tag.teal { background: var(--teal-soft); color: var(--teal-dark); }
.tag.navy { background: var(--soft); color: var(--navy); }

/* Buttons and forms */
.btn, button { font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid var(--teal); background: var(--teal); color: var(--accent-ink);
  padding: 8px 16px; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover, button:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn.plain, button.plain { background: var(--card); color: var(--teal); }
.btn.plain:hover, button.plain:hover { background: var(--teal-soft); }
.btn.danger, button.danger { background: var(--card); color: var(--bad); border-color: var(--bad); }
.btn.danger:hover, button.danger:hover { background: var(--bad-soft); }
button[disabled] { opacity: .5; cursor: not-allowed; }
.btn.small, button.small { padding: 4px 12px; font-size: 13.5px; }
.btn.big { padding: 12px 24px; font-size: 17px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 14px; }
input[type=text], input[type=password], input[type=date], input[type=file], select {
  font: inherit; width: 100%; max-width: 420px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); }
input[type=date] { width: auto; }
.notice { padding: 11px 14px; border-radius: var(--radius-sm); margin: 12px 0; background: var(--teal-soft); color: var(--teal-dark); font-size: 15px; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.banner { background: var(--warn-soft); border: 1px solid #f0cf8f; color: var(--warn); padding: 9px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; margin-bottom: 16px; }
ol.steps { padding-left: 22px; margin: 0; } ol.steps li { margin-bottom: 8px; }

/* Segmented controls and chips */
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { background: transparent; color: var(--ink); border: 0; padding: 5px 14px; font-size: 13.5px; font-weight: 600; border-radius: 999px; }
.seg button:hover { background: rgba(255,255,255,.6); }
.seg button.on { background: var(--solid); color: var(--on-solid); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.chip:hover { background: var(--teal-soft); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--teal)); }
.chip.off { color: var(--muted); } .chip.off .dot { background: #cfd8de; }
.toolbar { display: flex; gap: 12px 18px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .group > span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 6px 16px; text-decoration: none; color: var(--muted); border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; }
.tabs a.on { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--soft); font-size: 12.5px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Charts */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.charts .wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .charts { grid-template-columns: 1fr; } }
.chart-card .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-card h3 { margin: 0; display: flex; align-items: center; gap: 6px; }
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-box.compact { height: 190px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; background: var(--c); }
.legend i.line { height: 3px; vertical-align: 3px; } .legend i.hatch { background: repeating-linear-gradient(45deg, #dfe6eb, #dfe6eb 3px, #fff 3px, #fff 6px); border: 1px solid #cfd8de; }
.coverage { font-size: 12.5px; color: var(--muted); background: var(--soft); border-radius: var(--radius-sm); padding: 5px 10px; margin-top: 8px; }
.coverage.gap { background: var(--warn-soft); color: var(--warn); }
.heat td, .heat th { padding: 0; height: 22px; min-width: 14px; text-align: center; font-size: 10px; border: 1px solid var(--card); }
.heat td.name, .heat th.name { padding: 0 10px; text-align: left; font-size: 13px; white-space: nowrap; border: 0; }
.heat td.on { background: var(--ok); } .heat td.off { background: var(--soft); }
.heat td.na { background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 3px, var(--card) 3px, var(--card) 6px); }

/* Details / expandable */
details.more { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: var(--gap); }
details.more > summary { cursor: pointer; padding: 12px 18px; font-weight: 600; color: var(--navy); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.more[open] > summary::after { transform: rotate(-135deg); }
details.more > .inner { padding: 0 18px 18px; }
details.mini > summary { cursor: pointer; font-size: 13px; color: var(--teal); font-weight: 600; list-style: none; }
details.mini > summary::-webkit-details-marker { display: none; }
details.mini[open] > summary { margin-bottom: 6px; }
details.mini .inner { font-size: 13.5px; color: var(--muted); }

pre { background: var(--solid); color: #e8f1f5; padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 13px; line-height: 1.45; margin: 0; }
code { background: var(--soft); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
pre code { background: none; padding: 0; }
.snippet { position: relative; }
.snippet button.copy { position: absolute; top: 8px; right: 8px; padding: 2px 10px; font-size: 12px; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
.snippet button.copy:hover { background: rgba(255,255,255,.28); }
footer { border-top: 1px solid var(--line); padding: 16px 0 28px; font-size: 13px; color: var(--muted); }
.statlist { list-style: none; padding: 0; margin: 0; } .statlist li { padding: 3px 0; font-size: 14.5px; }

/* Tooltips (?) */
.tooltip { position: relative; cursor: help; display: inline-block; }
.tooltip-icon { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; font-size: 11px; font-weight: 700; color: var(--teal); background: var(--teal-soft); border-radius: 50%; vertical-align: middle; margin: 0 2px; line-height: 1; }
.tooltip-text { visibility: hidden; opacity: 0; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--solid); color: var(--on-solid); font-size: 13px; font-weight: 400; line-height: 1.45; padding: 8px 12px; border-radius: var(--radius-sm); width: max-content; max-width: 260px; z-index: 30; text-align: left; transition: opacity .15s; pointer-events: none; text-transform: none; letter-spacing: 0; }
.tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--solid); }
.tooltip:hover .tooltip-text, .tooltip:focus .tooltip-text { visibility: visible; opacity: 1; }

/* Overview extras */
.anomaly { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.anomaly:last-child { border-bottom: 0; }
.anomaly .score { margin-left: auto; font-weight: 700; }
.pip { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pip.ok { background: var(--ok); } .pip.warn { background: var(--warn); } .pip.bad { background: var(--bad); } .pip.none { background: #cfd8de; }
.insights { margin: 0; padding-left: 18px; } .insights li { margin-bottom: 5px; font-size: 14.5px; }
.diagram-img { max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.empty { color: var(--muted); font-size: 14.5px; padding: 6px 0; }

/* Integration flow */
.flow { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.flow .node { flex: 1; min-width: 150px; background: var(--teal-soft); border-radius: var(--radius); padding: 12px 14px; text-align: center; }
.flow .node.navy { background: var(--soft); }
.flow .node strong { display: block; color: var(--navy); }
.flow .node span { font-size: 12.5px; color: var(--muted); }
.flow .arrow { align-self: center; color: var(--muted); font-size: 22px; }
.method-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.method-pick .m { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; color: var(--muted); }
.method-pick .m.on { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.stepnum { width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.step { display: flex; gap: 12px; align-items: flex-start; }

/* About Nostos */
.points-list { margin: 12px 0 16px; padding-left: 20px; }
.points-list li { margin-bottom: 6px; }
.stat-line { color: var(--muted); }
.stat-line .source { font-size: 11.5px; font-style: normal; opacity: .8; margin-left: 4px; }

/* Internal-tool pill, sign-in form, icon rows */
.login-pop { position: relative; }
.login-pop summary { list-style: none; cursor: pointer; }
.login-pop summary::-webkit-details-marker { display: none; }
.login-pop .login-form { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; z-index: 30; box-shadow: var(--shadow, 0 8px 24px rgba(15,42,67,.18)); }
.login-form { display: grid; gap: 12px; }
.login-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--navy); }
.login-form input { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; }
.icon-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: 14px; }
.chip b { font-weight: 600; color: var(--navy); }
.chip i { font-size: 11px; font-style: normal; background: var(--warn-soft); color: var(--warn); padding: 1px 7px; border-radius: 999px; }
.chip.secondary { background: var(--warn-soft); color: var(--warn); }
.chip.later { background: var(--soft); color: var(--muted); }
.chip .ico.lg { width: 20px; height: 20px; }
.inline-ico .ico { width: 18px; height: 18px; color: var(--teal); }
.flow.col { flex-direction: column; }
.stack-flow { display: grid; gap: 10px; }
.stage { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--card); }
.stage h4 { margin: 0 0 2px; color: var(--navy); font-size: 15px; display: flex; gap: 8px; align-items: center; }
.stage p { margin: 0; font-size: 13.5px; color: var(--muted); }
.stage.family { background: var(--teal-soft); border-color: transparent; }
.stage.ai { background: var(--soft); border-color: transparent; }
.stage.data { background: var(--card); border-left: 4px solid var(--teal); }
.branches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.down { text-align: center; color: var(--muted); font-size: 18px; line-height: 1; }
@media (max-width: 700px) { .branches { grid-template-columns: 1fr; } }

/* ---------- Connect gallery: a simple connectors screen ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 16px; }
.search { position: relative; display: block; margin: 0; width: 260px; max-width: 100%; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; font: inherit; padding: 8px 12px 8px 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); }
.search input:focus-visible, .ccard:focus-visible, .cbtn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.conn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .conn-grid { grid-template-columns: 1fr; } }
.ccard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; min-width: 0; }
.ccard:hover { border-color: var(--teal); }
.ccard[hidden] { display: none; }
.ccard.later { background: var(--bg); box-shadow: none; cursor: default; opacity: .78; }
.ccard.later:hover { border-color: var(--line); }
.ccard.later .cicon { filter: grayscale(1); opacity: .7; }
.cicon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; letter-spacing: .02em;
  background: var(--teal-soft); color: var(--teal-dark); }
.cicon.g-electricity { background: var(--warn-soft); color: var(--warn); }
.cicon.g-water { background: #e2eefb; color: #245b96; }
.cicon.g-internet { background: var(--teal-soft); color: var(--teal-dark); }
.cicon.g-phone { background: #efe7fb; color: #6c3fb0; }
.cicon.g-devices { background: var(--soft); color: var(--muted); }
.cbody { flex: 1; min-width: 0; }
.ctitle { display: flex; align-items: center; gap: 6px; }
.ctitle strong { font-size: 16px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdesc, .cby { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cby { font-size: 12.5px; }
.vmark { width: 17px; height: 17px; flex: none; fill: var(--info); stroke: none; }
.vmark .tick { fill: none; stroke: var(--card); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cbtn { width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.cbtn .ico { width: 18px; height: 18px; stroke-width: 2.2; }
.cbtn.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.cbtn.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
dialog.cmodal { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--card); color: var(--ink); box-shadow: 0 18px 60px rgba(0,0,0,.35); }
dialog.cmodal::backdrop { background: rgba(8, 16, 24, .55); }
.cmodal .mhead { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.cmodal .mbody { padding: 16px 18px 20px; overflow-y: auto; }
.statusbox { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; background: var(--bg); }
.consent { font-size: 14.5px; }
.famebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.famebar label { margin: 0; font-size: 13px; color: var(--muted); }
.famebar select { width: auto; max-width: 100%; }
.sched { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }

/* ---------- Dark mode: same tokens, darker values ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #dbe8f3; --solid: #2b4863; --on-solid: #ffffff; --soft: #223140;
    --teal: #4fb3bb; --teal-dark: #8ad6dc; --teal-soft: #173a40; --accent-ink: #06222a;
    --ink: #e6eef5; --muted: #9fb2c2; --line: #2c3d4c; --bg: #0e151c; --card: #17212b;
    --ok: #4cc27f; --ok-soft: #14301f; --warn: #e3a63f; --warn-soft: #39290d; --bad: #f2928a; --bad-soft: #3b1917; --info: #86b6e8;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 4px 14px rgba(0,0,0,.3);
  }
  .cicon.g-water { background: #17304b; color: #8bbcf0; }
  .cicon.g-phone { background: #2b2142; color: #c2a4f2; }
  .btn:hover, button:hover { color: #031a20; }
  .btn.plain:hover, button.plain:hover { color: var(--teal-dark); }
  .btn.danger:hover, button.danger:hover { color: var(--bad); }
  .banner { border-color: #5b4515; }
  .legend i.hatch, .heat td.na { background: repeating-linear-gradient(45deg, #2a3947, #2a3947 3px, #17212b 3px, #17212b 6px); border-color: #3a4b5b; }
  .seg button:hover { background: rgba(255,255,255,.08); }
  pre { background: #0a1016; }
}

/* Honest status table on the start page */
.status-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.status-table th, .status-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.status-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
@media (max-width: 640px) { .status-table th:nth-child(2), .status-table td:nth-child(2) { display: none; } }

/* Connect panel: consent, privacy line and folded details */
label.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-weight: 500; cursor: pointer; }
label.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.lockline { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
details.fold { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.fold > summary { cursor: pointer; font-weight: 600; font-size: 14.5px; display: flex; gap: 8px; align-items: center; }
details.fold > *:not(summary) { margin-top: 8px; }
