:root {
  color-scheme: light;
  --ink: #14212f;
  --muted: #5c6878;
  --line: #d8e2ea;
  --paper: #ffffff;
  --soft: #f2f6f8;
  --navy: #12324a;
  --teal: #0f8d80;
  --cyan: #1aa6d9;
  --gold: #d09b24;
  --coral: #d35c43;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(18, 50, 74, 0.12);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 26px);
  color: var(--muted);
  font-weight: 800;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--teal);
}

.auth-nav-link,
.auth-nav-button,
.auth-nav-logout {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 12px;
  white-space: nowrap;
}

.auth-nav-button {
  background: var(--teal);
  color: white;
}

.auth-nav-button:hover {
  color: white;
  background: #0b786f;
}

.auth-nav-logout {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-nav-logout:hover {
  color: var(--teal);
}

.auth-nav-link[hidden],
.auth-nav-button[hidden],
.auth-nav-logout[hidden],
.auth-card[hidden],
.auth-form-grid[hidden] {
  display: none;
}

.language-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--navy);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.tool-hero {
  min-height: calc(100vh - 72px);
  padding: clamp(8px, 1.4vw, 18px) clamp(18px, 2.4vw, 34px) clamp(18px, 2.6vw, 34px);
  background:
    linear-gradient(140deg, rgba(18, 50, 74, 0.94), rgba(15, 141, 128, 0.78)),
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.18), transparent 32%),
    #12324a;
}

.hero-grid {
  width: min(1480px, 100%);
  min-height: auto;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
}

.converter-panel,
.app-promo,
.affiliate-panel {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 70px rgba(7, 22, 36, 0.24);
}

.converter-panel {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(268px, 0.75fr);
  grid-template-areas:
    "eyebrow eyebrow"
    "title actions"
    "copy actions"
    "drop account"
    "drop quality"
    "drop status"
    "drop download"
    "pricing pricing"
    "pricing-note pricing-note"
    "comparison comparison"
    "samples samples";
  column-gap: 16px;
  row-gap: 6px;
  align-items: start;
  min-width: 0;
  padding: clamp(12px, 1.4vw, 18px);
}

body.is-authenticated .quality-selector {
  grid-area: account;
}

body.is-authenticated .account-panel {
  grid-area: quality;
}

