:root {
  --video-primary: #8b5cf6;
  --video-primary-hover: #7c3aed;
  --video-bg-card: #ffffff;
  --video-border: #e2e8f0;
  --video-text-main: #0f172a;
  --video-text-muted: #64748b;
  --video-pill-bg: #f1f5f9;
  --video-pill-hover: #e2e8f0;
  --video-result-bg: #f8fafc;
  --video-accent-subtle: #f5f3ff;
  --video-table-stripe: #f8fafc;
}

.video-calc-container {
  max-width: 860px;
  margin: 0 auto 3rem auto;
  font-family: inherit;
  color: var(--video-text-main);
}

.video-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 700px) {
  .video-input-grid {
    grid-template-columns: 1fr;
  }
}

.video-card {
  background: var(--video-bg-card);
  border: 1px solid var(--video-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.video-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--video-text-main);
}

.video-time-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.video-dim-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.video-field {
  margin-bottom: 1rem;
}

.video-field:last-child {
  margin-bottom: 0;
}

.video-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--video-text-main);
}

.video-field input,
.video-field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--video-border);
  border-radius: 8px;
  background: var(--video-bg-card);
  color: var(--video-text-main);
  font-size: 0.95rem;
  box-sizing: border-box;
}

.video-field input:focus,
.video-field select:focus {
  outline: none;
  border-color: var(--video-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.video-quick-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.video-presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--video-text-muted);
}

.video-pill-btn {
  background: var(--video-pill-bg);
  border: 1px solid var(--video-border);
  color: var(--video-text-main);
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.video-pill-btn:hover {
  background: var(--video-pill-hover);
  border-color: var(--video-primary);
}

.video-action-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.video-primary-btn {
  flex: 1;
  background: var(--video-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.video-primary-btn:hover {
  background: var(--video-primary-hover);
}

.video-primary-btn:active {
  transform: scale(0.99);
}

.video-secondary-btn {
  background: var(--video-pill-bg);
  color: var(--video-text-main);
  border: 1px solid var(--video-border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.video-secondary-btn:hover {
  background: var(--video-pill-hover);
}

.video-results-card {
  background: var(--video-result-bg);
  border: 1px solid var(--video-border);
  border-radius: 12px;
  padding: 1.75rem;
}

.video-primary-result {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--video-border);
}

.video-result-caption {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--video-text-muted);
  margin-bottom: 0.5rem;
}

.video-size-display {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--video-primary);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.video-result-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--video-text-muted);
}

.video-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--video-border);
}

@media (max-width: 640px) {
  .video-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.video-metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.video-metric-label {
  font-size: 0.75rem;
  color: var(--video-text-muted);
}

.video-metric-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--video-text-main);
}

.video-comparisons-section,
.video-table-section {
  padding: 1.5rem 0;
}

.video-comparisons-section {
  border-bottom: 1px solid var(--video-border);
}

.video-comparisons-title,
.video-table-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--video-text-main);
}

.video-capacity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .video-capacity-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.video-capacity-card {
  background: var(--video-bg-card);
  border: 1px solid var(--video-border);
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
}

.video-media-name {
  display: block;
  font-size: 0.75rem;
  color: var(--video-text-muted);
  margin-bottom: 0.25rem;
}

.video-media-capacity {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--video-text-main);
}

.video-table-wrapper {
  overflow-x: auto;
}

.video-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.video-comparison-table th,
.video-comparison-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--video-border);
}

.video-comparison-table th {
  background: var(--video-pill-bg);
  font-weight: 600;
  color: var(--video-text-main);
}

.video-comparison-table tr:nth-child(even) td {
  background: var(--video-table-stripe);
}

.video-table-active-row td {
  font-weight: 700;
  color: var(--video-primary);
  background: var(--video-accent-subtle) !important;
}

.video-ad {
  overflow: hidden;
  min-height: 280px;
  margin: 32px 0;
  text-align: center;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --video-primary: #9c81da;
  --video-primary-hover: #a281da;
  --video-bg-card: var(--tf-surface);
  --video-border: var(--tf-surface);
  --video-text-main: var(--tf-ink);
  --video-text-muted: var(--tf-ink-faint);
  --video-pill-bg: var(--tf-surface);
  --video-pill-hover: var(--tf-surface);
  --video-result-bg: var(--tf-surface);
  --video-accent-subtle: var(--tf-surface);
  --video-table-stripe: var(--tf-surface);
}
