:root {
  color-scheme: dark;
  --bg: #070a12;
  --panel: #0d1220;
  --panel-2: #11182a;
  --line: #25304a;
  --line-soft: #192238;
  --text: #f4f7ff;
  --muted: #9aa7bd;
  --accent: #67e8f9;
  --accent-2: #60a5fa;
  --success: #6ee7b7;
  --error: #fca5a5;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; }
button, input { font: inherit; }
a { color: inherit; }

.site-header {
  width: min(1120px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 760; letter-spacing: -0.02em; }
.brand-mark { width: 22px; height: 22px; border: 2px solid var(--accent); border-radius: 7px 2px 7px 2px; transform: rotate(8deg); box-shadow: 0 0 24px rgba(103,232,249,.24); }
.local-badge { color: var(--muted); font: 600 13px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.tool-shell { min-height: calc(100svh - 76px); display: grid; grid-template-columns: minmax(240px, .72fr) minmax(460px, 1.28fr); gap: clamp(36px, 7vw, 100px); align-items: center; padding: 52px 0 72px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font: 700 12px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(3.4rem, 8vw, 7rem); line-height: .88; letter-spacing: -.075em; max-width: 7ch; }
h2 { margin-bottom: 14px; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.055em; }
.subhead { max-width: 29rem; color: var(--muted); font-size: 1.1rem; }

.converter { background: linear-gradient(155deg, rgba(17,24,42,.98), rgba(10,15,27,.98)); border: 1px solid var(--line); border-radius: 24px; padding: clamp(18px, 3vw, 30px); box-shadow: 0 30px 90px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.03); }
#file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-card { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px; border: 1px dashed #3b4a6b; border-radius: 16px; background: rgba(7,10,18,.55); text-align: center; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.drop-card:hover, .converter.dragging .drop-card, #file-input:focus-visible + .drop-card { border-color: var(--accent); background: rgba(103,232,249,.055); transform: translateY(-1px); outline: none; }
.drop-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: #142038; color: var(--accent); }
.drop-icon svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-weight: 760; font-size: 1.15rem; }
.drop-copy { color: var(--muted); font-size: .92rem; }
.file-row { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255,255,255,.025); }
.file-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-meta div { min-width: 0; }
.file-meta strong, .file-meta span { display: block; }
.file-meta strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.file-meta span { color: var(--muted); font-size: .84rem; }
.file-icon { flex: 0 0 auto; width: 34px; height: 34px; display: grid !important; place-items: center; border-radius: 10px; background: #18243e; color: var(--accent) !important; }
.text-button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 8px; }
.text-button:hover { color: var(--text); }
.primary-button, .download-button { width: 100%; min-height: 52px; margin-top: 14px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04101d; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 0 10px 30px rgba(96,165,250,.16); }
.primary-button:disabled { cursor: not-allowed; background: #202a3e; color: #718097; box-shadow: none; }
.status { margin-top: 18px; }
.status-line { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .9rem; }
.progress-track { height: 7px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #202a3e; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .18s ease; }
.result-card { margin-top: 18px; padding: 16px; border: 1px solid rgba(110,231,183,.27); border-radius: 14px; background: rgba(110,231,183,.055); }
.result-main { display: flex; align-items: center; gap: 12px; }
.result-main strong, .result-main span { display: block; }
.result-main span { color: var(--muted); font-size: .88rem; }
.success-mark { width: 36px; height: 36px; display: grid !important; place-items: center; border-radius: 50%; background: rgba(110,231,183,.14); color: var(--success) !important; font-weight: 900; }
.download-button { margin-top: 14px; min-height: 48px; background: var(--success); }
.privacy-line { margin: 16px 0 0; color: var(--muted); text-align: center; font-size: .82rem; }
.privacy-line span { color: var(--success); font-size: .6rem; vertical-align: .15em; }
.converter.error .status-line { color: var(--error); }

.content-section { padding: 100px 0; border-top: 1px solid var(--line-soft); }
.section-heading { max-width: 720px; margin-bottom: 36px; }
.section-heading > p:last-child { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; min-width: 640px; border-collapse: collapse; background: var(--panel); }
th, td { padding: 17px 20px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { color: var(--muted); font: 700 12px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.test-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 720; }
.test-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.test-status.pending { color: var(--muted); }
.test-status.pending::before { background: #64748b; }
.test-status.fail { color: var(--error); }
.test-status.fail::before { background: var(--error); }
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; }
.sticky-heading { align-self: start; position: sticky; top: 36px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 24px 0; border-top: 1px solid var(--line-soft); }
.steps li:last-child { border-bottom: 1px solid var(--line-soft); }
.steps > li > span { color: var(--accent); font: 700 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.steps strong { display: block; margin-bottom: 4px; font-size: 1.15rem; }
.steps p, .scope-grid p, details p { margin-bottom: 0; color: var(--muted); }
.scope-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.scope-grid article { min-height: 190px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.scope-grid strong { display: block; margin-bottom: 12px; font-size: 1.12rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 22px 36px 22px 0; list-style: none; position: relative; cursor: pointer; font-weight: 720; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; color: var(--accent); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 760px; padding: 0 36px 22px 0; }
footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 44px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-underline-offset: 4px; }
.article-page main { max-width: 1120px; margin: 0 auto; }
.article-hero { padding: 72px 0 34px; }
.article-hero h1 { max-width: 850px; margin: 10px 0 18px; font-size: clamp(2.25rem, 6vw, 4.8rem); line-height: .98; letter-spacing: -.055em; }
.article-lead { max-width: 760px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.65; }
.article-meta { margin-top: 22px; color: var(--muted); font-size: .88rem; }
.article-section { padding: 30px 0; border-top: 1px solid var(--line); }
.article-section h2 { margin: 0 0 14px; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.035em; }
.article-section h3 { margin: 24px 0 8px; font-size: 1.15rem; }
.article-section p, .article-section li { max-width: 780px; color: var(--muted); line-height: 1.75; }
.article-section ul, .article-section ol { padding-left: 1.35rem; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.article-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(17, 24, 42, .66); }
.article-card h3 { margin-top: 0; }
.article-card p { margin-bottom: 0; }
.flow-figure { margin: 26px 0 4px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: #0b1020; }
.flow-figure svg { display: block; width: 100%; height: auto; }
.source-list { display: grid; gap: 8px; margin-top: 16px; }
.source-list a { color: var(--accent); }
.article-cta { display: inline-flex; margin-top: 12px; padding: 13px 17px; border-radius: 12px; background: linear-gradient(135deg, #67e8f9, #60a5fa); color: #06101f; font-weight: 800; text-decoration: none; }
.legal-page { min-height: calc(100svh - 76px); padding: clamp(60px, 9vw, 120px) 0; }
.legal-copy { max-width: 760px; }
.legal-copy h1 { max-width: 11ch; font-size: clamp(3rem, 7vw, 6rem); }
.legal-copy h2 { margin-top: 44px; font-size: clamp(1.5rem, 3vw, 2.4rem); }
.legal-copy p, .legal-copy li { color: var(--muted); }
.legal-copy a { color: var(--accent); text-underline-offset: 4px; }
.legal-copy ul { padding-left: 1.2rem; }

@media (max-width: 820px) {
  .tool-shell { min-height: auto; grid-template-columns: 1fr; gap: 34px; padding: 54px 0 70px; }
  h1 { max-width: none; font-size: clamp(3.6rem, 15vw, 6rem); }
  .tool-heading { max-width: 620px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .sticky-heading { position: static; }
  .scope-grid { grid-template-columns: 1fr; }
  .scope-grid article { min-height: auto; }
}

@media (max-width: 520px) {
  .site-header, main, footer { width: min(100% - 28px, 1120px); }
  .site-header { height: 64px; }
  .local-badge { display: none; }
  .tool-shell { padding-top: 38px; }
  h1 { font-size: clamp(3.2rem, 18vw, 4.7rem); }
  .converter { padding: 14px; border-radius: 18px; }
  .drop-card { min-height: 220px; padding: 22px 14px; }
  .file-row { align-items: flex-start; }
  .result-card { padding: 14px; }
  .content-section { padding: 72px 0; }
  .section-heading { margin-bottom: 28px; }
  footer { flex-direction: column; }
  .legal-page { min-height: auto; padding-top: 48px; }
}

@media (max-width: 760px) {
  .article-hero { padding: 42px 0 24px; }
  .article-grid { grid-template-columns: 1fr; }
  .flow-figure { padding: 8px; overflow: hidden; }
  .flow-figure svg { min-width: 600px; transform: translateX(-8%); }
}

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