/* ELADORA'S STANDARD PIECES (Dr. Katz, 2026-11-10, portal audit block 3).
 *
 * One version of each piece every page will share as its area is redesigned: colors, page heading, tab bar,
 * buttons, card, table, status pills, messages and form fields. The colors are Option C, Plum, his pick on
 * 2026-11-10 ("I think c"), with its dark set.
 *
 * NOTHING ON AN EXISTING PAGE CHANGES. Every color here is a new name (--el-*) and every class starts with
 * el-, which no page used before this file; a page looks different only when its area is redesigned and its
 * markup asks for these classes. test/unit/uiStandard.test.js keeps it that way.
 *
 * Dark follows the portal's own switch (theme.js): data-theme="dark" on <html>, or no attribute and a dark
 * machine. .el-light and .el-dark force one look inside a box, which is how the showcase page shows both. */

:root {
  --el-bg: #F7F5F8;
  --el-surface: #FFFFFF;
  --el-surface-2: #F2EEF4;
  --el-ink: #221D26;
  --el-muted: #6C6572;
  --el-line: #E6E0EA;
  --el-accent: #7B3FA0;
  --el-accent-soft: #F3EAF8;
  --el-link: #7B3FA0;
  --el-on-accent: #FFFFFF;
  --el-ok: #2A7449;      --el-ok-soft: #E7F3EC;
  --el-warn: #93640C;    --el-warn-soft: #FBF2DF;
  --el-bad: #A8323E;     --el-bad-soft: #F9E9EB;
  --el-on-bad: #FFFFFF;
  --el-focus: #7B3FA0;
  --el-radius: 12px;
  --el-radius-small: 8px;
  --el-shadow: 0 1px 2px rgba(34, 29, 38, .05), 0 6px 18px rgba(34, 29, 38, .05);
  --el-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* One type scale: page title, section title, body, small. */
  --el-size-title: 1.6rem;
  --el-size-section: 1.1rem;
  --el-size-body: .95rem;
  --el-size-small: .82rem;
}

/* The dark set, three times over so each way of asking for dark gets the same answer. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --el-bg: #161318; --el-surface: #1F1B22; --el-surface-2: #28232C; --el-ink: #EFEAF2; --el-muted: #ABA3B1;
    --el-line: #352F3A; --el-accent: #C18BE3; --el-accent-soft: #2E2236; --el-link: #CD9FEA; --el-on-accent: #1E1226;
    --el-ok: #5CC48A; --el-ok-soft: #16301F; --el-warn: #DDB056; --el-warn-soft: #322710;
    --el-bad: #E9808A; --el-bad-soft: #3A1C20; --el-on-bad: #24080B; --el-focus: #CD9FEA;
    --el-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"], .el-dark {
  --el-bg: #161318; --el-surface: #1F1B22; --el-surface-2: #28232C; --el-ink: #EFEAF2; --el-muted: #ABA3B1;
  --el-line: #352F3A; --el-accent: #C18BE3; --el-accent-soft: #2E2236; --el-link: #CD9FEA; --el-on-accent: #1E1226;
  --el-ok: #5CC48A; --el-ok-soft: #16301F; --el-warn: #DDB056; --el-warn-soft: #322710;
  --el-bad: #E9808A; --el-bad-soft: #3A1C20; --el-on-bad: #24080B; --el-focus: #CD9FEA;
  --el-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.el-light {
  --el-bg: #F7F5F8; --el-surface: #FFFFFF; --el-surface-2: #F2EEF4; --el-ink: #221D26; --el-muted: #6C6572;
  --el-line: #E6E0EA; --el-accent: #7B3FA0; --el-accent-soft: #F3EAF8; --el-link: #7B3FA0; --el-on-accent: #FFFFFF;
  --el-ok: #2A7449; --el-ok-soft: #E7F3EC; --el-warn: #93640C; --el-warn-soft: #FBF2DF;
  --el-bad: #A8323E; --el-bad-soft: #F9E9EB; --el-on-bad: #FFFFFF; --el-focus: #7B3FA0;
  --el-shadow: 0 1px 2px rgba(34, 29, 38, .05), 0 6px 18px rgba(34, 29, 38, .05);
}

/* ---- A page in the standard: <div class="el-page"> around the content -------------------------------- */
.el-page { color: var(--el-ink); font-family: var(--el-sans); font-size: var(--el-size-body); line-height: 1.55; display: grid; gap: 1rem; min-width: 0; }
.el-light, .el-dark { background: var(--el-bg); color: var(--el-ink); }
.el-page h1, .el-page h2, .el-page h3, .el-card h2 { color: var(--el-ink); }
.el-page a:not(.el-btn):not(.el-tab) { color: var(--el-link); text-underline-offset: 2px; }
.el-page :focus-visible { outline: 2px solid var(--el-focus); outline-offset: 2px; }

