@font-face {
  font-family: Studio Sans;
  src: url('./studio-sans.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box }
:root { color-scheme: light }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 "Studio Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main, .bar, footer > div {
  inline-size: min(1240px, calc(100% - clamp(40px, 9vw, 144px)));
  margin-inline: auto;
}
header { position: relative; z-index: 3; border-block-end: 1px solid var(--hair) }
.bar, footer > div, nav, .brand, .hero-actions, figcaption, .catalog-head, .time-tools {
  display: flex; align-items: center; gap: 16px;
}
.bar, footer > div, .catalog-head { justify-content: space-between }
.bar { min-block-size: 76px }
nav { gap: clamp(14px, 3vw, 38px); font-size: .88rem; font-weight: 650 }
.brand { gap: 11px; font-size: clamp(1.05rem,2vw,1.35rem); font-weight: 780; letter-spacing: -.055em; line-height: 1.15 }
.brand i { flex: 0 0 35px; block-size: 35px; display: grid; place-items: center; position: relative }
a { color: inherit; text-decoration: none }
nav > a, footer a, .browse-action, .crumb a { text-underline-offset: .23em }
nav > a:hover, footer a:hover, .browse-action:hover, .crumb a:hover { text-decoration: underline }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
h1,h2,h3,p,dl,dd,figure { margin: 0 }
h1,h2,h3, strong, .tool, .related a { overflow-wrap: anywhere }
h1,h2,h3 { text-wrap: balance }
h1 { font-size: clamp(3rem,6.1vw,6.35rem); line-height: .96; letter-spacing: -.075em; font-weight: 700 }
h2 { font-size: clamp(2.05rem,3.8vw,3.55rem); line-height: 1.04; letter-spacing: -.06em; font-weight: 680 }
h3 { font-size: 1.05rem; line-height: 1.25; letter-spacing: -.025em }
button,input,textarea,select { font: inherit; color: inherit }
button,summary,select { cursor: pointer }
.lang { position: relative }
.lang summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--nav-radius); white-space: nowrap; list-style: none;
}
.lang summary::-webkit-details-marker { display:none }
.lang summary::after { content: ''; width: 7px; height: 7px; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg) }
.lang[open] summary::after { transform: translateY(2px) rotate(225deg) }
.lang > div {
  position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0; min-width: 176px;
  max-height: 58vh; overflow-y: auto; padding: 6px; border: 1px solid var(--hair);
  background: var(--surface); border-radius: 12px; box-shadow: 0 12px 32px #151b2220;
}
.lang a { display: block; padding: 9px 12px; border-radius: 6px }
.lang a:hover, .lang a:focus-visible { background:var(--pale) }
.hero {
  display:grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); align-items:center;
  gap:clamp(28px,5vw,82px); padding-block:clamp(42px,5.7vw,84px);
}
.hero > *,.work > *, .work .intro { min-width: 0 }
.desc { margin-top: 20px; font-size: clamp(1.03rem,1.6vw,1.19rem); color: var(--muted); line-height: 1.55; max-width: 47ch }
.hero-actions { flex-wrap: wrap; margin-top: 27px; gap: 12px 22px }
.jump, .download, .converter button[type=submit], .demo-try {
  display:inline-flex; align-items:center; justify-content:center; gap:10px; border:1px solid transparent;
  background:var(--action); color:var(--action-ink); padding:12px 20px; min-height:48px;
  border-radius:var(--button-radius); font-weight:700; font-size:.94rem; line-height:1.28; text-align:center;
}
.jump:hover, .converter button[type=submit]:hover, .download:hover { background:var(--action-hover) }
.browse-action { font-size: .92rem; font-weight: 650; color: var(--ink); padding-block: 10px }
.hero > div > .jump { margin-top: 24px }
.demo { min-inline-size:0; isolation:isolate; position:relative }
.demo video, .demo audio { display:block; inline-size:100% }
.demo video { aspect-ratio:16/9; object-fit:cover; background:#172024 }
figcaption { position:relative; flex-wrap:wrap; gap:7px 14px; font-size:.8rem; line-height:1.4 }
figcaption > span:first-child { margin-inline-end:auto }
figcaption a { font-weight:650; text-underline-offset:.2em }
figcaption a:hover { text-decoration:underline }
.demo-try { color:inherit; border-color:currentColor; background:transparent; min-height:36px; padding:5px 10px; font-size:.8rem }
#tools { border-block-start:1px solid var(--line); padding-block:clamp(32px,4vw,60px) clamp(44px,6vw,96px); scroll-margin-block:12px }
.catalog-head { flex-wrap:wrap; align-items:end; gap:14px 30px }
.tool-search { position:relative; width:min(340px,100%); font-size:.8rem; font-weight:650; color:var(--muted) }
.tool-search input { margin-top:4px; background-color:var(--surface); border-radius:var(--nav-radius); padding:10px 12px; padding-inline-end:38px; min-height:42px }
.tool-search::after { content:''; pointer-events:none; position:absolute; inset-inline-end:14px; bottom:14px; width:12px; height:12px; border:1.6px solid currentColor; border-radius:50% }
.tool-search::before { content:''; pointer-events:none; position:absolute; inset-inline-end:11px; bottom:12px; width:7px; border-top:1.6px solid; transform:rotate(45deg) }
.tool-group { margin-top:32px }
.tool-group h3 { margin-bottom:13px }
.cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px }
.tool { position:relative; display:grid; gap:5px; background:var(--surface); line-height:1.3; min-width:0 }
.tool strong { font-weight:650; letter-spacing:-.025em }
.tool span { color:var(--muted); font-size:.78rem; display:flex; gap:6px; justify-content:space-between; align-items:center }
.tool b { color:var(--action); font-size:1.05rem }
.no-tools { padding-block:24px; color:var(--muted) }
.no-tools button, .time-tools button { background:var(--surface); border:1px solid var(--line); border-radius:var(--nav-radius); padding:7px 12px; font-weight:600 }
.crumb { padding-block:22px 4px; font-size:.82rem; color:var(--muted); overflow-wrap:anywhere }
.crumb span { margin-inline:6px; opacity:.65 }
.work { display:grid; grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); align-items:start; gap:clamp(24px,6vw,94px); padding-block:clamp(22px,3.8vw,56px) clamp(36px,5vw,78px) }
.work h1 { font-size:clamp(2.6rem,4.75vw,4.65rem); line-height:1; letter-spacing:-.065em }
.work .desc { font-size:1.07rem; margin-top:16px }
.spec { display:grid; gap:0; margin-top:26px }
.spec > div { display:grid; grid-template-columns: minmax(80px,.45fr) minmax(0,1fr); align-items:baseline; gap:12px; border-top:1px solid var(--hair); padding-block:9px; font-size:.86rem }
.spec dt { color:var(--muted) }
.spec dd { font-weight:650; overflow-wrap:anywhere }
.converter { padding:clamp(18px,2.4vw,34px); min-width:0; background:var(--surface); border:1px solid var(--line); border-radius:var(--panel-radius) }
label { min-width:0; display:grid; gap:6px; font-size:.9rem; font-weight:650 }
input,select,textarea { width:100%; min-width:0; border-radius:6px; border:1px solid var(--line); background:var(--surface); padding:10px 12px }
textarea { resize:vertical; line-height:1.45 }
input[type=file] { font-size:.84rem; padding:7px }
input[type=file]::file-selector-button { padding:6px 10px; border:0; font:inherit; border-radius:4px; background:var(--pale); color:var(--ink); margin-inline-end:8px; cursor:pointer }
.picker { margin-block-end:16px }
.drop-zone {
  position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  gap:5px; min-height:164px; border:1.5px dashed var(--dash); border-radius:var(--field-radius);
  background:var(--pale); padding:18px 22px; cursor:pointer;
}
.drop-zone::before {
  content:'↑'; display:grid; place-items:center; width:42px; height:42px; font:500 27px/1 Arial,sans-serif;
  color:var(--pick-ink); background:var(--pick-fill); border:1px solid var(--dash);
  border-radius:var(--button-radius); margin-bottom:6px;
}
.drop-zone:focus-within, .drop-zone[data-dragging], .drop-zone:hover { border-color:var(--action); outline:2px solid var(--action); outline-offset:2px }
.picker-title { display:block; font-size:1.04rem; font-weight:700; letter-spacing:-.025em }
.picker-hint, .file-summary, .result-meta { font-size:.84rem; color:var(--muted); font-weight:500; overflow-wrap:anywhere }
.fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr)); gap:12px }
.fields:not(:empty) { margin-top:14px }
.limit,.status { font-size:.84rem; color:var(--muted); margin-block:14px; line-height:1.44 }
.status:empty { margin:0 }
.converter button[type=submit] { width:100% }
button:disabled { opacity:.63; cursor:progress }
.source-preview,.result-preview { display:block; width:100%; max-height:260px; margin-block:12px; object-fit:contain; border-radius:6px }
audio.source-preview, audio.result-preview { height:42px }
.signal { display:block; width:100%; height:58px; margin-block:12px }
.time-tools { flex-wrap:wrap; gap:7px; margin-top:9px; font-size:.82rem }
.result { margin-top:15px; border-top:1px solid var(--line); padding-top:14px }
.result-text { max-height:17em; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; background:var(--pale); padding:14px; border-radius:var(--field-radius) }
.result .download { max-width:100%; margin-top:10px; overflow-wrap:anywhere }
.tool-guide,.related { border-top:1px solid var(--line); padding-block:clamp(26px,4vw,54px) }
.tool-guide h2,.related h2 { font-size:clamp(1.7rem,2.7vw,2.65rem) }
.guide-example { margin-top:18px; max-width:72ch; padding-inline-start:18px; border-inline-start:3px solid var(--action) }
.guide-example p,.guide-help p { margin-top:7px; color:var(--muted); line-height:1.65 }
.guide-help { max-width:75ch; margin-top:19px; border:1px solid var(--hair); border-radius:var(--field-radius); background:var(--surface); padding:12px 16px }
.guide-help summary { color:var(--ink); font-weight:650 }
.related>div { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px }
.related a { border:1px solid var(--line); background:var(--surface); border-radius:var(--nav-radius); padding:10px 14px; font-size:.89rem; font-weight:550 }
.related a:hover { border-color:var(--action); background:var(--pale) }
footer { border-top:1px solid var(--line); background:var(--footer) }
footer > div { min-height:92px; font-size:.85rem }
[hidden] { display:none!important }

