/* QSO Journey Antenna Calculators */
.qac {
	--bark: #231B14; --bark2: #37291C; --terra: #B5613A; --terra2: #A8532E; --terra3: #C45A2A; --cream: #EDE6D8; --card: #FBF8F1;
	--tan: #E2D6C2; --tan2: #CDBEA0; --muted: #6B5D4C; --body: #3A2F25; --ok: #2f6b2a; --okbg: #e3efdc; --bad: #a3271b; --badbg: #f8e3df;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: light;
	max-width: 1000px; background: var(--card); color: var(--bark); border-radius: 16px; padding: 14px; box-sizing: border-box; font-size: 16px; line-height: 1.5;
}
/* 24px under the page title, 40px at the bottom (QSO Journey standard for every app page).
   !important because block themes zero the first and last child's block margins in post content. */
.qac.qac { margin: 24px auto 40px !important; }
.qac.qac + .qac.qac { margin-top: 40px !important; }
.qac *, .qac *::before, .qac *::after { box-sizing: border-box; }
.qac h2, .qac h3, .qac h4 { padding: 0; border: 0; letter-spacing: normal; text-transform: none; }
.qac .qac-loading { padding: 40px 10px; text-align: center; color: var(--muted); }

.qac .qac-head { background: var(--bark); color: var(--cream); border-radius: 14px; padding: 20px 20px 16px; margin-bottom: 12px; }
.qac .qac-eye, .qac-sheet .qac-eye { font: 700 11px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; color: #E08A5E; }
.qac .qac-title { font: 700 32px/1.1 Georgia, Cambria, serif; margin: 8px 0 6px; color: var(--cream); }
.qac .qac-lede { margin: 0; color: #D9CDB9; max-width: 700px; font-size: 15px; }

.qac .qac-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.qac .qac-tab { flex: 0 0 auto; background: #fff; border: 2px solid var(--tan); border-radius: 999px; padding: 7px 14px; font: 700 14px/1.2 system-ui, sans-serif; color: var(--muted); cursor: pointer; }
.qac .qac-tab:hover { border-color: var(--tan2); color: var(--bark); }
.qac .qac-tab.on { background: var(--terra3); border-color: var(--terra3); color: #fff; }
.qac button:focus-visible, .qac input:focus-visible, .qac select:focus-visible { outline: 3px solid #E08A5E; outline-offset: 2px; }

.qac .qac-main { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 14px; align-items: start; }
.qac .qac-panel { background: #fff; border: 1px solid var(--tan); border-radius: 12px; padding: 14px; position: sticky; top: 16px; }
.qac .qac-ph { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.qac .qac-ph h3 { font: 700 18px/1.2 Georgia, Cambria, serif; margin: 0; color: var(--bark); }
.qac .qac-units { display: inline-flex; border: 1px solid var(--tan2); border-radius: 999px; overflow: hidden; }
.qac .qac-units button { background: #fff; border: 0; padding: 5px 11px; font: 700 12.5px/1.2 system-ui, sans-serif; color: var(--muted); cursor: pointer; }
.qac .qac-units button.on { background: var(--bark); color: var(--cream); }

.qac .qac-f { display: block; margin: 0 0 11px; border: 0; padding: 0; min-width: 0; }
.qac .qac-f > span, .qac .qac-f > legend { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 4px; padding: 0; }
.qac .qac-f small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.35; }
.qac .qac-in { display: flex; align-items: center; background: #FFFDF8; border: 1px solid var(--tan2); border-radius: 8px; overflow: hidden; }
.qac .qac-in:focus-within { border-color: var(--terra); background: #fff; }
.qac .qac-in input, .qac .qac-in select { flex: 1; min-width: 0; width: 100%; font: 400 16px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--bark); background: transparent; border: 0; padding: 9px 10px; min-height: 42px; margin: 0; box-shadow: none; outline-offset: -3px; }
.qac .qac-in em { font-style: normal; font-size: 13px; color: var(--muted); padding: 0 10px 0 2px; white-space: nowrap; }
.qac .qac-bandset { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 8px; }
.qac .qac-bandset legend { grid-column: 1 / -1; }
.qac .qac-bandset label { display: flex; gap: 6px; align-items: center; font-size: 14px; padding: 3px 0; cursor: pointer; }
.qac .qac-bandset input { width: 18px; height: 18px; margin: 0; accent-color: var(--terra); }

.qac .qac-out { min-width: 0; }
.qac .qac-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.qac .qac-tile { background: #fff; border: 1px solid var(--tan); border-radius: 12px; padding: 11px 13px; }
.qac .qac-tile span { display: block; font: 700 10.5px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qac .qac-tile b { display: block; font: 700 22px/1.2 Georgia, Cambria, serif; color: var(--bark); margin: 5px 0 2px; }
.qac .qac-tile small { display: block; color: var(--muted); font-size: 12.5px; }
.qac .qac-tile.hi { background: var(--bark); border-color: var(--bark); }
.qac .qac-tile.hi span { color: #E08A5E; }
.qac .qac-tile.hi b { color: var(--cream); }
.qac .qac-tile.hi small { color: #C9B896; }

.qac .qac-svg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--tan); border-radius: 12px; margin: 0 0 12px; padding: 8px; }
.qac-svg .wire { stroke: #231B14; stroke-width: 3; fill: none; stroke-linecap: round; }
.qac-svg .mast { stroke: #8A7660; stroke-width: 5; }
.qac-svg .rope { stroke: #8A7660; stroke-width: 1.5; stroke-dasharray: 4 3; }
.qac-svg .coax { stroke: #6B5D4C; stroke-width: 4; fill: none; stroke-linecap: round; }
.qac-svg .cp { stroke: #B5613A; stroke-width: 2.5; fill: none; stroke-linecap: round; }
.qac-svg .ins { fill: #fff; stroke: #B5613A; stroke-width: 2.5; }
.qac-svg .feed { fill: #C45A2A; }
.qac-svg .dim { stroke: #A8532E; stroke-width: 1.2; }
.qac-svg .lbl { fill: #231B14; font: 600 14px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.qac-svg .lbl.sm { fill: #6B5D4C; font-size: 12px; font-weight: 500; }
.qac-svg .goodbar { fill: #5f9e4f; }
.qac-svg .badbar { fill: #e7b8ad; }

.qac .qac-tbl, .qac-sheet .qac-tbl { width: 100%; border-collapse: collapse; margin: 0 0 12px; background: #fff; border: 1px solid var(--tan); border-radius: 12px; overflow: hidden; font-size: 15px; }
.qac-tbl th, .qac-tbl td { text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid #EFE7D8; vertical-align: top; background: none; }
.qac-tbl tr:last-child th, .qac-tbl tr:last-child td { border-bottom: 0; }
.qac-tbl th { width: 38%; font-weight: 700; color: #231B14; }
.qac-tbl thead th { background: #231B14; color: #EDE6D8; font: 700 12px/1.2 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.qac-tbl td small { display: block; color: #6B5D4C; font-size: 13px; }
.qac .qac-bands tr.ok td { color: var(--ok); font-weight: 600; }
.qac .qac-bands tr.no td { color: var(--muted); }
.qac .qac-cmp tr.on th, .qac .qac-cmp tr.on td { background: #FFF4EC; }
.qac .qac-h4 { font: 700 11px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--terra3); margin: 16px 2px 8px; }

.qac .qac-sub { background: #F5F0E3; border: 1px solid var(--tan2); border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 12px; }
.qac .qac-sub > b { font-size: 15px; }
.qac .qac-sub > p { margin: 2px 0 8px; font-size: 14px; color: var(--body); }
.qac .qac-sub .qac-f { max-width: 300px; }
.qac .qac-trim { padding: 9px 12px; border-radius: 8px; margin: 0 0 10px !important; font-size: 14.5px; }
.qac .qac-trim.cut { background: #FFF4EC; border-left: 4px solid var(--terra); }
.qac .qac-trim.add { background: var(--okbg); border-left: 4px solid var(--ok); }
.qac .qac-notes { margin: 4px 0 4px; padding-left: 20px; color: var(--body); font-size: 14.5px; }
.qac .qac-notes li { margin: 4px 0; }
.qac .qac-warn { background: var(--badbg); color: var(--bad); border-radius: 10px; padding: 12px 14px; font-weight: 600; margin-bottom: 12px; }
.qac .qac-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--muted); margin: -4px 2px 6px; }
.qac .qac-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: -8px; }
.qac .qac-legend i.g { background: #5f9e4f; }
.qac .qac-legend i.r { background: #e7b8ad; }
.qac .qac-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.qac .qac-chips span { background: #fff; border: 1px solid var(--tan); border-radius: 999px; padding: 3px 10px; font-size: 13.5px; }

.qac .qac-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; padding: 10px 2px 0; border-top: 1px solid var(--tan); font-size: 13px; color: var(--muted); }
.qac .qacb { display: inline-flex; align-items: center; justify-content: center; font: 700 13px/1.2 system-ui, sans-serif; padding: 6px 13px; min-height: 34px; border-radius: 999px; border: 1px solid var(--terra); background: #fff; color: var(--terra2); cursor: pointer; }
.qac .qacb:hover { background: #FFF4EC; }

@media (max-width: 760px) {
	.qac { padding: 8px; border-radius: 12px; }
	.qac .qac-head { padding: 16px 14px 12px; }
	.qac .qac-title { font-size: 26px; }
	.qac .qac-main { grid-template-columns: 1fr; }
	.qac .qac-panel { position: static; }
	.qac .qac-tile b { font-size: 20px; }
	.qac-tbl th, .qac-tbl td { padding: 7px 9px; }
	.qac .qac-bandset { grid-template-columns: repeat(4, 1fr); }
	.qac-svg .lbl { font-size: 21px; }
	.qac-svg .lbl.sm { font-size: 17px; }
}
@media (max-width: 420px) {
	.qac .qac-bandset { grid-template-columns: repeat(3, 1fr); }
	.qac .qac-tiles { grid-template-columns: 1fr 1fr; }
}

/* cut sheet */
#qac-print { display: none; }
.qac-sheet { font: 11pt/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #231B14; }
.qac-sheet-h { border-bottom: 3px solid #B5613A; padding-bottom: 6pt; margin-bottom: 10pt; }
.qac-sheet h1 { font: 700 22pt/1.15 Georgia, Cambria, serif; margin: 4pt 0 0; color: #231B14; }
.qac-sheet .qac-tiles { display: flex; flex-wrap: wrap; gap: 8pt; margin: 0 0 10pt; }
.qac-sheet .qac-tile { border: 1px solid #CDBEA0; border-radius: 6pt; padding: 6pt 9pt; min-width: 1.6in; }
.qac-sheet .qac-tile span { display: block; font: 700 7.5pt/1.2 ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; color: #6B5D4C; }
.qac-sheet .qac-tile b { display: block; font: 700 16pt/1.2 Georgia, Cambria, serif; }
.qac-sheet .qac-tile small { font-size: 8pt; color: #6B5D4C; }
.qac-sheet .qac-svg { width: 100%; max-height: 3.2in; border: 1px solid #CDBEA0; border-radius: 6pt; margin: 0 0 10pt; }
.qac-sheet .qac-tbl { border: 1px solid #CDBEA0; }
.qac-sheet .qac-h4 { font: 700 8pt/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: #C45A2A; margin: 10pt 0 5pt; }
.qac-sheet .qac-sub { border: 1px solid #CDBEA0; border-radius: 6pt; padding: 6pt 9pt; margin-bottom: 8pt; }
.qac-sheet .qac-sub > p:not(.qac-trim) { display: none; }
.qac-sheet .qac-notes { padding-left: 16pt; font-size: 10pt; }
.qac-sheet .qac-legend i { display: inline-block; width: 9pt; height: 9pt; margin-right: 3pt; }
.qac-sheet .qac-legend i.g { background: #5f9e4f; }
.qac-sheet .qac-legend i.r { background: #e7b8ad; }
.qac-sheet .qac-chips span { display: inline-block; border: 1px solid #CDBEA0; border-radius: 99px; padding: 1pt 7pt; margin: 0 3pt 3pt 0; font-size: 9pt; }
.qac-sheet-f { margin-top: 12pt; padding-top: 5pt; border-top: 1px solid #CDBEA0; font-size: 9pt; color: #6B5D4C; }

@media print {
	.qac.qac { margin: 0 auto !important; }
	body.qac-printing > *:not(#qac-print) { display: none !important; }
	body.qac-printing { background: #fff !important; margin: 0 !important; padding: 0 !important; }
	body.qac-printing #qac-print { display: block !important; }
	#qac-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	#qac-print .qac-svg { break-inside: avoid; }
	#qac-print .qac-svg .lbl { font-size: 14px; }
	#qac-print .qac-svg .lbl.sm { font-size: 12px; }
}