/* The page heading: the title once, with one line under it and room for a status pill. */
.el-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.el-head h1 { font-size: var(--el-size-title); line-height: 1.2; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.el-head p { flex-basis: 100%; margin: 0; color: var(--el-muted); }

/* ---- Tab bar (partials/ui-tabs.ejs; ui-nav.js keeps tab switches out of Back) --------------------------- */
.el-tabs { display: flex; gap: .15rem; flex-wrap: wrap; border-bottom: 1px solid var(--el-line); margin: 0; padding: 0; }
.el-tab { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem .9rem; margin-bottom: -1px; color: var(--el-muted);
  text-decoration: none; border-bottom: 2px solid transparent; font-weight: 500; font-size: var(--el-size-body); white-space: nowrap; }
.el-tab:hover { color: var(--el-ink); }
.el-tab[aria-current="page"] { color: var(--el-ink); border-bottom-color: var(--el-accent); font-weight: 600; }
/* A tab switched on the page itself (a <button>, role="tab", aria-selected), as on My file: the same look as a link tab. */
button.el-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font: inherit;
  font-weight: 500; cursor: pointer; }
/* A sub-tab drawn as a <button> (a referral's sections): the standard sub-tab look, no button chrome. */
button.el-subtab { appearance: none; border: 0; border-radius: 7px; box-shadow: none; font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer;
  background: transparent; }
button.el-subtab:hover, button.el-subtab:active { box-shadow: none; transform: none; }
.el-tab[aria-selected="true"] { color: var(--el-ink); border-bottom-color: var(--el-accent); font-weight: 600; }
.el-tab .el-count { font-size: .75rem; font-weight: 600; padding: 0 .4rem; border-radius: 999px; background: var(--el-surface-2); color: var(--el-muted); }
/* Which company a tab's page is for (the Finances area): a small plain word after the name, not a box. */
.el-tab .el-tab-co { font-size: .72rem; font-weight: 500; color: var(--el-muted); letter-spacing: .01em; }
.el-panel[hidden] { display: none !important; }
/* A tab row a script shows only once it is ready (the AI Agents board): hidden until then. */
.el-tabs[hidden], .el-subtabs[hidden] { display: none !important; }
/* A section the sub-tabs script has closed (public/ui-sections.js marks each piece it opens and closes). Without this,
   a closed piece whose own class sets a display (a row of fields, a stack, a two-column block) stayed on screen under
   the open sub-tab: found on HR Settings on staging, 2026-11-12. Only pieces the script marked are touched. */
.el-part[hidden] { display: none !important; }

/* NAMES IN LISTS (Dr. Katz, 2026-11-12: no underlines; his pick, styles A and C).
   A, a name in a list: dark and semi-bold, and the whole row opens (table.rows, public/nav.js).
   C, a person in a list: a circle with their initials, the name, and one small line under it (partials/ui-who.ejs). */
.el-name { color: var(--el-ink); font-weight: 600; text-decoration: none; }
a.el-name:hover { color: var(--el-accent); }
.el-who { display: inline-flex; align-items: center; gap: .6rem; min-width: 0; vertical-align: middle; }
.el-avatar { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--el-accent-soft); color: var(--el-accent); font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.el-who-text { display: block; min-width: 0; }
.el-who-name { display: block; color: var(--el-ink); font-weight: 600; line-height: 1.25; text-decoration: none; }
a.el-who-name:hover { color: var(--el-accent); }
.el-who-sub { display: block; color: var(--el-muted); font-size: var(--el-size-small); font-weight: 400; line-height: 1.3; overflow-wrap: anywhere; }
/* FIGURES AS LINES, NOT BOXES (Dr. Katz, 2026-11-12: "change boxes to ?", and his rule: no boxes beside tabs). A page's
   handful of numbers is a short list: the figure, what it is in words, and an arrow when the line opens something. */
