/* FFmpegLab — shared article styles (matches homepage design system) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --orange: #FC6D26;
  --ink: #1B1730;
  --muted: #4A4566;
  --muted-2: #6B6685;
  --faint: #7A7490;
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Kanit", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.container { width: 100%; max-width: 48rem; margin-inline: auto; padding-inline: 1.5rem; }
.container-wide { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: 1.5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 0.375rem; font-weight: 600; transition: all .15s ease; }
.btn-primary { background: var(--orange); color: #fff; padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-primary:hover { background: #ef5f17; text-decoration: none; }
.btn-primary.sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* Wordmark */
.mark { display: inline-flex; align-items: center; gap: 0.5rem; }
.mark .glyph { display: grid; place-items: center; height: 1.75rem; width: 1.75rem; border-radius: 0.375rem; font-weight: 700; font-size: 1rem; line-height: 1; color: #fff; background: linear-gradient(135deg, var(--orange), #E24329); }
.mark .word { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.mark .word .lab { color: var(--orange); }

/* Header */
header.site { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #ECE9F3; background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); }
header.site .bar { display: flex; align-items: center; justify-content: space-between; padding-block: 1rem; }
header.site nav { display: none; align-items: center; gap: 2rem; }
header.site nav a { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
header.site nav a:hover { color: var(--ink); text-decoration: none; }
@media (min-width: 768px) { header.site nav { display: flex; } }

/* Article shell */
.article-head { background: #FAF8FD; border-bottom: 1px solid #ECE9F3; }
.article-head .inner { padding-block: 3.5rem 2.5rem; }
.breadcrumb { font-size: 0.8rem; color: var(--muted-2); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted-2); }
.eyebrow { display: inline-block; font-family: ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.75rem; }
.article-head h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.article-head .dek { margin-top: 1rem; font-size: 1.125rem; color: var(--muted); max-width: 42rem; }
.article-meta { margin-top: 1.25rem; font-size: 0.85rem; color: var(--faint); }

/* Prose */
.prose { padding-block: 3rem 4rem; font-size: 1.0625rem; color: #2C2741; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 2.75rem; line-height: 1.25; }
.prose h3 { font-size: 1.25rem; font-weight: 700; margin-top: 2rem; }
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4rem; color: var(--muted); }
.prose li { margin-top: 0.5rem; }
.prose a { font-weight: 600; }
.prose code { font-family: ui-monospace, monospace; font-size: 0.9em; background: #F1EEF8; color: #3A2E5C; padding: 0.12em 0.4em; border-radius: 0.3rem; }
.prose blockquote { border-left: 3px solid var(--orange); padding-left: 1.1rem; color: var(--ink); font-style: italic; }

/* Code window */
.code-window { overflow: hidden; border-radius: 0.75rem; border: 1px solid #2C2741; background: #15121F; box-shadow: 0 20px 40px -16px rgba(0,0,0,0.4); margin-block: 1.5rem; }
.code-window .titlebar { display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid #2C2741; padding: 0.7rem 1rem; }
.dot { height: 0.7rem; width: 0.7rem; border-radius: 9999px; }
.dot.r { background: #FF5F56; } .dot.y { background: #FFBD2E; } .dot.g { background: #27C93F; }
.code-window .fname { margin-left: 0.75rem; font-size: 0.72rem; color: var(--faint); }
.code-window pre { overflow-x: auto; padding: 1.1rem 1.25rem; font-size: 0.82rem; line-height: 1.7; color: #D6D2E6; }

/* Key-takeaways / callout box */
.callout { background: #FFF4ED; border: 1px solid #FFD8C2; border-radius: 0.75rem; padding: 1.25rem 1.5rem; }
.callout h3 { margin-top: 0; font-size: 1rem; font-weight: 700; color: var(--ink); }
.callout ul { margin-top: 0.6rem; padding-left: 1.2rem; color: var(--muted); font-size: 0.98rem; }

/* Related + CTA */
.related { border-top: 1px solid #ECE9F3; background: #FAF8FD; }
.related .inner { padding-block: 3rem; }
.related h2 { font-size: 1.4rem; font-weight: 700; }
.related-grid { margin-top: 1.5rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .related-grid { grid-template-columns: 1fr 1fr; } }
.related-card { display: block; border: 1px solid #ECE9F3; background: #fff; border-radius: 0.75rem; padding: 1.25rem 1.4rem; transition: border-color .15s; }
.related-card:hover { border-color: var(--orange); text-decoration: none; }
.related-card .k { display: block; font-family: ui-monospace, monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--orange); }
.related-card .t { display: block; margin-top: 0.4rem; font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.related-card .d { display: block; margin-top: 0.35rem; font-size: 0.9rem; color: var(--muted-2); }

.cta-band { background: linear-gradient(120deg, #FC6D26 0%, #F2542D 45%, #E24329 100%); }
.cta-band .inner { padding-block: 3.5rem; text-align: center; }
.cta-band h2 { color: #fff; font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; max-width: 36rem; margin-inline: auto; text-wrap: balance; }
.cta-band p { color: rgba(255,255,255,0.9); margin-top: 0.75rem; }
.cta-band .row { margin-top: 1.75rem; display: flex; justify-content: center; }
.cta-band .btn-white { background: #fff; color: var(--ink); padding: 0.8rem 1.7rem; font-weight: 600; border-radius: 0.375rem; }
.cta-band .btn-white:hover { text-decoration: none; }

/* Editor mock (full FFmpegLab editor UI around code blocks) */
.prose .editor-mock { margin-block: 1.6rem; }
.editor-mock { overflow: hidden; border-radius: 0.9rem; border: 1px solid #2C2741; background: #15121F; box-shadow: 0 20px 40px -16px rgba(0,0,0,0.45); }
.em-toolbar { display: flex; align-items: center; gap: 0.4rem; padding: 0.6rem 0.7rem; border-bottom: 1px solid #2C2741; }
.em-back { width: 1.5rem; height: 1.5rem; border-radius: 9999px; background: #2A2540; flex: 0 0 auto; }
.em-spacer { flex: 1; }
.em-pill { font-family: ui-monospace, monospace; font-size: 0.62rem; color: #A9A4C2; background: #221E33; border: 1px solid #322C49; border-radius: 9999px; padding: 0.28rem 0.55rem; white-space: nowrap; }
.em-pill.active { color: #fff; background: #2E3A66; border-color: #3C4F8A; }
.em-icon { width: 1.5rem; height: 1.5rem; border-radius: 9999px; background: #221E33; border: 1px solid #322C49; flex: 0 0 auto; }
.em-tabs { display: flex; gap: 1.3rem; padding: 0.55rem 0.9rem 0; border-bottom: 1px solid #2C2741; }
.em-tab { font-family: ui-monospace, monospace; font-size: 0.7rem; color: #6F6A87; padding-bottom: 0.5rem; }
.em-tab.active { color: #fff; box-shadow: inset 0 -2px 0 0 var(--orange); }
.em-body { display: flex; }
.em-code { flex: 1 1 auto; margin: 0; padding: 0.9rem 1rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; line-height: 1.7; color: #D6D2E6; white-space: pre; overflow-x: auto; }
.em-preview { flex: 0 0 32%; border-left: 1px solid #2C2741; background: #0F0D17; padding: 0.7rem; display: flex; flex-direction: column; gap: 0.55rem; }
.em-screen { flex: 1; min-height: 6rem; border-radius: 0.45rem; background: linear-gradient(160deg, #221E33, #15121F); display: grid; place-items: center; }
.em-play { width: 2.1rem; height: 2.1rem; border-radius: 9999px; background: rgba(255,255,255,0.12); color: #fff; display: grid; place-items: center; font-size: 0.7rem; }
.em-prev-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.sk { background: #221E33; border-radius: 9999px; }
.sk-line { height: 0.5rem; }
.sk-pill { height: 1.05rem; width: 3.4rem; border-radius: 0.4rem; background: #221E33; }
.em-timeline { border-top: 1px solid #2C2741; background: #0F0D17; padding: 0.6rem 0.75rem 0.8rem; }
.em-ruler { display: flex; align-items: flex-end; gap: 0.42rem; height: 0.9rem; opacity: 0.45; }
.em-ruler span { width: 1px; background: #5A5476; height: 45%; }
.em-ruler span:nth-child(5n+1) { height: 100%; }
.em-track { margin-top: 0.5rem; display: flex; gap: 0.5rem; }
.em-clip { height: 1.4rem; border-radius: 0.35rem; }
.em-clip.a { width: 42%; background: linear-gradient(90deg, #5B3FA0, #8557D6); }
.em-clip.b { width: 26%; background: #2A2540; }
.em-clip.c { width: 18%; background: #2A2540; }
@media (max-width: 639px) { .em-preview { display: none; } }

/* Collaborative editor mock */
.prose .collab-editor { margin-block: 1.75rem 2.25rem; }
.collab-editor { overflow: hidden; border: 1px solid #2C2741; border-radius: 0.9rem; background: #0D0F12; box-shadow: 0 20px 40px -16px rgba(0,0,0,.45); color: #fff; }
.ce-toolbar { min-height: 3rem; display: flex; align-items: center; gap: .45rem; padding: .55rem .65rem; border-bottom: 1px solid #252933; background: #12161A; }
.ce-back, .ce-action { display: grid; place-items: center; height: 1.8rem; border: 1px solid #343B46; background: #202833; color: #DCE3EC; border-radius: .6rem; font: 600 .6rem ui-monospace, monospace; }
.ce-back { width: 1.8rem; }
.ce-spacer { flex: 1; }
.ce-people { display: flex; align-items: center; padding-left: .3rem; }
.ce-person { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; margin-left: -.3rem; border: 2px solid #12161A; border-radius: 9999px; background: #33445C; font-size: .53rem; font-weight: 700; }
.ce-person.live { background: var(--orange); }
.ce-action { padding-inline: .55rem; }
.ce-action.active { background: #34465C; border-color: #485E77; }
.ce-workspace { display: grid; }
.ce-stage { position: relative; min-height: 15rem; display: grid; place-items: center; background: #080A0D; border-bottom: 1px solid #252933; }
.ce-frame { width: 42%; min-width: 8rem; aspect-ratio: 9/12; position: relative; overflow: hidden; border: 1px solid #282E37; background: linear-gradient(145deg,#20252D,#101318); }
.ce-frame::before { content: ""; position: absolute; inset: 13% 14% 42%; border-radius: .35rem; background: linear-gradient(135deg,#3C4652,#20262E); }
.ce-frame::after { content: ""; position: absolute; left: 14%; right: 22%; bottom: 18%; height: 4px; border-radius: 99px; background: #596574; box-shadow: 0 10px 0 #303944, 0 20px 0 #252D36; }
.ce-play { position: absolute; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 9999px; background: rgba(255,255,255,.14); font-size: .7rem; }
.ce-time { position: absolute; left: .8rem; bottom: .65rem; font: 600 .58rem ui-monospace, monospace; color: #DCE3EC; }
.ce-cursor { position: absolute; left: 58%; top: 32%; padding: .2rem .35rem; border-radius: .3rem; background: var(--orange); font-size: .52rem; font-weight: 600; }
.ce-comments { display: flex; flex-direction: column; min-height: 16rem; background: #12161A; }
.ce-comments-head { display: flex; align-items: center; justify-content: space-between; padding: .7rem .8rem; border-bottom: 1px solid #252933; font-size: .72rem; font-weight: 600; }
.ce-live { color: #AAB7C6; font: .53rem ui-monospace, monospace; }
.ce-thread { display: flex; flex: 1; flex-direction: column; gap: .65rem; padding: .8rem; }
.ce-msg { max-width: 90%; padding: .55rem .65rem; border-radius: .7rem; background: #2C466E; font-size: .68rem; line-height: 1.35; }
.ce-msg.me { align-self: flex-end; background: #B54D21; }
.ce-msg small { display: block; margin-top: .25rem; color: rgba(255,255,255,.65); font: .5rem ui-monospace, monospace; }
.ce-input { margin-top: auto; padding: .7rem .8rem; border-top: 1px solid #252933; color: #7E8997; font-size: .62rem; }
.ce-timeline { background: #101419; border-top: 1px solid #252933; }
.ce-ruler { height: 1.35rem; padding: .25rem .7rem 0 6.2rem; color: #6F7B89; font: .48rem ui-monospace, monospace; word-spacing: 1.7rem; overflow: hidden; white-space: nowrap; }
.ce-track-row { display: grid; grid-template-columns: 5.5rem 1fr; min-height: 2.5rem; border-top: 1px solid #252933; }
.ce-track-name { display: flex; align-items: center; gap: .35rem; padding: .45rem .55rem; background: #17212B; color: #AAB7C6; font: .53rem ui-monospace, monospace; }
.ce-track-dot { width: .48rem; height: .48rem; border-radius: 9999px; background: var(--orange); }
.ce-clips { display: flex; gap: .2rem; padding: .3rem; overflow: hidden; }
.ce-clip { position: relative; min-width: 7rem; padding: .45rem .5rem; border-radius: .3rem; background: #009F9D; color: #fff; font: 600 .52rem ui-monospace, monospace; }
.ce-clip.alt { min-width: 5.5rem; background: #C29454; }
.ce-audio { width: 65%; min-width: 10rem; background: #89A956; }
.ce-marker { position: absolute; top: .2rem; right: .25rem; display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: .3rem; background: #263247; color: #fff; font-size: .55rem; }
@media (min-width: 700px) { .ce-workspace { grid-template-columns: 1fr 16rem; } .ce-stage { border-right: 1px solid #252933; border-bottom: 0; } }
@media (max-width: 620px) { .ce-action:nth-of-type(2), .ce-action:nth-of-type(3) { display: none; } .ce-ruler { padding-left: 4.5rem; } .ce-track-row { grid-template-columns: 4rem 1fr; } .ce-track-name { padding-inline: .3rem; } .ce-frame { width: 58%; } }

/* Source list */
.sources { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid #ECE9F3; }
.sources li { font-size: .95rem; }

/* Footer */
footer.site { background: #15121F; }
footer.site .row { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0.75rem; padding-block: 2rem; }
footer.site .mark .word { color: #fff; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; }
footer.site .links a { font-size: 0.85rem; color: #8C87A3; }
footer.site .links a:hover { color: #fff; text-decoration: none; }
footer.site .copy { font-size: 0.75rem; color: #6F6A87; }
@media (min-width: 700px) { footer.site .row { flex-direction: row; } }
