/* @Ownership(team = ProductTeam.NS_AI_PRODUCT_ENGINEERING_BRNO_A) */
@import url('./tokens.css');

* { box-sizing: border-box; }
body { margin: 0; font: 14px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; outline-offset: 4px; }
button, a, select, summary, input[type=range] { cursor: pointer; }
button { color: inherit; transition: background 160ms, color 160ms, transform 160ms; }
button:disabled { cursor: not-allowed; }
button:active:not(:disabled) { transform: translateY(1px); }
:focus-visible { outline: 3px solid var(--focus); }
a { color: inherit; }
svg { width: 19px; height: 19px; stroke-width: 1.7; vertical-align: middle; flex-shrink: 0; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.site-header { max-width: 1040px; margin: 0 auto; height: 88px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 23px; letter-spacing: -.9px; font-weight: 740; text-decoration: none; }
.brand-period { color: var(--primary-dark); margin-left: -7px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 36px; background: var(--primary); border-radius: 9px; }
.brand-mark svg { width: 24px; height: 24px; stroke-width: 2; }
.privacy-badge { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--accent); font-size: 11px; padding: 12px 0 12px 8px; border-radius: 4px; }
.privacy-badge:hover { color: var(--accent-hover); }
.privacy-badge svg { width: 16px; height: 16px; }
.content { max-width: 728px; padding: 32px 24px; margin: 0 auto; }
.intro { text-align: center; margin-bottom: 28px; }
h1 { font-size: 30px; font-weight: 620; letter-spacing: -1px; line-height: 1.2; }
.intro p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 10px; }
.mobile-break { display: none; }

.workspace { display: flex; flex-direction: column; gap: 8px; }
.flow-step { min-width: 0; padding: 16px 24px; border: 1px solid transparent; border-radius: 12px; scroll-margin: 24px; }
.step-header { display: flex; align-items: center; gap: 14px; min-width: 0; }
.step-marker { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; flex-shrink: 0; }
.step-marker svg { width: 16px; height: 16px; }
.step-heading { flex: 1; min-width: 0; }
.step-heading h2 { color: var(--muted); font-size: 14px; font-weight: 550; letter-spacing: -.1px; }
.step-summary { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-change { flex-shrink: 0; font-size: 11px !important; min-height: 44px; }
.flow-step.is-complete .step-marker { background: var(--success-bg); color: var(--accent); }
.flow-step.is-active { padding: 28px 40px 32px; background: var(--white); border-color: var(--primary-border); }
.is-active .step-header { flex-direction: column; gap: 12px; text-align: center; }
.is-active .step-marker { width: 36px; height: 36px; background: var(--primary); color: var(--ink); font-size: 14px; }
.is-active .step-heading { width: 100%; }
.is-active .step-heading h2 { color: var(--ink); font-size: 23px; font-weight: 600; letter-spacing: -.6px; }
.is-active .step-summary { font-size: 12px; margin-top: 7px; }
.step-body { animation: step-in 180ms ease-out; min-width: 0; }
@keyframes step-in { from { opacity: .6; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.files-panel { min-width: 0; }
.dropzone { min-height: 212px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 12px 8px; text-align: center; border-radius: 8px; transition: background 160ms; }
.dropzone.dragging { background: var(--primary-soft); }
.upload-icon { display: grid; place-items: center; margin-bottom: 12px; color: var(--muted); }
.upload-icon svg { width: 29px; height: 29px; }
.dropzone h3 { font-size: 15px; font-weight: 550; }
.dropzone p { font-size: 12px; color: var(--muted); margin-top: 7px; }
.browse, .flow-primary, .convert-btn, .download-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(100%, 320px); min-height: 48px; margin: 20px auto 0; padding: 13px 20px; border: 0; border-radius: 6px; background: var(--primary); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.browse:hover, .flow-primary:hover, .convert-btn:not(:disabled):hover, .download-btn:hover { background: var(--primary-hover); }
.browse svg, .flow-primary svg, .convert-btn svg, .download-btn svg { width: 17px; height: 17px; }
.convert-btn:disabled, .browse:disabled { color: var(--disabled-ink); background: var(--disabled); }
.dropzone .file-limit { margin-top: 12px; font-size: 10px; }
.sample { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.sample>svg { width: 13px; height: 13px; margin-left: 2px; }
.text-button { border: 0; background: none; color: var(--muted); padding: 3px; font-size: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--ink); }
.has-files .dropzone { min-height: 116px; padding: 16px 0 8px; }
.has-files .upload-icon, .has-files .dropzone h3, .has-files .file-limit, .has-files .sample { display: none; }
.has-files .browse { background: var(--ink); color: var(--white); margin-top: 10px; }
.has-files .browse:hover { background: var(--ink-hover); }
.queue-top { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 11px; color: var(--muted); }
.queue-top button { min-height: 44px; font-size: 11px; }
.file-row { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; }
.file-row:last-child { border-bottom: 0; }
.file-thumb { width: 38px; height: 42px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface); border-radius: 5px; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb svg { color: var(--muted); }
.file-info { min-width: 0; flex: 1; }
.file-name { display: block; font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.5; }
.file-meta.error { color: var(--error); }
.file-meta.success { color: var(--accent); }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; padding: 8px; background: none; border: 0; border-radius: 5px; text-decoration: none; flex-shrink: 0; }
.icon-button:hover { background: var(--surface); }
.icon-button svg { width: 16px; height: 16px; }

.format-body { max-width: 380px; margin: 28px auto 8px; text-align: center; }
.format-select { width: 100%; min-height: 54px; padding: 14px; color: var(--ink); background: var(--white); border: 1px solid var(--line-strong); border-radius: 6px; font-size: 14px; font-weight: 500; }
.step-help { color: var(--muted); font-size: 11px; margin-top: 12px; }
.convert-body { max-width: 400px; margin: 24px auto 0; }
.conversion-preview { display: flex; align-items: center; justify-content: center; gap: 20px; }
.conversion-preview span, .conversion-preview strong { padding: 12px 16px; border-radius: 5px; font-size: 15px; font-weight: 550; background: var(--surface); }
.conversion-preview strong { background: var(--primary-soft); color: var(--primary-dark); }
.conversion-preview svg { color: var(--muted); width: 18px; height: 18px; }
.field-hint { text-align: center; font-size: 12px; line-height: 1.7; color: var(--muted); margin: 16px auto 0; }
.setting-group { max-width: 320px; margin: 20px auto 0; }
.setting-group summary { color: var(--muted); font-size: 12px; text-align: center; padding: 8px; }
.field-label { font-size: 12px; font-weight: 550; display: flex; align-items: center; justify-content: space-between; margin: 16px 0 10px; }
.field-label span { color: var(--muted); font-weight: 450; }
input[type=range] { width: 100%; height: 5px; accent-color: var(--ink); margin: 7px 0 12px; }
.range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.under-button { text-align: center; font-size: 11px; color: var(--muted); margin-top: 12px; }
.progress { height: 5px; max-width: 320px; margin: 20px auto 0; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary-dark); transition: width 200ms; }
.cancel-button { display: block; min-height: 44px; margin: 8px auto 0; font-size: 12px; }
.download-body { margin-top: 24px; }
.results-bar { display: flex; align-items: center; justify-content: center; }
.results-bar .download-btn { margin-top: 0; }
.result-list { max-width: 440px; margin: 20px auto 0; }
.result-list a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; text-decoration: none; }
.result-list a:hover { color: var(--accent); }
.result-list a>span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-list a>span:last-child { white-space: nowrap; color: var(--muted); font-size: 11px; }
.result-list svg { width: 14px; height: 14px; margin-left: 5px; }
.restart-button { display: block; min-height: 44px; margin: 18px auto 0; font-size: 12px; }
.notice { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; padding: 12px; border-radius: 6px; background: var(--primary-soft); font-size: 11px; line-height: 1.7; }
.notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.notice.error { background: var(--error-bg); color: var(--error); }
.footer { padding: 12px 0 0; margin-top: 20px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; gap: 24px; }
.footer span { display: flex; gap: 5px; align-items: center; }
.footer svg { width: 12px; height: 12px; }
.footer button { min-height: 44px; }

