/* ViewerPix Clean Tool-First UI v2
   Visual direction: compact utility-first pages, neutral surfaces, one primary action color,
   immediate tool visibility, and low-noise SEO content below the working area. */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #2563eb;
  --accent-2: #eff6ff;
  --danger: #b91c1c;
  --shadow: none;
  --radius: 12px;
}

html { background: #fff; }
body {
  background: #fff;
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-shell { width: min(1120px, calc(100% - 32px)); }
main { padding-bottom: 12px; }

/* Header: compact, product-like, no oversized navigation chrome. */
.site-header {
  min-height: 60px;
  height: 60px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand { gap: 8px; font-size: 15px; font-weight: 780; letter-spacing: -.02em; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  font-size: 10px;
  box-shadow: none;
}
.header-actions { gap: 8px; min-width: 0; }
.main-nav { gap: 2px; min-width: 0; }
.main-nav a {
  padding: 7px 9px;
  border-radius: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.main-nav a:hover { background: #f8fafc; color: #0f172a; }
.language-control select {
  height: 32px;
  border-radius: 7px;
  border-color: var(--line);
  padding-left: 9px;
  font-size: 12px;
  font-weight: 600;
}

/* Typography: remove the large AI-landing-page treatment. */
.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.home-hero {
  max-width: 820px;
  padding: 36px 0 22px;
}
.home-hero h1,
.tool-hero h1 {
  letter-spacing: -.035em;
  line-height: 1.08;
}
.home-hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(32px, 4vw, 44px);
}
.home-hero p {
  max-width: 740px;
  font-size: 15px;
  line-height: 1.6;
}
.compact-hero {
  max-width: 860px;
  margin: 0;
  padding: 26px 0 14px;
  text-align: left;
}
.compact-hero h1 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 4vw, 40px);
}
.compact-hero p {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.55;
}
.format-line {
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 7px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}
.breadcrumbs { margin: 12px 0 0; font-size: 11px; }

/* Home: six compact utilities, no giant fake product illustrations. */
.primary-tool-grid,
.primary-tool-grid.converter-grid,
.primary-tool-grid.converter-grid.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.primary-tool-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.primary-tool-card:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  background: #fbfdff;
  box-shadow: none;
}
.tool-visual { display: none !important; }
.tool-card-copy { padding: 18px 18px 16px; }
.tool-kicker {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
}
.tool-card-copy h2 {
  margin: 6px 0 6px;
  font-size: 18px;
  letter-spacing: -.02em;
}
.tool-card-copy p {
  min-height: 40px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.tool-card-copy strong {
  margin-top: 11px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.format-section {
  margin: 32px 0 18px;
  grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: center;
}
.format-section h2 { margin-top: 6px; font-size: 20px; line-height: 1.25; }
.format-links { gap: 6px; }
.format-links a {
  padding: 7px 10px;
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  font-weight: 650;
}
.format-links a:hover { border-color: #bfdbfe; color: var(--accent); }
.privacy-strip {
  margin: 18px 0 32px;
  padding: 11px 13px;
  border-color: #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  color: #475569;
  font-size: 11px;
}
.privacy-strip strong { color: #1e3a8a; }

/* Tool surface: the working area is the visual focus. */
.tool-card {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
}
.dropzone {
  min-height: 176px;
  margin: 14px;
  gap: 7px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  background: #fbfdff;
}
.dropzone:hover,
.dropzone:focus,
.dropzone.is-dragging {
  border-color: #60a5fa;
  background: #f8fbff;
}
.drop-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1px;
  border-radius: 9px;
  background: var(--accent-2);
  color: var(--accent);
  font-size: 20px;
}
.dropzone strong { font-size: 14px; font-weight: 720; }
.dropzone > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.dropzone small {
  max-width: 720px;
  margin-top: 1px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.4;
}
.primary-button,
.secondary-button,
.text-button,
.small-button,
.icon-button,
.merge-add-slot {
  border-radius: 7px;
  box-shadow: none !important;
}
.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.primary-button:hover { background: #1d4ed8; border-color: #1d4ed8; }
.secondary-button { border-color: var(--line-strong); background: #fff; }
.secondary-button:hover { border-color: #93c5fd; color: #1d4ed8; }
.text-button { color: var(--accent); }

/* Pre-upload merge should feel like a utility, not a poster. */
.merge-slot-uploader {
  padding: 14px;
  border-radius: 11px;
  box-shadow: none;
}
.merge-slot-grid { gap: 10px; }
.merge-upload-slot {
  min-height: 168px;
  padding: 14px;
  border-radius: 9px;
  background: #fbfdff;
}
.merge-upload-slot:hover { transform: none; border-color: #60a5fa; background: #f8fbff; }
.merge-slot-label { left: 9px; top: 9px; padding: 4px 7px; border-radius: 6px; font-size: 9px; }
.merge-slot-plus { width: 36px; height: 36px; border-radius: 9px; font-size: 19px; color: var(--accent); }
.merge-slot-actions { margin-top: 10px; }
.merge-slot-hint { margin-top: 7px; }

/* Working UIs: flatter borders and tighter controls. */
.viewer-app,
.merge-editor,
.converter-app,
.metadata-app,
.editor-app,
.compressor-app { box-shadow: none; }
.viewer-toolbar button,
.segmented-control,
.converter-pane-head select,
.metadata-search-wrap input,
.editor-field input,
.editor-controls select,
.compressor-side select,
.inline-controls select {
  border-radius: 7px;
}
.segmented-control { border-color: var(--line); background: #f8fafc; }
.segmented-control button { border-radius: 5px; }
.segmented-control button.is-active { box-shadow: none; color: #1d4ed8; }
.converter-flow-arrow span { box-shadow: none; border-radius: 9px; }
.converter-flow-item,
.metadata-group,
.metadata-raw-section,
.metadata-preview-wrap,
.compressor-item {
  border-radius: 9px;
}
.converter-pane-head,
.preview-heading,
.panel-heading,
.editor-preview-head,
.compressor-head { min-height: 48px; height: 48px; }

/* Supporting product copy: editorial sections, not stacked AI cards. */
.content-grid {
  gap: 0;
  margin: 28px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.content-grid article {
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.content-grid article:last-child { border-right: 0; }
.content-grid h2 { margin-bottom: 5px; font-size: 14px; }
.content-grid p { font-size: 12px; line-height: 1.55; }

.seo-how,
.seo-intent,
.seo-faq,
.seo-privacy {
  margin-top: 30px;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.seo-how h2,
.seo-intent h2,
.seo-faq h2,
.seo-privacy h2 {
  margin-bottom: 14px;
  font-size: 19px;
  letter-spacing: -.02em;
}
.seo-how p,
.seo-intent p,
.seo-faq p,
.seo-privacy p { line-height: 1.6; }
.seo-steps { gap: 10px; }
.seo-steps li {
  padding: 13px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.seo-steps li > span {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 10px;
}
.seo-steps h3,
.seo-note h3,
.seo-faq h3 { font-size: 13px; }
.seo-steps p,
.seo-note p,
.seo-faq p { font-size: 12px; }
.seo-notes { gap: 10px; }
.seo-note {
  padding: 14px;
  border-radius: 8px;
  background: #fafafa;
}
.seo-faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.seo-faq article { padding: 14px 0; border-top: 1px solid var(--line); }
.seo-privacy { background: transparent; }
.related-tools { margin: 34px 0 42px; }
.related-tools h2 { margin-bottom: 10px; font-size: 17px; }
.tool-link-grid { gap: 7px; }
.tool-link-grid a {
  padding: 11px 12px;
  border-radius: 8px;
  background: #fff;
}
.tool-link-grid a:hover { border-color: #bfdbfe; background: #fbfdff; }
.tool-link-grid strong { font-size: 12px; }
.tool-link-grid span { margin-top: 3px; font-size: 10px; }

.site-footer {
  min-height: 64px;
  border-top-color: var(--line);
  font-size: 11px;
}
.footer-links { gap: 12px; }

@media (max-width: 900px) {
  .primary-tool-grid,
  .primary-tool-grid.converter-grid,
  .primary-tool-grid.converter-grid.metadata-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .format-section { grid-template-columns: 1fr; gap: 12px; }
  .content-grid { grid-template-columns: 1fr; }
  .content-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .content-grid article:last-child { border-bottom: 0; }
  .seo-faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .page-shell { width: min(100% - 20px, 1120px); }
  .site-header {
    height: auto;
    min-height: 58px;
    padding: 10px 0;
    align-items: flex-start;
  }
  .header-actions { max-width: 78%; gap: 5px; }
  .main-nav a { padding: 5px 6px; font-size: 10px; }
  .language-control select { height: 28px; max-width: 150px; font-size: 10px; }
  .home-hero { padding: 26px 0 16px; }
  .home-hero h1 { font-size: 31px; }
  .compact-hero { padding: 20px 0 11px; }
  .compact-hero h1 { font-size: 29px; }
  .compact-hero p { font-size: 13px; }
  .primary-tool-grid,
  .primary-tool-grid.converter-grid,
  .primary-tool-grid.converter-grid.metadata-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tool-card-copy { padding: 14px; }
  .tool-card-copy h2 { font-size: 16px; }
  .tool-card-copy p { min-height: 0; font-size: 11px; }
  .dropzone { min-height: 150px; margin: 10px; }
  .merge-slot-uploader { padding: 10px; }
  .merge-upload-slot { min-height: 142px; }
  .seo-how,.seo-intent,.seo-faq,.seo-privacy { margin-top: 24px; padding-top: 18px; }
  .seo-how h2,.seo-intent h2,.seo-faq h2,.seo-privacy h2 { font-size: 17px; }
}

@media (max-width: 480px) {
  .primary-tool-grid,
  .primary-tool-grid.converter-grid,
  .primary-tool-grid.converter-grid.metadata-grid { grid-template-columns: 1fr; }
  .home-hero h1 { font-size: 29px; }
  .compact-hero h1 { font-size: 27px; }
  .format-line { max-width: 100%; overflow-x: auto; white-space: nowrap; }
  .tool-link-grid { grid-template-columns: 1fr 1fr; }
}
