/* Compact flight-training workbench. Brand gradients and authored chart/PDF typography are retained. */
:root[data-theme]{--ui-font:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--ui-focus:#673580;--ui-danger:#953d35;--ui-danger-bg:#fff3f0;--ui-motion:140ms;--ui-radius:5px;--control-edge:#93859d}
:root[data-theme=dark]{--ui-focus:#e4c58c;--ui-danger:#ffc0b5;--ui-danger-bg:#36211f;--control-edge:#987fa5}
@media screen{
 body,button,input,select,textarea{font-family:var(--ui-font)}
}
body{font-size:14px;line-height:1.45}
button,a,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}
button,summary{touch-action:manipulation}
button{font-weight:500;transition:background-color var(--ui-motion),border-color var(--ui-motion),color var(--ui-motion)}
[data-theme] :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px;scroll-margin-block:96px}
[data-theme] .lesson-table tr[data-row]:focus-visible{outline-offset:-3px}
/* One focus boundary for the composite search; no nested rings. */
[data-theme] .exercise-search-field:has(:focus-visible){outline:2px solid var(--ui-focus);outline-offset:2px;border-color:var(--ui-focus)}
[data-theme] .exercise-search-field #search:focus-visible{outline:none}
[data-theme] .exercise-search-field .search-clear:focus-visible{outline-offset:-3px}
[data-theme] button:disabled{cursor:not-allowed;opacity:.6}
[data-theme] .topbar{box-shadow:none;gap:8px}
.topbar .title{margin:0;min-width:0;font:inherit;letter-spacing:normal}
.topbar .title strong{font-size:15px;font-weight:650;line-height:1.3}
.topbar .badge{font-size:12px;border:0;background:transparent}
.topbar .app-version{font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
.topbar .save{font-size:12px}
.topbar .save[data-save-state=error]{color:var(--ui-danger)}
.topbar [data-action=package-menu]{display:inline-flex;align-items:center;justify-content:center}
.nav .nav-tabs{align-items:stretch;gap:4px}
.nav .nav-tabs button{position:relative;padding-inline:10px;border-radius:4px 4px 0 0;font-size:13px;font-weight:500}
[data-theme] .nav .nav-tabs button.active{background:var(--surface);font-weight:650}
.nav .nav-tabs button.active:after{left:10px;right:10px;bottom:0}
.nav-short{display:none}
.nav-context{font-size:13px}
[data-theme] .lesson-switcher .lesson-choice{font-size:14px;font-weight:500;padding-inline:10px}
[data-theme] .lesson-switcher .lesson-choice[aria-pressed=true]{font-weight:650;background:var(--surface)}
.heading .lesson-metadata{font-size:12px;line-height:1.4}
[data-theme] .heading h1{font-size:22px;font-weight:650;line-height:1.3;letter-spacing:normal;color:var(--ink)}
[data-theme] .heading .eyebrow{font-size:12px;font-weight:400;letter-spacing:normal;text-transform:none;color:var(--secondary)}
[data-theme] .heading .actions button{font-size:13px}
[data-theme] .heading .actions button.primary{background:var(--selected);color:var(--selected-ink);border-color:var(--selected)}
[data-theme] .paper,[data-theme] .editor{box-shadow:none;border-radius:var(--ui-radius)}
.setup-overview .session-route strong,[data-theme] .setup-overview .setup-metric dd{font-size:18px;font-weight:650;font-variant-numeric:tabular-nums}
[data-theme] .setup-overview .setup-metric dt,[data-theme] .setup-overview .section-label{font-size:12px}
#profile-panel>summary .profile-section-title{font-size:17px;font-weight:650;letter-spacing:normal}
#profile-panel>summary{font-size:14px}
.exercise-toolbar{gap:8px}
.exercise-toolbar #result-count{font-size:12px;color:var(--secondary)}
.exercise-toolbar .exercise-search-field{border-color:var(--control-edge)}
[data-theme] .exercise-toolbar .search-clear{flex:none;width:26px;min-width:26px;height:26px;min-height:26px;padding:4px}
[data-theme] .exercise-toolbar .search-clear[hidden]{display:none}
.lesson-table .lesson-title{font-family:var(--ui-font);font-size:16px;font-weight:650;line-height:1.4;letter-spacing:normal}
.lesson-table .lesson-title small{font-size:inherit;font-weight:500;margin-right:5px}
[data-theme] .lesson-table .scenario{font-size:14px;line-height:1.55;color:var(--ink)}
.lesson-table .annotation,.lesson-table .parameterline{font-size:13px;line-height:1.5}
.lesson-table .annotation b{font-size:12px;letter-spacing:normal}
.lesson-table .time{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.lesson-table .exercise-reference-tags{font-size:12px}
.lesson-table .row-drag-handle{color:var(--secondary)}
[data-theme] .lesson-table .exercise-empty-row:hover{background:transparent}
.exercise-empty{padding:16px 8px;max-width:440px;margin:0 auto;white-space:normal;text-align:center;overflow-wrap:anywhere}
.exercise-empty strong{display:block;font-size:16px;color:var(--ink);font-weight:650}
.exercise-empty p{font-size:13px;line-height:1.5;color:var(--secondary);margin:5px 0 10px}
.table-end{font-size:12px;line-height:1.5}
.editor .editor-head h2{font-size:18px;line-height:1.35;font-weight:650;letter-spacing:normal}
.editor .editor-head .eyebrow{font-size:12px;font-weight:400;color:var(--secondary)}
.editor .edit-nav{gap:2px;border-bottom:1px solid var(--edge)}
[data-theme] .editor .edit-nav button{border-radius:var(--ui-radius);font-size:13px}
[data-theme] .editor .edit-nav button.active{background:var(--selected);color:var(--selected-ink);font-weight:600}
[data-theme] .field>span:first-child{font-size:14px;font-weight:600;color:var(--ink);line-height:1.4}
[data-theme] .field input,[data-theme] .field select,[data-theme] .field textarea{font-weight:400;line-height:1.45;border-radius:var(--ui-radius);border-color:var(--control-edge)}
[data-theme] .field input[readonly]{background:var(--surface-raised);color:var(--secondary);border-style:dashed}
[data-theme] .field .hint,[data-theme] .field .field-issue{font-size:12px;font-weight:400;line-height:1.45}
[data-theme] .field .hint{color:var(--secondary)}
[data-theme] .field .field-issue{color:var(--warning-ink)}
[data-theme] .field.private>span:first-child{color:var(--private)}
[data-theme] .exercise-atc .field>span:first-child{color:var(--atc)}
.editor .exercise-more>summary,.editor .condition-group>summary,.editor .fcl-heading,.editor h3{font-size:15px;font-weight:650}
.sectioncard h2{font-size:17px;font-weight:650;line-height:1.4;letter-spacing:normal}
.sectioncard>p{font-size:13px;line-height:1.5}
.setup>.sectioncard{border-radius:var(--ui-radius)}
.setup>.sectioncard h2{padding-bottom:6px;border-bottom:1px solid var(--edge)}
.setup>.sectioncard:first-child{grid-column:1/-1}
[data-theme] dialog{border-color:var(--control-edge);border-radius:8px}
[data-theme] dialog h2{font-size:20px;font-weight:650;line-height:1.35}
[data-theme] dialog p{font-size:14px}
[data-theme] .cloud-error,[data-theme] .fleet-notice[role=alert]{background:var(--ui-danger-bg);color:var(--ui-danger);border-color:var(--ui-danger);font-size:14px;line-height:1.5}
/* Fleet screens share the editor's palette, control language and compact rhythm. */
[data-theme] .fleet-shell{font-family:var(--ui-font);--fleet-bg:var(--shell);--fleet-surface:var(--surface);--fleet-ink:var(--ink);--fleet-muted:var(--secondary);--fleet-line:var(--edge)}
[data-theme] .fleet-sidebar{background:transparent;gap:16px;padding:16px 10px}
.fleet-brand{font-size:17px;font-weight:650;line-height:1.4;letter-spacing:normal}
.fleet-brand small{font-size:12px;font-weight:400}
.fleet-sidebar nav{gap:4px}
[data-theme] .fleet-sidebar nav button{font-size:14px;border-radius:var(--ui-radius);padding:8px;min-height:36px}
[data-theme] .fleet-sidebar nav button[aria-current=page]{background:var(--hover);color:var(--ink);font-weight:650}
.fleet-canvas{padding:16px 12px}
.fleet-heading{gap:12px;margin-bottom:14px}
.fleet-heading h1{font-size:26px;font-weight:650;margin:8px 0 6px}
.fleet-heading p{font-size:14px;line-height:1.5}
.fleet-heading>label{margin-top:8px}
.fleet-panel{border-radius:var(--ui-radius);margin-bottom:12px}
.fleet-panel-heading{padding:10px 12px}
.fleet-panel h2{font-size:17px;font-weight:650}
.fleet-signin{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);max-width:none;padding:0}
.signin-main,.signin-local{padding:16px;min-width:0}
.signin-local{background:var(--surface-raised);border-left:1px solid var(--edge)}
.fleet-signin .signin-recovery-note{font-size:12px;margin-bottom:0}
.fleet-signin p{font-size:14px;line-height:1.5;margin:8px 0 12px}
.fleet-signin form{gap:6px}
.fleet-signin form button{min-height:36px}
.fleet-packages td,.fleet-packages th{padding:10px 12px}
.fleet-packages{font-size:14px}
.fleet-packages small{font-size:12px}
.fleet-home-actions{margin:12px 0;gap:6px}
.fleet-footer{margin-top:16px;gap:8px}
.fleet-canvas .cloud-layout{gap:12px}
.fleet-canvas .cloud-detail{padding-left:12px}
.fleet-return,.fleet-compare{padding:12px;gap:12px;margin-block:12px}
.fleet-compare strong{font-size:18px}
.cloud-workspace h1{font-size:24px;font-weight:650;letter-spacing:normal}
.cloud-comment{font-size:14px;line-height:1.55}
.cloud-actions button{font-size:13px}
/* Persistent storage failures remain visible even when the normal phone save label is hidden. */
.save-recovery{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;padding:8px;margin-bottom:6px;background:var(--ui-danger-bg);color:var(--ui-danger);font-size:14px}
.save-recovery[hidden]{display:none}
.save-recovery .actions{display:flex;gap:6px;margin:0}
.app-loading,.app-start-error{max-width:480px;margin:12vh auto;padding:20px;color:var(--ink)}
.app-loading h1,.app-start-error h1{font-size:24px;line-height:1.3;margin:0 0 8px}
.app-loading p,.app-start-error p{font-size:14px;line-height:1.5;color:var(--secondary)}
.app-loading .loading-track{height:3px;background:var(--edge);margin-top:16px;overflow:hidden}
.app-loading .loading-track:after{content:'';display:block;width:35%;height:100%;background:var(--accent);animation:workspace-loading 1.4s ease-in-out infinite alternate}
@keyframes workspace-loading{to{transform:translateX(185%)}}
.skip-workspace{position:fixed;left:8px;top:8px;z-index:2000;transform:translateY(-200%);background:var(--selected);color:var(--selected-ink);padding:10px 14px;border-radius:var(--ui-radius);font-size:14px}
.skip-workspace:focus{transform:none}
@media(any-pointer:coarse),(max-width:640px){
 [data-theme] .exercise-toolbar .search-clear{width:44px;min-width:44px;height:44px;min-height:44px}
 [data-theme] .fleet-sidebar nav button,.fleet-signin form button{min-height:44px}
 .field input,.field select,.field textarea{font-size:16px}
}
@media(max-width:640px){
 .topbar .title strong{font-size:12px}
 .nav .nav-tabs{width:100%;gap:0;justify-content:space-between;overflow:visible;white-space:normal}
 .nav .nav-tabs button{padding-inline:5px;font-size:12px;flex:1;white-space:nowrap;min-width:0}
 .nav-long{display:none}.nav-short{display:inline}
 .lesson-table .lesson-title{font-size:17px;line-height:1.4}
 .lesson-table .scenario{font-size:14px}
 .lesson-table .exercise-empty-row{display:block}
 .lesson-table .exercise-empty-row td{display:block;width:100%}
 .exercise-empty{padding:16px 8px;text-align:left}
 .exercise-empty strong{font-size:15px}
 .exercise-toolbar #result-count{display:block;position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .fleet-sidebar{padding:8px;gap:8px}
 .fleet-sidebar nav button{font-size:13px;padding:6px}
 .fleet-canvas{padding:12px 8px}
 .fleet-heading h1{font-size:23px}
 .fleet-signin{display:block;padding:0}
 .signin-main,.signin-local{padding:12px}
 .signin-local{border-left:0;border-top:1px solid var(--edge)}
 .fleet-packages tr{padding:10px}
 .fleet-canvas .cloud-history{margin-bottom:8px}
 .fleet-canvas .cloud-detail{padding:0}
 .setup>.sectioncard:first-child{grid-column:auto}
}
@media(prefers-reduced-motion:reduce){
 button,input,select,textarea{transition:none}
 .app-loading .loading-track:after{animation:none;transform:translateX(90%)}
}

/* Export layout choice wraps beside audience controls on narrow screens. */
.pdf-design-choice{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600}.pdf-design-choice select{max-width:230px;min-height:36px;padding:6px 8px}.pdfbar{flex-wrap:wrap;gap:8px}
