/* Free Subtitle Generator — warm editorial theme. Light = ivory paper, Dark = espresso. */
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-latin-wght-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #fbf7f0; --bg-2: #f3ece0; --surface: #ffffff; --surface-2: #fffaf2;
  --ink: #1b1713; --ink-2: #4d443a; --ink-3: #7a6f63;
  --line: rgb(27 23 19 / .1); --line-2: rgb(27 23 19 / .18);
  --accent: #e4572e; --accent-ink: #ffffff; --accent-soft: #fde4da;
  --sage: #2f7d6a; --sage-soft: #dcefe7; --butter: #ffd166;
  --ok: #1f8f5f; --warn: #b7791f; --bad: #c0392b;
  --shadow-s: 0 1px 2px rgb(40 24 8 / .06), 0 4px 14px -6px rgb(40 24 8 / .1);
  --shadow-m: 0 2px 4px rgb(40 24 8 / .05), 0 24px 48px -20px rgb(40 24 8 / .25);
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r: 14px; --r-lg: 24px; --r-xl: 32px;
  --max: 1160px; --pad: clamp(1.1rem, 4vw, 2rem);
  --hdr: 68px;
  --sec: clamp(2rem, 4vw, 3rem);
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #12100e; --bg-2: #181512; --surface: #1d1a16; --surface-2: #231f1a;
  --ink: #f6efe4; --ink-2: #cfc5b6; --ink-3: #9b9082;
  --line: rgb(246 239 228 / .09); --line-2: rgb(246 239 228 / .18);
  --accent: #ff7a54; --accent-ink: #1a0c06; --accent-soft: #3a2118;
  --sage: #7fd0b0; --sage-soft: #1b2e27; --butter: #f2c14e;
  --shadow-s: 0 1px 2px rgb(0 0 0 / .4); --shadow-m: 0 24px 60px -24px rgb(0 0 0 / .8);
  color-scheme: dark;
}
:lang(ja), :lang(ko) { --sans: system-ui, 'Hiragino Sans', 'Yu Gothic UI', 'Noto Sans JP', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; --serif: var(--sans); }
:lang(ko) { word-break: keep-all; }
:lang(ja) { line-break: strict; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 1rem); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background .4s var(--ease), color .4s var(--ease); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { font-weight: 700; line-height: 1.3; letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .2em; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); }
a:hover { text-decoration-color: currentColor; }
img, svg, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--butter); color: #1b1713; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: .75rem; top: .75rem; z-index: 200; background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: 10px; transform: translateY(-200%); transition: transform .2s; }
.skip:focus { transform: none; }

