/* What the two decks of lesson 4.3 share (dnsdraw.js): record chips, zones, the message ladder,
   marked terminals and Packet Tracer's DNS window. Loads after ../company.css, before the deck's own stylesheet. */

.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); } }

/* One colour per record type. */
.rr { display: inline-block; min-width: 46px; padding: 1px 6px; border-radius: 5px; font: 800 11.5px var(--mono); color: #fff; text-align: center; background: var(--rc); }
.rr-A { --rc: #1d4ed8; } .rr-AAAA { --rc: #0f766e; } .rr-CNAME { --rc: #7c3aed; } .rr-MX { --rc: #c2410c; }
.rr-NS { --rc: #1d8102; } .rr-PTR { --rc: #be123c; } .rr-SOA { --rc: #475569; }

/* A zone, drawn as a table. */
.zone { background: #fff; border: 1px solid var(--sv-line); border-radius: 10px; padding: 8px 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.zone > b { display: block; font-size: 13.5px; margin-bottom: 4px; font-family: var(--mono); }
.zone table { border-collapse: collapse; }
.zone td { padding: 3px 12px 3px 0; border-top: 1px solid #eef0f3; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; vertical-align: middle; }
.zone tr:first-child td { border-top: 0; }
.zone .zt { color: var(--sv-ink2); }
.zone tr.new td { background: #fff4d6; }
.zone tr.bad td { background: #fde8e6; color: #9b1c12; }
.zone tr.glue td { background: #eef8ea; }
.zone tr.dim td { color: #9aa4ae; }
.zone tr.dim .rr { opacity: .45; }
.zone.bad { border-color: #e5534b; }
.zones { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }

/* Marked terminals. */
.term mark { background: #5c4a12; color: #ffe08a; border-radius: 2px; }
.term { white-space: pre-wrap; overflow-wrap: anywhere; }
.two-terms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.two-terms small { display: block; color: var(--sv-ink2); margin-bottom: 3px; font-size: 13px; }
.two-terms .term { font-size: 11.5px; }
@media (max-width: 1100px) { .two-terms { grid-template-columns: 1fr; } }

/* The message ladder. */
.ladw { width: 100%; flex: none; }
.ladw > svg { display: block; }
.net.ladder { max-height: 420px; }
.net .hd { fill: #fff; stroke: #8795a3; stroke-width: 1.5; }
.net .hd.rec { stroke: #0a7bbd; stroke-width: 2.5; }
.net .hd.auth { stroke: #1d8102; stroke-width: 2; }
.net .hn { font: 700 13px system-ui, sans-serif; fill: var(--sv-ink); }
.net .hs { font: 11.5px var(--mono); fill: var(--sv-ink2); }
.net .life { stroke: #c3cbd3; stroke-width: 2; stroke-dasharray: 5 5; }
.net .msg { --mc: #0a7bbd; }
.net .msg.m-r { --mc: #b45309; } .net .msg.m-a { --mc: #1d8102; } .net .msg.m-bad { --mc: #d13212; } .net .msg.m-mail { --mc: #c2410c; }
.net .msg line { stroke: var(--mc); stroke-width: 2.5; }
.net .msg polygon { fill: var(--mc); }
.net .msg .mt { font: 600 12.5px var(--mono); fill: var(--mc); paint-order: stroke; stroke: #f6f7f9; stroke-width: 4px; }
.net .msg .ms { font: 11.5px system-ui, sans-serif; fill: var(--sv-ink2); paint-order: stroke; stroke: #f6f7f9; stroke-width: 4px; }
.net .msg .no { fill: var(--mc); }
.net .msg .nn { font: 800 11px system-ui, sans-serif; fill: #fff; }
.net .cachebox { fill: #fff4d6; stroke: #b45309; stroke-width: 1.5; }
.net .cachet { font: 600 11.5px var(--mono); fill: #7c3a06; }

/* Packet Tracer's DNS window, drawn. */
.ptwin { background: #fff; border: 1px solid #94a3b8; border-radius: 6px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; max-width: 620px; font-size: 13.5px; }
.ptwin small { color: var(--sv-ink2); font-size: 12px; font-style: italic; }
.pw-title { font-size: 14px; color: #0a3d62; }
.pw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field { border: 1px solid #94a3b8; border-radius: 3px; padding: 2px 8px; min-width: 90px; background: #f8fafc; font-size: 13px; }
.radio::before { content: '○ '; } .radio.on::before { content: '◉ '; color: var(--sv-accent); }
.btn { border: 1px solid #64748b; border-radius: 4px; padding: 2px 12px; background: #eef2f7; }
.pw-list { border-collapse: collapse; font-size: 12.5px; }
.pw-list th, .pw-list td { border: 1px solid #cbd5e1; padding: 2px 10px; text-align: left; font-family: var(--mono); }
.pw-list th { background: #f1f5f9; font-weight: 600; font-family: system-ui, sans-serif; }
.pw-list tr.new td { background: #fff4d6; }
.pw-list tr.bad td { background: #fde8e6; color: #9b1c12; }

/* Small tables. */
.tbl.sm { font-size: 13px; }
.tbl.sm td, .tbl.sm th { padding: 5px 9px; }
.tbl td { white-space: normal; }

@media (max-width: 860px) {
  .tbl { display: block; overflow-x: auto; max-width: 100%; }
  .ladw { overflow-x: auto; max-width: 100%; }
  .ladw .net.ladder { max-height: none; min-width: 640px; }
  .ptwin { overflow-x: auto; max-width: 100%; }
}