.el-lines { background: var(--el-surface); border: 1px solid var(--el-line); border-radius: var(--el-radius); margin: 0 0 1rem; overflow: hidden; }
.el-line { display: flex; align-items: baseline; gap: .9rem; padding: .7rem 1rem; border-top: 1px solid var(--el-line); color: var(--el-ink); text-decoration: none; }
.el-line:first-child { border-top: 0; }
a.el-line:hover { background: var(--el-accent-soft); }
.el-line-num { flex: none; min-width: 4.6rem; text-align: right; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.el-line-num.is-bad { color: var(--el-bad); }
.el-line-what { flex: 1; min-width: 0; }
.el-line-what b { display: block; font-weight: 600; }
.el-line-what small { display: block; color: var(--el-muted); font-size: var(--el-size-small); }
.el-line .el-go { width: auto; }
/* The reason under an answer in a table cell (Who can open what: "By role: Administrator"). */
.el-why { display: block; color: var(--el-muted); font-size: var(--el-size-small); font-weight: 400; }
/* The small arrow at the end of a row that opens. */
.el-go { color: var(--el-muted); opacity: .55; text-align: right; width: 1.5rem; font-size: 1.1rem; }

/* A WIDE TABLE ON A PHONE (the same day: on his phone the Accounts and Applications tables ran off the right edge).
   A table marked el-fold becomes one block per row: the first cell is the block's title and every other cell sits
   under it with its column's name in front (data-label). On a computer it is the table it always was. */
@media (max-width: 640px) {
  .el-fold, .el-fold tbody, .el-fold tr, .el-fold td { display: block; width: auto; }
  .el-fold thead { display: none; }
  .el-fold tr { position: relative; padding: .7rem 2.2rem .7rem .9rem; border-bottom: 1px solid var(--el-line); }
  .el-fold tr:last-child { border-bottom: 0; }
  .el-fold td { padding: .14rem 0; border: 0; }
  .el-fold td:empty { display: none; }
  /* Short facts (a level, a status, a count) sit side by side under the title and wrap, so a block stays short. */
  .el-fold td[data-label] { display: inline-block; max-width: 100%; margin-right: .9rem; vertical-align: top; }
  .el-fold td[data-label]::before { content: attr(data-label) ": "; color: var(--el-muted); font-size: var(--el-size-small); }
  .el-fold td.el-go { position: absolute; right: .8rem; top: .8rem; width: auto; padding: 0; }
  .el-fold td .el-who { display: flex; }
  /* A box or a menu inside a folded row never pushes the page wider than the phone. */
  .el-fold td form { flex-wrap: wrap; max-width: 100%; }
  .el-fold td input, .el-fold td select { max-width: 100%; min-width: 0; }
}
/* Sub-tabs: a second row directly under the main tab it belongs to (Dr. Katz, 2026-11-11: sub-tabs, not boxes). */
.el-subtabs { display: flex; gap: .15rem; flex-wrap: wrap; margin: 0; padding: .3rem .35rem; background: var(--el-surface-2); border-radius: 0 0 10px 10px; }
.el-subtab { display: inline-flex; align-items: center; padding: .35rem .85rem; font-size: .88rem; font-weight: 500; color: var(--el-muted);
  border-radius: 7px; white-space: nowrap; text-decoration: none; }
.el-subtab:hover { color: var(--el-ink); }
.el-subtab[aria-current="page"], .el-subtab.is-on { background: var(--el-surface); color: var(--el-accent); font-weight: 600; box-shadow: 0 1px 2px rgba(34, 29, 38, .12); }
/* A sub-tab that opens a short menu (HR Files: By employer, By role). */
.el-subtabs summary.el-subtab { cursor: pointer; list-style: none; }
.el-subtabs.hr-nav { gap: .15rem; margin: 0; padding: .3rem .35rem; }
/* An area's tabs drawn above a page that is not yet in the standard itself (partials/ui-area-nav.ejs). */
.el-area { font-family: var(--el-sans); margin: 0 0 1.3rem; }
.el-area :focus-visible { outline: 2px solid var(--el-focus); outline-offset: 2px; }
/* One employee's tab row (views/hr/_personTabs.ejs): the second row of the HR Files tab row on every page of a person. */
.el-subtabs.hr-person-tabs { margin: 0; }
/* A THIRD ROW OF TABS, for a choice inside a sub-tab (Dr. Katz, 2026-11-12: tabs only, no boxes and no drop-down menus
   in a tab row). Lighter than the second row, so the three levels read as levels: no band, smaller letters, and the
   open one is a soft accent pill. Drawn directly under the second row, inside the same .el-area. */
.el-subtabs.el-third { background: transparent; border-radius: 0; padding: .35rem .35rem 0; gap: .1rem; }
.el-third .el-subtab { font-size: .82rem; padding: .22rem .7rem; }
.el-third .el-subtab[aria-current="page"] { background: var(--el-accent-soft); color: var(--el-accent); box-shadow: none; }
/* Sub-tabs switched on the page itself (role="tab", aria-selected), as on the QAPI page: the same look as link sub-tabs. */
.el-subtab[aria-selected="true"] { background: var(--el-surface); color: var(--el-accent); font-weight: 600; box-shadow: 0 1px 2px rgba(34, 29, 38, .12); }
.el-third .el-subtab[aria-selected="true"] { background: var(--el-accent-soft); color: var(--el-accent); box-shadow: none; }

/* ---- Buttons: main, secondary, dangerous (a dangerous one always asks first: data-confirm) -------------- */
.el-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.25rem; padding: .45rem .95rem;
  border-radius: var(--el-radius-small); border: 1px solid transparent; font: 600 var(--el-size-body)/1.2 var(--el-sans);
  background: var(--el-accent); color: var(--el-on-accent); text-decoration: none; cursor: pointer; box-shadow: none; }
