:root {
  color-scheme: light dark;
  --ink: #13201f;
  --muted: #5d6a66;
  --paper: #f8fbf7;
  --line: rgba(19, 32, 31, 0.12);
  --teal: #0f8f86;
  --teal-dark: #0a5f59;
  --coral: #ff6b57;
  --gold: #e6b451;
  --graphite: #151a1d;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(6, 22, 21, 0.22);
  --zola-letter-bg: image-set(
    url("/static/zola-letter-bg.webp") type("image/webp"),
    url("/static/zola-letter-bg.png") type("image/png")
  );
  --home-bg: #eef4ef;
  --hero-bg: #eef4ef;
  --hero-border: rgba(19, 32, 31, 0.12);
  --hero-overlay:
    linear-gradient(90deg, rgba(247, 252, 248, 0.94), rgba(247, 252, 248, 0.78) 46%, rgba(247, 252, 248, 0.34)),
    radial-gradient(circle at 76% 22%, rgba(255, 107, 87, 0.14), transparent 25%),
    radial-gradient(circle at 38% 88%, rgba(15, 143, 134, 0.16), transparent 34%);
  --grid-line: rgba(19, 32, 31, 0.06);
  --grid-mask: linear-gradient(180deg, rgba(0, 0, 0, 0.36), transparent 72%);
  --topbar-text: rgba(19, 32, 31, 0.82);
  --hero-text: #14211f;
  --hero-copy-muted: rgba(19, 32, 31, 0.72);
  --eyebrow-color: #0d7b72;
  --chip-text: rgba(19, 32, 31, 0.78);
  --chip-bg: rgba(255, 255, 255, 0.54);
  --chip-border: rgba(19, 32, 31, 0.14);
  --panel-bg: rgba(255, 255, 255, 0.5);
  --panel-border: rgba(19, 32, 31, 0.14);
  --panel-text: #13201f;
  --panel-muted: rgba(19, 32, 31, 0.68);
  --input-bg: rgba(255, 255, 255, 0.64);
  --input-text: #13201f;
  --input-border: rgba(19, 32, 31, 0.16);
  --divider-line: rgba(19, 32, 31, 0.14);
  --google-bg: #ffffff;
  --google-text: #071211;
  --footer-bg: #edf4ef;
  --footer-text: rgba(19, 32, 31, 0.68);
  --footer-strong: #13201f;
  --footer-link: #086f67;
  --legal-bg:
    linear-gradient(135deg, rgba(247, 252, 248, 0.94), rgba(235, 244, 239, 0.9)),
    var(--zola-letter-bg) center / cover fixed;
  --legal-shell-bg: rgba(255, 255, 255, 0.78);
  --legal-text: #13201f;
  --legal-muted: rgba(19, 32, 31, 0.72);
  --legal-border: rgba(19, 32, 31, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --home-bg: #071211;
    --hero-bg: #091614;
    --hero-border: rgba(255, 255, 255, 0.13);
    --hero-overlay:
      linear-gradient(90deg, rgba(5, 12, 11, 0.92), rgba(9, 16, 14, 0.72) 46%, rgba(9, 16, 14, 0.26)),
      radial-gradient(circle at 76% 22%, rgba(255, 107, 87, 0.16), transparent 25%),
      radial-gradient(circle at 38% 88%, rgba(15, 143, 134, 0.18), transparent 34%);
    --grid-line: rgba(255, 255, 255, 0.055);
    --grid-mask: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 72%);
    --topbar-text: rgba(255, 255, 255, 0.88);
    --hero-text: #f4fbf8;
    --hero-copy-muted: rgba(244, 251, 248, 0.76);
    --eyebrow-color: #7be0ce;
    --chip-text: rgba(255, 255, 255, 0.82);
    --chip-bg: rgba(255, 255, 255, 0.06);
    --chip-border: rgba(255, 255, 255, 0.18);
    --panel-bg: rgba(6, 19, 18, 0.5);
    --panel-border: rgba(255, 255, 255, 0.18);
    --panel-text: #f7fffb;
    --panel-muted: rgba(255, 255, 255, 0.7);
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-text: #ffffff;
    --input-border: rgba(255, 255, 255, 0.18);
    --divider-line: rgba(255, 255, 255, 0.15);
    --google-bg: #f8fffb;
    --google-text: #071211;
    --footer-bg: #071211;
    --footer-text: rgba(244, 251, 248, 0.72);
    --footer-strong: #f7fffb;
    --footer-link: #92e9d8;
    --legal-bg:
      linear-gradient(135deg, rgba(7, 18, 17, 0.96), rgba(14, 30, 28, 0.94)),
      var(--zola-letter-bg) center / cover fixed;
    --legal-shell-bg: rgba(6, 19, 18, 0.78);
    --legal-text: #f7fffb;
    --legal-muted: rgba(247, 255, 251, 0.76);
    --legal-border: rgba(255, 255, 255, 0.14);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --home-bg: #eef4ef;
  --hero-bg: #eef4ef;
  --hero-border: rgba(19, 32, 31, 0.12);
  --hero-overlay:
    linear-gradient(90deg, rgba(247, 252, 248, 0.94), rgba(247, 252, 248, 0.78) 46%, rgba(247, 252, 248, 0.34)),
    radial-gradient(circle at 76% 22%, rgba(255, 107, 87, 0.14), transparent 25%),
    radial-gradient(circle at 38% 88%, rgba(15, 143, 134, 0.16), transparent 34%);
  --grid-line: rgba(19, 32, 31, 0.06);
  --grid-mask: linear-gradient(180deg, rgba(0, 0, 0, 0.36), transparent 72%);
  --topbar-text: rgba(19, 32, 31, 0.82);
  --hero-text: #14211f;
  --hero-copy-muted: rgba(19, 32, 31, 0.72);
  --eyebrow-color: #0d7b72;
  --chip-text: rgba(19, 32, 31, 0.78);
  --chip-bg: rgba(255, 255, 255, 0.54);
  --chip-border: rgba(19, 32, 31, 0.14);
  --panel-bg: rgba(255, 255, 255, 0.5);
  --panel-border: rgba(19, 32, 31, 0.14);
  --panel-text: #13201f;
  --panel-muted: rgba(19, 32, 31, 0.68);
  --input-bg: rgba(255, 255, 255, 0.64);
  --input-text: #13201f;
  --input-border: rgba(19, 32, 31, 0.16);
  --divider-line: rgba(19, 32, 31, 0.14);
  --google-bg: #ffffff;
  --google-text: #071211;
  --footer-bg: #edf4ef;
  --footer-text: rgba(19, 32, 31, 0.68);
  --footer-strong: #13201f;
  --footer-link: #086f67;
  --legal-bg:
    linear-gradient(135deg, rgba(247, 252, 248, 0.94), rgba(235, 244, 239, 0.9)),
    var(--zola-letter-bg) center / cover fixed;
  --legal-shell-bg: rgba(255, 255, 255, 0.78);
  --legal-text: #13201f;
  --legal-muted: rgba(19, 32, 31, 0.72);
  --legal-border: rgba(19, 32, 31, 0.12);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --home-bg: #071211;
  --hero-bg: #091614;
  --hero-border: rgba(255, 255, 255, 0.13);
  --hero-overlay:
    linear-gradient(90deg, rgba(5, 12, 11, 0.92), rgba(9, 16, 14, 0.72) 46%, rgba(9, 16, 14, 0.26)),
    radial-gradient(circle at 76% 22%, rgba(255, 107, 87, 0.16), transparent 25%),
    radial-gradient(circle at 38% 88%, rgba(15, 143, 134, 0.18), transparent 34%);
  --grid-line: rgba(255, 255, 255, 0.055);
  --grid-mask: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 72%);
  --topbar-text: rgba(255, 255, 255, 0.88);
  --hero-text: #f4fbf8;
  --hero-copy-muted: rgba(244, 251, 248, 0.76);
  --eyebrow-color: #7be0ce;
  --chip-text: rgba(255, 255, 255, 0.82);
  --chip-bg: rgba(255, 255, 255, 0.06);
  --chip-border: rgba(255, 255, 255, 0.18);
  --panel-bg: rgba(6, 19, 18, 0.5);
  --panel-border: rgba(255, 255, 255, 0.18);
  --panel-text: #f7fffb;
  --panel-muted: rgba(255, 255, 255, 0.7);
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-text: #ffffff;
  --input-border: rgba(255, 255, 255, 0.18);
  --divider-line: rgba(255, 255, 255, 0.15);
  --google-bg: #f8fffb;
  --google-text: #071211;
  --footer-bg: #071211;
  --footer-text: rgba(244, 251, 248, 0.72);
  --footer-strong: #f7fffb;
  --footer-link: #92e9d8;
  --legal-bg:
    linear-gradient(135deg, rgba(7, 18, 17, 0.96), rgba(14, 30, 28, 0.94)),
    var(--zola-letter-bg) center / cover fixed;
  --legal-shell-bg: rgba(6, 19, 18, 0.78);
  --legal-text: #f7fffb;
  --legal-muted: rgba(247, 255, 251, 0.76);
  --legal-border: rgba(255, 255, 255, 0.14);
}

