/* Government of Alberta website palette: https://www.alberta.ca/colour-palette */
:root{font:16px system-ui;color:#333333;background:#f2f2f2;--interactive:#0077cd;--focus:#feba35;--border:#858585;--accent:#00b6ed}
*{box-sizing:border-box}body{margin:0;border-top:8px solid var(--accent)}main{max-width:900px;margin:2.5rem auto;padding:0 1rem}h1{font-size:2.5rem;line-height:1.15;margin-bottom:.6rem}h2,h3{line-height:1.25}label{display:block;font-weight:600}textarea,select,button,input{font:inherit}textarea{width:100%;padding:1rem;border:1px solid var(--border);border-radius:.25rem;margin:.5rem 0 1rem;background:white;color:#333}.settings{display:flex;gap:1rem;flex-wrap:wrap}select{display:block;padding:.5rem;max-width:100%;border:1px solid var(--border);background:white;color:#333}input{display:block;accent-color:var(--interactive)}button,.download{display:inline-block;background:var(--interactive);color:white;padding:.65rem 1rem;border:0;border-radius:.25rem;margin:.8rem .5rem .3rem 0;text-decoration:none;cursor:pointer}button:hover,.download:hover{background:#333;color:white}button:disabled{opacity:.5;cursor:wait}article{background:white;padding:1.2rem;border-radius:.25rem;margin:1rem 0;border:1px solid #ccc;border-left:4px solid #0077cd}article p{overflow-wrap:anywhere}progress,audio{width:100%;accent-color:var(--interactive)}#notice,#historyUpdated{font-size:.9rem;color:#595959}#message{min-height:1.5em;overflow-wrap:anywhere}a{color:var(--interactive);text-underline-offset:.2em}a:hover{color:#333}a:visited{color:#756693}.download:visited{color:white}:focus-visible{outline:3px solid var(--focus);outline-offset:3px}[hidden]{display:none!important}input:not([type=range]):not([type=checkbox]){width:100%;max-width:420px;padding:.65rem;margin:.4rem 0 1rem;border:1px solid var(--border);border-radius:.25rem;background:white;color:#333}.checkbox{display:flex;gap:.5rem;align-items:center}nav{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}details{margin:1rem 0}summary{cursor:pointer}#loginPanel{max-width:440px;background:white;padding:1.5rem;border-radius:.25rem;border-top:4px solid var(--accent)}@media(max-width:600px){h1{font-size:2rem}main{margin-top:1.5rem}.settings{flex-direction:column}}
.full-text{white-space:pre-wrap;overflow-wrap:anywhere}.csv-upload{margin:2rem 0;padding:1.2rem;background:#fff;border-top:4px solid var(--accent)}.batch-row{padding:1rem 0;border-top:1px solid #ccc}.batch-row h4{margin:.5rem 0}article summary{overflow-wrap:anywhere;line-height:1.5}
#csvMessage{min-height:1.5em;overflow-wrap:anywhere}#csvMessage.error{padding:.75rem;border-left:4px solid #b50909;background:#fff1f1;color:#7d1111}#csvMessage.success{padding:.75rem;border-left:4px solid #0077cd;background:#eef7ff}
/* Responsive controls and readable history on phones. */
main{padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(1rem,env(safe-area-inset-right));padding-bottom:max(1rem,env(safe-area-inset-bottom))}
form,section,article,details,nav,.settings,.settings>label{min-width:0}
h1,h2,h3,h4,p,summary,li{overflow-wrap:anywhere}
.settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:1rem}
.settings select,.settings input[type=range]{width:100%}
select,button,.download,nav a,input:not([type=checkbox]),summary{min-height:44px}
button,.download{max-width:100%;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
textarea{resize:vertical;min-height:10rem}
input[type=range]{margin:.5rem 0}
input[type=checkbox]{width:22px;height:22px;flex-shrink:0}
.checkbox{min-height:44px}
input[type=file]{min-width:0;overflow:hidden}
input[type=file]::file-selector-button{font:inherit;min-height:44px;margin-right:.5rem;border:1px solid var(--border);border-radius:.25rem;background:#f2f2f2;color:#333;cursor:pointer}
nav a{display:inline-flex;align-items:center}
summary{padding:.6rem 0;line-height:1.5}
audio{display:block;max-width:100%;min-width:0;margin:.75rem 0}
@media(max-width:600px){
  main{margin:1.25rem auto}
  h1{font-size:1.85rem;line-height:1.2}h2{font-size:1.4rem}h3{font-size:1.15rem}
  nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
  #accountName{grid-column:1/-1;font-weight:600}
  nav a{justify-content:center;text-align:center;padding:.65rem;background:white;border:1px solid #ccc;border-radius:.25rem}
  nav #logout{grid-column:1/-1;margin:0}
  .settings{grid-template-columns:minmax(0,1fr)}
  input:not([type=range]):not([type=checkbox]){max-width:100%}
  button,.download{display:block;width:100%;min-height:48px;margin:.75rem 0;text-align:center}
  article,.csv-upload,#loginPanel{padding:1rem}
  article{margin:1rem 0}
  .csv-upload{margin:1.5rem 0}
  .batch-row{padding:.75rem 0}
}
/* Give the account navigation breathing room below the subtitle. */
#message:empty{display:none}
main>p:first-of-type{margin-bottom:1.25rem}
#accountName{font-size:.9rem;line-height:1.4;color:#595959;font-weight:400;overflow-wrap:anywhere}
#accountName strong{color:#333;font-weight:600}
nav button{margin:0}
.audit{margin-top:2rem}.table-scroll{max-width:100%;overflow-x:auto;margin:1rem 0}table{border-collapse:collapse;width:100%;background:white}caption{text-align:left;font-weight:600;margin-bottom:.5rem}th,td{text-align:left;padding:.65rem;border-bottom:1px solid #ccc;white-space:nowrap}th{background:#e8f4fb}.pagination{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}.pagination span{white-space:nowrap}#auditUser{max-width:100%;min-height:44px}
.csv-preview pre{max-height:20rem;overflow:auto;background:#f2f2f2;padding:.75rem;font:inherit}
/* Job summaries stay compact; their details open only when selected. */
.job-details{margin:0}.job-summary{padding:.25rem 0;min-height:44px}#jobs summary::marker{color:#000}.job-title{font-size:1.1rem;font-weight:600;line-height:1.35}.job-status,.job-retention{display:block;margin:.3rem 0 0;font-size:.9rem;color:#595959}.job-retention:empty{display:none}.job-body{border-top:1px solid #ddd;margin-top:.75rem;padding-top:.25rem}article:has(>.job-details){padding:.85rem 1rem}

/* Navigation links use the same button treatment as the logout action. */
nav .nav-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:.65rem 1rem;margin:0;border:0;border-radius:.25rem;background:var(--interactive);color:white;text-decoration:none;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation}
nav .nav-button:visited{color:white}
nav .nav-button:hover{background:#333;color:white}
nav .nav-button[aria-current=page]{background:#004f87;box-shadow:inset 0 -4px 0 var(--focus);font-weight:700}
@media(max-width:600px){nav .nav-button{min-height:48px;width:100%}}
/* Status labels are plain indicators, with matching accents on each job frame. */
article[data-state=queued]{border-left-color:#b88700}
article[data-state=processing]{border-left-color:#0077cd}
article[data-state=completed]{border-left-color:#27833b}
article[data-state=failed]{border-left-color:#b50909}
article[data-state=cancelled]{border-left-color:#858585}
.job-badge{display:table;padding:.25rem .65rem;margin-bottom:.5rem;border-radius:.25rem;background:#e8e8e8;color:#333;font-size:.95rem;font-weight:700;cursor:inherit}
[data-state=queued] .job-badge{background:#feba35;color:#333;font-size:1.1rem}
[data-state=processing] .job-badge{background:#e2f2ff;color:#004f87}
[data-state=completed] .job-badge{background:#e4f4e7;color:#205e2e}
.account-table{min-width:480px}
.account-table th,.account-table td{white-space:normal;overflow-wrap:anywhere}
.account-table button{margin:0}
.history-size{display:flex;align-items:center;gap:.75rem;margin:1rem 0}
.history-size select{width:auto}
.pagination button{margin:0}
.pagination span{white-space:normal}
.job-timer{display:block;margin:0 0 .5rem;color:#004f87;font-weight:600;font-variant-numeric:tabular-nums}
#jobs summary{color:#000}
.admin-subnav{margin:1.25rem 0;border-bottom:1px solid #ccc;padding-bottom:1rem;gap:.65rem}
.voice-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:.5rem}
fieldset{min-width:0;border:1px solid #ccc;margin:1rem 0;padding:1rem}legend{font-weight:600}
.voice-language{border:1px solid #ccc;padding:.5rem 1rem;background:white}
.voice-language>summary{font-weight:600;color:#000}.voice-count{font-weight:400;color:#595959}
.voice-language .voice-options{padding:.75rem 0}
@media(max-width:600px){.admin-subnav{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-subnav .nav-button:last-child{grid-column:1/-1}.admin-subnav .nav-button{padding:.65rem .4rem;font-size:.85rem}}

body[data-theme=neutral]{--interactive:#424242;--accent:#595959;--focus:#feba35}
body[data-theme=forest]{--interactive:#246142;--accent:#328052;--focus:#feba35}
body[data-theme=plum]{--interactive:#704080;--accent:#91639f;--focus:#feba35}
.config-section{border:1px solid #ccc;background:white;padding:.5rem 1rem;border-radius:.25rem}.config-section>summary{color:#000;font-weight:600}.config-section-body{padding:.5rem 0}
.config-section label{margin:.5rem 0}.config-section textarea{margin:.5rem 0}.config-section .settings>label{flex:1 1 220px}.config-section .settings input{max-width:none}
.app-logo{display:block;max-width:min(100%,256px);max-height:128px;object-fit:contain;margin-bottom:1rem}.app-footer{margin:2rem 0 1rem;color:#595959;white-space:pre-wrap;overflow-wrap:anywhere}.app-footer:empty{display:none}.privacy-notice{white-space:pre-wrap;font-size:.9rem;color:#595959}#maintenanceNotice{padding:1rem;background:#fff3ce;border-left:4px solid #feba35;overflow-wrap:anywhere}#importChanges li{margin:.75rem 0;overflow-wrap:anywhere}
.import-image{display:inline-block;max-width:min(100%,180px);max-height:100px;object-fit:contain;margin:.5rem}
#notice,#maintenanceNotice{white-space:pre-wrap}