@media (min-width:1000px) {
   .tool-guide { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:5vw; align-items:start }
  .guide-example,.guide-help { margin-top:0 }
  .guide-help { padding:18px 20px }
}
@media (max-width:900px) {
  .hero { gap:26px }
  .cards { grid-template-columns:repeat(2,minmax(0,1fr)) }
}
@media (max-width:760px) {
  .bar { min-height:63px }
  .hero,.work { grid-template-columns:minmax(0,1fr) }
  .hero { padding-block:32px; gap:24px }
  .hero h1 { max-width:18ch }
  .desc,.work .desc { margin-top:12px }
  .hero-actions { margin-top:18px }
  .work { gap:16px }
  .work .intro { display:contents }
  .work h1 { order:0 }
  .work .intro .desc { order:1; margin:0 }
  .work .converter { order:2 }
  .work .intro aside { order:3 }
  .work .spec { margin:0 }
  .catalog-head { align-items:start }
}
@media (max-width:540px) {
  main, .bar, footer > div { inline-size:calc(100% - 32px) }
  .bar, nav { gap:8px }
  nav > a { display:none }
  .lang summary { padding-inline:10px; gap:8px; font-size:.79rem; white-space:normal }
  .brand { gap:7px }
  .brand i { flex-basis:29px; block-size:29px }
  h1 { font-size:clamp(2.65rem,12.7vw,4rem) }
  .cards { grid-template-columns:1fr; gap:8px }
  .tool-group { margin-top:25px }
  .tool-search { width:100% }
  .hero-actions { gap:6px 14px }
  .work h1 { font-size:clamp(2.45rem,10vw,3.25rem) }
  .drop-zone { min-height:130px }
}
.drop-zone input[type=file] {
  position:absolute; inset:0; width:100%; height:100%; padding:0; border:0;
  opacity:0; cursor:pointer;
}
.file-summary { margin-block:-4px 12px }
.result-preview { max-height:none }
.result-preview:empty { display:none }
.result-preview :is(video,img,audio) { display:block; width:100%; max-height:260px; object-fit:contain; border-radius:6px }
.result-preview :is(img,video) { background:#151b20 }
.result-preview audio { height:42px }
.text-count { display:block; text-align:end; color:var(--muted); font:500 .78rem/1.3 "Studio Sans",Arial,sans-serif }
.no-tools button { margin-top:9px }
@media (max-width:540px) {
  nav > a {
    flex:none; display:grid; place-items:center; width:40px; height:44px;
    font-size:0; color:var(--ink); border-radius:var(--nav-radius);
  }
  nav > a::before {
    content:''; width:15px; height:15px;
    mask:linear-gradient(90deg,black 0 6px,transparent 6px 9px,black 9px),linear-gradient(black 0 6px,transparent 6px 9px,black 9px);
    mask-composite:intersect;
    background:currentColor;
  }
  nav > a:hover { background:var(--pale) }
}

/* A compact native-language menu and reading layout for the format guides. */
.lang[open] > div {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px;
  inline-size:min(24rem,calc(100vw - 32px)); padding:8px;
  overscroll-behavior:contain; scrollbar-gutter:stable;
}
.lang a { display:flex; align-items:center; min-height:42px; overflow-wrap:anywhere }
.lang a[aria-current=page] { background:var(--pale); color:var(--action); font-weight:750 }
.lang a[aria-current=page]::after { content:'✓'; margin-inline-start:auto; padding-inline-start:5px }
.work .spec { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px }
.work .spec > div {
  display:block; min-width:0; border:1px solid var(--hair); background:var(--surface);
  border-radius:var(--field-radius); padding:12px 14px;
}
.work .spec > div:nth-child(2) { border-color:var(--dash); background:var(--pale) }
.work .spec dt { font-size:.78rem; margin-bottom:4px }
.work .spec > div:last-child { grid-column:1/-1; display:flex; gap:14px; align-items:baseline; background:transparent; border:0; padding:2px }
.editorial { border-block-start:1px solid var(--hair); padding-block:clamp(28px,4vw,60px) }
.editorial h2 { font-size:clamp(1.7rem,3vw,2.7rem); margin-block-end:1.1rem; max-width:32ch }
.editorial-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,255px),1fr)); gap:clamp(12px,2vw,28px) }
.editorial-grid article { min-width:0; padding:18px 20px; border-radius:var(--field-radius); background:var(--pale) }
.editorial-grid article h3 { margin-block-end:9px; color:var(--ink); font-size:1.12rem }
.editorial-grid p { line-height:1.64; max-width:62ch; color:var(--muted); overflow-wrap:break-word }
.editorial-grid a { color:var(--action); text-underline-offset:.2em; text-decoration:underline }
.audio .editorial-grid article { background:transparent; border-inline-start:3px solid #b6c4a0; border-radius:0 }
:where(html[lang=th],html[lang=bn],html[lang=hi],html[lang=ar]) :is(h1,h2,h3,.brand,.tool strong) {
  letter-spacing:normal; line-height:1.24;
}
@media (max-width:540px) {
  .editorial-grid article { padding:15px 16px }
  .work .spec { margin-block-start:4px }
}
.editorial-links { display:flex; flex-wrap:wrap; gap:4px 16px; margin-block-start:12px }
.editorial-links a { align-content:center; min-height:32px; font-size:.9rem; font-weight:650 }