:root,
:root[data-theme="light"] {
  --admin-bg: #eef4ef;
  --admin-topbar-bg: rgba(248, 251, 247, 0.92);
  --admin-sidebar-bg: #f7faf6;
  --admin-sidebar-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 250, 246, 0.94));
  --admin-surface: #ffffff;
  --admin-surface-soft: #f9fbf8;
  --admin-surface-raised: #ffffff;
  --admin-nav-text: #50615d;
  --admin-active-bg: #e4f3ef;
  --admin-button-text: #041615;
  --admin-success-text: #075d55;
  --admin-success-bg: #e4f8f2;
  --admin-success-border: #b7eadb;
  --admin-warn-text: #7a4312;
  --admin-warn-strong: #ad6a00;
  --admin-warn-bg: #fff5e4;
  --admin-warn-border: rgba(163, 95, 32, 0.28);
  --admin-error-text: #8b2a1d;
  --admin-error-bg: #ffe9e5;
  --admin-error-border: #ffc5bb;
  --admin-info-text: #36535a;
  --admin-info-bg: #e8eff1;
  --admin-code-bg: #f6f8f4;
  --admin-shadow: 0 12px 28px rgba(22, 41, 37, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4fbf8;
    --muted: #a9bbb5;
    --paper: #071211;
    --line: rgba(244, 251, 248, 0.14);
    --teal: #7be0ce;
    --teal-dark: #92e9d8;
    --admin-bg: #071211;
    --admin-topbar-bg: rgba(8, 17, 16, 0.94);
    --admin-sidebar-bg: #091614;
    --admin-sidebar-glass: linear-gradient(180deg, rgba(17, 32, 29, 0.92), rgba(9, 22, 20, 0.98));
    --admin-surface: #0f1e1b;
    --admin-surface-soft: #132622;
    --admin-surface-raised: #142824;
    --admin-nav-text: #b5c6c0;
    --admin-active-bg: rgba(123, 224, 206, 0.16);
    --admin-button-text: #041615;
    --admin-success-text: #9df2df;
    --admin-success-bg: rgba(28, 126, 103, 0.22);
    --admin-success-border: rgba(123, 224, 206, 0.42);
    --admin-warn-text: #ffd995;
    --admin-warn-strong: #ffd28a;
    --admin-warn-bg: rgba(173, 106, 0, 0.2);
    --admin-warn-border: rgba(242, 210, 140, 0.4);
    --admin-error-text: #ffb8aa;
    --admin-error-bg: rgba(139, 42, 29, 0.24);
    --admin-error-border: rgba(255, 151, 132, 0.42);
    --admin-info-text: #b7dae3;
    --admin-info-bg: rgba(75, 118, 129, 0.24);
    --admin-code-bg: #0b1715;
    --admin-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  }
}

:root[data-theme="dark"] {
  --ink: #f4fbf8;
  --muted: #a9bbb5;
  --paper: #071211;
  --line: rgba(244, 251, 248, 0.14);
  --teal: #7be0ce;
  --teal-dark: #92e9d8;
  --admin-bg: #071211;
  --admin-topbar-bg: rgba(8, 17, 16, 0.94);
  --admin-sidebar-bg: #091614;
  --admin-sidebar-glass: linear-gradient(180deg, rgba(17, 32, 29, 0.92), rgba(9, 22, 20, 0.98));
  --admin-surface: #0f1e1b;
  --admin-surface-soft: #132622;
  --admin-surface-raised: #142824;
  --admin-nav-text: #b5c6c0;
  --admin-active-bg: rgba(123, 224, 206, 0.16);
  --admin-button-text: #041615;
  --admin-success-text: #9df2df;
  --admin-success-bg: rgba(28, 126, 103, 0.22);
  --admin-success-border: rgba(123, 224, 206, 0.42);
  --admin-warn-text: #ffd995;
  --admin-warn-strong: #ffd28a;
  --admin-warn-bg: rgba(173, 106, 0, 0.2);
  --admin-warn-border: rgba(242, 210, 140, 0.4);
  --admin-error-text: #ffb8aa;
  --admin-error-bg: rgba(139, 42, 29, 0.24);
  --admin-error-border: rgba(255, 151, 132, 0.42);
  --admin-info-text: #b7dae3;
  --admin-info-bg: rgba(75, 118, 129, 0.24);
  --admin-code-bg: #0b1715;
  --admin-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

:root[data-admin-contrast="warn"] {
  --muted: color-mix(in srgb, var(--ink), var(--admin-bg) 22%);
  --admin-nav-text: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 0.08rem 0.28rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.88em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home-body {
  min-height: 100vh;
  background: var(--home-bg);
}

.hero-shell {
  min-height: 100vh;
  padding: clamp(14px, 2vw, 26px);
}

.hero {
  position: relative;
  min-height: calc(100vh - clamp(28px, 4vw, 52px));
  overflow: hidden;
  border: 1px solid var(--hero-border);
  border-radius: 8px;
  background: var(--hero-bg);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--zola-letter-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(0.95) contrast(1.04);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-overlay);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: var(--grid-mask);
}

.topbar,
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  padding: 22px clamp(18px, 4vw, 48px);
  color: var(--topbar-text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.home-body .topbar .brand > span:not(.brand-logo-frame) {
  display: inline-flex;
  align-items: center;
  height: 34px;
  font-size: 34px;
  line-height: 34px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #06211e;
  background: linear-gradient(135deg, #eafff5, #55e0ca 58%, #ffb26e);
  box-shadow: 0 10px 24px rgba(34, 218, 191, 0.28);
}

.brand.dark .brand-mark {
  box-shadow: none;
}

.brand-logo-frame {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(34, 218, 191, 0.2);
}

.brand.dark .brand-logo-frame {
  box-shadow: none;
}

.zuola-logo {
  display: block;
  width: 24px;
  height: 24px;
}

.nav-status,
.admin-account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--topbar-text);
  font-size: 0.92rem;
}

.nav-status a,
.admin-account a {
  border: 1px solid currentColor;
  border-radius: 7px;
  padding: 0.42rem 0.7rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 430px);
  gap: clamp(24px, 5vw, 76px);
  align-items: center;
  min-height: calc(100vh - 118px);
  padding: 26px clamp(18px, 4vw, 48px) 56px;
}

