/* Cable Calculators: shared calculator styles. Everything is scoped under .ccx
   and written to win over theme defaults for inputs, selects and buttons. */

.ccx {
	--ccx-volt: #1F5BFF;
	--ccx-volt-dark: #1442D6;
	--ccx-volt-tint: #EEF2FF;
	--ccx-signal: #CCFF4D;
	--ccx-ink: #0A1324;
	--ccx-slate: #3A4659;
	--ccx-muted: #5B6678;
	--ccx-line: #E3E8EF;
	--ccx-line-soft: #EDF1F5;
	--ccx-field: #C9D2DE;
	--ccx-cloud: #F5F7FA;
	--ccx-copper: #C2410C;
	--ccx-peach: #FDBA8C;
	--ccx-head: 'Space Grotesk', system-ui, sans-serif;
	--ccx-body: 'Inter', system-ui, sans-serif;
	--ccx-mono: 'JetBrains Mono', ui-monospace, monospace;
	display: block;
	font-family: var(--ccx-body);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ccx-ink);
	text-align: left;
	cursor: auto;
}
.ccx *, .ccx *::before, .ccx *::after { box-sizing: border-box; }

.ccx .ccx-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.ccx .ccx-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ccx .ccx-aside { flex: 1 1 360px; min-width: 0; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }

