/* Manager Portal, in the Oakpoint Mandates portal look: its design tokens and bundled fonts
   (Spectral, Inter, IBM Plex Mono; SIL Open Font License, see fonts/*-LICENSE.txt).
   Each tab is a one-screen dashboard (.sheet) and prints on one landscape page (see @media print). */
@font-face { font-family: "Spectral"; font-weight: 400; font-display: swap; src: url("fonts/spectral-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 500; font-display: swap; src: url("fonts/spectral-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 600; font-display: swap; src: url("fonts/spectral-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --ink: #10261b; --forest: #17693d; --forest-deep: #0e4527; --gold: #a98436; --gold-soft: #efe7d2;
  --paper: #f4f5f2; --card: #fff; --rule: #ddded7; --rule-soft: #eaebe5; --muted: #5f6b61; --muted-light: #8a948c;
  --hover: #f4f5f2; --on-forest: #fff; --ok-soft: #e6f0e9; --wait: #7d5f1f; --review: #3f5466; --review-soft: #e6ebf0;
  --radius: 3px; --nav-h: 60px;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Funnel ramp Sent > Opened > Clicked > Replied: one forest hue, darker = deeper engagement
     (ordinal, validated on #fff: lightest step 2.28:1). */
  --c-sent: #7fb895; --c-opened: #3f8f60; --c-clicked: #17693d; --c-replied: #0e4527;
  --c-line: var(--forest); --c-avg: var(--muted-light); --c-grid: var(--rule-soft); --c-base: var(--rule);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e9eee9; --forest: #7fc79a; --forest-deep: #7fc79a; --gold: #d0b06a; --gold-soft: #2e2915;
    --paper: #111513; --card: #191e1b; --rule: #2d3430; --rule-soft: #242a26; --muted: #a3aea5; --muted-light: #7f8a82;
    --hover: #222824; --on-forest: #0c1a12; --ok-soft: #17291e; --wait: #e2c477; --review: #b9c8d6; --review-soft: #222b33;
    /* Dark ramp: lighter = deeper engagement (validated on #191e1b: darkest step 3.26:1). */
    --c-sent: #347a50; --c-opened: #56a274; --c-clicked: #86cba0; --c-replied: #c0e8cd;
  }
}
:root[data-theme="dark"] {
  --ink: #e9eee9; --forest: #7fc79a; --forest-deep: #7fc79a; --gold: #d0b06a; --gold-soft: #2e2915;
  --paper: #111513; --card: #191e1b; --rule: #2d3430; --rule-soft: #242a26; --muted: #a3aea5; --muted-light: #7f8a82;
  --hover: #222824; --on-forest: #0c1a12; --ok-soft: #17291e; --wait: #e2c477; --review: #b9c8d6; --review-soft: #222b33;
  --c-sent: #347a50; --c-opened: #56a274; --c-clicked: #86cba0; --c-replied: #c0e8cd;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.print-only { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.muted { color: var(--muted); }

/* Header bar */
.bar { background: var(--card); border-bottom: 1px solid var(--rule); }
.bar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest-deep); }
.brand-leaf { width: 18px; height: auto; color: var(--gold); flex: none; }
.brand-name {
  font-family: var(--serif); font-size: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--forest-deep); white-space: nowrap;
}
.bar-meta { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--muted); text-align: right; }
.bar-meta .period { font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em; }
.bar-meta .fund { color: var(--ink); font-weight: 500; padding-left: 14px; border-left: 1px solid var(--rule); }

/* Sheet: title row, tabs, dashboard */
.shell { max-width: 1280px; margin: 0 auto; padding: 16px 32px 20px; }
.titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow {
  margin: 0 0 2px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}