.hero-copy {
  max-width: 760px;
  color: var(--hero-text);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--eyebrow-color);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.workspace-header h1 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 8.5ch;
  font-size: clamp(3.1rem, 8vw, 7.6rem);
  line-height: 0.94;
}

.home-title .title-line {
  display: block;
}

html[lang="en"] .hero h1 {
  max-width: 12ch;
  font-size: 5.35rem;
  line-height: 0.96;
}

html[lang="en"] .home-title .title-line:first-child {
  white-space: nowrap;
}

.lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--hero-copy-muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.signal-row span {
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 0.46rem 0.72rem;
  color: var(--chip-text);
  background: var(--chip-bg);
  backdrop-filter: blur(12px);
}

.access-panel {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0;
  color: var(--panel-text);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  overflow: hidden;
  user-select: auto;
}

.access-panel.is-floating {
  position: fixed;
  z-index: 20;
  max-width: calc(100vw - 24px);
  margin: 0;
}

.window-titlebar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-bottom: 1px solid color-mix(in srgb, var(--panel-border), transparent 18%);
  padding: 0 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    color-mix(in srgb, var(--panel-bg), rgba(255, 255, 255, 0.14) 20%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.window-titlebar:active {
  cursor: grabbing;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.window-controls span {
  display: block;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.window-controls span:nth-child(1) {
  background: #ff5f57;
}

.window-controls span:nth-child(2) {
  background: #febc2e;
}

.window-controls span:nth-child(3) {
  background: #28c840;
}

.window-title {
  justify-self: center;
  min-width: 0;
  color: var(--panel-muted);
  font-size: 0.78rem;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-body[data-window-chrome="windows"] .window-titlebar {
  grid-template-columns: 1fr auto;
  min-height: 36px;
  padding: 0 0 0 12px;
}

.home-body[data-window-chrome="windows"] .window-title {
  justify-self: start;
}

.home-body[data-window-chrome="windows"] .window-controls {
  order: 2;
  align-self: stretch;
  gap: 0;
}

.home-body[data-window-chrome="windows"] .window-controls span {
  width: 46px;
  height: 36px;
  border: 0;
  border-left: 1px solid color-mix(in srgb, var(--panel-border), transparent 20%);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
}

.home-body[data-window-chrome="windows"] .window-controls span::before,
.home-body[data-window-chrome="windows"] .window-controls span::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
}

.home-body[data-window-chrome="windows"] .window-controls span:nth-child(1)::before {
  width: 10px;
  height: 1px;
  background: var(--panel-muted);
}

.home-body[data-window-chrome="windows"] .window-controls span:nth-child(2)::before {
  width: 10px;
  height: 8px;
  border: 1px solid var(--panel-muted);
}

.home-body[data-window-chrome="windows"] .window-controls span:nth-child(3)::before,
.home-body[data-window-chrome="windows"] .window-controls span:nth-child(3)::after {
  width: 13px;
  height: 1px;
  background: var(--panel-muted);
}

.home-body[data-window-chrome="windows"] .window-controls span:nth-child(3)::before {
  transform: rotate(45deg);
}

.home-body[data-window-chrome="windows"] .window-controls span:nth-child(3)::after {
  transform: rotate(-45deg);
}

.home-body[data-window-chrome="windows"] .window-controls span:nth-child(3):hover {
  background: rgba(232, 17, 35, 0.72);
}

.home-body[data-window-chrome="windows"] .window-controls span:nth-child(3):hover::before,
.home-body[data-window-chrome="windows"] .window-controls span:nth-child(3):hover::after {
  background: #fff;
}

.access-panel-content {
  padding: clamp(18px, 3vw, 28px);
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.panel-heading p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--panel-muted);
}

.notice {
  margin-bottom: 14px;
  border-radius: 7px;
  padding: 0.78rem 0.9rem;
  font-size: 0.95rem;
}

.notice.success {
  border: 1px solid rgba(123, 224, 206, 0.45);
  background: rgba(15, 143, 134, 0.18);
}

.notice.error {
  border: 1px solid rgba(255, 107, 87, 0.45);
  background: rgba(255, 107, 87, 0.16);
}

.completion-card {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(123, 224, 206, 0.5);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 32px);
  background:
    linear-gradient(135deg, rgba(123, 224, 206, 0.2), rgba(242, 210, 140, 0.15)),
    rgba(255, 255, 255, 0.08);
}

.completion-card.confirmed {
  border-color: rgba(242, 210, 140, 0.56);
  background:
    linear-gradient(135deg, rgba(242, 210, 140, 0.22), rgba(123, 224, 206, 0.14)),
    rgba(255, 255, 255, 0.08);
}

.completion-card h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.completion-lead {
  margin: 0;
  color: var(--panel-text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.webmail-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(123, 224, 206, 0.62);
  border-radius: 8px;
  padding: 0.72rem 0.9rem;
  color: #061616;
  background: var(--accent);
  font-weight: 820;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.webmail-action:hover {
  filter: brightness(1.04);
}

.completion-steps {
  display: grid;
  gap: 8px;
}

.completion-steps span {
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  padding: 0.74rem 0.82rem;
  color: var(--panel-text);
  background: rgba(255, 255, 255, 0.08);
}

.retry-panel {
  margin-top: 16px;
  border-top: 1px solid var(--divider-line);
  padding-top: 14px;
}

.retry-panel summary {
  color: var(--panel-muted);
  cursor: pointer;
  font-weight: 760;
}

.retry-panel summary:hover {
  color: var(--panel-text);
}

.retry-content {
  margin-top: 16px;
}

.google-button,
.subscribe-form button,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.google-button {
  gap: 10px;
  color: var(--google-text);
  background: var(--google-bg);
}

.google-button.disabled {
  pointer-events: none;
  opacity: 0.64;
}

.google-dot {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: conic-gradient(from 45deg, #4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
  font-size: 0.78rem;
  font-weight: 900;
}

.hint {
  margin: 12px 0 0;
  color: var(--panel-muted);
  font-size: 0.9rem;
}

.confirm-note {
  margin: 12px 0 0;
  color: var(--panel-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: var(--panel-muted);
  font-size: 0.84rem;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--divider-line);
}

.subscribe-form {
  display: grid;
  gap: 10px;
}

.subscribe-form label {
  display: grid;
  gap: 6px;
  color: var(--panel-muted);
  font-size: 0.88rem;
}

.subscribe-form .optional-name-field[hidden] {
  display: none !important;
}

.subscribe-form input,
.subscribe-form select {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 7px;
  padding: 0.84rem 0.86rem;
  color: var(--input-text);
  background: var(--input-bg);
  font-size: 1rem;
  outline: none;
}

.subscribe-form input::placeholder {
  color: color-mix(in srgb, var(--input-text) 58%, transparent);
  font-size: 1.02rem;
}

.subscribe-form input:focus,
.subscribe-form select:focus {
  border-color: #7be0ce;
}

.subscribe-form button,
.primary-action {
  color: #041615;
  background: linear-gradient(135deg, #7be0ce, #f2d28c 92%);
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 48px) 28px;
  color: var(--footer-text);
  background: var(--footer-bg);
  font-size: 0.9rem;
}

.public-footer div,
.public-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.public-footer .footer-brand {
  flex-wrap: nowrap;
}

.footer-wordmark {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.public-footer strong {
  color: var(--footer-strong);
}

.public-footer a {
  color: var(--footer-link);
}

.mode-toggle {
  border: 1px solid color-mix(in srgb, var(--footer-text), transparent 55%);
  border-radius: 999px;
  padding: 3px;
}

.mode-toggle .mode-btn {
  border: 0;
  background: transparent;
  display: inline-grid;
  width: 32px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: var(--footer-text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.mode-toggle .mode-btn.active {
  color: var(--footer-strong);
  background: color-mix(in srgb, var(--footer-link), transparent 78%);
}

.legal-body {
  min-height: 100vh;
  background: var(--legal-bg);
  color: var(--legal-text);
}

.legal-topbar {
  padding: 22px clamp(18px, 4vw, 48px);
}

.legal-shell {
  width: min(840px, calc(100% - 36px));
  margin: 24px auto 48px;
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
  background: var(--legal-shell-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.legal-shell h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.legal-shell h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.legal-shell section {
  margin-top: 28px;
}

.legal-shell p {
  margin: 0;
  color: var(--legal-muted);
}

.legal-shell a {
  color: var(--footer-link);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-actions form {
  margin: 0;
}

.status-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--footer-link), transparent 55%);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--google-text) !important;
  background: var(--gold);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.updated {
  margin-top: 10px !important;
  color: var(--legal-muted) !important;
}

.campaign-web {
  width: min(900px, calc(100% - 36px));
}

.archive-shell {
  width: min(900px, calc(100% - 36px));
}

.archive-list {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.archive-item {
  padding: 18px 0 20px;
  border-top: 1px solid var(--legal-border);
}

.archive-item time {
  color: var(--legal-muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.archive-item h2 {
  margin: 7px 0 8px;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.2;
}

.archive-item h2 a {
  color: var(--legal-text);
}

.archive-item p {
  margin: 0;
  color: var(--legal-muted);
  line-height: 1.72;
}

.archive-empty {
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--legal-border);
}

.campaign-content {
  margin-top: 30px;
  color: var(--legal-text);
}

.campaign-content p,
.campaign-content li {
  color: var(--legal-text);
}

.campaign-content img {
  max-width: 100%;
  height: auto;
}

.campaign-content pre {
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: var(--legal-text);
}

.article-subscribe {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: clamp(16px, 4vw, 32px);
  align-items: start;
  margin-top: clamp(34px, 7vw, 64px);
  padding-top: clamp(22px, 4vw, 34px);
  border-top: 1px solid var(--legal-border);
}

.article-subscribe h2 {
  margin-top: 0;
}

.article-subscribe p {
  margin-bottom: 0;
  color: var(--legal-muted);
}

.article-subscribe-form {
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--legal-shell-bg) 74%, transparent);
}

.legal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-body {
  min-height: 100vh;
  background: var(--admin-bg);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(16px, 3vw, 30px);
  background: var(--admin-topbar-bg);
  backdrop-filter: blur(18px);
}

.admin-body {
  --admin-sidebar-width: 156px;
  --admin-topbar-offset: 65px;
}

html[lang="zh-Hant"] .admin-body,
html[lang="zh-Hans"] .admin-body {
  --admin-sidebar-width: 160px;
}

.admin-main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

.admin-main-nav a {
  flex: 0 0 auto;
  border-radius: 7px;
  padding: 0.52rem 0.74rem;
  color: var(--admin-nav-text);
  font-size: 0.92rem;
  font-weight: 760;
}

html[lang="zh-Hant"] .admin-main-nav a,
html[lang="zh-Hans"] .admin-main-nav a {
  font-size: 1rem;
  font-weight: 820;
}

.admin-main-nav a:hover,
.overview-page .admin-main-nav .nav-overview,
.audience-page .admin-main-nav .nav-audience,
.lists-page .admin-main-nav .nav-audience,
.segments-page .admin-main-nav .nav-audience,
.suppression-page .admin-main-nav .nav-audience,
.subscribers-page .admin-main-nav .nav-audience,
.campaigns-page .admin-main-nav .nav-campaigns,
.scheduled-page .admin-main-nav .nav-campaigns,
.reports-page .admin-main-nav .nav-campaigns,
.templates-page .admin-main-nav .nav-campaigns,
.outbox-page .admin-main-nav .nav-outbox,
.security-page .admin-main-nav .nav-settings,
.settings-page .admin-main-nav .nav-settings {
  color: var(--teal-dark);
  background: var(--admin-active-bg);
}

.admin-account {
  justify-content: flex-end;
  color: var(--muted);
}

.admin-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.admin-lang-switch a {
  border: 0;
  border-radius: 5px;
  padding: 0.28rem 0.42rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.admin-lang-switch a[aria-current="true"] {
  color: var(--teal-dark);
  background: var(--admin-active-bg);
}

.admin-layout {
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 18px 10px;
  background: var(--admin-sidebar-bg);
}

.admin-sidebar {
  position: sticky;
  top: var(--admin-topbar-offset);
  align-self: start;
  max-height: calc(100vh - var(--admin-topbar-offset));
  overflow: auto;
  background:
    var(--admin-sidebar-glass),
    var(--admin-sidebar-bg);
}

.sidebar-section + .sidebar-section {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.sidebar-section span {
  display: block;
  padding: 0 0.62rem 0.5rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-group {
  display: grid;
  gap: 6px;
}

.sidebar-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 7px;
  padding: 0.54rem 0.62rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.sidebar-group summary::-webkit-details-marker {
  display: none;
}

.sidebar-group summary::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
}

.sidebar-group[open] summary {
  color: var(--ink);
}

.sidebar-group[open] summary::after {
  content: "-";
}

html[lang="zh-Hant"] .sidebar-section span,
html[lang="zh-Hans"] .sidebar-section span,
html[lang="zh-Hant"] .sidebar-group summary,
html[lang="zh-Hans"] .sidebar-group summary {
  font-size: 1.08rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.18;
  text-transform: none;
}

.sidebar a {
  display: block;
  border-radius: 7px;
  padding: 0.68rem 0.62rem;
  color: var(--admin-nav-text);
  font-size: 0.88rem;
  font-weight: 690;
}

html[lang="zh-Hant"] .sidebar a,
html[lang="zh-Hans"] .sidebar a {
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.18;
}

.sidebar a.active,
.sidebar a:hover,
.overview-page .sidebar .nav-overview,
.lists-page .sidebar .nav-lists,
.segments-page .sidebar .nav-segments,
.suppression-page .sidebar .nav-suppression,
.campaigns-page .sidebar .nav-campaigns,
.scheduled-page .sidebar .nav-scheduled,
.reports-page .sidebar .nav-reports,
.templates-page .sidebar .nav-templates,
.subscribers-page .sidebar .nav-subscribers,
.outbox-page .sidebar .nav-outbox,
.security-page .sidebar .nav-security,
.settings-page .sidebar .nav-settings {
  color: var(--teal-dark);
  background: var(--admin-active-bg);
}

.sidebar-subnav a {
  margin-bottom: 6px;
  border: 1px solid transparent;
  padding: 0.62rem 0.62rem;
  font-size: 0.88rem;
}

.sidebar-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 10px;
  padding: 0;
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
  scroll-margin-top: 82px;
}

.sidebar-action summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.86rem 0.9rem;
  color: var(--ink);
  cursor: pointer;
  font-weight: 820;
}

.sidebar-action summary::after {
  content: "+";
  color: var(--muted);
  min-width: 1.5rem;
  text-align: center;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 900;
}

.sidebar-action[open] summary::after {
  content: "-";
}

.sidebar-action p {
  margin: 0;
  padding: 0 0.9rem 0.75rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.sidebar-action label,
.sidebar-action form,
.sidebar-action .compact-form {
  display: grid;
  gap: 7px;
  padding: 0 0.9rem 0.9rem;
}

.sidebar-action label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.sidebar-action input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.62rem 0.68rem;
  color: var(--ink);
  background: var(--admin-surface-soft);
  font: inherit;
}

.sidebar-action button {
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 0.72rem 0.72rem;
  color: var(--admin-button-text);
  background: linear-gradient(135deg, #7be0ce, #f2d28c 92%);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.sidebar-action button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.sidebar-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0.9rem 0.9rem;
}

.sidebar-stats span {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.42rem 0.48rem;
  color: var(--muted);
  background: var(--admin-surface-soft);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.sidebar-stats strong {
  color: var(--ink);
}

.workspace {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
  padding-top: 10px;
}

.campaigns-page .workspace {
  padding-top: 10px;
}

.main-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.main-left,
.main-right {
  min-width: 0;
}

.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.campaigns-page .workspace-header {
  margin-bottom: 10px;
}

.workspace-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw, 2.35rem);
  line-height: 1.08;
}

.workspace-header .eyebrow {
  color: var(--teal-dark);
}

.primary-action {
  width: auto;
  min-height: 42px;
  padding: 0 1rem;
}

.status-strip,
.metrics,
.setup-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.status-item,
.metrics article,
.work-surface,
.setup-notes article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--admin-surface);
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.82rem 0.95rem;
}

.status-item span {
  color: var(--muted);
}

.status-item.ok strong {
  color: var(--teal-dark);
}

.status-item.warn strong {
  color: var(--admin-warn-strong);
}

.metrics {
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metrics article {
  padding: 18px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 2.2rem;
  line-height: 1;
}

.compact-metrics article {
  padding: 12px 14px;
}

.compact-metrics strong {
  margin-top: 6px;
  font-size: 1.55rem;
}

.report-context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px 18px;
}

.report-context-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 0.95rem;
  background: var(--admin-surface-soft);
  min-width: 0;
}

.report-context-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-context-grid strong {
  display: block;
  margin-top: 0.32rem;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.report-context-grid p {
  margin: 0.36rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.work-surface {
  margin-top: 12px;
  overflow: hidden;
}

.admin-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}

.admin-section-grid article {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 1rem;
  background: var(--admin-surface-soft);
}

.admin-section-grid h3 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1rem;
}

.admin-section-grid p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.list-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 0;
}

.list-summary-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: var(--admin-surface-soft);
}

.list-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.list-summary-grid strong {
  display: block;
  margin-top: 0.28rem;
  font-size: 1.35rem;
}

.inline-member-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px 18px 0;
}

.list-create-form,
.segment-create-form,
.template-edit-form {
  display: grid;
  gap: 10px;
  align-items: end;
  padding: 14px 18px 0;
}

.list-create-form {
  grid-template-columns: minmax(170px, 0.7fr) minmax(140px, 0.55fr) minmax(220px, 1fr) auto;
}

.list-custom-fields {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.list-custom-fields .list-create-form {
  grid-template-columns: minmax(130px, 0.65fr) minmax(160px, 0.8fr) minmax(110px, 0.5fr) minmax(110px, 0.5fr) minmax(160px, 0.8fr) auto;
}

.segment-create-form {
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 0.72fr) minmax(120px, 0.58fr) minmax(150px, 0.72fr) minmax(150px, 0.72fr) auto;
}

.template-edit-form {
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.template-form-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(140px, 0.55fr) minmax(130px, 0.5fr) minmax(220px, 1fr);
  gap: 10px;
}

.list-create-form label,
.segment-create-form label,
.template-edit-form label,
.inline-member-form label {
  display: grid;
  gap: 5px;
}

.list-create-form label span,
.segment-create-form label span,
.template-edit-form label span,
.inline-member-form label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.template-edit-form small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.list-create-form input,
.list-create-form select,
.template-edit-form input,
.template-edit-form select,
.template-edit-form textarea,
.segment-create-form input,
.segment-create-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.62rem 0.68rem;
  color: var(--ink);
  background: var(--admin-surface-soft);
  font: inherit;
  outline: none;
}

