@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin-variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url("/fonts/newsreader-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3f0e8;
  --panel: #fffdf7;
  --ink: #1d302e;
  --secondary: #465b55;
  --muted-panel: #e9e5db;
  --rule: #bcc1b5;
  --edge: var(--rule);
  --accent: #963d25;
  --action: #193c33;
  --focus: #096194;
  --serif: Newsreader, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.5 var(--sans);
}
a { color: var(--accent); text-underline-offset: .16em; }
.staff-mast { border-bottom: 1px solid var(--rule); }
.staff-mast-inner, main {
  width: min(100%, 92.5rem);
  padding-inline: clamp(1rem, 3.5vw, 3rem);
  margin-inline: auto;
}
.staff-mast-inner {
  min-height: 3.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.staff-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -.025em;
}
.staff-brand { line-height: 1.18; }
.staff-brand small { display: block; color: var(--secondary); margin-top: 2px; font-size: .75rem; font-weight: 450; letter-spacing: 0; }
.staff-brand img { display: block; width: auto; height: 39px; flex: none; }
@media (max-width: 780px) {
  .staff-brand { gap: 6px; font-size: .94rem; }
  .staff-brand small { display: none; }
  .staff-brand img { height: 32px; }
}
.staff-header-link { color: var(--ink); font-size: .9rem; }
.staff-brand, .staff-header-link { min-height: 44px; }
.staff-header-link { display: inline-flex; align-items: center; text-align: end; }
.staff-brand:hover span, .staff-header-link:hover { text-decoration: underline; }
main { margin-block: clamp(1.5rem, 3.5vw, 3rem) 4rem; }
main > h1 {
  font: 500 clamp(2.5rem, 4.8vw, 4.1rem)/1.02 var(--serif);
  color: var(--ink);
  letter-spacing: -.04em;
  margin: 0 0 1rem;
  border: 0;
  padding: 0;
}
.staff-connection, .staff-workspace:has(> #desk[hidden]) { max-width: 42rem; }
#status {
  position: static;
  width: fit-content;
  max-width: 100%;
  background: transparent;
  color: var(--secondary);
  overflow-wrap: anywhere;
}
#status:not(:empty) {
  padding: .55rem .85rem;
  margin: .8rem 0 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--muted-panel);
}
#status:empty { margin: 0; }
#login, #verify-code, #password-setup, #desk > section {
  border: 1px solid var(--edge);
  border-radius: .3rem;
  background: var(--panel);
  padding: clamp(1rem, 2.5vw, 1.85rem);
}
#login, #verify-code, #password-setup { max-width: none; }
#login > label:first-child, #verify-code > label:first-child { margin-top: 0; }
.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-top: 1.15rem;
}
.staff-actions button { min-height: 2.75rem; }
.staff-section-picker { display: none; }
.staff-account-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin: 0 0 1rem;
}
.staff-connection-panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: .3rem;
  padding: clamp(1rem, 2.5vw, 1.85rem);
}
.staff-connection-panel #status:not(:empty) {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}
.staff-connection-panel .staff-actions:has(> button:not([hidden])) { margin-top: 1rem; }
.staff-connection-panel .staff-actions { margin: 0; }
label { color: var(--ink); font-weight: 550; }
input:not([type=checkbox]), select, textarea {
  color: var(--ink);
  max-width: 100%;
  border: 1px solid #7a8981;
  border-radius: .25rem;
  font: 400 1rem/1.4 var(--sans);
  background: white;
  padding: .55rem .65rem;
}
button {
  min-height: 2.5rem;
  border: 1px solid #7a8981;
  border-radius: .25rem;
  background: var(--panel);
  color: var(--ink);
  padding: .44rem .8rem;
  font: 600 .94rem/1.3 var(--sans);
}
button:hover:not(:disabled) { background: var(--muted-panel); color: var(--ink); }
button:disabled { cursor: default; opacity: .65; }
form button:not([type]), form button[type=submit], #connect {
  background: var(--action);
  border-color: var(--action);
  color: white;
}
form button:not([type]):hover:not(:disabled), form button[type=submit]:hover:not(:disabled), #connect:hover:not(:disabled) {
  background: #294f43;
  color: white;
}
:where(a, button, input, textarea, select, summary):focus-visible,
#workspace-nav a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
details > summary { color: var(--ink); padding-block: .4rem; }
details > summary:hover { color: var(--accent); }
#desk:not([hidden]) { column-gap: clamp(1rem, 2vw, 2rem); }
#workspace-nav {
  gap: .18rem;
  padding: .6rem;
  background: var(--ink);
  border-radius: .3rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