dialog { border: 1px solid var(--line-strong); border-radius: 12px; padding: 0; max-width: min(650px, calc(100% - 32px)); width: 650px; color: var(--ink); background: var(--white); }
dialog::backdrop { background: oklch(.2 0 0 / .4); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 19px; letter-spacing: -.5px; }
.dialog-body { padding: 24px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.dialog-body p+p { margin-top: 14px; }
.dialog-body strong { color: var(--ink); }
.dialog-body table { width: 100%; border-collapse: collapse; margin-top: 19px; font-size: 11px; }
.dialog-body th { text-align: left; color: var(--ink); font-weight: 600; }
.dialog-body th,.dialog-body td { border-bottom: 1px solid var(--line); padding: 10px 8px 10px 0; }
.dialog-body td:first-child { color: var(--ink); font-weight: 550; }
@media (max-width: 620px) {
  .site-header { margin: 0 20px; height: 76px; padding: 0; }
  .brand { font-size: 21px; }
  .brand-mark { width: 30px; height: 32px; }
  .privacy-badge { font-size: 10px; gap: 5px; }
  .privacy-badge svg { width: 14px; height: 14px; }
  .content { padding: 24px 16px; }
  .intro { margin-bottom: 24px; }
  h1 { font-size: 27px; letter-spacing: -.9px; }
  .mobile-break { display: block; }
  .intro p { font-size: 11px; }
  .flow-step { padding: 12px; }
  .flow-step.is-active { padding: 24px 18px; }
  .step-header { gap: 10px; }
  .step-heading h2 { font-size: 13px; }
  .is-active .step-heading h2 { font-size: 22px; }
  .step-change { font-size: 10px !important; }
  .step-summary { font-size: 10px; }
  .dropzone { padding: 16px 0 8px; }
  .footer { gap: 16px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
