/* Advanced Networking and Hybrid Connectivity: the figures on its slides.
   Terminals, JSON and the shared colours are in ../iam.css. */

:root { --vpcc: #8c4fff; --net: #7a3fe0; --ec2: #ed7100; --epc: #0d7c66; --dxc: #0369a1; --ok: #1d8102; --no: #d13212; --pay: #b45309; }

.sv-fig { justify-content: flex-start; }
.ic { width: 34px; height: 34px; flex: none; }
.ic.xs { width: 22px; height: 22px; vertical-align: middle; }
.term.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.term .pr.pi { color: #f2b705; }
.cap { display: block; font-size: 13px; color: var(--sv-ink2); margin: 4px 0; }

/* The sections' colours. */
[data-sec="intro"] { --sec: #334155; }
[data-sec="ep"] { --sec: #0d7c66; }
[data-sec="vpcs"] { --sec: #7c3aed; }
[data-sec="hybrid"] { --sec: #0369a1; }
[data-sec="dns"] { --sec: #6d28d9; }
[data-sec="flow"] { --sec: #be123c; }
[data-sec="ipv6"] { --sec: #3f6212; }
[data-sec="cost"] { --sec: #b45309; }

/* Tables. */
.tbl { border-collapse: collapse; background: #fff; border: 1px solid var(--sv-line); font-size: 14px; }
.tbl th, .tbl td { padding: 7px 11px; border-top: 1px solid #eef0f3; text-align: left; vertical-align: top; }
.tbl tr:first-child th { border-top: 0; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--sv-ink2); }
.tbl tr:not(:first-child) th { font-weight: 700; }
.tbl code { font: 13px var(--mono); }
.tbl.cmp { width: 100%; }
.tbl.cmp td { width: 38%; }

/* Exam questions. */
.pe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pe-q { display: grid; grid-template-columns: 1.6em minmax(0, 1fr); gap: 8px; background: #fffbea; border: 1px solid #e8d48a; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.pe-q > b { font-size: 16px; color: #8a6500; }
.pe-q p { margin: 0 0 6px; }
.pe-a, .pe-w { display: grid; grid-template-columns: 1.2em minmax(0, 1fr); gap: 4px; font-size: 13px; }
.pe-a { font-weight: 600; color: #1b5e05; }
.pe-w { color: var(--sv-ink2); }
.pe-q:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Layout helpers. */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two.w { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* A box: an icon, a name, a line, a value. */
.bx { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--sv-line); border-radius: 9px; padding: 8px 12px; min-width: 0; }
.bx > span { display: flex; flex-direction: column; min-width: 0; }
.bx b { font-size: 14.5px; }
.bx small { font-size: 12.5px; color: var(--sv-ink2); }
.bx code { font: 12.5px var(--mono); overflow-wrap: anywhere; }
.bx.sm { padding: 5px 10px; } .bx.sm .ic { width: 28px; height: 28px; } .bx.sm b { font-size: 13.5px; }
.bx.priv { border: 2px solid var(--ec2); background: #fff7ef; }
.bx.pay { border: 2px solid var(--pay); background: #fff8eb; }
.bx.svc { border: 2px solid #232f3e; }
.bx.ep { border: 2px solid var(--epc); background: #effaf6; }
.bx.vpcc { border: 2px solid var(--vpcc); background: #f6f1ff; }

/* An arrow with a label over it. */
.ar { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 52px; font-size: 12px; color: var(--sv-ink2); text-align: center; }
.ar span code, .ar span { font-family: var(--mono); }
.ar i { display: block; width: 100%; min-width: 40px; height: 2px; background: #545b64; position: relative; }
.ar i::after { content: ''; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 9px solid #545b64; border-right: 0; }
.ar.down { flex-direction: row; min-width: 0; min-height: 34px; gap: 8px; }
.ar.down i { width: 2px; min-width: 2px; height: 30px; order: -1; }
.ar.down i::after { right: -5px; top: auto; bottom: -3px; border: 6px solid transparent; border-top: 9px solid #545b64; border-bottom: 0; }

.chain { display: flex; align-items: center; gap: 4px; }
.chain > .bx { flex: 0 1 auto; }
.chain > .ar { flex: 1 1 40px; min-width: 40px; }
.chain.v { flex-direction: column; align-items: flex-start; }
.chain.v > .ar { flex: none; }
.meter { margin-top: 12px; display: inline-flex; align-items: baseline; gap: 10px; background: #fff8eb; border: 1px solid #f0c987; border-radius: 8px; padding: 6px 12px; font-size: 14px; align-self: flex-start; }
.meter b { font: 700 22px var(--mono); color: var(--pay); }

/* A route table. */
.rt { background: #fff; border: 1px solid var(--sv-line); border-radius: 8px; padding: 6px 10px 8px; min-width: 0; }
.rt > small { display: block; font: 600 12.5px var(--mono); color: var(--sv-ink2); margin-bottom: 4px; }
.rt table { border-collapse: collapse; width: 100%; font-size: 13px; }
.rt th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--sv-ink2); padding: 2px 6px; }
.rt td { border-top: 1px solid #eef0f3; padding: 3px 6px; }
.rt code { font: 12.5px var(--mono); overflow-wrap: anywhere; }
.rt tr.hl td { background: #fdf0e3; box-shadow: inset 0 0 0 0 transparent; }
.rt tr.hl td:first-child { box-shadow: inset 3px 0 0 #ec7211; }

/* A VPC and its subnets. */
.vpcb { position: relative; border: 2px solid var(--vpcc); border-radius: 12px; padding: 8px 12px 12px; background: #fbf8ff; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vpcb > small, .sub > small, .az > small, .reg > small { display: block; font: 600 12.5px var(--mono); color: var(--vpcc); overflow-wrap: anywhere; }
.vpcb.prov { border-color: #0d7c66; background: #f3fbf8; } .vpcb.prov > small { color: #0d7c66; }
.subs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sub { position: relative; border: 1.5px dashed #0972d3; border-radius: 9px; padding: 6px 8px 8px; background: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sub > small { color: #0972d3; font-size: 12px; }
.pdns { background: #effaf6; border: 1px solid #9fd8c5; border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; font-size: 13px; }
.pdns code { font: 12.5px var(--mono); overflow-wrap: anywhere; }

/* The introduction's map. */
.map b { font-size: 16px !important; }
.map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mp { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; background: #fff; border: 1px solid var(--sv-line); border-left: 5px solid var(--c); border-radius: 9px; padding: 8px 12px; }
.mp-n { grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c); align-self: center; }
.mp > div:first-of-type { display: flex; flex-direction: column; } .mp b { font-size: 15px; } .mp small { font-size: 12.5px; color: var(--sv-ink2); }
.mp-ic { display: flex; gap: 6px; margin-top: 6px; } .mp-ic .ic { width: 34px; height: 34px; }
.mp-ep { --c: #0d7c66; } .mp-vpcs { --c: #7c3aed; } .mp-dc { --c: #0369a1; } .mp-dns { --c: #6d28d9; }
.mp-flow { --c: #be123c; } .mp-v6 { --c: #3f6212; } .mp-cost { --c: #b45309; }
.mp-vpc { grid-column: 2; grid-row: 2 / 4; background: #fbf8ff; border: 2px solid var(--vpcc); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.mp-vpc .ic { width: 48px; height: 48px; } .mp-vpc code { font: 13px var(--mono); }
.mp-vpc ul { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--sv-ink2); display: flex; flex-direction: column; gap: 3px; }
.map > :nth-child(4) { grid-area: 2 / 1; } .map > :nth-child(6) { grid-area: 2 / 3; }
.map > :nth-child(7) { grid-area: 3 / 1; } .map > :nth-child(8) { grid-area: 3 / 3; }

/* PrivateLink, peering. */
.pls { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.peer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: start; }
.pcx { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; margin-top: 4px; background: #f6f1ff; border: 2px solid var(--vpcc); border-radius: 10px; padding: 10px; }
.pcx .ic { width: 44px; height: 44px; } .pcx code { font: 12px var(--mono); } .pcx small { font-size: 12px; color: var(--sv-ink2); }

/* SVG topologies. */
.trs { width: 100%; max-height: 380px; }
.tv { fill: #fbf8ff; stroke: var(--vpcc); stroke-width: 2; }
.tvn { font-size: 16px; font-weight: 700; fill: #16191f; } .tvn.s { font-size: 13.5px; }
.tvc { font: 12.5px var(--mono); fill: #545b64; }
.tl { stroke-width: 4; fill: none; } .tl.ok { stroke: var(--vpcc); } .tl.no { stroke: var(--no); stroke-dasharray: 9 7; }
.tll { font: 13px var(--mono); fill: #545b64; } .tll.no { fill: var(--no); font-family: inherit; font-weight: 600; }
.tedge { fill: #fff; stroke: #c6ccd2; } .tet { font-size: 13px; font-weight: 700; } .tes { font-size: 12px; fill: #545b64; }
.thub { fill: #fff; stroke: var(--vpcc); stroke-width: 3; } .thn { font: 11.5px var(--mono); fill: #545b64; }

.mesh { margin-top: 12px; background: #fff; border: 1px solid var(--sv-line); border-radius: 9px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; max-width: 720px; }
.mr { display: grid; grid-template-columns: 5em 270px 3em 30px 3em; align-items: center; gap: 6px; justify-content: start; }
.mr code { font: 12.5px var(--mono); }
.pp, .tt { display: inline-block; height: 12px; border-radius: 3px; min-width: 4px; vertical-align: middle; }
.pp { background: #c4a6ff; } .tt { background: #0d7c66; }
.mesh small i { width: 14px; margin: 0 4px 0 12px; }

.scale { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rtc { background: #fff; border: 1px solid var(--sv-line); border-top: 5px solid var(--c); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rtc small { color: var(--sv-ink2); margin-top: 4px; }
.rtc.prod { --c: #be123c; } .rtc.dev { --c: #0369a1; } .rtc.shared { --c: #3f6212; }
.att { font: 12.5px var(--mono); border-radius: 5px; padding: 2px 8px; border: 1px solid; }
.att.p { color: #be123c; background: #fff1f3; } .att.d { color: #0369a1; background: #eef6fc; } .att.s { color: #3f6212; background: #f2f8ea; } .att.o { color: #545b64; background: #f2f3f3; }
.xr { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid var(--sv-line); border-radius: 9px; padding: 8px; font-size: 14px; }
.xr i { font-style: normal; color: var(--vpcc); font-weight: 600; }

/* Hybrid connections. */
.hyb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.2fr); gap: 12px; align-items: center; }
.hyb.dxl { grid-template-columns: minmax(0, .8fr) auto minmax(0, 1.2fr) auto minmax(0, .9fr); gap: 6px; }
.dcb { border: 2px solid #545b64; border-radius: 12px; background: #f2f3f3; padding: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.dcb > .ic { width: 30px; height: 30px; } .dcb > code { font: 12.5px var(--mono); }
.tunnels { display: flex; flex-direction: column; gap: 6px; align-items: stretch; font-size: 12.5px; color: var(--sv-ink2); text-align: center; }
.tun { border: 2px solid var(--dxc); border-radius: 18px; padding: 4px 10px; background: #eef6fc; display: flex; justify-content: space-between; gap: 6px; color: var(--sv-ink); }
.tun code { font: 12px var(--mono); }
.facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.facts span { background: #eef6fc; border: 1px solid #b8d8ef; border-radius: 16px; padding: 3px 12px; font-size: 13.5px; }
.loc { border: 2px dashed var(--dxc); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; background: #fff; }
.loc small { font-size: 12px; color: var(--sv-ink2); }
.dev { border-radius: 6px; padding: 4px 8px; font-size: 12.5px; }
.dev.c { background: #f2f3f3; border: 1px solid #545b64; } .dev.a { background: #232f3e; color: #fff; }
.devs { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.loc i { font-style: normal; color: var(--dxc); font-weight: 700; }
.dxs { margin-top: 12px; }

.vifs { display: flex; flex-direction: column; gap: 10px; }
.vif { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--sv-line); border-left: 5px solid var(--dxc); border-radius: 9px; padding: 8px 12px; }
.vif > i { font-style: normal; color: var(--sv-ink2); }
.vk { font-weight: 700; min-width: 11em; }
.vc { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--sv-line); border-radius: 6px; padding: 2px 8px; font-size: 13px; background: #f8f9fa; margin-right: 4px; }

.rms3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rm { background: #fff; border: 1px solid var(--sv-line); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.rm > small { color: var(--sv-ink2); font-size: 12.5px; }
.rms { width: 100%; max-height: 210px; }
.rl { fill: #eef6fc; stroke: var(--dxc); stroke-dasharray: 5 3; } .rlt { font-size: 11.5px; font-weight: 600; fill: #16191f; }
.rdc { fill: #f2f3f3; stroke: #545b64; stroke-width: 1.5; } .rc { fill: none; stroke: var(--dxc); stroke-width: 2.5; } .rd { fill: #232f3e; }

.bk { display: flex; flex-direction: column; gap: 8px; }
.paths { display: flex; flex-direction: column; gap: 6px; }
.path { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-radius: 8px; padding: 6px 10px; background: #fff; font-size: 13.5px; }
.path small { color: var(--sv-ink2); }
.dxp { border: 3px solid var(--dxc); } .vpnp { border: 2px dashed #545b64; }
.prio { background: #fff; border: 1px solid var(--sv-line); border-radius: 9px; padding: 8px 14px; font-size: 14px; }
.prio ol { margin: 6px 0; padding-left: 22px; } .prio li { margin: 3px 0; }
.prio li.hl { font-weight: 700; color: var(--dxc); }

/* DNS. */
.an { background: #fff; border: 1px solid var(--sv-line); border-left: 4px solid #6d28d9; border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; font-size: 13.5px; }
.an code { font: 12.5px var(--mono); overflow-wrap: anywhere; }
.an.no { border-left-color: var(--no); } .an.no b { color: var(--no); } .an small { color: var(--sv-ink2); }
.rese { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; align-items: center; }
.flows { display: flex; flex-direction: column; gap: 8px; font-size: 13px; text-align: center; color: var(--sv-ink2); }
.fl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; text-align: left; background: #fff; border-radius: 8px; padding: 6px 10px; color: var(--sv-ink); }
.fl b { grid-row: 1 / 3; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; align-self: center; }
.fl code { font: 12px var(--mono); overflow-wrap: anywhere; }
.fl.in { border: 2px solid #6d28d9; } .fl.in b { background: #6d28d9; }
.fl.out { border: 2px solid #0d7c66; } .fl.out b { background: #0d7c66; }
.rule { background: #effaf6; border: 1px solid #9fd8c5; border-radius: 8px; padding: 5px 10px; display: flex; flex-direction: column; font-size: 12.5px; }
.rule code { font: 12px var(--mono); overflow-wrap: anywhere; }

/* Flow logs. */
.rec { display: flex; flex-wrap: wrap; gap: 4px; background: #16191f; border-radius: 9px; padding: 10px; }
.rec .f { display: flex; flex-direction: column; align-items: center; background: #232a33; border-radius: 5px; padding: 4px 7px; }
.rec .f code { font: 600 13.5px var(--mono); color: #e8eaed; }
.rec .f small { font: 11px var(--mono); color: #9aa5b1; }
.rec .f.rej { background: rgba(209, 50, 18, .45); } .rec .f.rej small { color: #ffd3c8; }
.flw { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 14px; }
.flw .col > b { font-size: 13px; color: var(--sv-ink2); }
.ping { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; margin-bottom: 12px; }
.lanes { display: flex; flex-direction: column; gap: 10px; }
.ln { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ln i { flex: 1; height: 2px; position: relative; }
.ln.ok i { background: var(--ok); } .ln.bad i { background: var(--no); }
.ln.ok i::after { content: ''; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--ok); border-right: 0; }
.ln.bad i::before { content: ''; position: absolute; left: -2px; top: -5px; border: 6px solid transparent; border-right: 9px solid var(--no); border-left: 0; }
.ln b { font: 700 12.5px var(--mono); } .ln.ok b { color: var(--ok); } .ln.bad b { color: var(--no); }
.flt { display: flex; gap: 4px; }
.flt span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; padding: 8px 4px; border-radius: 6px; text-align: center; }
.flt .nacl { background: #fff1f3; border: 2px solid var(--no); } .flt .sg { background: #f2f8ea; border: 2px solid var(--ok); }
.tbl.res { margin: 10px 0; }

/* IPv6. */
.v6 { display: flex; flex-direction: column; gap: 12px; }
.gws { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Costs. */
.cost { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cw { display: grid; grid-template-columns: 17em minmax(0, 1fr) 5.5em; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; background: #fff; border: 1px solid var(--sv-line); border-radius: 9px; padding: 8px 12px; }
.cw > b { font-size: 14px; } .cw > code { font: 700 17px var(--mono); text-align: right; }
.cw > small { grid-column: 1 / -1; font-size: 12.5px; color: var(--sv-ink2); }
.cb { display: flex; height: 18px; background: #f2f3f3; border-radius: 4px; overflow: hidden; }
.seg { height: 100%; }
.seg.k-nath { background: #b45309; } .seg.k-natgb { background: #f59e0b; } .seg.k-eph { background: #0d7c66; } .seg.k-epgb { background: #5cc5a5; }

.xfer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.reg { position: relative; border: 2px dashed #232f3e; border-radius: 12px; padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.reg > small { color: #232f3e; }
.azs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.az { position: relative; border: 1.5px dashed #0972d3; border-radius: 9px; padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.az > small { color: #0972d3; font-size: 12px; }
.tps { display: flex; flex-direction: column; gap: 6px; }
.tp { display: flex; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--sv-line); border-left: 4px solid var(--pay); border-radius: 7px; padding: 5px 10px; font-size: 13.5px; }
.tp b { font: 700 13.5px var(--mono); white-space: nowrap; }
.tp.free { border-left-color: var(--ok); } .tp.free b { color: var(--ok); }
.tp.hi { border-left-color: var(--no); } .tp.hi b { color: var(--no); }

@media (max-width: 860px) {
  .chain { flex-direction: column; align-items: flex-start; }
  .chain > .ar { flex: none; min-height: 30px; }
  .two, .two.w, .peer, .hyb, .hyb.dxl, .rese, .xfer, .v6, .pls, .flw, .scale, .rms3, .map, .subs, .azs { grid-template-columns: 1fr; }
  .map > * { grid-area: auto !important; }
  .mp-vpc { grid-column: auto; grid-row: auto; }
  .pe { grid-template-columns: 1fr; }
  .ping { grid-template-columns: 1fr; }
  .cw { grid-template-columns: 1fr auto; } .cb { grid-column: 1 / -1; grid-row: 2; }
  .vk { min-width: 0; width: 100%; }
  .gws { grid-template-columns: 1fr; }
}
