@font-face { font-family: Montserrat; src: url('fonts/montserrat-regular.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Montserrat; src: url('fonts/montserrat-bold.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: Newsreader; src: url('fonts/newsreader-italic.woff2') format('woff2'); font-style: italic; font-weight: 400; font-display: swap; }
:root { --ivory: #fbf8f4; --paper: #fff; --ink: #17141a; --muted: #5a5560; --line: #e4ddd8; --cobalt: #3b40d8; --rose: #f9cae4; --ok: #1f6f4a; --bad: #a3283d; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 15px/1.6 Montserrat, "Helvetica Neue", Arial, sans-serif; }
.banner { margin: 0; padding: 6px 16px; background: var(--rose); font-size: 13px; font-weight: 700; text-align: center; }
main { max-width: 1320px; margin: 0 auto; padding: clamp(20px, 3vw, 42px) clamp(16px, 3vw, 42px) 80px; }
h1 { font-size: clamp(22px, 2vw, 30px); margin: 0; letter-spacing: -.045em; line-height: 1.15; }
.crm-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.crm-brand img { width: 42px; height: 42px; border-radius: 8px; }
.brand-trigger { display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; padding: 0; border-radius: 8px; background: transparent; line-height: 0; }
.brand-trigger:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.crm-title { display: grid; gap: 4px; }
h2 { font-size: clamp(20px, 2vw, 28px); margin: 34px 0 16px; letter-spacing: -.035em; line-height: 1.2; }
header.top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 0 0 24px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
nav.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 26px; }
nav.tabs button { border: 1px solid transparent; background: #efece8; color: var(--ink); }
nav.tabs button:hover { border-color: var(--cobalt); }
nav.tabs button[aria-current="page"] { background: var(--cobalt); color: #fff; }
button, .btn { font: 700 13px/1.25 Montserrat, "Helvetica Neue", Arial, sans-serif; padding: 11px 17px; border-radius: 999px; border: 0; background: var(--cobalt); color: #fff; cursor: pointer; transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
button:not(:disabled):not(.text-link):hover { transform: translateY(-1px); }
button.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
button.warn { background: var(--bad); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
input, select, textarea { font: inherit; padding: 11px 13px; border: 1.5px solid #cfc7c2; border-radius: 9px; background: var(--paper); color: var(--ink); width: 100%; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px, 2vw, 24px); box-shadow: 0 14px 38px rgba(23, 20, 26, .035); }
.card > * { margin: 0; }
.card > * + * { margin-top: 8px; }
.list { display: grid; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.meta { color: var(--muted); font-size: 13px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--rose); }
.chip.synth { background: #e6e5fb; color: var(--cobalt); }
.board { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.col { background: #f2eee9; border-radius: 10px; padding: 10px; min-width: 0; }
.col h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.grid2 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.err { color: var(--bad); font-weight: 600; min-height: 1.2em; }
.login { max-width: 500px; margin: 40px auto; display: grid; gap: 17px; }
main:has(> .login) { max-width: none; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); align-items: stretch; gap: 0; padding: clamp(14px, 2vw, 28px); }
main:has(> .login)::before { content: ''; display: block; min-height: min(760px, calc(100svh - 56px)); border-radius: 22px 0 0 22px; background: #d8d0cb url('emily-login.webp') center 28% / cover no-repeat; }
main:has(> .login) > .login { width: 100%; max-width: 540px; align-self: center; margin: 0 auto; padding: clamp(24px, 5vw, 68px); border: 0; border-radius: 0 22px 22px 0; background: var(--paper); box-shadow: none; }
main:has(> .login) > .login h1 { font-size: clamp(30px, 3vw, 46px); max-width: 12ch; }
main:has(> .login) > .login .crm-brand { margin-bottom: clamp(14px, 3vw, 30px); }
main:has(> .login) > .login label { font-size: 12px; letter-spacing: .02em; }
main:has(> .login) > .login button[type="submit"] { min-height: 48px; margin-top: 4px; }
main:has(> .login) > .login .meta { line-height: 1.6; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.scroll { overflow-x: auto; }
.qr { image-rendering: pixelated; border: 8px solid #fff; border-radius: 8px; width: 220px; height: 220px; }
.secret { font-size: 15px; letter-spacing: .06em; }
.codes { columns: 2; padding-left: 22px; font-size: 15px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
button:disabled { opacity: .45; cursor: not-allowed; }
.text-link { min-height: 0; padding: 0; border-radius: 0; background: none; color: var(--cobalt); text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.wide { grid-column: 1 / -1; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.detail-grid > div { min-width: 0; overflow-wrap: anywhere; }
.detail-grid p { margin: 4px 0 0; }
.customer-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.customer-metrics .card { display: grid; gap: 4px; }
.customer-metrics strong { font: 400 42px/1 Newsreader, Georgia, serif; color: var(--cobalt); }
.customer-metrics small { color: var(--muted); }
.retention-view { max-width: 780px; }
.retention-view > p { max-width: 66ch; }
.retention-panel { display: grid; gap: 14px; padding: clamp(18px, 4vw, 30px); }
.retention-panel > * { margin: 0; }
.retention-panel label { max-width: 440px; }
.retention-active, .retention-paused { width: fit-content; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.retention-active { background: #d9f0e3; color: var(--ok); }
.retention-paused { background: #f3e8e4; color: var(--bad); }
.retention-actions { justify-content: flex-start; }
.retention-panel .warn { width: fit-content; }
.cms-view { max-width: 900px; }
.cms-view > .meta { max-width: 68ch; }
.cms-page-heading { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; margin: 34px 0 12px; font-size: 21px; }
.cms-link { font-size: 13px; font-weight: 600; color: var(--cobalt); letter-spacing: 0; }
.cms-card { display: grid; gap: 14px; margin: 0 0 14px; }
.cms-card > * { margin: 0; }
.cms-card textarea { min-height: 110px; line-height: 1.5; resize: vertical; }
.cms-actions { justify-content: flex-start; }
.cms-card .err:empty { display: none; }
.journal-editor { display: grid; gap: 16px; margin: 26px 0 42px; }
.journal-editor > * { margin-block: 0; }
.journal-editor label { display: grid; gap: 7px; }
.journal-editor textarea { line-height: 1.55; resize: vertical; }
.journal-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.journal-record { display: grid; gap: 12px; }
.journal-record > * { margin: 0; }
.journal-record .row { justify-content: flex-start; }
.journal-record .row input[type="url"] { flex: 1 1 260px; width: auto; min-width: 0; }
.connection-help { margin: 22px 0; }
.connection-help summary { cursor: pointer; font-weight: 700; }
.connection-help p { max-width: 70ch; margin: 14px 0 0; }
.cockpit > h2 { margin-top: 8px; }
.cockpit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cockpit-kpi { display: grid; gap: 12px; align-content: space-between; }
.cockpit-kpi strong { font: 400 clamp(38px, 4vw, 58px)/1 Newsreader, Georgia, serif; color: var(--cobalt); }
.cockpit-kpi button { justify-self: start; }
.cockpit-lower { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.cockpit-lower h3 { margin: 0 0 10px; }
.metric-list { display: grid; gap: 5px; margin: 12px 0; }
.metric-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.metric-list span { overflow-wrap: anywhere; }
.content-calendar { margin: 20px 0; max-width: 100%; }
.content-view { max-width: none; }
.content-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(360px, .9fr); gap: 16px; align-items: start; margin: 22px 0 34px; }
.content-workspace .content-calendar, .content-workspace .journal-editor { margin: 0; }
.content-workspace .journal-editor { min-width: 0; }
.calendar-head h3 { margin: 0; }
.calendar-head p { margin: 2px 0 0; }
.calendar-head .row { justify-content: flex-end; }
.calendar-head button { min-width: 44px; padding: 8px; }
.calendar-month { min-width: 145px; text-align: center; text-transform: capitalize; }
.calendar-scroll { max-width: 100%; overflow-x: auto; margin-top: 18px; }
.calendar-grid { min-width: 700px; }
.calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays span { padding: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.calendar-day { min-height: 110px; min-width: 0; padding: 6px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.calendar-day time { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; }
.calendar-outside { background: #f7f4f0; color: var(--muted); }
.calendar-post { display: block; width: 100%; padding: 6px 7px; margin: 0 0 4px; border-radius: 7px; background: #ecebff; color: var(--ink); text-align: left; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.calendar-post small { display: block; margin-top: 2px; font-weight: 400; }
.calendar-agenda { display: none; }
.calendar-agenda-item { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 2px 10px; width: 100%; margin: 0 0 7px; border-radius: 10px; background: #f3f2ff; color: var(--ink); text-align: left; }
.calendar-agenda-item time { grid-row: span 2; align-self: center; color: var(--cobalt); font-size: 12px; }
.calendar-agenda-item span { overflow-wrap: anywhere; }
.calendar-agenda-item small { font-weight: 400; }
.content-calendar + .journal-editor { margin-top: 24px; }
.marketing-view, .newsletter-view { max-width: none; }
.marketing-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 18px 0; }
.marketing-stats > div { display: grid; align-content: space-between; min-height: 84px; padding: 12px; background: #f6f3f0; border-radius: 10px; }
.marketing-stats strong { font: 400 clamp(27px, 3vw, 38px)/1 Newsreader, Georgia, serif; color: var(--cobalt); }
.marketing-stats span { color: var(--muted); font-size: 12px; }
.marketing-view fieldset { border: 1px solid var(--line); border-radius: 10px; }
.marketing-view fieldset .check { display: flex; align-items: center; gap: 7px; }
.marketing-agenda { display: grid; gap: 7px; margin-top: 12px; }
.marketing-agenda-item { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 3px 18px; width: 100%; text-align: left; background: #f3f2ff; color: var(--ink); border-radius: 10px; }
.marketing-agenda-item time { grid-row: span 2; align-self: center; color: var(--cobalt); font-size: 12px; }
.marketing-agenda-item span { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.marketing-agenda-item small { font-size: 11px; font-weight: 400; }
.newsletter-preview { z-index: 100; width: min(700px, calc(100vw - 24px)); max-height: 90vh; overflow: auto; background: var(--paper); box-shadow: 0 18px 80px #17131d77; border: 1px solid var(--line); }
.newsletter-preview::backdrop { background: #17131d99; }
.newsletter-preview h3 { overflow-wrap: anywhere; }
.newsletter-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.subscriber-row { overflow-wrap: anywhere; }
.contract-excerpt { white-space: pre-line; overflow-wrap: anywhere; }
.v-musterbox { display: grid; justify-items: start; gap: 8px; margin: 14px 0 18px; }
.v-musterbox > * { margin: 0; }
.support-home { max-width: 1050px; }
.support-eyebrow { color: var(--cobalt); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; }
.support-home h2 { margin: 8px 0 12px; font-size: clamp(28px, 4vw, 48px); max-width: 16ch; }
.support-intro { max-width: 68ch; color: var(--muted); }
.support-callout { margin: 28px 0 34px; border-color: var(--cobalt); background: #f3f2ff; }
.support-callout p { max-width: 72ch; }
.support-launch { display: inline-block; margin-top: 15px; text-decoration: none; }
.support-launch:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.support-feature h4 { margin: 0 0 6px; font-size: 15px; }
.support-feature p { margin: 0; color: var(--muted); font-size: 13px; }
.agent-view { max-width: 1200px; }
.agent-view > h2 { margin: 5px 0 12px; font-size: clamp(30px, 4vw, 52px); }
.agent-intro { max-width: 70ch; color: var(--muted); line-height: 1.6; }
.agent-state { margin: 18px 0 26px; }
.agent-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.agent-panel { min-width: 0; }
.agent-panel h3 { margin-top: 0; }
.agent-sources, .agent-jobs { display: grid; gap: 10px; }
.agent-source { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.agent-source span { min-width: 0; overflow-wrap: anywhere; }
.agent-source small { display: block; color: var(--muted); margin-top: 3px; }
.agent-source button { flex: 0 0 auto; }
.agent-job { border-color: #c9ccf5; background: #fbfbff; }
.agent-job h4 { margin: 0; overflow-wrap: anywhere; }
.agent-findings { display: grid; gap: 6px; background: #f3f2ff; border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
.agent-findings p { margin: 0; overflow-wrap: anywhere; }
.agent-actions { margin: 16px 0 4px; }
@media (max-width: 800px) { .agent-panels { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .agent-source { display: grid; } .agent-source button, .agent-actions button { width: 100%; } }
@media (max-width: 560px) { .journal-pair { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .content-workspace { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .calendar-scroll { display: none; } .calendar-agenda { display: block; margin-top: 16px; } }
@media (max-width: 640px) {
  .marketing-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marketing-agenda-item { grid-template-columns: 1fr; }
  .marketing-agenda-item time { grid-row: auto; }
  .newsletter-preview { max-height: calc(100vh - 20px); }
  body { font-size: 16px; }
  main { padding: 16px 12px 48px; }
  .banner { padding: 8px 12px; line-height: 1.35; }
  .login { margin: 24px auto; max-width: 100%; }
  main:has(> .login) { display: block; padding: 10px; }
  main:has(> .login)::before { height: 190px; min-height: 0; border-radius: 16px 16px 0 0; background-position: center 24%; }
  main:has(> .login) > .login { max-width: none; padding: 26px 20px 36px; border-radius: 0 0 16px 16px; }
  main:has(> .login) > .login h1 { font-size: clamp(29px, 9vw, 37px); }
  .card { padding: 16px; }
  header.top { align-items: stretch; }
  header.top > .row { align-items: flex-start; gap: 12px; }
  header.top .meta { overflow-wrap: anywhere; }
  nav.tabs { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 2px 0 10px; }
  nav.tabs button { flex: 0 0 auto; white-space: nowrap; }
  button, .btn, input, select, textarea { min-height: 44px; }
  button.text-link { min-height: 44px; }
  button { line-height: 1.25; }
  .board { grid-template-columns: 1fr; }
  .customer-metrics { grid-template-columns: 1fr; }
  .cockpit-grid, .cockpit-lower { grid-template-columns: 1fr; }
  .calendar-head { align-items: flex-start; }
  .calendar-head .row { width: 100%; justify-content: space-between; }
  .calendar-grid { min-width: 630px; }
  .scroll { overflow: visible; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .responsive-table tr { margin-bottom: 10px; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
  .responsive-table td { display: grid; grid-template-columns: minmax(90px, 35%) minmax(0, 1fr); gap: 8px; padding: 7px 0; overflow-wrap: anywhere; }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-weight: 700; }
  .codes { columns: 1; }
  .qr { max-width: 100%; height: auto; }
  .retention-panel .row { display: grid; grid-template-columns: 1fr; }
  .retention-panel button, .retention-panel .warn { width: 100%; }
  .cms-actions { display: grid; grid-template-columns: 1fr; }
  .cms-actions button { width: 100%; }
}
