/* pages/home-network.css — Home network (family-layer builder). Owned by the page's
 * builder; the shared design system (tokens, panels, chips, fields) lives in the
 * webkit (kit.css). Layout only; all colours come from the shared tokens. */

.page-head { margin-bottom: var(--gap); }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; max-width: 70ch; }
.page-msg:empty { display: none; }

.hn-mono { font-family: var(--mono); font-size: 0.9em; }
.hn-ok { color: var(--ok); }
.hn-warn { color: var(--warn); }

/* ---- set-up (no home network yet) ---- */
.hn-hero { text-align: center; }
.hn-hero-ico {
  display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center;
  border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: 10px;
}
.hn-hero-ico .ico { width: 26px; height: 26px; }
.hn-hero h2 { margin: 0 0 6px; }
.hn-hero p { margin: 0 auto; max-width: 48ch; }
.hn-ip-now { font-size: 1.1rem; }
.hn-how { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--text-muted); }
.hn-setup-action { text-align: center; margin-bottom: var(--gap); }
.hn-setup-btn { min-width: 220px; }
.hn-setup-action .hint { margin-top: 8px; }

/* ---- status ---- */
.hn-status.ok { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.hn-status.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }
.hn-status-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.hn-status-head .ico { width: 20px; height: 20px; }
.hn-status.ok .hn-status-head { color: var(--ok); }
.hn-status.warn .hn-status-head { color: var(--warn); }
.hn-status p { margin: 0; }

/* ---- 11e: another parent's household ---- */
.hn-foreign { border-color: color-mix(in srgb, var(--primary) 35%, transparent); background: var(--primary-soft); }
.hn-foreign-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--primary-strong); }
.hn-foreign-head .ico { width: 20px; height: 20px; flex: none; }
.hn-foreign-head strong { line-height: 1.3; }
.hn-foreign p { margin: 0 0 12px; }
.hn-foreign-action { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hn-foreign-btn { min-width: 220px; max-width: 100%; }

/* ---- pause ---- */
.hn-pause .field-check { margin-bottom: 0; }

/* ---- IP management ---- */
.hn-dl { margin-bottom: 14px; }
.hn-ip-action { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hn-ip-action .hint { margin: 0; }

/* ---- filter mode ---- */
.hn-mode-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hn-mode-opt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface);
  font-weight: 500;
}
.hn-mode-opt:hover { background: var(--surface-2); }
.hn-mode-opt.on { border-color: var(--primary); background: var(--primary-soft); }
.hn-mode-dot {
  width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; color: #fff;
}
.hn-mode-opt.on .hn-mode-dot { background: var(--primary); border-color: var(--primary); }
.hn-mode-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hn-mode-label { font-weight: 700; }
.hn-mode-desc { font-size: 0.82rem; }

/* ---- categories ---- */
.hn-cat-groups { display: grid; gap: 18px; }
.hn-cat-group h3 { margin: 0 0 8px; color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hn-cat.check-label { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.hn-cat input[type="checkbox"] { margin-top: 2px; }
.hn-cat-txt { display: flex; flex-direction: column; gap: 2px; }
.hn-cat-name { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.hn-cat-name .ico-sm { color: var(--text-faint); }
.hn-cat-desc { font-size: 0.8rem; }
.hn-cat-locked { opacity: 0.85; }

/* ---- allow / block lists ---- */
.hn-list { margin-top: var(--gap); }
.hn-list:first-child { margin-top: 0; }
.hn-list h3 { margin: 0 0 8px; }
.hn-dom-editor { margin-top: 8px; }
.hn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hn-chips-none { font-size: 0.85rem; }
.hn-dom-add { display: flex; gap: 8px; align-items: center; }
.hn-dom-add .hn-dom-input { flex: 1; min-width: 0; }
.hn-dom-add button { flex: none; }
.hn-dom-err:empty { display: none; }
.hn-dom-err { margin-top: 6px; }

@media (max-width: 560px) {
  .hn-mode-opts { grid-template-columns: 1fr; }
}
