/* Animate theme tokens once on the root; descendant colour transitions compound. */
@property --ink { syntax: "<color>"; inherits: true; initial-value: #152033; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #697386; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #e6e9ef; }
@property --brand { syntax: "<color>"; inherits: true; initial-value: #2762e9; }
@property --logo-mint { syntax: "<color>"; inherits: true; initial-value: #152033; }
@property --page { syntax: "<color>"; inherits: true; initial-value: #f6f7fa; }
@property --surface { syntax: "<color>"; inherits: true; initial-value: #fff; }
@property --field { syntax: "<color>"; inherits: true; initial-value: #fff; }
@property --field-line { syntax: "<color>"; inherits: true; initial-value: #d6dbe5; }
@property --secondary { syntax: "<color>"; inherits: true; initial-value: #edf2ff; }
@property --secondary-ink { syntax: "<color>"; inherits: true; initial-value: #204fae; }
@property --shadow { syntax: "<color>"; inherits: true; initial-value: #10204008; }
@property --popover-shadow { syntax: "<color>"; inherits: true; initial-value: #10204020; }
@property --danger { syntax: "<color>"; inherits: true; initial-value: #b42318; }
@property --success { syntax: "<color>"; inherits: true; initial-value: #177245; }
@property --on-brand { syntax: "<color>"; inherits: true; initial-value: #fff; }
@property --callout-ink { syntax: "<color>"; inherits: true; initial-value: #4b5568; }
@property --info-ink { syntax: "<color>"; inherits: true; initial-value: #084f7e; }
@property --info-surface { syntax: "<color>"; inherits: true; initial-value: #e7f0ff; }
@property --info-line { syntax: "<color>"; inherits: true; initial-value: #2f7de1; }
@property --info-icon { syntax: "<color>"; inherits: true; initial-value: #3b82e8; }
@property --warning-ink { syntax: "<color>"; inherits: true; initial-value: #684a00; }
@property --warning-surface { syntax: "<color>"; inherits: true; initial-value: #fff8d1; }
@property --warning-line { syntax: "<color>"; inherits: true; initial-value: #e6ba00; }
@property --warning-icon { syntax: "<color>"; inherits: true; initial-value: #e3ba19; }

:root {
  color-scheme: light;
  --ink: #152033;
  --muted: #697386;
  --line: #e6e9ef;
  --brand: #2762e9;
  --logo-mint: #152033;
  --page: #f6f7fa;
  --surface: #fff;
  --field: #fff;
  --field-line: #d6dbe5;
  --secondary: #edf2ff;
  --secondary-ink: #204fae;
  --shadow: #10204008;
  --popover-shadow: #10204020;
  --danger: #b42318;
  --success: #177245;
  --on-brand: #fff;
  --callout-ink: #4b5568;
  --info-ink: #084f7e;
  --info-surface: #e7f0ff;
  --info-line: #2f7de1;
  --info-icon: #3b82e8;
  --warning-ink: #684a00;
  --warning-surface: #fff8d1;
  --warning-line: #e6ba00;
  --warning-icon: #e3ba19;
  --theme-transition-duration: 1s;
  --button-effect-duration: 140ms;
  --colour-effect-duration: var(--button-effect-duration);
  --header-colour-effect-duration: 240ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f2f3;
  --muted: #afb1b5;
  --line: #34363a;
  --brand: #3d73ee;
  --logo-mint: #30d7aa;
  --page: #0e0f10;
  --surface: #17181a;
  --field: #111214;
  --field-line: #45474c;
  --secondary: #28549d;
  --secondary-ink: #f1f5ff;
  --shadow: #0000;
  --popover-shadow: #0008;
  --danger: #d34a42;
  --success: #65d69a;
  --on-brand: #fff;
  --callout-ink: #dedfe2;
  --info-ink: #c1e0ff;
  --info-surface: #102f58;
  --info-line: #3589ee;
  --info-icon: #7bc0ff;
  --warning-ink: #f7e8a2;
  --warning-surface: #45380d;
  --warning-line: #e8c638;
  --warning-icon: #f5dc63;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #f1f2f3;
    --muted: #afb1b5;
    --line: #34363a;
    --brand: #3d73ee;
    --logo-mint: #30d7aa;
    --page: #0e0f10;
    --surface: #17181a;
    --field: #111214;
    --field-line: #45474c;
    --secondary: #28549d;
    --secondary-ink: #f1f5ff;
    --shadow: #0000;
    --popover-shadow: #0008;
    --danger: #d34a42;
    --success: #65d69a;
    --on-brand: #fff;
    --callout-ink: #dedfe2;
    --info-ink: #c1e0ff;
    --info-surface: #102f58;
    --info-line: #3589ee;
    --info-icon: #7bc0ff;
    --warning-ink: #f7e8a2;
    --warning-surface: #45380d;
    --warning-line: #e8c638;
    --warning-icon: #f5dc63;
  }
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-invert-icon {
  filter: invert(0);
  transition: filter var(--theme-transition-duration) ease;
}

:root[data-theme="dark"] .theme-invert-icon { filter: invert(1); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-invert-icon { filter: invert(1); }
}

body {
  --page-gutter-total: clamp(40px, 10vw, 160px);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font: 15px/1.45 system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}

@media (display-mode: standalone) {
  body {
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
  }

  body::before {
    position: fixed;
    z-index: 30;
    inset: 0 0 auto;
    height: env(safe-area-inset-top);
    content: "";
    background: #152033;
  }

  .floating-header { margin-top: max(16px, env(safe-area-inset-top)); }
  .floating-controls { top: max(16px, env(safe-area-inset-top)); }
}

:root.is-theme-changing {
  --colour-effect-duration: 0s;
  --header-colour-effect-duration: 0s;
  transition:
    --ink var(--theme-transition-duration) ease,
    --muted var(--theme-transition-duration) ease,
    --line var(--theme-transition-duration) ease,
    --brand var(--theme-transition-duration) ease,
    --logo-mint var(--theme-transition-duration) ease,
    --page var(--theme-transition-duration) ease,
    --surface var(--theme-transition-duration) ease,
    --field var(--theme-transition-duration) ease,
    --field-line var(--theme-transition-duration) ease,
    --secondary var(--theme-transition-duration) ease,
    --secondary-ink var(--theme-transition-duration) ease,
    --shadow var(--theme-transition-duration) ease,
    --popover-shadow var(--theme-transition-duration) ease,
    --danger var(--theme-transition-duration) ease,
    --success var(--theme-transition-duration) ease,
    --on-brand var(--theme-transition-duration) ease,
    --callout-ink var(--theme-transition-duration) ease,
    --info-ink var(--theme-transition-duration) ease,
    --info-surface var(--theme-transition-duration) ease,
    --info-line var(--theme-transition-duration) ease,
    --info-icon var(--theme-transition-duration) ease,
    --warning-ink var(--theme-transition-duration) ease,
    --warning-surface var(--theme-transition-duration) ease,
    --warning-line var(--theme-transition-duration) ease,
    --warning-icon var(--theme-transition-duration) ease !important;
}

button,
input,
textarea,
select { font: inherit; }

button { cursor: pointer; }

a { color: var(--brand); }

.floating-header {
  position: relative;
  z-index: 20;
  width: min(calc(100% - var(--page-gutter-total)), 1120px);
  min-height: 65px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.floating-controls {
  position: fixed;
  z-index: 20;
  top: 16px;
  right: max(calc(var(--page-gutter-total) / 2), calc((100vw - 1120px) / 2));
  display: flex;
  max-width: calc(100vw - var(--page-gutter-total));
  gap: 9px;
  align-items: center;
}

.top {
  width: max-content;
  min-width: 0;
  min-height: 65px;
  padding: 10px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 24px var(--shadow);
  transition: background-color var(--header-colour-effect-duration) ease, box-shadow var(--header-colour-effect-duration) ease;
}

.floating-controls.is-scrolled .top {
  background-color: color-mix(in srgb, var(--surface) 90%, var(--brand));
  box-shadow: 0 12px 32px var(--popover-shadow);
}

.site-header {
  display: grid;
  grid-template-columns: auto auto;
}

.brand-lockup {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  text-decoration: none;
}

.brand-text {
  display: block;
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
}

.brand-text-itsy {
  fill: var(--logo-mint);
}

.brand-text-site {
  fill: var(--ink);
  opacity: .9;
}

.primary-nav {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
}

.primary-nav a {
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--colour-effect-duration) ease;
}

.primary-nav a:hover { color: var(--brand); }

.header-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
}

.header-actions .desktop-action.ghost { order: 2; }
.header-actions .desktop-start { order: 3; }
.header-actions #account { order: 4; }
.header-actions .mobile-menu { order: 5; }

.header-actions .btn,
.header-actions a {
  white-space: nowrap;
  text-decoration: none;
}

.btn.theme-toggle {
  display: inline-grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border-radius: 50%;
  place-items: center;
}

.theme-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
}

.theme-icon::before,
.theme-icon::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  transition: opacity var(--theme-transition-duration) ease;
}

.theme-icon::before {
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 68% 32%, transparent 0 52%, currentColor 54% 100%);
}

.theme-icon::after {
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  background: currentColor;
}

.theme-ray {
  position: absolute;
  display: block;
  opacity: 0;
  background: currentColor;
  border-radius: 999px;
  transition: opacity var(--theme-transition-duration) ease;
}

[data-theme-icon="moon"] .theme-icon::before { opacity: 1; }
[data-theme-icon="moon"] .theme-icon::after { opacity: 0; }
[data-theme-icon="sun"] .theme-icon::before { opacity: 0; }
[data-theme-icon="sun"] .theme-icon::after,
[data-theme-icon="sun"] .theme-ray { opacity: 1; }

.theme-ray.vertical {
  top: 1.5px;
  left: 9.5px;
  width: 3px;
  height: 3px;
  box-shadow: 0 16px 0 currentColor;
}

.theme-ray.horizontal {
  top: 9.5px;
  left: 1.5px;
  width: 3px;
  height: 3px;
  box-shadow: 16px 0 0 currentColor;
}

.theme-ray.diagonal {
  top: 3.5px;
  left: 3.5px;
  width: 3px;
  height: 3px;
  box-shadow: 12px 12px 0 currentColor;
}

.theme-ray.diagonal.reverse {
  left: 15.5px;
  box-shadow: -12px 12px 0 currentColor;
}

#account:empty { display: none; }
body.authenticated [data-guest-action] { display: none; }
.mobile-menu { display: none; }
#mobileAccount { display: contents; }

.shell {
  width: 100%;
  max-width: 1320px;
  flex: 1;
  margin: auto;
  padding: 24px;
}

.card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--shadow);
}

.auth {
  max-width: 420px;
  margin: 8vh auto;
}

.auth-card {
  padding: 0;
  overflow: hidden;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.auth-reset-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.auth-reset-header h2 { margin: 0; font-size: 26px; }

.auth-reset-header a {
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
}

.auth-reset-header a:hover,
.auth-reset-header a:focus-visible { color: var(--ink); }

.auth-tab {
  position: relative;
  padding: 15px 12px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 750;
  background: transparent;
  border: 0;
}

.auth-tab + .auth-tab { border-left: 1px solid var(--line); }

.auth-tab[aria-pressed="true"] {
  color: var(--secondary-ink);
  background: var(--secondary);
}

.auth-tab[aria-pressed="true"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: var(--brand);
}

.auth-form { padding: 22px; }
.auth-help { margin: -5px 0 0; text-align: right; }
.auth-help a { font-weight: 650; }
.auth-signup-terms { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.auth-signup-terms a { font-weight: 650; }
body:not(.login-page) #forgotPassword.hidden {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}
.remember-field { display: grid; gap: 3px; }
.remember-option { display: flex; align-items: center; gap: 10px; }
.remember-option input {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
}
.remember-option span {
  color: var(--ink);
  font-weight: 650;
}
.remember-field p { margin: 0 0 0 32px; color: var(--muted); font-size: 14px; }
.auth-feedback { font-size: 15px; font-weight: 650; }
.auth-feedback:empty { display: none; }
.auth-error:not(:empty) {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.auth-error::before {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  content: "";
  background: currentColor;
  -webkit-mask: url("/assets/icon-warning.svg") center / contain no-repeat;
  mask: url("/assets/icon-warning.svg") center / contain no-repeat;
}
.row { display: grid; gap: 14px; }

.split {
  display: grid;
  grid-template-columns: minmax(330px, 440px) 1fr;
  gap: 20px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
}

.field .password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
}

.password-control input { border-radius: 9px 0 0 9px; }

.password-toggle {
  min-width: 64px;
  padding: 0 10px;
  color: var(--secondary-ink);
  font: inherit;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  background: var(--secondary);
  border: 1px solid var(--field-line);
  border-left: 0;
  border-radius: 0 9px 9px 0;
}

.password-toggle:hover,
.password-toggle:focus-visible { color: var(--ink); }

input,
textarea,
select {
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 9px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: var(--on-brand);
  font-weight: 700;
  background: var(--brand);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color var(--colour-effect-duration) ease, background-color var(--colour-effect-duration) ease, border-color var(--colour-effect-duration) ease, box-shadow var(--colour-effect-duration) ease, filter var(--button-effect-duration) ease;
}

.btn-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-right: 6px;
  background: currentColor;
  mask: url("/assets/icon-add.svg") center / contain no-repeat;
}

.back-button::before {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-right: 6px;
  content: "";
  background: currentColor;
  -webkit-mask: url("/assets/icon-arrow-left.svg") center / contain no-repeat;
  mask: url("/assets/icon-arrow-left.svg") center / contain no-repeat;
}

.btn:not(:disabled):hover {
  box-shadow: 0 4px 10px var(--popover-shadow);
}
.btn:not(.ghost):not(:disabled):hover { filter: brightness(1.08); }
#createSite:not(:disabled):hover {
  background: color-mix(in srgb, var(--brand), black 15%);
  filter: none;
}
.btn.secondary:not(:disabled):hover {
  color: var(--on-brand);
  background: var(--brand);
  filter: none;
}
.btn.ghost:not(:disabled):hover {
  color: var(--secondary-ink);
  background: var(--secondary);
  border-color: var(--brand);
}
.editor-toolbar .btn:not(.ghost):not(:disabled):hover {
  border-color: color-mix(in srgb, var(--on-brand), transparent 35%);
}
.btn:not(:disabled):active {
  box-shadow: none;
  filter: brightness(.92);
}
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand), transparent 55%); outline-offset: 2px; }

.button-spinner { display: none; }

.btn.is-loading { cursor: wait; }
.btn.is-loading .button-label { visibility: hidden; }
.btn.is-loading .tab-count { visibility: hidden; }
.btn.is-loading .button-spinner {
  position: absolute;
  display: block;
  width: 18px;
  height: 18px;
  animation: button-spin .75s linear infinite;
}

.button-spinner svg { display: block; width: 100%; height: 100%; }

@keyframes button-spin { to { transform: rotate(1turn); } }

.btn.secondary {
  color: var(--secondary-ink);
  background: var(--secondary);
  border-color: var(--brand);
}

.btn.ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.bar .spacer { flex: 1; }
.status { color: var(--muted); font-size: 13px; }
.save-state {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
}
.save-state.is-saved::before,
.save-state.is-saving::before {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  content: "";
}
.save-state.is-saved::before {
  background: var(--success);
  -webkit-mask: url("/assets/icon-checkmark.svg") center / contain no-repeat;
  mask: url("/assets/icon-checkmark.svg") center / contain no-repeat;
}
.save-state.is-saving::before {
  background: currentColor;
  -webkit-mask: url("/assets/icon-spinner.svg") center / contain no-repeat;
  mask: url("/assets/icon-spinner.svg") center / contain no-repeat;
  animation: save-state-spin .7s linear infinite;
}
@keyframes save-state-spin { to { transform: rotate(1turn); } }
.site-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  margin-block: 5px;
  line-height: 1.2;
  font-weight: 700;
  border-radius: 999px;
}
.site-status-unpublished {
  color: var(--field);
  background: var(--danger);
}
.site-status-published {
  color: var(--field);
  background: var(--success);
}
.site-status-plan-disabled {
  color: var(--warning-ink);
  background: var(--warning-surface);
  border: 1px solid var(--warning-line);
}
.site-status-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.site-status-unpublished .site-status-icon {
  background: currentColor;
  mask: url("/assets/icon-warning.svg") center / contain no-repeat;
}
.site-status-published .site-status-icon::before {
  content: "✓";
  font-size: 16px;
  line-height: 14px;
}
.empty-state { color: var(--muted); }
.tab-count {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding-inline: 5px;
  align-items: center;
  justify-content: center;
  color: var(--on-brand);
  font-size: 12px;
  line-height: 1;
  background: var(--brand);
  border-radius: 999px;
}

.btn.ghost .tab-count {
  color: var(--page);
  background: var(--muted);
}
.btn.secondary:hover .tab-count {
  color: var(--brand);
  background: var(--surface);
}
.flush { margin: 0; }
.editor-toolbar {
  position: relative;
  margin-bottom: 14px;
}

.editor-tour-scrim {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: #0009;
}

.editor-tour-target {
  position: relative;
  z-index: 91;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 0 0 4px var(--brand), 0 8px 30px #0007;
}

.editor-tour {
  --editor-tour-arrow-position: 50%;
  position: fixed;
  z-index: 92;
  width: min(360px, calc(100vw - 24px));
  padding: 20px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: 16px;
  box-shadow: 0 20px 50px #0008;
}

.editor-tour h2 { padding-right: 28px; margin: 8px 0; font-size: 22px; }
.editor-tour > p:not(.editor-tour-progress) { margin: 0; color: var(--muted); }
.editor-tour-progress { margin: 0; color: var(--brand); font-size: 13px; font-weight: 800; }
.editor-tour-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 999px;
}
.editor-tour-close:hover { background: var(--secondary); }
.editor-tour-close:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand), transparent 55%); }
.editor-tour-close .dialog-close-icon { margin: auto; }
.editor-tour-actions { margin-top: 20px; }
.editor-tour-arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--surface);
  border: 1px solid var(--field-line);
  transform: rotate(45deg);
}
.editor-tour[data-placement="below"] .editor-tour-arrow {
  top: -8px;
  left: calc(var(--editor-tour-arrow-position) - 7px);
  border-right: 0;
  border-bottom: 0;
}
.editor-tour[data-placement="above"] .editor-tour-arrow {
  bottom: -8px;
  left: calc(var(--editor-tour-arrow-position) - 7px);
  border-top: 0;
  border-left: 0;
}
.editor-tour[data-placement="right"] .editor-tour-arrow {
  top: calc(var(--editor-tour-arrow-position) - 7px);
  left: -8px;
  border-top: 0;
  border-right: 0;
}
.editor-tour[data-placement="left"] .editor-tour-arrow {
  top: calc(var(--editor-tour-arrow-position) - 7px);
  right: -8px;
  border-bottom: 0;
  border-left: 0;
}

.editor-toolbar-control { position: relative; }

.editor-toolbar-popover {
  position: absolute;
  z-index: 8;
  top: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 48px));
  padding: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: 14px;
  box-shadow: 0 0 12px -2px #0008;
}

.editor-toolbar-popover::before {
  position: absolute;
  top: -8px;
  right: 22px;
  width: 14px;
  height: 14px;
  content: "";
  background: var(--surface);
  border-top: 1px solid var(--field-line);
  border-left: 1px solid var(--field-line);
  border-radius: 4px 0 0;
  transform: rotate(45deg);
}

.editor-toolbar-popover > strong { display: block; margin-bottom: 12px; }
.site-search-settings,
.site-analytics-settings {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.site-search-settings > strong,
.site-analytics-settings > strong { font-size: 15px; }
.site-search-settings > p,
.site-analytics-settings > p { margin: 0; }
.site-search-settings .field span,
.site-analytics-settings .field span { font-size: 14px; }
.calendar-upcoming-count { margin: 12px 0 0; }
.branding-plan-message { margin: 12px 0 0; }
.event-count-summary { display: flex; align-items: center; gap: 7px; }
.event-count-badge {
  display: inline-grid;
  min-width: 1.75em;
  height: 1.75em;
  place-items: center;
  padding-inline: .45em;
  color: var(--on-brand);
  font-size: .8em;
  font-weight: 800;
  line-height: 1;
  background: var(--brand);
  border-radius: 999px;
}
.switch-field { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-switch {
  appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  min-width: 44px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: var(--field-line);
  border: 0;
  border-radius: 999px;
  transition: background-color var(--colour-effect-duration) ease;
}

.toggle-switch::before {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px #0005;
  transition: transform var(--button-effect-duration) ease;
}

.toggle-switch:checked { background: var(--success); }
.toggle-switch:checked::before { transform: translateX(18px); }
.toggle-switch:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand), transparent 55%);
  outline-offset: 2px;
}
.toggle-switch:disabled { cursor: not-allowed; opacity: .55; }
.appearance-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: flex-end;
  touch-action: manipulation;
  padding: 12px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--shadow);
}

.appearance-bar input,
.appearance-bar select,
.appearance-bar button { touch-action: manipulation; }

:is(
  .theme-preset-toggle,
  .appearance-colour input,
  .appearance-font select,
  .image-toggle,
  .alignment-toggle,
  .edit-guides-toggle,
  .site-settings-toggle,
  .calendar-settings-toggle
):not(:disabled):hover {
  border-color: var(--brand);
}

.appearance-group {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: flex-end;
}

.appearance-group-colours .theme-presets { margin-right: 22px; }
.appearance-group-calendar { margin-left: auto; }
.appearance-group-calendar.is-on-own-row { margin-left: 0; }
.appearance-group-calendar.is-on-own-row .editor-toolbar-popover {
  right: auto;
  left: 0;
}
.appearance-group-calendar.is-on-own-row .editor-toolbar-popover::before {
  right: auto;
  left: 22px;
}
.site-settings-toggle,
.calendar-settings-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 11px;
}

.site-settings-icon {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
  background: currentColor;
  -webkit-mask: url("/assets/icon-hamburger.svg") center / contain no-repeat;
  mask: url("/assets/icon-hamburger.svg") center / contain no-repeat;
}

.calendar-settings-icon {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
  background: currentColor;
  -webkit-mask: url("/assets/icon-calendar.svg") center / contain no-repeat;
  mask: url("/assets/icon-calendar.svg") center / contain no-repeat;
}

.appearance-control {
  display: grid;
  gap: 4px;
  margin: 0;
}

.appearance-control > span,
.appearance-control legend {
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.theme-presets { position: relative; }

.theme-preset-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 11px;
}

.theme-preset-toggle-icon {
  display: block;
  width: 30px;
  height: 30px;
  margin: auto;
}

.theme-preset-toggle:focus-visible,
.site-settings-toggle:focus-visible,
.calendar-settings-toggle:focus-visible,
.theme-preset:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand), transparent 55%);
  outline-offset: 2px;
}

