@font-face{font-family:'Plex Sans';src:url('../../assets/fonts/IBMPlexSans-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Plex Sans';src:url('../../assets/fonts/IBMPlexSans-Medium.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'Plex Sans';src:url('../../assets/fonts/IBMPlexSans-SemiBold.woff2') format('woff2');font-weight:600 900;font-display:swap}
@font-face{font-family:'Plex Mono';src:url('../../assets/fonts/IBMPlexMono-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Plex Devanagari';src:url('../../assets/fonts/IBMPlexSansDevanagari-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Plex Devanagari';src:url('../../assets/fonts/IBMPlexSansDevanagari-SemiBold.woff2') format('woff2');font-weight:600;font-display:swap}

:root {
  --sans:'Plex Sans','Plex Devanagari',sans-serif;
  --mono:'Plex Mono',monospace;
  --bg:#f3f5f4; --text:#1c2628; --muted:#4b5c60; --accent:#7b4b0b;
  --line:#7a8587; --error:#a52219; --overlay:rgba(243,245,244,.96);
  --stage:#090b0c; --stage-text:#ecefea; --stage-line:#889495;
  color-scheme:light;
  font:14px/1.5 var(--sans);
  font-synthesis:none;
}
:root[data-theme=dark] {
  --bg:#151819; --text:#ecefea; --muted:#b0b9b9; --accent:#e5c36d;
  --line:#6f797a; --error:#ffb5a7; --overlay:rgba(21,24,25,.96);
  color-scheme:dark;
}
@media(prefers-color-scheme:dark) {
  :root:not([data-theme=light]) {
    --bg:#151819; --text:#ecefea; --muted:#b0b9b9; --accent:#e5c36d;
    --line:#6f797a; --error:#ffb5a7; --overlay:rgba(21,24,25,.96);
    color-scheme:dark;
  }
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text)}
a{color:var(--muted);text-underline-offset:3px}
a:hover,button:hover{color:var(--accent)}
button,select,input{font:inherit}
button,select{color:inherit;background:var(--bg);border:0;border-radius:0;cursor:pointer}
button{min-height:32px;min-width:32px;padding:4px 7px;display:inline-flex;align-items:center;justify-content:center;gap:6px}
button:disabled{opacity:.5;cursor:default}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
[hidden]{display:none!important}
.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus{position:absolute;z-index:20;background:var(--bg);padding:8px}
svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round;flex:none}

.site-header{min-height:64px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid var(--line);padding:12px 0}
.brand-icon{display:block;flex:none;width:32px;height:32px}
.identity{display:flex;align-items:center;gap:12px}
.latin-lockup,.sanskrit-lockup{display:flex;flex-direction:column;gap:1px}
.name{font-size:16px;line-height:1.15;font-weight:500;letter-spacing:-.7px;color:var(--text);text-decoration:none;width:fit-content}
.sanskrit-lockup{font-family:'Plex Devanagari',sans-serif}
.sanskrit-name{font-size:26px;line-height:1.35;font-weight:600}
.motto{color:var(--muted);font-size:11px}
.latin-lockup{border-left:1px solid var(--line);padding-left:12px}
.site-nav{display:flex;align-items:center;justify-content:flex-end;gap:24px;font-size:13px}
.site-nav>a{white-space:nowrap}
.theme-toggle{color:var(--muted);padding:7px;min-width:36px;min-height:36px}
.theme-toggle .theme-icon{width:19px;height:19px;stroke:none}
.theme-toggle [data-theme-icon=system]{stroke:currentColor;stroke-width:1.6;fill:none}
.name-row{display:flex;align-items:baseline;gap:3px}
.identity-ref{text-decoration:none;font-size:11px}
.site-footer{margin:24px auto 0;padding:20px 0 24px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.site-footer{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:28px;align-items:baseline}
.footer-context{display:contents}
.footer-context>[lang=sa]{grid-column:1;grid-row:1}
.footer-links{grid-column:3;grid-row:1}
.footer-context [lang=sa]{font-family:'Plex Devanagari',sans-serif;font-size:18px}
.identity-translations{grid-column:2;grid-row:1;margin:0;padding:0;border:0}
.identity-translations p{display:inline;margin:0;scroll-margin-top:16px}
.identity-translations p+p{margin-left:24px}
.identity-translations p:target{color:var(--text)}
.standalone-link{display:none}
:root{--page-gutter:clamp(14px,4.65vw,80px)}
.site-header,main,.site-footer{width:calc(100% - 2 * var(--page-gutter));max-width:1440px;margin-inline:auto}
h1{font:inherit;margin:0}
.sourcebar{display:flex;align-items:center;gap:18px;min-height:54px;flex-wrap:wrap}
.satellite{font-weight:600}
.slash{color:var(--line)}
.sourcebar select{min-height:32px;padding:2px 4px;max-width:100%;font-size:14px}
.sourcebar .refresh{margin-left:auto;color:var(--muted)}
select option{color:var(--text);background:var(--bg)}

/* Imagery always retains a dark surround, including in the light interface. */
.stage{height:calc(100svh - 290px);min-height:320px;position:relative;overflow:hidden;background:var(--stage);color:var(--stage-text);display:flex;justify-content:center;align-items:center;touch-action:none}
.stage img,#playback-image{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;transform-origin:center;user-select:none}
.stage:has(img:not([hidden])),.stage:has(canvas:not([hidden])){cursor:grab}
#placeholder{color:var(--stage-text)}
.zoom{position:absolute;right:12px;bottom:10px;display:flex;gap:3px;background:var(--stage)}
.zoom button{color:var(--stage-text);background:var(--stage)}
.zoom button:hover{color:#e5c36d}
.zoom :focus-visible{outline-color:#e5c36d}
.zoom .fit{font-size:12px;min-width:35px}

.timeline{padding:12px 0 16px}
.timebar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 13px}
.timebar time{font:14px var(--mono);letter-spacing:.15px}
.position{margin-left:auto;color:var(--muted);font:12px var(--mono)}
#age,#gaps{font-size:12px;color:var(--accent)}
.timeline-track{position:relative}
#frame-marks{position:absolute;inset:3px 5px 0;display:flex;align-items:center;justify-content:space-between;pointer-events:none}
#frame-marks span{height:8px;border-left:1px solid var(--muted)}
#timeline{width:100%;height:24px;margin:3px 0;appearance:none;background:transparent;cursor:pointer;position:relative;z-index:1}
#timeline::-webkit-slider-runnable-track{height:2px;background:var(--line)}
#timeline::-webkit-slider-thumb{appearance:none;width:10px;height:10px;border-radius:50%;background:var(--accent);margin-top:-4px}
#timeline::-moz-range-track{height:2px;background:var(--line)}
#timeline::-moz-range-thumb{width:10px;height:10px;border:0;background:var(--accent)}
.times{display:flex;justify-content:space-between;gap:12px;font:11px var(--mono);color:var(--muted)}
.transport{display:flex;align-items:center;flex-wrap:wrap;gap:2px;margin-top:7px}
.play{color:var(--accent)}
.hours-picker,.fps-picker,.end-picker{font-size:12px;color:var(--muted);display:inline-flex;align-items:center;gap:5px;margin-left:10px}
.hours-combo{position:relative;display:inline-flex;align-items:center}
.hours-combo input{width:104px;min-height:32px;background:var(--bg);color:var(--text);border:0;border-bottom:1px solid var(--line);padding:2px 4px}
.hours-combo>button{padding:0;min-width:24px;color:var(--text)}
#hour-presets{position:absolute;bottom:100%;left:0;z-index:5;background:var(--bg);border:1px solid var(--line);min-width:132px;padding:3px}
#hour-presets button{display:block;width:100%;text-align:left;color:var(--text)}
#hour-presets button:hover,#hour-presets .highlighted{background:var(--accent);color:var(--bg)}
#hour-presets [aria-selected=true]{text-decoration:underline;text-underline-offset:3px}
.fps-picker select{min-height:32px;color:var(--text);padding:2px 4px;font-family:var(--mono)}
.end-picker select{max-width:145px;min-height:32px;font:11px var(--mono);color:var(--text)}

.source{margin-left:auto;color:var(--muted);font-size:12px;display:flex;align-items:center;gap:10px;white-space:nowrap}
.source details{position:relative}
.source summary{min-width:32px;min-height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;list-style:none}
.source summary::-webkit-details-marker{display:none}
.information{position:absolute;bottom:36px;right:0;width:min(330px,85vw);max-height:65svh;overflow:auto;background:var(--bg);border:1px solid var(--line);padding:12px;z-index:3;line-height:1.7;white-space:normal}
.information p{margin:0 0 10px}
.information p:last-child{margin-bottom:0}
#tcr-acknowledgement{white-space:pre-line}
#dimensions{font-family:var(--mono)}
.save{position:relative;margin-left:12px}
.save summary{cursor:pointer;min-height:32px;padding:5px}
.save-controls{position:absolute;right:0;bottom:36px;width:min(340px,85vw);max-height:70svh;overflow:auto;background:var(--bg);border:1px solid var(--line);padding:12px;z-index:4;font-size:13px}
.save-controls label{display:inline-flex;align-items:center;gap:5px;margin:8px 8px 0 0}
.save-controls select{border-bottom:1px solid var(--line);min-height:28px}
.save-controls p{margin:8px 0}
.save-controls video{display:block;width:100%;margin-top:10px}
#export-error,#error{color:var(--error)}
.feedback{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#status,#error{font-size:13px;margin:4px 0}
#status,#duration-limit,#cache-status,#link-status{font-size:12px;color:var(--muted)}

/* Embedded articles retain product identity, theme and a standalone escape. */
:root[data-embed=true] .site-header{min-height:52px;padding:6px 0}
:root[data-embed=true] .sanskrit-lockup,:root[data-embed=true] .motto,:root[data-embed=true] .chipsncode-link,:root[data-embed=true] .identity-ref,:root[data-embed=true] .site-footer{display:none}
:root[data-embed=true] .name{font-size:22px}
:root[data-embed=true] .latin-lockup{border:0;padding-left:0}
:root[data-embed=true] .brand-icon{width:28px;height:28px}
:root[data-embed=true] .identity{gap:10px}
:root[data-embed=true] .standalone-link{display:inline}
:root[data-embed=true] .site-nav{gap:16px}
:root[data-embed=true] .stage{height:calc(100svh - 250px);min-height:220px}

#viewer:fullscreen{margin:0;padding:0 16px;width:100%;height:100%;background:var(--bg);overflow:auto}
#viewer:fullscreen .stage{height:calc(100dvh - 54px);min-height:0}
#viewer:fullscreen .timeline{position:fixed;left:50%;bottom:12px;transform:translateX(-50%);width:calc(100% - 32px);max-width:1100px;z-index:10;background:var(--overlay);padding:8px 12px;transition:opacity .15s ease}
#viewer:fullscreen .sourcebar,#viewer:fullscreen .zoom{transition:opacity .15s ease}
#viewer:fullscreen.controls-idle .timeline:not(:focus-within):not(:has(details[open])),#viewer:fullscreen.controls-idle .sourcebar:not(:focus-within),#viewer:fullscreen.controls-idle .zoom:not(:focus-within){opacity:0;pointer-events:none}
#viewer:fullscreen.controls-idle{cursor:none}

@media(max-width:960px){
  .site-header{flex-wrap:wrap;gap:12px}
  .site-nav{gap:20px}
  .transport .source{flex:1;justify-content:flex-end}
}
@media(max-width:620px){
  .site-header{padding:10px 0;gap:12px}
  .identity{gap:10px}
  .brand-icon{width:32px;height:32px}
  .name{font-size:16px}
  .sanskrit-name{font-size:23px}
  .motto{font-size:10px}
  .site-nav{width:100%;justify-content:space-between;gap:12px;font-size:12px}
  .sourcebar{gap:5px;min-height:58px;padding:8px 0;font-size:12px}
  .sourcebar select{font-size:12px;max-width:176px}
  .sourcebar .slash{display:none}
  .sourcebar .refresh{margin-left:0}
  .stage{height:calc(100svh - 390px);min-height:260px}
  .timebar time{font-size:12px}
  .timebar #age{font-size:11px}
  .position{font-size:11px}
  .times{font-size:10px}
  .zoom{right:4px;bottom:4px}
  .hours-picker{margin-left:4px}
  .hours-picker,.fps-picker,.end-picker{font-size:11px}
  .source{justify-content:flex-end;margin-top:7px}
  .save[open]{flex-basis:100%;order:3}
  .save-controls{position:static;width:100%;margin-top:4px}
  .save summary{display:inline-flex}
  .save[open] summary{margin-bottom:4px}
  :root[data-embed=true] .site-header{flex-wrap:nowrap;gap:8px}
  :root[data-embed=true] .site-nav{width:auto;gap:10px}
  :root[data-embed=true] .stage{height:calc(100svh - 290px)}
}
@media(prefers-contrast:more){
  :root{--line:var(--muted)}
}
@media(prefers-reduced-motion:reduce){
  #viewer:fullscreen .timeline,#viewer:fullscreen .sourcebar,#viewer:fullscreen .zoom{transition:none}
}
@media(forced-colors:active){
  :root{--bg:Canvas;--text:CanvasText;--muted:CanvasText;--accent:LinkText;--line:ButtonText;--error:CanvasText;--stage:Canvas;--stage-text:CanvasText;--overlay:Canvas}
  #viewport{border:1px solid CanvasText}
  button[aria-pressed=true]{outline:1px solid Highlight}
  #timeline{appearance:auto}
  :focus-visible,.zoom :focus-visible{outline-color:Highlight}
  button,select,select option,.hours-combo input{color:ButtonText;background:ButtonFace}
}

#history-controls{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:6px 0 12px}#history-controls[hidden]{display:none}#history-controls label{display:flex;align-items:center;gap:6px}#history-controls input{max-width:155px;color:var(--text);background:var(--bg);border:0;border-bottom:1px solid currentColor;padding:3px}#history-status{font-size:13px}

#extension-help{max-width:640px;max-height:85vh;overflow:auto;color:var(--text);background:var(--bg);border:1px solid currentColor;padding:24px}#extension-help::backdrop{background:rgb(0 0 0 / .65)}#extension-help p,#extension-help li{line-height:1.5}#extension-help li{margin-bottom:8px}#extension-help h2{margin-top:0}

.footer-links{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.github-source{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px}
.github-source svg{width:20px;height:20px;fill:currentColor;stroke:none}

@media(max-width:620px){.site-footer{grid-template-columns:1fr auto;gap:12px}.footer-links{grid-column:2}.identity-translations{grid-column:1 / -1;grid-row:2}}
