/* IPv4 Addressing and Subnetting: the bits, the number lines and the fault figures.
   Loads after /slides/slides.css, ../ccna-net.css and ../sites.css. */

.sv-fig { justify-content: flex-start; gap: 14px; }
@media (min-width: 861px) { .sv-side .sv-body { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); } }

/* The sections' colours. */
[data-sec="intro"] { --sec: #334155; }
[data-sec="bin"] { --sec: #1d4ed8; }
[data-sec="range"] { --sec: #0f766e; }
[data-sec="vlsm"] { --sec: #7c3aed; }
[data-sec="pub"] { --sec: #b45309; }
[data-sec="hosts"] { --sec: #0a5a8a; }
[data-sec="faults"] { --sec: #be123c; }

svg text { font-family: system-ui, sans-serif; }
.term mark { background: #5a4a12; color: #ffe08a; border-radius: 3px; padding: 0 2px; }
.term.bad mark { background: #6b1f1a; color: #ffc4bd; }
.term.ok mark { background: #2f4a12; color: #d6f5a8; }
.term { font-size: 12px; }

/* Bits: network part blue, host part orange, plain grey. */
.bits, .pv, .strips, .line { width: 100%; display: block; }
.bits { max-width: 760px; }
.bc { stroke-width: 1.2; }
.bc.bn { fill: #dbe6fb; stroke: #8fb0ea; }
.bc.bh { fill: #fbe7cf; stroke: #e7b77c; }
.bc.bp { fill: #f3f4f6; stroke: #d1d5db; }
.bt { font: 13.5px var(--mono); fill: #9aa3ad; }
.bt.one { fill: var(--sv-ink); font-weight: 700; }
.bt.big { font-size: 17px; }
.rn { font-size: 14px; font-weight: 700; fill: var(--sv-ink); }
.rn.big { font-size: 22px; }
.rd { font: 13.5px var(--mono); fill: var(--sv-ink2); }
.op { font-size: 11px; font-weight: 800; fill: var(--sv-ink2); letter-spacing: .05em; }
.rule { stroke: var(--sv-ink2); stroke-width: 1.5; }
.cut { stroke: #be123c; stroke-width: 2; stroke-dasharray: 5 4; }
.part { font-size: 12.5px; font-weight: 700; }
.part.pn { fill: #1d4ed8; } .part.ph { fill: #b45309; }

/* Place values. */
.pv { max-width: 720px; }
.pvh { font: 700 15px var(--mono); fill: var(--sv-ink2); }
.add { font: 14px var(--mono); fill: #1d4ed8; font-weight: 700; }
.add.z { fill: #c3cad2; }
.add.sum { fill: var(--sv-ink); }

/* Number lines over the last octet. */
.lines { display: flex; flex-direction: column; gap: 10px; }
.line { max-width: 800px; }
.line .seg { fill: color-mix(in srgb, var(--c, #6b7280) 16%, #fff); stroke: var(--c, #6b7280); stroke-width: 1.5; }
.line .seg.pale { fill: #f3f4f6; stroke: #c3cad2; }
.line .seg.alt { fill: color-mix(in srgb, var(--c, #6b7280) 30%, #fff); }
.line .seg.free { fill: #fff; stroke: #9ca3af; stroke-dasharray: 4 3; }
.line .seg.gap { fill: #fde8e6; stroke: var(--no); stroke-dasharray: 4 3; }
.line .sl { font-size: 14px; font-weight: 700; fill: var(--c, var(--sv-ink)); }
.line .sl.sm { font-size: 13px; }
.line .ss { font: 12.5px var(--mono); fill: var(--sv-ink2); }
.line .tk { stroke: #9ca3af; }
.line .tn { font: 12px var(--mono); fill: var(--sv-ink2); }
.line .lt { font-size: 14px; font-weight: 700; fill: var(--sv-ink); }
.line .lead { stroke: var(--c, #9ca3af); stroke-width: 1.2; }
.line .mk { fill: var(--sv-accent); }
.line .mkt { font-size: 12.5px; font-weight: 700; fill: var(--sv-accent); }
.line .mkt.no { fill: var(--no); }
.line .cell { fill: color-mix(in srgb, var(--c) 16%, #fff); stroke: var(--c); stroke-width: 1; }
.line .cell.edge { fill: #fde8e6; stroke: var(--no); stroke-width: 2; }

/* Tables. */
.tbl code.bad { color: var(--no); text-decoration: line-through; }
.masks td, .sizes td, .ladder td { text-align: center; }
.params { font-size: 13.5px; }
.natt { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.natt .tbl { font-size: 13px; }

/* Two terminals side by side; three systems in a column. */
.two { display: flex; flex-direction: column; gap: 8px; }
.two small, .oses small { display: block; color: var(--sv-ink2); margin-bottom: 3px; font-weight: 700; }
.two .term { font-size: 11.5px; }
.oses { display: flex; flex-direction: column; gap: 8px; }
.oses .term { font-size: 11.5px; }

/* The host's decision. */
.dec .bits { max-width: 820px; }
.verdict { margin: 0 0 6px 10px; font-weight: 700; font-size: 14px; }
.verdict.near { color: var(--ok); } .verdict.far { color: #b45309; }

/* A Windows dialog, drawn. */
.dialog { max-width: 460px; background: #fff; border: 1px solid #94a3b8; border-radius: 6px; padding: 8px 14px; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.dialog p { margin: 4px 0; }

@media (max-width: 860px) {
  .tbl { display: block; overflow-x: auto; max-width: 100%; }
}

/* A cropped network at a middle size, beside a table. */
.net.nw.mid { max-height: 440px; }