.template-edit-form textarea {
  min-height: 120px;
  resize: vertical;
}

.list-create-form input:focus,
.list-create-form select:focus,
.template-edit-form input:focus,
.template-edit-form select:focus,
.template-edit-form textarea:focus,
.segment-create-form input:focus,
.segment-create-form select:focus {
  border-color: var(--teal);
}

.template-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.list-create-form button,
.template-edit-form button,
.segment-create-form button {
  border: 0;
  border-radius: 7px;
  padding: 0.66rem 0.82rem;
  color: var(--admin-button-text);
  background: linear-gradient(135deg, #7be0ce, #f2d28c 92%);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.muted-text {
  color: var(--muted);
  font-size: 0.82rem;
}

.inline-table-form {
  display: inline;
}

.inline-table-form button {
  width: auto;
  padding: 0.38rem 0.55rem;
  font-size: 0.8rem;
}

.surface-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.surface-head h2,
.setup-notes h2 {
  margin: 0;
}

.surface-head p,
.setup-notes p {
  margin: 6px 0 0;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.94rem;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.52rem;
  font-size: 0.8rem;
  font-weight: 760;
}

.badge.confirmed {
  color: var(--admin-success-text);
  background: var(--admin-success-bg);
}

.badge.sent {
  color: var(--admin-success-text);
  background: var(--admin-success-bg);
}

.badge.ok {
  color: var(--admin-success-text);
  background: var(--admin-success-bg);
}

.badge.pending {
  color: var(--admin-warn-text);
  background: var(--admin-warn-bg);
}

.badge.scheduled {
  color: var(--admin-info-text);
  background: var(--admin-info-bg);
}

.badge.warn {
  color: var(--admin-warn-text);
  background: var(--admin-warn-bg);
}

.badge.queued,
.badge.sending {
  color: var(--admin-warn-text);
  background: var(--admin-warn-bg);
}

.badge.unsubscribed {
  color: var(--admin-error-text);
  background: var(--admin-error-bg);
}

.badge.failed,
.badge.skipped {
  color: var(--admin-error-text);
  background: var(--admin-error-bg);
}

.badge.issue {
  color: var(--admin-error-text);
  background: var(--admin-error-bg);
}

.badge.draft {
  color: var(--admin-info-text);
  background: var(--admin-info-bg);
}

.empty {
  color: var(--muted);
  text-align: center;
}

.setup-notes {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-notes article {
  padding: 18px;
}

.admin-notice {
  margin: 0 0 12px;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-weight: 650;
}

.admin-notice.success {
  border: 1px solid var(--admin-success-border);
  color: var(--admin-success-text);
  background: var(--admin-success-bg);
}

.admin-notice.error {
  border: 1px solid var(--admin-error-border);
  color: var(--admin-error-text);
  background: var(--admin-error-bg);
}

.admin-body input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select {
  width: 100%;
  min-height: 38px;
  height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.48rem 0.68rem;
  color: var(--ink);
  background: var(--admin-surface-soft);
  font: inherit;
  outline: none;
}

.admin-body textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.72rem 0.78rem;
  color: var(--ink);
  background: var(--admin-surface-soft);
  font: inherit;
  outline: none;
}

.admin-body input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.admin-body select:focus,
.admin-body textarea:focus {
  border-color: var(--teal);
}

.admin-forms {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 12px;
  margin-top: 12px;
}

.subscriber-tools {
  grid-template-columns: minmax(230px, 0.8fr) minmax(300px, 1fr) minmax(260px, 0.9fr);
}

.tool-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--admin-surface);
}

