/* Subnet calculator: the few things tools.css doesn't cover. The bit
   diagram (network bits bright, host bits dim and underlined after a
   divider, so colour is never the only difference), and the output areas
   of the sub-tools below the calculator. */

.bits { display: grid; gap: 10px; min-width: 0; }
.bits-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; align-items: baseline; min-width: 0; }
.bits-label { font-size: 12.5px; color: var(--ink-3); }
.bits-groups { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; letter-spacing: .03em; }
.bits-group { white-space: nowrap; }
.bit-net { color: var(--ink); font-weight: 600; }
.bit-host { color: var(--ink-3); text-decoration: underline dotted; text-underline-offset: 4px; }
.bit-host.split { margin-left: 3px; padding-left: 4px; border-left: 2px solid var(--ink-2); }
.bits-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 12.5px; color: var(--ink-3); }
.bits-legend .bit-net, .bits-legend .bit-host { font-family: var(--font-mono); margin-right: 4px; }
@media (max-width: 520px) {
  .bits-row { grid-template-columns: minmax(0, 1fr); }
  .bits-groups { font-size: 12px; gap: 2px 8px; }
}

/* Addresses in the summary need a little more room than tools.css gives a stat, and
   one-word types such as "Documentation" must fit two cards to a row on a phone */
.summary.subnet-summary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.summary.subnet-summary .stat-value { overflow-wrap: normal; font-size: 19px; }
.summary.subnet-summary .stat-value.mono { font-size: 17px; letter-spacing: -.02em; }

.count-words { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.muted.small, .small { font-size: 13px; line-height: 1.5; }
.card-body > p.small { font-size: 13px; }

/* Sub-tools: a panel with its own inputs and results */
.subtool .tool-form { gap: 12px; }
.subtool .field.narrow { max-width: 220px; }
.subtool-out { display: grid; gap: 12px; min-width: 0; }
.subtool-out:not(:empty) { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.subtool-out > p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.subtool-out > p.lead-line { color: var(--ink); }
.subtool-out h3.sub-head { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.subtool-out .stack + .stack { padding-top: 14px; border-top: 1px solid var(--line); }
.subtool-out .row { align-items: center; }

.plain-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