.app-promo {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.affiliate-panel {
  position: sticky;
  top: 90px;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow: auto;
}

.eyebrow {
  grid-area: eyebrow;
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.converter-panel h1 {
  grid-area: title;
  margin: 0;
  width: 100%;
  color: var(--navy);
  font-size: clamp(26px, 2.1vw, 34px);
  line-height: 1.06;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-copy {
  grid-area: copy;
  width: min(760px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.25vw, 16px);
  line-height: 1.35;
}

.drop-zone {
  grid-area: drop;
  order: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  min-height: 0;
  padding: 10px 14px;
  margin-top: 0;
  border: 2px dashed rgba(15, 141, 128, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(26, 166, 217, 0.08), rgba(15, 141, 128, 0.1)),
    white;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.account-panel {
  grid-area: account;
  order: 2;
  display: grid;
  gap: 5px;
  align-items: start;
  margin-top: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.auth-summary {
  display: flex;
  align-items: center;
  min-height: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.small-button {
  min-height: 44px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: white;
  color: var(--teal);
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.ghost-button {
  border-color: var(--line);
  color: var(--muted);
}

.auth-panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.account-panel.is-logged-in {
  background: rgba(255, 255, 255, 0.95);
}

.credit-balance-card {
  display: grid;
  gap: 2px;
  padding: 2px 0 0;
}

.credit-balance-card[hidden] {
  display: none;
}

.credit-balance-card > span {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.65vw, 23px);
  line-height: 1;
}

.credit-balance-card dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.credit-balance-card dl div {
  display: grid;
  grid-template-columns: minmax(70px, auto) 1fr;
  gap: 10px;
  align-items: baseline;
}

.credit-balance-card dt,
.credit-balance-card dd {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.08;
}

.credit-balance-card dd {
  display: inline-flex;
  gap: 2px;
  white-space: nowrap;
}

.credit-balance-card strong {
  color: var(--ink);
  font: inherit;
  white-space: nowrap;
}

.auth-forms {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-mini-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.auth-mini-form.compact {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
}

.auth-mini-form strong {
  min-height: auto;
}

.auth-mini-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
}

.sandbox-badge {
  width: fit-content;
  border: 1px solid #f4b740;
  border-radius: 999px;
  background: #fff7df;
  color: #7a4d00;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.sandbox-badge[hidden] {
  display: none;
}

.auth-page-body {
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(18, 50, 74, 0.96), rgba(15, 141, 128, 0.76)),
    #12324a;
}

.auth-page {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: start center;
  padding: 18px clamp(18px, 4vw, 48px) 32px;
}

.auth-shell {
  width: min(920px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 70px rgba(7, 22, 36, 0.24);
  padding: clamp(18px, 3vw, 30px);
}

.auth-shell h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.06;
  letter-spacing: 0;
}

.auth-lead {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.auth-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--navy);
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-tab.is-active {
  border-color: var(--teal);
  background: #eaf8f7;
  color: var(--teal);
}

.auth-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 14px;
  align-items: start;
}

.auth-message {
  min-height: 20px;
  margin: 0 0 8px;
  color: var(--teal);
  font-weight: 900;
}

.auth-message.is-error {
  color: #b42318;
}

.auth-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px 18px 18px;
}

.auth-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.auth-card input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.auth-card button[type="submit"] {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  padding: 0 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.quality-selector {
  grid-area: quality;
  order: 2;
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4fbf9;
}

.quality-selector legend {
  margin: 0 0 2px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.quality-selector label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: start;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.quality-selector input {
  grid-row: 1 / span 2;
  margin-top: 4px;
  accent-color: var(--teal);
}

.quality-selector small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.quality-warning {
  margin: 2px 0 0;
  border-left: 3px solid var(--gold);
  color: #6a4b05;
  padding: 0 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.pricing-grid {
  grid-area: pricing;
  order: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
  scroll-margin-top: 112px;
}

.price-card {
  display: grid;
  gap: 3px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.price-card:hover {
  border-color: var(--teal);
  background: #f0faf8;
}

.price-card-featured {
  border-color: var(--teal);
  background: #f2fbf9;
}

.hq-purchase-card {
  cursor: default;
}

.price-card span {
  color: var(--navy);
  font-weight: 900;
}

.price-card strong {
  color: var(--teal);
  font-size: 20px;
}

.price-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.price-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.32;
}

.quantity-control {
  display: grid;
  gap: 5px;
  margin-top: 4px;
}

.quantity-control span {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.quantity-control input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--navy);
  font: inherit;
  font-weight: 900;
  padding: 8px 10px;
}

.quantity-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checkout-button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.checkout-button:hover {
  background: #087f74;
}

.pricing-note {
  grid-area: pricing-note;
  order: 5;
  margin: 0;
  border: 1px solid rgba(218, 164, 40, 0.45);
  border-radius: 8px;
  background: #fff8e4;
  color: #6a4b05;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.quality-comparison {
  grid-area: comparison;
  order: 6;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.quality-comparison h2 {
  margin: 0;
  padding: 16px 18px 8px;
  color: var(--navy);
  font-size: 20px;
}

.quality-comparison table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.quality-comparison th,
.quality-comparison td {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.quality-comparison th {
  color: var(--navy);
  background: #f3f8f8;
  font-weight: 900;
}

.quality-comparison td:first-child {
  width: 22%;
  color: var(--navy);
  font-weight: 900;
}

.samples-panel {
  grid-area: samples;
  order: 7;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
}

.samples-panel h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 20px;
}

.samples-panel > p:not(.eyebrow) {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

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

.sample-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
  padding: 10px;
}

.sample-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef4f7;
}

.sample-card h3 {
  margin: 10px 0 4px;
  color: var(--navy);
  font-size: 15px;
}

.sample-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sample-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.sample-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.sample-actions a:last-child {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.sample-note {
  margin-top: 12px !important;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  font-size: 12px;
}

.drop-zone:hover,
.drop-zone-active {
  border-color: var(--cyan);
  background: #edf9fb;
  transform: translateY(-1px);
}

.drop-zone-selected {
  border-color: var(--teal);
  background: #eaf8f2;
}

.drop-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(18, 50, 74, 0.22);
}

.drop-zone strong {
  color: var(--navy);
  font-size: clamp(21px, 2vw, 27px);
}

.drop-zone small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.drop-zone .drop-note {
  display: block;
  width: min(560px, calc(100% - 24px));
  color: #687483;
  font-size: 12px;
  line-height: 1.35;
}

.conversion-status {
  grid-area: status;
  order: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin-top: 0;
  color: var(--muted);
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(15, 141, 128, 0.12);
}

.hero-actions {
  grid-area: actions;
  order: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: start;
  gap: 10px;
  margin-top: 0;
}

.payment-logos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.payment-logo {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 4px 12px rgba(7, 22, 36, 0.08);
}

.visa-logo {
  color: #1434cb;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.amex-logo {
  background: #2e77bc;
  color: white;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.mastercard-logo {
  position: relative;
}

.mastercard-logo span {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.mastercard-logo span:first-child {
  left: 9px;
  background: #eb001b;
}

.mastercard-logo span:last-child {
  right: 9px;
  background: rgba(247, 158, 27, 0.9);
  mix-blend-mode: multiply;
}

.inline-file-button {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  padding: 0 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.inline-file-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--teal);
  color: white;
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button-secondary {
  background: #e9f2f5;
  color: var(--navy);
}

.download-link {
  grid-area: download;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  margin-top: 0;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
}

.download-link[hidden] {
  display: none;
}

.download-link.is-disabled {
  pointer-events: none;
  opacity: 0.65;
}

.app-promo,
.affiliate-panel {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.progress-panel {
  grid-area: progress;
  order: 3;
  display: grid;
  gap: 6px;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.drop-progress {
  grid-area: auto;
  width: min(560px, calc(100% - 28px));
  margin-top: 0;
  text-align: left;
}

.progress-panel[hidden] {
  display: none;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.progress-meta strong {
  color: var(--navy);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce7ee;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transition: width 0.25s ease;
}

.app-link-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.app-link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px;
  text-decoration: none;
}

.app-link:hover {
  border-color: var(--teal);
  background: #f0faf8;
}

.app-link.primary {
  border-color: rgba(15, 141, 128, 0.34);
  background: #f2fbf9;
}

.app-link img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.app-link span {
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-link small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.app-promo h2,
.affiliate-panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.16;
  letter-spacing: 0;
}

.app-promo p {
  color: var(--muted);
  line-height: 1.65;
}

.app-promo-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 22px 0 14px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.app-metrics {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.app-metrics span {
  display: flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(15, 141, 128, 0.2);
  border-radius: 8px;
  background: #f2fbf9;
  color: var(--navy);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.text-link,
.app-card a {
  display: inline-flex;
  margin-top: auto;
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
}

.text-link:hover,
.app-card a:hover {
  text-decoration: underline;
}

.tool-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.tool-card {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  text-decoration: none;
}

.tool-card em {
  width: fit-content;
  border-radius: 8px;
  background: #fff3d7;
  color: #8a5d00;
  padding: 4px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.tool-card:hover {
  border-color: var(--teal);
  background: #f0faf8;
}

.tool-card span {
  color: var(--navy);
  font-weight: 900;
}

.tool-card small {
  color: var(--muted);
  line-height: 1.45;
}

.affiliate-note {
  margin: auto 0 0;
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.answer-strip {
  width: min(1180px, calc(100% - 36px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 28px;
  box-shadow: 0 16px 44px rgba(18, 50, 74, 0.08);
}

.answer-strip h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: 0;
}

.answer-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 700;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 84px 0;
}

.section-heading {
  width: min(760px, 100%);
}

.section-heading-wide {
  width: min(860px, 100%);
  margin-bottom: 28px;
}

.section h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.process-grid article,
.app-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
}

.process-grid span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e7f3ef;
  color: var(--teal);
  font-weight: 900;
}

.process-grid h3,
.app-card h3 {
  margin: 16px 0 0;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.24;
}

.process-grid p,
.app-card p {
  color: var(--muted);
  line-height: 1.65;
}

.app-section {
  padding-top: 22px;
}

.faq-section {
  padding-top: 26px;
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.faq-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
}

.faq-list h3 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.3;
}

.faq-list p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.app-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  min-height: 218px;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(20, 33, 47, 0.16);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: #edf4ff;
  color: #2677d9;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  border-top: 1px solid var(--line);
}

.link-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.link-list a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
}

.link-list a:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  background: var(--navy);
  color: white;
}

.footer p {
  margin: 0;
  color: #d9e8fa;
}

.footer a {
  font-weight: 900;
  text-decoration: none;
}

.legal-page {
  min-height: calc(100vh - 72px);
  padding: clamp(22px, 4vw, 56px);
  background:
    linear-gradient(140deg, rgba(18, 50, 74, 0.92), rgba(15, 141, 128, 0.74)),
    var(--navy);
}

.legal-panel {
  width: min(980px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 70px rgba(7, 22, 36, 0.24);
  padding: clamp(24px, 5vw, 56px);
}

.legal-panel h1 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
}

.legal-lead {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.8;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: white;
}

.legal-table th,
.legal-table td {
  border-bottom: 1px solid var(--line);
  padding: 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.8;
}

.legal-table th {
  width: 28%;
  background: #f4f8fa;
  color: var(--navy);
  font-weight: 900;
}

.legal-updated {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.terms-panel {
  width: min(1040px, 100%);
}

.terms-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.terms-toc a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
}

.terms-section {
  color: #16324a;
  line-height: 1.85;
}

.terms-section h2,
.terms-section h3 {
  margin: 28px 0 10px;
  color: var(--navy);
  line-height: 1.35;
}

.terms-section h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.terms-section h3 {
  font-size: 20px;
}

.terms-section p {
  margin: 0 0 14px;
}

.terms-section ul {
  margin: 0 0 18px;
  padding-left: 1.4em;
}

.terms-section li {
  margin: 6px 0;
}

.terms-divider {
  margin: 42px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .converter-panel,
  .app-promo,
  .affiliate-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .affiliate-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .app-link-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .process-grid,
  .app-grid,
  .answer-strip,
  .faq-list,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .converter-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "eyebrow"
      "title"
      "copy"
      "drop"
      "account"
      "quality"
      "status"
      "download"
      "actions"
      "pricing"
      "pricing-note"
      "comparison"
      "samples";
    padding: 28px;
  }

  .drop-zone {
    min-height: 190px;
  }

  .account-panel,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .quality-comparison {
    overflow-x: auto;
  }

  .quality-comparison table {
    min-width: 620px;
  }

  .sample-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
  }

  .tool-hero {
    padding: 12px;
  }

  .converter-panel h1 {
    font-size: 34px;
    white-space: normal;
  }

  .app-card {
    grid-template-columns: 58px 1fr;
    min-height: auto;
    padding: 16px;
  }

  .app-icon {
    width: 58px;
    height: 58px;
  }

  .link-list {
    grid-template-columns: 1fr;
  }

  .app-link-list {
    grid-template-columns: 1fr;
  }

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