:root {
  --bg: #eef2f5;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8e0e7;
  --rail: #101820;
  --rail-soft: #182431;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #d8f0ed;
  --amber: #b45309;
  --amber-soft: #fff3d7;
  --red: #991b1b;
  --red-soft: #fee2e2;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f7fafc 0, var(--bg) 360px), var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
button, input { font: inherit; }
button { min-width: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.sidebar { background: var(--rail); color: #eef5f4; padding: 24px; display: flex; flex-direction: column; gap: 26px; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { width: 52px; height: 52px; display: block; border-radius: 10px; object-fit: cover; background: #16a394; box-shadow: 0 12px 30px rgba(22,163,148,.22); flex: 0 0 auto; }
.brand h1, .brand p, .topbar h1, .topbar p, .panel h3, .panel p, .hero-copy h2, .hero-copy p { margin: 0; }
.brand h1 { font-size: 20px; }
.brand p, .subtle { color: #a9b8c0; font-size: 13px; line-height: 1.45; }
.nav { display: grid; gap: 8px; }
.nav-item { border: 1px solid transparent; color: #dbe7e5; background: transparent; text-align: left; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 800; }
.nav-item:hover, .nav-item.active { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.08); }
.nav-item.active { box-shadow: inset 4px 0 0 #16a394; }
.credit-box { margin-top: auto; display: grid; gap: 5px; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: var(--rail-soft); }
.credit-box strong { font-size: 34px; line-height: 1; }
.auth-box { display: grid; gap: 8px; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.05); }
.auth-box strong { color: white; font-size: 13px; overflow-wrap: anywhere; }
.auth-box .secondary-button { width: 100%; padding: 10px 12px; }

.workspace { padding: 28px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.eyebrow, .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; font-weight: 800; }
.topbar h1 { max-width: 760px; font-size: 30px; line-height: 1.18; margin-top: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.topbar-metric { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 10px 12px; display: grid; gap: 2px; min-width: 112px; }
.topbar-metric strong { font-size: 15px; }

.hero-band { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr); gap: 22px; align-items: stretch; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.hero-copy { padding: 28px; display: grid; align-content: center; gap: 14px; }
.hero-copy h2 { max-width: 820px; font-size: 38px; line-height: 1.04; }
.hero-copy p { max-width: 680px; color: var(--muted); line-height: 1.55; }
.hero-actions, .cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.cta-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; padding: 12px 14px; font-weight: 900; text-decoration: none; cursor: pointer; }
.cta-link.primary { background: var(--accent); color: white; }
.cta-link.secondary { border: 1px solid var(--line); color: var(--ink); background: white; }
.preview-stage { min-height: 340px; display: grid; grid-template-rows: auto 1fr auto; background: #16212c; color: white; }
.preview-toolbar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: rgba(255,255,255,.07); }
.preview-toolbar span { width: 10px; height: 10px; border-radius: 99px; background: #7dd3c7; }
.preview-toolbar span:nth-child(2) { background: #f6c453; }
.preview-toolbar span:nth-child(3) { background: #ee6c6c; }
.preview-toolbar strong { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-frame { position: relative; display: grid; align-content: end; gap: 16px; padding: 28px; background: linear-gradient(135deg, rgba(125,211,199,.2), rgba(37,99,235,.18)), #172433; }
.play-glyph { position: absolute; left: 28px; top: 28px; width: 58px; height: 58px; border: 1px solid rgba(255,255,255,.34); border-radius: 8px; background: rgba(255,255,255,.1); }
.play-glyph::after { content: ""; position: absolute; left: 23px; top: 18px; border-left: 17px solid white; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.compression-lane { height: 44px; border-radius: 8px; display: flex; align-items: center; padding: 0 14px; font-weight: 900; }
.input-lane { width: 100%; background: rgba(255,255,255,.22); }
.output-lane { width: 42%; min-width: 132px; background: #7dd3c7; color: #0b2b28; }
.preview-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); border-top: 1px solid rgba(255,255,255,.1); }
.preview-stats > div { display: grid; gap: 3px; padding: 14px; border-right: 1px solid rgba(255,255,255,.1); }
.preview-stats > div:last-child { border-right: 0; }
.preview-stats .label { color: #a9b8c0; }

.view-section { display: none; }
.view-section.active { display: block; }
.view-section.active.grid { display: grid; }
.grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.panel-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.panel h3 { font-size: 18px; line-height: 1.25; }
.panel p { color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.45; }
.status-pill { flex: 0 0 auto; border-radius: 999px; padding: 6px 10px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 900; white-space: nowrap; }
.status-pill.medium { background: var(--amber-soft); color: var(--amber); }
.status-pill.high { background: var(--red-soft); color: var(--red); }

.dropzone { min-height: 260px; border: 2px dashed var(--accent); background: var(--accent-soft); border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 8px; cursor: pointer; text-align: center; padding: 24px; transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease; }
.dropzone:hover { border-color: var(--accent-dark); background: #eef9f5; }
.dropzone:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.dropzone.dragover { border-color: var(--accent-dark); background: #e3f5ee; box-shadow: 0 0 0 4px var(--accent-soft); }
.dropzone strong { font-size: 20px; }
.dropzone-or { font-size: 13px; color: var(--muted); }
.hero-dropzone { margin-top: 10px; min-height: 150px; border: 2px dashed var(--accent); background: var(--accent-soft); border-radius: 14px; display: grid; place-items: center; align-content: center; gap: 6px; cursor: pointer; text-align: center; padding: 22px; transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease; }
.hero-dropzone:hover { border-color: var(--accent-dark); background: #eef9f5; }
.hero-dropzone:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.hero-dropzone.dragover { border-color: var(--accent-dark); background: #e3f5ee; box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-dropzone strong { font-size: 22px; }
.hero-textlink { margin-top: 12px; background: none; border: 0; color: var(--accent-dark); font-weight: 800; font-size: 14px; cursor: pointer; padding: 0; align-self: flex-start; }
.dropzone input { display: none; }
.drop-icon { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: white; font-size: 30px; line-height: 1; }
.dropzone small, .profile-card small, .format-card small, .tool-card small, .quality-card small { color: var(--muted); line-height: 1.35; }
.upload-trust-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.file-summary { margin-top: 16px; display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 12px; }
.file-summary > div, .metric, .hero-stats > div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 4px; min-width: 0; background: #fbfcfd; }
.file-summary strong, .metric strong, .hero-stats strong { overflow-wrap: anywhere; }
.profile-list, .format-grid { display: grid; gap: 10px; }
.profile-card, .format-card, .quality-card, .tool-card, .segment-control button, .related-list button { text-align: left; background: #fbfcfd; border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 4px; cursor: pointer; }
.profile-card:hover, .format-card:hover, .quality-card:hover, .tool-card:hover, .segment-control button:hover, .related-list button:hover { border-color: #9fb0bf; }
.profile-card.active, .format-card.active, .tool-card.active, .segment-control button.active, .quality-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
.profile-card span, .format-card span, .tool-card span, .quality-card span { font-weight: 900; }
.quality-mode-block { display: grid; gap: 8px; margin-top: 14px; }
.quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.delivery-row, .api-key-row, .result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.delivery-row { align-items: stretch; margin-top: 14px; }
.toggle-row { flex: 1 1 0; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; padding: 12px; display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.metric-grid, .detail-grid, .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.primary-button, .secondary-button { border: 0; border-radius: 8px; padding: 12px 14px; font-weight: 900; cursor: pointer; }
.primary-button { width: 100%; margin-top: 16px; background: var(--accent); color: white; }
.primary-button:disabled { background: #a8b4c0; cursor: not-allowed; }
.secondary-button { background: white; border: 1px solid var(--line); color: var(--ink); }
.job-panel { grid-column: 1 / -1; }

/* --- Phase 1: Result Moment --- */
.status-pill.status-done { background: #e6f6ec; color: #1a7f45; }
.status-pill.status-error { background: #fdeaea; color: #b3261e; }
.status-pill.status-busy { background: var(--accent-soft); color: var(--accent-dark); }

.result-card { margin-top: 16px; display: grid; gap: 14px; }
.result-headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.result-pct { font-size: clamp(28px, 5vw, 44px); font-weight: 900; line-height: 1; color: var(--accent-dark); }
.result-sizes { font-size: 15px; color: var(--muted); font-weight: 700; }
.result-sizes em { font-style: normal; opacity: 0.75; font-weight: 600; }
.result-hint { margin: 0; font-size: 14px; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.result-compress-button { border: 0; cursor: pointer; border-radius: 10px; padding: 13px 22px; font-size: 16px; font-weight: 900; color: #fff; background: var(--accent); }
.result-compress-button:hover { filter: brightness(1.05); }
.result-price { font-weight: 700; opacity: 0.85; margin-left: 8px; font-size: 13px; }
.adjust-disclosure { flex: 1; min-width: 0; }
.adjust-disclosure > summary { cursor: pointer; padding: 6px 0 12px; }
.adjust-disclosure-summary-inner { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.adjust-disclosure-summary-inner strong { font-size: 15px; }
.adjust-disclosure-summary-inner span { font-size: 13px; color: var(--muted); }
.api-snippet { margin-top: 4px; }
.api-snippet > summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--muted); }
.code-snippet { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0d1117; }
.code-snippet-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #161b22; }
.code-lang-toggle { display: inline-flex; gap: 4px; }
.code-lang-toggle button { border: 0; background: transparent; color: #9aa4b2; font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.code-lang-toggle button.active { background: #21262d; color: #fff; }
.code-copy { border: 0; background: #21262d; color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.code-snippet pre { margin: 0; padding: 12px; overflow-x: auto; }
.code-snippet code { color: #c9d1d9; font-size: 12.5px; line-height: 1.5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.bulk-disclosure { grid-column: 1 / -1; margin-top: 16px; }
.bulk-disclosure > summary { cursor: pointer; }
.bulk-disclosure > summary strong { font-size: 16px; }
.bulk-disclosure > summary span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.bulk-board { margin-top: 14px; display: grid; gap: 12px; }
.bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.ba-slider { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; touch-action: none; user-select: none; cursor: ew-resize; }
.ba-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.ba-after-wrap { position: absolute; inset: 0; overflow: hidden; }
.ba-after-wrap .ba-after { width: 100vw; max-width: none; }
.ba-single { display: block; width: 100%; max-height: 60vh; border-radius: 12px; background: #000; }
.ba-tag { position: absolute; top: 10px; font-size: 11px; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: rgba(10,14,18,0.6); padding: 4px 8px; border-radius: 6px; pointer-events: none; }
.ba-tag-before { left: 10px; }
.ba-tag-after { right: 10px; }
.ba-divider { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 0 1px rgba(0,0,0,0.35); }
.ba-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 999px; background: #fff; color: var(--accent-dark); display: grid; place-items: center; font-size: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
.ba-divider:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } }

.job-log-details { margin-top: 16px; }
.job-log-details > summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--muted); list-style: revert; }
.job-log-details .job-log { margin-top: 10px; }

.progress-track { width: 100%; height: 12px; background: #e6ebf0; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width 240ms ease; }
.job-log { margin-top: 16px; display: grid; gap: 8px; }
.log-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; font-size: 14px; }
.log-row a { color: var(--accent-dark); font-weight: 900; }
.inline-link-button { border: 0; background: transparent; color: var(--accent-dark); cursor: pointer; font: inherit; font-weight: 900; padding: 0 0 0 6px; }
.inline-link-button:hover { text-decoration: underline; }
.muted { color: var(--muted); }

.tools-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; }
.tool-hero { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; align-items: center; }
.tool-hero h3 { font-size: 26px; }
.hero-stats { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.search-box { display: grid; gap: 8px; margin-bottom: 12px; }
.search-box input { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; color: var(--ink); padding: 12px 14px; outline: none; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,118,110,.14); }
.segment-control { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.segment-control button { display: block; padding: 9px 11px; font-weight: 900; }
.result-bar { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.result-bar strong { color: var(--ink); }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-height: 720px; overflow: auto; padding-right: 4px; }
.tool-card { min-height: 142px; align-content: start; }
.tool-card strong { font-size: 15px; }
.tool-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.meta-chip { border-radius: 999px; padding: 4px 8px; background: #eef2f6; color: #344054; font-size: 12px; font-weight: 900; }
.meta-chip.low { background: var(--accent-soft); color: var(--accent-dark); }
.meta-chip.medium { background: var(--amber-soft); color: var(--amber); }
.meta-chip.high { background: var(--red-soft); color: var(--red); }
.tool-detail { align-self: start; position: sticky; top: 28px; }
.implementation-box { margin: 16px 0; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fbfcfd; }
.related-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.related-list button { padding: 8px 10px; font-size: 13px; font-weight: 900; }

.table-wrap { overflow-x: auto; }
.job-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.job-table th, .job-table td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: middle; }
.job-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
.job-table td:first-child { font-weight: 900; }
.api-key-row { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fbfcfd; margin-bottom: 14px; }
.api-key-row code { overflow-wrap: anywhere; color: var(--accent-dark); font-weight: 900; }
.empty-state { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 8px; background: #fbfcfd; color: var(--muted); padding: 28px; text-align: center; font-weight: 900; }

.site-footer { border-top: 1px solid rgba(255,255,255,.08); background: #0f1720; color: #dbe7e5; padding: 28px; }
.site-footer a { color: #d9f2ee; text-decoration: none; font-weight: 900; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: grid; gap: 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.footer-group { display: grid; gap: 8px; align-content: start; }
.footer-group h4 { margin: 0; color: white; }
.footer-link-list { display: grid; gap: 6px; }

@media (max-width: 1120px) {
  .hero-band, .tools-layout, .tool-hero { grid-template-columns: 1fr; }
  .tool-detail { position: static; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav-item { text-align: center; padding: 10px 8px; }
  .grid, .file-summary, .tool-grid, .hero-stats, .detail-grid, .footer-grid { grid-template-columns: 1fr; }
  .topbar, .topbar-actions { align-items: stretch; flex-direction: column; }
  .topbar-metric { min-width: 0; }
  .secondary-button { width: 100%; }
  .tool-grid { max-height: none; overflow: visible; padding-right: 0; }
}
@media (max-width: 640px) {
  .workspace, .sidebar, .hero-copy { padding: 18px; }
  .panel { padding: 16px; }
  .panel-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .status-pill { align-self: flex-start; white-space: normal; line-height: 1.2; }
  .hero-copy h2 { font-size: 30px; }
  .topbar h1 { font-size: 23px; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quality-grid, .preview-stats { grid-template-columns: 1fr; }
  .delivery-row, .api-key-row, .result-bar { align-items: stretch; flex-direction: column; }
  .output-lane { width: 62%; }
}
.view-section:not(.active) { display: none !important; }


.global-file-input { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }


.launch-notice { margin: 0 0 20px; border: 1px solid #f3c56b; border-radius: 8px; background: #fff8e7; color: #5f3b06; padding: 13px 16px; line-height: 1.45; }
.launch-notice strong { color: #7c4a03; }
.auth-box { display: grid; gap: 8px; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: var(--rail-soft); }
.auth-box .secondary-button { width: 100%; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Customer-facing visual pass */
:root {
  --heat: #f54900;
  --heat-dark: #b83a06;
  --heat-soft: #fff1e8;
  --ink-warm: #2e2726;
}
body {
  background: linear-gradient(180deg, #fff 0, #f8fbfb 240px, var(--bg) 620px), var(--bg);
  color: var(--ink-warm);
}
.brand-logo { background: #f7fbfa; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 14px 34px rgba(245,73,0,.22); }
.nav-item { display: flex; align-items: center; gap: 9px; }
.hero-band {
  border-color: rgba(245,73,0,.18);
  box-shadow: 0 24px 70px rgba(46,39,38,.12);
}
.hero-copy h2 { letter-spacing: 0; }
.cta-link.primary, .primary-button {
  background: linear-gradient(135deg, var(--heat), var(--accent));
  box-shadow: 0 14px 34px rgba(245,73,0,.22);
}
.cta-link.secondary:hover, .secondary-button:hover {
  border-color: rgba(245,73,0,.35);
  background: var(--heat-soft);
}
.panel {
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.panel:hover {
  border-color: rgba(245,73,0,.24);
  box-shadow: 0 22px 58px rgba(46,39,38,.12);
}
.drop-icon {
  background: linear-gradient(135deg, var(--heat), var(--accent));
}
.profile-card.active, .format-card.active, .quality-card.active {
  border-color: var(--heat);
}
.tool-card { position: relative; overflow: hidden; }
@media (max-width: 900px) { .nav-item { justify-content: center; } }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: -8px 0 22px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(23,32,42,.08);
}
.site-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}
.site-header-brand img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.site-header-nav, .site-header-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.site-header-nav button, .site-header-links button, .site-header-links a {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.site-header-nav button:hover, .site-header-links button:hover, .site-header-links a:hover,
.site-header-nav button.active, .site-header-links button.active {
  border-color: rgba(15,118,110,.18);
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.site-header-links { justify-content: flex-end; }
.content-page { display: grid; gap: 18px; }
.page-hero { padding: 26px; }
.page-hero h3, .page-hero h1, .page-hero h2 { max-width: 980px; font-size: 28px; line-height: 1.18; }
.page-hero p { max-width: 860px; }
.page-grid, .sitemap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.policy-stack { display: grid; gap: 12px; max-width: 980px; }
.policy-block h3, .policy-block h2, .sitemap-group h3 { margin: 0 0 8px; }
.policy-block h2 { font-size: 20px; line-height: 1.25; font-weight: 900; }
.policy-block p { margin: 0; color: var(--muted); line-height: 1.55; }
.policy-block a, .page-grid a { color: var(--accent-dark); font-weight: 900; }
.sitemap-group div { display: grid; gap: 8px; }
.sitemap-group a, .sitemap-group button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}
.sitemap-group a:hover, .sitemap-group button:hover { border-color: var(--accent); background: var(--accent-soft); }
.footer-brand-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  background: #7dd3c7;
  color: #0b2b28 !important;
  padding: 10px 14px;
  white-space: nowrap;
}
.site-footer .footer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1120px) {
  .site-header { grid-template-columns: 1fr; align-items: stretch; }
  .site-header-links { justify-content: flex-start; }
  .page-grid, .sitemap-grid, .site-footer .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .site-header { position: static; }
  .site-header-nav, .site-header-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header-nav button, .site-header-links button, .site-header-links a { text-align: center; }
  .page-grid, .sitemap-grid, .site-footer .footer-grid { grid-template-columns: 1fr; }
  .footer-brand-row { align-items: stretch; flex-direction: column; }
  .footer-cta { width: 100%; }
}
/* Hallmark cleanup pass */
html, body { overflow-x: hidden; }
.site-header-nav button,
.site-header-links button,
.site-header-links a,
.footer-link-list a,
.footer-cta,
.sitemap-group a,
.sitemap-group button,
.nav-item,
.primary-button,
.secondary-button,
.cta-link {
  white-space: nowrap;
  line-height: 1;
}
.site-header-nav button:focus-visible,
.site-header-links button:focus-visible,
.site-header-links a:focus-visible,
.footer-link-list a:focus-visible,
.footer-cta:focus-visible,
.sitemap-group a:focus-visible,
.sitemap-group button:focus-visible,
.nav-item:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.cta-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.site-header-nav button:active,
.site-header-links button:active,
.site-header-links a:active,
.footer-link-list a:active,
.footer-cta:active,
.sitemap-group a:active,
.sitemap-group button:active,
.nav-item:active,
.primary-button:active,
.secondary-button:active,
.cta-link:active {
  filter: brightness(.94);
}
.primary-button:disabled,
.secondary-button:disabled,
.cta-link:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.brand h1::after,
.nav-item::before,
.credit-box .label::before,
.auth-box .label::before,
.hero-copy .eyebrow::before,
.hero-copy p::after,
.cta-link.primary::before,
.cta-link.secondary::before,
.preview-toolbar strong::before,
.preview-frame::after,
.preview-stats > div .label::before,
.launch-notice::before,
.drop-icon::before,
.dropzone strong::before,
.file-summary > div .label::before,
.profile-card::before,
.format-card::before,
.quality-card::before,
.estimate-panel .metric .label::before,
.primary-button::before,
.job-panel h3::before,
.tool-hero .eyebrow::before,
.hero-stats > div .label::before,
.search-box .label::before,
.tool-card::before,
.tool-detail .detail-grid .metric .label::before,
.job-table th::before,
.api-panel h3::before,
.api-key-row code::before,
.footer-group h4::before {
  content: none !important;
}
.tool-card > span:first-child { padding-right: 0; }
.drop-icon { font-size: 30px; }
.drop-icon::after { content: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
.cta-link.preview-link {
  border: 1px solid rgba(245,73,0,.34);
  background: #fff1e8;
  color: #7c2d12;
}
.cta-link.preview-link:hover {
  border-color: var(--heat);
  background: #ffe2d1;
}
.cta-link.preview-link:focus-visible {
  outline: 2px solid var(--heat);
  outline-offset: 2px;
}
.visual-preview-panel {
  grid-column: 1 / -1;
}
.visual-preview-panel .panel-header {
  align-items: center;
}
.visual-preview-frame {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
@media (max-width: 720px) {
  .visual-preview-frame { min-height: 520px; }
}
.email-auth-form {
  display: grid;
  gap: 8px;
}
.email-auth-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 10px 12px;
  outline: none;
}
.email-auth-form input::placeholder {
  color: #a9b8c0;
}
.email-auth-form input:focus {
  border-color: #7dd3c7;
  box-shadow: 0 0 0 3px rgba(125,211,199,.18);
}
.auth-message {
  color: #a9b8c0;
  font-size: 12px;
  line-height: 1.35;
}
.signup-prompt-box {
  margin-top: -12px;
}
.signup-prompt-box .subtle {
  color: #a9b8c0;
}
.visual-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .visual-preview-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
}
/* Navigation shell consistency */
.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
}
.workspace > .site-footer {
  margin-top: 28px;
  margin-inline: -28px;
  margin-bottom: -28px;
}
.site-header-nav button,
.site-header-links button,
.site-header-links a,
.footer-link-list a {
  min-height: 36px;
}
.footer-link-list a:hover {
  color: #7dd3c7;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 900px) {
  .sidebar {
    position: static;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }
}
@media (max-width: 640px) {
  .workspace > .site-footer {
    margin-inline: -18px;
    margin-bottom: -18px;
  }
}
.pricing-layout {
  display: grid;
  gap: 16px;
}
.pricing-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.plan-card {
  display: grid;
  gap: 14px;
}
.plan-card.featured {
  border-color: #0f8f81;
  box-shadow: 0 12px 34px rgba(15, 143, 129, .16);
}
.plan-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.plan-card-top strong {
  font-size: 20px;
  color: #101820;
  white-space: nowrap;
}
.plan-credit-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  font-size: 14px;
}
.plan-footage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}
.plan-footage-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}
.plan-footage-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: #101820;
}
.pricing-table td:nth-child(2) {
  white-space: nowrap;
  font-weight: 800;
}
@media (max-width: 980px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .pricing-hero,
  .plan-card-top,
  .plan-credit-line {
    display: grid;
  }
  .plan-footage-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-stack { display: grid; gap: 18px; }
.pricing-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 18px; align-items: stretch; }
.pricing-hero h3 { margin: 4px 0 10px; font-size: 28px; line-height: 1.08; letter-spacing: 0; }
.pricing-proof { display: grid; align-content: center; gap: 8px; padding: 16px; border: 1px solid rgba(245,73,0,.18); border-radius: 8px; background: #fff8f2; }
.pricing-proof strong { font-size: 26px; color: var(--heat-dark); }
.pricing-proof small { color: var(--muted); line-height: 1.45; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.pricing-plan { display: grid; gap: 12px; align-content: start; }
.plan-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-topline > strong { font-size: 22px; color: var(--ink); }
.pricing-plan h3 { margin: 0; font-size: 24px; letter-spacing: 0; }
.pricing-plan p { margin: 0; color: var(--muted); line-height: 1.45; }
.rate-line { display: grid; gap: 4px; padding: 12px; border-radius: 8px; background: var(--rail-soft); }
.rate-line strong { color: var(--heat-dark); }
.pricing-plan ul { margin: 0; padding-left: 18px; color: var(--ink); line-height: 1.65; }
.positioning-panel p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) {
  .pricing-hero, .pricing-grid { grid-template-columns: 1fr; }
}

/* Long-form About and Blog sections */
.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.toc-panel {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 10px;
}
.toc-panel h3 { font-size: 18px; }
.toc-panel a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink-warm);
  padding: 10px 11px;
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
}
.toc-panel a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.about-article {
  display: grid;
  gap: 18px;
  padding: 26px;
}
.about-article > h3 {
  max-width: 920px;
  font-size: 32px;
  line-height: 1.1;
}
.about-article > p,
.article-section > p {
  max-width: 960px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}
.article-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  gap: 12px;
}
.article-section h4 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}
.infographic-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.info-card,
.blog-topic-card,
.cta-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 16px;
  min-width: 0;
}
.info-card h4,
.blog-topic-card h5,
.cta-panel h4 {
  margin: 8px 0 6px;
}
.info-card p,
.blog-topic-card p,
.cta-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}
.icon-badge {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 900;
  padding: 0 8px;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}
.comparison-table th {
  background: #f1f5f8;
  color: var(--ink-warm);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.comparison-table tr:last-child td { border-bottom: 0; }
.blog-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.blog-topic-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.blog-topic-card h5 {
  font-size: 16px;
  line-height: 1.25;
}
.blog-topic-card strong { color: var(--ink-warm); }
.cta-panel .cta-link {
  width: fit-content;
  margin-top: 10px;
}
@media (max-width: 1120px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc-panel { position: static; }
  .blog-topic-grid,
  .blog-topic-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .about-article { padding: 18px; }
  .about-article > h3 { font-size: 25px; }
  .infographic-grid,
  .blog-topic-grid,
  .blog-topic-grid.compact { grid-template-columns: 1fr; }
}



/* Visual QA responsive fixes - 2026-07-04 */
@media (max-width: 900px) {
  .sidebar { display: none !important; }
  .workspace { padding: 20px; }
  .site-header { margin: 0 0 16px; }
  .site-header-brand { justify-content: center; }
  .site-header-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-header-links { display: none; }
  .topbar { margin-bottom: 16px; }
  .tool-grid { max-height: none !important; overflow: visible !important; padding-right: 0 !important; }
  .tool-card { min-height: auto; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header-nav button,
  .site-header-links button,
  .site-header-links a,
  .footer-link-list a,
  .footer-cta,
  .sitemap-group a,
  .sitemap-group button,
  .nav-item,
  .primary-button,
  .secondary-button,
  .cta-link {
    white-space: normal;
    line-height: 1.18;
  }
  .panel-header,
  .visual-preview-panel .panel-header,
  .plan-topline,
  .plan-card-top,
  .plan-credit-line {
    flex-direction: column;
    align-items: stretch;
  }
  .status-pill { width: fit-content; max-width: 100%; white-space: normal; }
  .pricing-hero,
  .pricing-grid,
  .plan-grid { grid-template-columns: 1fr !important; }
  .pricing-proof strong { font-size: 22px; }
  .visual-preview-frame { min-height: 360px; }
  .workspace > .site-footer { margin-inline: -20px; margin-bottom: -20px; }
}

@media (max-width: 480px) {
  .workspace { padding: 16px; }
  .site-header { padding: 8px; }
  .site-header-nav { gap: 6px; }
  .site-header-nav button { min-height: 42px; padding: 9px 8px; }
  .topbar h1 { font-size: 22px; }
  .hero-copy h2 { font-size: 27px; }
  .hero-actions,
  .cta-row { flex-direction: column; }
  .cta-link { width: 100%; }
  .pricing-plan h3 { font-size: 21px; }
  .plan-topline > strong { font-size: 19px; }
  .job-table,
  .comparison-table { min-width: 620px; }
  .visual-preview-frame { min-height: 320px; }
}

/* Refined customer-facing pricing page */
.refined-pricing { gap: 18px; }
.refined-pricing-hero { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); align-items: stretch; }
.refined-pricing-hero h3 { max-width: 860px; }
.refined-pricing-hero p { max-width: 920px; }
.pricing-rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pricing-rule-card { display: grid; gap: 8px; align-content: start; }
.pricing-rule-card strong { color: var(--ink); font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.pricing-rule-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.refined-plan-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.refined-pricing .plan-card { min-width: 0; align-content: start; }
.refined-pricing .plan-card p { min-height: 44px; }
.refined-pricing .plan-credit-line { min-width: 0; }
.refined-pricing .plan-credit-line strong,
.refined-pricing .plan-card-top strong,
.refined-pricing .plan-footage-grid strong { overflow-wrap: anywhere; }
.refined-pricing .pricing-table th::before { content: none !important; }
.refined-pricing .pricing-table th,
.refined-pricing .pricing-table td { line-height: 1.35; }
.refined-pricing .pricing-table td:nth-child(2) { white-space: normal; min-width: 120px; }
.refined-pricing .pricing-table td:nth-child(3),
.refined-pricing .pricing-table td:nth-child(4) { color: var(--muted); }
.refined-pricing code { overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .pricing-rule-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .refined-pricing-hero { grid-template-columns: 1fr !important; }
  .refined-pricing-hero h3 { font-size: 24px; }
  .refined-pricing .plan-card p { min-height: 0; }
  .refined-pricing .job-table { min-width: 760px; }
}

/* Auth provider polish and preview page */
.auth-provider-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.auth-provider-button {
  justify-content: flex-start;
  gap: 8px;
  min-height: 40px;
}
.auth-provider-button.planned {
  opacity: .72;
  border-style: dashed;
}
.provider-initial {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}
.auth-provider-button.planned .provider-initial {
  background: #edf0f3;
  color: #667085;
}
.preview-page { gap: 18px; }
.preview-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.preview-page-hero h3 {
  max-width: 920px;
  font-size: 30px;
  line-height: 1.12;
}
.preview-page-hero p { max-width: 900px; }
.preview-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.preview-workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.preview-step-card {
  display: grid;
  gap: 8px;
  align-content: start;
}
.preview-step-card h3 { font-size: 17px; }
.preview-step-card p { margin: 0; }
.preview-page .visual-preview-panel { grid-column: auto; }
.preview-page .visual-preview-frame { min-height: 720px; }
@media (max-width: 1120px) {
  .preview-page-hero { grid-template-columns: 1fr; }
  .preview-page-actions { justify-content: flex-start; }
  .preview-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .preview-workflow-grid { grid-template-columns: 1fr; }
  .preview-page .visual-preview-frame { min-height: 420px; }
}
/* Product page polish pass */
.tool-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.tool-action-row .primary-button { margin-top: 0; }
.tool-detail-metrics { margin-top: 12px; }
.tool-guidance-grid,
.job-overview-grid,
.api-flow-grid,
.preview-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.quality-check-box ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
}
.job-step-card,
.api-flow-card,
.preview-step-card {
  display: grid;
  gap: 8px;
  align-content: start;
}
.job-step-card p,
.api-flow-card p,
.preview-step-card p { margin: 0; }
.api-flow-card code {
  display: block;
  color: var(--accent-dark);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.api-contract-box { margin: 0; }
.jobs-page,
.api-page,
.preview-page { display: grid; gap: 18px; }
.jobs-hero,
.api-hero,
.preview-page-hero { margin-bottom: 0; }
.preview-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.preview-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .tool-action-row,
  .preview-page-hero { grid-template-columns: 1fr; }
  .preview-page-actions { justify-content: stretch; flex-direction: column; }
}

/* Auth provider buttons */
.auth-provider-button {
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  font-weight: 900;
}
.provider-logo {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}
.auth-provider-button .provider-logo + span {
  line-height: 1;
}


/* Preview workflow controls */
.preview-run-panel {
  display: grid;
  gap: 16px;
}

.preview-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.preview-mode-card {
  min-height: 134px;
  display: grid;
  gap: 5px;
  align-content: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 14px;
  cursor: pointer;
}

.preview-mode-card:hover {
  border-color: #9fb0bf;
}

.preview-mode-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}

.preview-mode-card span {
  font-weight: 900;
}

.preview-mode-card strong {
  color: var(--ink);
  font-size: 14px;
}

.preview-mode-card small {
  color: var(--muted);
  line-height: 1.35;
}

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

.range-input-grid label {
  display: grid;
  gap: 6px;
}

.range-input-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.range-input-grid input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.preview-estimate-grid {
  margin-top: 0;
}

.job-preview-media {
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #000;
  overflow: hidden;
}

.job-preview-video {
  display: block;
  width: 100%;
  max-height: 60vh;
  background: #000;
}

.job-preview-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fbfcfd;
  font-size: 13px;
  color: var(--muted);
}

.job-preview-caption span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.preview-job-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.preview-job-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.preview-job-card > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.preview-job-card strong,
.preview-job-card span {
  overflow-wrap: anywhere;
}

.preview-job-card span,
.preview-job-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .preview-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .preview-mode-grid,
  .range-input-grid {
    grid-template-columns: 1fr;
  }

  .preview-job-card {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Header-level sidebar toggle */
.site-sidebar-toggle {
  border: 1px solid rgba(245,73,0,.45);
  border-radius: 8px;
  background: var(--heat-soft);
  color: var(--heat-dark);
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.site-sidebar-toggle:hover {
  background: #ffffff;
  border-color: var(--heat);
}
@media (max-width: 900px) {
  .site-sidebar-toggle { display: none; }
}

/* Premium refinement pass */
:root {
  --bg: #f4f6f7;
  --panel: #ffffff;
  --ink: #14181f;
  --ink-warm: #14181f;
  --muted: #69727f;
  --line: #dfe4e8;
  --rail: #101316;
  --rail-soft: #181d22;
  --accent: #11766f;
  --accent-dark: #0b5f5a;
  --accent-soft: #e7f4f2;
  --heat: #e45516;
  --heat-dark: #a83a10;
  --heat-soft: #fff4ee;
  --shadow: 0 18px 48px rgba(20, 24, 31, .07);
  --shadow-strong: 0 28px 80px rgba(20, 24, 31, .12);
}

html { background: var(--bg); }
body {
  background: #f4f6f7;
  color: var(--ink);
  font-feature-settings: "kern" 1, "liga" 1, "cv02" 1, "cv03" 1;
  text-rendering: geometricPrecision;
}

.app-shell {
  background: linear-gradient(180deg, #fbfcfd 0, #f4f6f7 420px, #eef2f3 100%);
}

.sidebar {
  padding: 22px 18px;
  gap: 18px;
  background: #111518;
  color: #f4f7f7;
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.04);
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }
.brand {
  min-height: 64px;
  padding: 6px 4px 14px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(0,0,0,.26);
}
.brand h1 {
  font-size: 17px;
  line-height: 1.1;
  color: #ffffff;
}
.brand p,
.sidebar .subtle {
  color: #9aa7af;
  font-size: 12px;
}

.sidebar-controls,
.auth-box,
.credit-box {
  border-color: rgba(255,255,255,.09);
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.sidebar-controls { padding: 12px; gap: 11px; }
.sidebar-width-control .label,
.sidebar .label { color: #aeb8bf; }
.sidebar-width-control input[type="range"] { accent-color: #21a79d; }
.sidebar-hide-button,
.auth-box .secondary-button,
.credit-box .secondary-button {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.92);
}

.nav { gap: 5px; }
.nav-item {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 12px;
  color: #c9d2d7;
  font-size: 14px;
  font-weight: 760;
}
.nav-item:hover {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  color: #ffffff;
}
.nav-item.active {
  border-color: rgba(33,167,157,.26);
  background: rgba(33,167,157,.14);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #21a79d;
}

.workspace {
  padding: 24px 28px 32px;
}
.site-header {
  margin: 0 0 22px;
  padding: 9px;
  border: 1px solid rgba(20,24,31,.08);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(20,24,31,.06);
}
.site-header-brand {
  padding: 5px 8px 5px 5px;
  border-radius: 8px;
}
.site-header-brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.site-header-brand span { font-size: 14px; font-weight: 880; }
.site-header-nav,
.site-header-links { gap: 4px; }
.site-header-nav button,
.site-header-links button,
.site-header-links a {
  min-height: 34px;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 780;
}
.site-header-nav button.active,
.site-header-links button.active {
  background: #14181f;
  color: #ffffff;
  border-color: #14181f;
}
.site-sidebar-toggle {
  min-height: 34px;
  border-color: rgba(20,24,31,.1);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(20,24,31,.06);
}
.site-sidebar-toggle:hover {
  border-color: rgba(228,85,22,.36);
  background: var(--heat-soft);
  color: var(--heat-dark);
}

.topbar {
  margin-bottom: 18px;
  align-items: flex-start;
}
.topbar h1 {
  font-size: 28px;
  line-height: 1.12;
  font-weight: 820;
}
.eyebrow,
.label {
  color: #7a838c;
  font-size: 11px;
  font-weight: 840;
}
.topbar-metric {
  min-width: 108px;
  border-color: rgba(20,24,31,.08);
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 24px rgba(20,24,31,.04);
}

.hero-band {
  margin-bottom: 18px;
  border-color: rgba(20,24,31,.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-strong);
}
.hero-copy {
  padding: 34px;
}
.hero-copy h2 {
  max-width: 760px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: .98;
  font-weight: 860;
  color: #101316;
}
.hero-copy p {
  max-width: 690px;
  color: #5f6872;
  font-size: 15px;
  line-height: 1.65;
}
.preview-stage {
  background: #12171b;
}
.preview-toolbar {
  background: rgba(255,255,255,.055);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.preview-frame {
  background: #172126;
}
.play-glyph,
.compression-lane {
  border-radius: 8px;
}

.panel,
.profile-card,
.format-card,
.quality-card,
.tool-card,
.segment-control button,
.related-list button,
.file-summary > div,
.metric,
.hero-stats > div,
.api-key-row,
.implementation-box,
.preview-mode-card,
.plan-credit-line,
.plan-footage-grid > div {
  border-color: rgba(20,24,31,.08);
  background: #ffffff;
}
.panel {
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.panel:hover {
  transform: translateY(-1px);
  border-color: rgba(20,24,31,.12);
  box-shadow: 0 26px 70px rgba(20,24,31,.1);
}
.panel h3 {
  font-size: 18px;
  font-weight: 830;
  color: #11161c;
}
.panel p {
  color: #66707a;
  line-height: 1.55;
}
.panel-header { margin-bottom: 16px; }

.dropzone {
  min-height: 244px;
  border-color: #c8d0d6;
  background: #fbfcfd;
}
.dropzone:hover {
  border-color: rgba(17,118,111,.48);
  background: #f5fbfa;
}
.drop-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #11161c;
  box-shadow: 0 16px 34px rgba(20,24,31,.16);
}

.profile-card,
.format-card,
.quality-card,
.tool-card,
.segment-control button,
.related-list button,
.preview-mode-card {
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.profile-card:hover,
.format-card:hover,
.quality-card:hover,
.tool-card:hover,
.segment-control button:hover,
.related-list button:hover,
.preview-mode-card:hover {
  transform: translateY(-1px);
  border-color: rgba(20,24,31,.18);
  box-shadow: 0 12px 26px rgba(20,24,31,.06);
}
.profile-card.active,
.format-card.active,
.quality-card.active,
.tool-card.active,
.segment-control button.active,
.preview-mode-card.active {
  border-color: rgba(17,118,111,.42);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent), 0 10px 24px rgba(17,118,111,.08);
}

.primary-button,
.secondary-button,
.cta-link,
.show-sidebar-button,
.site-sidebar-toggle {
  border-radius: 8px;
  letter-spacing: 0;
}
.primary-button,
.cta-link.primary {
  background: #11161c;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(20,24,31,.18);
}
.primary-button:hover,
.cta-link.primary:hover {
  background: #22303a;
}
.secondary-button,
.cta-link.secondary {
  background: #ffffff;
  border-color: rgba(20,24,31,.11);
  color: #17202a;
  box-shadow: 0 8px 18px rgba(20,24,31,.04);
}
.secondary-button:hover,
.cta-link.secondary:hover,
.cta-link.preview-link:hover {
  border-color: rgba(17,118,111,.32);
  background: #f6fbfa;
}
.cta-link.preview-link {
  border: 1px solid rgba(228,85,22,.28);
  background: var(--heat-soft);
  color: var(--heat-dark);
}
.status-pill {
  background: #eef7f6;
  color: #0b5f5a;
}

input,
.search-box input {
  border-color: rgba(20,24,31,.12);
  background: #ffffff;
}
.search-box input:focus,
.email-auth-form input:focus {
  border-color: rgba(17,118,111,.48);
  box-shadow: 0 0 0 4px rgba(17,118,111,.1);
}

.site-footer {
  background: #101316;
  border-top-color: rgba(255,255,255,.08);
}
.footer-inner { max-width: 1240px; }

@media (max-width: 900px) {
  .workspace { padding: 18px; }
  .site-header {
    grid-template-columns: 1fr;
    position: static;
  }
  .site-header-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-copy { padding: 26px; }
  .hero-copy h2 { font-size: 34px; }
}

/* Premium header density fix */
.site-header {
  grid-template-columns: auto minmax(360px, 1fr) auto auto;
  min-height: 56px;
  gap: 8px;
  align-items: center;
}
.site-header-nav,
.site-header-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}
.site-header-nav {
  overflow-x: auto;
  scrollbar-width: none;
}
.site-header-nav::-webkit-scrollbar { display: none; }
.site-header-links {
  justify-content: flex-end;
}
.site-header-nav button,
.site-header-links button,
.site-header-links a,
.site-sidebar-toggle {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 12px;
}
.site-sidebar-toggle {
  width: auto;
  min-width: 112px;
}
@media (min-width: 1200px) {
  .site-header { min-height: 58px; }
}
@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .site-header-links { display: none; }
}


.quick-topup-panel {
  border-color: #99f6e4;
  background: #f8fffd;
}

.quick-topup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.quick-topup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.topup-card-button {
  appearance: none;
  border: 1px solid #d7ece8;
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  min-height: 132px;
  text-align: left;
  display: grid;
  align-content: space-between;
  gap: 10px;
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.topup-card-button:hover:not(:disabled) {
  border-color: #0f766e;
  transform: translateY(-1px);
}

.topup-card-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.topup-card-button span {
  font-weight: 800;
}

.topup-card-button strong {
  font-size: 1.45rem;
}

.topup-card-button small {
  color: #475569;
}

.quick-topup-note {
  margin: 0;
  color: #475569;
  font-weight: 800;
}

.quick-topup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: #475569;
  font-size: 0.94rem;
}

.quick-topup-footer a {
  color: #0f766e;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .quick-topup-grid {
    grid-template-columns: 1fr;
  }

  .quick-topup-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}


.account-billing-panel { display: grid; gap: 16px; }
.account-billing-grid { display: grid; grid-template-columns: minmax(220px, .9fr) repeat(2, minmax(180px, .55fr)); gap: 12px; }
.billing-stat { border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; padding: 14px; display: grid; gap: 6px; min-width: 0; }
.billing-stat.primary { background: linear-gradient(135deg, #f7fffd, #fff8f3); border-color: rgba(15,118,110,.24); }
.billing-stat strong { font-size: 22px; line-height: 1.1; overflow-wrap: anywhere; }
.billing-stat.primary strong { font-size: 34px; color: var(--accent-dark); }
.billing-stat small { color: var(--muted); line-height: 1.35; }
.billing-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.billing-toggle { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 14px; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; }
.billing-toggle:hover { border-color: rgba(15,118,110,.34); background: #f8fffd; }
.billing-toggle input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.billing-toggle strong { display: block; margin-bottom: 3px; }
.billing-toggle small { color: var(--muted); line-height: 1.4; }
.plan-change-status { border: 1px solid rgba(15,118,110,.22); border-radius: 8px; background: var(--accent-soft); padding: 12px 14px; display: grid; gap: 4px; }
.plan-change-status strong { color: var(--accent-dark); line-height: 1.35; }
.refund-support-box { border: 1px solid rgba(180,83,9,.22); border-radius: 8px; background: var(--amber-soft); padding: 14px; }
.refund-support-box p { margin: 4px 0 0; color: #61410b; }
.refund-support-box a { color: #7c2d12; font-weight: 900; }
.plan-card.current { border-color: var(--accent); box-shadow: inset 0 0 0 2px rgba(15,118,110,.2), var(--shadow); }
.plan-card.current .plan-card-top h3::after { content: "Current"; display: inline-flex; margin-left: 8px; transform: translateY(-2px); border-radius: 999px; padding: 4px 7px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 900; }
@media (max-width: 980px) {
  .account-billing-grid, .billing-control-grid { grid-template-columns: 1fr; }
}

/* Static blog pages */
.static-page {
  margin: 0;
  color: var(--ink);
  background: #f6f8fa;
}
.static-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  position: sticky;
  top: 0;
  z-index: 10;
}
.static-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}
.static-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}
.static-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.static-header nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink-warm);
  background: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}
.static-header nav a:hover,
.static-header nav a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.static-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}
.static-hero {
  display: grid;
  gap: 14px;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.static-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: .98;
  letter-spacing: 0;
}
.static-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
  font-size: 17px;
}
.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.blog-index-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.blog-index-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}
.blog-index-card h2 a {
  color: var(--ink);
  text-decoration: none;
}
.blog-index-card h2 a:hover { color: var(--accent-dark); }
.blog-index-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.static-cta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(245,73,0,.22);
  border-radius: 8px;
  background: #fff8f2;
}
.static-cta h2,
.static-cta p { margin: 0; }
.static-cta p {
  color: var(--muted);
  line-height: 1.55;
}
.article-main {
  width: min(860px, calc(100% - 32px));
}
.static-article {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.static-article h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}
.static-article h2 {
  margin: 12px 0 0;
  font-size: 24px;
  line-height: 1.16;
  letter-spacing: 0;
}
.static-article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 16px;
}
.static-article .article-lede {
  color: var(--ink-warm);
  font-size: 18px;
  line-height: 1.6;
}
.article-next {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.article-next a {
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: none;
}
.article-next a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .static-header { align-items: flex-start; flex-direction: column; }
  .static-header nav { justify-content: flex-start; }
  .blog-index-grid { grid-template-columns: 1fr; }
  .blog-index-card { min-height: auto; }
}

.discord-limit-box { display: grid; gap: 12px; }
.discord-limit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.discord-limit-card { border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; padding: 12px; display: grid; gap: 6px; min-width: 0; }
.discord-limit-card span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.discord-limit-card strong { color: var(--accent-dark); font-size: 26px; line-height: 1; }
.discord-limit-card p { margin: 0; color: #475569; font-size: 0.92rem; line-height: 1.35; }
@media (max-width: 760px) { .discord-limit-grid { grid-template-columns: 1fr; } }
.quick-topup-current {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-topup-current span {
  border: 1px solid #d7ece8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.quick-topup-current b {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
}

.quick-topup-current strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.quick-topup-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
}

.quick-topup-subhead span {
  color: #0f766e;
  font-weight: 900;
}

.quick-topup-subhead small {
  line-height: 1.4;
}

@media (max-width: 900px) {
  .quick-topup-current {
    grid-template-columns: 1fr;
  }

  .quick-topup-subhead {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Credit balance polish */
.credit-breakdown-mini {
  display: grid;
  gap: 6px;
  margin: 6px 0 4px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(4,10,14,.22);
}
.credit-breakdown-mini span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.credit-breakdown-mini em {
  color: #aeb8bf;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}
.credit-breakdown-mini b {
  color: #f7fbfc;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.credit-box .subtle {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
}
.credit-ledger-card {
  gap: 12px;
}
.credit-total-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
.credit-total-row small {
  padding-bottom: 4px;
  color: var(--muted);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
.credit-bucket-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
.credit-bucket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(15,118,110,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}
.credit-bucket-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.credit-bucket-row b {
  color: var(--ink);
  font-size: 13px;
}
.credit-bucket-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.credit-bucket-row em, .credit-bucket-row .cb-value {
  color: var(--accent-dark);
  font-style: normal;
  font-weight: 900;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.billing-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.secondary-button.danger {
  color: #8f2f1f;
  border-color: rgba(143,47,31,.2);
}
.secondary-button.danger:hover {
  background: #fff3ef;
  border-color: rgba(143,47,31,.32);
}
@media (max-width: 640px) {
  .credit-total-row,
  .credit-bucket-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .credit-total-row small {
    text-align: left;
  }
  .billing-action-row {
    justify-content: stretch;
  }
  .billing-action-row .secondary-button {
    width: 100%;
  }
}

/* Billing QA polish: final responsive overrides */
.billing-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.billing-action-row .secondary-button {
  min-width: 132px;
  white-space: normal;
}
.billing-toggle input:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .28);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .site-header-brand {
    min-width: 0;
  }
  .site-header-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
    gap: 8px;
  }
  .site-header-nav button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.1;
  }
  .site-sidebar-toggle {
    width: 100%;
  }
  .billing-action-row {
    justify-content: stretch;
  }
  .billing-action-row .secondary-button {
    flex: 1 1 100%;
  }
  .account-billing-panel .panel-header {
    align-items: stretch;
  }
}

/* Substantial blog image/content upgrades */
.blog-hero { grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); align-items: center; }
.blog-card-media { display:block; margin:-18px -18px 12px; background:#111923; border-bottom:1px solid var(--line); }
.blog-card-media img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; }
.article-figure { margin:8px 0 20px; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#101720; box-shadow:0 18px 45px rgba(17,31,45,.12); }
.article-figure img { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; }
.article-figure figcaption { margin:0; padding:10px 13px; color:#eef3fb; background:#101720; font-size:13px; line-height:1.35; }
.article-checklist { margin-top:12px; padding:18px; border:1px solid rgba(245,73,0,.2); border-radius:8px; background:#fff8f2; }
.article-checklist h2 { margin-top:0; }
.article-checklist ul { margin:0; padding-left:20px; color:var(--ink-warm); line-height:1.7; }
.static-article ul { color:var(--ink-warm); line-height:1.7; }
@media (max-width: 860px) { .blog-hero { grid-template-columns:1fr; } }

/* Trim/crop editor workspace */
.editor-view {
  display: grid;
  gap: 18px;
}
.editor-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  overflow: hidden;
}
.editor-hero h3 {
  max-width: 780px;
}
.editor-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 240px;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
  gap: 18px;
  align-items: start;
}
.editor-stage-panel,
.editor-controls-panel {
  min-width: 0;
}
.editor-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.editor-toolbar button,
.crop-preset-grid button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft, #f7fafc);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}
.editor-toolbar button.active,
.crop-preset-grid button.active {
  border-color: rgba(15, 118, 110, .46);
  background: #e8fbf5;
  color: #075e56;
}
.editor-stage {
  position: relative;
  min-height: clamp(280px, 46vw, 590px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0b1118;
}
.video-frame-wrap,
.editor-demo-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.video-frame-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05080c;
}
.crop-scrim {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .24), rgba(0, 0, 0, .24));
}
.crop-box {
  width: min(76%, 520px);
  max-height: 82%;
  aspect-ratio: 16 / 9;
  border: 2px solid #f8fafc;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .34), 0 18px 45px rgba(0, 0, 0, .38);
  display: grid;
  place-items: start end;
}
.crop-box span {
  margin: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(5, 8, 12, .78);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}
.editor-demo-stage {
  padding: 24px;
  color: #f8fafc;
  text-align: center;
  gap: 18px;
  align-content: center;
}
.demo-film {
  width: min(82%, 520px);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: linear-gradient(135deg, #0f172a, #13251f 54%, #241515);
}
.demo-film span {
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06));
}
.editor-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.editor-metrics-row div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft, #f7fafc);
}
.editor-metrics-row strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.editor-control-stack {
  display: grid;
  gap: 14px;
}
.trim-readout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: #101820;
  color: #f8fafc;
}
.trim-readout strong {
  font-size: 22px;
}
.range-control,
.time-input-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.range-control input {
  width: 100%;
  accent-color: #0f766e;
}
.time-input-grid,
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.time-input-grid input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}
.crop-preset-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.editor-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft, #f7fafc);
}
.editor-toggle input {
  margin-top: 4px;
  accent-color: #0f766e;
}
.editor-toggle span {
  display: grid;
  gap: 4px;
}
.editor-toggle small {
  color: var(--muted);
  line-height: 1.45;
}
.export-recipe code {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101820;
  color: #e6fffa;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 980px) {
  .editor-hero,
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-hero {
    display: grid;
  }
  .editor-hero-actions {
    justify-content: stretch;
    min-width: 0;
  }
  .editor-hero-actions button {
    flex: 1 1 180px;
  }
  .editor-metrics-row,
  .time-input-grid,
  .toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .editor-toolbar,
  .crop-preset-grid,
  .editor-metrics-row {
    grid-template-columns: 1fr;
  }
  .editor-stage {
    min-height: 320px;
  }
  .trim-readout {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }
}

/* Mobile credits redesign 2026-07-05 */
@media (max-width: 760px) {
  body {
    background: #f5f7f9;
  }

  .app-shell,
  .app-shell.sidebar-collapsed {
    display: block;
    min-width: 0;
  }

  .sidebar,
  .show-sidebar-button,
  .site-sidebar-toggle,
  .site-header-links {
    display: none !important;
  }

  .workspace {
    padding: 10px;
    gap: 12px;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: -10px -10px 0;
    padding: 10px;
    border-radius: 0 0 10px 10px;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  }

  .site-header-brand {
    min-width: 0;
    font-size: 15px;
  }

  .site-header-brand img {
    width: 30px;
    height: 30px;
  }

  .site-header-nav {
    display: flex !important;
    gap: 6px;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .site-header-nav::-webkit-scrollbar {
    display: none;
  }

  .site-header-nav button {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 74px;
    min-height: 38px;
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1;
  }

  .topbar {
    display: grid;
    gap: 10px;
    padding: 4px 2px 0;
  }

  .topbar h1 {
    font-size: 25px;
    line-height: 1.08;
  }

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

  .topbar-metric {
    min-width: 0;
    padding: 10px;
  }

  .topbar-metric.request-card {
    grid-column: 1 / -1;
  }

  .topbar-metric strong,
  .topbar-metric .secondary-button {
    overflow-wrap: anywhere;
  }

  .view-section,
  .content-page,
  .pricing-page {
    gap: 12px;
  }

  .panel,
  .page-hero,
  .tool-hero {
    border-radius: 8px;
    padding: 14px;
  }

  .panel-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .panel h3,
  .page-hero h3 {
    font-size: 20px;
    line-height: 1.15;
  }

  .panel p,
  .page-hero p,
  .quick-topup-header p,
  .quick-topup-subhead small,
  .billing-toggle small {
    font-size: 14px;
    line-height: 1.45;
  }

  .pricing-hero,
  .pricing-proof,
  .account-billing-panel,
  .quick-topup-panel {
    gap: 12px;
  }

  .pricing-proof {
    width: 100%;
    padding: 12px;
  }

  .pricing-proof strong,
  .billing-stat.primary strong {
    font-size: 30px;
  }

  .pricing-rule-grid,
  .account-billing-grid,
  .billing-control-grid,
  .quick-topup-current,
  .quick-topup-grid,
  .plan-grid,
  .refined-plan-grid,
  .plan-footage-grid {
    grid-template-columns: 1fr !important;
  }

  .billing-action-row,
  .quick-topup-header,
  .quick-topup-subhead {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: stretch;
  }

  .billing-action-row .secondary-button,
  .quick-topup-header .secondary-button,
  .plan-card .primary-button,
  .topup-card-button,
  #top-up-packs .secondary-button {
    width: 100%;
  }

  .quick-topup-current span,
  .billing-stat,
  .plan-credit-line,
  .plan-footage-grid > div {
    padding: 11px;
  }

  .topup-card-button {
    min-height: 96px;
    align-content: center;
  }

  .topup-card-button strong {
    font-size: 24px;
  }

  .plan-card {
    min-height: auto;
    gap: 12px;
  }

  .plan-card-top {
    align-items: flex-start;
    gap: 8px;
  }

  .plan-card-top strong {
    white-space: nowrap;
  }

  .plan-card.current .plan-card-top h3::after {
    display: table;
    margin: 6px 0 0;
    transform: none;
  }

  .credit-bucket-list,
  .credit-bucket-row,
  .credit-total-row {
    grid-template-columns: 1fr !important;
  }

  .table-wrap {
    margin: 0 -14px;
    padding: 0 14px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .job-table {
    min-width: 560px;
    font-size: 14px;
  }

  .job-table th,
  .job-table td {
    padding: 10px;
  }

  .pricing-table td:last-child .secondary-button {
    min-width: 112px;
  }
}

@media (max-width: 420px) {
  .workspace {
    padding: 8px;
  }

  .site-header {
    margin-left: -8px;
    margin-right: -8px;
    padding: 8px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .panel,
  .page-hero,
  .tool-hero {
    padding: 12px;
  }

  .table-wrap {
    margin: 0 -12px;
    padding: 0 12px 4px;
  }

  .job-table {
    min-width: 500px;
  }
}
/* Billing and mobile navigation polish */
.site-header {
  max-width: 100%;
  overflow: hidden;
}

.site-header-brand,
.site-header-nav button,
.site-header-links button,
.site-header-links a,
.site-sidebar-toggle {
  min-width: 0;
}

.site-header-nav {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
}

.site-header-nav button,
.site-header-links button,
.site-header-links a {
  white-space: nowrap;
}

.toggle-row,
.billing-toggle {
  min-height: 52px;
}

.toggle-row small,
.billing-toggle small {
  display: block;
  font-weight: 600;
  line-height: 1.38;
}

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

.billing-action-row .secondary-button {
  width: auto;
  min-height: 42px;
}

.secondary-button.danger {
  border-color: rgba(153, 27, 27, .25);
  color: var(--red);
}

.secondary-button.danger:hover {
  background: var(--red-soft);
  border-color: rgba(153, 27, 27, .38);
}

.refund-support-box {
  display: grid;
  gap: 4px;
}

.refund-support-box p {
  line-height: 1.5;
}

.plan-grid,
.pricing-grid,
.account-billing-grid,
.billing-control-grid,
.quick-topup-grid,
.quick-topup-current {
  min-width: 0;
}

.plan-card,
.billing-stat,
.topup-card-button,
.quick-topup-current span {
  min-width: 0;
}

.plan-card .primary-button,
.topup-card-button,
#top-up-packs .secondary-button {
  min-height: 44px;
}

.pricing-table {
  min-width: 620px;
}

.table-wrap {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: stretch;
    overflow: visible;
  }

  .site-header-brand {
    justify-content: flex-start;
  }

  .site-header-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    gap: 6px;
  }

  .site-header-nav button {
    min-height: 42px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .billing-action-row,
  .billing-action-row .secondary-button,
  #top-up-packs .secondary-button {
    width: 100%;
  }

  .plan-grid,
  .pricing-grid,
  .account-billing-grid,
  .billing-control-grid,
  .quick-topup-grid,
  .quick-topup-current {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .site-header-nav button {
    padding: 10px 8px;
  }

  .billing-toggle,
  .toggle-row {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .billing-stat.primary strong {
    font-size: 28px;
  }

  .pricing-table {
    min-width: 560px;
  }
}


/* API console upgrade */
.api-console-page {
  display: grid;
  gap: 18px;
}
.api-console-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(circle at 88% 18%, rgba(15,118,110,.12), transparent 32%),
    #ffffff;
}
.api-console-hero h3 {
  max-width: 840px;
  font-size: 32px;
  line-height: 1.08;
}
.api-console-actions {
  display: grid;
  gap: 10px;
}
.api-console-actions .cta-link {
  width: 100%;
}
.api-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .95fr) minmax(0, .95fr);
  gap: 18px;
}
.api-account-card {
  align-content: start;
}
.api-account-metrics {
  margin: 12px 0;
}
.api-doc-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.api-key-create-form {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px);
  margin-bottom: 14px;
}
.api-created-key-box {
  overflow-wrap: anywhere;
}
.api-created-key-box code {
  display: block;
  margin: 8px 0;
  color: var(--accent-dark);
  font-weight: 900;
}
.api-contract-box {
  margin: 0;
}
@media (max-width: 1120px) {
  .api-console-hero,
  .api-console-grid,
  .api-key-create-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .api-console-hero h3 {
    font-size: 26px;
  }
  .api-doc-link-grid {
    grid-template-columns: 1fr;
  }
}

/* Final mobile nav/billing override 2026-07-05 */
@media (max-width: 760px) {
  .site-header-nav {
    display: flex !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .site-header-nav button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 74px !important;
    white-space: nowrap !important;
    min-height: 38px;
    padding: 8px 10px;
  }

  .site-header-links,
  .site-sidebar-toggle,
  .show-sidebar-button {
    display: none !important;
  }

  .billing-action-row,
  .quick-topup-header,
  .quick-topup-subhead {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: stretch !important;
  }

  .account-billing-grid,
  .billing-control-grid,
  .pricing-rule-grid,
  .quick-topup-current,
  .quick-topup-grid,
  .refined-plan-grid,
  .plan-grid,
  .plan-footage-grid {
    grid-template-columns: 1fr !important;
  }
}
/* Whole-site mobile architecture pass 2026-07-05 */
@media (max-width: 920px) {
  *, *::before, *::after { min-width: 0; }

  html, body, #root { width: 100%; overflow-x: hidden; }

  .app-shell,
  .app-shell.sidebar-collapsed { display: block !important; }

  .sidebar,
  .show-sidebar-button,
  .site-sidebar-toggle,
  .site-header-links { display: none !important; }

  .workspace {
    width: 100%;
    padding: 14px;
    display: grid;
    gap: 14px;
  }

  .site-header {
    position: sticky !important;
    top: 0;
    z-index: 80;
    margin: -14px -14px 0;
    padding: 10px 14px;
    border-radius: 0 0 10px 10px;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  }

  .site-header-brand { justify-content: flex-start !important; }

  .site-header-nav {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 6px;
    width: 100%;
    overflow-x: auto !important;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .site-header-nav::-webkit-scrollbar { display: none; }

  .site-header-nav button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 78px !important;
    min-height: 38px;
    padding: 8px 10px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-align: center;
  }

  .topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin: 0;
    padding: 0 2px;
  }

  .topbar h1,
  .hero-copy h2,
  .page-hero h3,
  .tool-hero h3,
  .api-console-hero h3,
  .about-article > h3,
  .static-hero h1,
  .static-article h1 {
    font-size: clamp(24px, 7vw, 34px) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
  }

  .topbar-actions,
  .hero-actions,
  .cta-row,
  .preview-page-actions,
  .visual-preview-actions,
  .editor-hero-actions,
  .billing-action-row,
  .api-console-actions,
  .footer-brand-row,
  .delivery-row,
  .result-bar,
  .api-key-row,
  .quick-topup-header,
  .quick-topup-subhead,
  .panel-header,
  .visual-preview-panel .panel-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 10px !important;
  }

  .topbar-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .topbar-metric.request-card { grid-column: 1 / -1; }

  .primary-button,
  .secondary-button,
  .cta-link,
  .footer-cta,
  .dropzone,
  .api-console-actions .cta-link,
  .editor-hero-actions button,
  .visual-preview-actions a,
  .visual-preview-actions button,
  .billing-action-row .secondary-button,
  .quick-topup-header .secondary-button,
  .plan-card .primary-button,
  .email-auth-form button,
  .api-key-create-form button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .hero-band,
  .grid,
  .tools-layout,
  .tool-hero,
  .preview-page-hero,
  .preview-workflow-grid,
  .api-flow-grid,
  .jobs-page,
  .api-page,
  .preview-page,
  .api-console-page,
  .api-console-hero,
  .api-console-grid,
  .editor-hero,
  .editor-layout,
  .article-layout,
  .content-page,
  .page-grid,
  .sitemap-grid,
  .site-footer .footer-grid,
  .footer-grid,
  .blog-index-grid,
  .blog-hero,
  .infographic-grid,
  .blog-topic-grid,
  .blog-topic-grid.compact,
  .pricing-rule-grid,
  .account-billing-grid,
  .billing-control-grid,
  .quick-topup-current,
  .quick-topup-grid,
  .plan-grid,
  .refined-plan-grid,
  .plan-footage-grid,
  .metric-grid,
  .detail-grid,
  .hero-stats,
  .file-summary,
  .quality-grid,
  .preview-mode-grid,
  .preview-estimate-grid,
  .preview-job-card,
  .editor-metrics-row,
  .time-input-grid,
  .toggle-grid,
  .crop-preset-grid,
  .api-account-metrics,
  .api-doc-link-grid,
  .api-key-create-form {
    grid-template-columns: 1fr !important;
  }

  .view-section.active.grid,
  .content-page,
  .jobs-page,
  .api-page,
  .preview-page,
  .api-console-page,
  .tools-layout,
  .editor-view,
  .article-layout {
    display: grid !important;
    gap: 14px !important;
  }

  .hero-band,
  .panel,
  .page-hero,
  .tool-hero,
  .static-hero,
  .static-article,
  .blog-index-card,
  .api-console-hero {
    border-radius: 8px !important;
    padding: 14px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06) !important;
  }

  .hero-band { overflow: visible; }
  .hero-copy { padding: 0 !important; }

  .preview-stage {
    min-height: 260px !important;
    border-radius: 8px;
    overflow: hidden;
  }

  .preview-frame { padding: 18px !important; }
  .preview-stats { grid-template-columns: 1fr !important; }
  .preview-stats > div { border-right: 0 !important; }
  .preview-page .visual-preview-frame,
  .visual-preview-frame { min-height: 360px !important; }

  .dropzone {
    min-height: 168px !important;
    padding: 16px !important;
  }

  .format-grid,
  .profile-list,
  .segment-control,
  .tool-grid,
  .related-list,
  .editor-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
    gap: 10px !important;
  }

  .profile-card,
  .format-card,
  .quality-card,
  .tool-card,
  .segment-control button,
  .related-list button,
  .preview-mode-card,
  .topup-card-button,
  .blog-topic-card,
  .info-card,
  .metric,
  .billing-stat,
  .quick-topup-current span,
  .plan-credit-line,
  .plan-footage-grid > div,
  .api-flow-card,
  .preview-step-card,
  .sitemap-group,
  .policy-block {
    min-height: auto !important;
    padding: 12px !important;
  }

  .tool-detail,
  .toc-panel {
    position: static !important;
    top: auto !important;
  }

  .toc-panel {
    order: 2;
  }

  .about-article {
    order: 1;
    padding: 14px !important;
  }

  .static-page {
    padding: 12px !important;
  }

  .static-main,
  .article-main {
    width: 100% !important;
  }

  .static-header {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .static-header nav {
    display: flex !important;
    overflow-x: auto !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    scrollbar-width: none;
  }

  .static-header nav::-webkit-scrollbar { display: none; }
  .static-header nav a { flex: 0 0 auto; white-space: nowrap; }

  .editor-stage { min-height: 300px !important; }
  .editor-demo-stage { padding: 14px !important; }
  .editor-controls-panel { padding: 14px !important; }

  .email-auth-form,
  .api-key-create-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  input,
  select,
  textarea,
  .search-box input,
  .time-input-grid input {
    font-size: 16px !important;
    max-width: 100% !important;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    margin-inline: -14px;
    padding-inline: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .job-table,
  .comparison-table,
  .pricing-table {
    min-width: 560px !important;
    width: max-content !important;
    max-width: none !important;
    font-size: 14px !important;
  }

  .job-table th,
  .job-table td,
  .comparison-table th,
  .comparison-table td {
    padding: 10px !important;
    white-space: normal;
  }

  .site-footer {
    margin: 8px -14px -14px !important;
    padding: 24px 14px !important;
  }

  .footer-inner,
  .footer-grid,
  .footer-link-list { width: 100%; }

  .footer-link-list a,
  .sitemap-group a,
  .sitemap-group button {
    min-height: 42px;
    display: flex;
    align-items: center;
  }
}

@media (max-width: 520px) {
  .workspace { padding: 10px; gap: 12px; }
  .site-header { margin: -10px -10px 0; padding: 9px 10px; }
  .site-header-brand span { font-size: 14px; }
  .site-header-nav button { min-width: 72px !important; font-size: 12px !important; }
  .topbar-actions { grid-template-columns: 1fr !important; }
  .panel,
  .page-hero,
  .tool-hero,
  .static-hero,
  .static-article,
  .blog-index-card,
  .api-console-hero { padding: 12px !important; }
  .table-wrap { margin-inline: -12px; padding-inline: 12px; }
  .job-table,
  .comparison-table,
  .pricing-table { min-width: 500px !important; }
  .site-footer { margin: 6px -10px -10px !important; }
}

/* Custom credit top-up */
.custom-topup-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(150px, 210px);
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15,118,110,.16);
  border-radius: 8px;
  background: #f8fffd;
}
.custom-topup-form > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.custom-topup-form strong {
  color: var(--accent-dark);
  font-size: 18px;
}
.custom-topup-form small {
  color: var(--muted);
  line-height: 1.35;
}
.custom-topup-form .primary-button {
  margin-top: 0;
  width: 100%;
}
.custom-topup-input {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 900;
}
.custom-topup-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,118,110,.14);
}
.custom-topup-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-weight: 900;
}
@media (max-width: 820px) {
  .custom-topup-form {
    grid-template-columns: 1fr;
  }
}