#workspace-nav a {
  padding: .55rem .7rem;
  border-left: 3px solid transparent;
  border-radius: .15rem;
  color: #f3f0e8;
  line-height: 1.38;
}
#workspace-nav a:hover { background: #304a42; color: white; }
#workspace-nav a[aria-current] {
  border-color: #be6545;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}
#workspace-nav a:focus-visible { outline-color: #eebb91; outline-offset: -2px; }
#desk h2, .report-head h2, #password-setup h2 {
  color: var(--ink);
  font: 500 clamp(1.95rem, 3.3vw, 3.15rem)/1.08 var(--serif);
  letter-spacing: -.035em;
  margin: 0 0 .85rem;
}
#desk h3, .activity-chart figcaption {
  font: 500 clamp(1.3rem, 1.65vw, 1.65rem)/1.15 var(--serif);
  letter-spacing: -.018em;
  color: var(--ink);
  margin-block: 1.3rem .5rem;
}
#desk > section { overflow-wrap: anywhere; }
#desk > section > p { max-width: 72ch; }
#outreach-report { container: staff-outreach / inline-size; }
@container staff-outreach (max-width: 44rem) {
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.25rem; }
  .report-metrics div { padding-inline: .75rem; }
  .report-metrics div:nth-child(odd) { border-left: 0; padding-left: 0; }
}
#form-analytics .form-trend { container: staff-trend / inline-size; }
#form-analytics .form-monthly-chart {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .6rem;
}
@container staff-trend (max-width: 54rem) {
  #form-analytics .form-monthly-chart { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container staff-trend (max-width: 28rem) {
  #form-analytics .form-monthly-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container staff-trend (max-width: 18rem) {
  #form-analytics .form-monthly-chart { grid-template-columns: 1fr; }
}
#form-analytics .form-month { min-width: 0; }
#form-analytics .form-month-row { grid-template-columns: minmax(0, 1fr) auto; }
#form-analytics .form-month-row b { font-variant-numeric: tabular-nums; }
#desk article { background: transparent; }
#desk article p, .report-metrics small, .activity-chart small, .activity-axis {
  color: var(--secondary);
}
#overview-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .65rem; }
#overview-cards a, .insight-cards > div, .insight-charts section, #desk #agent-results article {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: .25rem;
}
#overview-cards a:hover { background: var(--muted-panel); text-decoration: underline; }
#overview-cards strong, .insight-cards strong, .report-metrics dd {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.report-metrics div:first-child dd { color: var(--accent); }
.report-metrics dd button, .register-scroll td button, .activity-bars button { min-height: 0; }
.report-head { flex-wrap: wrap; }
.register-scroll { max-width: 100%; }
.register-scroll table { min-width: 54rem; }
.register-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#desk :is(select, input, textarea) { min-width: 0; }
.report-metrics dd button:hover:not(:disabled), .register-scroll td button:hover:not(:disabled),
.activity-bars button:hover:not(:disabled) { background: transparent; color: var(--accent); }
#outreach-counts button { background: var(--panel); border-color: #7a8981; }
#outreach-counts button[aria-pressed=true] { background: var(--action); color: white; }
#outreach-counts button[aria-pressed=true]:hover { background: #294f43; color: white; }
.register-scroll th { background: var(--muted-panel); }
.register-scroll tbody tr:hover { background: var(--paper); }
#directory-scope { background: var(--paper); }
#library-documents > details > summary { color: var(--ink); }
@media (max-width: 760px) {
  .staff-account-actions { justify-content: flex-start; }
  .staff-section-picker:has(option) {
    display: block;
    margin: 0 0 1rem;
  }
  .staff-section-picker select { min-height: 2.75rem; margin-top: .25rem; }
  .staff-section-picker:has(option) + #workspace-nav { display: none; }
  #workspace-nav {
    position: static;
    display: flex;
    overflow: auto;
    max-height: none;
    gap: .25rem;
    padding: .5rem;
  }
  #workspace-nav a { flex: 0 0 auto; }
}
@media (max-width: 440px) {
  #login .staff-actions, #verify-code .staff-actions, #password-setup .staff-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .staff-brand { gap: .35rem; }
  .staff-brand img { height: 2rem; }
  .staff-header-link { font-size: .875rem; }
  .report-metrics dd { font-size: clamp(2rem, 8vw, 3rem); }
  #overview-cards a { padding: .7rem; font-size: .9rem; }
}
@media (max-width: 360px) {
  .staff-brand { gap: 4px; font-size: 14px; }
  .staff-brand img { height: 27px; }
}
[hidden] { display: none !important; }
