@font-face {
  font-family: 'PP Telegraf';
  src: url('Fonts%20-%20PP%20Telegraf/PPTelegraf-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'PP Telegraf';
  src: url('Fonts%20-%20PP%20Telegraf/PPTelegraf-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'PP Telegraf';
  src: url('Fonts%20-%20PP%20Telegraf/PPTelegraf-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'PP Telegraf';
  src: url('Fonts%20-%20PP%20Telegraf/PPTelegraf-Ultralight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
}

:root {
  --bg: #eef3fb;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --ink: #10233f;
  --muted: #5f6f89;
  --line: #d8e0ed;
  --brand: #0974bd;
  --brand-deep: #0c4f93;
  --brand-soft: #d9efff;
  --accent: #0d1f3c;
  --success: #2f9e6d;
  --shadow: 0 20px 55px rgba(16, 35, 63, 0.11);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PP Telegraf", "Segoe UI Variable", "Aptos", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(9, 116, 189, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(13, 31, 60, 0.08), transparent 22%),
    linear-gradient(180deg, #f6f9fd 0%, #eaf1fa 100%);
}

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

.page-shell {
  width: min(1220px, calc(100vw - 32px));
  margin: 28px auto 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 34px;
  border-radius: 28px;
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 38%),
    linear-gradient(120deg, #0a4782 0%, #0b6cb4 54%, #1ca1e8 100%);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.82;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.05;
  font-weight: 600;
}

.hero-text {
  max-width: 680px;
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.65;
  opacity: 0.94;
}

.hero-badge {
  align-self: flex-start;
  min-width: 190px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-badge span {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.76;
}

.hero-badge strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}

.panel {
  padding: 28px;
  border: 1px solid rgba(216, 224, 237, 0.85);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head-tight {
  margin-bottom: 18px;
}

.section-head h2,
.notes-panel h3,
.totals-banner h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.section-head p,
.summary-copy,
.group-subtitle,
.notes-list,
.notes-panel p {
  color: var(--muted);
}

.section-head p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.group-stack {
  display: grid;
  gap: 18px;
}

.camera-group {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.group-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.group-title {
  margin: 0;
  font-size: 1.1rem;
}

.group-subtitle {
  margin: 6px 0 0;
  font-size: 0.92rem;
}

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

.field-grid-advanced {
  margin-bottom: 10px;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.field > span,
.slider-label span,
.metric-card span,
.summary-label {
  font-size: 0.92rem;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(9, 116, 189, 0.55);
  box-shadow: 0 0 0 4px rgba(9, 116, 189, 0.12);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field-inline .inline-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-width: 104px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--brand-deep);
  background: #fff;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.chip:hover,
.chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(9, 116, 189, 0.45);
}

.chip.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #2298db 100%);
  box-shadow: 0 12px 26px rgba(9, 116, 189, 0.28);
}

.field-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.field-toggle small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 52px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cad6e7;
  cursor: pointer;
  transition: background 140ms ease;
}

.slider::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(16, 35, 63, 0.24);
  transition: transform 140ms ease;
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, var(--brand) 0%, #21a2e5 100%);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}

.slider-label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.buffer-value {
  color: var(--brand-deep);
}

.range-input {
  padding: 0;
  accent-color: var(--brand);
}

.metric-grid,
.totals-grid,
.recommendations {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.metric-card,
.recommendation-card,
.summary-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.35rem;
}

.totals-banner {
  margin-top: 24px;
  padding: 24px;
  border-radius: 20px;
  color: white;
  background:
    radial-gradient(circle at top right, rgba(28, 161, 232, 0.32), transparent 26%),
    linear-gradient(135deg, #0b1732 0%, #132a4e 48%, #0c203d 100%);
}

.totals-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.totals-grid article {
  padding: 16px 0;
}

.totals-grid span,
.totals-grid small {
  display: block;
  color: rgba(235, 244, 255, 0.74);
}

.totals-grid strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(1.6rem, 2.5vw, 2.05rem);
}

.ghost-button,
.mini-button,
.text-button,
.primary-button {
  border: 1px solid rgba(9, 116, 189, 0.22);
  color: var(--brand-deep);
  cursor: pointer;
}

.ghost-button,
.mini-button,
.primary-button {
  padding: 12px 16px;
  border-radius: 12px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.ghost-button:hover,
.ghost-button:focus-visible,
.mini-button:hover,
.mini-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible,
.text-button:hover,
.text-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(9, 116, 189, 0.5);
  box-shadow: 0 10px 20px rgba(9, 116, 189, 0.14);
}

.ghost-button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.95));
}

.mini-button,
.text-button {
  background: white;
}

.primary-button {
  width: 100%;
  margin-top: 18px;
  padding-block: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: white;
  background: linear-gradient(135deg, var(--brand) 0%, #2298db 100%);
  box-shadow: 0 18px 28px rgba(9, 116, 189, 0.24);
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: transparent;
  box-shadow: 0 22px 30px rgba(9, 116, 189, 0.3);
}

.mini-button {
  white-space: nowrap;
}

.text-button {
  padding: 10px 12px;
  border-radius: 10px;
}

.summary-card {
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(9, 116, 189, 0.08), transparent 42%),
    #ffffff;
}

.summary-label {
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-card strong {
  display: block;
  font-size: 1.35rem;
}

.summary-copy {
  margin: 12px 0 0;
  line-height: 1.6;
}

.recommendation-card {
  position: relative;
  overflow: hidden;
}

.recommendation-top {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.recommendation-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 154px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
}

.recommendation-visual img {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  display: block;
}

.recommendation-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(9, 116, 189, 0.08), transparent 70%);
}

.recommendation-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--brand) 0%, #21a2e5 100%);
  font-weight: 800;
}