/* Final QA guard: mobile header nav must wrap, not clip or horizontal-scroll. */
@media (max-width: 700px) {
  .site-header .site-header-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    overflow: visible !important;
    gap: 8px !important;
  }
  .site-header .site-header-nav button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}
.crop-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.crop-example-grid button {
  display: grid;
  gap: 8px;
  justify-items: start;
  min-height: 132px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.crop-example-grid button.active {
  border-color: rgba(15, 118, 110, .5);
  background: #e8fbf5;
}
.crop-example-grid small {
  color: var(--muted);
  line-height: 1.35;
}
.crop-example-frame {
  display: block;
  width: 72px;
  max-width: 100%;
  border-radius: 6px;
  border: 2px solid #0f766e;
  background: linear-gradient(135deg, #10202a, #1d4f46 55%, #f59e0b);
}
.crop-example-frame.square { aspect-ratio: 1 / 1; }
.crop-example-frame.portrait { aspect-ratio: 9 / 16; width: 48px; }
.crop-example-frame.landscape { aspect-ratio: 16 / 9; width: 92px; }
.crop-example-frame.vertical { aspect-ratio: 4 / 5; width: 58px; }
@media (max-width: 640px) {
  .crop-example-grid {
    grid-template-columns: 1fr;
  }
}

.sidebar-open-mode { display: grid; gap: 8px; }
.sidebar-open-mode > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sidebar-open-mode button { min-height: 34px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(255,255,255,.055); color: #c9d2d7; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.sidebar-open-mode button:hover { background: rgba(255,255,255,.09); color: #ffffff; }
.sidebar-open-mode button.active { border-color: rgba(125,211,199,.56); background: rgba(125,211,199,.16); color: #ffffff; box-shadow: inset 0 0 0 1px rgba(125,211,199,.18); }
.cta-link.glow-preview-link { position: relative; border: 1px solid rgba(125,211,199,.72); background: radial-gradient(circle at 18% 18%, rgba(255,255,255,.92), rgba(236,253,245,.96) 36%, rgba(204,251,241,.94)); color: #0b4f49; box-shadow: 0 0 0 1px rgba(125,211,199,.26), 0 0 26px rgba(45,212,191,.34), 0 14px 34px rgba(20,184,166,.16); }
.cta-link.glow-preview-link::after { content: ""; width: 8px; height: 8px; border-radius: 99px; margin-left: 10px; background: #14b8a6; box-shadow: 0 0 14px rgba(20,184,166,.9); }
.cta-link.glow-preview-link:hover { border-color: #14b8a6; background: #ecfdf5; box-shadow: 0 0 0 1px rgba(20,184,166,.32), 0 0 36px rgba(45,212,191,.46), 0 16px 38px rgba(20,184,166,.2); transform: translateY(-1px); }
/* Long article reading UX */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 4px;
  background: transparent;
}
.reading-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #1fb6ff, #29b36a);
  box-shadow: 0 0 16px rgba(245,73,0,.24);
}
.article-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 880px);
  gap: 24px;
  align-items: start;
}
.article-toc {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.article-toc h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0;
}
.article-toc a {
  display: block;
  padding: 9px 10px;
  border-left: 3px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}
.article-toc a.active {
  border-left-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.long-article .article-lede {
  font-size: 19px;
}
.long-article h2 {
  scroll-margin-top: 92px;
}
.long-article .section-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 10px 0 -2px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #24567a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.article-callout {
  border: 1px solid rgba(41,179,106,.22);
  border-radius: 8px;
  background: #f3fff8;
  padding: 16px;
  color: var(--ink-warm);
  line-height: 1.6;
  font-weight: 800;
}
.article-figure.inline-break {
  margin: 26px 0 24px;
}
@media (max-width: 980px) {
  .article-shell { grid-template-columns: 1fr; }
  .article-shell .long-article { order: 1; }
  .article-toc {
    order: 2;
    position: static;
    max-height: none;
    margin-top: 12px;
  }
  .article-toc h2 { margin-bottom: 8px; }
  .article-toc a { padding: 8px 10px; }
}
.editor-upload-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(15, 118, 110, .26);
  background: linear-gradient(180deg, #f4fffb, #ffffff);
}
.editor-upload-strip h3 {
  margin-bottom: 6px;
}
.editor-upload-strip p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}
.editor-upload-strip .primary-button {
  min-width: 190px;
}
.crop-quick-start {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.crop-example-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.crop-example-grid.compact button {
  min-height: 118px;
}
@media (max-width: 760px) {
  .editor-upload-strip {
    display: grid;
  }
  .editor-upload-strip .primary-button {
    width: 100%;
  }
  .crop-example-grid.compact {
    grid-template-columns: 1fr;
  }
}

/* Fixed desktop TOC follow behavior */
@media (min-width: 981px) {
  .article-shell {
    grid-template-columns: 284px minmax(0, 880px);
    column-gap: 28px;
  }
  .article-toc {
    position: fixed;
    top: 78px;
    left: max(16px, calc((100vw - 1164px) / 2));
    width: 260px;
    max-height: calc(100vh - 102px);
    z-index: 20;
  }
  .article-shell .long-article {
    grid-column: 2;
  }
}
.cutout-builder {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(245, 73, 0, .22);
  border-radius: 8px;
  background: #fff8f2;
}
.cut-segment-list {
  display: grid;
  gap: 8px;
}
.cut-segment-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.cut-segment-chip span {
  font-weight: 750;
  overflow-wrap: anywhere;
}
.cut-segment-chip button {
  border: 1px solid rgba(185, 28, 28, .25);
  border-radius: 7px;
  background: #fff1f2;
  color: #991b1b;
  font-weight: 800;
  padding: 7px 9px;
  cursor: pointer;
}
.empty-state.compact {
  min-height: 0;
  padding: 12px;
  border-radius: 8px;
}
.trim-readout small {
  color: rgba(248, 250, 252, .72);
  font-weight: 800;
}
@media (max-width: 640px) {
  .cut-segment-chip {
    align-items: stretch;
    flex-direction: column;
  }
}
.timeline-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.timeline-action-row button {
  flex: 1 1 160px;
}
.clip-list-editor {
  display: grid;
  gap: 10px;
}
.clip-editor-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}
.clip-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.clip-editor-head span {
  color: var(--muted);
  font-weight: 800;
}
.clip-row-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.clip-row-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft, #f7fafc);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.clip-row-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
@media (max-width: 700px) {
  .clip-editor-head,
  .timeline-action-row {
    display: grid;
  }
  .clip-row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Site-wide visual polish pass 2026-07-05 */
:root {
  --glow-teal: rgba(15, 118, 110, .20);
  --glow-blue: rgba(37, 99, 235, .14);
  --glow-amber: rgba(245, 158, 11, .18);
  --ink-strong: #0b1220;
  --surface-warm: #fffaf4;
  --surface-blue: #f3f7ff;
}
body {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92) 0, rgba(242,248,250,.9) 310px, rgba(238,242,245,1) 760px),
    linear-gradient(135deg, rgba(15,118,110,.09), rgba(245,158,11,.07) 48%, rgba(37,99,235,.07));
}
.sidebar {
  background:
    linear-gradient(180deg, rgba(22,163,148,.12), transparent 34%),
    linear-gradient(160deg, #0b1220, #101820 52%, #172433);
  border-right: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
  border: 2px solid rgba(255,255,255,.24);
  box-shadow: 0 16px 34px rgba(22,163,148,.32), 0 0 0 6px rgba(255,255,255,.05);
}
.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.nav-item::before {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: #dffcf7;
  font-size: 13px;
  line-height: 1;
}
.nav-item:nth-child(1)::before { content: "?"; }
.nav-item:nth-child(2)::before { content: "?"; }
.nav-item:nth-child(3)::before { content: "?"; }
.nav-item:nth-child(4)::before { content: "?"; }
.nav-item:nth-child(5)::before { content: "?"; }
.nav-item:nth-child(6)::before { content: "{}"; font-size: 10px; }
.nav-item:nth-child(7)::before { content: "$"; }
.nav-item:hover { transform: translateX(2px); }
.nav-item.active::before { background: #7dd3c7; color: #082f2b; }
.panel,
.hero-band,
.topbar-metric,
.file-summary > div,
.metric,
.hero-stats > div,
.profile-card,
.format-card,
.quality-card,
.tool-card,
.billing-stat,
.pricing-rule-card,
.api-flow-card,
.preview-step-card,
.sitemap-group,
.info-card,
.blog-topic-card {
  border-color: rgba(15, 23, 42, .10) !important;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .08), 0 1px 0 rgba(255,255,255,.9) inset;
}
.panel {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
.panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #0f766e, #f59e0b, #2563eb);
  opacity: .55;
  pointer-events: none;
}
.panel h3,
.hero-copy h2,
.topbar h1 {
  color: var(--ink-strong);
  font-weight: 920;
}
.eyebrow,
.label {
  color: #475569;
  font-weight: 900;
}
.eyebrow::before {
  content: "?";
  margin-right: 7px;
  color: #f59e0b;
  font-size: 10px;
  vertical-align: 1px;
}
.primary-button,
.cta-link.primary {
  background: linear-gradient(135deg, #0f766e, #0d9488 48%, #2563eb);
  box-shadow: 0 12px 24px rgba(15, 118, 110, .22);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.primary-button:hover:not(:disabled),
.cta-link.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 118, 110, .28);
  filter: saturate(1.08);
}
.secondary-button,
.cta-link.secondary {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.secondary-button:hover:not(:disabled),
.cta-link.secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, .35);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .09);
}
.status-pill {
  background: linear-gradient(135deg, #d8f0ed, #ecfeff);
  border: 1px solid rgba(15, 118, 110, .18);
  color: #0f5f58;
}
.status-pill.medium { background: linear-gradient(135deg, #fff3d7, #fffaf0); }
.status-pill.high { background: linear-gradient(135deg, #fee2e2, #fff7f7); }
.dropzone {
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(244,255,251,.9)),
    repeating-linear-gradient(135deg, rgba(15,118,110,.08) 0 8px, transparent 8px 16px);
}
.drop-icon {
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 12px 28px rgba(15, 118, 110, .26);
}
.metric strong,
.file-summary strong,
.hero-stats strong,
.billing-stat strong {
  color: var(--ink-strong);
}
.metric:hover,
.file-summary > div:hover,
.hero-stats > div:hover,
.profile-card:hover,
.format-card:hover,
.quality-card:hover,
.tool-card:hover,
.plan-card:hover,
.billing-stat:hover {
  border-color: rgba(15, 118, 110, .28) !important;
  transform: translateY(-1px);
}
.metric,
.file-summary > div,
.hero-stats > div,
.profile-card,
.format-card,
.quality-card,
.tool-card,
.plan-card,
.billing-stat {
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.job-table th,
.comparison-table th,
.pricing-table th {
  background: linear-gradient(180deg, #f8fafc, #eef7f6);
  color: #0f3f3a;
  font-weight: 900;
}
.job-table tbody tr:nth-child(even),
.comparison-table tbody tr:nth-child(even),
.pricing-table tbody tr:nth-child(even) {
  background: rgba(15, 118, 110, .025);
}
.job-table tbody tr:hover,
.comparison-table tbody tr:hover,
.pricing-table tbody tr:hover {
  background: rgba(245, 158, 11, .07);
}
.preview-stage {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 22px 46px rgba(15, 23, 42, .18);
}
.preview-frame {
  background:
    linear-gradient(135deg, rgba(125,211,199,.28), rgba(37,99,235,.24)),
    linear-gradient(45deg, rgba(245,158,11,.12), transparent),
    #172433;
}
.pricing-layout.refined-pricing {
  gap: 20px;
}
.refined-pricing-hero {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15,118,110,.11), rgba(37,99,235,.08) 45%, rgba(245,158,11,.13)),
    #ffffff;
}
.refined-pricing-hero h3 {
  max-width: 760px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.02;
}
.refined-pricing-hero p:not(.eyebrow) {
  max-width: 780px;
  font-size: 16px;
}
.pricing-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}
.pricing-hero-badges span,
.plan-badge,
.plan-feature-strip span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, .16);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #113f3b;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}
.pricing-proof {
  border-color: rgba(245, 158, 11, .26) !important;
  background: linear-gradient(160deg, #fffaf0, #ffffff 54%, #ecfeff);
}
.proof-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #0f766e;
  box-shadow: 0 12px 26px rgba(15, 118, 110, .24);
}
.refined-plan-grid {
  align-items: stretch;
}
.plan-card {
  overflow: hidden;
  border-width: 1px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98)),
    #fff;
}
.plan-card::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -44px;
  width: 112px;
  height: 112px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15,118,110,.15), rgba(245,158,11,.13));
  transform: rotate(18deg);
  pointer-events: none;
}
.plan-card.featured {
  border-color: rgba(15, 118, 110, .45) !important;
  box-shadow: 0 18px 44px rgba(15, 118, 110, .18), 0 0 0 3px rgba(15, 118, 110, .08);
}
.plan-card.current {
  border-color: rgba(245, 158, 11, .55) !important;
  box-shadow: 0 18px 44px rgba(245, 158, 11, .18), 0 0 0 3px rgba(245, 158, 11, .10);
}
.plan-card-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
}
.plan-card-top h3 {
  font-size: 22px;
}
.plan-card-top small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-weight: 800;
  line-height: 1.3;
}
.plan-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfeff, #fff7ed);
  border: 1px solid rgba(15,118,110,.16);
  font-size: 20px;
}
.plan-badge {
  background: linear-gradient(135deg, #ecfeff, #fff7ed);
}
.plan-feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.plan-feature-strip span {
  min-height: 28px;
  padding: 6px 9px;
  background: #f8fafc;
  color: #334155;
}
.plan-credit-line {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: rgba(15, 23, 42, .08) !important;
}
.plan-footage-grid > div {
  background: linear-gradient(180deg, #fbfdff, #ffffff);
}
.quick-topup-panel,
.account-billing-panel {
  background: linear-gradient(180deg, #ffffff, #f8fcfb);
}
.topup-card-button {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: rgba(15,118,110,.18) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .07);
}
.topup-card-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(15,118,110,.38) !important;
}
.info-card .icon-badge,
.icon-badge {
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, .24);
}
.callout,
.implementation-box,
.article-callout,
.cutout-builder {
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}
@media (max-width: 760px) {
  .plan-card-top {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .plan-card-top > strong {
    grid-column: 1 / -1;
    width: fit-content;
  }
  .pricing-hero-badges,
  .plan-feature-strip {
    gap: 6px;
  }
}

.compress-embed-shell {
  min-height: 100vh;
  padding: 18px;
  display: grid;
  gap: 16px;
  background: #f7f9fc;
}
.embed-compressor-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.embed-compressor-intro h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.05;
}
.embed-compressor-intro p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #475569;
}
.embed-target-block {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
  max-width: 320px;
}
.embed-target-readout {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}
.embed-target-readout.under { color: #0f766e; }
.embed-target-readout.over { color: #b91c1c; }
.embed-target-readout.subtle { color: #64748b; font-weight: 600; }
.compress-embed-shell .visual-preview-frame {
  min-height: 520px;
}
@media (max-width: 760px) {
  .compress-embed-shell {
    padding: 12px;
  }
  .embed-compressor-intro {
    flex-direction: column;
  }
  .embed-target-block {
    justify-items: start;
    text-align: left;
    max-width: 100%;
  }
}

/* Whole-site mobile reliability pass 2026-07-06 */
* { box-sizing: border-box; }
html, body, #root { max-width: 100%; overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; }
button, input, select, textarea { max-width: 100%; }
.app-shell { width: 100%; }
.workspace { min-width: 0; }
.panel, .metric, .billing-stat, .plan-card, .tool-card, .pricing-rule-card, .quick-topup-panel { min-width: 0; }
.panel-header, .billing-action-row, .quick-topup-header, .credit-total-row { min-width: 0; }
.panel-header h3, .panel h3, .panel p, .pricing-plan p, .plan-card p, .pricing-rule-card strong, .topup-card-button span, .topup-card-button strong { overflow-wrap: anywhere; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 680px; }
.site-header { width: 100%; max-width: 100%; }
.site-header-nav, .site-header-links { min-width: 0; }
.site-header-nav button, .site-header-links button, .site-header-links a, .primary-button, .secondary-button { white-space: normal; line-height: 1.15; }

@media (max-width: 900px) {
  .app-shell { display: block !important; grid-template-columns: 1fr !important; }
  .sidebar, .show-sidebar-button, .site-sidebar-toggle, .sidebar-controls { display: none !important; }
  .workspace { width: 100%; padding: 16px; }
  .site-header { position: sticky; top: 0; z-index: 20; margin: -16px -16px 16px; border-radius: 0; border-left: 0; border-right: 0; }
  .site-header-brand { justify-content: flex-start; }
  .site-header-nav { display: flex !important; overflow-x: auto; gap: 8px; padding-bottom: 4px; scroll-snap-type: x proximity; }
  .site-header-nav button { flex: 0 0 auto; min-width: 96px; min-height: 42px; scroll-snap-align: start; }
  .site-header-links { display: none !important; }
  .hero-grid, .compressor-grid, .editor-layout, .api-dashboard-grid, .account-billing-grid, .billing-control-grid, .pricing-rule-grid, .quick-topup-current, .quick-topup-grid, .plan-grid, .refined-plan-grid, .sitemap-grid, .policy-stack, .blog-topic-grid, .footer-grid { grid-template-columns: 1fr !important; }
  .pricing-hero, .refined-pricing-hero { grid-template-columns: 1fr !important; }
  .billing-action-row { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; }
  .billing-action-row button, .quick-topup-header .secondary-button, .custom-topup-form .primary-button { width: 100%; }
  .quick-topup-header { grid-template-columns: 1fr; align-items: start; }
  .quick-topup-current { gap: 8px; }
  .quick-topup-current span, .credit-bucket-row, .billing-toggle { align-items: flex-start; }
  .custom-topup-form { grid-template-columns: 1fr; }
  .custom-topup-input { width: 100%; }
  .custom-topup-input input { width: 100%; }
  .plan-card-top { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
  .plan-card-top > strong { grid-column: 1 / -1; justify-self: start; }
  .plan-feature-strip { display: grid; grid-template-columns: 1fr; }
  .plan-footage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-stage, .editor-stage { min-height: 320px; }
  .visual-preview-frame, .compress-embed-shell .visual-preview-frame { min-height: 340px; }
  .footer-inner { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 560px) {
  .workspace { padding: 12px; }
  .site-header { margin: -12px -12px 12px; padding: 10px 12px; gap: 10px; }
  .site-header-brand img { width: 30px; height: 30px; }
  .site-header-brand span { font-size: 13px; }
  .site-header-nav button { min-width: 86px; min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .panel, .pricing-proof, .billing-stat, .plan-card, .quick-topup-panel, .pricing-rule-card { padding: 14px; border-radius: 8px; }
  .refined-pricing-hero h3, .page-hero h3, .page-hero h1, .page-hero h2, .hero-copy h1 { font-size: 25px !important; line-height: 1.08; }
  .panel-header { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .pricing-hero-badges, .plan-feature-strip { display: grid; grid-template-columns: 1fr; }
  .pricing-hero-badges span, .plan-badge, .plan-feature-strip span { width: 100%; justify-content: center; text-align: center; }
  .credit-bucket-row { grid-template-columns: 1fr auto; gap: 8px; }
  .quick-topup-grid { gap: 10px; }
  .topup-card-button { min-height: 112px; padding: 14px; }
  .plan-footage-grid { grid-template-columns: 1fr; }
  .table-wrap table { min-width: 620px; }
  .job-table th, .job-table td, .pricing-table th, .pricing-table td { padding: 10px; font-size: 13px; }
  .metric-grid, .file-summary, .hero-stats { grid-template-columns: 1fr !important; }
  .drop-zone { padding: 18px 14px; }
  .editor-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-toolbar button { min-height: 40px; }
  .crop-example-grid, .crop-preset-grid, .toggle-grid { grid-template-columns: 1fr !important; }
  .site-footer { margin-top: 16px; }
}

/* Blog hub polish */
.blog-hub-main {
  width: min(1180px, calc(100% - 32px));
}
.blog-hub-hero {
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 46%, #fff8f2 100%);
}
.blog-hero-copy {
  display: grid;
  gap: 14px;
  align-content: center;
}
.blog-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.blog-hub-actions .primary-button,
.blog-hub-actions .secondary-button {
  width: auto;
  min-height: 44px;
}
.blog-hub-figure {
  margin: 0;
}
.blog-decision-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.blog-decision-strip a {
  display: grid;
  gap: 6px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.blog-decision-strip a:hover {
  border-color: rgba(245, 73, 0, .36);
  background: #fff8f2;
}
.blog-decision-strip span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.blog-decision-strip strong {
  font-size: 14px;
  line-height: 1.35;
}
.refined-blog-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.refined-blog-grid .blog-index-card {
  grid-column: span 3;
  padding: 0;
  overflow: hidden;
  min-height: 0;
}
.refined-blog-grid .blog-feature-card {
  grid-column: span 6;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: stretch;
}
.refined-blog-grid .blog-feature-card .blog-card-media {
  margin: 0;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}
.refined-blog-grid .blog-feature-card .blog-card-media img {
  height: 100%;
  min-height: 360px;
  aspect-ratio: auto;
}
.blog-card-body {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
}
.blog-card-body ul {
  margin: 2px 0 0;
  padding-left: 18px;
  color: var(--ink-warm);
  line-height: 1.5;
  font-size: 14px;
}
.blog-read-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  color: var(--accent-dark);
  font-weight: 950;
  text-decoration: none;
}
.blog-read-link:hover {
  text-decoration: underline;
}
@media (max-width: 980px) {
  .blog-decision-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .refined-blog-grid,
  .refined-blog-grid .blog-feature-card {
    grid-template-columns: 1fr;
  }
  .refined-blog-grid .blog-index-card,
  .refined-blog-grid .blog-feature-card {
    grid-column: auto;
  }
  .refined-blog-grid .blog-feature-card .blog-card-media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .refined-blog-grid .blog-feature-card .blog-card-media img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
@media (max-width: 560px) {
  .blog-hub-actions {
    display: grid;
  }
  .blog-decision-strip {
    grid-template-columns: 1fr;
  }
}
/* Static tool page QA pass: definitions, images, and readable guide layout */
.tool-page {
  background: linear-gradient(180deg, #ffffff 0, #f7fbfb 280px, #eef2f5 100%);
}
.tool-page img {
  max-width: 100%;
  height: auto;
}
.brand-mark,
.brand-logo,
.site-header-brand img,
.site-brand img,
header img[alt*="logo" i],
img[alt*="CondenseVideo logo" i] {
  width: 34px !important;
  height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}
.tool-page .panel {
  overflow: hidden;
}
.tool-seo-body {
  display: grid;
  gap: 18px;
}
.tool-seo-body .panel-header {
  margin-bottom: 0;
}
.tool-seo-body h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}
.tool-definition-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(15,118,110,.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #f2fbf9, #fff8f1);
}
.tool-definition-card h3,
.tool-decision-grid h3,
.tool-body-copy h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
}
.tool-definition-card p,
.tool-decision-grid p,
.tool-body-copy p {
  margin: 0;
  color: #475467;
  line-height: 1.62;
  font-size: 15px;
}
.tool-infographic {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}
.tool-infographic img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f7fafc;
}
.tool-infographic figcaption,
.tool-image-grid figcaption {
  padding: 10px 12px;
  color: #667085;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
  background: #fbfcfd;
  border-top: 1px solid var(--line);
}
.tool-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.tool-image-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}
.tool-image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f7fafc;
}
.tool-decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tool-decision-grid article {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.tool-body-copy {
  display: grid;
  gap: 12px;
}
.tool-body-copy section {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #e4e9ee;
  border-radius: 8px;
  background: #ffffff;
}
.tool-body-copy section:nth-child(even) {
  background: #fbfcfd;
}
@media (max-width: 900px) {
  .tool-seo-body h2 { font-size: 24px; }
  .tool-image-grid,
  .tool-decision-grid {
    grid-template-columns: 1fr;
  }
  .tool-decision-grid article {
    min-height: 0;
  }
}

/* Keep fallback logo from masquerading as a giant infographic when CDN delivery is blocked. */
.tool-infographic img[src$="condensevideo-logo.jpg"],
.tool-image-grid img[src$="condensevideo-logo.jpg"] {
  object-fit: contain !important;
  padding: 44px;
  background: repeating-linear-gradient(135deg, #f7fafc 0, #f7fafc 12px, #eef2f5 12px, #eef2f5 24px);
}
.tool-image-grid img[src$="condensevideo-logo.jpg"] {
  padding: 30px;
}

/* Blog article: intro/lead paragraphs after the hero */
.article-intro {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink-warm);
}

/* Blog article: breadcrumb trail + contextual related-links (SEO internal linking) */
.article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}
.article-breadcrumbs a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}
.article-breadcrumbs a:hover { text-decoration: underline; }
.article-breadcrumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 800;
}
.article-related {
  margin-top: 28px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
}
.article-related h2 { margin: 0 0 12px; }
.article-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.article-related li a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.5;
}
.article-related li a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.article-related li a strong {
  display: block;
  color: var(--accent-dark);
}

/* ---- Tool library interlink band: multi-color pill buttons ---- */
.tool-library-band { background: linear-gradient(180deg, #f7fafc 0%, #eef3f7 100%); }
.tool-library-band h3 { margin: 0; }
.tool-library-band .library-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tool-library-band .library-links a {
  display: inline-flex; align-items: center;
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 800; line-height: 1; text-decoration: none;
  color: #fff; background: var(--accent);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 1px 2px rgba(15,30,45,.10);
  transition: transform .12s ease, box-shadow .14s ease, filter .12s ease;
}
.tool-library-band .library-links a:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15,30,45,.18); filter: brightness(1.06); }
.tool-library-band .library-links a:focus-visible { outline: 3px solid rgba(15,118,110,.45); outline-offset: 2px; }
/* multi-color rotation across the row */
.tool-library-band .library-links a:nth-child(8n+1) { background: #0f766e; } /* teal (brand) */
.tool-library-band .library-links a:nth-child(8n+2) { background: #2563eb; } /* blue */
.tool-library-band .library-links a:nth-child(8n+3) { background: #7c3aed; } /* violet */
.tool-library-band .library-links a:nth-child(8n+4) { background: #db2777; } /* pink */
.tool-library-band .library-links a:nth-child(8n+5) { background: #ea580c; } /* orange */
.tool-library-band .library-links a:nth-child(8n+6) { background: #ca8a04; } /* amber */
.tool-library-band .library-links a:nth-child(8n+7) { background: #16a34a; } /* green */
.tool-library-band .library-links a:nth-child(8n+8) { background: #0891b2; } /* cyan */

.region-control { display: grid; gap: 12px; }
.region-control-grid { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.region-preview { position: relative; min-height: 170px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #172433, #243447); }
.region-preview::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 20px), repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 20px); opacity: .5; }
.region-preview-box { position: absolute; z-index: 1; border: 2px solid #f59e0b; background: rgba(245, 158, 11, .36); box-shadow: 0 0 0 999px rgba(15, 23, 42, .22); }
.region-fields { display: grid; gap: 12px; align-content: start; }
.region-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.region-action-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: center; }
.region-action-row .primary-button { margin-top: 0; }
@media (max-width: 640px) {
  .region-control-grid, .region-input-grid, .region-action-row { grid-template-columns: 1fr; }
}

/* =========================================================================
   Unified header + mobile nav drawer (2026-07 redesign)
   This block is intentionally the last thing in the file and uses
   !important on layout-critical properties (display/position/transform)
   so it wins deterministically over the many older, narrower mobile-nav
   overrides above without having to hunt down every one of them.
   ========================================================================= */

.app-shell { display: block !important; }
.workspace { max-width: 1280px; margin: 0 auto; }
.site-header { overflow: visible !important; position: relative; }
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, #0f766e, #0d9488 30%, #2563eb 65%, #f59e0b);
  opacity: .55;
}
.site-header-brand img { box-shadow: 0 6px 16px rgba(15, 118, 110, .22); }

.topbar-status { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* -- desktop account cluster (credits + sign in/account popover) -- */
.site-header-account { display: flex; align-items: center; gap: 10px; position: relative; justify-self: end; }
.header-credit-pill {
  font-size: 12px;
  font-weight: 900;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  color: var(--accent-dark);
  white-space: nowrap;
  background: var(--accent-soft);
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 999px;
  padding: 7px 12px;
  transition: background .15s ease, border-color .15s ease;
}
.header-credit-pill:hover { background: rgba(15, 118, 110, .16); border-color: rgba(15, 118, 110, .32); }
.header-account-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #0d9488 48%, #2563eb);
  color: #ffffff;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(15, 118, 110, .24);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.header-account-button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(15, 118, 110, .3); filter: saturate(1.08); }
.account-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 45;
  width: 300px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--rail);
  border-radius: 14px;
  box-shadow: 0 28px 64px rgba(16,24,32,.34), 0 0 0 1px rgba(255,255,255,.06);
  padding: 16px;
}
.account-panel { display: grid; gap: 12px; }

/* -- hamburger button (hidden on desktop) -- */
.header-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  cursor: pointer;
  padding: 0;
  transition: transform .15s ease, box-shadow .15s ease;
}
.header-hamburger:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(15, 23, 42, .12); }
.header-hamburger span { display: block; width: 18px; height: 2px; background: var(--accent-dark); border-radius: 2px; }

/* -- mobile nav drawer -- */
.nav-drawer-backdrop { position: fixed !important; inset: 0; background: rgba(10,14,18,.5); z-index: 48; }
.nav-drawer {
  position: fixed !important;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: var(--rail);
  color: #eef5f4;
  z-index: 49;
  padding: 22px 16px;
  display: grid !important;
  gap: 18px;
  align-content: start;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-links.nav { display: grid; gap: 6px; }
.nav-drawer-links.utility { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); }
.nav-drawer-links.utility a.nav-item { display: block; text-decoration: none; }

@media (max-width: 900px) {
  .site-header-nav,
  .site-header-account,
  .site-header .site-header-nav,
  .site-header .site-header-account { display: none !important; }
  .header-hamburger { display: flex !important; }
  .site-header,
  .app-shell .site-header { grid-template-columns: 1fr auto !important; }
  .workspace { padding: 16px; }
}

/* -- compress workspace: numbered step layout -- */
.compress-steps { display: grid; gap: 20px; }
.compress-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start; }
.compress-step-badge {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #0d9488 48%, #2563eb);
  box-shadow: 0 10px 20px rgba(15, 118, 110, .28);
  color: #ffffff;
  font-weight: 900;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compress-step-body { display: grid; gap: 16px; min-width: 0; }
.compress-step-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); display: grid; gap: 16px; }
@media (max-width: 760px) {
  .compress-step-grid { grid-template-columns: 1fr; }
  .compress-step { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
  .compress-step-badge { width: 26px; height: 26px; font-size: 12px; }
}

/* -- hero interactive compression demo -- */
.compression-demo { display: grid; gap: 12px; padding: 20px; background: #16212c; color: white; min-width: 0; }
.compression-demo-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.compression-demo-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #e5edf2;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.compression-demo-upload-label:hover { background: rgba(255, 255, 255, .16); }
.compression-demo-upload-label:focus-within { outline: 2px solid #7dd3c7; outline-offset: 2px; }
.compression-demo-upload-error { font-size: 12px; color: #ff9d9d; font-weight: 600; }
.compression-demo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #1b2c3b;
}
.compression-demo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.compression-demo-clip { position: absolute; inset: 0; }
.compression-demo-tag {
  position: absolute;
  bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(0,0,0,.5);
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 1;
}
.compression-demo-tag.left { left: 12px; }
.compression-demo-tag.right { right: 12px; }
.compression-demo-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  transform: translateX(-1px);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compression-demo-handle span {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
  color: #16212c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.compression-demo-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compression-demo-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.compression-demo-stats .label { color: #9fb3c4; }
.compression-demo-stats strong { font-size: 16px; }
.compression-demo-note { margin: 0; font-size: 12px; color: #9fb3c4; }
.compression-demo-note a { color: #7dd3c7; font-weight: 700; }

/* -- live upload/processing note (real speed + ticking ETA) -- */
.job-live-note { color: var(--accent-dark); font-weight: 700; font-variant-numeric: tabular-nums; }

/* -- accessibility (WCAG 2.1 AA remediation, 2026-07-13 audit) -- */
/* Visually-hidden but exposed to screen readers (job status live region). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
/* Contrast: card sub-text failed 4.5:1 on the active (light-teal) card bg. */
.dropzone small, .profile-card small, .format-card small, .tool-card small, .quality-card small { color: #4b5563; }
/* Contrast: .subtle (#a9b8c0) is for the dark footer/rail; on white panels it
   was 2.04:1 — darken only within light .panel contexts, leave dark ones. */
.panel .subtle { color: #5b6675; }
/* Ensure a visible focus ring on the custom radio-style selection cards. */
.format-card:focus-visible, .quality-card:focus-visible, .profile-card:focus-visible,
.preview-mode-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* -- GDPR consent banner -- */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--rail); color: #eef5f4;
  box-shadow: 0 -8px 30px rgba(16,24,32,.28);
  border-top: 2px solid var(--accent);
}
.consent-banner-inner {
  max-width: 1180px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.consent-copy { flex: 1 1 420px; min-width: 0; }
.consent-copy strong { display: block; font-size: 14px; margin-bottom: 2px; }
.consent-copy p { margin: 0; font-size: 13px; line-height: 1.5; color: #c9d6d4; }
.consent-link { background: none; border: 0; padding: 0; color: #7dd3c7; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.consent-actions .secondary-button, .consent-actions .primary-button { margin-top: 0; min-width: 150px; }
.consent-accept { width: auto; }
@media (max-width: 640px) {
  .consent-actions { width: 100%; }
  .consent-actions .secondary-button, .consent-actions .primary-button { flex: 1 1 0; min-width: 0; }
}
/* Footer cookie-settings + brand actions */
.footer-brand-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; opacity: .85; }
.footer-link-button:hover { opacity: 1; }

/* -- account data rights (GDPR export/erasure) -- */
.account-data-rights { display: grid; gap: 14px; }
.data-rights-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.data-rights-delete { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.data-rights-delete label { display: grid; gap: 6px; }
.data-rights-delete input { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 180px; }
.data-rights-delete .secondary-button { margin-top: 0; }

/* Wave 1: styles for classes added by the audit implementation pass */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent-dark, #0f766e);
  color: #fff;
  font-weight: 900;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }
.nav-drawer-close {
  align-self: flex-end;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: transparent;
  color: #eef5f4;
  font-weight: 800;
  cursor: pointer;
}
.nav-drawer-close:hover { background: rgba(255,255,255,.08); }
.visual-preview-hint { margin-top: 12px; font-size: 13px; color: var(--muted); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 24px; padding-top: 16px; }
.footer-trust, .footer-copyright { color: #a9b8c0; font-size: 13px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* -- Tool-page embed width fix (2026-07-25) --
   Every generated per-tool static page (public/tools/<slug>/index.html,
   ~500 tools x locales) ships its own inline <style> block that caps
   .tool-page-inner (the wrapper around the hero, the live compressor embed,
   and the body copy) at 1120px (a handful at 1160px). That inline block loads
   after this stylesheet in each page's <head>, so it wins the cascade tie and
   the whole page — including the working compressor iframe — only fills
   ~55-70% of a typical 1440-1920px desktop viewport, wasting the rest as dead
   margin either side. Overriding the single shared value here (rather than
   hand-editing ~7,800 generated HTML files, which `npm run build`'s
   seo:apply/sanitize:tool-pages steps can regenerate anyway) fixes every tool
   page at once. Mobile is unaffected: viewports under 1280px never hit the cap. */
.tool-page-inner { max-width: 1280px !important; }

/* Icon enhancement pass (2026-07-27): real lucide icons (src/icon-data.mjs)
   added to nav, step headings, badges, dropzone, and footer groups. Generic
   sizing + explicit inline-flex row layout on the handful of text parents
   that now hold an icon + label instead of plain text. */
.cv-icon { flex-shrink: 0; }
.site-header-nav button,
.nav-drawer-links.nav .nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.panel-header h3,
.adjust-disclosure-summary-inner strong,
.footer-group h4,
.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.drop-icon { color: white; }
.tool-page-hero h1 { display: inline-flex; align-items: center; gap: 10px; }
.tool-icon { flex-shrink: 0; color: var(--accent, #0f766e); }
