/* The executive purchases page, /executive-purchases (the design chat's round 1, approved by Roy on Oct 18:
   docs/design/EXECUTIVE-PURCHASES-DESIGN.md and its mockups). Loaded by that page only, from a link in its own view
   (executive-purchases.ejs), so no shared stylesheet is touched. Every rule is under .ep-pub; the colours and faces are
   the site's own variables (app.css) where one matches the mockup, else the mockup's value. What each audience sees is
   decided in server code (src/lib/executive-purchases/page-model.ts), not here. Desktop: one grid row per company;
   760 px and less: each company a card, the filter bar folded behind "Filters". */

.ep-pub.page { max-width: 1120px; padding-top: 56px; padding-bottom: 88px; }
.ep-pub :focus-visible { outline: 2px solid var(--sellier); outline-offset: 3px; }
.ep-pub a { color: var(--sellier); text-decoration: underline; text-underline-offset: 3px; }
.ep-pub a:hover { color: var(--ink); }
.ep-pub .ep-num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.ep-pub .ep-mute { color: var(--ink-3); }

/* ---- heading ---- */
.ep-head { max-width: 720px; }
.ep-head .eyebrow { margin: 0; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sellier); }
.ep-head h1 { margin: 10px 0 14px; font-family: var(--font-display); font-size: 56px; font-weight: 400; line-height: 1.05; font-variant-numeric: lining-nums; color: var(--ink); }
.ep-intro { margin: 0; max-width: 62ch; font-size: 17px; color: #4a433a; }
.ep-summary { margin: 20px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rule); font-size: 14px; color: #4a433a; }
.ep-summary b, .ep-briefing b { font-weight: 600; color: var(--ink); }
.ep-briefing { margin: 8px 0 0; font-size: 14px; color: #4a433a; }

/* ---- the filter bar ---- */
.ep-filters { margin: 36px 0 0; padding: 20px 24px; background: #fbf8f1; border: 1px solid var(--rule); }
.ep-filters__toggle { display: none; }
.ep-filters__body { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: flex-end; }
.ep-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ep-field--ticker { flex: 0 1 130px; }
.ep-field--min, .ep-field--title { flex: 0 1 170px; }
.ep-field--date { flex: 0 1 150px; }
.ep-field--sort { flex: 0 1 160px; }
.ep-field label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #4a433a; }
.ep-field input, .ep-field select { box-sizing: border-box; height: 42px; border: 1px solid var(--rule); border-radius: 0; background: #fff; padding: 0 12px; font: 15px var(--font-sans); color: var(--ink); }
.ep-field input:disabled, .ep-field select:disabled { background: #f3eee5; color: #8a8174; }
.ep-actions { display: flex; gap: 8px; align-items: center; }
.ep-apply { height: 42px; padding: 0 20px; border: 0; background: var(--ink); color: var(--paper); font: 600 12px var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.ep-apply:disabled { background: #8a8174; cursor: default; }
.ep-reset { display: inline-flex; align-items: center; height: 42px; padding: 0 4px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.ep-reset--off { color: #8a8174 !important; text-decoration: none; cursor: default; }
.ep-filters__note { flex: 1 1 100%; margin: 0; font-size: 13px; color: var(--ink-3); }

/* ---- the table ---- */
.ep-table { margin: 32px 0 0; }
.ep-row { display: grid; grid-template-columns: 72px minmax(0, 1.5fr) 72px minmax(0, 1.15fr) 84px 124px 112px 168px 44px; gap: 0 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ep-row--head { padding: 10px 0; border-bottom: 1px solid var(--ink); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #4a433a; }
.ep-co { scroll-margin-top: 16px; }
.ep-co[data-opens] > .ep-row { cursor: pointer; }
.ep-tk { font-weight: 600; letter-spacing: 0.04em; }
.ep-company { overflow-wrap: anywhere; }
.ep-titles, .ep-latest { font-size: 14px; color: var(--ink-3); }
.ep-latest { font-variant-numeric: tabular-nums; }
.ep-amount { font-weight: 600; }
.ep-lbl { display: none; }
.ep-marks { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-marks form { margin: 0; }
.ep-tag-in { display: inline-block; padding: 2px 7px; border: 1px solid #cfc3af; background: #fff; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #4a433a; }
.ep-tag-add, .ep-pub a.ep-tag-add { display: inline-block; white-space: nowrap; padding: 3px 8px; border: 1px solid var(--sellier); background: transparent; font: 500 10px var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sellier); text-decoration: none; cursor: pointer; }
.ep-tag-add:hover, .ep-pub a.ep-tag-add:hover { background: var(--sellier); color: #fbf8f1; }
.ep-pub a.ep-tag-recap, .ep-pub a.ep-tag-weekly { display: inline-block; padding: 3px 8px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.ep-pub a.ep-tag-recap { background: var(--sellier); color: #fbf8f1; }
.ep-pub a.ep-tag-recap:hover { background: var(--ink); color: #fbf8f1; }
.ep-pub a.ep-tag-weekly { border: 1px solid var(--ink); color: var(--ink); }
.ep-chev { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.ep-chev[aria-expanded='true'] svg { transform: rotate(180deg); }
.ep-notice { margin: 0 0 4px; padding: 14px 18px; background: #fbf8f1; border-left: 2px solid var(--sellier); font-size: 14px; color: var(--ink); }
/* a line breaks before a link, never inside it (DR-2) */
.ep-notice a { white-space: nowrap; }

/* ---- a company opened ---- */
.ep-tx-panel { padding: 6px 20px 18px; background: #fbf8f1; border-bottom: 1px solid var(--rule); }
.ep-tx { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) 96px 104px 84px 76px 112px minmax(0, 1fr) 96px 64px 72px; gap: 0 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule-light); font-size: 14px; }
.ep-tx--head { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid #cfc3af; }
.ep-tx__name, .ep-tx__amount { font-weight: 600; }
.ep-tx__holding, .ep-tx__title { color: var(--ink-3); }

/* ---- the rest withheld ---- */
.ep-locked { position: relative; overflow: hidden; min-height: 620px; }
.ep-blur { filter: blur(5px); opacity: 0.75; user-select: none; pointer-events: none; }
.ep-panel { position: absolute; z-index: 2; left: 50%; top: 110px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 12px; align-items: center; box-sizing: border-box; width: min(540px, calc(100% - 24px)); padding: 34px 32px 30px; background: #fbf8f1; border: 1px solid var(--ink); box-shadow: 0 24px 60px -30px rgba(31, 27, 22, 0.45); text-align: center; }
.ep-panel p { margin: 0; }
.ep-panel__count { font-family: var(--font-display); font-size: 64px; line-height: 0.85; font-variant-numeric: lining-nums; color: var(--sellier); }
.ep-panel__line { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 500; line-height: 1.15; font-variant-numeric: lining-nums; color: var(--ink); }
.ep-panel__price { margin-top: 4px !important; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sellier); }
.ep-points { display: flex; flex-direction: column; gap: 12px; max-width: 44ch; margin: 4px 0 8px; padding: 0; list-style: none; font-size: 14px; text-align: left; color: #4a433a; }
.ep-points li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 10px; align-items: baseline; }
.ep-points b { font-weight: 600; color: var(--ink); }
.ep-points i { font-style: normal; font-family: var(--font-display); font-size: 22px; line-height: 1; font-variant-numeric: lining-nums; color: var(--sellier); }
.ep-pub a.ep-panel__link { padding: 15px 26px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; }
.ep-pub a.ep-panel__link:hover { background: #4a433a; color: var(--paper); }
.ep-panel__aside { font-size: 14px; color: #4a433a; }

/* ---- paging, empty, footnote ---- */
.ep-paging { display: flex; gap: 18px; justify-content: center; align-items: baseline; margin: 32px 0 0; font-size: 14px; color: #4a433a; }
.ep-empty { display: flex; gap: 14px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--rule); font-size: 15px; color: #4a433a; }
.ep-empty p { margin: 0; }
.ep-footnote { max-width: 70ch; margin: 40px 0 0; font-size: 13px; color: var(--ink-3); }

/* ---- phone ---- */
@media (max-width: 760px) {
  .ep-pub.page { padding-left: 16px; padding-right: 16px; padding-top: 40px; }
  .ep-head h1 { font-size: 44px; }
  .ep-filters { margin-top: 28px; padding: 0; background: transparent; border: 0; }
  .ep-filters__toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 16px; background: #fbf8f1; border: 1px solid var(--rule); font: 600 12px var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
  .ep-filters__now { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
  .ep-filters__body { padding: 16px; border: 1px solid var(--rule); border-top: 0; background: #fbf8f1; }
  .ep-filters[data-folds] .ep-filters__body { display: none; }
  .ep-filters[data-folds].is-open .ep-filters__body { display: flex; }
  .ep-filters__body .ep-field { flex: 1 1 100% !important; }
  .ep-filters__body .ep-field input, .ep-filters__body .ep-field select { width: 100%; height: 48px; font-size: 16px; }
  .ep-actions { flex: 1 1 100%; }
  .ep-apply { flex: 1 1 auto; height: 48px; }
  .ep-row--head { display: none; }
  .ep-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'tk am' 'co co' 'of la' 'mk ch'; gap: 4px 12px; padding: 16px 0; }
  .ep-c-tk { grid-area: tk; }
  .ep-c-co { grid-area: co; }
  .ep-c-of, .ep-pub .ep-c-of { grid-area: of; text-align: left; }
  .ep-c-la { grid-area: la; text-align: right; }
  .ep-c-am { grid-area: am; font-size: 17px; }
  .ep-c-mk { grid-area: mk; }
  .ep-c-ch { grid-area: ch; justify-self: end; }
  .ep-c-ti, .ep-c-pu { display: none; }
  .ep-lbl { display: inline; margin-right: 6px; color: var(--ink-3); }
  .ep-tx-panel { padding: 4px 14px 14px; }
  .ep-tx--head { display: none; }
  .ep-tx { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; }
  .ep-tx > * { grid-column: 1 / -1; }
  .ep-tx .ep-num { text-align: left; }
  .ep-tx > .ep-tx__name { grid-column: 1 / 2; }
  .ep-tx > .ep-tx__amount { grid-column: 2 / 3; grid-row: 1; text-align: right; }
  /* held before and change side by side on the card (round 6) */
  .ep-tx > .ep-tx__before { grid-column: 1 / 2; }
  .ep-tx > .ep-tx__change { grid-column: 2 / 3; text-align: right; }
  .ep-locked { min-height: 560px; }
  .ep-panel { top: 90px; padding: 26px 20px 24px; }
}
