/* LP Call Notes in the Oakpoint Mandates portal look (its design tokens and fonts). The fonts
   (Spectral, Inter, IBM Plex Mono; SIL Open Font License, see fonts/*-LICENSE.txt) are bundled:
   the CSP allows no font hosts. */
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/spectral-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/spectral-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/spectral-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; 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-style: normal; 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;
  --flag: #b4472e;
  --nav-h: 66px;

  --field-bg: #fff;
  --hover: #f4f5f2;
  --on-forest: #fff;
  --focus: rgba(23, 105, 61, .22);
  --flag-soft: #f8ebe7;
  --ok: var(--forest);
  --ok-soft: #e6f0e9;
  --wait: #7d5f1f;
  --wait-soft: var(--gold-soft);
  --radius: 3px;
  --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;
}
@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;
    --flag: #f09a85; --field-bg: #141815; --hover: #222824; --on-forest: #0c1a12; --focus: rgba(127, 199, 154, .3);
    --flag-soft: #36211b; --ok-soft: #17291e; --wait: #e2c477;
  }
}
: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;
  --flag: #f09a85; --field-bg: #141815; --hover: #222824; --on-forest: #0c1a12; --focus: rgba(127, 199, 154, .3);
  --flag-soft: #36211b; --ok-soft: #17291e; --wait: #e2c477;
}

* { 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: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Header bar */
.bar { background: var(--card); border-bottom: 1px solid var(--rule); }
.bar-inner {
  max-width: 1240px; 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: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--forest-deep); white-space: nowrap;
}
@media (min-width: 1024px) { .brand-name { font-size: 20px; } }
.bar-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.bar-nav > a {
  display: inline-flex; align-items: center; height: var(--nav-h); color: var(--ink); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.bar-nav > a:hover { color: var(--forest); }
.bar-nav > a[aria-current="page"] { color: var(--forest-deep); font-weight: 600; border-bottom-color: var(--gold); }
.account { display: flex; align-items: center; gap: 8px; margin: 0; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--forest-deep); color: var(--on-forest); font-size: 13px; font-weight: 600;
}
.link-button {
  font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 8px 4px; cursor: pointer;
}
.link-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* Page head */
.shell { max-width: 1240px; margin: 0 auto; padding: 22px 32px 32px; }
.page-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 6px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs .sep { color: var(--muted-light); }
.crumbs [aria-current] { color: var(--ink); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.dev-note { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--wait); }
.title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; }
h1 {
  margin: 0; font-family: var(--serif); font-size: 36px; font-weight: 500; line-height: 1.15;
  letter-spacing: -.01em; color: var(--ink);
}
.title-tags, .label {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.title-tags { margin: 0; display: flex; gap: 8px; }
.title-tags:empty { display: none; }
.lede { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* Layout: the form on the left, recent calls on the right; one column on phones */
.layout { display: grid; gap: 16px; margin-top: 20px; align-items: start; }
.stack { display: grid; gap: 14px; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
  .layout > .stack, .layout > .result { grid-column: 1; grid-row: 1; }
  .layout > .recent { grid-column: 2; grid-row: 1; }
}

/* Cards: title and description on the left, fields on the right */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px 24px; }
.card-title { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.card-desc { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
@media (min-width: 760px) {
  .split { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
}
.split .card-intro { padding-top: 2px; }
.row-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .row-2 { grid-template-columns: 1fr 1fr; } }

/* Fields */
.field { margin-bottom: 14px; }
.field:last-child, .row-2 > .field { margin-bottom: 0; }
.field .label { display: block; margin-bottom: 6px; }
.optional { margin-left: 6px; color: var(--muted-light); letter-spacing: .04em; text-transform: none; font-family: var(--sans); font-size: 12px; }
.hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.hint:empty { display: none; }

input[type="text"], input[type="date"], input[type="search"], textarea {
  display: block; width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--field-bg); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 9px 12px; min-height: 42px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted-light); }
input:hover, textarea:hover { border-color: var(--muted-light); }
input:focus, textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px var(--focus); }
button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); border-radius: var(--radius); }