/* ---------- buttons ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: 0 1.4rem; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-s); border-color: var(--ink-3); }
.btn:active { transform: translateY(0) scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 24px -10px var(--accent); }
.btn-primary:hover { border-color: transparent; box-shadow: 0 16px 32px -10px var(--accent); }
.btn-dark { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: .875rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, backdrop-filter .3s; }
.hdr.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-color: var(--line); }
.hdr .bar { display: flex; align-items: center; gap: 1rem; height: var(--hdr); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; }
.brand .logo { width: 34px; height: 34px; }
.nav { display: flex; gap: .15rem; margin-inline: auto; }
.nav a { padding: .55rem .9rem; border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--bg-2); }
.tools { display: flex; align-items: center; gap: .5rem; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: transform .25s var(--ease), border-color .2s; }
.icon-btn:hover { transform: rotate(12deg) scale(1.05); border-color: var(--line-2); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-btn .moon { display: none; } :root[data-theme='dark'] .theme-btn .sun { display: none; } :root[data-theme='dark'] .theme-btn .moon { display: block; }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: .5rem; height: 44px; padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .88rem; font-weight: 500; }
.lang-btn svg.chev { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.lang-btn[aria-expanded='true'] svg.chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 220px; margin: 0; padding: .4rem; list-style: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-m); animation: pop .25s var(--ease); z-index: 20; }
.lang-menu[hidden] { display: none; }
.lang-menu a { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: 0 .8rem; border-radius: 10px; text-decoration: none; font-size: .93rem; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--bg-2); outline-offset: -2px; }
.lang-menu a[aria-current] { font-weight: 700; }
.lang-menu .tick { margin-left: auto; color: var(--accent); width: 16px; height: 16px; }
.flag { width: 24px; height: 16px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px var(--line-2); }
.burger { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.sheet { display: none; border-top: 1px solid var(--line); background: var(--bg); animation: pop .3s var(--ease); }
.sheet.open { display: block; }
@media (min-width: 48.01rem) { .hdr:not(.compact) .sheet { display: none !important; } }
.sheet nav { display: grid; padding: .5rem var(--pad) 1.5rem; }
.sheet a { display: flex; align-items: center; min-height: 54px; font-family: var(--serif); font-size: 1.35rem; text-decoration: none; border-bottom: 1px solid var(--line); }
@media (max-width: 48rem) { .nav { display: none; } .burger { display: grid; } .tools { margin-left: auto; } .lang-btn .cur { display: none; } .lang-menu { position: fixed; right: 1rem; left: 1rem; top: calc(var(--hdr) + .5rem); } }
/* JS adds .compact when the full header does not fit (long labels, narrow windows) */
.hdr.compact .nav { display: none; }
.hdr.compact .burger { display: grid; }
.hdr.compact .tools { margin-left: auto; }
.hdr.compact .lang-btn .cur { display: none; }
.hdr.compact .lang-menu { position: fixed; right: 1rem; left: 1rem; top: calc(var(--hdr) + .5rem); }
@media (max-width: 30rem) { .brand span { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(3rem, 8vw, 6rem) 0 2rem; text-align: center; overflow: clip; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: -1; pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.blob.a { width: 520px; height: 520px; background: var(--accent-soft); left: -140px; top: -120px; }
.blob.b { width: 460px; height: 460px; background: var(--sage-soft); right: -120px; top: 40px; animation-delay: -6s; }
.blob.c { width: 360px; height: 360px; background: color-mix(in srgb, var(--butter) 40%, transparent); left: 40%; top: 260px; animation-delay: -11s; }
@keyframes drift { to { transform: translate3d(60px, 40px, 0) scale(1.12); } }
.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .95rem; border-radius: 18px; text-align: center; max-width: 100%; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-s); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.6rem, 1.2rem + 6.4vw, 5.6rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.02; max-width: 15ch; margin: 1.1rem auto 1.2rem; }
.hero h1 em { font-style: italic; color: var(--accent); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ''; position: absolute; left: 0; right: 0; bottom: .02em; height: .14em; background: var(--butter); z-index: -1; border-radius: 4px; transform-origin: left; animation: swipe 1.1s .7s var(--ease) both; }
@keyframes swipe { from { transform: scaleX(0); } }
.hero .lead { max-width: 640px; margin: 0 auto 1.6rem; font-size: clamp(1.05rem, 1rem + .35vw, 1.28rem); color: var(--ink-2); }
.word { display: inline-block; opacity: 0; transform: translateY(.5em); filter: blur(8px); animation: wordin .9s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 100ms); }
@keyframes wordin { to { opacity: 1; transform: none; filter: none; } }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem .5rem; list-style: none; padding: 0; margin: 1.6rem 0 0; }
.trust li { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; font-size: .86rem; font-weight: 500; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); }
.trust svg { width: 15px; height: 15px; color: var(--ok); }