.tool-panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.collapsible-tool {
  align-content: start;
}

.collapsible-tool summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.collapsible-tool summary::-webkit-details-marker {
  display: none;
}

.collapsible-tool summary::after {
  content: "+";
  color: var(--teal-dark);
  font-size: 1.18rem;
  font-weight: 820;
  line-height: 1;
}

.collapsible-tool[open] summary::after {
  content: "-";
}

.collapsible-tool form {
  display: grid;
  gap: 12px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-panel label,
.filter-form {
  display: grid;
  gap: 6px;
}

.tool-panel label span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.tool-panel input,
.tool-panel select,
.tool-panel textarea,
.filter-form input,
.filter-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.72rem 0.78rem;
  color: var(--ink);
  background: var(--admin-surface-soft);
  font: inherit;
  outline: none;
}

.tool-panel textarea {
  resize: vertical;
}

.tool-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tool-panel input:focus,
.tool-panel select:focus,
.tool-panel textarea:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: var(--teal);
}

.tool-panel button,
.filter-form button,
.inline-actions button {
  border: 0;
  border-radius: 7px;
  padding: 0.72rem 0.9rem;
  color: var(--admin-button-text);
  background: linear-gradient(135deg, #7be0ce, #f2d28c 92%);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.subscriber-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.filter-form {
  grid-template-columns: minmax(180px, 1fr) 150px auto;
  align-items: end;
}

.subscribers-search-page .filter-form {
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.72fr) 130px minmax(140px, 0.72fr) auto;
}