.theme-preset-popover {
  position: absolute;
  z-index: 5;
  top: 52px;
  left: -4px;
  width: min(460px, calc(100vw - 48px));
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: 14px;
  box-shadow: 0 0 12px -2px #0008;
}

.theme-preset-popover::before {
  position: absolute;
  top: -8px;
  left: 16px;
  width: 14px;
  height: 14px;
  content: "";
  background: var(--surface);
  border-top: 1px solid var(--field-line);
  border-left: 1px solid var(--field-line);
  border-radius: 4px 0 0;
  transform: rotate(45deg);
}

.theme-preset-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
}

.theme-preset-heading strong { font-size: 14px; }
.theme-preset-heading span { color: var(--muted); font-size: 12px; font-weight: 400; }

.theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.theme-preset {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 10px;
}

.theme-preset:hover { background: var(--page); }
.theme-preset[aria-pressed="true"] { background: var(--secondary); border-color: var(--brand); }

.theme-preset-preview {
  position: relative;
  display: block;
  height: 42px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink), transparent 82%);
  border-radius: 7px;
}

.theme-preset-preview > span {
  position: absolute;
  top: 11px;
  left: 10px;
  width: 40px;
  height: 5px;
  padding: 0;
  background: currentColor;
  border-radius: 4px;
}