h1 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.title-right { display: flex; align-items: center; gap: 16px; }
.updated { margin: 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.updated time { color: var(--ink); font-weight: 500; }
.sample-tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px; background: var(--gold-soft); color: var(--wait); white-space: nowrap;
}
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--rule); font-size: 14px; margin-top: 10px; }
.tabs a {
  padding: 8px 0 9px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a[href]:hover { color: var(--forest); }
.tabs a[aria-current="page"] { color: var(--forest-deep); font-weight: 600; border-bottom-color: var(--gold); }
.tabs a[aria-disabled="true"] { cursor: default; color: var(--muted-light); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13.5px; font-weight: 600;
  min-height: 36px; padding: 0 16px; border-radius: var(--radius); cursor: pointer; border: 1px solid transparent;
  transition: background .15s;
}
.btn-quiet { background: var(--card); color: var(--ink); border-color: var(--rule); }
a.btn { text-decoration: none; }
.btn-quiet:hover { background: var(--hover); }

.dash { display: grid; gap: 14px; margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 20px 16px; min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.card-title { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.3; }
.card-desc { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.sub-title { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.sub-title span { font-weight: 400; color: var(--muted); margin-left: 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.empty-row { color: var(--muted); }
.fine { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* Charts (charts.py) */
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--c-grid); stroke-width: 1; }
.chart .baseline { stroke: var(--c-base); stroke-width: 1; }
.chart .axis { font-family: var(--mono); font-size: 11px; fill: var(--muted-light); }
.chart .bar-label { font-family: var(--mono); font-size: 12px; fill: var(--ink); }
.chart .hit { fill: transparent; }
.chart .grp { outline: none; }
.chart .grp:hover .hit, .chart .grp:focus-visible .hit { fill: var(--hover); }
.chart .grp:focus-visible .hit { stroke: var(--forest); stroke-width: 1.5; }
.chart path.s-sent { fill: var(--c-sent); }
.chart path.s-opened { fill: var(--c-opened); }
.chart path.s-clicked { fill: var(--c-clicked); }
.chart path.s-replied { fill: var(--c-replied); }
.chart path.s-meet { fill: var(--forest); }
.sw.s-sent, .f-bar.s-sent { background: var(--c-sent); }
.sw.s-opened, .f-bar.s-opened { background: var(--c-opened); }
.sw.s-clicked, .f-bar.s-clicked { background: var(--c-clicked); }
.sw.s-replied, .f-bar.s-replied { background: var(--c-replied); }
.sw.s-meet { background: var(--forest); }
.sw.s-reached, .p-bar.s-reached { background: var(--c-sent); }
.sw.s-current, .p-bar.s-current { background: var(--c-clicked); }

/* --- Pipeline tab --------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 16px; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.15; }
/* Deltas stay in text ink: whether "up" is good depends on the card (Passed up is not). */
.stat-change { margin-top: 4px; font-family: var(--mono); font-size: 11.5px; color: var(--ink); }
.stat-change .flat { color: var(--muted-light); }
.stat-detail { font-size: 12px; color: var(--muted); }
.two-up { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; }

.pfunnel { display: grid; gap: 9px; padding-top: 2px; }
.p-row { display: grid; grid-template-columns: 136px minmax(0, 1fr) 54px 100px; gap: 12px; align-items: center; font-size: 13px; outline: none; }
.p-row:hover .p-track, .p-row:focus-visible .p-track { box-shadow: 0 0 0 1px var(--rule); }
.p-track { height: 20px; background: var(--paper); border-radius: 2px; overflow: hidden; }
.p-bar { display: block; height: 100%; border-radius: 0 3px 3px 0; }
.p-value { text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.p-conv { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.activity { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.activity li {
  display: grid; grid-template-columns: 46px 10px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--rule-soft);
}
.a-date { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.a-icon { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.a-icon.meeting { background: var(--forest); }
.a-icon.stage { background: transparent; border: 2px solid var(--gold); }
.a-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.a-name { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-what { font-size: 12px; font-weight: 500; padding: 1px 9px; border-radius: 10px; white-space: nowrap; }
.a-what.meeting { background: var(--ok-soft); color: var(--forest-deep); }
.a-what.stage { background: var(--gold-soft); color: var(--wait); }

/* --- Email Outreach tab ------------------------------------------------------------ */
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); padding: 2px; background: var(--paper); }
.seg button {
  font: inherit; font-size: 12.5px; font-weight: 500; padding: 4px 12px; border: 0; border-radius: 2px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--forest-deep); font-weight: 600; box-shadow: 0 0 0 1px var(--rule); }
.email-top { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(330px, 1fr); gap: 14px; }
.totals { display: flex; gap: 40px; margin: 0 0 6px; }
.totals dt { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.totals dd { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--ink); }
.totals dd span { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 6px; }
.panel + .panel { margin-top: 2px; }
.panel-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin: 4px 0 -14px; }

.panel-note { margin: 4px 0 8px; font-size: 12px; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 44px; }
.cal-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.cal-sum { font-weight: 400; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { font-family: var(--mono); font-size: 11px; color: var(--muted-light); text-align: center; padding-bottom: 2px; }
.cal-day {
  height: 26px; display: flex; align-items: center; justify-content: center; font-family: var(--mono);
  font-size: 12.5px; color: var(--muted); border-radius: 3px; background: var(--paper);
}
.cal-day.empty { background: transparent; }
.cal-day.sent { background: var(--c-clicked); color: var(--on-forest); font-weight: 500; cursor: default; }
.cal-day.sent:hover, .cal-day.sent:focus-visible { background: var(--c-replied); }

.schedule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.sub-title.spaced { margin-top: 16px; }
.month-pick { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.month-pick select {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 4px 28px 4px 8px; min-height: 32px;
}
.funnel, .hbars { display: grid; gap: 7px; }
.f-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 48px; gap: 8px; align-items: center; font-size: 12.5px; }
.h-row { display: grid; grid-template-columns: 144px minmax(0, 1fr) 44px 34px; gap: 8px; align-items: center; font-size: 12.5px; }
.f-track, .h-track { height: 12px; background: var(--paper); border-radius: 2px; overflow: hidden; }
.f-bar, .h-bar { display: block; height: 100%; border-radius: 0 3px 3px 0; }
.h-bar { background: var(--forest); }
.f-value, .h-value { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--ink); }
.h-note { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.h-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th {
  text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); padding: 0 8px 6px; border-bottom: 1px solid var(--rule);
}
td { padding: 4px 8px; border-bottom: 1px solid var(--rule-soft); font-size: 13px; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
.sched th:nth-child(2) { width: 62px; }
.sched th:nth-child(3) { width: 104px; }
.sched th:nth-child(4) { width: 64px; }
.c-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { text-align: right; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
td.date { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  padding: 1px 9px 1px 7px; border-radius: 10px; white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-scheduled { background: var(--ok-soft); color: var(--forest-deep); }
.st-in-review { background: var(--gold-soft); color: var(--wait); }
.st-drafting { background: var(--rule-soft); color: var(--muted); }
.st-sent { background: var(--rule-soft); color: var(--ink); }

/* Tooltip (client.js) */
.tooltip {
  position: fixed; z-index: 50; pointer-events: none; min-width: 210px; max-width: 300px;
  background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(16, 38, 27, .14); padding: 10px 12px; font-size: 12.5px;
}
.tooltip .t-title { font-weight: 600; margin-bottom: 6px; }
.tooltip .t-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; padding: 1px 0; }
.tooltip .t-value { font-family: var(--mono); text-align: right; }
.tooltip .t-note { font-family: var(--mono); color: var(--muted); text-align: right; min-width: 44px; }


/* Smaller screens: stack (the one-screen fit is for desktop). Screen only: a printed page is
   narrower than 1100px too, and print must keep the desktop grid. */
@media screen and (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 960px) {
  .two-up, .email-top, .schedule-grid { grid-template-columns: minmax(0, 1fr); }
  .activity { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 640px) {
  .bar-inner { padding: 0 16px; }
  .brand-name { font-size: 16px; }
  .bar-meta .period { display: none; }
  .bar-meta .fund { border-left: 0; padding-left: 0; font-size: 12.5px; }
  .shell { padding: 14px 16px 24px; }
  h1 { font-size: 26px; }
  .titlebar, .title-right { flex-direction: column; align-items: flex-start; gap: 8px; }
  .card { padding: 14px 16px; }
  .card-head { flex-direction: column; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-grid { grid-template-columns: minmax(0, 1fr); }
  .p-row { grid-template-columns: 96px minmax(0, 1fr) 48px; }
  .p-conv { display: none; }
  .h-row { grid-template-columns: 116px minmax(0, 1fr) 44px; }
  .h-note { display: none; }
}

/* --- New Materials tab ------------------------------------------------------------- */
.materials { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); align-items: start; }
.materials-main, .materials-side { display: grid; gap: 14px; min-width: 0; }
.mform { display: grid; gap: 12px; }
.mform-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.field { display: grid; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend, .field .label { font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 0; }
.optional { font-weight: 400; color: var(--muted); margin-left: 4px; }
.mform select, .mform textarea, .mform input[type=date] {
  font: inherit; font-size: 13.5px; color: var(--ink); background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 7px 10px; width: 100%;
}
.mform textarea { resize: vertical; min-height: 54px; line-height: 1.45; }
.mform select:focus, .mform textarea:focus, .mform input[type=date]:focus { outline: 2px solid var(--forest); outline-offset: 0; border-color: var(--forest); }
.radios { display: flex; gap: 8px; flex-wrap: wrap; }
.radio { position: relative; display: inline-flex; cursor: pointer; }
.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio span {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 7px 10px;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); color: var(--ink); white-space: nowrap;
}
.radio span::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--muted-light); flex: none; box-sizing: border-box; }
.radio input:checked + span { border-color: var(--forest); background: var(--ok-soft); color: var(--forest-deep); font-weight: 600; }
.radio input:checked + span::before { border: 4px solid var(--forest); }
.radio input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 2px; }
.dropzone {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 14px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--rule); border-radius: var(--radius); background: var(--paper); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--forest); background: var(--ok-soft); }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone:focus-within { outline: 2px solid var(--forest); outline-offset: 2px; }
.dz-main { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.dz-main u { color: var(--forest-deep); text-underline-offset: 2px; }
.dz-icon { width: 16px; height: 16px; border: 1.5px solid var(--forest); border-radius: 2px; position: relative; }
.dz-icon::after { content: ""; position: absolute; left: 50%; top: 2px; width: 1.5px; height: 8px; background: var(--forest); transform: translateX(-50%); }
.dz-hint { font-size: 12px; color: var(--muted); }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.file-list:empty { display: none; }
.file-list li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 5px 8px 5px 10px; border: 1px solid var(--rule-soft); border-radius: var(--radius); background: var(--card); font-size: 13px;
}
.f-kind { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--forest-deep);
  background: var(--ok-soft); padding: 1px 6px; border-radius: 2px; }
.f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-size { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.f-remove { font: inherit; font-size: 12px; color: var(--muted); background: transparent; border: 0; padding: 2px 6px; border-radius: 2px; cursor: pointer; }
.f-remove:hover { color: #b4472e; background: var(--hover); }
.file-error { margin: 0; font-size: 12.5px; color: #b4472e; }
.form-errors { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #b4472e; border-radius: var(--radius); background: #f8ebe7; color: #7a2e1c; font-size: 13px; }
.form-errors ul { margin: 4px 0 0; padding-left: 18px; }
.form-errors p { margin: 4px 0 0; }
.mform-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; font-size: 12.5px; }
.btn-primary { background: var(--forest-deep); color: var(--on-forest); }
.btn-primary:hover { background: var(--forest); }
.btn-primary:disabled { opacity: .65; cursor: progress; }
.confirm { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 6px 0; }
.confirm p { margin: 4px 0 0; font-size: 13.5px; }
.confirm .btn { margin-top: 14px; text-decoration: none; }
.confirm .steps { max-width: 560px; }
.confirm-ref { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.confirm-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--ok-soft); position: relative; }
.confirm-icon::after {
  content: ""; position: absolute; left: 12px; top: 7px; width: 8px; height: 14px;
  border: solid var(--forest); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
/* Your recent submissions: full width below the form and the right column, one row card each. */
.subs-card { margin-top: 14px; padding: 18px 24px 20px; }
.subs-card .card-head { align-items: center; margin-bottom: 14px; }
.subs-title { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.25; }
.subs-card .card-desc { font-size: 13.5px; }
.sub-head, .sub-row {
  display: grid; gap: 20px; align-items: start;
  grid-template-columns: minmax(150px, 1fr) 118px minmax(220px, 1.7fr) minmax(200px, 1.6fr) 112px 118px;
}
.sub-head {
  padding: 0 16px 8px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.sub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sub-row {
  padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card);
  font-size: 14.5px; line-height: 1.45;
}
.sub-row.just-sent { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest) inset; background: var(--ok-soft); }
.sub-material { display: grid; gap: 2px; min-width: 0; }
.sub-material strong { font-size: 15.5px; font-weight: 600; }
.sub-material span { font-size: 13px; color: var(--muted); }
.sub-cell { font-family: var(--mono); font-size: 13.5px; color: var(--ink); padding-top: 1px; }
.sub-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; min-width: 0; }
.sub-files li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.sub-file-name { overflow-wrap: anywhere; }
.sub-files .f-kind { align-self: start; margin-top: 3px; }
.sub-files .f-size { white-space: nowrap; }
.sub-notes { min-width: 0; }
.clamp { margin: 0; overflow-wrap: anywhere; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.clamp.open { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.more {
  margin-top: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--forest-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.sub-status { justify-self: start; }
/* Status pills: always with their label (color never alone). */
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 13px 4px 11px; border-radius: 14px;
  font-size: 13px; font-weight: 600; white-space: nowrap; border: 1.5px solid transparent;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-received { background: var(--gold-soft); color: var(--wait); }
.pill-in-review { background: var(--review-soft); color: var(--review); }
.pill-approved { background: var(--ok-soft); color: var(--forest-deep); }
.pill-scheduled { background: transparent; color: var(--forest-deep); border-color: var(--forest); }
.pill-sent { background: var(--forest-deep); color: var(--on-forest); }
.st-received { background: var(--gold-soft); color: var(--wait); }
@media screen and (max-width: 1100px) {
  .sub-head { display: none; }
  .sub-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; }
  .sub-row [data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 10.5px;
    letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500;
  }
}
@media screen and (max-width: 640px) {
  .sub-row { grid-template-columns: minmax(0, 1fr); }
  .subs-card { padding: 16px; }
}
.steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding-left: 34px; min-height: 22px; font-size: 13px; line-height: 1.45; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; background: var(--forest-deep); color: var(--on-forest);
}
.contact { margin-top: 6px; }
.contact-name { margin: 6px 0 0; font-weight: 500; }
.contact + .contact { margin-top: 8px; }
.contact-team { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--rule-soft); font-size: 12.5px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.sends { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.sends li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; }
.send-date {
  display: grid; justify-items: center; line-height: 1.05; padding: 4px 0; border: 1px solid var(--rule); border-radius: var(--radius);
  font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--ink); background: var(--paper);
}
.send-date span { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.send-what { display: grid; min-width: 0; font-size: 13px; line-height: 1.35; }
.send-what span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-what .muted { font-size: 12px; }
.contact-mail { color: var(--forest-deep); font-size: 13.5px; text-underline-offset: 2px; }
.list-count { margin: 4px 0 2px; font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.15; }
.list-count span { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
@media screen and (max-width: 960px) {
  .materials, .mform-row { grid-template-columns: minmax(0, 1fr); }
}

/* Print: every .sheet on ONE landscape page, Letter or A4. The sheet is laid out at its
   desktop width (1280px) and zoomed to .74: 947px wide (Letter landscape content 988px, A4
   1054px) and at most 980px tall before zoom = 725px (A4 landscape content height). Light
   colors always; backgrounds printed; controls hidden; no breaks inside a sheet or card. */
@media print {
  @page { size: landscape; margin: 9mm; }
  :root:not(#print) {
    --ink: #10261b; --forest: #17693d; --forest-deep: #0e4527; --gold: #a98436; --gold-soft: #efe7d2;
    --paper: #f4f5f2; --card: #fff; --rule: #ddded7; --rule-soft: #eaebe5; --muted: #5f6b61; --muted-light: #8a948c;
    --on-forest: #fff; --ok-soft: #e6f0e9; --wait: #7d5f1f;
    --c-sent: #7fb895; --c-opened: #3f8f60; --c-clicked: #17693d; --c-replied: #0e4527;
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff; }
  .screen-only, .tooltip { display: none !important; }
  .print-only { display: inline; }
  .sheet {
    width: 1280px; max-width: none; margin: 0; zoom: .74; box-shadow: none; background: var(--paper);
    break-after: page; break-inside: avoid;
  }
  .sheet:last-of-type { break-after: auto; }
  .bar-inner, .shell { max-width: none; }
  .card, .stat { break-inside: avoid; }
}

/* Before the first publish */
.not-published { max-width: 640px; margin: 48px auto; }
.not-published h1 { margin: 4px 0 10px; }
.not-published a { color: var(--forest-deep); }

/* LP list (Pipeline tab, from the published snapshot; report section) */
.lp-card { margin-top: 14px; }
.lp-search input { font: inherit; font-size: 13px; padding: 6px 10px; width: 240px; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--card); color: var(--ink); }
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.lp-chips .chip { padding: 4px 11px; border: 1px solid var(--rule); border-radius: 14px; font-size: 12.5px; font-weight: 500;
  color: var(--ink); text-decoration: none; background: var(--card); }
.lp-chips .chip span { color: var(--muted); font-family: var(--mono); font-size: 11.5px; margin-left: 3px; }
.lp-chips .chip.on { background: var(--ok-soft); border-color: var(--forest); color: var(--forest-deep); font-weight: 600; }
.lp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lp-table th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 0 8px 6px 0; border-bottom: 1px solid var(--rule); }
.lp-table td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule-soft); }
.lp-table tbody tr:last-child td { border-bottom: 0; }
.stage-tag { font-size: 12px; color: var(--forest-deep); background: var(--ok-soft); padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.lp-pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; }


/* New Materials: the email (2026-11-05) */
.mform input[type=text] { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--card); color: var(--ink); width: 100%; }
.mform input[type=text]:focus { outline: 2px solid var(--forest); outline-offset: 0; border-color: var(--forest); }
.mform textarea[data-email-body] { min-height: 180px; font-size: 14px; }
.fmt-bar { display: flex; gap: 4px; margin-bottom: 4px; }
.fmt { font: inherit; font-size: 12.5px; padding: 3px 10px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--card); color: var(--ink); cursor: pointer; }
.fmt:hover:not(:disabled) { background: var(--hover); }
.fmt:disabled { opacity: .45; cursor: default; }
.fmt-preview { margin-left: auto; }
.fmt[aria-pressed="true"] { background: var(--ok-soft); border-color: var(--forest); color: var(--forest-deep); }
.email-preview { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 10px 14px;
  font-size: 14px; line-height: 1.5; min-height: 120px; }
