:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #252a30;
  background: #f5f7f8;
  font-synthesis: none;
  font-size: 14px;
  --line: #dfe4e8;
  --muted: #616c78;
}
body {
  margin: 0;
  /* Official Lilanch teal/charcoal, with a darker teal for readable controls. */
  --brand: #44a0ae;
  --action: #226875;
  --action-hover: #19505a;
  --tint: #e9f4f5;
  --sidebar: #231f20;
  --nav-active: #36484b;
}
body[data-site="lb"] {
  /* Official LB Procurement blue/black, with a darker blue for controls. */
  --brand: #149bd7;
  --action: #0878ab;
  --action-hover: #065f88;
  --tint: #e9f4fc;
  --sidebar: #0b0c0e;
  --nav-active: #173644;
}
* { box-sizing: border-box; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, main:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.sidebar {
  width: 240px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--sidebar);
  border-top: 4px solid var(--brand);
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  color: #f5f5f5;
}
.wordmark {
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 8px 2px;
  margin-bottom: 32px;
}
.wordmark img { display: block; width: 100%; height: auto; max-height: 64px; object-fit: contain; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar { overflow-y: auto; }
.nav-item { text-decoration: none; }
.nav-group summary { cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: '›'; margin-left: auto; font-size: 18px; transform: rotate(0); }
.nav-group[open] summary::after { transform: rotate(90deg); }
.nav-group.section-active summary { color: #fff; }
.nav-children { display: grid; gap: 3px; margin: 0 0 6px 25px; padding-left: 12px; border-left: 1px solid #ffffff22; }
.nav-children a { display: block; padding: 9px 12px; border-radius: 5px; color: #bfc8cc; font-size: 12px; text-decoration: none; }
.nav-children a:hover { background: #ffffff0d; color: white; }
.nav-children a.active { background: var(--nav-active); color: white; font-weight: 600; }
.nav-item {
  display: flex;
  gap: 13px;
  align-items: center;
  border: 1px solid transparent;
  text-align: left;
  background: none;
  color: #bfc8cc;
  padding: 13px 14px;
  border-radius: 6px;
}
.nav-item span { font-size: 21px; line-height: 1; width: 22px; }
.nav-item:hover { background: #ffffff0d; color: white; }
.nav-item.active { color: white; background: var(--nav-active); border-color: #ffffff16; font-weight: 600; }
.nav-item.active span { color: var(--brand); }
.sidebar-note { margin-top: auto; padding: 18px 8px 4px; font-size: 12px; color: #c4ced2; }
.sidebar-note p { color: #a4b0b5; font-size: 11px; margin: 8px 0 0; }
.safe-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #acb8be; margin-right: 5px; }
.user { display: flex; gap: 10px; align-items: center; margin-top: 22px; padding-top: 20px; border-top: 1px solid #ffffff1c; font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #ffffff15; display: grid; place-items: center; }
.user small { display: block; color: #a4b0b5; margin-top: 4px; }
.workspace { margin-left: 240px; min-width: 0; }
.topbar { height: 72px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-tabs { display: flex; height: 100%; gap: 25px; min-width: 0; }
.site-tabs button { position: relative; background: none; border: 0; border-bottom: 3px solid transparent; padding: 2px 6px 0; color: var(--muted); font-size: 14px; white-space: nowrap; }
.site-tabs button:hover { color: var(--action); }
.site-tabs button.selected { border-bottom-color: var(--brand); color: var(--action); font-weight: 650; }
.demo-tag { font-size: 11px; background: #f2f4f5; color: #65717a; padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; }
.account-actions { display: flex; align-items: center; gap: 14px; }
main { max-width: 1560px; margin: 0 auto; padding: 28px 34px 18px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
h1 { font-size: 28px; letter-spacing: -.6px; font-weight: 650; line-height: 1.2; margin: 0; }
h2 { font-weight: 600; font-size: 17px; margin: 0; }
h3 { font-size: 16px; font-weight: 600; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .7px; color: var(--muted); margin: 0 0 10px; }
.primary, .secondary { border: 1px solid var(--action); padding: 11px 17px; border-radius: 6px; background: var(--action); color: white; font-size: 13px; font-weight: 600; white-space: nowrap; }
.primary:hover { background: var(--action-hover); }
.secondary { background: #fff; color: var(--action); }
.secondary:hover { background: var(--tint); }
.notice { color: var(--muted); font-size: 12px; line-height: 1.6; margin-bottom: 24px; }
.notice.error { background: #fff0e9; color: #803d25; padding: 12px; border-radius: 5px; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 18px; margin-bottom: 24px; }
.stats article { background: white; border: 1px solid var(--line); border-top: 3px solid var(--brand); padding: 21px 23px; border-radius: 7px; }
.stats article > span { font-size: 13px; color: var(--muted); }
.stats strong { display: block; font-size: 32px; font-weight: 600; margin: 12px 0 8px; line-height: 1.2; }
.stats small { font-size: 11px; color: var(--muted); }
.pill { background: #f0f3f5; color: #56616e; font-size: 10px; font-weight: 500; padding: 5px 7px; border-radius: 4px; vertical-align: middle; margin-left: 10px; white-space: nowrap; }
.text-button { padding: 0; background: none; border: 0; color: var(--action); font-size: 12px; font-weight: 600; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.section-heading { padding: 21px 24px; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.search input { width: 240px; max-width: 100%; background: #fafbfc; font-size: 12px; }
.table-scroll { overflow: auto; position: relative; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; white-space: nowrap; }
th { font-weight: 600; color: #5e6975; background: #f8fafb; font-size: 11px; }
th, td { padding: 17px 24px; border-top: 1px solid #e9edf0; }
td strong { display: block; font-weight: 600; color: #29333d; font-size: 13px; }
td small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.status { font-size: 11px; padding: 5px 9px; border-radius: 4px; }
.draft { background: var(--tint); color: var(--action); }
.example { background: #f0f2f4; color: #5a6671; }
.page-footer { display: flex; color: var(--muted); font-size: 11px; padding: 20px 0; }
.audience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 0 24px 24px; }
.audience-card, .template { padding: 22px; border: 1px solid var(--line); border-radius: 6px; }
.audience-card h3 { margin-top: 0; }
.audience-card p, .template p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.audience-card strong { font-size: 30px; display: block; font-weight: 500; margin: 20px 0 6px; }
.audience-card small { color: var(--muted); font-size: 11px; }
.mini-email { background: var(--tint); border-radius: 5px; height: 155px; padding: 27px; display: flex; flex-direction: column; gap: 10px; }
.mini-email span { height: 5px; width: 85%; background: var(--brand); opacity: .25; border-radius: 3px; }
.mini-email span:first-child { width: 30%; margin-bottom: 9px; opacity: .8; }
.mini-email b { font-size: 16px; font-weight: 500; margin-bottom: 7px; }
.footnote { color: var(--muted); font-size: 11px; line-height: 1.7; }
.panel > .footnote { margin: 0; padding: 0 24px 24px; }
#empty-state { padding: 25px; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 28px; width: min(950px, 94vw); max-height: 90vh; color: #252a30; box-shadow: 0 25px 100px #18253330; }
dialog::backdrop { background: #15233270; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 22px; }
.dialog-heading h2 { font-size: 23px; }
.close { border: 0; background: #f0f3f5; border-radius: 50%; width: 32px; height: 32px; font-size: 23px; color: #576575; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.fields { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
input, select, textarea { border: 1px solid #cfd8df; border-radius: 5px; padding: 10px 12px; width: 100%; color: #283641; background: #fff; font-size: 13px; }
textarea { resize: vertical; line-height: 1.7; }
.preview-column { background: #f5f7f9; padding: 22px; border-radius: 6px; }
.email-preview { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 5px; overflow-wrap: anywhere; }
.email-brand { background: var(--sidebar); border-bottom: 3px solid var(--brand); padding: 16px; margin: -22px -22px 20px; }
.email-brand img { display: block; width: min(100%, 220px); height: 48px; object-fit: contain; object-position: left center; }
.email-preview h3 { font-size: 18px; line-height: 1.5; }
.email-preview p { white-space: pre-wrap; color: #53616d; font-size: 13px; line-height: 1.8; }
.email-preview hr { border: 0; border-top: 1px solid var(--line); margin-top: 25px; }
.email-preview small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.dialog-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 15px; gap: 15px; }
.dialog-footer span { font-size: 11px; color: var(--muted); }
.form-error { font-size: 12px; color: #a34529; line-height: 1.5; }
.toast { position: fixed; right: 30px; bottom: 30px; background: var(--action); color: #fff; padding: 17px 23px; border-radius: 6px; box-shadow: 0 4px 20px #102e3429; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -100px; left: 20px; padding: 12px; background: white; color: #252a30; z-index: 5; }
.skip:focus { top: 10px; }
@media (max-width: 1100px) {
  .sidebar { width: 210px; padding-inline: 14px; }
  .workspace { margin-left: 210px; }
  main { padding: 26px 24px 15px; }
  .topbar { padding-inline: 24px; }
  .stats { gap: 12px; }
  .stats article { padding: 18px; }
  .pill { display: table; margin: 9px 0 0; }
}
@media (max-width: 800px) {
  .sidebar { position: static; width: auto; padding: 16px; display: block; }
  .wordmark { width: 205px; min-height: 50px; margin-bottom: 16px; padding: 0; }
  .sidebar-note, .user { display: none; }
  .sidebar nav { display: flex; overflow: auto; gap: 3px; }
  .nav-item { padding: 10px 11px; font-size: 12px; white-space: nowrap; }
  .nav-item span { font-size: 16px; width: 16px; }
  .workspace { margin: 0; }
  .topbar { height: 58px; padding-inline: 20px; }
  .site-tabs { gap: 18px; }
  .site-tabs button { font-size: 13px; padding-inline: 0; }
  .demo-tag { font-size: 10px; }
  main { padding: 23px 20px 8px; }
  h1 { font-size: 24px; }
  .page-heading .primary { padding: 10px 12px; font-size: 12px; }
  .notice { font-size: 11px; margin-bottom: 20px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats article:last-child { grid-column: 1/-1; }
  .stats article:last-child strong { display: flex; align-items: center; gap: 15px; }
  .pill { display: inline; margin: 0; }
  .section-heading { padding: 20px; flex-wrap: wrap; }
  .section-heading .search { width: 100%; }
  .search input { width: 100%; }
  .audience-grid { grid-template-columns: 1fr; padding: 0 20px 20px; }
  .form-columns { grid-template-columns: 1fr; }
  .preview-column { padding: 15px; }
  dialog { padding: 20px; }
  .toast { left: 20px; right: 20px; bottom: 20px; }
}
@media (max-width: 370px) {
  .nav-item { gap: 6px; padding: 10px 8px; }
  .site-tabs { gap: 14px; }
  main, .topbar { padding-inline: 14px; }
}
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px; background: #edf1f4; }
.login-shell { padding: 0; width: min(100%, 480px); margin: 0; background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 45px #1526380b; }
.login-brands { background: #231f20; border-top: 4px solid var(--brand); padding: 30px 24px; display: flex; align-items: center; gap: 22px; }
.login-brands img { width: calc(50% - 20px); height: 48px; object-fit: contain; }
.login-brands span { height: 32px; width: 1px; background: #ffffff26; }
.login-content { padding: 32px 34px 24px; }
.login-content h1 { font-size: 25px; }
.login-description { color: var(--muted); font-size: 13px; margin: 10px 0 26px; }
.login-content form { display: grid; gap: 18px; }
.login-content input { padding: 12px; }
.login-content .form-error { margin: 0; }
.login-content .form-error:empty { display: none; }
.login-help { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 24px 0 0; }
.login-footer { padding: 16px 24px; border-top: 1px solid var(--line); text-align: center; font-size: 11px; color: var(--muted); }
.review-overview { padding: 24px; }
.review-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 30px; margin: 24px 0; }
.review-field { min-width: 0; }
.review-field dt { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.review-field dd { font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.review-notes { border-top: 1px solid var(--line); margin-top: 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.review-notes h3 { color: #29333d; }
.review-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.review-controls select { width: auto; }
.review-controls input { width: 245px; }
.review-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px; border-top: 1px solid var(--line); font-size: 12px; }
.review-empty { padding: 24px; color: var(--muted); font-size: 13px; }
.review-warning { color: #825118; background: #fff4dc; }
.category-filter { display: flex; align-items: center; gap: 12px; padding: 0 24px 20px; }
.category-filter select { max-width: 360px; }
.review-detail > p { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.sandbox-form { padding: 24px; }
.review-detail .sandbox-form { padding: 0; }
.editor-fields { display: grid; gap: 18px; max-width: 720px; }
.editor-preview { max-width: 720px; margin-top: 28px; }
.sandbox-form .editor-fields { width: 100%; }
.form-actions, .record-actions, .dashboard-links { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.dashboard-links a { color: var(--action); font-size: 12px; }
.client-lookup { display: grid; gap: 8px; }
.nav-group summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.legacy-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; padding: 18px; background: #f8fafb; border: 1px solid var(--line); max-height: 50vh; overflow: auto; }
#review-root td { max-width: 380px; white-space: normal; overflow-wrap: anywhere; }
#review-root td small { min-width: 200px; }
.review-stats.stats article:last-child strong { display: block; }
@media (max-width: 800px) {
  .review-controls { width: 100%; }
  .review-controls label, .review-controls input, .review-controls select { width: 100%; }
  .review-facts { grid-template-columns: 1fr; }
  .review-pager { padding: 16px; gap: 8px; }
  .review-pager .secondary { padding: 9px; }
  .category-filter { padding-inline: 20px; }
  .review-toolbar { align-items: stretch; }
  .review-stats.stats { grid-template-columns: 1fr; }
  .review-overview { padding: 20px; }
  .sidebar nav, body:has(#review-root:not([hidden])) .sidebar nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; align-items: start; }
  .nav-children { margin-left: 10px; }
  .nav-children a { white-space: normal; }
  body:has(#review-root:not([hidden])) .nav-item { gap: 7px; }
}
@media (max-width: 480px) {
  .account-actions { gap: 8px; }
  .account-actions .demo-tag { display: none; }
  .login-content { padding: 28px 24px 22px; }
  .login-brands { gap: 16px; padding-inline: 20px; }
}