.recommendation-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.recommendation-heading-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.recommendation-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.recommendation-type {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(217, 239, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.recommendation-grid article {
  padding: 12px;
  border-radius: 12px;
  background: #f4f8fc;
}

.recommendation-grid span,
.recommendation-meta strong,
.recommendation-list li {
  display: block;
}

.recommendation-grid span {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.recommendation-grid strong {
  margin-top: 6px;
  font-size: 1rem;
}

.recommendation-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.recommendation-empty {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(95, 111, 137, 0.35);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  line-height: 1.6;
}

.notes-panel {
  margin-top: 16px;
  padding: 22px;
}

.notes-list {
  margin: 14px 0 0;
  padding-left: 20px;
  line-height: 1.6;
}

.compare-panel,
.quote-panel {
  margin-top: 24px;
}

.comparison-wrap {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: white;
  border-radius: 16px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.comparison-table thead th {
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 700;
}

.comparison-table thead th:first-child,
.comparison-table tbody th {
  color: var(--muted);
  text-align: left;
  font-size: 0.96rem;
  font-weight: 700;
}

.comparison-table tbody td {
  line-height: 1.55;
  color: var(--ink);
}

.comparison-table tfoot td {
  padding-top: 20px;
  border-bottom: 0;
}

.comparison-product-name {
  display: block;
  color: var(--brand);
}

.comparison-thumb {
  display: block;
  width: 100%;
  max-width: 170px;
  height: 84px;
  margin: 0 auto 12px;
  object-fit: contain;
}

.comparison-product-type {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.support-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.support-pill.yes {
  color: #1f6a4c;
  background: #e7f6ee;
}

.support-pill.no {
  color: #a43b53;
  background: #fdebf0;
}

.support-pill.option {
  color: #7b5a14;
  background: #fff4da;
}

.table-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 160px;
  padding: 12px 16px;
  border-radius: 10px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand) 0%, #2298db 100%);
  box-shadow: 0 12px 20px rgba(9, 116, 189, 0.2);
}

.table-link:hover,
.table-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(9, 116, 189, 0.25);
}

.quote-card {
  padding: 22px;
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 253, 0.98));
}

.quote-summary {
  margin: 0 0 10px;
  text-align: center;
  color: var(--ink);
  line-height: 1.7;
}

.quote-form {
  margin-top: 8px;
}

.quote-footnote {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 50, 0.42);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  margin: 14px auto;
  padding: 26px 26px 22px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 28px 60px rgba(16, 35, 63, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.1;
}

.modal-close {
  border: 0;
  background: transparent;
  color: #6d7c95;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-copy {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.bitrate-result-card {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

.bitrate-result-card h3 {
  margin: 0;
  color: var(--brand);
  font-size: 1.8rem;
}

.breakdown-title {
  margin-top: 18px;
  font-weight: 800;
  color: var(--accent);
}

.breakdown-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.modal-apply {
  width: auto;
  min-width: 170px;
  margin-top: 0;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    margin-top: 14px;
  }

  .hero,
  .panel,
  .camera-group {
    padding: 20px;
  }

  .hero {
    flex-direction: column;
  }

  .section-head,
  .group-header,
  .field-toggle {
    flex-direction: column;
    align-items: stretch;
  }

  .field-grid,
  .metric-grid,
  .totals-grid,
  .recommendation-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-top {
    grid-template-columns: 1fr;
  }

  .chip {
    min-width: calc(50% - 5px);
  }
}