.subscribers-search-page table input,
.subscribers-search-page table select {
  width: 100%;
  min-width: 110px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.48rem 0.54rem;
  color: var(--ink);
  background: var(--admin-surface-soft);
  font: inherit;
}

.subscribers-search-page table input[type="email"] {
  min-width: 220px;
}

.subscribers-search-page table input:focus,
.subscribers-search-page table select:focus {
  border-color: var(--teal);
  outline: none;
}

.csv-preview-surface {
  display: grid;
  gap: 12px;
}

.csv-map-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 0 18px;
}

.csv-map-form label {
  display: grid;
  gap: 6px;
}

.csv-map-form label span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.csv-map-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.62rem 0.68rem;
  color: var(--ink);
  background: var(--admin-surface-soft);
  font: inherit;
}

.csv-map-form button,
.csv-confirm-form button {
  border: 0;
  border-radius: 7px;
  padding: 0.72rem 0.9rem;
  color: var(--admin-button-text);
  background: linear-gradient(135deg, #7be0ce, #f2d28c 92%);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.csv-confirm-form {
  padding: 0 18px;
}

.csv-confirm-form button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-actions button {
  padding: 0.42rem 0.58rem;
  background: var(--admin-active-bg);
  color: var(--teal-dark);
}

.inline-actions button:disabled,
.tool-panel button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.subscriber-status-form {
  margin: 0;
}

.subscriber-status-select {
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.42rem 0.5rem;
  color: var(--ink);
  background: var(--admin-surface-soft);
  font: inherit;
  outline: none;
}

.subscriber-status-select:focus {
  border-color: var(--teal);
}

.subscriber-status-select.is-saving {
  opacity: 0.62;
}

.subscriber-row-saved {
  animation: subscriber-row-saved 1.1s ease;
}

@keyframes subscriber-row-saved {
  0% {
    background: rgba(123, 224, 206, 0.28);
  }

  100% {
    background: transparent;
  }
}

.security-actions .inline-actions {
  margin-top: 10px;
}

.campaign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--admin-surface);
  margin-top: 12px;
  align-items: start;
}

.campaign-layout .campaign-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.campaign-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.campaign-title-row h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.campaign-meta-stack {
  display: grid;
  gap: 8px;
}

.campaign-meta-row {
  display: grid;
  gap: 12px;
  align-items: end;
}

.campaign-audience-row {
  grid-template-columns: minmax(170px, 0.9fr) minmax(210px, 1.1fr) minmax(170px, 0.9fr) minmax(210px, 1.1fr);
}

.campaign-delivery-row {
  grid-template-columns: minmax(280px, 1.25fr) minmax(190px, 0.75fr) minmax(220px, 0.8fr);
}

.campaign-meta-row label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.campaign-meta-row label span {
  white-space: nowrap;
}

.campaign-meta-row label small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.campaign-meta-row input,
.campaign-meta-row select {
  min-height: 38px;
  height: 38px;
  box-sizing: border-box;
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
}

.campaign-meta-row input.flash-green {
  border-color: var(--admin-success-border);
  box-shadow: 0 0 0 3px var(--admin-success-bg);
}

.campaign-meta-row input.flash-red {
  border-color: var(--admin-error-border);
  box-shadow: 0 0 0 3px var(--admin-error-bg);
}

.flow-section {
  display: grid;
  gap: 10px;
  scroll-margin-top: 90px;
}

.flow-section h2 {
  margin: 0;
  font-size: 1.02rem;
}

.flow-section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.flow-section label {
  display: grid;
  gap: 6px;
}

.flow-section label span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.campaign-editor textarea {
  height: 680px;
  min-height: 680px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.65;
}

.editor-mode-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: var(--admin-surface-soft);
}

.tool-panel .editor-mode-tabs button {
  border-radius: 6px;
  padding: 0.52rem 0.78rem;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.tool-panel .editor-mode-tabs button.active {
  color: var(--admin-button-text);
  background: #7be0ce;
}

.editor-preview-grid,
.campaign-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.campaign-workbench {
  width: 100%;
}

.campaign-workbench.main-columns {
  grid-template-columns: minmax(0, calc(50% - 7px)) minmax(0, calc(50% - 7px));
  align-items: stretch;
}

.campaign-workbench .main-left,
.campaign-workbench .main-right {
  width: 100%;
}

.campaign-workbench .editor-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
}

.campaign-workflow {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--admin-surface-soft);
}

.workflow-head-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workflow-head-actions button {
  width: auto;
}

.campaign-drafts-row {
  margin-top: 0;
}

.workflow-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.workflow-head h3 {
  margin: 2px 0 0;
  font-size: 1.02rem;
}