/* Combobox */
.combo { position: relative; }
.combo input { padding-right: 42px; }
.combo-clear {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: var(--radius); background: transparent; cursor: pointer; color: var(--muted-light);
}
.combo-clear::before, .combo-clear::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 1.5px; background: currentColor;
}
.combo-clear::before { transform: translate(-50%, -50%) rotate(45deg); }
.combo-clear::after { transform: translate(-50%, -50%) rotate(-45deg); }
.combo-clear:hover { color: var(--ink); background: var(--hover); }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  max-height: min(340px, 55vh); overflow-y: auto; overscroll-behavior: contain;
}
.combo-list .opt { display: block; min-height: 44px; padding: 8px 10px; border-radius: 2px; cursor: pointer; }
.combo-list .opt[aria-selected="true"] { background: var(--hover); box-shadow: inset 2px 0 0 var(--forest); }
.opt-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.opt-sub { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt mark { background: none; color: inherit; font-weight: 650; }
.combo-list .empty { padding: 10px; color: var(--muted); font-size: 14px; }

/* Follow-up row: date on the left, buttons on the right */
.follow-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.field-date { margin-bottom: 0; width: 220px; max-width: 100%; }
.submit-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.draft-note { font-size: 12.5px; color: var(--muted-light); }
.form-error {
  margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--flag);
  background: var(--flag-soft); color: var(--flag); font-size: 14px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  font: inherit; font-size: 14.5px; font-weight: 600; min-height: 42px; padding: 0 20px;
  border-radius: var(--radius); cursor: pointer; border: 1px solid transparent; transition: background .15s;
}
.btn-primary { background: var(--forest-deep); color: var(--on-forest); }
.btn-primary:hover { background: var(--forest); }
.btn-primary:disabled { opacity: .65; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: var(--hover); }
.btn-block { width: 100%; }

/* Sign-in */
.signin { max-width: 460px; margin-top: 20px; }
.signin .card-title { margin-bottom: 4px; }
.signin form, .signin .btn-block { margin-top: 18px; }

/* Result */
.result-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.result-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; position: relative; background: var(--ok-soft); }
.result-icon::after {
  content: ""; position: absolute; left: 12px; top: 8px; width: 8px; height: 14px;
  border: solid var(--ok); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* Recent calls: a side card with a gold rule on top */
.recent { border-top: 3px solid var(--gold); padding-top: 18px; }
.recent-kicker { margin: 0 0 6px; color: var(--wait); }
.recent-list { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--rule-soft); }
.recent-list li.call { border-bottom: 1px solid var(--rule-soft); }
.call-link {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0;
  color: inherit; text-decoration: none;
}
.call-link:hover .call-title { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.card-link { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--forest-deep); font-weight: 500; }
.recent-list .hint { padding: 11px 0; margin: 0; }
.call-who { min-width: 0; }
.call-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink); }
.call-when { display: block; font-size: 12.5px; color: var(--muted); }
#directory-note { margin-top: 12px; }
.badge {
  flex: none; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 2px; padding: 3px 7px;
}
.badge.new, .badge.processing, .badge.retrying { background: var(--wait-soft); color: var(--wait); }
.badge.published { background: var(--ok-soft); color: var(--ok); }
.badge.failed { background: var(--flag-soft); color: var(--flag); }