.theme-preset-preview > span::after {
  position: absolute;
  top: 10px;
  left: 0;
  width: 28px;
  height: 4px;
  content: "";
  background: currentColor;
  border-radius: 4px;
  opacity: .55;
}

.theme-preset-preview > i {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 17px;
  height: 7px;
  border-radius: 6px;
}

.theme-preset-clear .theme-preset-preview { color: #172033; background: #fff; }
.theme-preset-clear .theme-preset-preview > i { background: #2762e9; }
.theme-preset-warm .theme-preset-preview { color: #4a2100; background: #ffedcf; }
.theme-preset-warm .theme-preset-preview > i { background: #b9380b; }
.theme-preset-sage .theme-preset-preview { color: #133c2b; background: #e1f3e4; }
.theme-preset-sage .theme-preset-preview > i { background: #166c48; }
.theme-preset-night .theme-preset-preview { color: #f4f7fb; background: #101820; }
.theme-preset-night .theme-preset-preview > i { background: #60a5fa; }
.theme-preset-ocean .theme-preset-preview { color: #f5f9ff; background: #071a33; }
.theme-preset-ocean .theme-preset-preview > i { background: #5ee6ff; }
.theme-preset-forest .theme-preset-preview { color: #f2fff7; background: #0b2418; }
.theme-preset-forest .theme-preset-preview > i { background: #86efac; }
.theme-preset-plum .theme-preset-preview { color: #fff7ff; background: #2b1237; }
.theme-preset-plum .theme-preset-preview > i { background: #f0abfc; }
.theme-preset-pop .theme-preset-preview { color: #25f4ee; background: #000; }
.theme-preset-pop .theme-preset-preview > i { background: #fe2c55; }
.theme-preset-black .theme-preset-preview { color: #fff; background: #000; }
.theme-preset-black .theme-preset-preview > i { background: #fff; }
.theme-preset-berry .theme-preset-preview { color: #541229; background: #ffe0eb; }
.theme-preset-berry .theme-preset-preview > i { background: #b91655; }
.theme-preset-ink .theme-preset-preview { color: #27184d; background: #e9e3ff; }
.theme-preset-ink .theme-preset-preview > i { background: #6220c5; }
.theme-preset-stone .theme-preset-preview { color: #292524; background: #e7e5e4; }
.theme-preset-stone .theme-preset-preview > i { background: #57534e; }
.theme-preset-signal .theme-preset-preview { color: #fff7ed; background: #a62c17; }
.theme-preset-signal .theme-preset-preview > i { background: #fde68a; }
.theme-preset-electric .theme-preset-preview { color: #fff; background: #155eef; }
.theme-preset-electric .theme-preset-preview > i { background: #fff06a; }
.theme-preset-citrus .theme-preset-preview { color: #211a00; background: #ffd51e; }
.theme-preset-citrus .theme-preset-preview > i { background: #5b21b6; }

.appearance-colour {
  position: relative;
  display: block;
}

.appearance-colour input {
  display: block;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 3px;
  overflow: hidden;
  cursor: pointer;
  border-radius: 11px;
}

.appearance-colour input::-webkit-color-swatch-wrapper { padding: 0; }
.appearance-colour input::-webkit-color-swatch { border: 0; border-radius: 7px; }
.appearance-colour input::-moz-color-swatch { border: 0; border-radius: 7px; }

.appearance-colour-icon {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background: var(--colour-icon, #fff);
}

.appearance-colour-background .appearance-colour-icon {
  mask: url("/assets/icon-paintbrush.svg") center / contain no-repeat;
}

.appearance-colour-text .appearance-colour-icon {
  mask: url("/assets/icon-text.svg") center / contain no-repeat;
}

.appearance-colour-accent .appearance-colour-icon {
  mask: url("/assets/icon-link.svg") center / contain no-repeat;
}

.appearance-font select {
  width: auto;
  min-width: 110px;
  height: 40px;
  padding-block: 7px;
}

.image-toggle {
  appearance: none;
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  margin: 0;
  color: var(--muted);
  cursor: pointer;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 11px;
}

.image-toggle::before {
  display: block;
  width: 24px;
  height: 24px;
  margin: 7px;
  content: "";
  background: currentColor;
  mask: url("/assets/icon-photo.svg") center / contain no-repeat;
}

.image-toggle::after {
  position: absolute;
  top: 18px;
  left: 5px;
  width: 28px;
  height: 2px;
  content: "";
  background: currentColor;
  border-radius: 999px;
  transform: rotate(-45deg);
  transition: opacity var(--button-effect-duration) ease;
}

.image-toggle:checked,
.calendar-settings-toggle.is-enabled,
.edit-guides-toggle[aria-pressed="true"] {
  color: var(--on-brand);
  background: var(--brand);
  border-color: var(--field-line);
  box-shadow: inset 0 0 0 3px var(--field);
}

.image-toggle:checked::after { opacity: 0; }

.image-toggle:focus-visible,
.alignment-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand), transparent 55%);
  outline-offset: 2px;
}

.alignment-toggle {
  position: relative;
  width: 98px;
  height: 40px;
  padding: 0;
  color: var(--brand);
  cursor: pointer;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 11px;
}

.alignment-marker {
  position: absolute;
  top: 5px;
  left: 9px;
  width: 28px;
  height: 28px;
  background: currentColor;
  transition: transform 220ms ease;
}

.image-position-marker {
  -webkit-mask: url("/assets/icon-photo.svg") center / contain no-repeat;
  mask: url("/assets/icon-photo.svg") center / contain no-repeat;
}

.edit-guides-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  margin-left: 22px;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 11px;
}

.edit-guides-icon {
  position: absolute;
  inset: 8px;
  background: currentColor;
  -webkit-mask: url("/assets/icon-selection.svg") center / contain no-repeat;
  mask: url("/assets/icon-selection.svg") center / contain no-repeat;
}

.edit-guides-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand), transparent 55%);
  outline-offset: 2px;
}

.alignment-toggle[data-position="center"] .alignment-marker { transform: translateX(25px); }
.alignment-toggle[data-position="right"] .alignment-marker { transform: translateX(50px); }
.alignment-toggle:disabled { cursor: default; opacity: .45; }

.dashboard-tabs {
  margin-top: 18px;
  overflow-x: auto;
}

.dashboard-tabs .btn { flex: 0 0 auto; }

.btn.danger-button {
  color: var(--on-brand);
  background: var(--danger);
}

dialog {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 50px var(--popover-shadow);
}

dialog::backdrop { background: #0008; }
.dialog-content { padding: 22px; }
.dialog-content p { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
#removeSocialLink[hidden] { display: none; }
.social-link-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.social-link-dialog-title { display: flex; gap: 9px; align-items: center; }
.social-link-dialog-title-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background: currentColor;
  -webkit-mask: url("/assets/icon-link.svg") center / contain no-repeat;
  mask: url("/assets/icon-link.svg") center / contain no-repeat;
}

.link-network-tabs { margin: 16px 0; }
.link-network-tabs .btn { flex: 1; }
.link-network-panel[hidden] { display: none; }

.social-network-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.social-network-option {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 8px;
  color: var(--ink);
  cursor: pointer;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 11px;
}

.social-network-option:hover { border-color: var(--brand); }
.social-network-option[aria-pressed="true"] {
  color: var(--brand);
  background: var(--field);
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.social-network-option-icon {
  --social-icon: #000;
  width: 30px;
  height: 30px;
}

:root[data-theme="dark"] .social-network-option-icon { --social-icon: #fff; }

.social-network-option[data-network="website"] .social-network-option-icon {
  background-color: currentColor;
  -webkit-mask: url("/assets/icon-link.svg") center / contain no-repeat;
  mask: url("/assets/icon-link.svg") center / contain no-repeat;
}
.social-network-option[data-network="instagram"] .social-network-option-icon {
  background: url("/assets/social/instagram.svg") center / contain no-repeat;
}
.social-network-option[data-network="twitter"] .social-network-option-icon {
  background-color: currentColor;
  -webkit-mask: url("/assets/social/x.svg") center / 82% no-repeat;
  mask: url("/assets/social/x.svg") center / 82% no-repeat;
}
.social-network-option[data-network="tiktok"] .social-network-option-icon {
  background: url("/assets/social/tiktok.png") center / 124% no-repeat;
}
.social-network-option[data-network="snapchat"] .social-network-option-icon {
  background: url("/assets/social/snapchat.svg") center / contain no-repeat;
}
.social-network-option[data-network="threads"] .social-network-option-icon {
  background-color: currentColor;
  -webkit-mask: url("/assets/social/threads.svg") center / 82% no-repeat;
  mask: url("/assets/social/threads.svg") center / 82% no-repeat;
}
.social-network-option[data-network="facebook"] .social-network-option-icon {
  background: url("/assets/social/facebook.svg") center / contain no-repeat;
}
.social-network-option[data-network="youtube"] .social-network-option-icon {
  background: url("/assets/social/youtube.svg") center / contain no-repeat;
}
.social-network-option[data-network="discord"] .social-network-option-icon {
  background: url("/assets/social/discord.svg") center / contain no-repeat;
}
.social-network-option[data-network="appstore"] .social-network-option-icon,
.social-network-option[data-network="googleplay"] .social-network-option-icon,
.social-network-option[data-network="microsoftstore"] .social-network-option-icon,
.social-network-option[data-network="nintendo"] .social-network-option-icon,
.social-network-option[data-network="playstation"] .social-network-option-icon,
.social-network-option[data-network="xbox"] .social-network-option-icon,
.social-network-option[data-network="steam"] .social-network-option-icon {
  display: grid;
  place-items: center;
  background: none;
  color: var(--social-icon);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.social-network-option[data-network="linkedin"] .social-network-option-icon { background: url("/assets/social/linkedin.png") center / contain no-repeat; }
.social-network-option[data-network="appstore"] .social-network-option-icon::before { content: "A"; }
.social-network-option[data-network="googleplay"] .social-network-option-icon::before { content: "▶"; font-size: 20px; }
.social-network-option[data-network="microsoftstore"] .social-network-option-icon::before { content: "⊞"; font-size: 27px; }
.social-network-option[data-network="nintendo"] .social-network-option-icon::before { content: "N"; }
.social-network-option[data-network="playstation"] .social-network-option-icon::before { content: "PS"; font-size: 17px; }
.social-network-option[data-network="xbox"] .social-network-option-icon::before { content: "X"; }
.social-network-option[data-network="steam"] .social-network-option-icon::before { content: "S"; }

.social-link-fields { margin-top: 18px; }
#socialLinkNameField[hidden] { display: none; }
.social-link-check-note { margin: 18px 0 0; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.social-link-check-note::before { width: 22px; height: 22px; flex-basis: 22px; }
.social-address-control { display: flex; min-width: 0; }
.social-address-control input { min-width: 0; border-radius: 0 9px 9px 0; }
.field .social-address-prefix {
  display: flex;
  align-items: center;
  padding: 0 11px;
  color: var(--muted);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  white-space: nowrap;
}
.social-link-actions { align-items: center; }
.dialog-close {
  width: 40px;
  min-height: 40px;
  padding: 0;
  margin-left: auto;
}

.dialog-close-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.dialog-close-icon::before,
.dialog-close-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  content: "";
  background: currentColor;
  border-radius: 999px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-close-icon::after { transform: translate(-50%, -50%) rotate(-45deg); }

.site-address-editor { display: grid; gap: 12px; }
.site-address-status {
  display: inline-flex;
  min-height: 22px;
  gap: 6px;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
}
.site-address-status.is-checking::before,
.site-address-status.is-available::before {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  content: "";
}
.site-address-status.is-checking::before {
  background: currentColor;
  -webkit-mask: url("/assets/icon-spinner.svg") center / contain no-repeat;
  mask: url("/assets/icon-spinner.svg") center / contain no-repeat;
  animation: save-state-spin .7s linear infinite;
}
.site-address-status.is-available::before {
  background: var(--success);
  -webkit-mask: url("/assets/icon-checkmark.svg") center / contain no-repeat;
  mask: url("/assets/icon-checkmark.svg") center / contain no-repeat;
}

.site-address-control { display: flex; min-width: 0; }
.site-address-control input { min-width: 0; border-radius: 9px 0 0 9px; }
.site-address-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  white-space: nowrap;
}

iframe {
  width: 100%;
  height: calc(100vh - 115px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.editor-canvas { height: max(680px, calc(100vh - 180px)); }

dialog.events-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
}

.events-dialog .dialog-content {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.events-dialog-heading {
  position: sticky;
  z-index: 1;
  top: -22px;
  padding: 22px 0 12px;
  background: var(--surface);
}

.editor-event-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 28px;
}

.editor-event {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  margin: 0;
  background: var(--field);
}

.event-date-tile {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 22px;
  align-self: start;
  width: 64px;
  height: 64px;
  overflow: hidden;
  color: var(--on-brand);
  text-align: center;
  background: var(--danger);
  border-radius: 10px;
}

.event-date-day { display: grid; place-items: center; padding-top: 3px; font-size: 29px; font-weight: 850; line-height: .9; }
.event-date-month {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  background: color-mix(in srgb, var(--danger), black 28%);
}
.event-details { min-width: 0; align-self: start; }
.event-details b { display: block; overflow-wrap: anywhere; }
.event-actions { display: flex; flex: 0 0 auto !important; flex-wrap: wrap; gap: 9px; }

#eventsPage {
  max-width: 1120px;
  margin-inline: auto;
}
.events-page-navigation { margin-bottom: 18px; }
.events-page-toolbar { align-items: center; margin-bottom: 18px; }
.events-page-heading { min-width: 140px; }
.events-page-heading h1 { font-size: clamp(2rem, 5vw, 2.5rem); line-height: 1; }
.events-page-heading p { margin-top: 9px; color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1.25; }
.events-page-summary { margin-bottom: 10px; }
.events-pagination { justify-content: center; margin-top: 18px; }

#domainsPage {
  max-width: 1120px;
  margin-inline: auto;
}

.domains-page-navigation { margin-bottom: 18px; }
.domains-page-toolbar { align-items: center; margin-bottom: 18px; }
.domains-page-heading { min-width: 140px; }
.domains-page-heading h1 { font-size: clamp(2rem, 5vw, 2.5rem); line-height: 1; }
.domains-page-heading p { margin-top: 9px; color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1.25; }
.domains-page-grid { display: grid; gap: 18px; }
.domains-section { min-width: 0; }
.domains-section h2 { margin-bottom: 6px; }
.domains-section-intro { margin: 0 0 18px; font-size: 15px; line-height: 1.5; }
.domains-form-actions { justify-content: space-between; }
.domains-form-status { min-height: 20px; margin: 10px 0 0; }
.custom-domain-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.custom-domain-list { display: grid; gap: 12px; margin-top: 18px; }
.custom-domain-card {
  min-width: 0;
  padding: 16px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
}

#analyticsPage {
  max-width: 1120px;
  margin-inline: auto;
}

.analytics-page-navigation { margin-bottom: 18px; }
.analytics-page-toolbar { align-items: center; gap: 16px; margin-bottom: 10px; }
.analytics-page-heading { min-width: 140px; }
.analytics-page-heading h1 { font-size: clamp(2rem, 5vw, 2.5rem); line-height: 1; }
.analytics-page-heading p { margin-top: 9px; color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1.25; }
.analytics-ranges { display: flex; flex-wrap: wrap; gap: 6px; }
.analytics-ranges .btn { min-width: 54px; padding: 8px 12px; }
.analytics-page-status { min-height: 20px; margin: 0 0 10px; }
.analytics-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.analytics-stat { display: grid; gap: 7px; padding: 18px 20px; }
.analytics-stat span { color: var(--muted); font-size: 14px; font-weight: 700; }
.analytics-stat strong { color: var(--ink); font-size: clamp(2rem, 7vw, 3rem); letter-spacing: -.04em; line-height: 1; }
.analytics-chart-card { padding: 20px; overflow: hidden; }
.analytics-chart-heading { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.analytics-chart-heading h2 { margin-bottom: 4px; }
.analytics-chart-heading p { margin: 0; }
.analytics-chart-legend { display: inline-flex; flex: 0 0 auto; gap: 7px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.analytics-chart-legend i { width: 18px; height: 3px; background: var(--brand); border-radius: 99px; }
.analytics-chart {
  position: relative;
  min-width: 0;
  border-radius: 10px;
  outline: none;
  touch-action: pan-y;
}
.analytics-chart:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand), transparent 55%); outline-offset: 4px; }
.analytics-chart svg { display: block; width: 100%; height: 300px; overflow: visible; }
.analytics-chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.analytics-chart-x-label,
.analytics-chart-y-label { fill: var(--muted); font-size: 11px; font-weight: 650; }
.analytics-area-start { stop-color: var(--brand); stop-opacity: .2; }
.analytics-area-end { stop-color: var(--brand); stop-opacity: .01; }
.analytics-chart-area { fill: url("#analyticsAreaGradient"); }
.analytics-chart-line {
  fill: none;
  stroke: var(--brand);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.analytics-chart-marker { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.analytics-chart-dot { fill: var(--surface); stroke: var(--brand); stroke-width: 3; vector-effect: non-scaling-stroke; }
.analytics-chart-tooltip {
  position: absolute;
  z-index: 2;
  width: max-content;
  max-width: min(260px, 80%);
  padding: 8px 10px;
  color: var(--field);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--popover-shadow);
  transform: translate(-50%, calc(-100% - 12px));
}
.analytics-chart-tooltip.is-right { transform: translate(-100%, calc(-100% - 12px)); }
.analytics-chart-tooltip.is-below { transform: translate(-50%, 12px); }
.analytics-chart-tooltip.is-right.is-below { transform: translate(-100%, 12px); }
.analytics-chart-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  transform: translate(-50%, -50%);
}
.analytics-retention { margin: 12px 2px 0; }
#analyticsTrackingStatus { margin-top: 14px; }

@media (max-width: 520px) {
  .analytics-page-toolbar { align-items: flex-start; }
  .analytics-page-toolbar .spacer { display: none; }
  .analytics-ranges { width: 100%; }
  .analytics-ranges .btn { min-width: 0; flex: 1 1 0; }
  .analytics-chart-card { padding: 16px 10px; }
  .analytics-chart-heading { padding-inline: 6px; }
  .analytics-chart svg { height: 250px; }
}
.custom-domain-heading { align-items: flex-start; }
.custom-domain-heading h3 { margin: 0; overflow-wrap: anywhere; }
.custom-domain-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.custom-domain-detail { margin: 8px 0 0; font-size: 14px; }
.domain-status-pending { color: var(--warning-ink); background: var(--warning-surface); }
.domain-status-pending .site-status-icon::before { content: "…"; font-size: 18px; line-height: 10px; }
.dns-record-list { margin-top: 16px; }
.dns-record-list h3 { margin: 0 0 8px; font-size: 17px; }
.custom-domain-dns-help { margin: 6px 0; font-size: 14px; }
.dns-record { display: grid; grid-template-columns: 80px minmax(110px, .7fr) minmax(0, 2fr); margin: 0; border-top: 1px solid var(--line); }
.dns-record:last-child { border-bottom: 1px solid var(--line); }
.dns-record > div { min-width: 0; padding: 9px 10px; }
.dns-record dt { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.dns-record dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.dns-record code { color: var(--ink); font-size: 13px; user-select: all; }

@media (prefers-reduced-motion: reduce) {
  body,
  .top,
  .card,
  input,
  textarea,
  select,
  iframe,
  .btn,
  .guide-site-picker,
  .site-card-editable,
  .primary-nav a,
  .platform-footer a,
  .guide-card,
  h1,
  h2,
  h3,
  .mobile-menu nav a,
  .mobile-menu nav button,
  .toggle-switch,
  .toggle-switch::before,
  .image-toggle::after,
  .alignment-marker,
  .theme-invert-icon { transition: none; }
  :root.is-theme-changing { transition: none !important; }
  .btn.is-loading .button-spinner { animation: none; }
  .save-state.is-saving::before { animation: none; }
  .site-address-status.is-checking::before { animation: none; }
  .plan-badge::after { animation: none; }
}

#sites,
#deletedSiteList {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

#sites > .callout,
#deletedSites > .callout,
#deletedSiteList > .callout {
  width: fit-content;
  max-width: 100%;
}

#dashboard {
  max-width: 1120px;
  margin-inline: auto;
}

.dashboard-summary { margin-bottom: 28px; }
.email-verification-card {
  display: grid;
  gap: 16px;
  max-width: 680px;
}
.email-verification-card p { margin: 0; }
.email-verification-card strong { overflow-wrap: anywhere; }
.email-verification-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.email-verification-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}
.email-verification-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}
.dashboard-account-heading {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.dashboard-summary h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.5rem);
  line-height: 1;
}
.account-name-prompt {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  gap: 10px;
  align-items: end;
  max-width: 520px;
  margin-top: 18px;
}
.account-name-prompt .status { grid-column: 1 / -1; }
.account-name-prompt .field span,
#displayNamePromptInput {
  font-size: 18px;
  font-weight: 600;
}
#displayNamePromptInput,
#accountDisplayName {
  width: min(100%, 40ch);
  border-radius: 999px;
}
#accountEmailForm input[type="email"],
#accountEmailForm input[type="password"] { width: min(100%, 40ch); }
#accountDeletionForm input { width: 100%; }
.account-settings-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.account-settings-dialog h3 { margin: 0; font-size: 18px; }
.account-settings-section {
  min-width: 0;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.account-settings-section > .btn { justify-self: start; }
.account-settings-section p { margin: 0; }
.account-settings-section p,
.account-settings-section strong { overflow-wrap: anywhere; }
.plan-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 22px;
  overflow: hidden;
  color: #343a40;
  background: linear-gradient(145deg, #f5f6f7 0%, #b3b9be 52%, #e5e8ea 100%);
  border: 1px solid #747c83;
  border-radius: 999px;
  box-shadow:
    inset 0 2px 1px #fff,
    inset 0 -2px 2px #666e75,
    inset 2px 0 2px #ffffff8c,
    inset -2px 0 2px #59616942,
    0 2px 5px #1018202e;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1;
  text-shadow: 0 1px 0 #fff, 0 -1px 0 #606870;
  text-transform: uppercase;
}

.plan-badge-paid {
  color: #493300;
  background: linear-gradient(145deg, #fff2a8 0%, #c89524 52%, #f5d56b 100%);
  border-color: #886312;
  box-shadow:
    inset 0 2px 1px #fff7c8,
    inset 0 -2px 2px #80590d,
    inset 2px 0 2px #fff4b48c,
    inset -2px 0 2px #6d4d104d,
    0 2px 5px #3f2b082e;
  text-shadow: 0 1px 0 #fff1a8, 0 -1px 0 #76520b;
}

.plan-badge::after {
  content: "";
  position: absolute;
  top: -70%;
  bottom: -70%;
  left: -42%;
  width: 28%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #ffffff8f, transparent);
  transform: skewX(-28deg);
  animation: plan-badge-shine 4.5s ease-in-out infinite;
}
.dashboard-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.billing-summary-card {
  display: grid;
  gap: 5px;
  padding: 18px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.billing-summary-card strong { color: var(--ink); font-size: 22px; }
.billing-actions { flex-wrap: wrap; }

@keyframes plan-badge-shine {
  0%, 58% { transform: translateX(0) skewX(-28deg); }
  82%, 100% { transform: translateX(620%) skewX(-28deg); }
}
.dashboard-sites-heading { margin-bottom: 0; }
.dashboard-sites-heading h2 { font-size: 28px; }

.site-card {
  column-gap: 16px;
  padding: 16px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.site-card-editable {
  cursor: pointer;
  transition: background-color var(--colour-effect-duration) ease, border-color var(--colour-effect-duration) ease, box-shadow var(--colour-effect-duration) ease;
}

.site-card-editable:hover {
  background: var(--secondary);
  border-color: var(--brand);
  box-shadow: 0 4px 10px var(--popover-shadow);
}

.site-thumbnail {
  position: relative;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: 12px;
}

.site-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.site-thumbnail-swatches {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40px;
  height: 40px;
  overflow: hidden;
  pointer-events: none;
}
.site-thumbnail-swatches svg { display: block; width: 100%; height: 100%; }
.site-thumbnail-with-image .site-thumbnail-swatches { display: none; }
.site-thumbnail-colours .site-thumbnail-swatches { inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
.site-thumbnail-monogram { display: none; }
.site-thumbnail-monogram text { font: 800 1.08px/1 system-ui, sans-serif; letter-spacing: -.03px; }
.site-thumbnail-monogram-1 text { font-size: 1.2px; }
.site-thumbnail-monogram-3 text { font-size: .92px; }
.site-thumbnail-monogram-4 text { font-size: .8px; }
.site-thumbnail-monogram-multiline text { font-size: .76px; }
.site-thumbnail-colours .site-thumbnail-monogram { display: inline; }
.site-card-content {
  min-width: 140px;
  flex: 1 1 180px;
  transform: translateY(-1px);
}
.site-card-content > b {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.site-card-actions .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.site-card-actions .btn:not(:disabled):hover {
  text-shadow: 0 1px 1px color-mix(in srgb, var(--brand), black 45%);
}

.site-card-actions .btn.ghost:not(:disabled):hover {
  color: var(--on-brand);
  background: color-mix(in srgb, var(--brand), black 6%);
  border-color: color-mix(in srgb, var(--brand), black 6%);
}

.site-card-actions .btn.deleteSite:not(:disabled):hover {
  background: color-mix(in srgb, var(--danger), black 6%);
  border-color: color-mix(in srgb, var(--danger), black 6%);
  text-shadow: 0 1px 1px color-mix(in srgb, var(--danger), black 45%);
}

#imageLibrary {
  max-width: 1120px;
  margin-inline: auto;
}

.image-library-navigation { margin-bottom: 18px; }
.image-library-toolbar { align-items: center; }
.image-library-heading { min-width: 140px; }
.image-library-heading h1 { font-size: clamp(2rem, 5vw, 2.5rem); line-height: 1; }
.image-library-heading p {
  margin-top: 9px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}
.image-library-section-heading { flex-wrap: nowrap; margin: 28px 0 8px; }
.image-library-section-heading h2 { margin: 0; }
.image-library-heading-actions { display: flex; gap: 7px; margin-left: auto; }
.image-library-heading-actions.is-inactive { visibility: hidden; }
.image-library-heading-actions .btn { white-space: nowrap; }
.image-library-summary { margin-bottom: 14px; }
.image-library-summary .status { font-size: 14px; }
#imageLibraryStatus { min-height: 20px; margin: 10px 0; }

.image-drop-zone {
  display: flex;
  width: 100%;
  min-height: 98px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--surface);
  border: 2px dashed var(--field-line);
  border-radius: 14px;
  transition: color var(--colour-effect-duration) ease, background-color var(--colour-effect-duration) ease, border-color var(--colour-effect-duration) ease;
}
.image-drop-zone:not(:disabled):hover,
.image-drop-zone:not(:disabled):focus-visible {
  color: var(--ink);
  background: var(--secondary);
  border-color: var(--brand);
}
.image-drop-zone:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand), transparent 55%); outline-offset: 2px; }
.image-drop-zone:disabled { cursor: not-allowed; opacity: .55; }
.image-drop-zone-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background: currentColor;
  mask: url("/assets/icon-add.svg") center / contain no-repeat;
}

.image-upload-selection {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 2px solid var(--brand);
}
.image-upload-selection img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  background: var(--page);
  border-radius: 10px;
}
.image-upload-selection-copy { min-width: 0; }
.image-upload-selection-copy strong,
.image-upload-selection-copy span { display: block; overflow-wrap: anywhere; }
.image-upload-selection-copy span { margin-top: 4px; }
.image-upload-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}
#cancelImageUpload {
  min-width: 88px;
  padding-right: 18px;
  padding-left: 18px;
  white-space: nowrap;
}

.image-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.image-library-grid > .callout { grid-column: 1 / -1; justify-self: start; }
.image-library-item {
  position: relative;
  min-width: 0;
  padding: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  transition: background-color var(--colour-effect-duration) ease, border-color var(--colour-effect-duration) ease, box-shadow var(--colour-effect-duration) ease;
}
.image-library-item.is-selected { background: var(--secondary); border-color: var(--brand); }
.image-library-item:hover { border-color: var(--brand); box-shadow: 0 4px 10px var(--popover-shadow); }
.image-library-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--page);
  border: 0;
  border-radius: 10px;
}
.image-library-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-library-check {
  position: absolute;
  z-index: 2;
  top: 17px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: 999px;
  box-shadow: 0 2px 8px var(--popover-shadow);
}
.image-library-check input,
.image-delete-confirmation input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  margin: 0;
  accent-color: var(--brand);
}
.image-library-badges { display: flex; flex-wrap: wrap; gap: 6px; min-height: 27px; margin-top: 10px; }
.image-library-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  color: var(--secondary-ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  background: var(--secondary);
  border-radius: 999px;
}
.image-library-badge-live { color: var(--field); background: var(--success); }
.image-library-meta { margin: 7px 0 10px; overflow-wrap: anywhere; }
.image-library-use { width: 100%; }
.image-delete-confirmation { display: flex; gap: 10px; align-items: flex-start; color: var(--ink) !important; }
.image-delete-confirmation span { color: var(--ink); }
.image-delete-live-field { margin-top: 16px; }

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -.04em;
}

h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.hidden { display: none !important; }

.event {
  padding: 12px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.danger { color: var(--danger); }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.platform-footer {
  width: min(100% - var(--page-gutter-total), 1280px);
  margin: 36px auto 0;
  padding: 24px 0 30px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.platform-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 16px;
}

.platform-footer a {
  display: inline-block;
  padding: 7px 12px;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color var(--colour-effect-duration) ease, background-color var(--colour-effect-duration) ease, border-color var(--colour-effect-duration) ease;
}

.platform-footer a:hover,
.platform-footer a:focus-visible {
  color: var(--ink);
  background: var(--secondary);
  border-color: var(--brand);
}

.document-shell {
  width: min(100% - var(--page-gutter-total), 720px);
  flex: 1;
  margin: 0 auto;
  padding: 58px 0;
}
.document-shell:has(.pricing-grid) { width: min(100% - var(--page-gutter-total), 1120px); }
.pricing-toggle {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 34px 0 24px;
}
.pricing-toggle span { margin-left: 5px; color: var(--success); font-weight: 800; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
}
.pricing-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 28px var(--popover-shadow);
}
.pricing-card-featured {
  padding-block: 30px;
  border: 2px solid var(--brand);
}
.pricing-card[data-current="true"] { box-shadow: 0 0 0 3px var(--focus); }
.document-shell .pricing-card h2 { margin: 0; }
.pricing-card .pricing-limit { margin: 4px 0 18px; font-weight: 700; }
.pricing-card:not(.pricing-card-agency) .pricing-limit {
  color: var(--brand) !important;
  font-size: 20px !important;
  line-height: 1.2;
}
.pricing-price { margin: 0; color: var(--ink) !important; }
.pricing-price strong { color: inherit; font-size: 34px; }
.pricing-billing-note { min-height: 28px; margin-top: 0; font-size: 13px !important; }
.pricing-card .pricing-features {
  min-height: 228px;
  padding: 0;
  margin: 18px 0 24px;
  list-style: none;
}
.pricing-features li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.pricing-features li:first-child { border-top: 1px solid var(--line); }
.pricing-features strong { color: var(--success); font-size: 18px; }
.pricing-features .is-not-included { color: var(--muted); }
.pricing-select { width: 100%; margin-top: auto; }
.pricing-popular {
  position: absolute;
  top: -13px;
  left: 50%;
  padding: 4px 9px;
  margin: 0;
  color: var(--field);
  background: var(--brand);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}
.pricing-agency { margin-top: 20px; }
.pricing-card-agency {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(150px, 190px);
  gap: 20px;
  align-items: center;
  padding-block: 18px;
}
.pricing-agency-eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.document-shell .pricing-card-agency h2 { font-size: 24px; }
.pricing-card-agency .pricing-limit { margin: 2px 0 0; }
.pricing-agency-cost { min-width: 150px; text-align: right; }
.pricing-card-agency .pricing-price strong { font-size: 28px; }
.pricing-card-agency .pricing-billing-note { min-height: 0; margin: 0; }
.pricing-card-agency .pricing-select { width: 100%; margin: 0; }
.pricing-status { min-height: 24px; text-align: center; }
.pricing-reassurance {
  margin: 20px 0 0;
  color: var(--ink) !important;
  font-weight: 700;
  text-align: center;
}
.pricing-reassurance span { margin: 0 6px; color: var(--muted); }
.pricing-footnote { margin-top: 8px; text-align: center; }
.pricing-faq {
  width: min(100%, 760px);
  margin: 54px auto 0;
}
.document-shell .pricing-faq h2 { margin-bottom: 18px; text-align: center; }
.pricing-faq details { border-top: 1px solid var(--line); }
.pricing-faq details:last-child { border-bottom: 1px solid var(--line); }
.pricing-faq summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px 2px;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.pricing-faq summary::-webkit-details-marker { display: none; }
.pricing-faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.pricing-faq details[open] summary::after { content: "−"; }
.pricing-faq details p { margin: -3px 34px 18px 2px; }

.home-shell {
  --workspace-page-gap: 40px;
  --workspace-content-width: min(calc(100% - var(--page-gutter-total)), 1120px);
  position: relative;
  width: 100%;
  flex: 1;
  overflow-x: hidden;
}

.system-notice {
  display: flex;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: center;
  padding: 12px var(--page-gutter);
  color: var(--warning-ink);
  background: var(--warning-surface);
  border-bottom: 1px solid var(--warning-line);
}

.system-notice span { color: inherit; }

.maintenance-shell { margin-block: auto; }
.maintenance-actions { justify-content: flex-start; margin-top: 28px; }

@media (max-width: 640px) {
  .system-notice { display: grid; }
}

.home-shell > .home-hero,
.home-shell > #dashboard,
.home-shell > #imageLibrary,
.home-shell > #eventsPage,
.home-shell > #domainsPage,
.home-shell > #analyticsPage,
.home-shell > #editor,
.home-shell > .home-guides {
  width: var(--workspace-content-width);
  margin-inline: auto;
}

@supports (overflow: clip) {
  .home-shell { overflow-x: clip; }
}

.home-shell > #dashboard,
.home-shell > #imageLibrary,
.home-shell > #eventsPage,
.home-shell > #domainsPage,
.home-shell > #analyticsPage,
.home-shell > #editor {
  padding: 48px 0 72px;
}

.home-shell > .workspace-panel-inactive {
  position: absolute;
  inset: 0;
  width: var(--workspace-content-width);
  margin-inline: auto;
  opacity: 0;
  pointer-events: none;
}

.home-shell > #dashboard.workspace-panel-inactive {
  transform: translateX(calc(-100% - var(--workspace-page-gap)));
}

.home-shell > #imageLibrary.workspace-panel-inactive {
  transform: none;
}

.home-shell.workspace-transitioning > .workspace-transition-outgoing {
  position: absolute;
  inset: 0;
  width: var(--workspace-content-width);
  margin-inline: auto;
}

.workspace-transition-outgoing,
.workspace-transition-incoming {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

html[data-workspace-transition="forward"] .workspace-transition-outgoing { z-index: 1; }
html[data-workspace-transition="forward"] .workspace-transition-incoming { position: relative; z-index: 2; }
html[data-workspace-transition="back"] .workspace-transition-outgoing { z-index: 2; }
html[data-workspace-transition="back"] .workspace-transition-incoming { position: relative; z-index: 1; }

html[data-workspace-transition="forward"] .workspace-transition-outgoing {
  animation: workspace-forward-out 500ms cubic-bezier(.4, 0, .2, 1) both;
}

html[data-workspace-transition="forward"] .workspace-transition-incoming {
  animation: workspace-forward-in 500ms cubic-bezier(.4, 0, .2, 1) both;
}

html[data-workspace-transition="back"] .workspace-transition-outgoing {
  animation: workspace-back-out 500ms cubic-bezier(.4, 0, .2, 1) both;
}

html[data-workspace-transition="back"] .workspace-transition-incoming {
  animation: workspace-back-in 500ms cubic-bezier(.4, 0, .2, 1) both;
}

html[data-workspace-transition="back"] #editor.workspace-transition-incoming {
  opacity: 1;
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
  will-change: transform;
  animation: workspace-back-editor-in 500ms cubic-bezier(.4, 0, .2, 1) both;
}

html[data-workspace-transition="back"] .home-shell.workspace-transition-preparing > #editor.workspace-transition-incoming {
  transform: none;
  will-change: auto;
  animation: none;
}

.home-shell.workspace-transition-preparing > .workspace-transition-outgoing {
  animation-play-state: paused;
}

@keyframes workspace-forward-out {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(calc(-100% - var(--workspace-page-gap)), 0, 0); }
}

@keyframes workspace-forward-in {
  from { opacity: 0; transform: translate3d(calc(100% + var(--workspace-page-gap)), 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes workspace-back-out {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(calc(100% + var(--workspace-page-gap)), 0, 0); }
}

@keyframes workspace-back-in {
  from { opacity: 0; transform: translate3d(calc(-100% - var(--workspace-page-gap)), 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes workspace-back-editor-in {
  from { opacity: 1; transform: translateX(calc(-100% - var(--workspace-page-gap))); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-transition-outgoing,
  .workspace-transition-incoming { animation: none !important; }
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
  gap: clamp(40px, 8vw, 110px);
  align-items: center;
  padding: 80px 0 96px;
}

.home-intro h1 {
  max-width: 720px;
  margin: 8px 0 22px;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: .96;
}

.home-intro > p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-weight: 800;
}

.home-auth { width: 100%; margin: 0; }

body.login-page .home-shell {
  display: grid;
  place-items: center;
}

body.login-page .home-hero {
  width: min(100%, 420px);
  grid-template-columns: 1fr;
  padding: 48px 0;
}

.home-guides {
  padding: 64px 0 72px;
  border-top: 1px solid var(--line);
}

body.authenticated .home-shell > #dashboard { padding-bottom: 40px; }
body.authenticated .home-guides {
  margin-top: 40px;
  padding-top: 40px;
}

.home-guides-heading { max-width: 620px; }

.home-guides-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
}

.home-guides-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: var(--ink);
  mask: url('/assets/icon-guides.svg') center / contain no-repeat;
}

body.authenticated .home-guides-heading h2 { font-size: 28px; }

.home-guides-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.home-guides-heading > p:last-child {
  color: var(--muted);
  font-size: 17px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.guide-card {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  text-decoration: none;
  transition: border-color var(--colour-effect-duration) ease, transform var(--button-effect-duration) ease;
}

.guide-card:hover,
.guide-card:focus-visible {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.guide-card > strong {
  font-size: 18px;
  line-height: 1.3;
}

.guide-card > span:not(.guide-card-icon) {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-card-icon {
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  background: var(--muted);
}

.guide-card-icon-images {
  mask: url("/assets/icon-photo.svg") center / contain no-repeat;
}

.guide-card-icon-domains {
  mask: url("/assets/icon-domains.svg") center / contain no-repeat;
}

.guide-card-icon-paintbrush {
  mask: url("/assets/icon-paintbrush.svg") center / contain no-repeat;
}

.guide-card-with-icon {
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 5px;
}

.guide-card-with-icon .guide-card-icon {
  grid-row: 1 / 3;
  align-self: center;
  margin-bottom: 0;
}

.guide-card-with-icon > strong,
.guide-card-with-icon > span:not(.guide-card-icon) { grid-column: 2; }

.document-shell h1 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: clamp(2rem, 7vw, 3.5rem);
}

.document-heading-icon {
  display: inline-block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  background: var(--ink);
}

.document-heading-icon-images {
  mask: url("/assets/icon-photo.svg") center / contain no-repeat;
}

.document-heading-icon-paintbrush {
  mask: url("/assets/icon-paintbrush.svg") center / contain no-repeat;
}

.document-heading-icon-domains {
  mask: url("/assets/icon-domains.svg") center / contain no-repeat;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a { color: inherit; }

.document-shell h2 {
  margin-top: 42px;
  font-size: 26px;
}

.document-shell p,
.document-shell li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.guide-action .btn {
  display: inline-block;
  text-decoration: none;
}

.guide-site-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.guide-site-picker {
  position: relative;
  display: block;
  border-radius: 25px;
  transition: box-shadow var(--colour-effect-duration) ease;
}

.guide-site-picker.is-open {
  overflow: hidden;
  background: var(--surface);
  border-radius: 25px;
  box-shadow: 0 0 0 2px var(--brand);
}

.guide-action .guide-site-picker-button {
  display: inline-flex;
  width: 100%;
  height: 50px;
  padding-inline: 16px;
  font-size: 16px;
  justify-content: space-between;
}

.guide-site-picker-button.is-open {
  height: 50px;
  border: 1px solid transparent;
  border-bottom-color: var(--field-line);
  border-radius: 0;
  box-shadow: none;
}

.guide-site-picker-button.is-open:focus-visible { outline: 0; }

.guide-site-picker-button.btn.is-open:hover {
  border-color: transparent;
  border-bottom-color: var(--field-line);
  box-shadow: none;
}

.guide-site-picker-button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.guide-site-picker-button:disabled { cursor: default; }
.guide-site-picker-button:disabled svg { display: none; }

.guide-site-options {
  position: static;
  width: 100%;
  max-height: 220px;
  padding: 0;
  overflow-y: auto;
  background: var(--surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.guide-site-option {
  display: block;
  width: 100%;
  padding: 12px 16px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.guide-site-option:hover,
.guide-site-option:focus-visible,
.guide-site-option[aria-selected="true"] {
  color: var(--secondary-ink);
  background: var(--secondary);
}

.guide-site-form .btn { justify-self: start; }

.callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  color: var(--callout-ink) !important;
  font-size: 16px;
  line-height: 1.7;
  border: 1px solid;
  border-radius: 10px;
}

.callout::before {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  background: currentColor;
  border-radius: 0;
}

.callout > span { flex: 1; }

.callout-content p { margin: 0; }
.callout-content p + p { margin-top: 10px; }
.callout + .callout { margin-top: 12px; }

.callout-info {
  color: var(--info-ink) !important;
  background: var(--info-surface);
  border-color: var(--info-line);
}

.callout-info::before {
  content: "";
  color: var(--info-icon);
  mask: url("/assets/icon-info.svg") center / contain no-repeat;
}

.callout-warning {
  color: var(--warning-ink) !important;
  background: var(--warning-surface);
  border-color: var(--warning-line);
}

.callout-warning::before {
  content: "";
  color: var(--warning-icon);
  mask: url("/assets/icon-warning.svg") center / contain no-repeat;
}

.callout-info,
.callout-warning { color: var(--callout-ink) !important; }

.callout.preview-help {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 14px;
  line-height: 1.45;
}

.callout.home-screen-prompt {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  margin: 18px 0;
  line-height: 1.45;
}

.callout.terms-update-notice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 28px;
  line-height: 1.45;
}

.terms-update-actions { flex-wrap: nowrap; }
.terms-update-status { grid-column: 2 / -1; }

.preview-help[hidden] { display: none; }
.home-screen-prompt[hidden] { display: none; }
.terms-update-notice.hidden { display: none; }
.preview-help-mobile { display: none; }
.preview-help .btn { flex: 0 0 auto; }

@media (max-width: 640px) {
  .callout.terms-update-notice { grid-template-columns: 28px minmax(0, 1fr); }
  .terms-update-actions,
  .terms-update-status { grid-column: 2; }
}

.document-updated { font-size: 14px !important; }

.storage-list {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}

.storage-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.storage-card > div { flex: 1; }
.storage-card strong { display: block; margin-bottom: 4px; }
.storage-card p { margin: 0; font-size: 14px; }
.storage-card .btn[hidden] { display: none; }

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: auto;
  }

  .primary-nav,
  .desktop-action:not(.desktop-start) { display: none; }

  .header-actions .desktop-start { order: 2; }
  .header-actions .mobile-menu { order: 3; }

  .mobile-menu { display: block; }
  body.authenticated .mobile-menu { display: none; }

  .mobile-menu summary {
    list-style: none;
    user-select: none;
  }

  .mobile-menu summary::-webkit-details-marker { display: none; }

  .mobile-menu nav {
    position: absolute;
    z-index: 10;
    top: calc(100% + 8px);
    right: 12px;
    width: min(280px, calc(100vw - 24px));
    display: grid;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px var(--popover-shadow);
  }

  .guide-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card-featured { padding-block: 24px; }
  .pricing-card-agency {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .pricing-agency-cost { text-align: left; }

  .mobile-menu nav a,
  .mobile-menu nav button {
    padding: 12px;
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 8px;
    transition: background-color var(--colour-effect-duration) ease;
  }

  .mobile-menu nav a:hover,
  .mobile-menu nav button:hover { background: var(--secondary); }
}

@media (max-width: 640px) {

  .callout.preview-help { grid-template-columns: 28px minmax(0, 1fr); }
  .callout.home-screen-prompt { grid-template-columns: 28px minmax(0, 1fr); }
  .preview-help-wide { display: none; }
  .preview-help-mobile { display: inline; }
  .preview-help .btn { grid-column: 2; justify-self: start; }
  .home-screen-prompt .btn { grid-column: 2; justify-self: start; }

  .home-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 48px 0;
  }

  .home-intro h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .home-auth {
    width: min(100%, 420px);
    margin-inline: auto;
  }
  .split { grid-template-columns: 1fr; }
  .theme-preset-popover { width: min(330px, calc(100vw - 48px)); }
  .theme-preset-grid { grid-template-columns: repeat(3, 1fr); }
  iframe { height: 600px; }
  .editor-canvas {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    border-inline: 0;
    border-radius: 0;
  }
  .shell { padding: 12px; }
  .storage-card { align-items: flex-start; flex-direction: column; }
  .account-name-prompt { grid-template-columns: 1fr; }
  .account-name-prompt .btn { justify-self: start; }
  .image-upload-selection { grid-template-columns: 64px minmax(0, 1fr); }
  .image-upload-selection img { width: 64px; height: 64px; }
  .image-upload-selection-actions { grid-column: 1 / -1; }
  .editor-event { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
  .event-date-tile { width: 58px; height: 58px; grid-row: 1 / span 2; }
  .event-actions { grid-column: 2; }
  .custom-domain-form { grid-template-columns: 1fr; }
  .custom-domain-form .btn { justify-self: start; }
  .dns-record { grid-template-columns: 1fr; padding: 8px 0; }
  .dns-record > div { padding: 4px 8px; }
}

@media (max-width: 480px) {
  .image-library-heading-actions { gap: 5px; }
  .image-library-heading-actions .btn { padding: 7px 10px; font-size: 13px; }
  .floating-header { gap: 8px; }
  body.authenticated #account { display: none; }
  body.authenticated .mobile-menu { display: block; }
}