.workflow-delivery-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.workflow-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workflow-actions .sidebar-action {
  margin-top: 0;
  box-shadow: none;
}

.editor-pane [hidden] {
  display: none;
}

.editor-pane,
.editor-pane label {
  min-width: 0;
}

.editor-pane,
.preview-console {
  min-width: 0;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 25px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 3px 8px;
  background: var(--admin-surface-soft);
}

.pane-head .eyebrow {
  margin: 0;
}

.pane-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.markdown-frame {
  display: grid;
  gap: 0;
  min-height: 0;
}

.markdown-frame > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.markdown-frame textarea {
  height: 100%;
  min-height: 0;
  border-radius: 0 0 8px 8px;
  resize: none;
}

.template-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.template-presets button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.28rem 0.48rem;
  background: var(--admin-surface-soft);
  color: var(--ink);
  font-size: 0.78rem;
  box-shadow: none;
}

.template-presets button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.template-presets button.active {
  border-color: var(--teal);
  color: var(--admin-button-text);
  background: #7be0ce;
}

.preview-console {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--admin-surface-soft);
  min-width: 0;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  height: 25px;
  min-height: 25px;
  padding: 2px 8px;
}

.preview-head > .eyebrow {
  margin: 0;
  flex: 0 0 auto;
}

.preview-tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 3px;
  height: 21px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px;
  background: var(--admin-surface);
}

.tool-panel .preview-tabs button {
  border-radius: 5px;
  min-height: 0;
  height: 17px;
  padding: 0 0.34rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
  background: transparent;
  box-shadow: none;
}

.tool-panel .sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  height: 17px;
  border-right: 1px solid var(--line);
  margin-right: 2px;
  padding: 0 6px 0 3px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 760;
  white-space: nowrap;
}

.sync-toggle input {
  width: 11px;
  height: 11px;
  accent-color: var(--teal);
}

.tool-panel .preview-tabs button.active {
  color: var(--admin-button-text);
  background: #7be0ce;
}

.preview-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--admin-surface);
}

.preview-checks span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.36rem 0.58rem;
  color: var(--muted);
  background: var(--admin-surface);
  font-size: 0.82rem;
  font-weight: 760;
}

.preview-checks span.ok {
  border-color: var(--admin-success-border);
  color: var(--admin-success-text);
  background: var(--admin-success-bg);
}

.preview-checks span.warn {
  border-color: var(--admin-warn-border);
  color: var(--admin-warn-text);
  background: var(--admin-warn-bg);
}

.preview-frame {
  height: 680px;
  min-height: 680px;
  overflow: hidden;
  border-width: 1px 0 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0 0 8px 8px;
  background: var(--admin-surface);
}

.preview-frame .html-preview-document,
.preview-frame pre {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  margin: 0;
  background: var(--admin-surface);
}

.preview-frame .html-preview-document {
  overflow: auto;
  background: #fff;
}

.preview-frame [hidden] {
  display: none;
}

.preview-frame pre {
  overflow: auto;
  padding: 16px;
  color: var(--ink);
  font: 0.92rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.preview-console:fullscreen {
  padding: 18px;
  background: var(--admin-surface-soft);
}

.preview-console:fullscreen .preview-frame,
.preview-console:fullscreen .preview-frame .html-preview-document,
.preview-console:fullscreen .preview-frame pre,
.preview-fullscreen .preview-frame,
.preview-fullscreen .preview-frame .html-preview-document,
.preview-fullscreen .preview-frame pre {
  min-height: calc(100vh - 148px);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
  color: var(--teal-dark);
  background: var(--admin-surface-soft);
  box-shadow: none;
  cursor: pointer;
}

.tag-row button:hover {
  border-color: var(--admin-success-border);
  background: var(--admin-active-bg);
}

.tag-row button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.tag-row button code {
  display: block;
  border: 0;
  padding: 0.36rem 0.54rem;
  color: inherit;
  background: transparent;
  font-size: 0.82rem;
  white-space: nowrap;
}

.image-library-panel {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  bottom: clamp(14px, 3vw, 34px);
  z-index: 10;
  display: grid;
  gap: 12px;
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  overflow: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 14px;
  color: var(--admin-text);
  background: color-mix(in srgb, var(--admin-surface), transparent 4%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.image-library-panel[hidden] {
  display: none !important;
}

.image-library-head,
.image-library-section-head,
.image-upload-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.image-library-head h3,
.image-library-section-head h4 {
  margin: 0;
  font-size: 1rem;
}

.image-library-head button,
.image-library-actions button,
.image-upload-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.46rem 0.62rem;
  color: var(--teal-dark);
  background: var(--admin-active-bg);
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.image-library-head button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.image-upload-controls label:not(.image-upload-button) {
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
}

.image-upload-controls label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.image-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  white-space: nowrap;
}

.image-library-section {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.image-library-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(5, 100px);
  gap: 8px;
}

.image-thumb-button {
  position: relative;
  width: 100px;
  height: 100px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--admin-surface-soft);
  cursor: pointer;
}

.image-thumb-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-thumb-button span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 20px;
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--admin-button-text);
  background: rgba(6, 22, 21, 0.72);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.2;
}

.image-library-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.campaign-attachments {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-row,
.attachment-upload {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  color: var(--admin-text);
}

.attachment-row small {
  grid-column: 2;
  color: var(--admin-muted);
}

.attachment-upload input {
  min-width: 0;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
}

.panel-divider {
  border-top: 1px solid var(--line);
  margin: 2px 0;
}

.compact-form {
  display: grid;
  gap: 8px;
}

.queue-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.queue-stats span {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.58rem 0.65rem;
  color: var(--muted);
  background: var(--admin-surface-soft);
}

.queue-stats strong {
  color: var(--ink);
}

.table-link {
  color: var(--teal-dark);
  font-weight: 800;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error-cell {
  max-width: 360px;
  color: var(--admin-error-text);
  white-space: normal;
  word-break: break-word;
}

.outbox-table {
  min-width: 980px;
}

.outbox-preview {
  max-width: 420px;
  max-height: 4.6em;
  margin-top: 0.28rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.url-cell {
  max-width: 520px;
  white-space: normal;
  word-break: break-word;
}

.url-cell a {
  color: var(--teal-dark);
  font-weight: 700;
}

.report-actions {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.delivery-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
}

.delivery-progress-head strong {
  font-size: 1.55rem;
  color: var(--admin-text);
  white-space: nowrap;
}

.delivery-progress-body {
  padding: 14px 18px 18px;
}

.delivery-progress-bar {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--admin-surface-soft);
}

.delivery-progress-bar span {
  display: block;
  min-width: 0;
  height: 100%;
}

.delivery-progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 720;
}

.delivery-progress-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.delivery-progress-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.progress-sent {
  background: var(--admin-success-text);
}

.progress-failed {
  background: var(--admin-error-text);
}

.progress-skipped {
  background: var(--admin-warn-text);
}

.progress-sending {
  background: var(--admin-info-text);
}

.progress-queued {
  background: var(--muted);
}

.issue-summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 14px 18px 18px;
}

.issue-summary-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.8rem;
  background: var(--admin-surface-soft);
}

.issue-summary-list strong {
  justify-self: end;
  font-size: 1.35rem;
  color: var(--admin-text);
}

.issue-summary-list p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.issue-summary-list > .empty-state {
  padding: 0.2rem 0;
}

