:root {
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
  color: #172d30;
  background: #f4f7f6;
  --ink: #172d30;
  --green: #125f54;
  --line: #dbe5e1;
  --muted: #455d5a;
  --paper: #fff;
  --tint: #edf4f1;
  --radius: .85rem;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: .2em; }
button, .action {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.75rem; padding: .56rem 1rem; border: 1px solid var(--green);
  border-radius: .55rem; background: var(--green); color: white; cursor: pointer;
  font-weight: 700; text-decoration: none; text-align: center;
}
button:hover, .action:hover { background: #103e38; }
.secondary { background: white; color: var(--green); }
.secondary:hover { background: var(--tint); }
button.text { padding: 0; min-height: 0; border: 0; color: inherit; background: none; text-decoration: underline; text-underline-offset: .2em; }
.skip { position: absolute; clip-path: inset(50%); }
.skip:focus { clip-path: none; left: .7rem; top: .7rem; z-index: 5; background: white; padding: .7rem; }
:focus-visible { outline: 3px solid var(--focus, #946005); outline-offset: 3px; }
.staff { min-height: 100vh; }
.brand { display: flex; gap: .7rem; align-items: flex-start; color: inherit; text-decoration: none; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.mark {
  width: 2.55rem; height: 2.55rem; display: inline-grid; place-items: center; flex: none;
  border-radius: .7rem; background: var(--green); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .045em;
}
.organization-logo, .brand-preview { object-fit: contain; background: white; }
.brand-preview { width: 7rem; height: 7rem; max-width: 100%; }
.topline { margin-bottom: 1.4rem; padding-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem 1rem; border-bottom: 1px solid var(--line); }
main { padding: 2.4rem clamp(1rem, 3.5vw, 3.5rem) 3rem; width: 100%; max-width: 88rem; min-width: 0; margin-inline: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.024em; margin: 0 0 .7rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0; font-weight: 760; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: .55rem 0 .95rem; overflow-wrap: anywhere; }
.panel {
  min-width: 0; margin: 0 0 1.15rem; padding: clamp(1rem, 2.6vw, 1.5rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 2px 6px #162e2b08;
}
.panel > :last-child { margin-bottom: 0; }
.panel:target { outline: 2px solid var(--green); outline-offset: 3px; }
.grid, .email-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.1rem; align-items: start; }
.email-preview-grid > div { min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .95rem; margin-bottom: 1.15rem; }
.metric { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1.15rem; color: var(--muted); }
.metric strong { display: block; line-height: 1.25; color: var(--green); font-size: 2rem; font-variant-numeric: tabular-nums; }
form { margin: .55rem 0 0; display: flex; flex-wrap: wrap; align-items: end; gap: .85rem; }
form label { flex: 1 1 11rem; min-width: 0; display: grid; gap: .32rem; font-weight: 650; }
form label:has(textarea) { flex: 1 1 100%; }
label.check { display: flex; align-items: flex-start; flex: 1 1 auto; font-weight: 550; gap: .55rem; }
input, textarea, select { min-width: 0; max-width: 100%; border: 1px solid #829b94; border-radius: .5rem; background: white; padding: .5rem .65rem; color: var(--ink); }
input[type=checkbox] { margin-top: .22rem; width: 1.12rem; height: 1.12rem; flex: none; accent-color: var(--green); }
input[type=hidden] { display: none; }
textarea { resize: vertical; }
.notice { padding: .85rem 1rem; background: #e4f1e9; color: #143e31; border: 1px solid #aecfbc; border-radius: .55rem; }
.notice.error, .notice:has([role=alert]) { background: #fff2ed; border-color: #e2b4a6; color: #812c20; }
.empty { color: var(--muted); margin: .5rem 0; background: #f5f8f6; padding: .8rem 1rem; border-radius: .55rem; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .94rem; }
td, th { padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td { overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f7faf8; }
th { font-size: .83rem; color: var(--muted); background: #eff5f2; font-weight: 750; white-space: nowrap; }
.badge { display: inline-block; white-space: nowrap; padding: .16rem .58rem; background: #edf1f0; color: #3f5651; border-radius: 1rem; font-size: .8rem; font-weight: 700; text-transform: capitalize; }
.badge.good { background: #e0f1e6; color: #24563c; }
.badge.pending { background: #fcf0d8; color: #6c4b10; }
.badge.failed { background: #fae8e4; color: #882d20; }
.public-header { display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid var(--line); padding: .9rem max(1rem, calc((100% - 43rem) / 2)); background: #fff; overflow-wrap: anywhere; }
.public-header { background: var(--program-header, #fff); color: var(--program-header-text, #172d30); }
[data-theme="hammond-blue"] .public-header { border-bottom: 4px solid #32b7ef; }
[data-theme="hammond-blue"] .topline h1 { font-weight: 820; }
.theme-previews { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap: 1rem; }
.theme-sample { padding: .9rem; border: 1px solid var(--line); border-radius: .65rem; background: #f4f7f6; }
.theme-sample [class="theme-action"] { display: inline-block; background: #125f54; color: #fff; border-radius: .4rem; padding: .4rem .7rem; font-weight: 700; }
.theme-sample[data-preview-theme="hammond-blue"] { background: #e6f4fd; }
.theme-sample[data-preview-theme="hammond-blue"] header { background: #142941; color: #fff; border-bottom: 3px solid #32b7ef; padding: .5rem .65rem; }
.theme-sample[data-preview-theme="hammond-blue"] header h3 { margin: 0; }
.theme-sample[data-preview-theme="hammond-blue"] .theme-action { background: #075c99; }
.volunteer main { max-width: 47rem; }
.volunteer main form { display: grid; align-items: start; }
.volunteer main form > button { justify-self: start; }
.requirements { display: grid; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.requirements li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .55rem 1rem; padding: .8rem; background: var(--tint); border-radius: .6rem; overflow-wrap: anywhere; }
.requirements p { margin: 0; }
.volunteer main input[autocomplete="one-time-code"] { max-width: 12rem; font-variant-numeric: tabular-nums; letter-spacing: .15em; }
.volunteer .sign-panel { border-top: 3px solid var(--green); }
.wording, pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f0f5f3; padding: .85rem; border-inline-start: 3px solid #91b2a4; border-radius: .35rem; }
.document-preview { margin: .7rem 0; }
.document-preview canvas { display: block; max-width: 100%; height: auto; margin: .8rem 0; border: 1px solid var(--line); }
.document-preview > a { display: inline-block; margin: .3rem .45rem; }
.policy-pages { display: grid; gap: .9rem; margin: .8rem 0; }
.policy-page { min-width: 0; scroll-margin-top: .65rem; }
.policy-page h3 { font-size: .9rem; margin-bottom: .35rem; color: var(--muted); }
.policy-page-surface { position: relative; width: 100%; background: white; box-shadow: 0 0 0 1px var(--line); }
.policy-page-surface canvas { display: block; width: 100%; height: 100%; }
.policy-page-surface .textLayer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: clip; line-height: 1; text-align: initial; text-size-adjust: none; }
.policy-page-surface .textLayer :is(span, br) { position: absolute; color: transparent; white-space: pre; cursor: text; user-select: text; transform-origin: 0 0; }
.policy-page-surface .textLayer > :not(.markedContent), .policy-page-surface .textLayer .markedContent span:not(.markedContent) {
  font-size: calc(var(--total-scale-factor) * var(--font-height));
  transform: rotate(var(--rotate, 0deg)) scaleX(var(--scale-x, 1));
}
.policy-page-surface .textLayer .markedContent { display: contents; }
.policy-page-surface .textLayer ::selection { background: #62b5ac75; }
button:disabled { opacity: .67; cursor: default; }
video { max-width: 100%; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .5rem; padding: .75rem; flex: 1 1 100%; margin: 0; }
summary { cursor: pointer; color: var(--green); font-weight: 700; }
.inline { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.stack { display: grid; gap: .55rem; }
.stack a { overflow-wrap: anywhere; }
.question { flex-basis: 100%; }
dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .4rem .9rem; }
dt { font-weight: 700; }
dd { margin: 0; overflow-wrap: anywhere; }
.preview-subject { margin-block: 1rem; }
.preview-subject strong { display: block; color: var(--muted); font-size: .83rem; }
.email-layout { background: #eff5f2; border-radius: .6rem; }
.email-layout td { padding: .75rem; border: 0; overflow-wrap: anywhere; }
.email-layout tbody tr:hover { background: transparent; }
.email-card { background: white; border-top: 4px solid var(--green); border-radius: .65rem; }
.email-card .email-card-content { padding: 1rem; }
.email-card .email-body-row { padding: .32rem 0; }
.email-brand { color: var(--green); font-weight: 750; }
.email-title { font-weight: 750; font-size: 1.17rem; }
.email-details, .email-code { padding: .6rem; background: var(--tint); border-radius: .4rem; }
.email-code { font-size: 1.3rem; font-weight: 750; letter-spacing: .12em; }
.email-footer { color: var(--muted); font-size: .82rem; }
.email-preview-button { display: inline-block; background: var(--green); color: #fff; border-radius: .5rem; padding: .65rem .85rem; font-weight: 700; }
@media (max-width: 850px) {
  main { padding-top: 1.35rem; }
}
@media (max-width: 550px) {
  .table-scroll table { min-width: 28rem; }
  .table-scroll td, .table-scroll th { padding: .58rem; }
  .volunteer main form > button { width: 100%; }
  .requirements li .action { width: 100%; }
  .volunteer main input[autocomplete="one-time-code"] { max-width: none; }
}
@media (prefers-reduced-motion: no-preference) { button, .action { transition: background-color .15s ease; } }

/* Shared workspace surfaces and actions */
:root { --paper: var(--panel, #fff); }
button, .action, .mark { color: var(--action-text, #fff); }
button:hover, .action:hover { background: var(--green); filter: brightness(.94); }
button:disabled { opacity: .56; cursor: not-allowed; }
a { color: var(--link, var(--green)); }
.secondary { color: var(--ink); background: var(--paper); }
.secondary:hover { background: var(--tint); }
.metric, input, textarea, select { background: var(--paper); }
.metric strong { color: var(--ink); }
th, tbody tr:hover, .empty { background: var(--tint); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.page-tools, .dialog-actions, .mail-controls { display:flex; gap:.65rem; align-items:end; flex-wrap:wrap; margin-block:.75rem; }
.mail-controls form { margin:0; }
.dialog-actions { justify-content:end; margin-bottom:0; }
.creation-dialog { width:min(38rem,calc(100% - 1.5rem)); max-height:calc(100dvh - 1.5rem); padding:clamp(1rem,4vw,1.8rem); border:1px solid var(--line); border-radius:var(--radius); color:var(--ink); background:var(--paper); box-shadow:0 14px 58px #14294160; }
.creation-dialog::backdrop { background:#142941a3; }
.creation-dialog form { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr)); align-items:start; }
.creation-dialog :is(fieldset,.dialog-actions,[data-dialog-error],.muted) { grid-column:1/-1; }
fieldset:has([data-choice-search]) { max-height:17rem; overflow:auto; }
fieldset label.check { padding:.2rem 0; }
[data-theme-editor] { flex:1 1 100%; display:grid; gap:.75rem; }
.color-grid { display:grid; gap:.6rem; grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr)); }
.color-control { display:flex; flex-wrap:wrap; align-items:end; gap:.4rem; }
.color-control input { width:100%; padding:.2rem; height:2.75rem; }
.theme-sample { max-width:28rem; }
.theme-sample header, .theme-sample section { padding:.7rem .9rem; }
.logo-previews { flex:1 1 100%; display:flex; flex-wrap:wrap; gap:.65rem; }
.logo-previews div { display:grid; align-content:start; gap:.45rem; padding:.65rem 1rem; border:1px solid var(--line); border-radius:.6rem; background:#fff; color:#142941; }
.logo-previews [data-logo-tone=dark] { background:#142941; color:#fff; }
.logo-previews img { background:transparent; }
.campaign-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr)); gap:1rem; }
.campaign-card h2 a { text-decoration:none; }
.completion-rate { display:flex; align-items:baseline; gap:.65rem; flex-wrap:wrap; }
.completion-rate strong { font-size:2rem; font-variant-numeric:tabular-nums; }
.campaign-card progress { width:100%; accent-color:var(--green); }
.campaign-counts { display:flex; flex-wrap:wrap; gap:.55rem 1rem; margin-block:.9rem; }
.campaign-counts div { flex:1; }
.campaign-counts dd { margin:0; font-weight:750; }
.policy-pages { display:block; height:clamp(16rem,60dvh,45rem); overflow:auto; overscroll-behavior:contain; border:1px solid var(--line); padding:8px; border-radius:.65rem; background:#e9eef4; }
.policy-page { width:max-content; min-width:100%; margin-bottom:.7rem; }
.policy-page h3 { color:#223043; }
.policy-page-surface { margin-inline:auto; }
.pdf-controls { gap:.45rem; margin:.45rem 0; }
.pdf-controls input { width:4.5rem; }
.email-preview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; }
.email-preview-grid > div { display:grid; grid-template-rows:auto 1fr; min-width:0; }
.email-preview-grid :is(pre,iframe) { box-sizing:border-box; margin:0; width:100%; height:29rem; background:#eef4f2; border:1px solid var(--line); border-radius:.6rem; overflow:auto; }
.email-preview-grid pre { color:#183332; }
.template-editor { margin-top:1rem; }
@media (max-width:760px) { .email-preview-grid { grid-template-columns:1fr; } }

/* Staff header and account navigation */
.workspace-header {
  position: sticky; inset-block-start: 0; z-index: 4;
  background: var(--program-header); color: var(--program-header-text);
  border-bottom: 1px solid color-mix(in srgb, currentColor 21%, transparent);
}
.workspace-header-inner {
  max-width: 88rem; margin-inline: auto; padding: .55rem clamp(1rem, 3.5vw, 3.5rem);
  min-height: 3.75rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem;
}
.workspace-header .brand, .platform-header .brand { align-items: center; min-width: 0; font-size: 1.06rem; }
.workspace-header .brand span:last-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.workspace-header .mark, .platform-header .mark { width: 2.25rem; height: 2.25rem; }
.workspace-header .brand:focus-visible, .workspace-toggle:focus-visible { outline-color: currentColor; }
.workspace-menu { position: relative; flex: none; }
.workspace-toggle, .workspace-toggle:hover {
  background: transparent; color: inherit; filter: none; border-color: currentColor;
  padding-inline: .78rem; min-width: 2.75rem; border-radius: .55rem;
}
.workspace-toggle[aria-expanded=true], .workspace-toggle:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.hamburger { display: inline-block; position: relative; width: 1.1rem; height: .72rem; border-block: 2px solid; }
.hamburger::after { content: ''; position: absolute; inset: calc(50% - 1px) 0 auto; border-top: 2px solid; }
.workspace-dropdown {
  position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + .65rem);
  display: grid; grid-template-rows: minmax(0,1fr) auto;
  width: min(21rem, calc(100vw - 2rem)); max-height: calc(100dvh - 5.6rem);
  background: var(--paper); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 24%, var(--paper)); border-radius: .8rem;
  box-shadow: 0 12px 30px #101c3d33; overflow: hidden;
}
.workspace-links { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: .55rem; }
.workspace-group { border-top: 1px solid color-mix(in srgb, var(--ink) 14%, var(--paper)); }
.workspace-group > summary, .workspace-link {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  min-height: 2.75rem; padding: .48rem .72rem; color: var(--ink);
  text-decoration: none; border-radius: .42rem; font-weight: 650; overflow-wrap: anywhere;
}
.workspace-group > summary { list-style: none; }
.workspace-group > summary::-webkit-details-marker { display: none; }
.workspace-group > summary::after {
  content: ''; flex: none; width: .45rem; height: .45rem;
  border-inline-end: 2px solid; border-block-end: 2px solid; transform: rotate(45deg); margin-inline-end: .2rem;
}
.workspace-group[open] > summary::after { transform: rotate(225deg); }
.workspace-group > div { padding: 0 0 .38rem .55rem; }
.workspace-link:hover, .workspace-group > summary:hover { background: var(--tint); }
.workspace-link[aria-current=page] { background: var(--tint); box-shadow: inset 3px 0 var(--green); font-weight: 780; }
.workspace-dropdown :focus-visible { outline-offset: -3px; }
.workspace-account {
  padding: .65rem .8rem; border-top: 1px solid color-mix(in srgb, var(--ink) 22%, var(--paper));
  background: var(--tint);
}
.workspace-account-row { display: flex; align-items: center; gap: .55rem; justify-content: space-between; }
.workspace-account-row strong, .workspace-account small { overflow-wrap: anywhere; }
.workspace-settings {
  display: grid; place-items: center; flex: none; border-radius: .45rem;
  width: 2.75rem; height: 2.75rem; color: var(--ink); background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 32%, var(--paper));
}
.workspace-settings:hover, .workspace-settings[aria-current=page] { border-color: var(--ink); }
.workspace-sign-out, .workspace-sign-out:hover {
  color: var(--ink); background: transparent; border-color: transparent; min-height: 2.75rem; padding-inline: .38rem;
}
.workspace-sign-out:hover { background: var(--paper); }
.workspace-sign-out-status { margin: 0 .3rem .35rem; font-size: .9rem; }
.workspace-account small { display: block; }
.staff main, .staff .panel[id] { scroll-margin-top: 4.75rem; }
@media (max-width: 480px) {
  .workspace-toggle-label { display: none; }
  .workspace-toggle { padding-inline: .6rem; }
}

/* Signed-out product pages */
.platform {
  --ink: #17263b; --muted: #475569; --green: #234d91; --link: #1f4789; --focus: #234d91;
  --tint: #edf2fa; --line: #d6e0ef; color: var(--ink); min-height: 100vh;
  background: linear-gradient(145deg, #edf3fb, #f9fbff 56%, #eef3f9);
}
.platform-header { display: flex; align-items: center; padding: .7rem max(1rem, calc((100% - 74rem) / 2)); border-bottom: 1px solid var(--line); background: white; }
.platform main { max-width: 48rem; }
.platform .sign-in-page {
  width: min(29rem, calc(100% - 2rem)); margin-block: clamp(1.3rem, 8vh, 6rem) 2rem;
  padding: clamp(1.25rem, 6vw, 2.5rem); border: 1px solid var(--line); border-radius: 1rem;
  background: white; box-shadow: 0 10px 34px #20365912;
}
.sign-in-page .topline { border: 0; margin: 0; padding: 0; }
.sign-in-page h1 { font-size: clamp(1.65rem, 6vw, 2.1rem); }
.sign-in-instructions { color: var(--muted); margin-block: .65rem 1.2rem; }
.sign-in-page [data-sign-in] { width: 100%; }
.sign-in-status:empty { margin: 0; }
.invitation-note { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.invitation-note p { color: var(--muted); margin: .3rem 0 0; }

/* Keep desktop navigation visible beside the workspace. */
.staff-sidebar { display: none; }
@media (min-width: 851px) {
  .staff { display: grid; grid-template-columns: 15rem minmax(0, 1fr); }
  .workspace-header { display: none; }
  .staff-sidebar {
    display: flex; flex-direction: column; gap: 1.35rem; padding: 1.55rem 1rem;
    background: var(--program-header); color: var(--program-header-text);
    border-inline-end: 1px solid var(--line);
  }
  [data-theme="hammond-blue"] .staff-sidebar { border-top: 4px solid #32b7ef; }
  .staff-sidebar .brand small { display: block; margin-block-start: .3rem; font-size: .76rem; font-weight: 500; }
  .staff-sidebar nav {
    display: grid; gap: .2rem; padding-block: .7rem;
    border-block: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  }
  .staff-sidebar .workspace-link {
    min-height: auto; padding: .5rem .7rem; color: inherit; font-size: .92rem;
  }
  .staff-sidebar .workspace-link:hover, .staff-sidebar .workspace-link[aria-current="page"] {
    color: var(--ink); background: var(--paper);
  }
  .staff-sidebar :focus-visible { outline-color: currentColor; }
  .sidebar-account { display: grid; justify-items: start; gap: .34rem; font-size: .88rem; overflow-wrap: anywhere; }
  .sidebar-account .workspace-link, .sidebar-account .workspace-sign-out {
    display: block; min-height: auto; padding: .2rem 0; color: inherit; text-decoration: underline;
  }
  .sidebar-account .workspace-sign-out:hover, .sidebar-account .workspace-link:hover { color: var(--ink); background: var(--paper); }
  .staff main, .staff .panel[id] { scroll-margin-top: .75rem; }
}