/* ---------- tool ---------- */
.tool { position: relative; max-width: 960px; margin: 2.2rem auto 0; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-m); padding: clamp(1rem, 3vw, 1.75rem); }
.tool::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--ang, 0deg), var(--accent), var(--butter), var(--sage), var(--accent)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; animation: spin 8s linear infinite; pointer-events: none; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --ang: 360deg; } }
.drop { display: grid; place-items: center; text-align: center; gap: .6rem; min-height: 260px; padding: 2rem 1rem; border: 2px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface-2); cursor: pointer; transition: border-color .25s, background .25s, transform .3s var(--ease); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.005); }
.drop .up { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 24px -10px var(--accent); animation: float 3.5s ease-in-out infinite; }
.drop .up svg { width: 28px; height: 28px; }
@keyframes float { 50% { transform: translateY(-6px); } }
.drop strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.drop small { color: var(--ink-3); }
.hidden { display: none !important; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin: 1rem 0; }
.field label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .35rem; }
:lang(ja) .field label, :lang(ko) .field label { text-transform: none; letter-spacing: 0; }
.field select, .field input, .field textarea { width: 100%; min-height: 48px; padding: .7rem .9rem; background: var(--bg); border: 1.5px solid var(--line-2); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 150px; resize: vertical; }
.field select:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.fileinfo { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-radius: 14px; background: var(--bg-2); }
.fileinfo .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--sage-soft); color: var(--sage); display: grid; place-items: center; flex: none; }
.fileinfo .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileinfo .meta { color: var(--ink-3); font-size: .85rem; font-family: var(--mono); }
.fileinfo > div { min-width: 0; flex: 1; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.prog { margin: 1.2rem 0; }
.bar-track { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--butter)); transition: width .4s var(--ease); background-size: 200% 100%; animation: shine 2s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.prog p { margin: .6rem 0 0; font-size: .92rem; color: var(--ink-2); }
.err { padding: .9rem 1rem; border-radius: 12px; background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); color: var(--ink); margin-top: 1rem; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem; margin-top: 1rem; }
@media (max-width: 52rem) { .editor { grid-template-columns: 1fr; } }
.player { --ar: 1.7778; display: grid; gap: .6rem; align-content: start; min-width: 0; }
.stage { position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: var(--ar); width: min(100%, calc(min(62vh, 460px) * var(--ar))); margin-inline: auto; container-type: inline-size; cursor: pointer; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage .cap { position: absolute; left: 5%; right: 5%; bottom: 6%; text-align: center; color: #fff; font: 600 clamp(11px, 3.1cqw, 18px)/1.3 var(--sans); pointer-events: none; white-space: pre-line; }
.stage .cap span { background: rgb(0 0 0 / .6); padding: .08em .4em; border-radius: 5px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.stage:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.stage:fullscreen .cap { font-size: clamp(16px, 2.4cqw, 34px); bottom: 8%; }
.pbar { display: flex; align-items: center; gap: .4rem; padding: .3rem .5rem; background: var(--bg-2); border-radius: 999px; }
.pbtn { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.pbtn:hover { background: var(--line); }
.pbtn:active { transform: scale(.92); }
#pp { background: var(--accent); color: var(--accent-ink); }
#pp:hover { background: var(--accent); filter: brightness(1.08); }
.pbtn svg { width: 18px; height: 18px; }
.ic-pause, .ic-muted { display: none; }
.ic-play, .ic-vol { display: inline-flex; }
.pbar.playing .ic-play, .pbar.muted .ic-vol { display: none; }
.pbar.playing .ic-pause, .pbar.muted .ic-muted { display: inline-flex; }
.ptime { font: 500 .78rem var(--mono); color: var(--ink-2); min-width: 2.6em; text-align: center; }
.pseek { flex: 1; min-width: 0; height: 28px; accent-color: var(--accent); cursor: pointer; }
.cues { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); padding: .4rem; }
.cue { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; padding: .7rem .8rem; border-radius: 12px; transition: background .2s; }
.cue.active { background: var(--accent-soft); }
.cue .tc { font: 500 .78rem var(--mono); color: var(--ink-3); cursor: pointer; padding-top: .25rem; }
.cue .tc:hover { color: var(--accent); }
.cue textarea { width: 100%; min-height: 2.4em; resize: none; background: transparent; border: 0; border-radius: 8px; padding: .1rem .3rem; line-height: 1.4; overflow: hidden; }
.cue textarea:focus { outline: 2px solid var(--accent); background: var(--surface); }
.exports { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; align-items: center; }
.exports .lbl { font-weight: 600; margin-right: .3rem; }
.note-mini { font-size: .85rem; color: var(--ink-3); margin-top: .8rem; }
.spk { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* hero demo (decorative) */
.demo { position: relative; margin: 3rem auto 0; max-width: 820px; border-radius: var(--r-xl); background: linear-gradient(135deg, #2b2118, #4a2f20 60%, #6b3b25); aspect-ratio: 16 / 8.2; overflow: hidden; box-shadow: var(--shadow-m); border: 1px solid var(--line); }
.demo::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, rgb(255 209 102 / .35), transparent 45%), radial-gradient(circle at 20% 80%, rgb(228 87 46 / .35), transparent 45%); }
.demo .hud { position: absolute; top: 1rem; left: 1.2rem; right: 1.2rem; display: flex; justify-content: space-between; font: 500 .8rem var(--mono); color: rgb(255 255 255 / .75); }
.demo .hud b { color: #ff7a54; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.demo .wave { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1.2rem; height: 54px; display: flex; align-items: center; gap: 3px; }
.demo .wave i { flex: 1; min-width: 2px; border-radius: 3px; background: rgb(255 255 255 / .35); height: 20%; animation: wv 1.1s ease-in-out infinite; animation-delay: calc(var(--k) * -90ms); }
@keyframes wv { 50% { height: var(--h, 80%); background: rgb(255 209 102 / .9); } }
.demo .live { position: absolute; left: 6%; right: 6%; bottom: 28%; text-align: center; font: 700 clamp(1rem, 3.2vw, 2rem)/1.3 var(--sans); color: #fff; }
.demo .live span { opacity: .25; transition: opacity .3s, color .3s, transform .3s var(--ease); display: inline-block; margin: 0 .12em; }
.demo .live span.on { opacity: 1; color: var(--butter); transform: scale(1.08); }
.demo .live span.done { opacity: 1; }

/* ---------- sections ---------- */
section.s { padding: var(--sec) 0; }
.s.alt { background: var(--bg-2); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; }
:lang(ja) .eyebrow, :lang(ko) .eyebrow { letter-spacing: .04em; text-transform: none; }
.s-head { max-width: 720px; margin-bottom: 2.5rem; }
.s-head.c { margin-inline: auto; text-align: center; }
.s-head h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); font-weight: 400; }
.s-head p { color: var(--ink-2); font-size: 1.1rem; }
.grid { --cols: 4; --gap: 1.1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.grid > * { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; }
.grid.g3 { --cols: 3; }
@media (max-width: 64rem) { .grid, .grid.g3 { --cols: 2; } }
@media (max-width: 40rem) { .grid, .grid.g3 { --cols: 1; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--shadow-s); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-m); border-color: var(--line-2); }
.card h3 { font-size: 1.4rem; margin-bottom: .45rem; }
.card p { color: var(--ink-2); margin: 0; font-size: .98rem; }
.ico-c { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 1rem; background: var(--accent-soft); color: var(--accent); }
.ico-c.s2 { background: var(--sage-soft); color: var(--sage); }
.ico-c svg { width: 24px; height: 24px; }
.steps { counter-reset: st; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: st; position: relative; padding: 1.6rem 1.4rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.steps li::before { content: counter(st, decimal-leading-zero); font: italic 400 2.6rem/1 var(--serif); color: var(--accent); display: block; margin-bottom: .6rem; }
.steps h3 { font-size: 1.25rem; } .steps p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.split { display: grid; gap: clamp(1.5rem, 5vw, 4rem); grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .7rem; }
.checks li { display: flex; gap: .7rem; align-items: flex-start; }
.checks svg { width: 20px; height: 20px; color: var(--ok); flex: none; margin-top: .25rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; text-align: center; }
.stat b { display: block; font: 400 clamp(2.4rem, 5vw, 3.8rem)/1 var(--serif); color: var(--accent); } .stat span { color: var(--ink-2); font-size: .95rem; }
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 1.1rem 0; mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 3rem; width: max-content; animation: mq 40s linear infinite; font: 400 1.6rem var(--serif); color: var(--ink-2); white-space: nowrap; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; font-size: .97rem; }
.table th, .table td { padding: .95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border: 0; } .table th { background: var(--bg-2); font-weight: 600; }
.table td.y { color: var(--ok); font-weight: 600; } .table td.n { color: var(--ink-3); }
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.cta-band { text-align: center; padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad); border-radius: var(--r-xl); background: var(--ink); color: var(--bg); position: relative; overflow: hidden; }
.cta-band h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); font-weight: 400; max-width: 18ch; margin-inline: auto; }
.cta-band p { color: color-mix(in srgb, var(--bg) 75%, transparent); max-width: 560px; margin: 0 auto 1.6rem; }
.cta-band::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: var(--accent); filter: blur(100px); opacity: .45; right: -100px; top: -150px; }
.cta-band > * { position: relative; }

