/* silentVIP client portal, admin and sign-in pages (self-contained; shares the v5 type and palette) */
@font-face { font-family: "Instrument Serif"; src: url(/assets/fonts/iserif-normal.woff2?v=5) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/assets/fonts/iserif-italic.woff2?v=5) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/assets/fonts/isans-normal.woff2?v=5) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
:root {
  --cream: #F3EEE4; --paper: #FAF7F0; --ink: #13201A; --ink-soft: #4B5750; --forest: #0E1F17; --moss: #2E4A3A;
  --accent: #9B2E14; --brass: #B39463; --brass-ink: #7E6036; --brass-light: #CDB17F;
  --line: rgb(19 32 26 / .14); --rule: rgb(19 32 26 / .3);
  /* A-1: a field's border is its only edge (the white fill is about 1.1:1 on the page), so it needs 3:1: 3.84 on white, 3.62 on paper, 3.35 on cream. */
  --field-border: #7A847E;
  /* A11y: placeholder text needs 4.5:1 on the white field (Safari's default grey measured 2.35:1): 5.65 on white, 5.28 on paper, 4.89 on cream. */
  --field-placeholder: #5E6A62;
  --serif: "Instrument Serif", Georgia, serif; --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --head: var(--serif); --body: var(--sans); --gutter: clamp(16px, 4vw, 56px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -.005em; }
:focus-visible { outline: 2px solid var(--brass-ink); outline-offset: 3px; }
/* On the dark header the default ring was 2.94:1, and the tab bar's overflow clipped it. */
.app-header :focus-visible { outline-color: var(--brass-light); }
.app-nav a:focus-visible { outline-offset: -3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--forest); color: #fff; padding: 10px 14px; z-index: 50; }
.skip:focus { top: 12px; }
#main:focus { outline: none; }
#main:focus-visible { outline: 2px solid var(--brass-ink); outline-offset: -2px; }
body.app { font: 400 15px/1.6 var(--body); background: var(--cream); display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
.app main { flex: 1; }
.app a.link, .app td a, .app .tbl tbody th a, .app .app-sub a, .app .meta a { border-bottom: 1px solid rgb(11 39 25 / .35); }
.app a.link:hover, .app td a:hover, .app .tbl tbody th a:hover { color: var(--accent); border-color: currentColor; }

/* Header */
.app-header { background: var(--forest); color: #EEE7DA; }
.app-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(100% - 2 * var(--gutter), 1240px); margin: 0 auto; padding: 14px 0; }
.app-logo { color: #EEE7DA; display: inline-flex; align-items: baseline; gap: 14px; }
.app-logo .wm { display: inline-flex; align-items: baseline; gap: 3px; }
.app-logo .wm-a { font: italic 400 27px/1 var(--serif); }
.app-logo .wm-b { font: 600 11px/1 var(--sans); letter-spacing: .28em; transform: translateY(-2px); }
.app-logo .area { font: 500 11.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--brass-light); padding-left: 14px; border-left: 1px solid rgb(238 231 218 / .25); }
.app-logo:hover { color: #fff; }
.app-user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.app-who { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.app-who small { color: rgb(255 255 255 / .7); font-size: 12px; }
/* U-4: the name is the link to Account. */
a.app-who { color: #EEE7DA; }
a.app-who:hover, a.app-who[aria-current="page"] { color: #fff; }
a.app-who:hover > .nm, a.app-who[aria-current="page"] > .nm { text-decoration: underline; text-underline-offset: 3px; }
/* A-4: the unread count on the dark header (red on forest measured 2.27:1); brass on forest is 8.31:1. */
.app-header .badge.b-new { background: var(--brass-light); color: var(--forest); }
.app-signout, .app-back { font: 500 13px/1 var(--body); color: #fff; background: transparent; border: 1px solid rgb(255 255 255 / .5); padding: 9px 14px; cursor: pointer; }
.app-signout:hover, .app-back:hover { background: #fff; color: var(--ink); }
.app-nav { border-top: 1px solid rgb(255 255 255 / .12); }
.app-nav-inner { display: flex; gap: 4px; width: min(100% - 2 * var(--gutter), 1240px); margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.app-nav-inner::-webkit-scrollbar { display: none; }
/* The scrollbar is hidden, so show an edge shade where more tabs are off to the side (only while there are). */
.app-nav-inner { background: linear-gradient(to right, var(--forest) 30%, rgb(14 31 23 / 0)) left / 28px 100% no-repeat local, linear-gradient(to left, var(--forest) 30%, rgb(14 31 23 / 0)) right / 28px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgb(255 255 255 / .28), transparent) left / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgb(255 255 255 / .28), transparent) right / 12px 100% no-repeat scroll; }
.app-nav a { flex: none; padding: 12px 12px 11px; color: rgb(255 255 255 / .8); font-size: 14px; border-bottom: 3px solid transparent; }
.app-nav a:hover { color: #fff; }
.app-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brass-light); font-weight: 600; }
/* U-4: Account is the name in the header; on a phone, where the name is hidden, it's in the menu. */
.app-nav a.nav-phone { display: none; }
.app-menu { display: none; }
@media (max-width: 680px) {
  .app-nav a.nav-phone { display: inline-flex; }
  /* With the script: a Menu button that opens the tabs as a list (no sideways scrolling, nothing off-screen).
     Without it, the tabs scroll sideways as before. */
  .js-menu .app-menu { display: flex; align-items: center; gap: 10px; width: min(100% - 2 * var(--gutter), 1240px); margin: 0 auto; min-height: 48px; padding: 0; font: 600 15px/1.2 var(--body); color: #fff; background: transparent; border: 0; cursor: pointer; text-align: left; }
  .js-menu .app-menu .cur { flex: 1; min-width: 0; color: rgb(255 255 255 / .75); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .js-menu .app-menu::after { content: ""; flex: none; width: 9px; height: 9px; margin: 0 6px 4px 0; border: solid var(--brass-light); border-width: 0 2px 2px 0; transform: rotate(45deg); }
  .js-menu .app-menu[aria-expanded="true"]::after { transform: rotate(-135deg); margin-bottom: -4px; }
  .js-menu .app-menu:focus-visible { outline-offset: 4px; }
  .js-menu .app-nav-inner { display: none; }
  .js-menu .app-nav.open .app-nav-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; overflow: visible; background: none; padding: 0 0 10px; }
  .js-menu .app-nav.open .app-nav-inner a { border-bottom: 0; border-left: 3px solid transparent; padding: 10px; }
  .js-menu .app-nav.open .app-nav-inner a[aria-current="page"] { border-left-color: var(--brass-light); }
}

/* Layout */
.app-main { width: min(100% - 2 * var(--gutter), 1240px); margin: 0 auto; padding: 30px 0 72px; }
.app-auth .app-main { width: min(100% - 32px, 520px); padding-top: 56px; }
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.app-head h1 { font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.015em; }
.app-sub { margin: 6px 0 0; color: var(--ink-soft); }
.app-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.app-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.app-crumbs a { border-bottom: 1px solid rgb(11 39 25 / .3); }
.app-crumbs a, .app-crumbs span { display: inline-flex; align-items: center; min-height: 32px; }
/* A11y: groups of fields (a radio group, each repeated invitation row) are fieldsets with a legend. */
.fld-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.fld-set > legend { padding: 0; }
.people-row > legend { font: 600 12.5px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.people-row + .people-row { margin-top: 18px; }
.people-grid { grid-template-columns: 2fr 2fr 1.5fr 1.5fr; }
@media (max-width: 700px) {
  .people-grid { grid-template-columns: 1fr; }
  .people-row { border-bottom: 1px solid rgb(11 39 25 / .15); padding-bottom: 12px; }
  .stack-sm .tbl thead { display: none; }
  .stack-sm .tbl, .stack-sm .tbl tbody, .stack-sm .tbl tr, .stack-sm .tbl td, .stack-sm .tbl tbody th { display: block; width: 100%; }
  .stack-sm .tbl tr { border-bottom: 1px solid rgb(11 39 25 / .15); padding: 10px 0; }
  .stack-sm .tbl td, .stack-sm .tbl tbody th { border: 0; padding: 4px 0; }
  .stack-sm .tbl select { max-width: 100%; }
  /* A11y: with the header row hidden, each cell shows (and is read with) its column name (table({ stack }) sets data-label). */
  .stack-sm .tbl [data-label]::before { content: attr(data-label); display: block; font: 600 11.5px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
}
.app h2 { font-size: 26px; margin: 0 0 14px; }
.app h3 { font-size: 21px; margin: 0 0 8px; }
.section { margin-top: 34px; }
.section-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-top h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.split-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); padding: 22px 24px; }
.card > :last-child { margin-bottom: 0; }
.card-link { display: block; color: var(--ink); transition: border-color .15s; }
.card-link:hover { border-color: var(--ink); color: var(--ink); }
.card-link h3 { margin-bottom: 4px; }
.meta { color: var(--ink-soft); font-size: 14px; margin: 0 0 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 16px 18px; color: var(--ink); display: block; }
a.stat:hover { border-color: var(--ink); color: var(--ink); }
.stat span { display: block; font: 500 12px/1.3 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.stat b { display: block; font: 500 30px/1.2 var(--head); margin-top: 6px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; font: 600 14px/1.2 var(--body); background: var(--ink); color: #fff; border: 1px solid var(--ink); cursor: pointer; text-align: center; }
.btn:hover { background: var(--moss); border-color: var(--moss); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--accent); border-color: rgb(216 55 19 / .5); }
.btn.danger:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.wide { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
form.inline { display: inline; margin: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Badges */
.badge { display: inline-block; padding: 3px 9px 2px; font: 500 11.5px/1.4 var(--head); letter-spacing: .07em; text-transform: uppercase; background: rgb(11 39 25 / .08); color: var(--ink); white-space: nowrap; }
.b-new, .b-open { background: rgb(216 55 19 / .12); color: #a82a0e; }
.b-in_progress, .b-planning, .b-reviewing, .b-interviewing, .b-contacted { background: rgb(52 78 65 / .14); color: var(--moss); }
.b-waiting, .b-offer, .b-draft { background: #f6e7c4; color: #6b4b06; }
.b-confirmed, .b-active, .b-hired, .b-admin { background: var(--moss); color: #fff; }
.b-done, .b-completed, .b-closed, .b-cancelled, .b-declined, .b-withdrawn, .b-disabled, .b-inactive { background: rgb(11 39 25 / .07); color: var(--ink-soft); }
.b-staff { background: rgb(11 39 25 / .14); }

/* Tables */
.tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid rgb(11 39 25 / .1); }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.tbl thead th { font: 500 12.5px/1.3 var(--head); letter-spacing: .06em; text-transform: uppercase; background: rgb(11 39 25 / .035); white-space: nowrap; }
/* A-5: a row's first cell is its header (th scope=row), so a screen reader names the row with each cell; it looks like the others. */
.tbl tbody th { font-weight: 400; }
.tbl td small, .tbl tbody th small { display: block; color: var(--ink-soft); font-size: 12.5px; }
.tbl td.msg { max-width: 420px; white-space: pre-wrap; }
.empty-state { background: #fff; border: 1px dashed rgb(11 39 25 / .25); padding: 28px 24px; text-align: center; color: var(--ink-soft); }
.empty-state p { margin: 0; }
.empty-state .btn { margin-top: 14px; }

/* Forms */
.app-form { margin: 0; }
.fld-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld.wide, .fld-check { grid-column: 1 / -1; }
.app-auth .fld-grid, .card .fld-grid.one { grid-template-columns: 1fr; }
.fld label { font: 600 13.5px/1.4 var(--body); }
.fld label .req { color: var(--accent); margin-left: 2px; }
.fld label .opt { font-weight: 400; color: var(--ink-soft); font-size: 12.5px; }
.fld input, .fld select, .fld textarea { font: 400 16px/1.4 var(--body); color: var(--ink); background: #fff; border: 1px solid var(--field-border); border-radius: 0; padding: 10px 12px; width: 100%; }
.fld input[type="file"] { padding: 8px; }
.fld textarea { resize: vertical; min-height: 96px; }
.fld select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230B2719' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
/* Every portal field, the search boxes included; opacity 1 because Firefox fades placeholders by default. */
::placeholder { color: var(--field-placeholder); opacity: 1; }
.fld .hint { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.fld .err { margin: 0; font-size: 13px; color: var(--accent); }
.fld.has-error input, .fld.has-error select, .fld.has-error textarea { border-color: var(--accent); }
.fld-check label { font-weight: 400; display: flex; gap: 10px; align-items: center; }
.fld-check input { width: 24px; height: 24px; flex: none; accent-color: var(--ink); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.form-note { font-size: 13.5px; color: var(--ink-soft); margin: 14px 0 0; }
.notice { background: #f6efe1; border-left: 3px solid var(--accent); padding: 12px 16px; font-size: 14px; margin: 0 0 18px; }
.flash { padding: 12px 16px; margin: 0 0 20px; font-size: 14.5px; border: 1px solid; }
.flash.ok { background: rgb(52 78 65 / .08); border-color: rgb(52 78 65 / .35); color: var(--moss); }
.flash.bad { background: rgb(216 55 19 / .07); border-color: rgb(216 55 19 / .35); color: #a82a0e; }
/* #202: the inactivity warning (portal.js). A modal alert dialog; the fallback (no showModal) is placed the same way. */
.idle-dlg { width: min(30rem, calc(100vw - 32px)); max-width: none; padding: 24px; color: var(--ink); background: #fff; border: 1px solid var(--field-border); border-radius: 0; box-shadow: 0 12px 40px rgb(14 31 23 / .25); }
.idle-dlg::backdrop { background: rgb(14 31 23 / .55); }
.idle-dlg h2 { font-size: 26px; margin: 0 0 12px; }
.idle-dlg .idle-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.idle-dlg .form-actions { margin-top: 16px; }
.idle-dlg [hidden] { display: none !important; }
.idle-dlg.idle-fallback { position: fixed; z-index: 1000; top: 15vh; left: 50%; transform: translateX(-50%); margin: 0; }
details.add { margin-top: 16px; }
details.add > summary { cursor: pointer; display: inline-flex; list-style: none; }
details.add > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { margin-bottom: 14px; }

/* Sign-in */
.auth-card { background: #fff; border: 1px solid var(--line); padding: 34px clamp(22px, 5vw, 40px) 30px; }
.auth-card h1 { font-size: 44px; line-height: 1; margin-bottom: 18px; letter-spacing: -.02em; }
.auth-card .form-actions { margin-top: 14px; }
.auth-card .fld { margin-top: 6px; }
/* Sign-in in the website's own language (proposal A, docs/design/proposals/sign-in on web/design-director; Factory df2422c3).
   Scoped to body.app-auth so the portal behind the sign-in keeps its look. The wordmark (proposal B) is not changed. */
.app-auth { background: #F3EEE4; }
.app-auth .auth-card { background: #FFFEFB; border: 1px solid rgb(19 32 26 / .13); border-radius: 14px; padding: 40px clamp(22px, 5vw, 44px) 36px; }
.app-auth .auth-card h1 { font-size: 48px; letter-spacing: -.012em; margin-bottom: 14px; }
.app-auth .auth-card > p:first-of-type { color: #3F4B44; }
.app-auth .auth-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { border: 1px solid #7A847E; border-radius: 8px; min-height: 48px; background: #FFFEFB; box-shadow: none; }
.app-auth .auth-card input:not([type=checkbox]):not([type=radio]):focus { outline: 2px solid #7A5C32; outline-offset: 0; border-color: transparent; }
.app-auth .auth-card .btn { border-radius: 999px; min-height: 48px; background: #0E1F17; border-color: #0E1F17; font-weight: 600; }
.app-auth .auth-card .btn.ghost { background: transparent; color: #0E1F17; border-color: #7A847E; }
.app-auth .auth-card .btn.ghost:hover { background: rgb(19 32 26 / .06); color: #0E1F17; border-color: #0E1F17; }
.app-auth .auth-card .btn.danger { background: transparent; color: var(--accent); border-color: rgb(216 55 19 / .5); }
.app-auth .auth-card a.link { font-weight: 600; text-decoration-color: #B39463; text-underline-offset: 4px; }
.app-auth .app-back { border-radius: 999px; padding-inline: 16px; }
.auth-help { font-size: 14px; color: var(--ink-soft); margin: 20px 0 0; }

/* Itinerary */
.itin-day { margin-top: 26px; }
.itin-day > h3 { font: 500 13px/1.3 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.itin { list-style: none; margin: 0; padding: 0; border-left: 2px solid rgb(11 39 25 / .15); }
.itin li { position: relative; margin: 0 0 12px 18px; background: #fff; border: 1px solid var(--line); padding: 14px 18px; }
.itin li::before { content: ""; position: absolute; left: -26px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--cream); border: 2px solid var(--moss); }
.itin-top { display: flex; gap: 10px 14px; align-items: baseline; flex-wrap: wrap; }
.itin-kind { font: 500 11.5px/1.4 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--moss); }
.itin-time { font-weight: 600; font-size: 14px; }
.itin-title { font-weight: 600; margin: 4px 0 2px; }
.itin-line { font-size: 14px; color: var(--ink-soft); margin: 0; }
.itin-details { font-size: 14px; margin: 6px 0 0; white-space: pre-wrap; }
.itin .row-actions { margin-top: 10px; }

/* Request thread */
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.thread li { background: #fff; border: 1px solid var(--line); padding: 14px 18px; max-width: 760px; }
.thread li.staff { border-left: 3px solid var(--moss); }
.thread li.client { border-left: 3px solid var(--accent); }
.thread .who { font-size: 13px; color: var(--ink-soft); margin: 0 0 6px; }
.thread .who b { color: var(--ink); font-weight: 600; }
.thread .body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Footer */
.app-footer { border-top: 1px solid var(--line); padding: 18px var(--gutter); font-size: 13px; color: var(--ink-soft); text-align: center; }
.app-footer p { margin: 0; }
.app-footer a { border-bottom: 1px solid rgb(11 39 25 / .25); }

@media (max-width: 960px) {
  .split-main { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .grid-2, .grid-3, .fld-grid { grid-template-columns: 1fr; }
  .app-who { display: none; }
  .app-head { align-items: flex-start; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { margin-top: 8px; }
  .card { padding: 18px; }
}
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin: 0 0 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.filters a { font-size: 13.5px; padding: 6px 12px; border: 1px solid rgb(11 39 25 / .25); background: #fff; }
.filters a[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.search { display: flex; gap: 8px; margin: 0 0 16px; max-width: 460px; }
.search input, .search select { flex: 1; font: 400 16px/1.4 var(--body); color: var(--ink); border: 1px solid var(--field-border); border-radius: 0; padding: 8px 12px; background: #fff; min-width: 0; }
/* P-7: People's search and filters wrap instead of squeezing (the name box first, then role and status). */
.search.people-search { max-width: 760px; flex-wrap: wrap; }
.people-search input { flex: 2 1 240px; }
.people-search select { flex: 1 1 150px; }
.anchors { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; margin: -8px 0 22px; }
.anchors a { border-bottom: 1px solid rgb(11 39 25 / .3); }
.section[id] { scroll-margin-top: 16px; }
.app-form.one .fld-grid { grid-template-columns: 1fr; }
.app-main .admin { width: auto; margin: 0; }
.app h2.card-title { font-size: 22px; margin: 0 0 4px; }

/* Labels use the sans face */
.stat span, .badge, .tbl thead th, .itin-kind, .itin-day > h3, .fld label { font-family: var(--sans) !important; }
.stat b { font-family: var(--serif); font-weight: 400; font-size: 40px; }
.itin-day > h3 { font-weight: 500; font-size: 12px; letter-spacing: .16em; color: var(--brass-ink); }
.itin-kind { color: var(--brass-ink); font-weight: 500; }
.itin li::before { border-color: var(--brass); }
.btn { background: var(--forest); border-color: var(--forest); font-family: var(--sans); font-weight: 500; letter-spacing: .02em; }
.btn:hover { background: var(--moss); border-color: var(--moss); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--forest); }
.btn.danger { background: transparent; }
.card, .tbl-wrap, .stat, .auth-card, .thread li, .itin li { border-color: var(--line); background: var(--paper); }
.empty-state { background: var(--paper); }
.b-confirmed, .b-active, .b-hired, .b-admin { background: var(--forest); }
.thread li.client { border-left-color: var(--brass); }
.notice { border-left-color: var(--brass); background: #EFE6D3; }
.app-footer { color: var(--ink-soft); }
body.app { background: var(--cream); font-family: var(--sans); }
.app-auth .app-main { padding-top: 72px; }
/* Analytics report (rendered inside the admin shell) */
.admin h1 { font-size: 40px; margin-bottom: 8px; }
.admin .bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 24px; }
.admin .bar a, .admin button { font: 500 13.5px/1 var(--sans); padding: 10px 16px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.admin .bar a:hover { background: var(--forest); color: #fff; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
.admin table { border-collapse: collapse; width: 100%; font-size: 14px; }
.admin th, .admin td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid rgb(19 32 26 / .1); }
.admin th { font: 500 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; background: rgb(19 32 26 / .035); white-space: nowrap; }
.admin .empty { padding: 40px; text-align: center; }

/* R3: nothing in the portal may widen the page on a phone. Grid and flex children can shrink, long
   words wrap, and inline forms inside table cells stack. Tables scroll inside their own frame. */
.app-main, .app-main > *, .grid-2 > *, .split-main > *, .card { min-width: 0; }
.app-main { overflow-wrap: anywhere; }
/* Positioned, so the hidden "Actions" header label (.sr-only, position:absolute) stays inside the scrolling frame
   instead of widening the page (refunds measured 665px wide on a 390px phone). */
.tbl-wrap { max-width: 100%; position: relative; }
/* Inside tables, break only words that can't fit: with "anywhere" a cell could shrink to one letter, so
   names and titles split mid-word instead of the table scrolling in its frame. Status labels stay whole. */
.tbl th, .tbl td { overflow-wrap: break-word; }
.tbl .badge { white-space: nowrap; }
/* Narrow phones: the user block (notifications, sign out) moves under the logo instead of off the screen. */
@media (max-width: 560px) { .app-bar { flex-wrap: wrap; row-gap: 10px; } .app-user { margin-left: auto; } }
/* Phones: no portal field below 16px, or iOS zooms the page when it's focused (unstyled inline inputs fell to 13px). */
@media (max-width: 1080px) { .app input:not([type=checkbox]):not([type=radio]), .app select, .app textarea { font-size: max(16px, 1em); } }
/* Phones: 44px targets for the header, the tabs and every button (the bell was 22px, small buttons 32px). */
@media (max-width: 1080px) {
  .app-logo, .app-bell, .app-nav a, .filters a { min-height: 44px; display: inline-flex; align-items: center; }
  .app-signout, .app .btn, .app .btn.small { min-height: 44px; }
  .fld-check label { min-height: 44px; }
}
@media (max-width: 700px) {
  .tbl td form.inline, .tbl tbody th form.inline { display: flex; flex-wrap: wrap; gap: 6px; }
  .tbl input, .tbl select { max-width: 100%; min-width: 0; }
  .app-head { flex-wrap: wrap; }
  .app-actions { flex-wrap: wrap; }
}

.demo-tasks summary { cursor: pointer; }
.demo-tasks ol { margin: 10px 0 6px; padding-left: 20px; }
.demo-tasks li { margin: 4px 0; }
