:root {
  --fav-bg: #f8fafc;
  --fav-surface: #ffffff;
  --fav-card: #ffffff;
  --fav-border: #e2e8f0;
  --fav-border-focus: #4f46e5;
  --fav-indigo: #4f46e5;
  --fav-indigo-hover: #4338ca;
  --fav-teal: #0d9488;
  --fav-emerald: #10b981;
  --fav-emerald-bg: #ecfdf5;
  --fav-text: #0f172a;
  --fav-muted: #64748b;
  --fav-radius: 10px;
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.fav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.fav-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--fav-border);
  background: #ffffff;
}

.fav-breadcrumbs {
  font-size: 0.875rem;
  color: var(--fav-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.fav-breadcrumbs a {
  color: var(--fav-indigo);
  text-decoration: none;
  font-weight: 600;
}

.fav-breadcrumbs a:hover {
  text-decoration: underline;
}

.fav-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--fav-text);
  letter-spacing: -0.025em;
}

.fav-subtitle {
  font-size: 1.0625rem;
  color: var(--fav-muted);
  margin: 0;
}

.fav-main {
  padding: 32px 0 60px;
}

/* Input Card */
.fav-card {
  background: var(--fav-card);
  border: 1px solid var(--fav-border);
  border-radius: var(--fav-radius);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  margin-bottom: 24px;
}

.fav-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fav-text);
  margin-bottom: 10px;
}

.fav-input-row {
  display: flex;
  gap: 10px;
}

.fav-input {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid var(--fav-border);
  color: var(--fav-text);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.fav-input:focus {
  outline: none;
  border-color: var(--fav-border-focus);
}

.fav-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--fav-indigo);
  color: #ffffff;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.fav-btn-primary:hover {
  background: var(--fav-indigo-hover);
}

.fav-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.fav-preset-lbl {
  font-size: 0.75rem;
  color: var(--fav-muted);
  font-weight: 600;
}

.fav-chip {
  background: var(--fav-bg);
  color: var(--fav-muted);
  border: 1px solid var(--fav-border);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fav-chip:hover {
  border-color: var(--fav-indigo);
  color: var(--fav-indigo);
}

/* Results */
.fav-res-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--fav-border);
  margin-bottom: 24px;
}

.fav-res-domain {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--fav-text);
  margin: 0 0 4px;
}

.fav-res-status {
  font-size: 0.875rem;
  color: var(--fav-teal);
  margin: 0;
  font-weight: 600;
}

.fav-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: var(--fav-indigo);
  border: 1.5px solid var(--fav-indigo);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.fav-btn-download:hover {
  background: #f5f3ff;
}

/* Resolution Grid */
.fav-res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.fav-size-box {
  background: var(--fav-bg);
  border: 1px solid var(--fav-border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fav-size-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fav-muted);
  margin-bottom: 12px;
}

.fav-icon-stage {
  width: 100%;
  height: 100px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.fav-icon-stage.stage-128 {
  height: 152px;
}

.fav-icon-stage img {
  image-rendering: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fav-dim-lbl {
  font-size: 0.75rem;
  color: var(--fav-muted);
  font-family: ui-monospace, monospace;
}

/* Code Snippet */
.fav-code-section {
  background: #f1f5f9;
  border: 1px solid var(--fav-border);
  border-radius: 8px;
  padding: 16px;
}

.fav-code-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.fav-code-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fav-text);
  margin: 0;
}

.fav-btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  color: var(--fav-text);
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.fav-btn-copy:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.fav-code-block {
  margin: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.8125rem;
  color: #1e293b;
  overflow-x: auto;
  line-height: 1.5;
}

/* Ad slots */
.fav-ad-container {
  width: 100%;
  margin: 36px 0;
  display: flex;
  justify-content: center;
}

.fav-ad-box {
  width: 100%;
  max-width: 728px;
  min-height: 280px;
  background: #ffffff;
  border: 1px dashed var(--fav-border);
  border-radius: var(--fav-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content */
.fav-content-section {
  margin-top: 48px;
}

.fav-content-section h2 {
  font-size: 1.5rem;
  color: var(--fav-text);
  margin-bottom: 16px;
}

.fav-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.fav-feature-card {
  background: #ffffff;
  border: 1px solid var(--fav-border);
  border-radius: var(--fav-radius);
  padding: 20px;
}

.fav-feature-card h3 {
  font-size: 1.125rem;
  margin: 0 0 8px;
  color: var(--fav-indigo);
}

.fav-feature-card p {
  font-size: 0.875rem;
  color: var(--fav-muted);
  margin: 0;
}

.fav-footer {
  background: #ffffff;
  border-top: 1px solid var(--fav-border);
  padding: 28px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--fav-muted);
}

.fav-footer a {
  color: var(--fav-indigo);
  text-decoration: none;
  font-weight: 600;
}

.fav-consent-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.fav-consent-text {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin: 0;
}

.fav-consent-actions {
  display: flex;
  gap: 8px;
}

.fav-btn-consent-yes {
  background: var(--fav-indigo);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.fav-btn-consent-no {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

/* 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"] {
  --fav-bg: var(--tf-surface);
  --fav-surface: var(--tf-surface);
  --fav-card: var(--tf-surface);
  --fav-border: var(--tf-surface);
  --fav-border-focus: #8681da;
  --fav-indigo: #8681da;
  --fav-indigo-hover: #8781da;
  --fav-teal: #67d3c9;
  --fav-emerald: #81dabd;
  --fav-emerald-bg: var(--tf-surface);
  --fav-text: var(--tf-ink);
  --fav-muted: var(--tf-ink-faint);
}
