:root {
  --action-fill: #ad3643;
  --action-hover: #912c37;
  --focus-ring: #4b36a2;
  --quiet-border: #dfdce4;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.site-header { gap: 16px; }
.site-header:has(.hub-nav) .privacy-pill { display: none; }
.hub-nav { margin-inline-start: auto; }
.hub-nav a {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 750;
}
.hub-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.button:not(:disabled) {
  background: var(--action-fill);
  color: #fff;
  box-shadow: none;
}
.button:not(:disabled):hover { background: var(--action-hover); }

.home-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: calc(100svh - 78px);
  gap: 48px;
  padding-block: 44px 68px;
}
.home-hero::after { content: none; }
.page:has(.home-hero)::before { content: none; }
.home-copy h1, .home-hero.has-smart-result .home-copy h1 {
  font-size: 66px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.home-copy h1 .gradient-word {
  color: var(--action-fill);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.home-copy .lead, .home-hero.has-smart-result .home-copy .lead {
  max-width: 42ch;
  font-size: 19px;
  line-height: 1.5;
}
.home-hero.has-smart-result { min-height: 0; padding-block: 32px 48px; }
.smart-panel {
  min-width: 0;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--quiet-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 42px rgb(26 31 61 / 8%);
  backdrop-filter: none;
}
.smart-panel .smart-upload {
  width: 100%;
  min-height: 208px;
  padding: 18px 12px;
  border-radius: 8px;
  border-color: #c19398;
  background: #fff7f6;
  color: var(--ink);
  font: inherit;
  text-align: center;
}
.smart-panel .smart-upload:hover, .smart-panel .smart-upload.is-dragging {
  background: #ffedeb;
  border-color: var(--action-fill);
  transform: none;
}
.smart-upload > .smart-upload-content { max-width: none; margin: 0; }
.smart-upload strong { font-size: 23px; color: var(--ink); }
.smart-upload svg { background: var(--action-fill); box-shadow: none; border-radius: 8px; }
.smart-formats { margin: 0; color: var(--muted); text-align: center; font-size: 14px; }
.smart-panel > .google-drive-button { width: auto; justify-self: center; margin: 0; min-height: 44px; }
.smart-panel.has-file .smart-formats { display: none; }
.smart-panel .smart-upload.is-compact {
  min-height: 44px;
  padding: 8px 12px;
  border-style: solid;
  border-color: var(--quiet-border);
  background: #fff;
}
.smart-upload.is-compact .smart-upload-content { display: flex; align-items: center; gap: 8px; }
.smart-upload.is-compact strong { margin: 0; font-size: 14px; }
.smart-upload.is-compact svg { width: 24px; height: 24px; padding: 3px; border-radius: 4px; }
.smart-upload.is-compact #smart-file-hint { display: none; }
.smart-file-card {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 0;
  border-radius: 0;
  padding: 4px 0 12px;
  background: none;
  box-shadow: none;
}
.smart-file-preview {
  min-height: 0;
  width: 72px;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  box-shadow: none;
}
.smart-file-preview > span { padding: 0; border: 0; background: transparent; font-size: 13px; }
.smart-file-preview canvas, .smart-file-preview img { width: 100%; height: 100%; object-fit: contain; }
.smart-file-preview small { display: none; }
.smart-file-main h2 { margin: 0 0 4px; font-size: 20px; }
.smart-file-main p { margin: 0 0 6px; }
.smart-file-meta span {
  max-width: 100%;
  flex: 0 1 auto;
  padding: 3px 6px;
  border-radius: 4px;
  overflow-wrap: anywhere;
  text-align: start;
}
.smart-file-main .smart-handoff-status:empty { display: none; }
.smart-file-main .smart-handoff-status { margin-top: 10px; }
.smart-handoff-status a { text-decoration: underline; }
.suggestion-group h3 { text-transform: none; font-size: 14px; }
.suggestion-card, .suggestion-card.is-recommended {
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--quiet-border);
  border-radius: 8px;
  box-shadow: none;
  background: #fff;
}
.suggestion-card.is-recommended { border-color: #e4b8ba; background: #fff8f7; }
.suggestion-card:hover { border-color: var(--action-fill); }
.suggestion-card svg { width: 36px; height: 36px; padding: 8px; border-radius: 6px; }
.suggestion-card p { margin: 0; overflow-wrap: anywhere; }
.suggestion-card .suggestion-arrow, .tool-arrow { margin: 0; color: var(--action-fill); }
.smart-more summary { cursor: pointer; padding-block: 10px; font-weight: 750; }
.smart-more .suggestion-group + .suggestion-group { margin-top: 14px; }

.tool-section { margin: 0 auto; padding-block: 34px 16px; scroll-margin-top: 12px; }
.tool-section .section-heading h2 { font-size: 32px; line-height: 1.2; }
.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-block: 18px 28px;
}
.catalog-controls[hidden], .catalog-group[hidden], .tool-card[hidden], .catalog-empty[hidden] { display: none; }
.catalog-search { position: relative; display: flex; flex: 1 1 240px; max-width: 400px; min-width: 0; }
.catalog-search svg { position: absolute; top: 13px; inset-inline-start: 12px; width: 20px; height: 20px; pointer-events: none; }
.catalog-search input {
  width: 100%;
  min-height: 46px;
  padding-inline: 40px 12px;
  border: 1px solid #aaa5b5;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.catalog-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-filters button {
  min-height: 44px;
  padding-inline: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.catalog-filters button:hover { background: #fff; }
.catalog-filters [aria-pressed="true"] { background: #fff0ee; border-color: #dbabae; color: var(--action-hover); }
.catalog-group + .catalog-group { margin-top: 28px; }
.catalog-group > h3 { margin: 0 0 12px; font-size: 20px; }
.catalog-group .tool-grid { gap: 10px; }
.catalog-group .tool-card {
  min-height: 96px;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-color: var(--quiet-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  overflow-wrap: anywhere;
}
.catalog-group .tool-card:hover { border-color: var(--action-fill); }
.catalog-group .tool-card h3 { margin: 0 0 4px; font: inherit; font-weight: 800; }
.catalog-group .tool-card p { font-size: 14px; }
.catalog-group .tool-card svg { width: 40px; height: 40px; padding: 8px; border-radius: 6px; color: var(--action-hover); }
[data-tool-group="images"] .tool-card svg { background: #ece7fb; color: #5d449f; }
[data-tool-group="docs"] .tool-card svg { background: #fff1d0; color: #77531e; }
[data-tool-group="data"] .tool-card svg { background: #e2f5ef; color: #1b6b59; }
.catalog-empty { padding: 12px 0 24px; }
.data-editor-head label { font-weight: 800; }
.data-actions [hidden] { display: none; }
.data-hero { min-height: 0; grid-template-columns: minmax(0, 1fr); padding-block: 22px 0; }
.data-hero .hero-copy { max-width: 780px; }
.data-hero .hero-copy h1 { font-size: 48px; line-height: 1.12; }
.data-hero .gradient-word { display: inline; margin-inline-start: .2em; }
.data-hero :is(.eyebrow, .hero-art, .trust-row, .rating, .upload-box) { display: none; }
.data-hero + .data-workspace { margin-top: 24px; }
[data-converter-mode] .data-hero .upload-box:has(.google-drive-button) { display: flex; margin-top: 12px; }
[data-converter-mode] .data-hero .upload-box > .upload-button { display: none; }
.workspace-actions :is(button, a), .data-actions :is(button, a), .decision-actions button { min-height: 44px; }
.image-crop-stage {
  display: block;
  width: min(100%, var(--crop-preview-width), calc(64vh * var(--crop-ratio)), calc(620px * var(--crop-ratio)));
}
.image-crop-stage canvas { width: 100%; max-height: none; }
.image-crop-box { min-width: 0; min-height: 0; }

@media (max-width: 1180px) {
  .home-copy h1, .home-hero.has-smart-result .home-copy h1 { font-size: 54px; }
  .catalog-group .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 20px; padding-block: 22px 42px; }
  .home-copy h1, .home-hero.has-smart-result .home-copy h1 { font-size: 40px; }
  .home-copy .lead, .home-hero.has-smart-result .home-copy .lead { font-size: 17px; }
  .smart-panel .smart-upload:not(.is-compact) { min-height: 150px; }
  .home-hero.has-smart-result .home-copy { display: none; }
  .data-hero .hero-copy h1 { font-size: 34px; }
}
@media (max-width: 600px) {
  .site-header:has(.hub-nav) .header-actions { display: none; }
  .catalog-group .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-search { max-width: none; }
  .tool-section .section-heading h2 { font-size: 26px; }
  .catalog-group .tool-card { min-height: 78px; }
  .home-copy h1, .home-hero.has-smart-result .home-copy h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .smart-upload, .button { transition: none; }
}
