:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #eef2f5;
  --surface-strong: #dfe7ec;
  --text: #17181c;
  --muted: #616b76;
  --border: #d6dde4;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --blue: #4f46e5;
  --blue-soft: rgba(79, 70, 229, 0.12);
  --orange: #ea580c;
  --success: #14803f;
  --success-soft: rgba(20, 128, 63, 0.12);
  --danger: #c2410c;
  --danger-soft: rgba(194, 65, 12, 0.12);
  --shadow: 0 18px 50px rgba(20, 28, 38, 0.10);
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101316;
    --surface: #171b20;
    --surface-soft: #20262c;
    --surface-strong: #2b333a;
    --text: #f7f8fa;
    --muted: #a8b0ba;
    --border: #313a43;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: rgba(45, 212, 191, 0.14);
    --blue: #818cf8;
    --blue-soft: rgba(129, 140, 248, 0.15);
    --orange: #fb923c;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.13);
    --danger: #fb923c;
    --danger-soft: rgba(251, 146, 60, 0.14);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(2rem, 5vw, 3.65rem);
  line-height: 1.03;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

h3 {
  font-size: 1rem;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.18em;
  height: 1.18em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.22);
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
}

.tool-tabs {
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(520px, 100%);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(20, 28, 38, 0.08);
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.tool-tab.is-active {
  background: var(--accent);
  color: #ffffff;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.lang-button {
  min-width: 42px;
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
}

.lang-button.is-active {
  background: var(--blue);
  color: #ffffff;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
  align-items: end;
  gap: 26px;
  min-height: 210px;
  padding: 24px 0 18px;
}

.eyebrow,
.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.eyebrow {
  margin-bottom: 14px;
}

.eyebrow .icon,
.privacy-pill .icon {
  color: var(--accent);
}

.lead {
  max-width: 720px;
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.58;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.quick-stats span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
  box-shadow: 0 12px 30px rgba(20, 28, 38, 0.06);
}

.quick-stats span:nth-child(2n) {
  color: var(--accent-strong);
}

.quick-stats span:nth-child(3n) {
  color: var(--blue);
}

.quick-stats span:nth-child(5n) {
  color: var(--orange);
}

.tool-panel {
  display: none;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-panel.is-active {
  display: block;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-heading p:not(.section-kicker) {
  max-width: 720px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.section-kicker {
  margin-bottom: 6px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 430px);
  gap: 16px;
  align-items: stretch;
}

.drop-card,
.control-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.drop-zone {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  min-height: 220px;
  padding: 22px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-card.has-file .drop-zone {
  min-height: 86px;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  text-align: left;
}

.drop-card.has-file .drop-zone .drop-icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.drop-zone strong {
  font-size: 1.12rem;
}

.drop-zone span:not(.drop-icon) {
  max-width: 380px;
  color: var(--muted);
  line-height: 1.45;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 1.8rem;
}

.fine-print {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.control-panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.loaded-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.loaded-thumb {
  display: grid;
  place-items: center;
  width: 96px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
}

.loaded-thumb img,
.loaded-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loaded-thumb audio {
  width: 100%;
}

.loaded-label {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.loaded-preview strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}

.loaded-preview small,
.simple-control small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

#qualityValue,
#resizeValue {
  display: none;
}

.simple-control {
  display: grid;
  gap: 10px;
}

.control-heading {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 850;
}

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

.preset-button {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.preset-button strong {
  font-size: 0.95rem;
}

.preset-button span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
}

.preset-button.is-selected,
.segmented-buttons button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.preset-button.is-selected span {
  color: rgba(255, 255, 255, 0.84);
}

.segmented-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
}

.segmented-buttons button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
}

.field {
  display: grid;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field strong {
  color: var(--text);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

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

.button-row .primary-button:last-child:nth-child(3) {
  grid-column: span 2;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  font-weight: 850;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.status-line {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.message-box {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, transparent);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 800;
  line-height: 1.42;
}

.workspace {
  margin-top: 16px;
}

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

.preview-pane,
.results-panel,
.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.preview-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(45deg, var(--surface-soft) 25%, transparent 25%),
    linear-gradient(-45deg, var(--surface-soft) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--surface-soft) 75%),
    linear-gradient(-45deg, transparent 75%, var(--surface-soft) 75%);
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.preview-frame img,
.preview-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-meta {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.preview-meta span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 750;
}

.saving-badge {
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 900;
}

.saving-badge.is-warn {
  background: var(--danger-soft);
  color: var(--danger);
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.results-heading span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.results-list {
  display: grid;
}

.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.result-row:last-child {
  border-bottom: 0;
}

.result-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.result-size {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.step {
  display: grid;
  place-items: center;
  min-height: 70px;
  padding: 8px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 850;
}

.step b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 5px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.step.is-active,
.step.is-done {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: var(--accent-soft);
  color: var(--text);
}

.step.is-active b {
  background: var(--accent);
  color: #ffffff;
}

.step.is-done b {
  background: var(--success-soft);
  color: var(--success);
}

.file-details,
.result-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.file-details div,
.result-card div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.file-details span,
.result-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.file-details strong,
.result-card strong {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.format-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  min-height: 52px;
}

.format-option,
.empty-format {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
}

.format-option {
  cursor: pointer;
}

.format-option.is-selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.empty-format {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  padding: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.35;
}

.progress-panel {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.result-card {
  margin-top: 16px;
  border-color: color-mix(in srgb, var(--success) 42%, var(--border));
  background: var(--success-soft);
}

.seo-section,
.answer-section {
  margin-top: 18px;
  padding: 24px 0 4px;
}

.seo-section h2,
.answer-section h2 {
  max-width: 760px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.seo-grid article {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.seo-grid p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.52;
}

.section-header {
  display: grid;
  gap: 8px;
  max-width: 860px;
}

.section-header p:not(.section-kicker) {
  color: var(--muted);
  line-height: 1.62;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.answer-card,
.content-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.answer-card p,
.content-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.faq-list summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 850;
}

.faq-list p {
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.55;
}

.resource-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.resource-links a,
.content-nav a,
.footer-nav a {
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 850;
}

.resource-links a {
  display: grid;
  align-items: center;
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.resource-links a:hover,
.content-nav a:hover,
.footer-nav a:hover {
  color: var(--accent-strong);
}

.footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.45;
}

.footer-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer .icon {
  color: var(--accent);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
}

.footer-nav a {
  color: var(--muted);
}

.content-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.content-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 0;
}

.content-nav a {
  color: var(--muted);
}

.content-nav .brand-link {
  margin-right: auto;
  color: var(--text);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.content-hero {
  display: grid;
  gap: 14px;
  padding: 30px 0 20px;
}

.content-hero h1 {
  max-width: 860px;
}

.content-hero p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.content-main {
  display: grid;
  gap: 18px;
}

.content-section {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.content-section p,
.content-section li {
  color: var(--muted);
  line-height: 1.65;
}

.content-section ul,
.content-section ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.content-section a {
  color: var(--accent-strong);
  font-weight: 850;
}

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

.entity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.entity-list li {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
}

.cta-band a {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 900;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .tool-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
  }

  .intro-band,
  .tool-grid,
  .preview-grid,
  .seo-grid,
  .answer-grid,
  .resource-links,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .intro-band {
    align-items: start;
    min-height: 0;
    padding-top: 22px;
  }

  .quick-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 22px, 620px);
    padding-top: 10px;
  }

  .topbar {
    position: static;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-copy span {
    display: none;
  }

  .tool-tab {
    min-height: 46px;
    font-size: 0.82rem;
  }

  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-heading {
    display: grid;
  }

  .tool-panel {
    padding: 14px;
  }

  .drop-zone {
    min-height: 220px;
    padding: 18px 12px;
  }

  .button-row,
  .file-details,
  .result-card,
  .stepper,
  .preset-grid {
    grid-template-columns: 1fr;
  }

  .loaded-preview {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .loaded-thumb {
    width: 72px;
    height: 58px;
  }

  .button-row .primary-button:last-child:nth-child(3) {
    grid-column: auto;
  }

  .result-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .content-shell {
    width: min(100% - 22px, 620px);
    padding-top: 10px;
  }

  .content-nav .brand-link {
    width: 100%;
  }
}