.email-preview p { margin: 0 0 10px; }
.email-preview ul { margin: 0 0 10px; padding-left: 20px; }
.email-preview a { color: var(--forest-deep); }
.email-preview.small { font-size: 12.5px; min-height: 0; padding: 6px 10px; border: 0; background: none; }
.confirm .email-preview { margin: 10px 0 4px; max-height: 260px; overflow: auto; }
.hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.sub-subject { margin: 0 0 2px; font-weight: 600; font-size: 13px; }

/* Your IR Contact: Yul, prominent (no team address) */
.ir-contact .contact-main { margin-top: 8px; }
.ir-contact .contact-name { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.2; }
.ir-contact .contact-mail { display: inline-block; margin-top: 4px; font-size: 14.5px; font-weight: 500; }

/* Tentative schedule: days with their email count; the ±margin on hover or focus */
.schedule { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.schedule li { position: relative; display: flex; justify-content: space-between; padding: 4px 8px; border-radius: var(--radius);
  font-size: 13px; cursor: default; }
.schedule li:hover, .schedule li:focus { background: var(--hover); outline: none; }
.schedule li:focus-visible { outline: 2px solid var(--forest); }
.schedule .s-n { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.schedule li:hover::after, .schedule li:focus::after {
  content: attr(data-tip); position: absolute; z-index: 5; right: 0; bottom: calc(100% + 4px); white-space: nowrap;
  padding: 5px 9px; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-size: 12px;
}
.schedule .s-more { padding: 4px 8px; font-size: 12.5px; color: var(--muted); }

/* New Materials: a larger drop area for attachments (2026-11-05) */
.dropzone.dropzone-large { min-height: 150px; padding: 28px 20px; gap: 8px; align-content: center; }
.dropzone-large .dz-main { font-size: 15px; }
.dropzone-large .dz-icon { width: 22px; height: 22px; }
.dropzone-large .dz-icon::after { top: 3px; height: 11px; }
.dropzone-large .dz-hint { font-size: 12.5px; }
.mform-row input[type=date] { max-width: 220px; }

/* Pipeline tab: the first LPs, then the full list on /lps */
.lp-more { margin: 10px 0 0; font-size: 13px; }
.lp-more a, .crumbs a { color: var(--forest-deep); }
.lp-tools { display: flex; gap: 8px; align-items: center; }
.crumbs { margin: 12px 0 0; font-size: 13px; }

/* Online sign-in (portal/client_web/hosted.py) */
.account { display: flex; align-items: center; gap: 10px; margin-left: 18px; font-size: 13px; }
.account form { margin: 0; }
.account-switch { display: flex; gap: 6px; align-items: center; }
.account-switch select { font: inherit; padding: 4px 6px; border: 1px solid var(--rule); border-radius: 3px; background: var(--card); color: var(--ink); max-width: 260px; }
.account-name { color: var(--muted); }
.auth-card { max-width: 460px; margin: 40px auto; display: grid; gap: 12px; }
.auth-card h1 { margin: 0; }
.auth-card input[type=email], .auth-card input[type=password] { font: inherit; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 3px; background: var(--card); color: var(--ink); }
@media print { .account { display: none !important; } }
