.mast-actions > .icon-button.accent-trigger[data-preferences] {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  padding: 0;
}
.accent-indicator {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgb(26 27 21 / .35), 0 0 0 2px var(--paper), 0 0 0 3px currentColor;
}
.accent-trigger .accent-indicator { width: 18px; height: 18px; }
.footer-options .accent-indicator, .mobile-nav .accent-indicator { width: 11px; height: 11px; margin-inline: 3px; }
.mobile-nav button[data-preferences] { display: inline-flex; align-items: center; gap: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .accent-indicator { transition: transform .18s ease; }
  [data-preferences]:is(:hover, :focus-visible) .accent-indicator { transform: scale(1.12); }
  [data-preferences]:active .accent-indicator { transform: scale(.92); }
}

[hidden] { display: none !important; }
.cozie-dialog, .cozie-dialog * { box-sizing: border-box; }
.cozie-dialog {
  color: var(--ink, #252520);
  background: var(--paper, #fffdf9);
  width: min(430px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  margin: auto;
  border: 1px solid var(--line, #deddd6);
  border-radius: 22px;
  box-shadow: 0 24px 90px rgb(32 31 28 / .21);
  line-height: 1.4;
  overscroll-behavior: contain;
}
html:has(.cozie-dialog[open]) { overflow: hidden; }
.cozie-dialog::backdrop { background: rgb(20 23 20 / .43); }
.cozie-dialog[open] { animation: cozie-dialog-in .2s ease-out both; }
.cozie-dialog[open]::backdrop { animation: cozie-dim-in .18s ease-out both; }
@keyframes cozie-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.992); } to { opacity: 1; transform: none; } }
@keyframes cozie-dim-in { from { opacity: 0; } to { opacity: 1; } }
.cozie-dialog button, .cozie-dialog input { font: inherit; }
.cozie-dialog button, .cozie-dialog label { -webkit-tap-highlight-color: transparent; }
.cozie-dialog button { cursor: pointer; }
.dialog-content { position: relative; padding: 33px; }
.dialog-x {
  position: absolute; top: 10px; right: 10px; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted, #65655f);
}
.dialog-x:hover { color: var(--ink); background: var(--surface-raised); }
.dialog-symbol {
  width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 21px;
  border-radius: 12px; background: var(--accent-fill); color: var(--on-accent);
}
.cozie-dialog .dialog-heading {
  margin: 0; color: inherit; font-family: inherit; font-size: clamp(28px, 5vw, 34px);
  font-weight: 630; letter-spacing: -.048em; line-height: 1.08;
}
.dialog-heading:focus { outline: none; }
.cozie-dialog .dialog-description {
  margin: 13px 0 24px; color: var(--muted, #64645e); font: inherit;
  font-size: 1rem; line-height: 1.5; letter-spacing: normal;
}
#waitlist-form { display: grid; gap: 18px; margin: 0; }
#waitlist-error { margin: 0; color: var(--ink); font-size: .93rem; }
#waitlist-form[aria-busy="true"] .dialog-submit { opacity: .7; cursor: progress; }
.dialog-role, .accent-picker { min-inline-size: 0; padding: 0; margin: 0; border: 0; }
.dialog-role legend, .accent-picker legend, .dialog-email > label {
  padding: 0; margin: 0 0 8px; color: var(--ink, #252520); font-size: .91rem; font-weight: 620;
}
.dialog-role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dialog-role-options label, .accent-choice { position: relative; cursor: pointer; }
.dialog-role-options input, .accent-choice input {
  position: absolute; left: 50%; top: 50%; width: 1px; height: 1px;
  margin: 0; opacity: 0;
}
.dialog-role-options span {
  display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line, #d5d4ce);
  border-radius: 9px; background: var(--surface); font-size: .94rem; color: var(--ink, #252520);
}
.dialog-role-options label:hover span { border-color: var(--accent-ink); }
.dialog-role-options input:checked + span {
  color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-ink);
  box-shadow: inset 0 0 0 .5px var(--accent-ink);
}
.dialog-email { display: grid; }
.dialog-email input {
  width: 100%; min-width: 0; min-height: 48px; padding: 10px 13px;
  color: var(--ink, #252520); background: var(--surface); border: 1px solid var(--line, #d5d4ce); border-radius: 9px;
}
.dialog-email input::placeholder { color: #75746e; opacity: 1; }
.dialog-submit {
  width: 100%; min-height: 47px; margin: 4px 0 0; padding: 11px 16px;
  border: 1px solid var(--accent-fill); border-radius: 9px;
  color: var(--on-accent); background: var(--accent-fill); font-weight: 620 !important;
  transition: transform .15s ease, box-shadow .15s ease;
}
.dialog-submit:hover { box-shadow: 0 3px 12px rgb(28 25 22 / .15); }
.dialog-submit:active { transform: scale(.987); }
.prefs-dialog { width: min(360px, calc(100% - 32px)); }
.prefs-dialog .dialog-heading { margin: 1px 25px 24px 0; font-size: 27px; }
.prefs-dialog .accent-picker { position: relative; padding: 0 0 16px; }
.accent-picker legend { margin: 0; }
.accent-current { color: var(--muted, #65645e); font-size: .82rem; line-height: 1.4; display: block; margin-top: 2px; }
.accent-options { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 0 -4px; }
.accent-choice { display: inline-grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; }
.accent-choice span { width: 29px; height: 29px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.sw-orange { --swatch: #da541e; }
.sw-pine { --swatch: #347559; }
.sw-blue { --swatch: #4766ba; }
.sw-plum { --swatch: #945675; }
.accent-choice input:checked + span { outline: 2px solid var(--ink, #252520); outline-offset: 3px; }
.prefs-toggle {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 46px;
  padding: 13px 0; border: 0; border-top: 1px solid var(--line, #deddd6);
  color: var(--ink, #252520); background: transparent; text-align: left; font-size: .94rem; font-weight: 620;
}
.prefs-toggle:last-child { padding-bottom: 0; }
.prefs-state { margin-inline-start: auto; font-size: .83rem; color: var(--muted, #65645e); font-weight: 400; }
.prefs-switch-track { width: 31px; height: 18px; border-radius: 99px; background: #807f77; display: inline-flex; align-items: center; padding: 3px; }
.prefs-switch-track::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .17s; }
.prefs-toggle[aria-checked="true"] .prefs-switch-track { background: var(--accent-fill); }
.prefs-toggle[aria-checked="true"] .prefs-switch-track::after { transform: translateX(13px); background: var(--on-accent); }
:root[data-theme="dark"] .cozie-dialog { background: var(--surface); box-shadow: 0 24px 90px rgb(0 0 0 / .48); }
:root[data-theme="dark"] .cozie-dialog::backdrop { background: rgb(10 13 9 / .65); }
:root[data-theme="dark"] :is(.dialog-role-options span, .dialog-email input) { background: var(--paper); border-color: #63685e; }
:root[data-theme="dark"] .dialog-role-options input:checked + span { background: var(--accent-soft); border-color: var(--accent-ink); }
:root[data-theme="dark"] .dialog-email input::placeholder { color: var(--muted); }
.cozie-dialog :where(button,input):focus-visible, .dialog-role-options input:focus-visible + span, .accent-choice input:focus-visible + span {
  outline: 2px solid var(--accent-ink); outline-offset: 4px;
}
@media (max-width: 420px) { .dialog-content { padding: 29px 23px 24px; } }
@media (prefers-reduced-motion: no-preference) {
  .theme-sweep::view-transition { pointer-events: none; }
  .theme-sweep::view-transition-old(root), .theme-sweep::view-transition-new(root) {
    animation: none; mix-blend-mode: normal;
  }
  .theme-sweep::view-transition-new(root) {
    animation: cozie-theme-sweep .58s cubic-bezier(.32,.04,.23,1) both;
  }
  @keyframes cozie-theme-sweep {
    from { clip-path: circle(0 at var(--sweep-x) var(--sweep-y)); }
    to { clip-path: circle(var(--sweep-radius) at var(--sweep-x) var(--sweep-y)); }
  }
  :root.theme-fade, .theme-fade :is(.mast, .audience-chapter, .chapter-preview, .cozie-dialog, .platform-window, .demo-surface) {
    transition: background-color .24s ease, color .24s ease, border-color .24s ease;
  }
  html { scroll-behavior: smooth; }
  [data-reveal].cozie-entered { animation: cozie-section-in .5s ease-out both; }
  @keyframes cozie-section-in { from { opacity: .3; transform: translateY(9px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .cozie-dialog, .cozie-dialog *, .cozie-dialog::backdrop { animation: none !important; transition: none !important; }
}

@media (max-width: 380px) {
  .mast-actions > .icon-button.accent-trigger[data-preferences] { width: 35px; }
}
@media (max-width: 360px) {
  .mast-inner { width: calc(100% - 20px); }
  .mast-inner .brand-lockup { height: 22px; }
  .mast-actions { gap: 1px; }
  .mast-actions .nav-join { padding-inline: 9px; font-size: .8rem; }
}
