/* Antennas tab on the About page (antennas.js). Colours come from the shared variables in
   site.css / dark.css, so dark mode needs no extra rules; the print sheet (#ant-print) is always
   black on white. */
.ant-calc { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 992px) { .ant-calc { grid-template-columns: minmax(260px, 320px) 1fr; } }
.ant-form { display: flex; flex-direction: column; gap: 12px; }
.ant-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ant-field > span { font-size: .8rem; font-weight: 600; color: var(--pl-dim); }
.ant-field small { color: var(--pl-faint); font-size: .75rem; }
.ant-params { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; border-top: 1px solid var(--pl-line); }
.ant-reset { align-self: flex-start; padding: 0; font-size: .8rem; }
.ant-err { color: var(--rec); font-size: .8rem; margin-top: -6px; }
.ant-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ant-preset { border: 1px solid var(--pl-line); background: transparent; color: inherit; border-radius: 999px;
  padding: 3px 10px; font-size: .8rem; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ant-preset small { color: var(--pl-dim); }
.ant-preset:hover { border-color: var(--pl-dim); }
.ant-preset.active { border-color: currentColor; font-weight: 600; }
.ant-unit .btn.active { font-weight: 600; }
.ant-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ant-desc { margin: 0; color: var(--pl-dim); font-size: .9rem; }
.ant-print-btn { white-space: nowrap; flex-shrink: 0; }
.ant-svg { margin-top: 10px; padding: 6px; }
.ant-draw { display: block; width: 100%; height: auto; max-height: 520px; }
.ant-lam { color: var(--pl-dim); font-size: .85rem; margin: 8px 2px 4px; }
.ant-parts { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ant-parts th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pl-dim);
  border-bottom: 1px solid var(--pl-line); padding: 6px 4px; font-weight: 600; }
.ant-parts td { border-bottom: 1px solid var(--pl-line); padding: 7px 4px; }
.ant-parts .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ant-parts td.num:last-child { font-weight: 700; }
.ant-parts tr.ant-ref td { color: var(--pl-dim); }
.ant-parts tr.ant-ref td.num:last-child { font-weight: 500; }
.ant-info { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .85rem; margin-top: 8px; color: var(--pl-dim); }
.ant-info b { color: var(--pl-text, inherit); font-weight: 600; }
.ant-src { font-size: .78rem; }