/* My calls */
.calls-card { padding: 8px 24px 12px; margin-top: 20px; }
.calls-head, .call-row {
  display: grid; grid-template-columns: 210px minmax(0, 1.3fr) minmax(0, 1fr) 130px; gap: 16px; align-items: center;
}
.calls-head { padding: 12px 0 10px; border-bottom: 1px solid var(--rule); }
.calls-search { padding: 12px 0 4px; max-width: 420px; }
.calls-list { list-style: none; margin: 0; padding: 0; }
.calls-list li { border-bottom: 1px solid var(--rule-soft); }
.calls-list li:last-child { border-bottom: 0; }
.call-row { padding: 14px 0; color: inherit; text-decoration: none; }
.call-row:hover .call-firm { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.call-cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-time { font-size: 13.5px; color: var(--muted); }
.call-firm { font-weight: 500; color: var(--ink); }
.call-reason { grid-column: 2 / -1; margin-top: -6px; font-size: 13px; color: var(--flag); white-space: normal; }
.call-row .call-reason { color: var(--muted); }
.call-row:has(.badge.failed) .call-reason { color: var(--flag); }
.empty-state { margin: 12px 0; color: var(--muted); }
.empty-state a { color: var(--forest-deep); }

/* One call */
.detail { margin-top: 20px; }
.status-line { display: flex; align-items: center; gap: 12px; margin: 0; }
.status-line .hint { margin: 0; }
.status-reason { margin: 12px 0 0; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 18px; }
.facts dd { margin: 4px 0 0; color: var(--ink); }
.text-block {
  white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; border: 1px solid var(--rule-soft);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); line-height: 1.55;
}
.text-block.muted { color: var(--muted-light); }
.erased { margin: 0; }

/* Contact chips: the first is the main contact */
.chips { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; padding: 0 2px 0 10px;
  border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); font-size: 14px; color: var(--ink);
}
.chip-main { border-color: var(--forest); background: var(--ok-soft); }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip-tag {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--forest-deep); background: var(--ok-soft); border-radius: 2px; padding: 1px 5px;
}
.chip-remove {
  position: relative; flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.chip-remove::before, .chip-remove::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: currentColor;
}
.chip-remove::before { transform: translate(-50%, -50%) rotate(45deg); }
.chip-remove::after { transform: translate(-50%, -50%) rotate(-45deg); }
.chip-remove:hover { color: var(--ink); background: var(--hover); }
input:disabled { opacity: .6; cursor: not-allowed; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.more { color: var(--muted); font-size: 13px; }

/* Edit and delete a Waiting call */
.call-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-top: 14px; }
.confirm summary { list-style: none; }
.confirm summary::-webkit-details-marker { display: none; }
.btn-danger { color: var(--flag); }
.confirm[open] summary { background: var(--flag-soft); border-color: var(--flag); }
.confirm-box {
  margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--flag); border-radius: var(--radius); background: var(--flag-soft);
}
.confirm-box p { margin: 0 0 10px; font-size: 14px; color: var(--ink); }
.btn-danger-solid { background: var(--flag); color: var(--card); }
.btn-danger-solid:hover { filter: brightness(.92); }
.notice {
  margin: 14px 0 0; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--flag);
  background: var(--flag-soft); color: var(--flag); font-size: 14px;
}
.notice-ok { margin-top: 20px; border-color: var(--forest); background: var(--ok-soft); color: var(--forest-deep); }

@media (max-width: 640px) {
  .calls-card { padding: 4px 16px 8px; }
  .calls-head { display: none; }
  .call-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .call-firm { grid-column: 1; grid-row: 1; }
  .call-status { grid-column: 2; grid-row: 1 / span 2; }
  .call-contact { grid-column: 1; grid-row: 2; font-size: 14px; }
  .call-time { grid-column: 1; grid-row: 3; font-size: 12.5px; }
  .call-reason { grid-column: 1 / -1; margin-top: 4px; }
  .facts { grid-template-columns: 1fr; gap: 10px; }
  .brand-name { display: none; }
  .bar-inner { padding: 0 16px; }
  .bar-nav { gap: 12px; }
  .shell { padding: 16px 16px 32px; }
  .page-top { flex-direction: column; align-items: flex-start; gap: 4px; }
  h1 { font-size: 30px; }
  .card { padding: 18px 16px; }
  .split .card-intro { margin-bottom: 14px; }
  .field-date { width: 100%; }
  .submit-bar { width: 100%; }
  .submit-bar .btn-primary { flex: 1 1 auto; }
  .result .btn { width: 100%; }
}