.ccx .ccx-card { background: #FFFFFF; border: 1px solid var(--ccx-line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; }
.ccx .ccx-card.ccx-tight { padding: 22px 24px; }
.ccx .ccx-card.ccx-dashed { background: transparent; border-style: dashed; }
.ccx .ccx-eyebrow { margin: 0; font-family: var(--ccx-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ccx-volt); }
.ccx .ccx-h2 { margin: 6px 0 4px; font-family: var(--ccx-head); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; color: var(--ccx-ink); }
.ccx .ccx-sub { margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: var(--ccx-slate); }
.ccx .ccx-title { font-size: 15px; font-weight: 600; color: var(--ccx-ink); }
.ccx .ccx-small { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ccx-muted); }
.ccx .ccx-num { font-family: var(--ccx-mono); font-weight: 600; }
.ccx .ccx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Fields */
.ccx .ccx-lbl { display: flex; flex-direction: column; gap: 6px; flex: 1 1 150px; min-width: 0; margin: 0; font-size: 14px; font-weight: 500; color: var(--ccx-ink); }
.ccx .ccx-hint { font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--ccx-muted); }
.ccx .ccx-fb { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--ccx-field); border-radius: 12px; background: #FFFFFF; transition: border-color .15s, box-shadow .15s; }
.ccx .ccx-fb:focus-within { border-color: var(--ccx-volt); box-shadow: 0 0 0 4px var(--ccx-volt-tint); }
.ccx .ccx-fb input,
.ccx .ccx-fb select {
	flex: 1; min-width: 0; width: 100%; height: auto; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 0; outline: none; box-shadow: none; background: transparent;
	font-family: var(--ccx-mono); font-size: 16px; line-height: 1.4; color: var(--ccx-ink);
	-webkit-appearance: none; appearance: none;
}
.ccx .ccx-fb input:focus, .ccx .ccx-fb select:focus { border: 0; outline: none; box-shadow: none; }
.ccx .ccx-fb select { font-family: var(--ccx-body); font-size: 15px; cursor: pointer; padding-right: 18px; background-image: linear-gradient(45deg, transparent 50%, var(--ccx-muted) 50%), linear-gradient(135deg, var(--ccx-muted) 50%, transparent 50%); background-position: calc(100% - 6px) 55%, 100% 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.ccx .ccx-u { font-size: 13px; color: var(--ccx-muted); white-space: nowrap; }
.ccx .ccx-pre { font-family: var(--ccx-mono); color: var(--ccx-muted); }

.ccx .ccx-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 16px 0; border-top: 1px solid var(--ccx-line-soft); }
.ccx .ccx-row.ccx-head { border-top: 0; padding-bottom: 4px; }
.ccx .ccx-row.ccx-top { align-items: flex-start; }
.ccx .ccx-rowlbl { flex: 1.4 1 220px; min-width: 0; align-self: center; }
.ccx .ccx-rowlbl b { display: block; font-size: 15px; font-weight: 600; color: var(--ccx-ink); }
.ccx .ccx-rowlbl span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--ccx-muted); }
.ccx .ccx-colhead { flex: 1 1 120px; font-size: 13px; font-weight: 600; color: var(--ccx-slate); }
.ccx .ccx-colhead.ccx-us { color: var(--ccx-volt); }
.ccx .ccx-lbl.ccx-cmp { flex: 1 1 120px; }
@media (max-width: 600px) {
	.ccx .ccx-row.ccx-head .ccx-rowlbl { display: none; }
	.ccx .ccx-fb { padding: 0 12px; gap: 6px; }
}
.ccx .ccx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 16px; margin-top: 8px; }
.ccx .ccx-grid.ccx-narrow { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ccx .ccx-calcs { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.ccx .ccx-calc { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 18px; border-radius: 14px; background: var(--ccx-cloud); font-size: 15px; color: var(--ccx-slate); }
.ccx .ccx-calc.ccx-total { background: var(--ccx-volt-tint); color: var(--ccx-ink); font-weight: 600; }
.ccx .ccx-calc.ccx-total .ccx-num { color: var(--ccx-volt); font-size: 18px; }
.ccx .ccx-calc .ccx-num { color: var(--ccx-ink); }

/* Yes / No toggle */
.ccx .ccx-seg { display: flex; padding: 4px; background: var(--ccx-cloud); border: 1px solid var(--ccx-line); border-radius: 12px; max-width: 260px; }
.ccx .ccx-seg button,
.ccx .ccx-seg button:hover,
.ccx .ccx-seg button:focus {
	flex: 1; min-height: 44px; margin: 0; padding: 0 12px; border: 0; border-radius: 9px;
	background: transparent; color: var(--ccx-slate); box-shadow: none; text-decoration: none;
	font-family: var(--ccx-body); font-size: 15px; font-weight: 500; line-height: 1; cursor: pointer;
}
.ccx .ccx-seg button[aria-pressed="true"] { background: #FFFFFF; color: var(--ccx-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(10, 19, 36, 0.12); }
.ccx .ccx-seg button:focus-visible { outline: 2px solid var(--ccx-volt); outline-offset: 1px; }

/* Buttons */
.ccx .ccx-btn,
.ccx .ccx-btn:hover,
.ccx .ccx-btn:focus {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin: 0; padding: 0 18px;
	border: 1px solid #D5DCE6; border-radius: 12px; background: #FFFFFF; color: var(--ccx-ink);
	font-family: var(--ccx-body); font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; box-shadow: none;
}
.ccx .ccx-btn:hover { border-color: var(--ccx-volt); color: var(--ccx-volt); }
.ccx .ccx-btn:focus-visible { outline: 2px solid var(--ccx-volt); outline-offset: 2px; }

/* Results */
.ccx .ccx-hero { border-radius: 22px; padding: 26px; background: var(--ccx-volt); color: #FFFFFF; }
.ccx .ccx-hero .ccx-k { margin: 0; font-family: var(--ccx-mono); font-size: 12px; letter-spacing: 0.1em; color: #DCE5FF; }
.ccx .ccx-hero .ccx-cap { margin: 14px 0 2px; font-size: 14px; color: #DCE5FF; }
.ccx .ccx-hero .ccx-big { margin: 0; font-family: var(--ccx-mono); font-weight: 600; font-size: 44px; line-height: 1.1; letter-spacing: -0.03em; color: #FFFFFF; overflow-wrap: anywhere; }
.ccx .ccx-hero .ccx-note { margin: 6px 0 0; font-size: 14px; color: #DCE5FF; }
.ccx .ccx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.ccx .ccx-tile { border-radius: 14px; padding: 14px 16px; }
.ccx .ccx-tile p { margin: 0; }
.ccx .ccx-tile .ccx-tl { font-size: 13px; }
.ccx .ccx-tile .ccx-tv { margin-top: 4px; font-family: var(--ccx-mono); font-weight: 600; font-size: 20px; }
.ccx .ccx-tile.ccx-lime { background: var(--ccx-signal); color: var(--ccx-ink); }
.ccx .ccx-tile.ccx-lime .ccx-tl { color: #2B3A00; }
.ccx .ccx-tile.ccx-glass { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
.ccx .ccx-tile.ccx-glass .ccx-tl { color: #DCE5FF; }
.ccx .ccx-callout { border-radius: 22px; padding: 22px 24px; background: var(--ccx-signal); color: var(--ccx-ink); }
.ccx .ccx-callout p { margin: 0; }
.ccx .ccx-callout .ccx-tl { font-size: 14px; color: #2B3A00; }
.ccx .ccx-callout .ccx-tv { margin-top: 6px; font-family: var(--ccx-mono); font-weight: 600; font-size: 40px; letter-spacing: -0.03em; }

.ccx .ccx-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; border-top: 1px solid var(--ccx-line-soft); }
.ccx .ccx-line:first-child { border-top: 0; padding-top: 0; }
.ccx .ccx-line > span:first-child { color: var(--ccx-slate); }
.ccx .ccx-line .ccx-num { text-align: right; }

.ccx .ccx-chart { display: flex; gap: 2px; margin-top: 16px; }
.ccx .ccx-bar { flex: 1; display: flex; flex-direction: column; }
.ccx .ccx-bar-top { display: flex; align-items: flex-end; }
.ccx .ccx-bar-bot { display: flex; align-items: flex-start; border-top: 1px solid var(--ccx-field); }
.ccx .ccx-bar-top i, .ccx .ccx-bar-bot i { display: block; width: 100%; }
.ccx .ccx-bar-top i { border-radius: 2px 2px 0 0; background: var(--ccx-volt); }
.ccx .ccx-bar-top i.ccx-pay { background: var(--ccx-signal); box-shadow: inset 0 0 0 1px var(--ccx-ink); }
.ccx .ccx-bar-bot i { border-radius: 0 0 2px 2px; background: var(--ccx-peach); }
.ccx .ccx-axis { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--ccx-mono); font-size: 11px; color: var(--ccx-muted); }
.ccx .ccx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--ccx-slate); }
.ccx .ccx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ccx .ccx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

.ccx .ccx-part { display: flex; flex-direction: column; gap: 6px; }
.ccx .ccx-part-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ccx-slate); }
.ccx .ccx-part-top .ccx-num { font-size: 13px; color: var(--ccx-ink); }
.ccx .ccx-track { height: 8px; border-radius: 999px; background: var(--ccx-line-soft); overflow: hidden; }
.ccx .ccx-track i { display: block; height: 8px; border-radius: 999px; background: var(--ccx-volt); }

.ccx .ccx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ccx .ccx-table th, .ccx .ccx-table td { padding: 10px 0; border: 0; border-bottom: 1px solid var(--ccx-line-soft); background: transparent; text-align: right; }
.ccx .ccx-table th { padding-top: 8px; font-size: 12px; font-weight: 500; color: var(--ccx-muted); }
.ccx .ccx-table th:first-child, .ccx .ccx-table td:first-child { text-align: left; width: 48px; }
.ccx .ccx-table td { font-family: var(--ccx-mono); font-weight: 500; color: var(--ccx-ink); }
.ccx .ccx-table td.ccx-neg { color: var(--ccx-copper); }

.ccx .ccx-strip { position: relative; height: 28px; border-radius: 8px; background: var(--ccx-line-soft); overflow: hidden; }
.ccx .ccx-strip i { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--ccx-copper); }
.ccx .ccx-stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 20px; background: rgba(255, 255, 255, 0.2); }
.ccx .ccx-stack i { display: block; height: 10px; }

.ccx .ccx-howto { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.55; color: var(--ccx-slate); }
.ccx .ccx-howto b { color: var(--ccx-ink); }
.ccx .ccx-sumline { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 8px; padding: 16px 18px; border-radius: 14px; background: var(--ccx-volt-tint); }
.ccx .ccx-pos { color: var(--ccx-volt); }

/* Phones and tablets: a slim results bar pinned to the bottom of the screen */
.ccx .ccx-peek { display: none; }
@media (max-width: 1000px) {
	.ccx .ccx-aside { position: static; }
	.ccx .ccx-peek.ccx-on { display: flex; }
	.ccx .ccx-peek {
		position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
		align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
		border-radius: 16px; background: var(--ccx-ink); color: #FFFFFF; box-shadow: 0 12px 32px -12px rgba(10, 19, 36, 0.5);
	}
	.ccx .ccx-peek p { margin: 0; font-size: 12px; color: #C9D2DE; }
	.ccx .ccx-peek .ccx-num { font-size: 20px; color: #FFFFFF; }
	.ccx .ccx-peek a, .ccx .ccx-peek a:hover, .ccx .ccx-peek a:focus {
		display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px;
		background: var(--ccx-signal); color: var(--ccx-ink); font-weight: 600; font-size: 14px; text-decoration: none;
	}
	.ccx .ccx-card { padding: 22px 18px; }
	.ccx .ccx-hero .ccx-big { font-size: 38px; }
}
@media print {
	.ccx .ccx-peek, .ccx .ccx-btn { display: none; }
	.ccx .ccx-aside { position: static; }
}
