/* Text interviews: one readable conversation, an anchored composer and optional help.
   The document owns transcript scrolling. Voice and staff pages use their own layouts. */
.candidate-page{--chat-width:760px;--chat-surface:#fff;--chat-border:#dbe3dd;--chat-muted:#60716b;-webkit-font-smoothing:antialiased}
.candidate-page main{max-width:1160px;padding:12px 28px 0}
.candidate-page>header .tag{display:none}
.candidate-page>header .ai-label{font-size:12px}
html[data-ergon-shell=ready] .candidate-page>header{min-height:40px;padding:4px 24px;justify-content:flex-end;border:0}
html[data-ergon-shell=ready] .candidate-page>header .brand{display:none}

/* A single quiet status strip, rather than a second page heading and a row of badges. */
.candidate-page .candidate-heading{position:sticky;top:var(--ergon-bar-height,0px);z-index:8;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px;max-width:1100px;margin:0 auto 28px;padding:14px 0;background:var(--paper,#f7f6f2);border-bottom:1px solid var(--chat-border)}
.candidate-page .candidate-heading-intro{min-width:0}
.candidate-page:not([data-ended=true]) #candidate-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.candidate-page #candidate-title{font-family:inherit;font-size:25px;letter-spacing:-.025em}
.candidate-page #candidate-steps{margin:0}
.candidate-page .candidate-heading .interview-steps-list{gap:0;flex-wrap:nowrap}
.candidate-page .candidate-heading .interview-step{padding:0;gap:7px;border-radius:0;background:transparent;color:var(--chat-muted);font-size:12px;font-weight:500}
.candidate-page .candidate-heading .interview-step+.interview-step::before{content:"";width:19px;height:1px;background:#cdd8d1;margin-inline:10px}
.candidate-page .candidate-heading .interview-step.current{color:var(--ink);font-weight:650}
.candidate-page .candidate-heading .step-marker{width:25px;height:25px;border:0;background:#e7ede8;color:#60716b;font-size:11px}
.candidate-page .candidate-heading .current .step-marker,.candidate-page .candidate-heading .done .step-marker{background:#285f50;color:#fff}
.candidate-page .candidate-heading .step-detail,.candidate-page .candidate-heading .step-separator{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.candidate-page #candidate-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0;margin-inline-start:auto;flex-wrap:nowrap}
.candidate-page #candidate-timer{max-width:19ch;font-size:12px;line-height:1.45;white-space:normal;color:var(--chat-muted);font-variant-numeric:tabular-nums}
.candidate-page #candidate-review,.candidate-page #candidate-resume,.candidate-page .candidate-more>summary{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:9px 14px;border:1px solid var(--chat-border);border-radius:9px;background:#fff;color:var(--ink);font-size:13px;font-weight:600;line-height:1.35;text-align:center;white-space:nowrap}
.candidate-page #candidate-review{border-color:#9eb5a8}
.candidate-page #candidate-resume{background:var(--ink);border-color:var(--ink);color:#fff}
.candidate-page #candidate-controls button:disabled{opacity:.45;cursor:not-allowed}
.candidate-page .candidate-more{position:relative;margin:0;padding:0;border:0}
.candidate-page .candidate-more>summary{list-style:none;cursor:pointer;box-sizing:border-box}
.candidate-page .candidate-more>summary::-webkit-details-marker{display:none}
.candidate-page .candidate-more>summary>span{font-size:19px;line-height:1;letter-spacing:2px}
.candidate-page .candidate-more[open]>summary{background:#eaf1eb;border-color:#b8cdbd}
.candidate-page .candidate-more-menu{position:absolute;top:calc(100% + 9px);inset-inline-end:0;z-index:10;width:min(300px,calc(100vw - 32px));padding:8px;display:flex;flex-direction:column;gap:3px;background:#fff;border:1px solid var(--chat-border);border-radius:14px;box-shadow:0 3px 8px #18313a08,0 15px 40px #18313a14}
.candidate-page #candidate-controls .candidate-more-menu button{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:12px;border:0;border-radius:8px;background:transparent;color:var(--ink);text-align:start;font-size:14px}
.candidate-page .candidate-more-menu span{min-width:0;white-space:normal}
.candidate-page .candidate-more-menu strong{display:block;font-size:14px;font-weight:600;line-height:1.4}
.candidate-page .candidate-more-menu small{display:block;margin-top:3px;font-size:12px;font-weight:400;line-height:1.5;color:var(--chat-muted)}
.candidate-page .candidate-more-menu svg{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.candidate-page #candidate-controls .candidate-more-menu button:hover{background:#f0f5f0}
.candidate-page #candidate-controls .candidate-more-menu button.danger{margin-top:5px;padding-top:15px;border-top:1px solid var(--chat-border);border-radius:0 0 8px 8px;color:#9b392c}
.candidate-page .candidate-more-menu .danger small{color:#805b53}
.candidate-page #candidate-controls .candidate-more-menu button.danger:hover{background:#fbefec}

/* Both speakers have a clear visual boundary and a comfortable reading measure. */
.candidate-page .candidate-columns{height:auto!important;min-height:0;display:grid;align-items:start;grid-template-columns:minmax(0,1fr)}
.candidate-page .candidate-chat{display:flex;flex-direction:column;width:100%;max-width:var(--chat-width);min-height:calc(100dvh - 210px);height:auto!important;max-height:none;margin:auto;padding:0;border:0;border-radius:0;background:transparent;overflow:visible;box-shadow:none}
.candidate-page:not([data-ended=true]) .candidate-transcript-details{flex:1;margin:0;padding:0;border:0}
.candidate-page:not([data-ended=true]) .candidate-transcript-details>summary{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.candidate-page #candidate-transcript{overflow:visible;overscroll-behavior:auto;min-height:0;padding:2px 2px 26px}
.candidate-page .candidate-turn{width:fit-content;max-width:90%;margin:0 0 24px;padding:0;border:0;border-radius:0;background:transparent;color:var(--ink);font-size:15px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}
.candidate-page .candidate-turn .speaker{display:block;margin:0 2px 7px;color:var(--chat-muted);font-size:10px;line-height:1.3;font-weight:600;letter-spacing:.075em;opacity:1}
.candidate-page .candidate-turn p{margin:0;padding:12px 16px;border:1px solid #e0e6e0;border-radius:15px;background:#fff;color:inherit;white-space:pre-wrap;line-height:1.6;text-wrap:pretty;box-shadow:0 1px 2px #17333b03}
.candidate-page .candidate-turn.participant_text{max-width:80%;margin-inline-start:auto;margin-inline-end:0;background:transparent;padding:0}
.candidate-page .candidate-turn.participant_text .speaker{display:block;text-align:end}
.candidate-page .candidate-turn.participant_text p{background:#e7efe8;border-color:transparent;box-shadow:none}
.candidate-page .candidate-turn.assistant:last-child p{border-color:#c1d2c5}
.candidate-page .candidate-turn .delivery-note{display:block;margin:6px 3px 0;font-size:12px;line-height:1.4;color:var(--chat-muted)}
.candidate-page .candidate-turn.failed p{border-color:#ba7651}
.candidate-page .candidate-choice{font-size:12px;padding:5px 11px;border-color:#ccd9d0;color:#476357;background:#f7faf6}

/* One softly framed input. Focus changes its border, without a second heavy outline. */
.candidate-page .candidate-composer{position:sticky;bottom:0;z-index:3;isolation:isolate;padding:12px 0 13px;background:var(--paper,#f7f6f2)}
.candidate-page #candidate-answer-form{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin:0;padding:16px;border:1px solid #c4d2c8;border-radius:20px;background:#fff;box-shadow:0 2px 4px #17333b04,0 5px 18px #17333b06}
.candidate-page #candidate-answer-form:focus-within{outline:0;border-color:#547e65;box-shadow:0 0 0 1px #547e652b,0 5px 18px #17333b06}
.candidate-page #candidate-answer{width:100%;min-width:0;flex:none;min-height:32px;max-height:150px;resize:none;overflow-y:auto;margin:0;padding:1px 2px;border:0;border-radius:0;outline:0;background:transparent;color:var(--ink);font:inherit;font-size:16px;line-height:1.5;box-shadow:none}
.candidate-page #candidate-answer::placeholder{color:#71837a;opacity:1}
.candidate-page .candidate-composer-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.candidate-page #candidate-send{display:grid;place-items:center;flex:none;align-self:center;width:44px;height:44px;min-height:44px;margin-inline-start:auto;padding:0;border:0;border-radius:50%;background:var(--ink);color:#fff;transition:background-color .15s,opacity .15s}
.candidate-page #candidate-send:hover{background:#2e514b}
.candidate-page #candidate-send:disabled{opacity:.38;cursor:default}
.candidate-page #candidate-send svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.candidate-page #candidate-ideas-toggle{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border:1px solid transparent;border-radius:10px;background:#edf4ee;color:#285747;font-size:13px;font-weight:500;line-height:1.4;text-align:start}
.candidate-page #candidate-ideas-toggle:hover,.candidate-page #candidate-ideas-toggle[aria-expanded=true]{background:#dfede2;border-color:#c5d8ca}
.candidate-page #candidate-ideas-toggle:disabled{opacity:.5;cursor:not-allowed}
.candidate-page #candidate-ideas-toggle svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.candidate-page #candidate-generate-answer{font-size:12px;min-height:44px;padding:8px}
.candidate-page .candidate-composer-hint{font-size:11px;line-height:1.5;color:var(--chat-muted);margin:7px 12px 0}
.candidate-page #candidate-progress{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.5;color:var(--chat-muted);margin:0 4px 9px;min-height:0}
.candidate-page[data-responding=true] #candidate-progress::before{content:"";width:6px;height:6px;flex:none;border-radius:50%;background:#648671}
.candidate-page #candidate-retry-answer{font-size:13px;margin:6px 0}

/* Recall help is a small anchored surface, not a second full-width workspace. */
.candidate-page #candidate-ideas{position:absolute;bottom:calc(100% + 2px);inset-inline-start:0;z-index:6;display:flex;flex-direction:column;width:min(430px,100%);max-height:min(62dvh,560px,var(--recall-available-height,560px));margin:0;padding:16px;border:1px solid var(--chat-border);border-radius:17px;background:#fff;box-shadow:0 3px 9px #17333b08,0 15px 40px #17333b14;overflow:hidden}
.candidate-page #candidate-ideas:has(#candidate-chips[hidden]){display:none}
.candidate-page .candidate-recall-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px;flex:none}
.candidate-page .candidate-recall-heading h2{margin:0;font-family:inherit;font-size:17px;font-weight:600;line-height:1.4;letter-spacing:-.015em}
.candidate-page #candidate-ideas-close{display:grid;place-items:center;flex:none;width:40px;min-height:40px;padding:10px;border:0;border-radius:9px;background:transparent;color:#526a5c}
.candidate-page #candidate-ideas-close:hover{background:#eef4ed}
.candidate-page #candidate-ideas-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.candidate-page #candidate-chips{margin:0;min-height:0;padding:1px 3px 3px;overflow:auto;overscroll-behavior:contain}
.candidate-page .candidate-chip-list{display:flex;flex-wrap:wrap;gap:8px;max-height:none;overflow:visible;padding:0;margin:0}
.candidate-page #candidate-ideas .a2ui-column{gap:10px}
.candidate-page #candidate-ideas .a2ui-column>span,.candidate-page .candidate-chips-label{font-size:13px;line-height:1.55;color:var(--chat-muted)}
.candidate-page #candidate-ideas .a2ui-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.candidate-page #candidate-ideas .a2ui-choices>.cue-card{grid-column:1/-1}
.candidate-page #candidate-ideas .candidate-chip{width:100%;min-height:44px;padding:10px 12px;border:1px solid #dbe5dc;border-radius:11px;background:#fff;color:var(--ink);font-size:13px;font-weight:500;line-height:1.45;text-align:start}
.candidate-page #candidate-ideas .candidate-chip.cue-card{flex-basis:auto;padding:12px;background:#f5f8f4;font-size:14px;font-weight:600}
.candidate-page #candidate-ideas .candidate-chip.cue-card img{width:25px;height:25px;padding:5px;background:#e7efe7;border-radius:8px}
.candidate-page #candidate-ideas .candidate-chip:hover{background:#eaf2e9;border-color:#b6cdbb}
.candidate-page #candidate-ideas .candidate-chip:not(.cue-card){border-color:transparent;background:transparent;color:#476557}
.candidate-page .candidate-cue-footer{margin-top:8px}

/* Preserve the existing review, saved-profile and accessibility behavior. */
.candidate-page .candidate-profile{position:relative;min-width:0;margin:0;padding:22px;overflow:visible;max-height:none}
.candidate-page[data-show-findings=false][data-phase=exploration] .candidate-profile{display:none}
.candidate-page[data-show-findings=true] .candidate-columns,.candidate-page[data-phase=review] .candidate-columns{grid-template-columns:minmax(0,1fr) 300px;gap:28px}
.candidate-page #candidate-download{display:inline-flex;align-items:center;justify-content:center;color:var(--ink);background:var(--sage);border:1px solid var(--line);padding:10px 14px;text-decoration:none;font:inherit;font-size:14px;font-weight:600;line-height:1.4}
.candidate-page[data-ended=true] .candidate-heading,.candidate-page[data-ended=true] .candidate-composer{position:static}
.candidate-page[data-ended=true] .candidate-chat{min-height:0;max-height:none}
.candidate-page #candidate-controls button:focus-visible,.candidate-page .candidate-more>summary:focus-visible,.candidate-page #candidate-ideas-toggle:focus-visible,.candidate-page #candidate-ideas-close:focus-visible,.candidate-page #candidate-download:focus-visible{outline:3px solid #9a7020;outline-offset:3px}

@media(max-width:1050px){
 .candidate-page .candidate-heading .interview-step:not(.current) .step-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .candidate-page .candidate-heading .interview-step+.interview-step::before{width:14px;margin-inline:5px}
}
@media(max-width:760px){
 .candidate-page main{padding:8px 16px 0}
 html[data-ergon-shell=ready] .candidate-page>header{padding:4px 16px}
 .candidate-page .candidate-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin-bottom:22px;padding:10px 0}
 .candidate-page .candidate-heading-intro{grid-column:1;grid-row:1}
 .candidate-page .candidate-heading #candidate-steps{order:initial;width:auto;margin:0}
 .candidate-page .candidate-heading .interview-step{font-size:11px;gap:5px}
 .candidate-page .candidate-heading .step-marker{width:22px;height:22px;font-size:10px}
 .candidate-page .candidate-heading .interview-step+.interview-step::before{width:10px;margin-inline:3px}
 .candidate-page #candidate-controls{display:contents}
 .candidate-page #candidate-timer{grid-column:2;grid-row:1;max-width:17ch;margin:0;font-size:11px;text-align:end}
 .candidate-page #candidate-review,.candidate-page #candidate-resume{grid-column:1;grid-row:2;justify-self:start;margin:0;font-size:12px;padding:9px 11px;white-space:normal}
 .candidate-page .candidate-more{grid-column:2;grid-row:2;justify-self:end}
 .candidate-page .candidate-more>summary{font-size:12px;padding:9px 11px}
 .candidate-page .candidate-chat{min-height:calc(100dvh - 220px);height:auto!important;padding:0}
 .candidate-page #candidate-transcript{padding:2px 0 20px;height:auto!important}
 .candidate-page .candidate-turn{max-width:95%;font-size:15px;margin-bottom:22px;padding:0}
 .candidate-page .candidate-turn p{padding:11px 13px}
 .candidate-page .candidate-turn.participant_text{max-width:89%;margin-inline-start:auto;margin-inline-end:0;padding:0}
 .candidate-page .candidate-composer{padding:10px 0 max(8px,env(safe-area-inset-bottom));bottom:0}
 .candidate-page #candidate-answer-form{padding:12px 13px;gap:9px;border-radius:18px}
 .candidate-page #candidate-answer{min-height:30px;max-height:26dvh}
 .candidate-page #candidate-ideas-toggle{font-size:12px;padding:8px 10px;max-width:calc(100% - 52px)}
 .candidate-page #candidate-ideas{width:100%;max-height:min(48dvh,var(--recall-available-height,560px));padding:12px;border-radius:15px}
 .candidate-page .candidate-composer-hint{display:none}
 .candidate-page[data-show-findings=true] .candidate-columns,.candidate-page[data-phase=review] .candidate-columns{display:flex;flex-direction:column}
 .candidate-page .candidate-profile{width:100%}
}
@media(prefers-reduced-motion:reduce){.candidate-page #candidate-send{transition:none}}
@media print{.candidate-composer,.candidate-page>header,.candidate-heading nav,.candidate-page #candidate-controls{display:none!important}.candidate-page .candidate-heading{position:static}.candidate-page .candidate-chat{min-height:0}.candidate-page .candidate-turn{break-inside:avoid}}

.candidate-page #candidate-progress:empty{display:none}
