:root {
  color-scheme: dark;
  --background: #080b10;
  --surface: #0e141c;
  --surface-raised: #131b25;
  --surface-soft: #0b1017;
  --border: #24303e;
  --border-strong: #34465a;
  --text: #f4f7fb;
  --muted: #9aa8b8;
  --primary: #1684ff;
  --primary-hover: #3b98ff;
  --success: #50d69a;
  --danger: #ff7d83;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--background); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 82% -10%, rgb(22 132 255 / 0.16), transparent 31rem),
    var(--background);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgb(52 70 90 / 0.55);
  background: rgb(8 11 16 / 0.88);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.topbar-inner .brand {
  width: auto;
  margin: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-support-btn {
  display: flex;
  min-height: 48px;
  padding: 7px 13px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.topbar-support-btn:hover {
  border-color: #3f78b5;
  background: var(--surface-raised);
}

.support-btn-heart { font-size: 18px; }
.support-btn-content { display: grid; line-height: 1.25; }
.support-btn-title { font-size: 13px; font-weight: 750; }
.support-btn-sub { color: var(--muted); font-size: 10px; }

.brand {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.topbar-return {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  padding: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: all 180ms ease;
}
.topbar-return svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar-return:hover {
  color: #ffffff;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
}

.brand img { display: block; object-fit: contain; }
.brand span { display: grid; line-height: 1.2; }
.brand strong { font-size: 18px; letter-spacing: -0.025em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 82px) 0 80px;
}

.intro { max-width: 720px; margin-bottom: clamp(44px, 7vw, 76px); }
.section-label { margin: 0 0 10px; color: #72b6ff; font-size: 13px; font-weight: 700; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(2.25rem, 5vw, 4.75rem); line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
.intro > p:last-child, .tool-heading p { max-width: 62ch; margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); }

.section-heading, .results-heading, .workspace-header, .tool-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading { margin-bottom: 18px; }
.section-heading h2, .results-heading h2, .workspace-header h2 { margin: 0; font-size: 17px; }
.section-heading > span { color: var(--muted); font-size: 13px; }

.apps-grid { display: flex; flex-wrap: wrap; gap: 16px; }

.app-card {
  display: grid;
  width: min(100%, 380px);
  padding: 16px;
  grid-template-rows: auto auto auto;
  gap: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: inherit;
  background: var(--surface);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), border-color 180ms ease;
}

.app-card:hover { transform: translateY(-3px); border-color: #3f78b5; }
.app-card:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, .back-link:focus-visible { outline: 2px solid #69adff; outline-offset: 3px; }

.app-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  border-radius: 10px;
  background: #071936;
}

.app-copy { display: grid; gap: 5px; }
.app-copy strong { font-size: 19px; letter-spacing: -0.02em; }
.app-copy small { max-width: 44ch; color: var(--muted); font-size: 13px; }
.open-app { display: flex; align-items: center; justify-content: space-between; color: #81bdff; font-size: 13px; font-weight: 700; }
.open-app b { font-size: 18px; transition: transform 180ms ease; }
.app-card:hover .open-app b { transform: translateX(4px); }

.support-view { width: min(100%, 720px); margin: 0 auto; }
.support-page-card {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}
.support-page-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.support-page-heart {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-raised);
  font-size: 22px;
}
.support-page-heading h1 { margin-bottom: 8px; font-size: clamp(2rem, 4vw, 3rem); }
.support-page-heading p { max-width: 56ch; margin-bottom: 0; color: var(--muted); }
.stripe-section {
  display: flex;
  min-height: 180px;
  margin-top: 26px;
  padding: 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
stripe-buy-button { display: flex; width: 100%; justify-content: center; }
.stripe-payment-methods {
  display: block;
  width: min(24%, 140px);
  height: auto;
  object-fit: contain;
}
.credits-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.credits-section p { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.support-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #81bdff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.support-social-link:hover { text-decoration: underline; }

.back-link { display: inline-flex; margin-bottom: 32px; color: #8fc4ff; font-size: 13px; font-weight: 700; text-decoration: none; }
.tool-heading { align-items: center; margin-bottom: 32px; }
.tool-heading h1 { margin-bottom: 10px; font-size: clamp(2rem, 4vw, 3.5rem); }
.local-badge { display: inline-flex; min-width: max-content; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.local-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

.workspace, .results {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}
.workspace { padding: clamp(18px, 3vw, 28px); }
.workspace-header { align-items: center; margin-bottom: 16px; }
.workspace-header p, .results-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.text-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; color: var(--muted); font-size: 12px; }
.text-stats b { color: var(--text); font-variant-numeric: tabular-nums; }

textarea {
  display: block;
  width: 100%;
  min-height: 340px;
  padding: 18px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background: var(--surface-raised);
  line-height: 1.65;
}
textarea::placeholder { color: #8291a2; }
textarea:focus { border-color: #397fc9; }

.text-tools {
  display: grid;
  margin-top: 16px;
  padding: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-raised);
}
.text-tools h3 { margin: 0 0 13px; font-size: 14px; }
.replace-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
.replace-row input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: var(--surface-soft);
}
.replace-row input::placeholder { color: #8291a2; }
.replace-row input:focus { border-color: #397fc9; }
.replace-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: white;
  background: #237552;
  font-weight: 700;
  cursor: pointer;
}
.replace-button:hover { background: #2a8b61; }
.replace-button:disabled { cursor: not-allowed; opacity: 0.42; }

.format-tool { min-width: 0; }
.switch-control {
  position: relative;
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.switch-control > span {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #26303b;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.switch-control > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dce5ef;
  transition: transform 150ms ease;
}
.switch-control input:checked + span { border-color: #36d895; background: #36d895; }
.switch-control input:checked + span::after { transform: translateX(18px); background: #06110c; }
.switch-control input:focus-visible + span { outline: 2px solid #69adff; outline-offset: 3px; }
.switch-control strong { min-width: 0; font-size: 13px; font-weight: 600; }
.option-help { margin: 7px 0 0 52px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.controls { display: grid; margin-top: 16px; grid-template-columns: minmax(180px, 240px) 1fr auto; align-items: end; gap: 16px; }
.limit-field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.limit-field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: var(--surface-raised);
  font-variant-numeric: tabular-nums;
}
.limit-field input:focus { border-color: #397fc9; }
.estimate { margin: 0 0 11px; color: var(--muted); font-size: 12px; }
.estimate strong { color: var(--text); }
.control-actions { display: flex; gap: 10px; }

.primary-button, .secondary-button, .copy-button {
  min-height: 44px;
  padding: 0 17px;
  border-radius: 9px;
  color: var(--text);
  cursor: pointer;
}
.primary-button { border: 1px solid transparent; background: var(--primary); font-weight: 750; }
.primary-button:hover { background: var(--primary-hover); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.42; }
.secondary-button, .copy-button { border: 1px solid var(--border-strong); background: transparent; }
.secondary-button:hover, .copy-button:hover { border-color: #528bc4; color: #9dccff; }
.form-message { min-height: 21px; margin: 10px 0 -8px; color: var(--danger); font-size: 12px; }

.results { margin-top: 24px; padding: clamp(18px, 3vw, 28px); }
.results-heading { align-items: center; margin-bottom: 18px; }
.chunks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.chunk {
  display: grid;
  min-height: 220px;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.chunk-header { display: flex; padding: 14px 15px; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }
.chunk-header strong { font-size: 13px; }
.chunk-header span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chunk-text { margin: 0; padding: 15px; overflow-wrap: anywhere; color: #d7e0eb; font-size: 13px; white-space: pre-wrap; }
.copy-button { min-height: 38px; margin: 0 12px 12px; font-size: 12px; }

.transcription-workspace form { display: grid; gap: 16px; margin-top: 20px; }
.file-picker {
  display: grid;
  min-height: 132px;
  padding: 24px;
  place-content: center;
  gap: 6px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-raised);
  text-align: center;
  cursor: pointer;
}
.file-picker:hover { border-color: var(--border-strong); }
.file-picker:focus-within { outline: 0; }
.file-picker strong { color: #9dccff; font-size: 14px; }
.file-picker span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.media-preview { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #05080c; }
.media-preview[hidden], .media-preview video[hidden], .audio-preview[hidden] { display: none; }
.media-preview video { display: block; width: 100%; max-height: 420px; background: #05080c; object-fit: contain; }
.audio-preview { display: grid; min-height: 180px; padding: 24px; place-items: center; gap: 20px; }
.audio-preview > span { color: #54a7ff; font-size: 40px; font-weight: 800; letter-spacing: 0.08em; }
.audio-preview audio { width: min(100%, 620px); }
.source-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.source-divider::before, .source-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.url-field { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.url-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: var(--surface-raised);
}
.url-field input::placeholder { color: #8291a2; }
.url-field input:focus { border-color: #397fc9; }
.transcription-options { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); }
.model-help { margin-left: 52px; }
.transcription-submit { width: 100%; scroll-margin-top: 120px; }
.processing-progress-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.processing-progress-card[hidden] { display: none; }

.progress-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-card-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.progress-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.progress-stage-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-warning {
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.progress-percent {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(8, 11, 16, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1684ff 0%, #3894ff 50%, #50d69a 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(22, 132, 255, 0.4);
  transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1);
  animation: progress-shimmer 2.2s ease-in-out infinite;
}

@keyframes progress-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 200ms ease;
  min-width: 0;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all 200ms ease;
}

.step-badge svg {
  display: block;
}

.step-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 200ms ease;
}

.progress-step.is-active {
  border-color: rgba(22, 132, 255, 0.5);
  background: rgba(22, 132, 255, 0.08);
}

.progress-step.is-active .step-badge {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(22, 132, 255, 0.45);
}

.progress-step.is-active .step-name {
  color: var(--text);
  font-weight: 700;
}

.progress-step.is-completed {
  border-color: rgba(80, 214, 154, 0.35);
  background: rgba(80, 214, 154, 0.06);
}

.progress-step.is-completed .step-badge {
  background: var(--success);
  color: #080b10;
  border-color: var(--success);
}

.progress-step.is-completed .step-name {
  color: #d7e0eb;
}

@media (max-width: 640px) {
  .progress-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

.progress-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
.transcript-result pre {
  max-height: 560px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #d7e0eb;
  background: var(--surface-raised);
  font: 13px/1.7 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.media-splitter-workspace form { display: grid; gap: 16px; margin-top: 20px; }
.processing-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.processing-option { padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); }
.duration-controls, .silence-controls { display: grid; margin: 12px 0 0 52px; gap: 7px; transition: opacity 150ms ease; }
.duration-controls.is-disabled, .silence-controls.is-disabled { opacity: 0.4; }
.duration-controls > label, .silence-controls > label { color: var(--muted); font-size: 11px; font-weight: 700; }
.duration-controls > div { display: grid; grid-template-columns: minmax(80px, 1fr) 132px; gap: 8px; }
.silence-controls > div { display: flex; align-items: center; gap: 9px; }
.duration-controls input, .duration-controls select, .silence-controls input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: var(--surface-soft);
}
.duration-controls select {
  width: 132px;
  padding-right: 32px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d8e2ee' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.silence-controls input { width: 112px; }
.silence-controls span { color: var(--muted); font-size: 12px; }
.duration-controls input:focus, .duration-controls select:focus, .silence-controls input:focus { border-color: #397fc9; }
.media-splitter-submit { width: 100%; }
.media-files { display: grid; gap: 18px; margin-top: 14px; }
.media-file-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.18);
  transition: border-color 150ms ease;
}
.media-file-card:hover { border-color: var(--border-strong); }
.media-file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.media-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.media-file-title { font-size: 14px; font-weight: 700; color: var(--text); }
.media-file-meta {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.media-download-btn, .media-download-all {
  display: inline-flex;
  min-height: 36px;
  padding: 0 14px;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.media-download-all {
  margin-top: 10px;
  cursor: pointer;
}
.media-file-preview {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgb(255 255 255 / 0.05);
}
.media-part-video {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  background: #000;
}
.media-part-audio-wrap {
  padding: 12px 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
}
.media-part-audio {
  width: 100%;
  height: 38px;
}

@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  padding: 10px 14px;
  border-radius: 9px;
  color: #06120c;
  background: var(--success);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.is-visible { opacity: 1; transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (min-width: 760px) {
  .apps-grid .app-card { max-width: 520px; }
}

@media (max-width: 760px) {
  .brand, main { width: min(100% - 28px, 1180px); }
  .topbar .brand { min-height: 68px; }
  .tool-heading, .workspace-header, .results-heading { align-items: flex-start; flex-direction: column; }
  .text-stats { justify-content: flex-start; }
  .controls { grid-template-columns: 1fr; align-items: stretch; }
  .text-tools { grid-template-columns: 1fr; gap: 22px; }
  .processing-options { grid-template-columns: 1fr; }
  .replace-row { grid-template-columns: 1fr; }
  .estimate { margin: 0; }
  .control-actions { display: grid; grid-template-columns: 1fr 1fr; }
  textarea { min-height: 280px; }
  .topbar-inner { width: min(100% - 28px, 1180px); }
  .support-btn-sub { display: none; }
  .topbar-support-btn { min-height: 42px; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