.el-btn:hover { filter: brightness(1.06); }
.el-btn--secondary { background: transparent; color: var(--el-ink); border-color: var(--el-line); }
.el-btn--secondary:hover { background: var(--el-surface-2); filter: none; }
.el-btn--danger { background: var(--el-bad); color: var(--el-on-bad); }
.el-btn[disabled], .el-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; filter: none; }
.el-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---- Card: one corner, one border, one shadow, one padding --------------------------------------------- */
.el-card { background: var(--el-surface); border: 1px solid var(--el-line); border-radius: var(--el-radius); box-shadow: var(--el-shadow);
  padding: 1rem 1.1rem; min-width: 0; }
.el-card > h2, .el-card-head h2 { font-size: var(--el-size-section); margin: 0 0 .6rem; }
.el-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }

/* ---- Table: headers in normal letters, rows open on click (data-el-href), one empty message --------------- */
.el-table-wrap { overflow-x: auto; min-width: 0; }
.el-table { width: 100%; border-collapse: collapse; font-size: var(--el-size-body); font-variant-numeric: tabular-nums;
  background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--el-ink); }
.el-table th { background: transparent; text-align: left; font-weight: 600; color: var(--el-muted); text-transform: none; letter-spacing: 0; font-size: var(--el-size-small);
  padding: .5rem .6rem; border-bottom: 1px solid var(--el-line); white-space: nowrap; }
.el-table td { background: transparent; color: var(--el-ink); padding: .55rem .6rem; border-bottom: 1px solid var(--el-line); vertical-align: top; }
.el-table tbody tr:last-child td { border-bottom: 0; }
.el-table tbody tr:hover { background: transparent; }
.el-table tr[data-el-href] { cursor: pointer; }
.el-table tr[data-el-href]:hover td { background: var(--el-surface-2); }
.el-table .el-num { text-align: right; }
.el-empty { color: var(--el-muted); padding: .8rem 0; margin: 0; }

/* ---- Status pills and messages: one green, one amber, one red ------------------------------------------ */
.el-pill { display: inline-block; padding: .08rem .55rem; border-radius: 999px; font-size: var(--el-size-small); font-weight: 600; white-space: nowrap;
  background: var(--el-surface-2); color: var(--el-muted); }
.el-pill--ok { background: var(--el-ok-soft); color: var(--el-ok); }
.el-pill--warn { background: var(--el-warn-soft); color: var(--el-warn); }
.el-pill--bad { background: var(--el-bad-soft); color: var(--el-bad); }
.el-msg { border-radius: var(--el-radius-small); padding: .6rem .8rem; margin: 0; background: var(--el-surface-2); color: var(--el-ink); }
.el-msg--ok { background: var(--el-ok-soft); color: var(--el-ok); }
.el-msg--warn { background: var(--el-warn-soft); color: var(--el-warn); }
.el-msg--bad { background: var(--el-bad-soft); color: var(--el-bad); }

