:root {
  --tools-bg: #0b1826;
  --tools-bg-deep: #07111c;
  --tools-panel: #102438;
  --tools-panel-strong: #163049;
  --tools-panel-soft: #1a3851;
  --tools-text: #d7e5ef;
  --tools-muted: #afc0ce;
  --tools-dim: #91a5b6;
  --tools-accent: #39d6ff;
  --tools-accent-strong: #00a9dc;
  --tools-lime: #a8f04b;
  --tools-amber: #ffbd59;
  --tools-danger: #ff6b7d;
  --tools-line: rgba(151, 196, 224, 0.18);
  --tools-line-strong: rgba(57, 214, 255, 0.42);
  --tools-shadow: 0 34px 90px rgba(0, 5, 14, 0.46);
  --tools-sans: Inter, Manrope, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tools-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --tools-max: 1440px;
  --tools-pad: 28px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: 104px;
  scrollbar-color: var(--tools-accent-strong) var(--tools-bg-deep);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--tools-text);
  background:
    radial-gradient(circle at 15% 2%, rgba(57, 214, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 92% 34%, rgba(168, 240, 75, 0.07), transparent 30rem),
    linear-gradient(rgba(108, 166, 203, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 166, 203, 0.025) 1px, transparent 1px),
    var(--tools-bg);
  background-size: auto, auto, 72px 72px, 72px 72px, auto;
  font-family: var(--tools-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(115deg, transparent 0 48%, rgba(57, 214, 255, 0.025) 48% 48.15%, transparent 48.15% 100%);
  pointer-events: none;
}

main {
  min-width: 0;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select,
input[type="radio"] {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
fieldset {
  margin-top: 0;
}

button,
fieldset {
  border: 0;
}

::selection {
  color: #001018;
  background: var(--tools-accent);
}

:focus-visible {
  outline: 3px solid var(--tools-accent);
  outline-offset: 4px;
}

section[id] {
  scroll-margin-top: 104px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 12px;
  min-height: 44px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  color: #001018;
  background: var(--tools-accent);
  font-weight: 850;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.tools-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: 78px;
  padding: 10px max(var(--tools-pad), calc((100vw - var(--tools-max)) / 2));
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  align-items: center;
  gap: clamp(18px, 3vw, 48px);
  background: rgba(3, 9, 19, 0.88);
  border-bottom: 1px solid var(--tools-line);
  box-shadow: 0 12px 38px rgba(0, 5, 14, 0.22);
  backdrop-filter: blur(20px) saturate(135%);
}

.tools-brand {
  width: fit-content;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.tools-brand > span {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #00131d;
  background: var(--tools-accent);
  border: 1px solid #a8efff;
  border-radius: 3px;
  box-shadow: 0 0 0 5px rgba(57, 214, 255, 0.08), 0 0 34px rgba(57, 214, 255, 0.2);
  font-family: var(--tools-mono);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.tools-brand strong {
  min-width: 0;
  display: grid;
  color: var(--tools-text);
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tools-brand small {
  margin-top: 6px;
  color: var(--tools-dim);
  font-family: var(--tools-mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tools-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.3vw, 34px);
  color: var(--tools-muted);
  font-size: 14px;
  font-weight: 720;
}

.tools-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease;
}

.tools-nav a:hover,
.tools-nav a:focus-visible {
  color: var(--tools-text);
  border-bottom-color: var(--tools-accent);
}

.tools-languages {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  background: rgba(10, 25, 40, 0.92);
  border: 1px solid var(--tools-line);
  border-radius: 3px;
}

.tools-languages a {
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  color: var(--tools-dim);
  border-radius: 2px;
  font-family: var(--tools-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: color 160ms ease, background 160ms ease;
}

.tools-languages a:hover,
.tools-languages a:focus-visible {
  color: var(--tools-text);
  background: rgba(57, 214, 255, 0.08);
}

.tools-languages a[aria-current="page"] {
  color: #00131d;
  background: var(--tools-accent);
}

.tools-hero,
.principles-section,
.calculator-section,
.sources-section,
.tools-footer {
  width: min(var(--tools-max), calc(100% - (var(--tools-pad) * 2)));
  margin-right: auto;
  margin-left: auto;
}

.tools-hero {
  position: relative;
  min-height: min(810px, calc(100svh - 78px));
  padding: clamp(92px, 10vw, 154px) 0 clamp(88px, 10vw, 146px);
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: clamp(54px, 8vw, 130px);
  border-bottom: 1px solid var(--tools-line);
}

.tools-hero::before,
.tools-hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.tools-hero::before {
  top: 42px;
  right: 4%;
  width: min(34vw, 470px);
  aspect-ratio: 1;
  border: 1px solid rgba(57, 214, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(57, 214, 255, 0.018), 0 0 0 108px rgba(57, 214, 255, 0.012);
}

.tools-hero::after {
  right: 0;
  bottom: 0;
  width: 92px;
  height: 6px;
  background: linear-gradient(90deg, var(--tools-accent) 0 62%, var(--tools-lime) 62% 100%);
}

.tools-hero-copy,
.hero-diagnostic {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.tools-kicker {
  margin-bottom: 20px;
  color: var(--tools-accent);
  font-family: var(--tools-mono);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.tools-hero h1 {
  max-width: 940px;
  margin-bottom: 30px;
  font-size: clamp(3.6rem, 7.1vw, 7.4rem);
  line-height: 0.91;
  letter-spacing: -0.068em;
}

.tools-hero h1 em {
  display: block;
  margin-top: 12px;
  color: var(--tools-accent);
  font-style: normal;
  font-weight: 520;
}

.tools-hero-copy > p:not(.tools-kicker) {
  max-width: 770px;
  margin-bottom: 0;
  color: var(--tools-muted);
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  line-height: 1.72;
}

.tools-hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tool-button {
  min-height: 50px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tools-line-strong);
  border-radius: 3px;
  font-size: 16px;
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.tool-button:hover {
  transform: translateY(-2px);
}

.tool-button.primary {
  color: #00151f;
  background: var(--tools-accent);
  border-color: var(--tools-accent);
  box-shadow: 0 15px 36px rgba(0, 169, 220, 0.16);
}

.tool-button.primary:hover,
.tool-button.primary:focus-visible {
  background: #87eaff;
  border-color: #87eaff;
  box-shadow: 0 18px 44px rgba(57, 214, 255, 0.22);
}

.tool-button.secondary {
  color: var(--tools-text);
  background: rgba(8, 24, 39, 0.72);
}

.tool-button.secondary:hover,
.tool-button.secondary:focus-visible {
  color: var(--tools-accent);
  background: rgba(57, 214, 255, 0.07);
  border-color: var(--tools-accent);
}

.hero-diagnostic {
  padding: 8px;
  background: rgba(5, 15, 27, 0.72);
  border: 1px solid var(--tools-line);
  box-shadow: var(--tools-shadow);
  backdrop-filter: blur(14px);
}

.hero-diagnostic::before {
  display: block;
  padding: 12px 14px;
  content: "DIAGNOSTIC / READY";
  color: var(--tools-lime);
  border-bottom: 1px solid var(--tools-line);
  font-family: var(--tools-mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.hero-diagnostic > div {
  min-height: 102px;
  padding: 18px 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--tools-line);
}

.hero-diagnostic > div:last-child {
  border-bottom: 0;
}

.hero-diagnostic > div > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--tools-accent);
  background: rgba(57, 214, 255, 0.07);
  border: 1px solid rgba(57, 214, 255, 0.24);
  font-family: var(--tools-mono);
  font-size: 12px;
  font-weight: 760;
}

.hero-diagnostic p {
  margin-bottom: 0;
  display: grid;
  gap: 5px;
}

.hero-diagnostic b {
  font-size: 17px;
}

.hero-diagnostic small {
  color: var(--tools-muted);
  font-size: 14px;
}

.principles-section,
.calculator-section,
.sources-section {
  padding: clamp(88px, 10vw, 142px) 0;
}

.section-heading {
  max-width: 980px;
  margin-bottom: clamp(42px, 6vw, 72px);
}

.section-heading h2,
.sources-section h2 {
  margin-bottom: 22px;
  font-size: clamp(2.6rem, 5.3vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.section-heading > p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--tools-muted);
  font-size: 18px;
  line-height: 1.7;
}

.principles-section {
  position: relative;
}

.principles-section::before {
  position: absolute;
  z-index: -1;
  top: 44px;
  right: -18vw;
  left: -18vw;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--tools-line), transparent);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.principle-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 35, 54, 0.92), rgba(7, 19, 32, 0.96));
  border: 1px solid var(--tools-line);
  border-radius: 4px;
  box-shadow: 0 18px 46px rgba(0, 5, 14, 0.18);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.principle-card::before {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 32%;
  height: 3px;
  content: "";
  background: var(--tools-accent);
}

.principle-card:hover {
  border-color: rgba(57, 214, 255, 0.38);
  box-shadow: 0 24px 58px rgba(0, 5, 14, 0.3);
  transform: translateY(-3px);
}

.principle-card > svg {
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(rgba(57, 214, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 214, 255, 0.035) 1px, transparent 1px),
    #06111e;
  background-size: 24px 24px, 24px 24px, auto;
  border-bottom: 1px solid var(--tools-line);
}

.principle-card > div {
  padding: 25px 26px 29px;
}

.principle-card > div > span {
  display: block;
  margin-bottom: 22px;
  color: var(--tools-accent);
  font-family: var(--tools-mono);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.12em;
}

.principle-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.22rem, 1.8vw, 1.55rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.principle-card p {
  margin-bottom: 0;
  color: var(--tools-muted);
  font-size: 15px;
  line-height: 1.65;
}

.principle-card svg text {
  fill: #7990a5;
  font-family: var(--tools-mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.diagram-fill {
  fill: rgba(57, 214, 255, 0.12);
  stroke: rgba(57, 214, 255, 0.36);
  stroke-width: 1.5;
}

.diagram-fill.accent {
  fill: rgba(168, 240, 75, 0.1);
  stroke: rgba(168, 240, 75, 0.44);
}

.diagram-line {
  fill: none;
  stroke: #91a9ba;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diagram-line .dash,
.diagram-line.dash {
  stroke-dasharray: 8 8;
}

.diagram-warning {
  fill: rgba(255, 107, 125, 0.16);
  stroke: var(--tools-danger);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diagram-ok {
  fill: none;
  stroke: var(--tools-lime);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diagram-sun {
  fill: rgba(255, 189, 89, 0.2);
  stroke: var(--tools-amber);
  stroke-width: 3;
}

.diagram-ray {
  fill: none;
  stroke: var(--tools-danger);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.diagram-overlap {
  fill: rgba(57, 214, 255, 0.19);
  stroke: var(--tools-accent);
  stroke-width: 2;
}

.diagram-screen {
  fill: rgba(16, 34, 54, 0.94);
  stroke: rgba(57, 214, 255, 0.5);
  stroke-width: 2;
}

.diagram-moon {
  fill: rgba(190, 211, 230, 0.76);
}

.diagram-signal {
  fill: none;
  stroke: var(--tools-lime);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.principles-note {
  margin: 22px 0 0;
  padding: 18px 20px 18px 54px;
  position: relative;
  color: var(--tools-muted);
  background: rgba(8, 22, 36, 0.64);
  border: 1px solid var(--tools-line);
  font-size: 14px;
}

.principles-note::before {
  position: absolute;
  top: 17px;
  left: 20px;
  width: 22px;
  height: 22px;
  display: grid;
  content: "i";
  place-items: center;
  color: #00131d;
  background: var(--tools-accent);
  border-radius: 50%;
  font-family: var(--tools-mono);
  font-size: 12px;
  font-weight: 900;
}

.calculator-section {
  border-top: 1px solid var(--tools-line);
}

.storage-section {
  --section-accent: var(--tools-accent);
}

.wifi-section {
  --section-accent: var(--tools-lime);
}

.calculator-section .tools-kicker {
  color: var(--section-accent, var(--tools-accent));
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  align-items: start;
  gap: 18px;
}

.calculator-controls,
.calculator-result {
  min-width: 0;
  border: 1px solid var(--tools-line);
  border-radius: 4px;
  box-shadow: var(--tools-shadow);
}

.calculator-controls {
  padding: clamp(24px, 3.5vw, 48px);
  background: rgba(8, 22, 36, 0.92);
}

.mode-switch {
  margin: 0 0 30px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mode-switch legend {
  width: 100%;
  margin-bottom: 12px;
  color: var(--tools-muted);
  font-family: var(--tools-mono);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-switch label {
  min-width: 0;
  min-height: 76px;
  padding: 14px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  background: rgba(16, 38, 59, 0.72);
  border: 1px solid var(--tools-line);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.mode-switch label:hover,
.mode-switch label:focus-within {
  background: rgba(57, 214, 255, 0.06);
  border-color: var(--tools-line-strong);
}

.mode-switch label:has(input:checked) {
  background: rgba(57, 214, 255, 0.09);
  border-color: var(--tools-accent);
}

.mode-switch input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--tools-accent);
}

.mode-switch label > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mode-switch b {
  font-size: 15px;
  line-height: 1.3;
}

.mode-switch small {
  color: var(--tools-muted);
  font-size: 13px;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}

.common-storage-fields {
  margin-bottom: 24px;
}

.control-grid > label,
.wide-control {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.wide-control {
  margin-bottom: 24px;
}

.control-grid label > span,
.wide-control > span {
  color: #c8d9e7;
  font-size: 14px;
  font-weight: 740;
  line-height: 1.4;
}

.control-grid label > small,
.wide-control > small {
  color: var(--tools-dim);
  font-size: 13px;
  line-height: 1.5;
}

.calculator-controls input:not([type="radio"]),
.calculator-controls select {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 11px 13px;
  color: var(--tools-text);
  background: #061321;
  border: 1px solid rgba(151, 196, 224, 0.26);
  border-radius: 3px;
  font-size: 16px;
  line-height: 1.35;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.calculator-controls input:not([type="radio"]):hover,
.calculator-controls select:hover {
  border-color: rgba(57, 214, 255, 0.52);
}

.calculator-controls input:not([type="radio"]):focus,
.calculator-controls select:focus {
  background: #091a2a;
  border-color: var(--tools-accent);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(57, 214, 255, 0.12);
}

.calculator-controls [aria-invalid="true"] {
  border-color: var(--tools-danger) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 125, 0.12);
}

.calculator-controls input:disabled,
.calculator-controls select:disabled {
  color: var(--tools-dim);
  cursor: not-allowed;
  opacity: 0.62;
}

.mode-fields {
  padding-top: 2px;
}

.mode-fields + .mode-fields {
  margin-top: 4px;
}

.assumption-note {
  margin: 18px 0 24px;
  padding: 14px 16px;
  color: #b9cad8;
  background: rgba(255, 189, 89, 0.055);
  border-left: 3px solid var(--tools-amber);
  font-size: 13px;
  line-height: 1.58;
}

.advanced-controls {
  margin-top: 26px;
  background: rgba(4, 14, 25, 0.7);
  border: 1px solid var(--tools-line);
  border-radius: 3px;
}

.advanced-controls summary {
  min-height: 52px;
  padding: 13px 48px 13px 16px;
  position: relative;
  display: flex;
  align-items: center;
  color: #ceddea;
  font-size: 15px;
  font-weight: 780;
  list-style: none;
  cursor: pointer;
}

.advanced-controls summary::-webkit-details-marker {
  display: none;
}

.advanced-controls summary::after {
  position: absolute;
  top: 50%;
  right: 17px;
  color: var(--tools-accent);
  content: "+";
  font-family: var(--tools-mono);
  font-size: 22px;
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.advanced-controls[open] summary {
  border-bottom: 1px solid var(--tools-line);
}

.advanced-controls[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.advanced-controls .control-grid {
  padding: 18px;
}

.control-actions {
  margin-top: 30px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--tools-line);
}

.control-actions p {
  max-width: 380px;
  margin-bottom: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--tools-muted);
  font-size: 13px;
  line-height: 1.5;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex: 0 0 auto;
  background: var(--tools-lime);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(168, 240, 75, 0.58);
}

.calculator-result {
  position: sticky;
  top: 100px;
  padding: clamp(25px, 3.6vw, 48px);
  overflow: hidden;
  background:
    linear-gradient(rgba(57, 214, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 214, 255, 0.035) 1px, transparent 1px),
    linear-gradient(150deg, #10253a 0%, #071522 72%);
  background-size: 30px 30px, 30px 30px, auto;
  border-color: rgba(57, 214, 255, 0.28);
}

.storage-result {
  border-color: rgba(57, 214, 255, 0.34);
}

.wifi-result {
  border-color: rgba(168, 240, 75, 0.32);
  background:
    linear-gradient(rgba(168, 240, 75, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 240, 75, 0.028) 1px, transparent 1px),
    linear-gradient(150deg, #132738 0%, #071522 72%);
  background-size: 30px 30px, 30px 30px, auto;
}

.wifi-result .result-label > span,
.wifi-result .hero-result > strong small,
.wifi-result .formula-box > span {
  color: var(--tools-lime);
}

.wifi-result .formula-box {
  border-left-color: var(--tools-lime);
}

.calculator-result::before {
  position: absolute;
  top: -90px;
  right: -100px;
  width: 260px;
  height: 260px;
  content: "";
  background: radial-gradient(circle, rgba(57, 214, 255, 0.15), transparent 68%);
  pointer-events: none;
}

.calculator-result > * {
  position: relative;
  z-index: 1;
}

.result-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--tools-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.result-label > span {
  color: var(--tools-accent);
}

.result-label > b {
  color: var(--tools-muted);
  font-weight: 650;
  text-align: right;
}

.hero-result {
  margin-top: 34px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--tools-line);
}

.hero-result > span {
  color: var(--tools-muted);
  font-size: 14px;
}

.hero-result > strong {
  margin: 6px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--tools-text);
  font-family: var(--tools-mono);
  font-size: clamp(3.2rem, 5.6vw, 5.7rem);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.07em;
}

.hero-result > strong small {
  color: var(--tools-accent);
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  letter-spacing: 0;
}

.hero-result > p {
  margin-bottom: 0;
  color: var(--tools-dim);
  font-size: 13px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--tools-line);
}

.result-grid article {
  min-width: 0;
  padding: 22px 16px 22px 0;
  display: grid;
  align-content: start;
  gap: 6px;
  border-bottom: 1px solid var(--tools-line);
}

.result-grid article:nth-child(even) {
  padding-right: 0;
  padding-left: 20px;
  border-left: 1px solid var(--tools-line);
}

.result-grid article:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.result-grid article > span,
.result-grid article > small {
  color: var(--tools-dim);
  font-size: 12px;
  line-height: 1.42;
}

.result-grid article > span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-grid article > strong {
  min-width: 0;
  color: var(--tools-text);
  font-family: var(--tools-mono);
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  overflow-wrap: anywhere;
}

.retention-meter {
  margin-top: 24px;
}

.retention-meter > div {
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.retention-meter > div > span {
  color: var(--tools-muted);
  font-size: 13px;
}

.retention-meter > div > strong {
  color: var(--tools-lime);
  font-family: var(--tools-mono);
  font-size: 14px;
  white-space: nowrap;
}

.meter-track {
  height: 12px;
  display: block;
  overflow: hidden;
  background: rgba(151, 196, 224, 0.11);
  border: 1px solid rgba(151, 196, 224, 0.12);
}

.meter-track i {
  width: var(--bar, 72%);
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--tools-accent-strong), var(--tools-lime));
  box-shadow: 0 0 22px rgba(57, 214, 255, 0.32);
  transition: width 260ms ease;
}

.formula-box {
  margin-top: 24px;
  padding: 17px;
  background: rgba(2, 10, 19, 0.66);
  border: 1px solid var(--tools-line);
  border-left: 3px solid var(--tools-accent);
}

.formula-box > span {
  display: block;
  margin-bottom: 10px;
  color: var(--tools-accent);
  font-family: var(--tools-mono);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.formula-box code {
  display: block;
  color: #dff8ff;
  font-family: var(--tools-mono);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: normal;
}

.formula-box p {
  margin: 11px 0 0;
  color: var(--tools-dim);
  font-size: 12px;
  line-height: 1.56;
}

.result-warning {
  margin: 18px 0 0;
  padding: 14px 15px;
  color: #c9d7e3;
  background: rgba(255, 189, 89, 0.055);
  border: 1px solid rgba(255, 189, 89, 0.2);
  font-size: 12px;
  line-height: 1.58;
}

.throughput-waterfall {
  margin-top: 25px;
  padding: 18px 0;
  display: grid;
  gap: 13px;
  border-bottom: 1px solid var(--tools-line);
}

.throughput-waterfall > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(70px, 1fr) minmax(76px, auto);
  align-items: center;
  gap: 12px;
}

.throughput-waterfall span {
  color: var(--tools-muted);
  font-family: var(--tools-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.throughput-waterfall i {
  height: 10px;
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(151, 196, 224, 0.1);
  border: 1px solid rgba(151, 196, 224, 0.1);
}

.throughput-waterfall i::after {
  width: var(--bar, 64%);
  height: 100%;
  display: block;
  content: "";
  background: var(--tools-accent);
  box-shadow: 0 0 18px rgba(57, 214, 255, 0.3);
  transition: width 260ms ease;
}

.throughput-waterfall > div:nth-child(2) i::after {
  background: #39bff0;
}

.throughput-waterfall > div:nth-child(3) i::after {
  background: #61dba8;
}

.throughput-waterfall > div:nth-child(4) i::after {
  background: var(--tools-lime);
}

.throughput-waterfall b {
  min-width: 0;
  color: var(--tools-text);
  font-family: var(--tools-mono);
  font-size: 12px;
  font-weight: 720;
  text-align: right;
  overflow-wrap: anywhere;
}

.signal-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--tools-line);
}

.signal-readout p {
  min-width: 0;
  margin: 0;
  padding: 20px 13px;
  display: grid;
  align-content: start;
  gap: 5px;
}

.signal-readout p + p {
  border-left: 1px solid var(--tools-line);
}

.signal-readout span,
.signal-readout small {
  color: var(--tools-dim);
  font-size: 11px;
  line-height: 1.42;
}

.signal-readout span {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.signal-readout strong {
  min-width: 0;
  color: var(--tools-text);
  font-family: var(--tools-mono);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sources-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: clamp(42px, 8vw, 120px);
  border-top: 1px solid var(--tools-line);
}

.sources-section h2 {
  max-width: 560px;
  margin-bottom: 0;
}

.source-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--tools-line);
  border: 1px solid var(--tools-line);
}

.source-columns > div {
  min-width: 0;
  padding: 25px;
  display: grid;
  align-content: start;
  gap: 12px;
  background: #091725;
}

.source-columns h3 {
  margin-bottom: 8px;
  color: var(--tools-text);
  font-size: 18px;
}

.source-columns a {
  min-height: 44px;
  padding: 9px 0;
  display: flex;
  align-items: center;
  color: var(--tools-muted);
  border-bottom: 1px solid rgba(151, 196, 224, 0.12);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: color 150ms ease, border-color 150ms ease;
}

.source-columns a::after {
  margin-left: auto;
  padding-left: 8px;
  color: var(--tools-accent);
  content: "↗";
  font-family: var(--tools-mono);
}

.source-columns a:hover,
.source-columns a:focus-visible {
  color: var(--tools-text);
  border-color: var(--tools-accent);
}

.source-columns p {
  margin: 6px 0 0;
  color: var(--tools-dim);
  font-size: 13px;
  line-height: 1.62;
}

.tools-footer {
  min-height: 124px;
  padding: 30px 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
  color: var(--tools-dim);
  border-top: 1px solid var(--tools-line);
  font-size: 13px;
}

.tools-footer a {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--tools-accent);
  font-weight: 760;
}

.tools-footer a:hover,
.tools-footer a:focus-visible {
  color: var(--tools-text);
}

.tools-footer p {
  margin-bottom: 0;
  text-align: center;
}

.tools-footer span {
  font-family: var(--tools-mono);
  white-space: nowrap;
}

.noscript-note {
  width: min(var(--tools-max), calc(100% - (var(--tools-pad) * 2)));
  margin: 0 auto 30px;
  padding: 16px 18px;
  color: #181000;
  background: var(--tools-amber);
  font-weight: 750;
}

@media (max-width: 1180px) {
  .tools-header {
    gap: 20px;
  }

  .tools-nav {
    gap: 18px;
    font-size: 13px;
  }

  .tools-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
    gap: 50px;
  }

  .tools-hero h1 {
    font-size: clamp(3.5rem, 7.2vw, 5.8rem);
  }

  .principle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .calculator-result {
    position: relative;
    top: auto;
  }

  .sources-section {
    grid-template-columns: 1fr;
    gap: 42px;
  }
}

@media (max-width: 860px) {
  html,
  section[id] {
    scroll-padding-top: 88px;
    scroll-margin-top: 88px;
  }

  .tools-header {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tools-nav {
    display: none;
  }

  .tools-hero {
    min-height: auto;
    padding: 86px 0 96px;
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .tools-hero::before {
    top: 44%;
    right: -15%;
    width: 430px;
  }

  .tools-hero-copy > p:not(.tools-kicker) {
    max-width: 680px;
  }

  .hero-diagnostic {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-diagnostic::before {
    grid-column: 1 / -1;
  }

  .hero-diagnostic > div {
    min-height: 144px;
    grid-template-columns: 1fr;
    align-content: center;
    border-right: 1px solid var(--tools-line);
    border-bottom: 0;
  }

  .hero-diagnostic > div:last-child {
    border-right: 0;
  }

  .section-heading > p:last-child {
    font-size: 17px;
  }

  .source-columns {
    grid-template-columns: 1fr;
  }

  .tools-footer {
    grid-template-columns: 1fr auto;
  }

  .tools-footer p {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
}

@media (max-width: 560px) {
  :root {
    --tools-pad: 14px;
  }

  html {
    scroll-padding-top: 82px;
  }

  body {
    background-size: auto, auto, 48px 48px, 48px 48px, auto;
  }

  section[id] {
    scroll-margin-top: 82px;
  }

  .tools-header {
    min-height: 68px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 10px;
  }

  .tools-brand {
    gap: 9px;
  }

  .tools-brand > span {
    width: 38px;
    height: 38px;
  }

  .tools-brand strong {
    font-size: 14px;
  }

  .tools-brand small {
    font-size: 8px;
  }

  .tools-languages a {
    min-width: 37px;
    min-height: 44px;
    padding: 0 5px;
    font-size: 10px;
  }

  .tools-hero {
    padding: 72px 0 78px;
    gap: 42px;
  }

  .tools-kicker {
    margin-bottom: 15px;
    font-size: 10px;
  }

  .tools-hero h1 {
    margin-bottom: 24px;
    font-size: clamp(2.75rem, 12vw, 4.1rem);
    line-height: 0.95;
  }

  .tools-hero h1 em {
    margin-top: 8px;
  }

  .tools-hero-copy > p:not(.tools-kicker) {
    font-size: 16px;
    line-height: 1.65;
  }

  .tools-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tools-hero-actions .tool-button {
    width: 100%;
  }

  .hero-diagnostic {
    grid-template-columns: 1fr;
  }

  .hero-diagnostic > div {
    min-height: 96px;
    grid-template-columns: 42px minmax(0, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--tools-line);
  }

  .hero-diagnostic > div:last-child {
    border-bottom: 0;
  }

  .principles-section,
  .calculator-section,
  .sources-section {
    padding: 74px 0;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .section-heading h2,
  .sources-section h2 {
    margin-bottom: 18px;
    font-size: clamp(2.25rem, 11vw, 3.25rem);
    line-height: 1;
  }

  .section-heading > p:last-child {
    font-size: 16px;
    line-height: 1.62;
  }

  .principle-grid {
    grid-template-columns: 1fr;
  }

  .principle-card > div {
    padding: 22px;
  }

  .principle-card h3 {
    font-size: 21px;
  }

  .principle-card p {
    font-size: 15px;
  }

  .principles-note {
    padding: 50px 17px 17px;
  }

  .principles-note::before {
    top: 16px;
    left: 17px;
  }

  .calculator-controls,
  .calculator-result {
    padding: 20px 17px;
  }

  .mode-switch,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .mode-switch label {
    min-height: 70px;
  }

  .calculator-controls input:not([type="radio"]),
  .calculator-controls select {
    min-height: 52px;
    font-size: 16px;
  }

  .advanced-controls .control-grid {
    padding: 15px;
  }

  .control-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .control-actions .tool-button {
    width: 100%;
  }

  .result-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .result-label > b {
    text-align: left;
  }

  .hero-result {
    margin-top: 27px;
  }

  .hero-result > strong {
    font-size: clamp(2.85rem, 16vw, 4.4rem);
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-grid article,
  .result-grid article:nth-child(even) {
    padding: 18px 0;
    border-bottom: 1px solid var(--tools-line);
    border-left: 0;
  }

  .result-grid article:last-child {
    border-bottom: 0;
  }

  .retention-meter > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .throughput-waterfall > div {
    grid-template-columns: 72px minmax(40px, 1fr) minmax(66px, auto);
    gap: 8px;
  }

  .throughput-waterfall span,
  .throughput-waterfall b {
    font-size: 10px;
  }

  .signal-readout {
    grid-template-columns: 1fr;
  }

  .signal-readout p + p {
    border-top: 1px solid var(--tools-line);
    border-left: 0;
  }

  .source-columns > div {
    padding: 21px;
  }

  .tools-footer {
    padding: 26px 0;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tools-footer p {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 390px) {
  .tools-header {
    gap: 8px;
  }

  .tools-brand small {
    display: none;
  }

  .tools-brand > span {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .tools-languages a {
    min-width: 34px;
    padding: 0 4px;
    font-size: 9px;
  }

  .tools-hero h1 {
    font-size: clamp(2.55rem, 11.5vw, 3.15rem);
  }

  .hero-diagnostic > div {
    padding: 15px 13px;
  }

  .hero-diagnostic b {
    font-size: 16px;
  }

  .hero-diagnostic small {
    font-size: 13px;
  }

  .principle-card svg text {
    font-size: 9px;
  }

  .calculator-controls,
  .calculator-result {
    padding: 18px 14px;
  }

  .mode-switch label {
    padding: 12px;
    gap: 9px;
  }

  .formula-box {
    padding: 14px;
  }

  .throughput-waterfall > div {
    grid-template-columns: 60px minmax(34px, 1fr) minmax(58px, auto);
    gap: 7px;
  }

  .result-warning,
  .formula-box p {
    font-size: 11px;
  }
}

@media (max-width: 560px) {
  .tools-hero,
  .principles-section {
    overflow-x: hidden;
    overflow-x: clip;
  }
}

@media (max-width: 320px) {
  :root {
    --tools-pad: 12px;
  }

  .tools-header {
    padding-right: 10px;
    padding-left: 10px;
    gap: 6px;
  }

  .tools-brand {
    gap: 7px;
  }

  .tools-brand > span {
    width: 34px;
    height: 34px;
  }

  .tools-brand strong {
    font-size: 13px;
  }

  .tools-languages a {
    min-width: 32px;
    padding: 0 3px;
  }

  .tools-hero {
    padding-top: 62px;
  }

  .tools-hero h1 {
    font-size: 2.35rem;
  }

  .section-heading h2,
  .sources-section h2 {
    font-size: 2.12rem;
  }

  .principle-card > div,
  .source-columns > div {
    padding: 18px;
  }

  .calculator-controls,
  .calculator-result {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-result > strong {
    font-size: 2.65rem;
  }

  .throughput-waterfall > div {
    grid-template-columns: 48px minmax(30px, 1fr) minmax(54px, auto);
    gap: 6px;
  }

  .throughput-waterfall span,
  .throughput-waterfall b {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --tools-line: rgba(221, 241, 255, 0.42);
    --tools-line-strong: rgba(57, 214, 255, 0.78);
    --tools-muted: #c4d5e3;
    --tools-dim: #aebfcd;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  :root {
    color-scheme: light;
  }

  html,
  body {
    color: #111820;
    background: #fff;
    font-size: 11pt;
  }

  body::before,
  .tools-header,
  .tools-hero-actions,
  .control-actions,
  .noscript-note {
    display: none !important;
  }

  .tools-hero,
  .principles-section,
  .calculator-section,
  .sources-section,
  .tools-footer {
    width: 100%;
  }

  .tools-hero {
    min-height: 0;
    padding: 0 0 18mm;
    display: block;
  }

  .tools-hero::before,
  .tools-hero::after,
  .principles-section::before,
  .calculator-result::before {
    display: none;
  }

  .tools-hero h1,
  .tools-hero h1 em,
  .section-heading h2,
  .sources-section h2 {
    color: #08131d;
  }

  .tools-hero h1 {
    font-size: 34pt;
  }

  .tools-kicker,
  .result-label > span,
  .formula-box > span,
  .source-columns a::after {
    color: #006f91;
  }

  .tools-hero-copy > p:not(.tools-kicker),
  .section-heading > p:last-child,
  .principle-card p,
  .principles-note,
  .control-grid label > small,
  .wide-control > small,
  .hero-result > p,
  .result-grid article > span,
  .result-grid article > small,
  .formula-box p,
  .result-warning,
  .source-columns a,
  .source-columns p,
  .tools-footer {
    color: #364958;
  }

  .hero-diagnostic {
    margin-top: 10mm;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-diagnostic::before {
    grid-column: 1 / -1;
  }

  .hero-diagnostic,
  .hero-diagnostic > div,
  .principle-card,
  .calculator-controls,
  .calculator-result,
  .source-columns,
  .source-columns > div,
  .advanced-controls,
  .formula-box,
  .result-warning,
  .principles-note {
    color: #111820;
    background: #fff;
    border-color: #aeb9c2;
    box-shadow: none;
  }

  .principles-section,
  .calculator-section,
  .sources-section {
    padding: 15mm 0;
  }

  .principle-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .principle-card,
  .result-grid article,
  .signal-readout p,
  .source-columns > div {
    break-inside: avoid;
  }

  .principle-card > svg {
    background: #f2f6f8;
  }

  .principle-card svg text {
    fill: #40515f;
  }

  .diagram-line {
    fill: none;
    stroke: #40515f;
  }

  .calculator-layout {
    display: block;
  }

  .calculator-result {
    margin-top: 8mm;
    position: static;
    break-before: page;
  }

  .calculator-controls input:not([type="radio"]),
  .calculator-controls select {
    color: #111820;
    background: #fff;
    border-color: #8c9aa5;
  }

  .hero-result > strong,
  .result-grid article > strong,
  .signal-readout strong,
  .throughput-waterfall b,
  .formula-box code,
  .result-label > b {
    color: #111820;
  }

  .source-columns {
    grid-template-columns: repeat(3, 1fr);
  }

  .tools-footer {
    min-height: 0;
    padding: 8mm 0 0;
  }
}

/* Camera examples pair the site scene with the actual recording outcome. */
.principle-visual { margin: 0; border-bottom: 1px solid var(--tools-line); background: #07111f; }
.scene-labels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 16px 0; font-size: 14px; font-weight: 650; line-height: 1.4; }
.scene-labels span { min-width: 0; padding: 0 7px; overflow-wrap: anywhere; }
.scene-poor { color: var(--tools-amber); }
.scene-better { color: var(--tools-lime); }
.principle-visual > .camera-scene { width: 100%; height: auto; aspect-ratio: 640 / 420; background: #07111f; }
.principle-visual figcaption { padding: 10px 20px 18px; color: #b9cbd9; font-size: 14px; line-height: 1.6; }
.model-source { display: inline-flex; align-items: center; min-height: 44px; width: fit-content; color: var(--tools-accent); text-decoration: underline; text-underline-offset: 4px; }
.wifi-assumptions { margin: 18px 0 0; color: #b9cbd9; font-size: 14px; line-height: 1.6; }
.calculator-controls label { overflow-wrap: anywhere; }
.wifi-advanced-grid { gap: 22px 16px; }

/* Larger, calmer calculator typography on tablet and desktop. */
@media screen and (min-width: 861px) {
  body { font-size: 17px; line-height: 1.65; }
  .principle-card p { font-size: 17px; line-height: 1.65; }
  .principle-visual figcaption { font-size: 15px; }
  .scene-labels { font-size: 15px; }
  .control-grid label > span, .wide-control > span { font-size: 16px; font-weight: 600; line-height: 1.5; }
  .control-grid label > small, .wide-control > small { color: #9db1c3; font-size: 15px; line-height: 1.6; }
  .calculator-controls input:not([type="radio"]), .calculator-controls select { min-height: 56px; font-size: 18px; line-height: 1.5; }
  .mode-switch legend { font-size: 16px; }
  .mode-switch label b { font-size: 16px; font-weight: 600; line-height: 1.5; }
  .mode-switch label small { font-size: 14px; line-height: 1.5; }
  .advanced-controls summary { min-height: 56px; font-size: 17px; line-height: 1.55; }
  .control-actions p, .assumption-note { font-size: 15px; line-height: 1.65; }
  .hero-result > span { font-size: 16px; }
  .hero-result > p { color: #9db1c3; font-size: 15px; line-height: 1.6; }
  .result-label { font-size: 12px; line-height: 1.5; }
  .result-grid article > span, .result-grid article > small { color: #9db1c3; font-size: 14px; line-height: 1.5; }
  .result-grid article > strong { font-size: clamp(1.25rem, 1.7vw, 1.5rem); line-height: 1.35; }
  .retention-meter > div > span { font-size: 15px; }
  .retention-meter > div > strong { font-size: 16px; }
  .formula-box > span { font-size: 12px; }
  .formula-box code { font-size: 15px; line-height: 1.7; }
  .formula-box p, .result-warning, .wifi-assumptions { color: #b5c7d6; font-size: 15px; line-height: 1.65; }
  .throughput-waterfall > div { grid-template-columns: 110px minmax(60px, 1fr) minmax(94px, auto); gap: 12px; }
  .throughput-waterfall span, .throughput-waterfall b { font-size: 13px; line-height: 1.5; }
  .signal-readout span, .signal-readout small { color: #9db1c3; font-size: 13px; line-height: 1.5; }
  .signal-readout strong { font-size: 18px; line-height: 1.4; }
  .source-columns a { font-size: 16px; line-height: 1.5; }
  .source-columns p, .tools-footer { font-size: 15px; line-height: 1.65; }
  .calculator-controls table { font-size: 16px; line-height: 1.55; }
  .calculator-controls th, .calculator-controls td { padding: 12px; }
}
@media (max-width: 560px) {
  .scene-labels { padding: 13px 10px 0; gap: 6px; }
  .scene-labels span { padding: 0 4px; }
  .principle-visual figcaption { padding: 10px 16px 17px; font-size: 14px; }
  .wifi-advanced-grid { gap: 20px; }
}
@media print {
  .principle-visual, .principle-visual > .camera-scene { background: #07111f !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .principle-visual figcaption { color: #40515f; }
  .scene-poor { color: #805516; }
  .scene-better { color: #3f6621; }
}

/* Dedicated tools: short directory and one task per page. */
.tools-child-page .principles-section::before { left: 0; right: 0; }
.tools-hero.tools-hero-compact { display: block; min-height: 0; padding: 42px 0 28px; }
.tools-hero-compact::before, .tools-hero-compact::after { display: none; }
.tools-hero-compact .tools-hero-copy { max-width: 1050px; }
.tools-hero-compact h1 { max-width: 1000px; margin-bottom: 15px; font-size: clamp(2.15rem, 3.6vw, 3.55rem); line-height: 1.08; letter-spacing: -.045em; }
.tools-hero-compact .tools-kicker { margin-bottom: 14px; }
.tools-hero-compact .tools-hero-copy > p:not(.tools-kicker) { max-width: 980px; margin-bottom: 0; font-size: 17px; line-height: 1.62; }
.tools-content-section { padding: 14px 0 64px; }
.tools-sources-compact { padding: 44px 0 58px; gap: 38px; grid-template-columns: minmax(220px, .45fr) minmax(0, 1.55fr); }
.tools-sources-compact h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.12; }
.tools-sources-compact .source-columns { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tools-nav a[aria-current="page"] { color: var(--tools-accent); }
.tool-page-nav { display: none; }
.tools-directory { width: min(var(--tools-max), calc(100% - (var(--tools-pad) * 2))); margin: 0 auto; padding: 6px 0 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tools-directory-card { display: flex; min-width: 0; flex-direction: column; padding: 28px; background: linear-gradient(145deg, #10283a, #071725); border: 1px solid var(--tools-line); border-radius: 5px; transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.tools-directory-card:hover, .tools-directory-card:focus-visible { border-color: var(--tools-accent); box-shadow: 0 20px 44px rgba(0, 5, 14, .3); transform: translateY(-3px); }
.directory-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; color: var(--tools-accent); }
.directory-card-top svg { width: 48px; height: 48px; }
.directory-index { font-family: var(--tools-mono); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.directory-tag { margin-bottom: 14px; color: var(--tools-lime); font-size: 13px; font-weight: 650; }
.tools-directory-card h2 { margin-bottom: 14px; font-size: clamp(1.4rem, 2vw, 1.85rem); line-height: 1.18; letter-spacing: -.025em; }
.tools-directory-card p { flex: 1; margin-bottom: 26px; color: #b4c7d7; font-size: 17px; line-height: 1.6; }
.directory-action { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding-top: 16px; border-top: 1px solid var(--tools-line); color: var(--tools-accent); font-size: 16px; font-weight: 650; }
.directory-action b { font-size: 24px; line-height: 1; }
.noscript-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1180px) {
  .tools-sources-compact { grid-template-columns: 1fr; gap: 26px; }
  .tools-directory { gap: 16px; }
  .tools-directory-card { padding: 23px; }
}
@media (max-width: 860px) {
  .tool-page-nav { display: grid; gap: 7px; width: min(var(--tools-max), calc(100% - (var(--tools-pad) * 2))); margin: 16px auto 0; }
  .tool-parent-links { display: flex; justify-content: space-between; gap: 12px; }
  .tool-parent-links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--tools-muted); font-size: 14px; line-height: 1.4; }
  .tool-sibling-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tool-sibling-links a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 7px; background: #0b1d2c; border: 1px solid var(--tools-line); color: #cbdde9; font-size: 14px; font-weight: 600; text-align: center; line-height: 1.3; }
  .tool-sibling-links a[aria-current="page"] { border-color: var(--tools-accent); color: var(--tools-accent); background: #102b3d; }
  .tools-hero.tools-hero-compact { padding: 26px 0 24px; }
  .tools-hero-compact h1 { font-size: clamp(2rem, 5.4vw, 3.1rem); }
  .tools-directory { grid-template-columns: 1fr; padding-bottom: 48px; }
  .tools-directory-card { padding: 25px; }
  .directory-card-top { margin-bottom: 16px; }
}
@media (max-width: 560px) {
  .tools-hero.tools-hero-compact { padding: 24px 0 20px; }
  .tools-hero-compact h1 { font-size: clamp(1.95rem, 8vw, 2.65rem); line-height: 1.1; }
  .tools-hero-compact .tools-hero-copy > p:not(.tools-kicker) { font-size: 16px; line-height: 1.62; }
  .tools-content-section { padding: 8px 0 44px; }
  .tools-sources-compact { padding: 32px 0 40px; }
  .tools-directory { padding: 2px 0 42px; gap: 16px; }
  .tools-directory-card { padding: 23px; }
  .tools-directory-card h2 { font-size: 24px; }
  .tools-directory-card p { font-size: 16px; }
  .tool-sibling-links a { font-size: 13px; }
}
@media print {
  .tool-page-nav { display: none; }
  .tools-hero.tools-hero-compact { padding: 0 0 8mm; }
  .tools-directory { width: 100%; padding: 0; grid-template-columns: repeat(3, 1fr); }
  .tools-directory-card { color: #111820; background: #fff; border-color: #aeb9c2; break-inside: avoid; }
  .tools-directory-card p { color: #40515f; }
  .tools-content-section { padding: 4mm 0 10mm; }
}

/* Interactive tool directory and related learning links. */
.tools-hub-page .tools-directory{grid-template-columns:repeat(2,minmax(0,1fr))}.tools-related a{color:var(--tools-accent);font-size:16px;text-decoration:underline;text-underline-offset:4px}.tools-related{margin-top:18px!important}
@media(max-width:860px){.tools-hub-page .tools-directory{grid-template-columns:1fr}.tool-sibling-links{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:861px) and (max-width:1100px){.tools-header{grid-template-columns:minmax(150px,1fr) auto auto;gap:16px}.tools-nav{gap:12px}}


/* Softer dark surfaces reduce glare without changing the cyan/lime identity. */
@media screen {
  .tools-header { background: rgba(7, 17, 28, 0.92); }
  .hero-diagnostic { background: rgba(12, 29, 44, 0.84); }
  .principle-card { background: linear-gradient(145deg, rgba(23, 50, 72, 0.94), rgba(12, 29, 44, 0.97)); }
  .principles-note { background: rgba(16, 36, 54, 0.78); }
  .calculator-controls { background: rgba(16, 36, 54, 0.94); }
  .calculator-controls input:not([type="radio"]),
  .calculator-controls select { background: #0e2030; }
  .calculator-controls input:not([type="radio"]):focus,
  .calculator-controls select:focus { background: #12283b; }
  .advanced-controls,
  .formula-box { background: rgba(9, 24, 38, 0.84); }
  .calculator-result {
    background:
      linear-gradient(rgba(57, 214, 255, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(57, 214, 255, 0.035) 1px, transparent 1px),
      linear-gradient(150deg, #173047 0%, #0c2030 72%);
    background-size: 30px 30px, 30px 30px, auto;
  }
  .wifi-result {
    background:
      linear-gradient(rgba(168, 240, 75, 0.028) 1px, transparent 1px),
      linear-gradient(90deg, rgba(168, 240, 75, 0.028) 1px, transparent 1px),
      linear-gradient(150deg, #183344 0%, #0c2030 72%);
    background-size: 30px 30px, 30px 30px, auto;
  }
  .tools-directory-card { background: linear-gradient(145deg, #173449, #0d2333); }
  .source-columns > div { background: #102438; }
  .tools-page .rf-workbench,
  .tools-page .rf-controls { background: #102438; }
  .tools-page .rf-visual { background: radial-gradient(ellipse at 45% 40%, #1d4057, #0d2030 75%); }
  .tools-page .rf-visual canvas,
  .tools-page .rf-metric { background: #0e2030; }
  .tools-child-page .camera-workshop { background: linear-gradient(130deg, #15334a, #0d2030); }
  .tools-child-page .camera-controls,
  .tools-child-page .camera-diagram-panel,
  .tools-child-page .camera-presets label { background: #0e2030; }
}

/* Desktop readability: keep controls spacious and lift only the formerly small copy. */
@media screen and (min-width: 861px) {
  .tools-kicker { font-size: 14px; }
  .principle-card > div > span { font-size: 13px; }
  .principles-note { font-size: 16px; line-height: 1.65; }
  .scene-labels,
  .principle-visual figcaption { font-size: 16px; }
  .control-grid label > small,
  .wide-control > small { font-size: 16px; }
  .mode-switch label small,
  .result-grid article > span,
  .result-grid article > small { font-size: 15px; }
  .control-actions p,
  .assumption-note,
  .hero-result > p,
  .formula-box code,
  .formula-box p,
  .result-warning,
  .wifi-assumptions,
  .source-columns p,
  .tools-footer { font-size: 16px; }
  .result-label,
  .formula-box > span { font-size: 14px; }
  .formula-box code { color: #cde1ed; }
  .throughput-waterfall span,
  .throughput-waterfall b,
  .signal-readout span,
  .signal-readout small { font-size: 15px; }
  .directory-index,
  .directory-tag { font-size: 15px; }

  .tools-child-page .camera-presets label > span,
  .tools-child-page .camera-diagram-legend,
  .tools-child-page .camera-drag-tip,
  .tools-child-page .camera-metrics span,
  .tools-child-page .camera-model-note,
  .tools-child-page .camera-method p { font-size: 16px; }

  .radio-page .rf-legend,
  .radio-page .rf-caption,
  .radio-page .rf-control small,
  .radio-page .rf-details p,
  .radio-page .rf-metric span,
  .radio-page .rf-metric small,
  .radio-page .rf-formula,
  .radio-page .rf-paused-note { font-size: 16px; }
  .radio-page .rf-step { font-size: 15px; }
}

@media screen and (min-width: 1181px) {
  .tools-brand small { font-size: 12px; }
  .tools-nav { font-size: 15px; }
  .tools-languages a { font-size: 12px; }
}
