/* 1xTranscript: bố cục riêng, mọi màu và cỡ lấy từ token 1x-brand. */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--onex-surface-page);color:var(--onex-text-neutral-primary);font:var(--onex-type-body-md, 400 16px/1.6 var(--onex-font-sans));font-family:var(--onex-font-sans);-webkit-font-smoothing:antialiased}
a{color:var(--onex-text-brand-primary)}
.wrap{max-width:1080px;margin:0 auto;padding:0 16px}

.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;height:var(--onex-header-height);padding:0 16px;background:color-mix(in srgb,var(--onex-surface-page) 86%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--onex-border-neutral-subtle)}
.logo{display:inline-flex;align-items:center;gap:8px;font-weight:700;text-decoration:none;color:var(--onex-text-neutral-primary)}
.logo-mark{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:var(--onex-radius-sm);background:var(--onex-background-brand-bold);color:var(--onex-text-brand-on-bold);font-size:13px}
.foot{display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:center;padding:32px 16px 96px}

/* Trang chủ */
.hero{padding:56px 16px 32px;text-align:center}
.hero .onex-display{max-width:16ch;margin:0 auto}
.lead{max-width:56ch;margin:12px auto 24px;color:var(--onex-text-neutral-secondary)}
.start{display:flex;flex-wrap:wrap;gap:8px;max-width:680px;margin:0 auto}
.start-input{flex:1 1 320px;height:var(--onex-control-height-lg);font-size:16px}
.start .cf-turnstile{flex-basis:100%}
.steps{display:flex;justify-content:center;gap:16px;list-style:none;padding:0;margin:16px 0 0;color:var(--onex-text-neutral-tertiary);font-size:14px}
.steps li::before{content:"○ "}
.steps li.active{color:var(--onex-text-neutral-primary)}
.steps li.done{color:var(--onex-text-success-primary)}
.steps li.done::before{content:"✓ "}
.lib{padding-bottom:24px}
.lib-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 12px}
.lib-search{width:min(100%,280px)}
.vgrid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.vcard{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:inherit}
.vcard img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:var(--onex-radius-lg);background:var(--onex-surface-sunken)}
.vcard-title{font-weight:600;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.vcard:hover .vcard-title{color:var(--onex-text-brand-primary)}

/* Trang transcript: hai cột trên desktop */
.tlayout{display:grid;grid-template-columns:minmax(320px,440px) minmax(0,1fr);gap:24px;max-width:1280px;margin:0 auto;padding:16px}
.player-col{position:sticky;top:calc(var(--onex-header-height) + 16px);align-self:start;max-height:calc(100vh - var(--onex-header-height) - 32px);overflow:auto;scrollbar-width:thin}
.player{position:relative;aspect-ratio:16/9;border-radius:var(--onex-radius-lg);overflow:hidden;background:#000}
.player iframe,.player #yt{position:absolute;inset:0;width:100%;height:100%;border:0}
.player .poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.player.ready .poster{display:none}
.vtitle{margin:12px 0 4px}
.meta a{color:inherit}
.sumbox{margin-top:12px}
.sumbox-head{cursor:pointer;list-style:none;padding:8px 0}
.sumbox-head::-webkit-details-marker{display:none}
.sumbox-head::after{content:" ▾";color:var(--onex-text-neutral-tertiary)}
.sumbox:not([open]) .sumbox-head::after{content:" ▸"}
.summary{margin:8px 0 16px;padding:16px;border-radius:var(--onex-card-radius);background:var(--onex-surface-raised);box-shadow:inset 0 0 0 1px var(--onex-border-neutral-subtle)}
.sum{margin:0 0 8px}
.take{margin:0;padding-left:20px}
.take li{margin:4px 0}
.sk{height:14px;margin:6px 0}.sk.short{width:60%}
.box-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:16px 0 8px}
.chapters{list-style:none;margin:0;padding:0}
.chapters a{display:block;padding:6px 8px;border-radius:var(--onex-radius-sm);text-decoration:none;color:inherit}
.chapters a:hover{background:var(--onex-background-neutral-minimal)}
.chapters .ts{font-family:var(--onex-font-mono);font-size:13px;color:var(--onex-text-brand-primary);margin-right:6px}

.text-col{min-width:0}
.toolbar{position:sticky;top:var(--onex-header-height);z-index:5;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:8px 0;background:var(--onex-surface-page)}
.find{width:min(100%,260px)}
.panes{padding-bottom:16px}
.seg{display:flex;gap:12px;margin:0;padding:6px 8px;border-radius:var(--onex-radius-sm);line-height:1.6}
.seg .ts,.para .ts,.bi .ts{flex:none;width:52px;font-family:var(--onex-font-mono);font-size:13px;line-height:1.9;text-decoration:none;color:var(--onex-text-brand-primary)}
.seg.now,.para.now,.bi.now{background:var(--onex-background-brand-minimal)}
.seg.hide{display:none}
mark{background:var(--onex-background-warning-subtle);color:inherit;border-radius:2px}
.para{display:flex;gap:12px;padding:8px;border-radius:var(--onex-radius-sm)}
.para p{margin:0;line-height:1.75}
.reader-h{margin:20px 8px 4px}
.bi{display:grid;grid-template-columns:52px 1fr 1fr;gap:12px;padding:8px;border-radius:var(--onex-radius-sm);border-bottom:1px solid var(--onex-border-neutral-subtle)}
.bi .tr{color:var(--onex-text-neutral-secondary)}
.faq{padding:12px 8px;border-bottom:1px solid var(--onex-border-neutral-subtle)}
.faq summary{font-weight:600;cursor:pointer}
.faq p{margin:8px 0 0}
.pane-msg{padding:16px 8px;color:var(--onex-text-neutral-secondary)}
.pane-msg .onex-btn{margin-top:8px}
.byok-badge{display:inline-block;margin:0 8px 8px}

.actionbar{position:sticky;bottom:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 0 calc(10px + env(safe-area-inset-bottom));background:var(--onex-surface-page);border-top:1px solid var(--onex-border-neutral-subtle)}
.follow{margin-left:auto;display:inline-flex;align-items:center;gap:6px}
.quote-btn{position:absolute;z-index:30}

.byok-form{display:flex;flex-direction:column;gap:12px;padding:24px}
.byok-form h2{margin:0}
.byok-actions{display:flex;justify-content:flex-end;gap:8px}
.prose{padding:32px 16px;max-width:720px}

@media (max-width:860px){
  .tlayout{grid-template-columns:1fr;padding:0 0 16px;gap:0}
  .player-col{position:static;max-height:none;overflow:visible;padding:0}
  .player{position:sticky;top:var(--onex-header-height);z-index:6;border-radius:0}
  .player-col>:not(.player){margin-left:16px;margin-right:16px}
  .text-col{padding:0 12px}
  .toolbar{top:calc(var(--onex-header-height) + 56.25vw)}
  .bi{grid-template-columns:44px 1fr}
  .bi .tr{grid-column:2}
  .find{width:100%}
  .follow{margin-left:0}
}

/* ---- bản web không lưu trữ (0.3) ---- */
.top-right{display:flex;align-items:center;gap:8px}
.icon-btn{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:var(--onex-radius-md);border:1px solid var(--onex-border-neutral-subtle);background:var(--onex-surface-base);color:var(--onex-text-neutral-primary);cursor:pointer;font-size:16px}
.icon-btn svg{width:18px;height:18px}
.icon-btn:hover{border-color:var(--onex-border-neutral-strong)}
.plan-chip{cursor:pointer;border:0}
.list{max-height:calc(100vh - var(--onex-header-height) - 170px);overflow-y:auto;overscroll-behavior:contain;padding:4px 0}
.list .seg{cursor:pointer}
.list .para,.list .bi{cursor:pointer}
.sum{margin:8px}
.ask{width:auto;height:var(--onex-control-height-sm);font-size:13px}
.foot .privacy{flex-basis:100%;text-align:center}
.settings{width:min(calc(100% - 24px),560px);padding:20px 22px;max-height:90vh;overflow:auto}
.settings-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.settings-head h2{margin:0}
.stabs{margin-bottom:14px}
.spane{display:flex;flex-direction:column;gap:12px}
.spane[hidden]{display:none}
.steps-ol{margin:0;padding-left:18px}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.row.end{justify-content:flex-end}
.inline{display:flex;gap:8px;align-items:center}
.inline .onex-input{flex:1}
.fmt{margin:0;padding:8px 10px;border-radius:var(--onex-radius-sm);background:var(--onex-surface-sunken);white-space:pre-wrap;font-family:var(--onex-font-mono)}
.onex-textarea{min-height:140px;padding:10px 12px;font-family:var(--onex-font-mono);font-size:13px;height:auto}
.lic-status{font-weight:600;margin:0}
.smsg{min-height:20px;margin:12px 0 0}
@media (max-width:860px){.list{max-height:none}.ask{flex:1}}