/* ---- Form fields: label above, one height, never wider than their column ------------------------------- */
.el-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem 1rem; }
.el-field { display: grid; gap: .3rem; min-width: 0; }
.el-field > label { font-size: var(--el-size-small); color: var(--el-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.el-field input, .el-field select, .el-field textarea { font: var(--el-size-body) var(--el-sans); color: var(--el-ink); background: var(--el-surface);
  border: 1px solid var(--el-line); border-radius: var(--el-radius-small); padding: .45rem .6rem; min-height: 2.25rem; min-width: 0; width: 100%; }
.el-field textarea { min-height: 5rem; }
.el-field .el-required { color: var(--el-bad); }
.el-hint { font-size: var(--el-size-small); color: var(--el-muted); margin: 0; }

/* ---- Layout helpers -------------------------------------------------------------------------------------- */
.el-stack { display: grid; gap: .8rem; min-width: 0; }
.el-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; min-width: 0; }
.el-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.el-swatch { border: 1px solid var(--el-line); border-radius: var(--el-radius-small); overflow: hidden; background: var(--el-surface); font-size: var(--el-size-small); }
.el-swatch > span { display: block; height: 2rem; }
.el-swatch > div { padding: .35rem .5rem; }
.el-swatch code { color: var(--el-muted); }
.el-sample { border-radius: var(--el-radius); padding: 1rem; border: 1px solid var(--el-line); }
.el-rules { margin: 0; padding-left: 1.2rem; display: grid; gap: .45rem; max-width: 70ch; }
.el-swatch--accent > span { background: var(--el-accent); }
.el-swatch--accent-soft > span { background: var(--el-accent-soft); }
.el-swatch--ok > span { background: var(--el-ok); }
.el-swatch--ok-soft > span { background: var(--el-ok-soft); }
.el-swatch--warn > span { background: var(--el-warn); }
.el-swatch--warn-soft > span { background: var(--el-warn-soft); }
.el-swatch--bad > span { background: var(--el-bad); }
.el-swatch--bad-soft > span { background: var(--el-bad-soft); }
.el-swatch--ink > span { background: var(--el-ink); }
.el-swatch--muted > span { background: var(--el-muted); }
.el-swatch--line > span { background: var(--el-line); }
.el-swatch--bg > span { background: var(--el-bg); }
.el-swatch--surface > span { background: var(--el-surface); }

/* ==== THE INSIDE OF A PAGE IN A REDESIGNED AREA ===========================================================
 * Dr. Katz, 2026-11-11: "build the inside of the pages and HR Settings sub-tabs and rest of tabs and subtabs same
 * way". partials/head.ejs puts el-scope on <main> for every page inside a redesigned area (HR Files, Administration).
 * Under it, the pieces the old pages are made of take the standard look: headings, cards, buttons, fields, notices,
 * table headers. No view is rewritten; a page outside an area is not touched, and neither is anything a page styles
 * with a class of its own (the roster's chips, the on-call calendar, the permission grids keep their own rules).
 * The standard's own pieces (el-btn, el-tab ...) are left alone by every rule here. */
main.el-scope { color: var(--el-ink); }
main.el-scope h1 { font-size: var(--el-size-title); line-height: 1.2; letter-spacing: -.01em; color: var(--el-ink); }
main.el-scope h2 { font-size: var(--el-size-section); margin: 1.4rem 0 .6rem; color: var(--el-ink); }
main.el-scope h3 { font-size: 1rem; margin: 1.1rem 0 .4rem; color: var(--el-ink); }
main.el-scope a:not([class]) { color: var(--el-link); text-underline-offset: 2px; }
main.el-scope .muted { color: var(--el-muted); }

/* Cards and panels: one corner, one border, one shadow. */
main.el-scope .card, main.el-scope .panel { background: var(--el-surface); border: 1px solid var(--el-line); border-radius: var(--el-radius);
  box-shadow: var(--el-shadow); padding: 1rem 1.1rem; }
/* The page's title band: a plain card with the accent on the medallion, not a colored stripe per page. */
main.el-scope .group-band { background: var(--el-surface); border: 1px solid var(--el-line); border-left: 1px solid var(--el-line);
  border-radius: var(--el-radius); box-shadow: var(--el-shadow); padding: .9rem 1.1rem; margin: .2rem 0 1rem; }
main.el-scope .medallion { background: var(--el-accent-soft); color: var(--el-accent); border-radius: 10px; }

/* Buttons: main, secondary, dangerous. Only the portal's own button classes; a page's private ones keep theirs. */
main.el-scope button:not([class]), main.el-scope .button, main.el-scope button.primary, main.el-scope button.small, main.el-scope button.tiny {
  border-radius: var(--el-radius-small); border: 1px solid transparent; background: var(--el-accent); color: var(--el-on-accent);
  font-weight: 600; box-shadow: none; }
main.el-scope button:not([class]):hover, main.el-scope .button:hover { box-shadow: none; }
main.el-scope .button.ghost, main.el-scope button.ghost, main.el-scope button.quiet, main.el-scope .button.quiet {
  background: transparent; color: var(--el-ink); border: 1px solid var(--el-line); box-shadow: none; }
main.el-scope .button.ghost:hover, main.el-scope button.ghost:hover, main.el-scope button.quiet:hover { background: var(--el-surface-2); border-color: var(--el-line); filter: none; }
main.el-scope button.danger, main.el-scope .button.danger { background: var(--el-bad); border-color: var(--el-bad); color: var(--el-on-bad); box-shadow: none; }
main.el-scope button.link, main.el-scope .button.link { background: none; border: 0; padding: 0; color: var(--el-link); box-shadow: none; }
main.el-scope button.link.danger { background: none; color: var(--el-bad); }
main.el-scope button:focus-visible, main.el-scope .button:focus-visible, main.el-scope input:focus, main.el-scope select:focus, main.el-scope textarea:focus {
  outline: 2px solid var(--el-focus); outline-offset: 1px; border-color: var(--el-focus); }

/* Fields: label in words above the field, one corner, one height. Checkboxes, radios and file inputs are not touched. */
main.el-scope label { text-transform: none; letter-spacing: 0; color: var(--el-muted); }
main.el-scope input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]),
main.el-scope select, main.el-scope textarea {
  border: 1px solid var(--el-line); border-radius: var(--el-radius-small); background: var(--el-surface); color: var(--el-ink); min-height: 2.25rem; }

