/* Tool states, notices and the result block (step 4). Uses the Prism tokens of site.css. */
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.sr-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.link-button{background:none;border:0;color:var(--purple);font-weight:600;text-decoration:underline;text-underline-offset:3px;padding:10px 6px;font-size:15px;cursor:pointer}
.link-button[hidden]{display:none}
.button.danger{color:#a11e18;border-color:#f0b9b3}
.button{min-height:44px;font-size:16px}
.button.attach-file{cursor:pointer;margin-top:8px;text-align:center}
.button.attach-file:focus-within{outline:3px solid #8054ff;outline-offset:3px}

/* recording */
.record-zone{gap:6px}
.record-zone .record-control{min-height:48px;min-width:200px;font-size:18px;margin-top:4px}
.record-zone small{max-width:34ch}
.rec-live{display:flex;align-items:center;gap:8px;font-size:20px;font-weight:700;margin:4px 0 8px}
.rec-live .rec-time{font-variant-numeric:tabular-nums;color:var(--purple)}
.rec-live .rec-limit{font-size:14px;font-weight:500;color:var(--muted)}
.rec-dot{width:12px;height:12px;border-radius:50%;background:#e5381d;animation:rec-pulse 1.2s ease-in-out infinite}
@keyframes rec-pulse{50%{opacity:.35}}
.rec-live[hidden]{display:none}

/* review before the check */
.tool-review{border:1.5px solid #a78bfa;border-radius:16px;background:#faf8ff;padding:14px 16px 8px;text-align:left}
.review-kind{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.review-name{font-size:17px;font-weight:700;overflow-wrap:anywhere;margin:2px 0 4px}
.review-cost{font-size:17px;font-weight:800;color:var(--purple);margin:4px 0}
.review-line{font-size:14px;color:var(--ink);margin:2px 0}
.review-audio{display:block;width:100%;margin:10px 0 4px}
.review-terms{font-size:12px;color:var(--muted);margin:8px 0 2px;line-height:1.4}
.tool-review .link-button{padding-left:0}

/* notices (errors, limits, confirmations) */
.tool-notice{margin-top:14px;border:1.5px solid #f3b9a8;background:#fff4ef;border-radius:16px;padding:16px 18px;text-align:left;font-size:15px;line-height:1.45}
.tool-notice:focus{outline:3px solid #8054ff;outline-offset:3px}
.tool-notice h3{font-size:19px;margin-bottom:6px}
.tool-notice p{margin:4px 0}
.tool-notice .notice-charge{font-weight:700;color:#7a2a15}
.notice-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.tool-pick+.tool-review,.tool-review+.tool-notice{margin-top:14px}

/* the three screens: give us a file → we analyse it → the result */
.flow-steps{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:600;line-height:1.2;color:#9a93b8}
.flow-steps li{display:flex;align-items:center;gap:6px}
.flow-steps li+li::before{content:'';width:22px;height:2px;border-radius:2px;background:#e2dcf3;margin-right:2px}
.flow-steps span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1.5px solid #cfc4f5;background:#fff;font-size:12px}
.flow-steps li.is-done{color:var(--ink)}
.flow-steps li.is-done span{background:#ede9fe;border-color:#ede9fe;color:var(--purple)}
.flow-steps li.is-current{color:var(--purple)}
.flow-steps li.is-current span{background:var(--purple);border-color:var(--purple);color:#fff}

/* the analysis screen: the file's waveform under a scanning beam, the stages and a meter */
.tool-progress{padding:2px 2px 0;text-align:center}
.scan-title{font-size:20px;font-weight:800;letter-spacing:-.3px;margin:0}
.scan-file{font-size:14px;color:var(--muted);margin:2px 0 12px;overflow-wrap:anywhere}
.scan{position:relative;height:96px;padding:10px 12px;border-radius:16px;background:linear-gradient(180deg,#faf8ff,#f1ebff);overflow:hidden}
.scan-bars{display:flex;align-items:center;gap:3px;height:100%}
.scan-bars i{flex:1;height:var(--h);min-height:4px;border-radius:3px;background:#d9cff8;animation:scan-lit 2.4s linear infinite;animation-delay:calc(var(--i) * 2.4s / 56)}
@keyframes scan-lit{0%,6%{background-color:#6d34f0;transform:scaleY(1.15)}35%,100%{background-color:#d9cff8;transform:scaleY(1)}}
.scan-beam{position:absolute;top:0;bottom:0;left:12px;width:64px;margin-left:-32px;background:linear-gradient(90deg,transparent,rgba(124,58,237,.22),transparent);animation:scan-sweep 2.4s linear infinite}
.scan-beam::after{content:'';position:absolute;top:8px;bottom:8px;left:50%;width:2px;border-radius:2px;background:#7c3aed;box-shadow:0 0 12px 2px rgba(124,58,237,.55)}
@keyframes scan-sweep{from{left:12px}to{left:calc(100% - 12px)}}
.scan-meter{height:6px;border-radius:6px;background:#ede9fe;margin:12px 0 14px;overflow:hidden}
.scan-meter span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#a855f7,#5825ed);transition:width .8s ease}
.progress-steps{list-style:none;margin:0 0 8px;padding:0;display:inline-grid;gap:6px;text-align:left}
.progress-steps li{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:600;color:#9a93b8;white-space:nowrap}
/* The analysis and result screens say their state themselves: the live status stays for screen readers only. */
.tool-shell[data-flow=analyse] .tool-status,.tool-shell[data-flow=result] .tool-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0}
.progress-steps li::before{content:'';flex:0 0 18px;height:18px;border-radius:50%;border:2px solid #cfc4f5;background:#fff}
.progress-steps li.is-done{color:var(--ink)}
.progress-steps li.is-done::before{background:var(--purple);border-color:var(--purple);box-shadow:inset 0 0 0 3px #fff}
.progress-steps li.is-current{color:var(--purple)}
.progress-steps li.is-current::before{border-color:var(--purple);border-top-color:transparent;animation:tool-spin .9s linear infinite}
@keyframes tool-spin{to{transform:rotate(360deg)}}
.progress-hint{font-size:13px;color:var(--muted);margin:0 0 4px}

/* the result screen: verdict, score, the balance left and how to get more */
.tool-done{display:grid;justify-items:center;gap:12px;text-align:center;padding:4px 0 0}
.tool-done[hidden]{display:none}
.tool-done:not([hidden]){animation:done-in .45s ease-out}
@keyframes done-in{from{opacity:0;transform:translateY(8px) scale(.98)}}
.done-kicker{margin:0;font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.done-verdict{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px 16px}
.done-verdict .badge{font-size:26px;padding:8px 22px}
.done-score{font-size:20px;font-weight:700}
.done-balance{margin:0;max-width:46ch;font-size:16px;font-weight:600}
.done-balance:empty{display:none}
.done-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;width:100%}
.done-actions .primary-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 24px;font-size:17px;text-decoration:none}
.done-actions .button{min-height:48px}
.tool-done .link-button{padding:2px 6px}

/* result block */
.tool-result{margin-top:18px}
.live-result{display:grid;gap:10px;font-size:16px;line-height:1.5}
.live-result:focus{outline:3px solid #8054ff;outline-offset:4px}
.live-result h3{font-size:19px;margin:16px 0 0}
.live-result .sample-label{margin:0;overflow-wrap:anywhere}
.live-result .result-summary{flex-wrap:wrap}
.live-result .result-lead{font-size:18px;font-weight:600}
.live-result .result-explain,.live-result .muted{font-size:14px;color:var(--muted)}
.live-result .result-conflict{background:#f4efff;border-radius:12px;padding:10px 14px;font-size:15px}
.beta-note{font-size:14px;background:#fff4e5;color:#7a3e00;border-radius:12px;padding:8px 12px}
.beta-tag{display:inline-block;background:#7a3e00;color:#fff;border-radius:8px;padding:1px 8px;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.result-facts,.prov-list{display:grid;gap:8px;margin:0}
.result-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
.result-facts div,.prov-list div{background:#faf8ff;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.result-facts dt,.prov-list dt{font-size:13px;font-weight:700;color:var(--muted)}
.result-facts dd,.prov-list dd{margin:2px 0 0;font-size:15px;overflow-wrap:anywhere}
.limit-list{margin:0;padding-left:20px;display:grid;gap:6px;font-size:15px}
.result-charge{font-size:14px;font-weight:600}
.result-saved{font-size:14px;font-weight:600;color:#0b6b4a}
.live-result .result-note{margin:4px 0 0}
.result-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px;align-items:center}
.delete-confirm{display:inline-flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:15px}
.result-save .muted{margin:0}
/* Deep check (step 7): the second analysis beside the standard one */
.deep-box{margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:18px;background:#faf8ff;display:grid;gap:10px}
.deep-box[hidden]{display:none}
.deep-box h3{margin:0}
.deep-box h4{margin:6px 0 0;font-size:16px}
.deep-box p{margin:0}
.deep-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.deep-col{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;display:grid;gap:6px;justify-items:start}
.deep-col h4{margin:0;font-size:14px;color:var(--muted)}
.deep-col .badge{font-size:22px;padding:6px 18px}
.deep-compare{border-radius:12px;padding:10px 14px;font-size:15px;background:#f4efff}
.deep-compare.is-conflict{background:#fff4e5;color:#7a3e00}
.deep-compare.is-agree{background:#e9faf2;color:#0b4f38}
.deep-consent{display:flex;gap:10px;align-items:flex-start;font-size:15px;line-height:1.45;cursor:pointer}
.deep-consent input{margin-top:3px;width:20px;height:20px;flex:0 0 auto}
.deep-error{background:#ffe9e6;color:#7a1d12;border-radius:12px;padding:10px 14px;font-size:15px}
.deep-progress{font-weight:600}
.deep-offers{display:flex;flex-wrap:wrap;gap:10px}
.deep-box .button{justify-self:start}
@media(max-width:640px){.deep-cols{grid-template-columns:1fr}.deep-box .button,.deep-offers .button{width:100%}}

/* timeline */
.timeline-box{display:grid;gap:6px}
.timeline{position:relative;display:flex;align-items:flex-end;gap:2px;height:112px;padding-top:6px}
.tl-seg{position:relative;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;height:100%;min-width:3px;padding:0;margin:0;background:none;border:0;border-radius:6px;font:inherit;color:inherit;text-align:center}
button.tl-seg{cursor:pointer}
button.tl-seg:hover .tl-bar{filter:brightness(.9)}
.tl-num{font-size:12px;font-weight:800;line-height:1.2;margin-bottom:2px;color:var(--ink)}
.tl-bar{display:block;height:var(--h);background:var(--signal,#7c3aed);border-radius:6px 6px 3px 3px;min-height:6px}
.tl-seg.is-no_speech .tl-bar{background:#e2dcf3}
.tl-seg.is-unscored .tl-bar{background:repeating-linear-gradient(45deg,#d9d2f2 0 4px,#efeafc 4px 8px)}
.tl-seg.is-playing .tl-bar{box-shadow:0 0 0 2px var(--ink)}
.tl-head{position:absolute;top:0;bottom:0;left:0;width:2px;background:var(--ink);pointer-events:none}
.tl-axis{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.tl-details summary{cursor:pointer;font-size:14px;font-weight:600;color:var(--purple);padding:6px 0}
.tl-details ul{margin:6px 0 0;padding-left:20px;font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.result-audio{width:100%;margin-top:4px}
.player-note{font-size:13px;color:var(--muted);margin:4px 0 0}

/* the result page */
.result-page{max-width:820px;margin:0 auto}
.result-page h1{font-size:clamp(30px,5vw,44px);margin-bottom:8px}
.result-page-lead{color:var(--muted);margin-bottom:20px}
.result-page .result-card{padding:24px}

@media(max-width:800px){
  .tool-review{padding:14px 14px 8px}
  .review-cost{font-size:20px}
  .result-facts{grid-template-columns:1fr 1fr}
  .timeline{height:96px}
  .record-zone .record-control{width:100%}
  .live-result{font-size:15px}
  .live-result .result-lead{font-size:17px}
  .notice-actions .button{flex:1 1 100%}
  .result-actions .button{flex:1 1 100%}
}
@media(prefers-reduced-motion:reduce){.rec-dot,.progress-steps li.is-current::before,.scan-bars i,.scan-beam,.tool-done:not([hidden]){animation:none}.scan-beam{display:none}}
