@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #14213d;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e3eaf2;
  --line-strong: #cbd7e5;
  --primary: #3157e5;
  --primary-hover: #2447c7;
  --primary-soft: #eaf0ff;
  --teal: #0d9f8f;
  --teal-soft: #e8f8f5;
  --amber: #b96209;
  --amber-soft: #fff7e8;
  --red: #d73f4f;
  --red-soft: #fff0f2;
  --shadow-sm: 0 2px 8px rgba(30, 55, 90, .04);
  --shadow-md: 0 14px 40px rgba(30, 55, 90, .09);
  --shadow-lg: 0 24px 70px rgba(30, 55, 90, .13);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Manrope', 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid rgba(49, 87, 229, .25); outline-offset: 3px; }
::selection { background: #dce6ff; color: #18389e; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }
.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.narrow { width: min(820px, calc(100% - 48px)); margin: 0 auto; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.text-teal { color: var(--teal); }
.text-red { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mono { font-variant-numeric: tabular-nums; }

/* Header */
.site-header { height: 76px; position: sticky; top: 0; z-index: 50; background: rgba(247, 249, 252, .9); border-bottom: 1px solid rgba(227, 234, 242, .85); backdrop-filter: blur(16px); }
.nav-shell { height: 100%; display: flex; align-items: center; gap: 38px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.7px; flex: 0 0 auto; }
.logo-mark { width: 35px; height: 35px; position: relative; display: grid; place-items: center; color: #fff; border-radius: 11px; background: linear-gradient(145deg, #4167ef, #2546c4); box-shadow: 0 7px 16px rgba(49,87,229,.22); overflow: hidden; }
.logo-mark::before, .logo-mark::after { content: ''; position: absolute; width: 11px; height: 16px; border: 2px solid rgba(255,255,255,.92); border-radius: 3px; top: 8px; }
.logo-mark::before { left: 7px; }
.logo-mark::after { right: 7px; border-color: rgba(255,255,255,.55); }
.logo-dot { width: 4px; height: 4px; border-radius: 50%; background: #6ff4dd; position: absolute; right: 5px; top: 5px; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.nav-link { position: relative; color: #55647a; font-size: 14px; font-weight: 600; padding: 26px 0 24px; transition: color .18s; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 15px; height: 2px; border-radius: 2px; background: var(--primary); }
.nav-button { border: 0; background: none; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.privacy-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; background: var(--teal-soft); color: #087e72; font-size: 12px; font-weight: 700; }
.menu-button { display: none; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; place-items: center; }
.mobile-nav { display: none; padding: 10px 24px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
.mobile-nav.open { display: grid; }
.mobile-nav .nav-link { padding: 12px 0; text-align: left; }
.mobile-nav .nav-link.active::after { display: none; }

/* Buttons and shared elements */
.btn { min-height: 44px; padding: 0 19px; border-radius: 11px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; font-size: 14px; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--primary); box-shadow: 0 7px 16px rgba(49,87,229,.18); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 9px 22px rgba(49,87,229,.24); }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: #334155; }
.btn-secondary:hover:not(:disabled) { border-color: #a8b8ce; background: #fbfdff; }
.btn-soft-teal { background: var(--teal-soft); color: #087e72; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-soft); color: var(--text); }
.btn-lg { min-height: 52px; padding: 0 25px; border-radius: 13px; font-size: 15px; }
.btn-sm { min-height: 36px; padding: 0 13px; border-radius: 9px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--muted); }
.text-button { border: 0; background: transparent; padding: 0; color: var(--primary); font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; border-radius: 99px; padding: 5px 10px; font-size: 12px; line-height: 1.2; font-weight: 700; white-space: nowrap; }
.badge-blue { color: #3154c9; background: var(--primary-soft); }
.badge-green { color: #087f72; background: var(--teal-soft); }
.badge-amber { color: #a15b0a; background: var(--amber-soft); }
.badge-gray { color: #617086; background: #eef2f6; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.section { padding: 88px 0; }
.section-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { max-width: 700px; margin: 0 auto 42px; text-align: center; }
.section-heading h2 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 39px); line-height: 1.2; letter-spacing: -1.25px; margin: 12px 0 14px; }
.section-heading p { color: var(--muted); margin: 0; font-size: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); text-transform: uppercase; font-size: 12px; letter-spacing: 1.3px; font-weight: 800; }
.info-note { padding: 13px 15px; display: flex; gap: 10px; align-items: flex-start; border-radius: 11px; color: #52637c; background: #f3f7fc; font-size: 13px; line-height: 1.5; }
.info-note .icon { color: #5f7bb9; margin-top: 1px; }
.info-note.green { background: var(--teal-soft); color: #32746e; }
.info-note.green .icon { color: var(--teal); }
.info-note.amber { background: var(--amber-soft); color: #8c5a1b; }
.info-note.amber .icon { color: var(--amber); }

/* Hero */
.hero { position: relative; padding: 62px 0 70px; overflow: hidden; }
#converter, #step-upload, #step-settings, #step-processing, #step-result, #view-history { scroll-margin-top: 92px; }
#how-it-works, #faq { scroll-margin-top: 80px; }
.hero::before { content: ''; position: absolute; width: 620px; height: 620px; left: 50%; top: -400px; transform: translateX(-50%); background: radial-gradient(circle, rgba(81,116,239,.16), rgba(81,116,239,0) 70%); pointer-events: none; }
.hero-heading { text-align: center; max-width: 840px; margin: 0 auto 30px; position: relative; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d5eee9; border-radius: 99px; padding: 7px 14px; box-shadow: var(--shadow-sm); color: #4c6a67; font-size: 12px; margin-bottom: 20px; }
.privacy-pill .icon { color: var(--teal); }
.privacy-pill strong { color: #087e72; }
.hero h1 { font-family: var(--font-display); font-size: clamp(38px, 5.2vw, 62px); line-height: 1.06; letter-spacing: -2.4px; margin: 0 0 18px; font-weight: 800; }
.hero-sub { max-width: 660px; margin: 0 auto; font-size: 17px; color: var(--muted); line-height: 1.65; }
.upload-wrap { max-width: 760px; margin: 0 auto; position: relative; }
.upload-card { background: #fff; padding: 13px; border: 1px solid #dfe7f1; border-radius: 23px; box-shadow: 0 24px 60px rgba(39,64,112,.12); }
.upload-zone { border: 1.5px dashed #b8c8de; border-radius: 16px; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 30px; text-align: center; background: linear-gradient(180deg, #fbfdff, #f8fbff); transition: border .2s, background .2s; cursor: pointer; }
.upload-zone.dragging, .upload-zone:focus-visible { border-color: var(--primary); background: var(--primary-soft); }
.upload-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border: 1px solid #dfe7ff; border-radius: 17px; margin-bottom: 16px; }
.upload-icon .icon { width: 27px; height: 27px; }
.upload-zone h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: -.4px; margin: 0 0 5px; }
.upload-zone p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.upload-specs { display: flex; align-items: center; gap: 16px; margin-top: 18px; color: var(--faint); font-size: 12px; }
.upload-specs span { display: inline-flex; align-items: center; gap: 5px; }
.upload-specs .icon { width: 14px; height: 14px; }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 26px; margin-top: 24px; color: #66768c; font-size: 12px; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row .icon { width: 15px; height: 15px; color: var(--teal); }
.hero-caption { text-align: center; color: var(--faint); font-size: 12px; margin: 16px 0 0; }
.hero-caption.error { color: var(--red); }

/* Workspace */
.workspace { padding: 10px 0 0; }
.workspace-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.workspace-top h2 { font-family: var(--font-display); font-size: 30px; letter-spacing: -.8px; margin: 0 0 5px; }
.workspace-top p { margin: 0; color: var(--muted); font-size: 14px; }
.flow-steps { display: flex; align-items: center; gap: 8px; }
.flow-step { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 12px; font-weight: 700; }
.flow-step-num { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #e9eef5; font-size: 11px; }
.flow-step.active { color: var(--primary); }
.flow-step.active .flow-step-num { background: var(--primary); color: #fff; }
.flow-step.done { color: var(--teal); }
.flow-step.done .flow-step-num { background: var(--teal-soft); }
.flow-line { width: 30px; height: 1px; background: #dce4ee; }
.converter-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.panel-header { min-height: 65px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-family: var(--font-display); font-size: 16px; margin: 0; display: flex; align-items: center; gap: 9px; }
.panel-header h2 .icon { color: var(--primary); }
.panel-body { padding: 22px; }
.file-summary { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); background: #f8fafc; border-radius: 12px; margin-bottom: 20px; }
.file-type-icon { width: 43px; height: 43px; border-radius: 11px; display: grid; place-items: center; color: #6a55c5; background: #eeeafd; flex: 0 0 auto; }
.file-summary-text { min-width: 0; flex: 1; }
.file-summary-text strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-summary-text span { color: var(--muted); font-size: 11px; }
.file-summary .btn-icon { border: 0; background: transparent; width: 34px; height: 34px; }
.video-preview { border-radius: 13px; overflow: hidden; margin-bottom: 22px; background: #0b1220; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.video-preview video { width: 100%; height: 100%; object-fit: contain; background: #0b1220; }
.settings-section + .settings-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 22px; }
.settings-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.settings-title h3 { font-size: 13px; margin: 0; font-weight: 800; }
.settings-title span { color: var(--faint); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.field { min-width: 0; }
.field + .field { margin-top: 14px; }
.form-grid .field + .field { margin-top: 0; }
.field label, .field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: #475569; font-size: 12px; font-weight: 700; }
.field label .hint { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.input, .select { width: 100%; height: 43px; border: 1px solid #d7e0eb; border-radius: 10px; background: #fff; color: var(--text); padding: 0 12px; outline: none; font-size: 13px; transition: border .15s, box-shadow .15s; }
.input:focus, .select:focus { border-color: #7893ed; box-shadow: 0 0 0 3px rgba(49,87,229,.09); }
.input::placeholder { color: #a0adbd; }
.input:disabled { background: #f6f8fb; color: var(--muted); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 10px; background: #edf2f7; }
.segmented button { height: 35px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.segmented button.active { background: #fff; color: var(--primary); box-shadow: 0 2px 5px rgba(30,55,90,.1); }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 9px; background: #e2e9f2; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: 0 2px 6px rgba(30,55,90,.2); }
.range::-moz-range-track { height: 6px; border-radius: 9px; background: #e2e9f2; }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.quote-card { position: sticky; top: 98px; overflow: hidden; }
.quote-card .panel-header { background: #fbfcfe; }
.quote-total { text-align: center; padding: 24px 20px 18px; }
.quote-total-label { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.quote-number { display: flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--font-display); font-size: 29px; line-height: 1.2; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.quote-subsidy { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; color: var(--teal); background: var(--teal-soft); border-radius: 99px; padding: 5px 10px; font-size: 11px; font-weight: 700; }
.quote-lines { padding: 0 22px 18px; }
.quote-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 0; color: var(--muted); font-size: 12px; }
.quote-line strong { color: #40516a; font-weight: 700; font-variant-numeric: tabular-nums; }
.quote-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 15px; color: var(--text); font-weight: 700; }
.quote-line.total strong { color: var(--teal); }
.quote-action { padding: 18px 22px 22px; border-top: 1px solid var(--line); }
.quote-action .btn { margin-bottom: 12px; }
.secure-caption { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--faint); font-size: 11px; }
.secure-caption .icon { width: 13px; height: 13px; }

/* Processing */
.processing-wrap { max-width: 700px; margin: 30px auto 0; }
.processing-card { padding: 42px; text-align: center; }
.processing-orb { width: 82px; height: 82px; border-radius: 25px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); margin: 0 auto 24px; position: relative; }
.processing-orb::before { content: ''; position: absolute; inset: -8px; border: 2px solid #dfe6fb; border-top-color: var(--primary); border-radius: 29px; animation: spin 1.4s linear infinite; }
.processing-orb .icon { width: 34px; height: 34px; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-card h2 { font-family: var(--font-display); font-size: 27px; letter-spacing: -.8px; margin: 0 0 8px; }
.processing-card > p { color: var(--muted); margin: 0 0 27px; font-size: 14px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.progress-meta strong { color: var(--primary); font-variant-numeric: tabular-nums; }
.progress-track { height: 9px; border-radius: 99px; background: #e8edf4; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #6888f3); border-radius: inherit; transition: width .3s ease; }
.processing-stages { display: flex; justify-content: space-between; margin-top: 14px; color: var(--faint); font-size: 11px; }
.processing-stages .active { color: var(--primary); font-weight: 700; }
.processing-stages .done { color: var(--teal); }
.processing-file { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; }

/* Result */
.result-wrap { padding: 10px 0 0; }
.result-success { text-align: center; margin-bottom: 26px; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--teal); background: var(--teal-soft); margin: 0 auto 15px; }
.success-icon .icon { width: 30px; height: 30px; }
.result-success h2 { font-family: var(--font-display); font-size: 32px; letter-spacing: -1px; margin: 0 0 7px; }
.result-success p { color: var(--muted); margin: 0; font-size: 14px; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 24px; align-items: start; }
.result-preview-panel { padding: 14px; }
.gif-stage { position: relative; overflow: hidden; border-radius: 13px; background: #eef2f8; display: grid; place-items: center; min-height: 300px; }
.gif-stage img { max-width: 100%; max-height: 460px; width: auto; height: auto; image-rendering: -webkit-optimize-contrast; }
.result-actions-panel { padding: 24px; }
.result-actions-panel h2 { font-family: var(--font-display); font-size: 19px; margin: 0 0 5px; }
.result-actions-panel > p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.result-actions-panel .btn + .btn { margin-top: 10px; }
.result-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0; }
.result-detail { padding: 12px; border-radius: 10px; background: #f5f7fa; }
.result-detail span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 2px; }
.result-detail strong { font-size: 13px; word-break: break-all; }
.result-secondary-actions { display: flex; justify-content: center; gap: 22px; margin-top: 22px; }
.result-secondary-actions .btn { font-size: 12px; }

/* History */
.history-view { padding: 16px 0 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 24px; }
.page-head h2 { font-family: var(--font-display); font-size: 32px; letter-spacing: -1px; margin: 0 0 5px; }
.page-head p { color: var(--muted); margin: 0; font-size: 14px; }
.history-panel { overflow: hidden; }
.history-toolbar { padding: 18px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.search-wrap { position: relative; flex: 1; max-width: 340px; }
.search-wrap .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); }
.search-wrap .input { padding-left: 38px; }
.table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.history-table th { padding: 12px 20px; text-align: left; color: var(--faint); background: #fafbfd; border-bottom: 1px solid var(--line); font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.history-table td { padding: 14px 20px; border-bottom: 1px solid #edf1f5; font-size: 12px; vertical-align: middle; }
.history-table tr:last-child td { border-bottom: 0; }
.history-table tbody tr:hover { background: #fbfcfe; }
.history-file { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.history-thumb { width: 58px; height: 40px; border-radius: 8px; overflow: hidden; flex: 0 0 auto; background: #eef2f8; display: grid; place-items: center; }
.history-thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-file strong { display: block; font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-file span { color: var(--faint); font-size: 10px; }
.history-actions { display: flex; gap: 6px; justify-content: flex-end; }
.history-actions .btn-icon { width: 32px; height: 32px; border: 0; background: transparent; }
.history-empty { padding: 64px 25px; text-align: center; }
.empty-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 19px; background: #f0f4f9; color: var(--faint); }
.history-empty h3 { font-family: var(--font-display); margin: 0 0 5px; }
.history-empty p { color: var(--muted); margin: 0 0 20px; }

/* Marketing blocks */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card { padding: 28px; }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.step-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.step-card:nth-child(2) .step-icon { background: #f1edff; color: #7556ca; }
.step-card:nth-child(3) .step-icon { background: var(--teal-soft); color: var(--teal); }
.step-num { font-family: var(--font-display); font-size: 13px; color: #a2b0c1; font-weight: 800; }
.step-card h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 8px; letter-spacing: -.3px; }
.step-card p { color: var(--muted); font-size: 14px; margin: 0; }
.bento-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
.feature-card { padding: 32px; overflow: hidden; }
.feature-card h3 { font-family: var(--font-display); font-size: 22px; letter-spacing: -.5px; margin: 18px 0 8px; }
.feature-card > p { color: var(--muted); margin: 0; max-width: 540px; }
.feature-wide { grid-row: span 2; }
.feature-visual { margin-top: 28px; border-radius: 15px; background: #f3f6fb; border: 1px solid #e6ecf4; padding: 22px; }
.parameter-window { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.parameter-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 14px 0; font-size: 13px; }
.parameter-row:first-child { margin-top: 0; }
.parameter-row:last-child { margin-bottom: 0; }
.value-pill { min-width: 62px; padding: 5px 9px; text-align: center; border-radius: 7px; background: #f0f4f9; font-weight: 700; font-size: 12px; color: var(--primary); }
.mini-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mini-stat { padding: 16px 10px; border-radius: 12px; background: #f7f9fc; text-align: center; }
.mini-stat strong { display: block; font-family: var(--font-display); font-size: 20px; }
.mini-stat span { font-size: 11px; color: var(--muted); }
.privacy-band { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 30px 34px; border-radius: 20px; background: linear-gradient(110deg, #eaf8f5, #f4fbfa); border: 1px solid #d6eee9; }
.privacy-band-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: var(--teal); background: #fff; }
.privacy-band h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 19px; }
.privacy-band p { margin: 0; color: #587773; font-size: 14px; }
.faq-list { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 0; background: transparent; padding: 22px 4px; text-align: left; font-weight: 700; font-size: 16px; }
.faq-question .icon { color: var(--muted); transition: transform .2s; }
.faq-item.open .faq-question .icon { transform: rotate(180deg); }
.faq-answer { display: none; padding: 0 44px 22px 4px; color: var(--muted); font-size: 14px; }
.faq-item.open .faq-answer { display: block; }
.bottom-cta { text-align: center; padding: 54px; border-radius: 24px; background: linear-gradient(130deg, #edf2ff, #f7f9ff 55%, #eaf8f5); border: 1px solid #dfe7f5; }
.bottom-cta h2 { font-family: var(--font-display); font-size: 32px; letter-spacing: -1px; margin: 0 0 10px; }
.bottom-cta p { color: var(--muted); margin: 0 0 24px; }

/* Legal */
.legal-page { padding: 48px 0 80px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .icon { width: 14px; height: 14px; color: #a0adbd; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.legal-nav { position: sticky; top: 110px; padding: 18px; }
.legal-nav strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); margin-bottom: 10px; }
.legal-nav a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 12px; }
.legal-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.legal-content { padding: 40px 46px; }
.legal-content h1 { font-family: var(--font-display); font-size: 36px; letter-spacing: -1px; margin: 0 0 8px; }
.legal-updated { color: var(--faint); font-size: 12px; margin-bottom: 30px; }
.legal-content h2 { font-family: var(--font-display); font-size: 19px; margin: 30px 0 10px; letter-spacing: -.3px; }
.legal-content p, .legal-content li { color: #58697f; font-size: 14px; line-height: 1.8; }
.legal-content ul { padding-left: 20px; }
.legal-callout { padding: 16px 18px; background: var(--primary-soft); border-radius: 11px; color: #445d9e; font-size: 13px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-main { padding: 46px 0 35px; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 45px; }
.footer-brand p { color: var(--muted); max-width: 300px; font-size: 12px; margin: 14px 0; }
.footer-status { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); font-size: 11px; }
.footer-status .dot { box-shadow: 0 0 0 4px var(--teal-soft); }
.footer-col strong { display: block; font-size: 12px; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: 12px; margin: 9px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 0; display: flex; justify-content: space-between; gap: 20px; color: var(--faint); font-size: 11px; }
.footer-bottom span:last-child { display: flex; align-items: center; gap: 6px; }

/* Ads */
.ad-slot { margin: 0 auto; width: min(1180px, calc(100% - 48px)); min-height: 90px; display: grid; place-items: center; border-radius: 14px; background: #f0f3f8; border: 1px dashed #d9e2ee; color: var(--faint); font-size: 11px; }

/* Toasts */
.toast-root { position: fixed; z-index: 200; right: 22px; bottom: 22px; display: grid; gap: 10px; pointer-events: none; }
.toast { min-width: 280px; max-width: 390px; padding: 13px 16px; display: flex; align-items: flex-start; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); color: #44546b; font-size: 13px; animation: toastIn .22s ease; pointer-events: auto; }
.toast .icon { color: var(--teal); margin-top: 1px; }
.toast.error .icon { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* Responsive */
@media (max-width: 1100px) {
  .converter-grid { grid-template-columns: minmax(0,1fr) 310px; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-button { display: grid; }
  .nav-shell { gap: 15px; }
  .converter-grid, .result-grid { grid-template-columns: 1fr; }
  .quote-card { position: static; }
  .result-actions-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .result-actions-panel h2, .result-actions-panel > p, .result-details, .result-actions-panel .info-note { grid-column: 1/-1; }
  .result-actions-panel .btn + .btn { margin-top: 0; }
  .bento-grid { grid-template-columns: 1fr; }
  .feature-wide { grid-row: auto; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { display: none; }
  .footer-main { grid-template-columns: 1.4fr repeat(3,1fr); gap: 25px; }
}
@media (max-width: 700px) {
  .container, .narrow { width: min(100% - 32px, 1180px); }
  .site-header { height: 66px; }
  .brand { font-size: 20px; }
  .logo-mark { width: 32px; height: 32px; }
  .logo-mark::before, .logo-mark::after { top: 7px; }
  .privacy-chip { display: none; }
  .hero { padding: 38px 0 46px; }
  .hero h1 { font-size: 38px; letter-spacing: -1.7px; }
  .hero-sub { font-size: 15px; }
  .privacy-pill { font-size: 11px; padding: 6px 11px; }
  .upload-card { padding: 9px; border-radius: 18px; }
  .upload-zone { min-height: 230px; padding: 26px 18px; }
  .upload-specs { gap: 10px; flex-wrap: wrap; justify-content: center; }
  .trust-row { gap: 10px 16px; }
  .section { padding: 62px 0; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { padding: 23px; }
  .privacy-band { grid-template-columns: auto 1fr; padding: 23px; }
  .privacy-band .btn { grid-column: 1/-1; }
  .bottom-cta { padding: 35px 22px; }
  .bottom-cta h2 { font-size: 26px; }
  .workspace-top, .page-head { align-items: flex-start; flex-direction: column; }
  .workspace-top h2, .page-head h2 { font-size: 26px; }
  .flow-steps { width: 100%; justify-content: space-between; }
  .flow-line { flex: 1; }
  .flow-step span:last-child { display: none; }
  .panel-body { padding: 17px; }
  .form-grid.three { grid-template-columns: 1fr 1fr; }
  .processing-card { padding: 32px 22px; }
  .gif-stage { min-height: 220px; }
  .history-toolbar { flex-wrap: wrap; }
  .search-wrap { max-width: none; flex-basis: 100%; }
  .legal-content { padding: 27px 23px; }
  .legal-content h1 { font-size: 30px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .toast-root { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: 0; max-width: none; }
}
@media (max-width: 700px) {
  .table-wrap { overflow-x: visible; }
  .history-table { min-width: 0; display: block; }
  .history-table thead { display: none; }
  .history-table tbody { display: block; }
  .history-table tr { display: block; padding: 14px 16px; border-bottom: 1px solid #edf1f5; }
  .history-table tr:last-child { border-bottom: 0; }
  .history-table td { display: block; padding: 3px 0; border: 0; }
  .history-actions { justify-content: flex-end; margin-top: 6px; }
  .flow-step.active span:last-child { display: inline; }
}
@media (max-width: 430px) {
  .hero h1 { font-size: 32px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .result-actions-panel { display: block; }
  .result-actions-panel .btn { width: 100%; margin-top: 10px !important; }
  .result-secondary-actions { gap: 8px; flex-wrap: wrap; }
  .footer-main { gap: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