/* ---------- faq ---------- */
.faq { display: grid; gap: .7rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; transition: border-color .2s, box-shadow .3s; }
.faq details[open] { border-color: var(--line-2); box-shadow: var(--shadow-s); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 1.4rem; display: flex; align-items: center; gap: 1rem; font-weight: 600; font-size: 1.04rem; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; font: 300 1.8rem/1 var(--serif); color: var(--accent); transition: transform .35s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 1.4rem 1.3rem; color: var(--ink-2); animation: fade .4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } }
.fix { display: grid; gap: 1rem; }
.fix article { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 16px; padding: 1.4rem 1.5rem; }
.fix h3 { font-size: 1.35rem; } .fix ol, .fix ul { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--ink-2); } .fix li { margin-bottom: .35rem; }
.fix .tag { display: inline-block; font: 600 .75rem var(--mono); background: var(--accent-soft); color: var(--accent); padding: .15rem .55rem; border-radius: 6px; margin-bottom: .6rem; }

/* ---------- page / article ---------- */
.page-h { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; }
.page-h h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.4rem); font-weight: 400; max-width: 18ch; }
.page-h p { font-size: 1.2rem; color: var(--ink-2); max-width: 640px; }
.crumbs { font-size: .88rem; color: var(--ink-3); padding-top: 1.2rem; } .crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); margin-top: 2.2em; } .prose h3 { font-size: 1.3rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; } .prose li { margin-bottom: .45rem; }
.prose p, .prose li { color: var(--ink-2); } .prose strong { color: var(--ink); }
.prose .eff { font: 500 .85rem var(--mono); color: var(--ink-3); }
.callout { padding: 1.2rem 1.4rem; border-radius: 16px; background: var(--sage-soft); border: 1px solid color-mix(in srgb, var(--sage) 35%, transparent); margin: 1.5rem 0; }
.callout p { margin: 0; color: var(--ink); }
.gsteps { counter-reset: g; list-style: none; padding: 0; display: grid; gap: 1rem; }
.gsteps li { counter-increment: g; display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.gsteps li::before { content: counter(g); width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 600 1.05rem var(--serif); }
.gsteps h3 { font-size: 1.2rem; margin: 0 0 .25rem; } .gsteps p { margin: 0; color: var(--ink-2); }
.gcard { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; padding: 0; }
.gcard .gimg { aspect-ratio: 16 / 9; display: grid; place-items: center; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; position: relative; overflow: hidden; }
.gcard .gimg svg { width: 56px; height: 56px; transition: transform .5s var(--ease); } .gcard:hover .gimg svg { transform: scale(1.15) rotate(-4deg); }
.gcard .gb { padding: 1.3rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.gcard h3 { font-size: 1.35rem; margin: 0; } .gcard .meta { font-size: .8rem; color: var(--ink-3); font-family: var(--mono); }
.more { color: var(--accent); font-weight: 600; margin-top: auto; padding-top: .5rem; }
.related { display: grid; gap: .8rem; }
.related a { padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; background: var(--surface); transition: transform .3s var(--ease), border-color .2s; font-weight: 600; }
.related a:hover { transform: translateX(6px); border-color: var(--accent); }
.form { display: grid; gap: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.3rem, 4vw, 2.2rem); box-shadow: var(--shadow-m); }
.form .ok { padding: 1rem 1.2rem; border-radius: 12px; background: var(--sage-soft); border: 1px solid var(--sage); }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.ftr { margin-top: 0; border-top: 1px solid var(--line); background: var(--bg-2); padding: 3.5rem 0 2rem; }
.ftr .cols { display: grid; gap: 2rem; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); }
@media (max-width: 52rem) { .ftr .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ftr .cols > :first-child { grid-column: 1 / -1; } }
.ftr h2 { font: 700 .75rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem; }
:lang(ja) .ftr h2, :lang(ko) .ftr h2 { letter-spacing: .02em; text-transform: none; }
.ftr ul { list-style: none; margin: 0; padding: 0; } .ftr li a { display: inline-flex; min-height: 38px; align-items: center; text-decoration: none; color: var(--ink-2); font-size: .95rem; } .ftr li a:hover { color: var(--accent); }
.ftr .tag { color: var(--ink-2); max-width: 28ch; }
.ftr .fine { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- lang banner ---------- */
.lbanner { background: var(--ink); color: var(--bg); font-size: .92rem; }
.lbanner .in { display: flex; align-items: center; gap: .8rem; padding-block: .5rem; }
.lbanner p { margin: 0; flex: 1; } .lbanner a, .lbanner button { color: inherit; min-height: 40px; }
.lbanner .go { background: var(--accent); color: var(--accent-ink); padding: 0 1rem; border-radius: 99px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.lbanner button { background: none; border: 0; cursor: pointer; opacity: .8; padding: 0 .6rem; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.rv.in { opacity: 1; transform: none; }
.js-off .rv { opacity: 1; transform: none; }


.note-mini svg { display: inline; vertical-align: -2px; }
.cue .tc { font-size: .8rem; min-width: 3.2rem; }

@media (max-width: 30rem) { .gsteps li { padding: 1rem; gap: .75rem; } .card { padding: 1.3rem; } }

/* ---------- subtitle list: motion + spacing ---------- */
.cue { position: relative; row-gap: .6rem; transition: background .25s; }
.cue:hover { background: var(--bg-2); }
.cue.active { background: var(--accent-soft); animation: cueFlash 1.1s ease-out 1; }
.cue::before { content: ''; position: absolute; left: 0; top: .7rem; bottom: .7rem; width: 3px; border-radius: 3px; background: var(--accent); transform: scaleY(0); transition: transform .4s var(--ease); }
.cue.active::before { transform: scaleY(1); }
.cue.active .tc { color: var(--accent); }
.cues.enter .cue { animation: cueIn .65s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.cue.out { animation: cueOut .28s ease forwards !important; }
.cue textarea { padding: .35rem .55rem; border-radius: 10px; transition: background .2s, outline-color .2s; }
.cue textarea:focus { outline-offset: 0; }
.cue .btn { margin-top: .1rem; transition: transform .25s var(--ease), background .2s, border-color .2s; }
.cue .btn:hover { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: var(--bad); }
.stage .cap span { animation: capIn .4s var(--ease) both; }
.exports .btn { animation: fade .6s var(--ease) both; }
.exports .btn:nth-child(2) { animation-delay: .05s; } .exports .btn:nth-child(3) { animation-delay: .1s; } .exports .btn:nth-child(4) { animation-delay: .15s; } .exports .btn:nth-child(5) { animation-delay: .2s; }
@keyframes cueIn { from { opacity: 0; transform: translateX(26px) scale(.97); } }
@keyframes cueOut { to { opacity: 0; transform: translateX(-30px) scale(.96); } }
@keyframes cueFlash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 .9rem transparent; } }
@keyframes capIn { from { opacity: 0; transform: translateY(.45em) scale(.94); } }

/* ---------- language-proofing: long labels never wrap inside controls ---------- */
.nav a, .lang-btn, .pbtn, .more { white-space: nowrap; }
.nav a { padding-inline: .8rem; }
.hdr.nocta .cta-h { display: none; }
.btn, .lang-btn, .ad-sound { flex-shrink: 0; }
.exports { row-gap: .6rem; }
@media (max-width: 40rem) {
  .table th, .table td { padding: .7rem .6rem; font-size: .84rem; overflow-wrap: anywhere; }
  .table th:first-child { width: 30%; }
  .pill { font-size: .76rem; padding: .35rem .8rem; }
  .trust li { font-size: .8rem; padding: .4rem .75rem; }
}

/* language chips */
.lchips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; max-width: 900px; margin-inline: auto; }
.lchips span { padding: .5rem 1rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .95rem; transition: transform .3s var(--ease), border-color .2s, background .2s; }
.lchips span:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--accent-soft); }
.lchips .more-l { background: var(--ink); color: var(--bg); border-color: transparent; font-weight: 600; }
.trust li { border-radius: 16px; text-align: center; }

