/* Home: the message and the jobs come first, before the tool directory. */
.focused-home .ax-home-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px 18px;flex-wrap:wrap;margin-bottom:15px}
.focused-home .ax-home-head h1{margin:0;font-size:clamp(26px,3vw,36px)}
.home-date{color:var(--ax-muted);font-size:13px}
.focused-home .ax-start{position:relative;isolation:isolate;overflow:hidden;background:#153f44;border-left:0;padding:clamp(17px,2.25vw,28px)}
.focused-home .ax-start:before{content:"";position:absolute;z-index:-1;right:0;top:0;bottom:0;width:33%;background:repeating-linear-gradient(120deg,transparent 0 21px,#ffffff0b 22px 24px,transparent 25px 38px);pointer-events:none}
.focused-home .ax-start-button{min-height:44px}
.home-columns{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:clamp(18px,2.3vw,32px);align-items:start}
.home-columns.office-home{grid-template-columns:minmax(0,1fr)}
.home-columns>div{min-width:0}.focused-home .ax-section{margin:22px 0}
.focused-home .ax-quick{grid-template-columns:repeat(2,minmax(0,1fr))}
.office-home .ax-quick{grid-template-columns:repeat(auto-fit,minmax(155px,1fr))}
.focused-home .ax-job-list{display:grid;gap:0;border:1px solid var(--ax-line);border-radius:14px;overflow:hidden;background:var(--theme-surface,#fff)}
.focused-home .ax-job{min-height:70px;padding:13px 15px;margin:0;border:0;border-radius:0;background:transparent;gap:10px}
.focused-home .ax-job+.ax-job{border-top:1px solid var(--ax-line)}
.focused-home .ax-job:hover,.focused-home .ax-job:focus-visible{background:var(--theme-surface-success,#edf6f2)}
.focused-home .ax-job:focus-visible{outline-offset:-3px}
.focused-home .ax-job strong{margin-top:3px;font-size:15px;line-height:1.35}
.focused-home .ax-job .ax-state{font-size:11px;flex-shrink:0;max-width:30%;white-space:normal}
.focused-home .ax-job-list>p{padding:12px 15px;margin:0;color:var(--ax-muted)}
.focused-home .ax-tile{padding:10px;gap:8px;min-height:54px}
.focused-home .ax-tile-icon{width:30px;height:30px}
.focused-home .ax-health{padding:0;border:1px solid var(--ax-line);border-radius:12px;background:var(--theme-surface,#fff)}
.focused-home .ax-health summary,.job-toolbox>summary{cursor:pointer}
.focused-home .ax-health summary{padding:13px 14px;min-height:46px;color:var(--ax-ink)}
.focused-home .ax-health summary strong{font-size:14px}
.focused-home [data-status-summary]{float:right;font-size:12px;color:var(--ax-muted);padding-top:2px}
.focused-home [data-status-summary].attention{color:var(--theme-warning,#855500)}
.focused-home .ax-system-body{border-top:1px solid var(--ax-line);padding:8px 12px 13px}
.focused-home .ax-health-list{grid-template-columns:1fr}

/* Job: permanent controls are limited to writing, files and the tool menu. */
#app .focus-job-head{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
#app .focus-job-title{min-width:0}
#app .focus-job-head h1{display:block;overflow-wrap:anywhere;margin:4px 0 0;font-size:clamp(18px,2vw,25px);line-height:1.24;letter-spacing:-.025em}
#app .focus-job-head .eyebrow{font-size:10px;letter-spacing:.08em}
.focus-switch,.job-toolbox>summary{font:inherit;font-weight:650;font-size:13px;min-height:40px;color:var(--ax-ink);border:1px solid var(--ax-line);border-radius:9px;background:var(--theme-surface,#fff)}
.focus-switch{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;cursor:pointer;padding:6px 10px;flex:none}
.focus-switch[aria-pressed=true],#app .compose-shortcut{border-color:var(--theme-border-success,#8bbbaa);background:var(--theme-surface-success,#e6f2ed);color:var(--theme-success,#165f4f)}
#app .job-toolbar{display:flex;align-items:flex-start;flex-wrap:wrap;gap:7px;margin:0 0 10px}
#app .job-toolbar .button,#app .job-toolbox>summary{font-size:13px;line-height:1.25;min-height:40px;padding:8px 13px;display:inline-flex;align-items:center}
.job-toolbox>summary{gap:8px;list-style:none}
.job-toolbox>summary::-webkit-details-marker{display:none}
.job-toolbox>summary:after{content:"";height:6px;width:6px;border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:translateY(-2px) rotate(45deg)}
.job-toolbox[open]>summary:after{transform:translateY(2px) rotate(225deg)}
/* The open panel stays in document flow, including on narrow phones. */
.job-toolbar:has(.job-toolbox[open]){display:grid!important;grid-template-columns:max-content max-content minmax(0,1fr)}
.job-toolbox[open]{display:contents}
.job-toolbox[open]::details-content{grid-column:1/-1;min-width:0}
.job-toolbox[open]>summary{justify-self:start;align-self:start}
.tool-groups{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:14px;padding:14px;border:1px solid var(--ax-line);border-radius:12px;background:var(--theme-surface,#fff)}
.tool-groups>div{display:flex;flex-wrap:wrap;gap:5px;align-items:flex-start}
.tool-groups strong{width:100%;font-size:12px;margin-bottom:4px;color:var(--ax-muted)}
#app .tool-groups .button{min-height:36px;padding:7px 9px;font-size:12px}
.focus-job .continuity-actions{padding:0 12px 10px}
.focus-job .natural-chat-surface{overflow:visible}
.natural-chat #app .focus-job .message-text{font-size:15px;line-height:1.65}
#app.reading-view .ax-side,#app.reading-view .ax-top,#app.reading-view .ax-bottom{display:none}
body #app.reading-view .main{margin-left:0!important;padding-bottom:env(safe-area-inset-bottom)!important}
#app.reading-view .focus-job{max-width:920px}
#app.reading-view .case-page{padding-top:16px}
#app.reading-view .focus-job>.continuity-strip{display:none}
.natural-chat #app .focus-job .thread{height:clamp(165px,32dvh,340px);min-height:140px;overflow:auto}
.natural-chat #app.reading-view .focus-job .thread{height:clamp(210px,calc(100dvh - 440px),680px)}
.natural-chat #app .focus-job .natural-composer{padding:12px 16px}
.focus-job .natural-composer .chat-help{margin:6px 0 0}
.focus-job .natural-composer .chat-help>summary{min-height:36px;padding-top:8px}
.focused-home .ax-system-body [data-status-refresh]{min-height:44px}
#app :is(.focus-switch,.job-toolbox>summary,.ax-health>summary):focus-visible{outline:3px solid var(--theme-border-success,#277e6b);outline-offset:2px}
@media(max-width:1000px){.home-columns{grid-template-columns:minmax(0,1fr)}.home-columns .ax-section{margin:18px 0}.home-columns{gap:0}.home-secondary,.home-jobs{min-width:0}}
@media(max-width:800px){
 .focused-home .ax-home-head{margin-bottom:11px}
 .focused-home .ax-start{gap:9px}
 .focused-home .home-date{font-size:12px}
 #app .focus-job-head{margin-bottom:8px}
 #app .focus-switch,#app .job-toolbar .button,#app .job-toolbox>summary{min-height:44px}
 #app .focus-job .natural-composer{padding:10px 12px}
 .natural-chat #app .focus-job .thread{height:clamp(150px,28dvh,300px);min-height:120px;overflow:auto}
 .natural-chat #app.reading-view .focus-job .thread{height:clamp(185px,calc(100dvh - 475px),540px)}
 .tool-groups{grid-template-columns:1fr;gap:10px}
 .natural-chat #app .focus-job .natural-chat-surface{overflow:visible}
}
@media(max-width:520px){
 .focused-home .ax-home-head{align-items:center;gap:5px 10px}
 .focused-home .ax-start p{font-size:13px}
 .focused-home .ax-job{min-height:67px;padding:11px}
 .focused-home .ax-job>.icon{display:none}
 #app .job-toolbar .button,#app .job-toolbox>summary{padding:7px 10px}
}
@media(max-width:350px){.focused-home .ax-quick{grid-template-columns:minmax(0,1fr)}#app .focus-switch{font-size:12px;padding:5px 7px}#app .job-toolbar{gap:5px}}

.intake-followup :is(.intake-sources,.intake-options){display:flex;flex-wrap:wrap;gap:6px}
.intake-followup :is(.intake-sources,.intake-options)>button{
  min-height:44px;padding:7px 10px;font:inherit;font-size:13px;font-weight:650;
  background:var(--ax-paper,#fff);color:var(--ax-ink,#17283b);border:1px solid var(--ax-line,#d8e1e7);border-radius:8px;cursor:pointer;
}
.intake-followup button[aria-pressed="true"]{background:var(--theme-surface-success,#e6f2ed);color:var(--ax-teal,#176759);border-color:var(--ax-teal,#176759)}
.intake-source-options{margin:4px 0;color:var(--ax-muted,#516479);font-size:12px}
.intake-source-options>summary{width:fit-content;cursor:pointer;padding:9px 0}
.intake-destination{margin:12px 0;padding:12px;border:1px solid var(--ax-line,#d8e1e7);border-radius:12px;background:var(--ax-paper,#fff)}
.intake-destination h2{font-size:14px;margin:0 0 8px}
.intake-destination #intake-search-label{display:grid;gap:5px;margin:12px 0;font-size:13px;font-weight:650}
.intake-followup [hidden]{display:none!important}
.intake-destination input[type="search"]{width:100%;min-height:44px}
.intake-followup .intake-matches:not(:empty){margin-top:10px}
.intake-followup .route-choice{min-height:44px;color:var(--ax-ink,#17283b)}
.intake-selected{display:grid;gap:6px;color:var(--ax-ink,#17283b);overflow-wrap:anywhere}
.intake-selected p{line-height:1.5}.intake-selected small{color:var(--ax-muted,#516479)}
.intake-selected button{width:fit-content;min-height:44px}
.focused-home .job-next-step{display:block;font-size:12px;line-height:1.45;color:var(--ax-muted,#516479);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.focused-home .ax-job>span:first-child{min-width:0}
@media(max-width:680px){
  #app .natural-new.intake-followup{margin:12px auto 18px}
  #app .intake-followup #intake-body{min-height:108px;height:118px;resize:vertical}
}

.bench-brief{display:grid;gap:1rem}
.bench-brief .brief-job{margin:0;color:var(--muted);font-weight:600}
.bench-brief h3,.bench-brief p{margin:0 0 .4rem}
.brief-next,.brief-item{padding:.8rem 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.brief-item p,.brief-next p{white-space:pre-wrap}
.brief-item>a,.brief-item>button{margin-right:.7rem}
.brief-actions,.brief-filters,.brief-linked{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}
.brief-linked{font-size:.88rem;padding:.4rem 0;overflow-wrap:anywhere}
.brief-linked span,.brief-linked a{max-width:100%}
.bench-brief [hidden]{display:none!important}
.bench-brief label{display:grid;gap:.25rem;min-width:0}
.brief-filters{margin:.65rem 0;align-items:end}
.brief-filters label{flex:1 1 9rem}
.bench-brief input,.bench-brief select{max-width:100%;width:100%}

/* Keep evidence actions together at the bench and leave the normal file picker available. */
#app .phone-camera{display:none}
.resume-drafts summary{min-height:44px;padding:12px 0;cursor:pointer}
#app .retry-evidence,#app .file-photo-preview{min-height:44px}
.device-files-error{padding:.6rem;color:var(--theme-ink,#243143);background:var(--theme-surface-warning,#fff3dc)}
.ax-photo-dialog{width:min(780px,calc(100% - 16px));max-height:calc(100dvh - 24px);box-sizing:border-box;padding:14px;overflow:auto}
.ax-photo-dialog[open]{display:flex;flex-direction:column;gap:10px}
.ax-photo-dialog header,.photo-controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.ax-photo-dialog header{flex-wrap:nowrap}.ax-photo-dialog h2{font-size:1.05rem;margin:0;min-width:0;overflow-wrap:anywhere}
.ax-photo-dialog .photo-frame{position:relative;overflow:auto;min-height:0;max-height:66dvh;border-radius:6px;background:var(--theme-soft,#eef2f6);overscroll-behavior:contain}
.photo-frame img{display:block;max-width:100%;height:auto;max-height:66dvh;object-fit:contain;margin:auto}
.photo-frame.zoomed img{width:200%;max-width:none;max-height:none;margin:0}
.ax-photo-dialog button,.ax-photo-dialog .button{min-height:44px}
.photo-status{margin:0}
@media(max-width:800px),(pointer:coarse){
 #app .phone-camera{display:inline-flex;min-height:44px;align-items:center}
 #app .natural-attach,#app .intake-followup .natural-send-row{flex-wrap:wrap}
 #app .natural-attach>span{flex-basis:100%}
 #app .natural-send-row .attach-button{min-height:44px;align-items:center;display:inline-flex}
}
@media(max-width:800px) and (pointer:coarse){
 #app #composer-text,#app #intake-body,#app #intake-title,#app #job-chat-search,#app #intake-job-search{font-size:max(16px,var(--ax-reading-font,16px))}
}
.chat-find-dialog button.ax-find-row{width:100%;font:inherit;background:transparent;border:0;border-bottom:1px solid var(--theme-border,#d8e1e7);text-align:start;cursor:pointer}.ax-photo-dialog .photo-controls{padding:0}.ax-photo-dialog .photo-frame[hidden]{display:none}
.activity-home p,.daily-activity p,.daily-activity small{color:var(--theme-muted,#475569)}
.daily-activity{display:grid;gap:10px;color:var(--theme-ink,#182839)}
.daily-activity h3,.daily-activity p{margin:0}
.daily-activity form{display:grid;gap:12px}
.daily-activity .alert-check{display:flex;align-items:center;gap:10px;min-height:40px}
.daily-activity .alert-check input{width:20px;height:20px}
.daily-activity ul{padding:0;list-style:none;max-height:32dvh;overflow:auto}
.daily-activity li{padding:8px 0;border-bottom:1px solid var(--theme-border,#cbd5e1);overflow-wrap:anywhere}
.daily-activity li strong,.daily-activity li small{display:block}
.daily-activity li a{display:inline-block;margin-right:8px;padding:6px 0}
.activity-banner{position:fixed;z-index:9999;inset-inline:12px;margin-inline:auto;max-width:440px;display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:12px;border:1px solid var(--theme-border-strong,#748291);box-shadow:0 6px 24px #0003;background:var(--theme-surface,#fff);color:var(--theme-ink,#182839);animation:activity-in .22s ease-out}
.activity-banner.top{top:calc(env(safe-area-inset-top) + 12px);--arrival:-16px}
.activity-banner.bottom{bottom:calc(env(safe-area-inset-bottom) + 72px);--arrival:16px}
.activity-banner strong{flex:1;min-width:0}
.activity-banner button{min-height:44px;border:0;background:transparent;color:var(--theme-accent,#20599b);font:inherit;cursor:pointer}
@keyframes activity-in{from{transform:translateY(var(--arrival));opacity:0}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.activity-banner{animation:none}}
