/* PLS team app (EDC 1). Brand Book v3: Garamond headings, Arial for everything functional. Brass is not used here. */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/eb-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/eb-garamond-latin-500-normal.woff2") format("woff2"); }
:root {
  --paper: #FBFAF6; --sheet: #FFFFFF; --ink: #1A2733; --lake: #2F5D7C; --ward: #5D796C; --slate: #4B5560; --rule: #D9D6CE;
  --error: #9B2C2C; --serif: "EB Garamond", Garamond, "Times New Roman", serif; --sans: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 16px; }
h1 { font-size: 38px; } h2 { font-size: 26px; margin-top: 32px; } h3 { font-size: 21px; }
a { color: var(--lake); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lake); outline-offset: 2px; }
p { margin: 0 0 12px; max-width: 72ch; }
.quiet { color: var(--slate); }
.lede { font-family: var(--serif); font-size: 20px; }
.big { font-family: var(--serif); font-size: 44px; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { top: 8px; }

/* Buttons and fields */
button, input, select { font: inherit; color: inherit; }
.btn, .btn-secondary, .small-btn, .quiet-btn, .searches button, .row-form button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 0; cursor: pointer;
  font: 700 15px/1.2 var(--sans); text-decoration: none; border: 1px solid var(--ink);
}
.btn { background: var(--ink); color: #fff; }
.btn:hover { background: #24364A; }
.btn-secondary, .searches button, .row-form button { background: var(--sheet); color: var(--ink); }
.btn-secondary:hover, .small-btn:hover, .quiet-btn:hover { background: #F1EFE8; }
.small-btn { min-height: 36px; padding: 6px 12px; font-size: 14px; background: var(--sheet); color: var(--ink); }
.quiet-btn { min-height: 36px; padding: 6px 12px; font-size: 14px; background: transparent; color: var(--ink); border-color: var(--rule); }
.link-btn { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--lake); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.field { display: grid; gap: 6px; margin: 0 0 16px; }
.field > label { font-weight: 700; font-size: 15px; }
.hint { color: var(--slate); font-size: 15px; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], select {
  min-height: 44px; padding: 8px 10px; border: 1px solid #77808A; background: var(--sheet); border-radius: 0; width: 100%; max-width: 420px;
}
input[type=file] { max-width: 100%; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; min-height: 44px; }
.check input { width: 20px; height: 20px; }
.stack { max-width: 460px; }
.narrow { max-width: 460px; }
.error { color: var(--error); border-left: 0; background: #FBEDEC; padding: 10px 12px; border: 1px solid #E3B7B4; }
.flash { background: #EEF3F0; border: 1px solid #C2D1C9; padding: 10px 12px; }
.strength { display: flex; gap: 10px; align-items: center; margin: 4px 0 0; color: var(--slate); font-size: 15px; }
.strength meter { width: 140px; height: 10px; }
.inline-form { margin-top: 16px; }

/* Signed-out pages and the lock screen */
body.auth { display: grid; place-items: start center; min-height: 100vh; padding: 48px 16px; }
.auth-card { width: 100%; max-width: 520px; background: var(--sheet); border: 1px solid var(--rule); padding: 32px; }
.auth-card.wide { max-width: 720px; }
.auth-logo { display: block; width: 220px; height: auto; margin: 0 0 28px; }
.auth-card h1 { font-size: 34px; }

/* The app shell */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 24px; background: var(--sheet); border-bottom: 1px solid var(--rule); }
.brand img { display: block; width: 170px; height: auto; }
.searches { display: flex; flex-wrap: wrap; gap: 8px 16px; flex: 1 1 520px; }
.searches form { display: flex; align-items: center; gap: 6px; flex: 1 1 240px; }
.searches label { font-size: 14px; font-weight: 700; white-space: nowrap; }
.searches input { min-width: 0; flex: 1; }
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who .name { font-weight: 700; } .who .role { color: var(--slate); font-size: 14px; margin-right: 4px; }
.who form { margin: 0; }
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 70px); }
.menu { border-right: 1px solid var(--rule); background: var(--sheet); }
.menu > summary { display: none; }
.menu nav ul { list-style: none; margin: 0; padding: 0; }
.menu nav > ul { padding: 16px 0; }
.menu a { display: block; padding: 9px 20px; color: var(--ink); text-decoration: none; min-height: 40px; }
.menu a:hover { background: #F1EFE8; text-decoration: underline; }
.menu a[aria-current=page] { background: #EEF3F0; font-weight: 700; box-shadow: inset 3px 0 0 var(--ward); }
.menu .group-label { display: block; padding: 14px 20px 4px; font-family: var(--serif); font-size: 19px; }
.menu .group a { padding-left: 32px; }
.menu .sep { border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 12px; }
main#main { padding: 32px 40px 64px; min-width: 0; }
main#main:focus { outline: none; }

/* Content pieces */
.empty { border: 1px dashed #B9B5AA; background: var(--sheet); padding: 24px; max-width: 72ch; }
.empty p { margin: 0; color: var(--slate); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--sheet); border: 1px solid var(--rule); padding: 20px; margin: 0 0 20px; min-width: 0; }
.card h2 { margin-top: 0; }
.table-wrap { position: relative; overflow-x: auto; margin: 0 0 20px; max-width: 100%; } /* contains the hidden button labels */
table.data { border-collapse: collapse; background: var(--sheet); min-width: 100%; }
table.data caption { text-align: left; font-family: var(--serif); font-size: 21px; padding: 0 0 8px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data thead th { font-size: 14px; color: var(--slate); border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data tbody th { font-weight: 400; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions form { margin: 0; }
.actions .row-form { margin: 0; flex-wrap: nowrap; }
.actions .row-form select { flex: 0 1 140px; min-width: 120px; }
.row-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.row-form input, .row-form select { width: auto; flex: 1 1 200px; }
.filters { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: end; margin: 0 0 16px; }
.filters .field { margin-bottom: 12px; }
.filters input, .filters select { width: 190px; }
.filters button { margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px 24px; margin: 0 0 20px; }
.facts div { border-top: 1px solid var(--rule); padding-top: 8px; }
.facts dt { font-size: 14px; color: var(--slate); }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.upload { border-top: 1px solid var(--rule); padding-top: 16px; max-width: 460px; }
.upload select, .upload input[type=file] { max-width: 100%; }
.facts dd, .facts dt { min-width: 0; }
.linkbox { background: #EEF3F0; border: 1px solid #C2D1C9; padding: 16px; margin: 0 0 20px; max-width: 760px; }
.linkbox input { max-width: 100%; font-family: Menlo, Consolas, monospace; font-size: 14px; }
.linkbox label { font-weight: 700; display: block; margin-bottom: 6px; }
ul.plain { padding-left: 20px; } ul.plain li { margin-bottom: 6px; }

/* Locking hides every record at once, before the lock screen loads. */
html.is-locked body > * { visibility: hidden !important; }

/* Tablet and phone */
@media (max-width: 959px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu { border-right: 0; border-bottom: 1px solid var(--rule); }
  .menu > summary { display: flex; align-items: center; min-height: 48px; padding: 0 24px; cursor: pointer; font-weight: 700; }
  main#main { padding: 24px 16px 48px; }
  .top { padding: 12px 16px; }
}
@media (max-width: 599px) {
  h1 { font-size: 30px; }
  .auth-card { padding: 24px 16px; }
  .searches form { flex-wrap: wrap; } .searches label { width: 100%; }
  .filters input, .filters select { width: 100%; }
  .filters .field, .filters button { width: 100%; }
}