/* About the tool: long text + sticky checklist card */
#about-tool .split { align-items: start; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
#about-tool p { color: var(--ink-2); }
#about-tool p:first-of-type { font-size: 1.12rem; color: var(--ink); }
.acard { position: sticky; top: calc(var(--hdr) + 1.5rem); padding: 1.6rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-s); }
.acard .checks { margin: 0; gap: .95rem; }
@media (max-width: 52rem) { #about-tool .split { grid-template-columns: 1fr; } .acard { position: static; } }

/* tighter rhythm around the promo */

/* ---------- consistent vertical rhythm ----------
   Every section boundary = 2 x --sec (padding above + below). Nothing else adds extra space. */
.s-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.page-h { padding-bottom: 1rem; }
.hero { padding-bottom: 2rem; }
.prose > h2:first-child, .prose > .rv:first-child > h2:first-child, .prose > div:first-child > h2:first-child { margin-top: 0; }
.s .s-head:last-child, .s p:last-child { margin-bottom: 0; }

/* content blocks on inner pages + CTA rows */
[data-blk] { padding-bottom: var(--sec); }
.more-row { text-align: center; margin-top: clamp(1.5rem, 3vw, 2rem) !important; }
.page-h { padding-top: clamp(1.25rem, 3vw, 2rem); }
article.wrap.narrow { padding-bottom: var(--sec); }
.crumbs { padding-bottom: 0; }
/* no extra margins inside padded sections: the section token does all the spacing */
.s .callout { margin: 0; }
.prose > :last-child, .prose > .rv:last-child > :last-child, .prose > div:last-child > :last-child { margin-bottom: 0; }
.s .table-wrap, .s .grid, .s .faq, .s .steps, .s .lchips, .s .stats { margin-bottom: 0; }
.page-h p:last-child { margin-bottom: 0; }
.related { margin-bottom: 0; }
.marquee { margin-top: 0; }
.page-h { padding-inline: var(--pad); }

/* header: nothing in the bar may wrap or shrink, whatever the language */
.brand { white-space: nowrap; flex: none; }
.hdr .bar { min-width: 0; }
.nav { min-width: 0; flex: 1 1 auto; justify-content: center; margin-inline: 0; }
.nav a { white-space: nowrap; padding-inline: .7rem; }
.tools { flex: none; }
.tools > * { flex: none; }
.lang-btn, .icon-btn, .btn { white-space: nowrap; }

/* footer: link labels never wrap. 1 column on phones, 3 columns when they fit, then brand + 3 columns. */
.ftr .cols { grid-template-columns: 1fr; gap: 1.75rem; }
.ftr .cols > :first-child { grid-column: auto; max-width: none; }
.ftr li a { white-space: nowrap; }
@media (min-width: 36rem) { .ftr .cols { grid-template-columns: repeat(3, auto); justify-content: space-between; } .ftr .cols > :first-child { grid-column: 1 / -1; } }
@media (min-width: 62rem) { .ftr .cols { grid-template-columns: minmax(16rem, 1.4fr) repeat(3, auto); gap: 2rem 3rem; } .ftr .cols > :first-child { grid-column: auto; } }

/* hero badge: on small phones keep just the first phrase so it never wraps */
@media (max-width: 30rem) { .pill .psep, .pill .pb { display: none; } }
.pill { white-space: nowrap; }
/* trust chips and stat captions stay on one line */
.trust li { white-space: nowrap; }
@media (max-width: 26rem) { .trust li { font-size: .72rem; padding: .35rem .6rem; gap: .3rem; } .trust svg { width: 12px; height: 12px; } }
.stats { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.stat span { white-space: nowrap; }
.callout a, .faq .ans a { white-space: nowrap; }

.gmeta { display: flex; flex-wrap: wrap; gap: .15rem .6rem; font: 500 .85rem var(--mono); color: var(--ink-3); margin-top: 1rem; }
/* long unbreakable strings (URLs, German compounds) must never push the page sideways */
.prose a, .faq .ans a { overflow-wrap: anywhere; }

/* very long single words (German titles etc.): hyphenate with the page language, break only if needed */
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.page-h h1 { font-size: clamp(1.9rem, 1.1rem + 4.2vw, 4.4rem); }

/* footer with a popular-guides column */
.ftr .gcol a { white-space: normal; max-width: 19rem; line-height: 1.35; padding-block: .3rem; }
@media (min-width: 36rem) { .ftr .cols { grid-template-columns: repeat(2, auto); justify-content: space-between; } }
@media (min-width: 62rem) { .ftr .cols { grid-template-columns: minmax(14rem, 1.2fr) repeat(4, auto); gap: 2rem 2.5rem; } }

.explore { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0; }
.explore a { padding: .55rem 1rem; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; transition: transform .25s var(--ease), border-color .2s; }
.explore a:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* the header CTA never shows in the phone layout or in compact mode (it is in the menu sheet and the hero) */
@media (max-width: 48rem) { .cta-h { display: none; } }
.hdr.compact .cta-h { display: none; }

/* long-form home article */
.longform { padding-block: 0; }
.toc { margin: 0 0 2.5rem; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2rem; }
.toc li { break-inside: avoid; margin-bottom: .35rem; }
.toc a { text-decoration: none; color: var(--ink-2); font-size: .95rem; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 40rem) { .toc ol { columns: 1; } }
.lf { margin-bottom: 2.25rem; scroll-margin-top: calc(var(--hdr) + 1rem); }
.lf h3 { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.9rem); margin-bottom: .6em; }
.lf p { color: var(--ink-2); font-size: 1.06rem; }
.lf p:last-child { margin-bottom: 0; }
.steps-l { margin: 0 0 1em; padding-left: 1.4rem; color: var(--ink-2); }
.steps-l li { margin-bottom: .6rem; padding-left: .3rem; }
.steps-l li::marker { color: var(--accent); font-weight: 700; }
.lf a { color: var(--accent); text-underline-offset: .2em; }

.kicker { display: inline-block; margin-bottom: .6rem; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.kicker:hover { text-decoration: underline; }
:lang(ja) .kicker, :lang(ko) .kicker { letter-spacing: .04em; text-transform: none; font-size: .85rem; }
@media (max-width: 26rem) { .kicker, .eyebrow { font-size: .68rem; letter-spacing: .05em; } }

/* footer: three nav columns (guides column removed) */
.ftr .cols { grid-template-columns: 1fr; }
@media (min-width: 36rem) { .ftr .cols { grid-template-columns: repeat(3, auto); justify-content: space-between; } .ftr .cols > :first-child { grid-column: 1 / -1; } }
@media (min-width: 62rem) { .ftr .cols { grid-template-columns: minmax(16rem, 1.4fr) repeat(3, auto); gap: 2rem 3rem; } .ftr .cols > :first-child { grid-column: auto; } }
/* heading gaps: "Keep reading", first about heading, long guide sections */
.prose > .rv > h2.rh, .prose > h2.rh { margin: 2.2rem 0 1.1rem; line-height: 1.2; }
.wrap.prose[data-blk] > .rv:first-child > h2:first-child { margin-top: clamp(2.25rem, 4vw, 3rem); }
.gmore { margin-top: clamp(2rem, 4vw, 3rem); }
.gmore > h2 { margin-top: 0; line-height: 1.2; margin-bottom: .9rem; }
.gmore > :last-child { margin-bottom: 0; }
.gmore p { margin: 0 0 1rem; } .gmore ul { margin: 0 0 1rem; }
.ai-note { margin-top: .3rem; }

/* heading levels: guide steps, the guides index cards and troubleshooting items are h2 (directly under the page h1) */
.gsteps h2 { font-size: 1.2rem; margin: 0 0 .25rem; }
.gcard h2 { font-size: 1.35rem; margin: 0; }
.fix h2 { font-size: 1.35rem; }