/* Notices. */
main.el-scope .banner { background: var(--el-warn-soft); border: 1px solid transparent; border-radius: var(--el-radius-small); color: var(--el-ink); }
main.el-scope .banner strong { color: var(--el-warn); }
main.el-scope .banner.danger { background: var(--el-bad-soft); }
main.el-scope .banner.danger strong { color: var(--el-bad); }
main.el-scope .flash { border-radius: var(--el-radius-small); background: var(--el-ok-soft); color: var(--el-ok); border: 0; }
main.el-scope .flash.error { background: var(--el-bad-soft); color: var(--el-bad); border: 0; }

/* Table headers in normal letters, everywhere in the area. The on-call calendar keeps its Word-like header. */
main.el-scope table:not(.sched-cal) th { text-transform: none; letter-spacing: 0; font-size: var(--el-size-small); font-weight: 600; color: var(--el-muted); }

/* An older row of links used as sub-tabs (the Document Grid's "which jobs") drawn like the standard sub-tabs. */
main.el-scope .subtabs { gap: .15rem; margin: 0 0 1rem; padding: .3rem .35rem; border-bottom: 0; background: var(--el-surface-2); border-radius: 10px; }
main.el-scope .subtabs a { padding: .35rem .85rem; border-radius: 7px; color: var(--el-muted); font-size: .88rem; font-weight: 500; border-bottom: 0; }
main.el-scope .subtabs a.on { background: var(--el-surface); color: var(--el-accent); font-weight: 600; border-bottom: 0; box-shadow: 0 1px 2px rgba(34, 29, 38, .12); }

/* Sub-tabs made from a long tab's sections (public/ui-sections.js). Under the area's tab row they join it; inside a
   tab of the page's own they sit at the top of that tab. A section's own heading is not repeated under its sub-tab. */
.el-subtabs.el-sections { margin: 0 0 1rem; border-radius: 10px; }
.el-area > .el-subtabs.el-sections { margin: 0; border-radius: 0 0 10px 10px; }
main.el-scope[data-el-sections] .el-area { margin-bottom: 1rem; }
.el-subtab .el-count { font-size: .72rem; font-weight: 600; padding: 0 .4rem; border-radius: 999px; background: var(--el-line); color: var(--el-muted); }
/* Opening a person's tab by its address (#tab-documents, from Folders or a saved link) must not scroll the tab rows
   off the top of the page: the tab is already directly under them. The margin keeps the page where it is. */
main.el-scope .person-tab { scroll-margin-top: 100vh; }
