/* Hallmark · Ribbon · scope: app · redesign: full · signature: lit stage microphone */
/* Recording is the primary workspace. The evidence and the learner's archive each have their own view. */
:root{
  --paper:#f6f5ee;--sheet:#fffef9;--ink:#172c26;--sub:#51635a;--faint:#68786e;
  --edge:#d6dbcd;--rail:#eaece2;--rail-selection:#d5dfcd;--deep:#123d34;--night:#113a32;
  --stage-ink:#f3f3db;--sage:#b6cdb7;--brass:#e5b373;--active:#f7aa73;--wire:#467262;
  --green:#255e4c;--muted:var(--sub);--line:var(--edge);--amber:var(--brass);
  --sans:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  --display:Georgia,"Songti SC","STSong","SimSun",serif;
  --digits:Consolas,"SFMono-Regular",monospace;--danger:#982f25;
  font-family:var(--sans);font-size:16px;color:var(--ink);background:var(--paper)
}
html,body{overflow-x:clip}body{color:var(--ink);background:var(--paper)}
.shell{display:grid;grid-template-columns:214px minmax(0,1fr);max-width:1820px;margin:auto;min-height:100dvh}
.sidebar{display:flex;align-items:stretch;flex-direction:column;gap:0;background:var(--rail);border-right:1px solid var(--edge);height:100dvh;overflow-y:auto;padding:26px 16px 16px;z-index:4}
.brand{display:flex;gap:11px;align-items:center;color:var(--ink);padding:1px 8px 30px;font-weight:700;font-size:22px}
.brand small,.sidebar-bottom small{display:block;letter-spacing:0;color:var(--sub);font-size:12px;font-weight:400;margin-top:3px}
.studio-icon{display:block;width:20px;height:20px;flex:none}
.studio-mark{display:grid;place-items:center;width:40px;height:44px;border-radius:12px 12px 12px 3px;background:var(--deep);color:var(--stage-ink)}
.studio-mark .studio-icon{width:26px;height:26px}
.studio-links{display:grid;gap:4px}.studio-links p{font-size:12px;font-weight:600;color:var(--faint);margin:18px 12px 7px}
.studio-nav{display:flex;align-items:center;gap:13px;text-align:left;min-height:45px;border:0;border-radius:7px;padding:10px 13px;background:none;color:var(--sub);font:500 15px var(--sans)}
.studio-nav:hover{background:var(--sheet);color:var(--ink)}
.studio-nav[aria-current="page"]{background:var(--rail-selection);color:var(--deep);font-weight:700}
.studio-nav[aria-current="page"]::after{content:"";display:block;width:5px;height:14px;border-radius:4px;background:var(--green);margin-left:auto}
.studio-user{margin-top:auto;padding-top:26px}.studio-user>.studio-nav{width:100%}
.sidebar-bottom{margin:14px 0 0;padding:18px 4px 4px;border-top:1px solid var(--edge);display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.small-avatar{width:31px;height:31px;border-radius:50%;background:var(--rail-selection);color:var(--deep)}
#user-name{font-size:14px}.sidebar-bottom .text-button{font-size:13px;margin-left:auto}
.shell main{min-width:0;padding:0;background:var(--paper)}
.topbar{display:flex;height:59px;min-height:59px;align-items:center;justify-content:space-between;margin:0;padding:0 clamp(20px,3.4vw,58px);border-bottom:1px solid var(--edge);font-size:13px;color:var(--sub);background:var(--paper)}
.studio-path,.studio-path b{display:flex;align-items:center;gap:12px}.studio-path .studio-icon{width:13px;height:13px}.studio-path b{color:var(--ink)}
#mobile-nav{display:none}.studio-body{max-width:1480px;margin:auto;padding:30px clamp(20px,3.4vw,58px) 60px}
.studio-heading{margin:0 0 24px}.studio-heading h1{margin:0;font-size:clamp(30px,2.45vw,41px);font-weight:670;line-height:1.25;letter-spacing:-.04em;overflow-wrap:break-word;min-width:0}
.studio-heading p{font-size:15px;line-height:1.6;color:var(--sub);margin:8px 0 0}
.record-layout{display:grid;grid-template-columns:minmax(0,1.26fr) minmax(290px,1fr);gap:22px;align-items:start}
.console,.card,.studio-form{border:1px solid var(--edge);border-radius:13px;background:var(--sheet);box-shadow:none}
.console{overflow:hidden}.microphone-deck{position:relative;isolation:isolate;overflow:hidden;background:var(--night);color:var(--stage-ink);min-height:340px;height:clamp(340px,29vw,465px)}
.deck-caption,.deck-target,.capture-strip{position:absolute;z-index:2}.deck-caption{left:26px;top:22px;display:flex;align-items:center;gap:9px;color:var(--sage);font-size:13px}.deck-caption .studio-icon{width:17px;height:17px}
.deck-target{left:26px;top:22%;display:flex;flex-direction:column;align-items:flex-start;max-width:56%;pointer-events:none}
.deck-target strong{font:normal clamp(46px,5.9vw,90px)/1.14 Cambria,"Times New Roman",serif;letter-spacing:-.025em;color:var(--stage-ink)}
.deck-target span{display:block;color:var(--sage);font-size:15px;line-height:1.5;margin-top:6px}
.mic-shot{position:absolute;top:4%;right:0;bottom:16%;width:52%;z-index:1;pointer-events:none}
.mic-shot img{width:100%;height:100%;object-fit:contain;transform:rotate(7deg)}
.deck-orbits{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.deck-orbits i{position:absolute;left:74%;top:48%;width:48%;aspect-ratio:1;border:1px solid var(--wire);border-radius:50%;transform:translate(-50%,-50%);opacity:.6}
.deck-orbits i:nth-child(2){width:65%;opacity:.36}.deck-orbits i:nth-child(3){width:85%;opacity:.22}
.capture-strip{left:26px;right:26px;bottom:20px;display:flex;align-items:flex-end;justify-content:space-between;gap:15px;border-top:1px solid var(--wire);padding-top:12px}
#recording-label{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--sage)}
#recording-label::before{content:"";width:8px;height:8px;box-sizing:border-box;border:1px solid var(--sage);border-radius:50%}
.recording #recording-label::before{background:var(--active);border-color:var(--active);animation:mic-lamp 1.3s ease-in-out infinite alternate}
@keyframes mic-lamp{to{opacity:.45}}
#clock{font:500 clamp(25px,3vw,37px)/1.2 var(--digits);color:var(--stage-ink);letter-spacing:-.055em;display:block;margin-top:4px}
.capture-strip .level-bars{display:flex;align-items:flex-end;gap:3px;height:32px;margin:0;padding-bottom:4px}
.capture-strip .level-bars i{width:3px;height:5px;min-height:3px;border-radius:1px;background:var(--sage);opacity:.66;transition:none}
.recording .capture-strip .level-bars i{background:var(--active);opacity:1}
.capture-actions{padding:18px 22px 16px}.primary,.record-button{border-radius:7px;background:var(--deep);color:var(--sheet);font-size:16px;min-height:45px;box-shadow:none}
.record-button{width:100%;margin:0}.record-button .mic-icon{color:var(--brass)}
.record-status{min-height:0;margin:9px 0;color:var(--sub);font-size:13px}.record-options{margin:6px 0;gap:8px;display:flex;justify-content:space-between}
.text-button,.record-options .text-button{color:var(--green);font-size:14px;min-height:36px}
.privacy-note{line-height:1.65;color:var(--sub);font-size:12px;margin:11px 0 0;padding-top:11px;border-top:1px solid var(--edge)}
.practice-panel,.analysis-panel,.tutor-panel,.logbook,.studio-form{padding:22px}
.section-title{gap:12px;margin:0}.section-title h2,.flow-heading h2,.logbook h2{font-size:20px;font-weight:650;color:var(--ink);margin:0;line-height:1.45}
.section-title .step-label{display:none}.exercise-picker{display:grid;grid-template-columns:1fr;gap:7px;padding:0;margin:19px 0 14px;background:none;border:0}
.exercise-picker>span{color:var(--sub);font-size:12px}.exercise-picker label,.reference-controls label{font-size:14px;color:var(--ink);font-weight:600}
.exercise-picker select,.reference-controls select,.chat-history-controls select{width:100%;background:var(--sheet);color:var(--ink);border:1px solid var(--edge);border-radius:6px;min-height:42px;font-size:15px;padding:6px 11px}
.tones{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0}.tone{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-height:98px;height:auto;margin:0;padding:9px 0;background:var(--paper);border:1px solid var(--edge);border-radius:7px;color:var(--ink)}
.tone.active{background:var(--deep);border-color:var(--deep);box-shadow:none}.tone.active b,.tone.active small{color:var(--stage-ink)}.tone b{font:500 clamp(16px,1.65vw,25px)/1.25 var(--sans);color:var(--ink);overflow-wrap:anywhere}.tone small{font-size:11px;color:var(--sub);white-space:nowrap}
.tone-stroke{width:50%;height:18px;color:var(--green);margin-bottom:4px}.tone-stroke path{stroke:currentColor;stroke-width:2.3;fill:none;stroke-linecap:round}.tone.active .tone-stroke{color:var(--brass)}
.exercise-note{margin:14px 0;border:none;background:none;padding:0}.exercise-note p,.reference-controls p{font-size:13px;line-height:1.7;color:var(--sub)}
.reference-controls{border:0;border-top:1px solid var(--edge);padding:15px 0 0;margin:0;background:none;border-radius:0;gap:8px}.reference-controls label{flex-basis:100%}.reference-controls select{width:auto;min-width:110px}.reference-controls .text-button{min-height:42px}
.analysis-layout{display:grid;gap:18px}.workflow-slot:empty,.workflow-slot:not(:has(>:not([hidden]))){display:none}
.evidence-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:stretch}
.analysis-flow{background:var(--sheet);border:1px solid var(--edge);padding:18px 20px;margin:0;border-radius:12px}
.flow-note{color:var(--sub);font-size:13px}.agent-node{border-radius:7px;background:var(--paper);color:var(--ink);border-color:var(--edge)}
.agent-node.pending b{color:var(--sub);background:var(--rail)}
.agent-node.running{border-color:var(--active);background:var(--sheet)}.agent-node.running b{background:var(--brass);color:var(--ink);animation:mic-lamp .9s ease-in-out infinite alternate}
.agent-node.completed{background:var(--rail);border-color:var(--sage)}.agent-node.completed b{background:var(--green);color:var(--sheet)}
.agent-node.failed{border-color:var(--danger)}
.thinking {
  display:grid; grid-template-columns:clamp(65px,15vw,92px) minmax(0,1fr); align-items:center; gap:9px 10px;
  margin:10px 0 0; padding:12px 15px; border:1px solid var(--edge); border-radius:10px;
  background:var(--sheet); color:var(--ink);
}
.thinking .thinking-message {font-size:16px;line-height:1.4;color:var(--ink);font-weight:650;}
.thinking-steps {
  --thinking-rail-size:7px;
  grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(8px,2vw,16px);margin:0;padding:0;list-style:none;
}
html[data-z-pane] body .thinking-steps li {
  position:relative;min-width:0;display:grid;align-content:start;gap:7px;color:var(--ink);
  font-size:clamp(15px,1.65vw,17px)!important;line-height:1.4;
}
.thinking-steps li::before {
  content:'';display:block;height:var(--thinking-rail-size);border-radius:999px;
  background-color:var(--progress-track,var(--edge));transition:background-color 260ms ease-out;
}
.thinking-steps li[data-state='completed']::before {background-color:var(--progress-complete,var(--green));}
.thinking-steps li[data-state='running'] {font-weight:700;}
.thinking-steps li[data-state='running']::after {
  content:'';position:absolute;inset:0 0 auto;height:var(--thinking-rail-size);border-radius:999px;
  background:var(--progress-fill,#176344) url('/shared/tutor-jade-shine.webp') center / 150% 100% no-repeat;
  animation:tutor-rail-light-up 380ms ease-out both,tutor-rail-sweep 1.6s ease-in-out infinite;
  pointer-events:none;
}
.thinking-steps li[data-state='failed']::before {background-color:var(--danger);}
@keyframes tutor-rail-light-up {
  from {clip-path:inset(0 100% 0 0 round 999px);}
  to {clip-path:inset(0 round 999px);}
}
@keyframes tutor-rail-sweep {
  from {background-position:160% 50%;}
  to {background-position:-60% 50%;}
}
@media (prefers-reduced-motion:reduce) {
  .thinking-steps li::before {transition:none;}
  .thinking-steps li[data-state='running']::after {animation:none;}
}
@media(min-width:850px){.analysis-flow .agent-nodes{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1150px){.analysis-flow .agent-nodes{grid-template-columns:repeat(6,minmax(0,1fr))}.analysis-flow .agent-nodes:has(>:nth-child(8)){grid-template-columns:repeat(4,minmax(0,1fr))}}
.analysis-flow .agent-node strong{font-size:14px}.analysis-flow .agent-node span{font-size:12px}
.score-dashboard{margin:0;background:var(--sheet);border:1px solid var(--edge);padding:20px;border-radius:12px}
.analysis-score {margin-block-start:12px;}
.analysis-score .score-hero {margin:0;}
.analysis-score .science-caption {margin:7px 0 0;}
.score-hero{background:var(--deep);border-radius:8px}.viz-tabs{background:var(--rail)}.viz-tabs button{font-size:14px}
.empty-chart b{font-size:17px}.empty-chart p,.chart-foot,.chart-legend,.metrics small,.science-caption{font-size:13px}
.metrics{border-color:var(--edge)}.chart,.science-figures figure,.science-comparison>div{background:var(--paper)}
.small-avatar,.avatar{background:var(--rail-selection);color:var(--deep)}
.tutor-panel{max-width:1000px}.messages{max-height:62vh}.message p{font-size:16px;line-height:1.8}
.page-actions{display:flex;gap:10px}.page-actions button,.studio-form #create-invite{background:var(--sheet);color:var(--deep);border:1px solid var(--edge);border-radius:7px;padding:10px 16px;min-height:44px}
.page-actions button:last-child{background:var(--deep);color:var(--sheet)}
.logbook,.studio-form{max-width:940px}.history{height:auto;max-height:none;overflow:visible;display:grid;gap:0;margin-top:18px}
.history-item{min-height:49px;padding:10px 4px;border-radius:0;border:0;border-bottom:1px solid var(--edge);font-size:16px;background:transparent;color:var(--ink)}
.history-item:hover{background:var(--rail)}.empty-history{border:1px dashed var(--edge);padding:32px;text-align:center;color:var(--sub)}
.studio-form.dialog{width:100%;margin:0;position:static;color:var(--ink);max-height:none}.studio-form :is(label,p,textarea,button){font-size:15px}
#studio-notice{color:var(--danger);padding:10px 0}.studio-auth-active .studio-links{opacity:.87}
.preview :is(a,summary,label,p),.selection-controls input,.analysis-settings input,.chart-foot button,.preview-heading a{font-size:13px}
.chart-legend .unit,.score-table :is(th,td),.experiment-steps :is(span,b),.message-sources,.viz-legend,.chat-history-controls label{font-size:13px}
.studio-links p{color:var(--sub)}
.studio-heading h1,.entry-language-content h1,.entry-login-content h1{text-wrap:balance}
.studio-auth-active #logout{display:none}
[hidden]{display:none!important}:where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--amber);outline-offset:3px}
@media(max-width:1120px){.shell{grid-template-columns:182px minmax(0,1fr)}.record-layout{gap:14px}.studio-body{padding-inline:22px}.sidebar{padding-inline:10px}.evidence-pair{grid-template-columns:1fr}.tone small{font-size:10px}}
@media(max-width:850px){.shell{display:block;min-height:100dvh}.shell main{padding:0}
 .sidebar{position:fixed;top:52px;left:0;bottom:0;height:calc(100dvh - 52px);width:min(260px,85%);display:none;padding:18px;box-shadow:none}.menu-open .sidebar{display:flex}
 .topbar{position:sticky;top:0;z-index:5;height:52px;min-height:52px;padding:0 16px}.topbar-actions{display:flex;gap:10px}
 #mobile-nav{display:grid;place-items:center;width:40px;height:40px;border:none;background:none;color:var(--ink)}#mobile-nav .studio-icon{width:20px;height:20px}
 .mobile-account{display:inline-flex;align-items:center}.studio-auth-active .topbar-actions{display:none}
 .studio-heading{margin-bottom:18px}.studio-body{padding:21px 16px 40px}.practice-panel,.analysis-panel,.tutor-panel,.logbook,.studio-form{padding:16px}
 .studio-heading h1{font-size:29px}.studio-user{margin-top:auto}.sidebar-bottom{display:flex}.studio-nav{min-height:46px}
}
@media(max-width:680px){.record-layout,.evidence-pair{grid-template-columns:minmax(0,1fr)}.microphone-deck{min-height:275px;height:275px}
 .deck-target{top:24%}.deck-target strong{font-size:56px}.mic-shot{right:3%;width:46%;bottom:15%}.deck-caption,.deck-target,.capture-strip{left:19px}
 .capture-strip{right:19px;bottom:14px}.capture-actions{padding:14px 16px}.capture-strip .level-bars{gap:2px}
 .tone small{font-size:12px}.tone b{font-size:20px}.tone{min-height:84px}.record-options .text-button{min-height:44px}
 .studio-heading p{font-size:14px}.score-dashboard{padding:14px}.topbar-actions button{font-size:12px}.agent-nodes{gap:8px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