.worker-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px 18px 18px;
}

.worker-status-grid article {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.85rem;
  background: var(--admin-surface-soft);
}

.worker-status-grid article.active {
  border-color: color-mix(in srgb, var(--admin-info-text) 45%, var(--line));
}

.worker-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.worker-card-head strong {
  color: var(--admin-text);
  font-size: 1rem;
}

.worker-status-grid dl {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 12px 0 0;
}

.worker-status-grid dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.worker-status-grid dd {
  margin: 0;
  color: var(--admin-text);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.worker-status-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.worker-status-grid .worker-error {
  color: var(--admin-error-text);
}

.report-web,
.report-clicks {
  margin-top: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.settings-wide {
  grid-column: 1 / -1;
}

.settings-tabs {
  position: sticky;
  top: 70px;
  z-index: 2;
  display: flex;
  gap: 6px;
  margin: 16px 0 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--admin-topbar-bg);
  backdrop-filter: blur(12px);
}

.settings-tabs a {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 0.62rem 0.82rem;
  color: var(--muted);
  font-weight: 760;
}

.settings-tabs a:hover {
  border-color: var(--line);
  color: var(--teal-dark);
  background: var(--admin-surface);
}

.settings-section {
  scroll-margin-top: 126px;
  margin-top: 18px;
}

.settings-section + .settings-section {
  margin-top: 26px;
}

.setting-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--admin-surface-soft);
}

.setting-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.setting-check span {
  display: block;
  margin: 0;
}

.feed-diagnostics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.feed-diagnostics h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
}

.feed-diagnostics-table th,
.feed-diagnostics-table td {
  padding: 9px 10px;
  vertical-align: top;
}

@media (max-width: 760px) {
  .article-subscribe {
    grid-template-columns: 1fr;
  }

  .feed-diagnostics {
    grid-template-columns: 1fr;
  }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.section-head span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.24rem 0.56rem;
  color: var(--muted);
  background: var(--admin-surface-soft);
  font-size: 0.82rem;
  font-weight: 760;
  white-space: nowrap;
}

.settings-list {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.settings-list dt {
  color: var(--muted);
  font-weight: 760;
}

.settings-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-examples {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.api-examples h3 {
  margin: 4px 0 0;
  font-size: 0.95rem;
}

.api-examples pre {
  margin: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.9rem;
  background: var(--admin-code-bg);
}

.api-examples pre code {
  background: transparent;
  padding: 0;
  white-space: pre;
}

.events-table {
  min-width: 860px;
}

.deliverability-table {
  min-width: 760px;
}

.eml-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.analysis-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.72rem 0.8rem;
  background: var(--admin-surface-soft);
}

.analysis-summary span {
  color: var(--muted);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.eml-table {
  min-width: 760px;
}

.eml-table td {
  word-break: break-word;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid,
  .admin-layout,
  .campaigns-page .admin-layout,
  .status-strip,
  .metrics,
  .setup-notes,
  .admin-forms,
  .campaign-layout,
  .campaign-meta-row,
  .editor-preview-grid,
  .main-columns,
  .campaign-workbench.main-columns,
  .workflow-actions,
  .settings-grid,
  .settings-list,
  .eml-form,
  .inline-member-form,
  .list-create-form,
  .segment-create-form,
  .template-form-grid,
  .list-summary-grid,
  .report-context-grid,
  .worker-status-grid {
    grid-template-columns: 1fr;
  }

  .settings-wide {
    grid-column: auto;
  }

  .subscriber-head {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

  .csv-map-form {
    grid-template-columns: 1fr;
  }

  .delivery-progress-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-grid {
    align-items: start;
    padding-top: 18px;
  }

  .hero h1 {
    max-width: 11ch;
  }

  html[lang="en"] .hero h1 {
    max-width: 13ch;
    font-size: 4.05rem;
  }

  .sidebar {
    display: flex;
    gap: 8px;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
  }

  .sidebar-section,
  .sidebar-group {
    flex: 0 0 auto;
    min-width: 0;
  }

  .sidebar-subnav {
    display: flex;
    gap: 6px;
  }

  .admin-sidebar,
  .campaigns-page .sidebar {
    position: static;
    height: auto;
  }

  .sidebar a {
    white-space: nowrap;
  }

  .sidebar-section {
    display: flex;
    gap: 8px;
  }

  .sidebar-subnav {
    align-items: stretch;
  }

  .sidebar-section + .sidebar-section {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
  }

  .sidebar-section span {
    display: none;
  }

  .sidebar-action {
    flex: 0 0 260px;
    margin-top: 0;
  }

  .campaign-editor textarea,
  .preview-frame {
    height: 540px;
    min-height: 540px;
  }

  .campaign-meta-row label {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .campaign-meta-row label small {
    grid-column: auto;
  }

  .preview-head,
  .preview-tabs {
    flex-wrap: wrap;
  }

  .campaign-workbench .main-left,
  .campaign-workbench .main-right {
    width: auto;
  }
}

@media (max-width: 620px) {
  .hero-shell {
    padding: 0;
  }

  .hero {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .topbar,
  .admin-topbar,
  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-topbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 14px;
    overflow: hidden;
  }

  .admin-main-nav {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .nav-status,
  .admin-account {
    flex-wrap: wrap;
  }

  .admin-account {
    justify-content: flex-start;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.15rem, 10.2vw, 2.72rem);
    line-height: 1.02;
    white-space: nowrap;
  }

  html[lang="en"] .hero h1 {
    max-width: 100%;
    font-size: 1.58rem;
    line-height: 1.08;
    white-space: nowrap;
  }

  .home-title .title-line {
    display: inline;
  }

  .lead {
    margin-top: 14px;
    font-size: 0.96rem;
    line-height: 1.58;
  }

  html[lang="en"] .lead {
    max-width: 30ch;
    font-size: 0.88rem;
    line-height: 1.46;
  }

  .signal-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 16px;
    width: 100%;
  }

  .signal-row span {
    min-width: 0;
    padding: 0.36rem 0.28rem;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    font-size: clamp(0.75rem, 3.32vw, 0.86rem);
    font-weight: 720;
    line-height: 1;
    white-space: nowrap;
  }

  .panel-heading {
    margin-bottom: 14px;
  }

  .access-panel-content {
    padding: 16px;
  }

  .window-titlebar {
    min-height: 34px;
  }

  .window-controls span {
    width: 10px;
    height: 10px;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .campaign-layout {
    margin-top: 8px;
    padding: 12px;
  }

  .campaign-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .template-presets,
  .tag-row {
    max-width: 100%;
  }

  .image-library-panel {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .image-upload-controls,
  .image-library-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .image-library-actions {
    justify-content: flex-start;
  }

  .image-grid {
    grid-template-columns: repeat(3, 100px);
  }

  .campaign-editor textarea,
  .preview-frame {
    height: 430px;
    min-height: 430px;
  }

  .preview-head {
    height: auto;
    min-height: 25px;
  }

  .preview-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .tool-panel .sync-toggle,
  .tool-panel .preview-tabs button {
    flex: 0 0 auto;
  }
}

@media (max-width: 390px) {
  .signal-row {
    gap: 2px;
  }

  .signal-row span {
    padding-right: 0;
    padding-left: 0;
    font-size: clamp(0.71rem, 3.38vw, 0.78rem);
  }
}
