/* What the two decks of lesson 4.2 share (nat.js): the four addresses' colours, the packet drawing, arrows,
   terminals with marks, worksheets. Loads after ../ccna-net.css, ../sites.css and ../company.css. */

:root { --il: #1d4ed8; --ig: #0f766e; --ol: #b45309; --og: #7c3aed; --in: #1d4ed8; --out: #b45309; }

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

/* Terminals: the part to look at, marked; a caption over a terminal. */
.term mark { background: #5c4a12; color: #ffe08a; border-radius: 2px; }
.term { font-size: 12px; }
.named { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.named > small { color: var(--sv-ink2); font-size: 13px; }
.two-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 860px) { .two-terms { grid-template-columns: 1fr; } }

/* The four addresses: one colour each, wherever they are named. */
.t-il { --c: var(--il); } .t-ig { --c: var(--ig); } .t-ol { --c: var(--ol); } .t-og { --c: var(--og); }
.chipx { display: inline-block; padding: 1px 9px; border-radius: 11px; color: #fff; font-weight: 700; font-size: 12.5px; background: var(--c); white-space: nowrap; }

/* SVG drawings of this lesson. */
.net .tt, .net .pk-t, .net .row { font: 600 13px var(--mono); fill: var(--sv-ink); }
.net .row { font-size: 12px; fill: #0f766e; }
.net .ad { font: 11.5px var(--mono); fill: var(--sv-ink2); }
.net .port { font: 11px var(--mono); fill: var(--sv-ink2); stroke: none; }
.net .small-t { font: 600 12px system-ui, sans-serif; fill: var(--sv-ink2); }
.net .d-pc { stroke: #8795a3; stroke-width: 1.6; }
.net .d-stand, .net .d-slot { stroke: #8795a3; stroke-width: 1.6; }

/* The strip: inside on the left, outside on the right, a packet on each side of R1. */
.net.strip { max-height: 400px; }
.net .rowbox { fill: #fff; stroke: #0f766e; stroke-width: 1.4; }
.net .row-h { font: 700 11px system-ui, sans-serif; fill: var(--sv-ink2); text-transform: uppercase; letter-spacing: .04em; }
.net .reg-in { fill: color-mix(in srgb, var(--in) 6%, transparent); stroke: color-mix(in srgb, var(--in) 45%, transparent); stroke-dasharray: 6 4; }
.net .reg-out { fill: color-mix(in srgb, var(--out) 6%, transparent); stroke: color-mix(in srgb, var(--out) 45%, transparent); stroke-dasharray: 6 4; }
.net .reg-t { font: 800 13px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.net .reg-t.in { fill: var(--in); } .net .reg-t.out { fill: var(--out); }
.net .pk { fill: #fff; stroke: #33475b; stroke-width: 1.6; }
.net .pk-div { stroke: #c3cbd3; stroke-width: 1.2; }
.net .pk-h { font: 600 11px system-ui, sans-serif; fill: var(--sv-ink2); text-transform: uppercase; letter-spacing: .04em; }
.net .pk-v { fill: #f4f6f8; }
.net .pk-v.chg { fill: #fff1c2; stroke: #d9a514; stroke-width: 1.4; }
.net .pk-cap { font: 700 12.5px system-ui, sans-serif; fill: var(--sv-ink); }
.net .chip { fill: var(--c); }
.net .chip-t { font: 700 12px system-ui, sans-serif; fill: #fff; }

/* Arrows. */
.net .ar .al { fill: none; stroke: #33475b; stroke-width: 2.2; stroke-linejoin: round; }
.net .ar .al.dash { stroke-dasharray: 6 5; }
.net .ar .ah { fill: #33475b; }
.net .ar.flowa .al { stroke: #0a7bbd; stroke-width: 3; } .net .ar.flowa .ah { fill: #0a7bbd; }
.net .ar.bad .al { stroke: #d13212; } .net .ar.bad .ah { fill: #d13212; }
.net .ar.ok .al { stroke: #1d8102; } .net .ar.ok .ah { fill: #1d8102; }
.net .ar.grey .al { stroke: #8a96a3; } .net .ar.grey .ah { fill: #8a96a3; }
.net .ar.c1 .al { stroke: #1d4ed8; } .net .ar.c1 .ah { fill: #1d4ed8; }
.net .ar.c2 .al { stroke: #0f766e; } .net .ar.c2 .ah { fill: #0f766e; }
.net .ar.c3 .al { stroke: #7c3aed; } .net .ar.c3 .ah { fill: #7c3aed; }
.net .c1 { fill: #1d4ed8; } .net .c2 { fill: #0f766e; } .net .c3 { fill: #7c3aed; }
.net text.c1, .net text.c2, .net text.c3 { font: 700 12.5px var(--mono); }

/* Reply lost: a label on the network drawing. */
.net .lost { font: 700 12px system-ui, sans-serif; fill: var(--no); paint-order: stroke; stroke: #f6f7f9; stroke-width: 4px; }
.net .okl { font: 700 12px system-ui, sans-serif; fill: #0a7bbd; paint-order: stroke; stroke: #f6f7f9; stroke-width: 4px; }

/* Worksheets. */
.wk .blank { display: block; min-width: 76px; height: 18px; border-bottom: 1.5px dashed #9ca3af; }
.wk td { padding-top: 4px; padding-bottom: 4px; }
.wk { font-size: 13.5px; }

/* NAT tables, as HTML: a new row, a rewritten port. */
.nt { font-size: 12.5px; }
.nt td, .nt th { font-family: var(--mono); white-space: nowrap; }
.nt tr:first-child th { font-family: system-ui, sans-serif; }
.nt tr.new td, .nt tr.new th { background: #eef6ff; }
.nt .chg { background: #fff1c2; border-radius: 3px; padding: 0 3px; }
.nt-cap { color: var(--sv-ink2); font-size: 13px; margin: 0 0 3px; }
.tblw { max-width: 100%; overflow-x: auto; }