/* the drawing (on screen and on paper) */
.ad-wire { stroke: #c27a3a; stroke-width: 5; stroke-linecap: round; fill: none; }
.ad-back { opacity: .32; }
.ad-coax { stroke: var(--pl-faint); stroke-width: 4; stroke-dasharray: 2 5; stroke-linecap: round; }
.ad-mast { stroke: var(--pl-low); stroke-width: 2; stroke-dasharray: 8 6; }
.ad-feed { fill: var(--rec); stroke: var(--pl-card); stroke-width: 2; }
.ad-dim { stroke: var(--pl-dim); stroke-width: 1.2; }
.ad-ext { stroke: var(--pl-low); stroke-width: 1; stroke-dasharray: 3 3; }
.ad-arrow { fill: var(--pl-dim); }
.ad-arc { stroke: var(--pl-dim); stroke-width: 1.2; fill: none; stroke-dasharray: 4 3; }
.ad-pill { fill: var(--pl-card); stroke: var(--pl-line); }
.ad-lbl { fill: currentColor; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ad-cap { fill: var(--pl-dim); font-size: 12px; }


/* ---- feed line & front end (#ant-fe) ---- */
.ant-fe { margin-top: 26px; padding-top: 6px; border-top: 1px solid var(--pl-line); }
.ant-fe .mi-h3 { font-size: 1.1rem; font-weight: 700; }
.fe-grid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 992px) { .fe-grid { grid-template-columns: minmax(260px, 320px) 1fr; } }
.fe-form { display: flex; flex-direction: column; gap: 12px; }
.fe-out { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fe-chain, .fe-cmp { padding: 6px; }
.fe-kpis { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fe-kpi small { color: var(--pl-faint); font-size: .72rem; }
.fe-warn { border: 1px solid var(--rec); border-radius: 10px; padding: 8px 12px; color: var(--rec); font-weight: 600; }
.fe-warn p { margin: 0; }
.fe-warn p + p { margin-top: 4px; }
.fe-advice { margin: 0; padding-inline-start: 18px; font-size: .9rem; }
.fe-advice li { margin: 3px 0; }
.fe-blk { stroke-width: 1.5; }
.fe-loss { fill: var(--pl-hover); stroke: var(--pl-line); }
.fe-lna { fill: rgba(34, 169, 156, .16); stroke: var(--m24); }
.fe-sdr { fill: rgba(124, 92, 214, .14); stroke: var(--iss); }
.fe-block { fill: rgba(229, 72, 77, .14); stroke: var(--rec); stroke-dasharray: 4 3; }
.fe-arrow { stroke: var(--pl-dim); stroke-width: 1.5; }
.fe-name { fill: currentColor; font-size: 11.5px; font-weight: 700; }
.fe-sub { fill: var(--pl-dim); font-size: 10.5px; }
.fe-db { fill: currentColor; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fe-run { fill: var(--pl-dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.fe-sum { fill: currentColor; font-size: 13px; font-weight: 700; }
.fe-bar { fill: var(--pl-low); }
.fe-bar.is-on { fill: var(--m24); }


/* ---- gain and direction (#ant-pat) ---- */
.ant-pat { margin-top: 26px; padding-top: 6px; border-top: 1px solid var(--pl-line); }
.ant-pat .mi-h3 { font-size: 1.1rem; font-weight: 700; }
.pat-ctl { display: grid; gap: 10px 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 12px; }
.pat-kpis { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.pat-hint { font-size: .92rem; margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--m24); background: var(--pl-hover); border-radius: 0 8px 8px 0; }
.pat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pat-fig { margin: 0; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pat-fig figcaption { font-size: .8rem; color: var(--pl-dim); text-align: center; }
.pat-sky canvas { width: 100%; max-width: 360px; height: auto; display: block; border-radius: 50%; }
.pat-scale { width: 100%; max-width: 320px; }
.pat-bar { height: 10px; border-radius: 5px; }
.pat-ticks { display: flex; justify-content: space-between; font-size: .72rem; color: var(--pl-dim); font-variant-numeric: tabular-nums; }
.pat-el, .pat-az { width: 100%; max-width: 360px; }
.pat-polar { max-height: none; }
.pat-ring { fill: none; stroke: var(--pl-line); }
.pat-spoke { stroke: var(--pl-line); stroke-dasharray: 2 4; }
.pat-ground { stroke: var(--pl-low); stroke-width: 1.5; stroke-dasharray: 6 4; }
.pat-tick { fill: var(--pl-faint); font-size: 10px; }
.pat-tot { fill: rgba(124, 92, 214, .10); stroke: var(--iss); stroke-width: 1.5; stroke-dasharray: 5 4; }
.pat-rh { fill: rgba(34, 169, 156, .22); stroke: var(--m24); stroke-width: 2.5; }
.pat-legend { font-size: .76rem; color: var(--pl-dim); text-align: center; }
.pat-key { display: inline-block; width: 16px; height: 3px; vertical-align: middle; border-radius: 2px; }
.pat-key-rh { background: var(--m24); }
.pat-key-tot { background: var(--iss); }


/* ---- connecting the coax (#ant-coax) ---- */
.ant-coax { margin-top: 26px; padding-top: 6px; border-top: 1px solid var(--pl-line); }
.ant-coax .mi-h3 { font-size: 1.1rem; font-weight: 700; }
.cx-grid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 992px) { .cx-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.cx-fig { padding: 6px; }
.cx-kpis { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.cx-steps { margin: 0; padding-inline-start: 22px; font-size: .92rem; }
.cx-steps li { margin: 5px 0; line-height: 1.45; }
.cx-warn { font-size: .9rem; margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--m23); background: var(--pl-hover); border-radius: 0 8px 8px 0; }
.cx-warn.is-bad { border: 1px solid var(--rec); border-left-width: 3px; color: var(--rec); font-weight: 600; }
.cx-jacket { fill: #1f2933; }
.cx-braid { fill: #a7b0ba; stroke: #6b7785; stroke-dasharray: 2 2; }
.cx-diel { fill: #f4f1e6; stroke: #c9c3ad; }
.cx-centre { stroke: #c27a3a; stroke-width: 4; stroke-linecap: round; }
.cx-lead-c { fill: none; stroke: #c27a3a; stroke-width: 3; }
.cx-lead-b { fill: none; stroke: #8a96a3; stroke-width: 3; stroke-dasharray: 5 3; }
.cx-tag-c { fill: #c27a3a; font-size: 13px; font-weight: 700; }
.cx-tag-b { fill: #8a96a3; font-size: 13px; font-weight: 700; }
.cx-block { fill: var(--pl-hover); stroke: var(--pl-low); }
.cx-plate, .cx-socket { fill: var(--pl-low); stroke: var(--pl-dim); }
.cx-ferrite { fill: #3b3f45; stroke: #111; }
.cx-pad-c { fill: #c27a3a; }
.cx-pad-b { fill: #8a96a3; }
.cx-arm-c { stroke: #c27a3a; stroke-width: 5; stroke-linecap: round; }
.cx-arm-b { stroke: #8a96a3; stroke-width: 7; stroke-linecap: round; }
.cx-small { stroke-width: 4; }

/* ---- the build sheet: only on paper ---- */
.ant-print { display: none; }
@media print {
  html.ant-print-on body > *:not(#ant-print) { display: none !important; }
  /* Bootstrap 4's print rules set body/.container min-width 992px (the sheet would be shrunk to
     fit, so the 1:1 parts come out ~70 %) and @page size A3; the browser's paper size wins here */
  html.ant-print-on { color-scheme: light !important; }
  html.ant-print-on, html.ant-print-on body { background: #fff !important; padding: 0 !important; margin: 0 !important; min-width: 0 !important; }
  html.ant-print-on #ant-print { display: block; color: #111; background: #fff; font-size: 10.5pt; width: auto; }
  @page { size: auto; margin: 12mm; }
  .ant-print h1 { font-size: 17pt; margin: 2px 0 2px; font-weight: 700; }
  .ant-print h2 { font-size: 11pt; margin: 10px 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .ap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
    border-bottom: 2px solid #111; padding-bottom: 6px; }
  .ap-kicker { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .1em; color: #555; }
  .ap-sub { color: #444; font-size: 9.5pt; }
  .ap-meta { color: #555; font-size: 9pt; text-align: end; }
  .ap-fig { margin: 8px 0 4px; border: 1px solid #ccc; border-radius: 6px; padding: 4px; break-inside: avoid; }
  .ap-fig svg { display: block; width: 100%; height: auto; max-height: 85mm; }
  .ap-cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; break-inside: avoid; }
  .ap-table { width: 100%; border-collapse: collapse; }
  .ap-table th, .ap-table td { border-bottom: 1px solid #bbb; padding: 4px 3px; text-align: start; vertical-align: top; }
  .ap-table th { font-size: 8pt; color: #555; text-transform: uppercase; }
  .ap-table .num { text-align: end; white-space: nowrap; font-weight: 700; }
  .ap-table td:nth-child(3) { white-space: nowrap; }
  .ap-box { width: 14px; font-size: 12pt; line-height: 1; }
  .ap-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 9.5pt; }
  .ap-dl dt { font-weight: 400; color: #555; }
  .ap-dl dd { margin: 0; font-weight: 600; }
  .ap-note { font-size: 9.5pt; margin: 0; }
  .ap-one { break-inside: avoid; margin-top: 4px; }
  .ap-part { margin: 2px 0 6px; font-size: 9pt; }
  .ap-bar { display: block; }
  .ap-rod { fill: #c27a3a; }
  .ap-tick { stroke: #111; stroke-width: .25; }
  .ap-end { stroke: #111; stroke-width: .35; }
  .ap-ruler { color: #555; }
  .ap-ruler .ap-rod { fill: #ddd; }
  .ap-coax { break-inside: avoid; margin-top: 8px; }
  .ap-coax-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; align-items: start; }
  .ap-coax-row svg { width: 100%; height: auto; }
  .ap-steps { font-size: 9pt; margin: 0; padding-inline-start: 14px; list-style: none; }
  .ap-steps li { margin: 3px 0; }
  .ant-print .cx-block { fill: #f3f3f3; stroke: #999; }
  .ant-print .cx-plate, .ant-print .cx-socket { fill: #ccc; stroke: #888; }
  .ap-pat { break-before: page; }
  .ap-pat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: center; }
  .ap-pat-row img, .ap-pat-row svg { width: 100%; height: auto; }
  .ap-sky { border-radius: 50%; }
  .ap-note { font-size: 9pt; color: #444; margin: 6px 0 0; }
  .ant-print .pat-ring, .ant-print .pat-spoke { stroke: #ccc; }
  .ant-print .pat-tick { fill: #777; }
  .ant-print .pat-tot { stroke: #7c5cd6; fill: rgba(124, 92, 214, .08); }
  .ant-print .pat-rh { stroke: #22a99c; fill: rgba(34, 169, 156, .18); }
  .ap-fe { break-before: page; }
  .ap-fig-fe svg { max-height: 60mm; }
  .ap-warn { color: #b00; font-weight: 700; margin: 6px 0 0; font-size: 9.5pt; }
  .ap-adv { font-size: 9pt; margin: 6px 0 0; padding-inline-start: 16px; }
  .ant-print .fe-loss { fill: #f3f3f3; stroke: #999; }
  .ant-print .fe-lna { fill: #e3f4f2; stroke: #22a99c; }
  .ant-print .fe-sdr { fill: #eee9fb; stroke: #7c5cd6; }
  .ant-print .fe-block { fill: #fde8e8; stroke: #d22; }
  .ant-print .fe-name, .ant-print .fe-db, .ant-print .fe-sum { fill: #111; }
  .ant-print .fe-sub, .ant-print .fe-run { fill: #555; }
  .ap-foot { margin-top: 10px; padding-top: 4px; border-top: 1px solid #ccc; color: #777; font-size: 8pt; }
  /* the drawing in black and white for paper */
  .ant-print .ad-lbl { fill: #111; }
  .ant-print .ad-cap { fill: #555; }
  .ant-print .ad-pill { fill: #fff; stroke: #999; }
  .ant-print .ad-dim, .ant-print .ad-arc { stroke: #333; }
  .ant-print .ad-arrow { fill: #333; }
  .ant-print .ad-ext, .ant-print .ad-mast { stroke: #999; }
  .ant-print .ad-coax { stroke: #888; }
  .ant-print .ad-feed { fill: #d22; stroke: #fff; }
}
