:root {
  color-scheme: light;
  --Action: #007aff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --panel: #ffffff;
  --accent: var(--Action);
  --brand-primary: var(--Action);
  --accent-2: #006ee6;
  --public-shell-max: 1180px;
  --public-shell-gutter: 28px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: #faf7f2;
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/assets/fonts/SpaceMono-Regular.ttf?v=20260614-v106") format("truetype");
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700 800;
  font-display: block;
  src: url("/assets/fonts/SpaceMono-Bold.ttf?v=20260614-v106") format("truetype");
}

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

button {
  cursor: pointer;
}

svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  min-height: 100vh;
  background: #faf7f2;
  color: var(--ink);
}

.app-shell[data-app-theme="dark"] {
  color-scheme: dark;
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --line: #273449;
  --soft: #111827;
  --panel: #0f172a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  background: #0b1220;
}

.page-shell {
  width: min(100%, var(--public-shell-max));
  margin-inline: auto;
  padding-inline: var(--public-shell-gutter);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.app-shell[data-app-theme="dark"] .topbar {
  background: rgba(15, 23, 42, 0.94);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-lockup strong,
.auth-brand strong {
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.brand-logo-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-logo-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(168, 176, 191, 0.35);
  border-radius: 8px;
  background: #fbfaf7;
}

.brand-logo-image {
  display: block;
  width: clamp(164px, 16vw, 210px);
  max-width: 100%;
  height: auto;
}

.topbar .brand-logo-image {
  width: clamp(154px, 15vw, 190px);
}

.auth-brand .brand-logo-image,
.public-nav .brand-logo-image {
  width: clamp(176px, 20vw, 230px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.brand-mark.is-image {
  background: transparent;
  color: inherit;
  border-radius: 0;
}

.brand-mark-image {
  display: block;
  width: 38px;
  height: 38px;
}

.auth-brand .brand-mark,
.auth-brand .brand-mark-image {
  width: 44px;
  height: 44px;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 36px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.icon-button {
  width: 38px;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 122, 255, 0.22);
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.ghost-button {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.app-shell[data-app-theme="dark"] .secondary-button,
.app-shell[data-app-theme="dark"] .ghost-button,
.app-shell[data-app-theme="dark"] .icon-button {
  background: #111827;
  color: var(--ink);
}

.app-shell[data-app-theme="dark"] .color-clear-button,
.app-shell[data-app-theme="dark"] .color-auto-button {
  background: #111827;
}

.save-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.save-pill small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.app-shell[data-app-theme="dark"] .save-pill {
  background: #0f2547;
  border-color: #1d4e89;
}

.account-pill {
  border: 1px solid var(--line);
  font: inherit;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.account-pill-button {
  cursor: pointer;
}

.account-pill-button:hover,
.account-pill-button:focus-visible {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  outline: 0;
}

.app-shell[data-app-theme="dark"] .account-pill {
  background: #111827;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(170px, 200px) minmax(390px, 560px) minmax(600px, 1fr);
  gap: 20px;
  padding: 20px;
  align-items: start;
}

.sidebar,
.editor-panel,
.preview-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 80px;
  padding: 0;
}

.capacity-card {
  width: 100%;
  text-align: left;
  color: inherit;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.capacity-card:hover,
.capacity-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  outline: 0;
}

.app-shell[data-app-theme="dark"] .capacity-card,
.app-shell[data-app-theme="dark"] .asset-card,
.app-shell[data-app-theme="dark"] .metric-card,
.app-shell[data-app-theme="dark"] .instruction-card,
.app-shell[data-app-theme="dark"] .validation-card,
.app-shell[data-app-theme="dark"] .note-card,
.app-shell[data-app-theme="dark"] .install-card,
.app-shell[data-app-theme="dark"] .signature-row {
  background: #111827;
}

.app-shell[data-app-theme="dark"] .signature-delete-button {
  border-left-color: var(--line);
  color: #f87171;
}

.app-shell[data-app-theme="dark"] .signature-delete-button:hover,
.app-shell[data-app-theme="dark"] .signature-delete-button:focus-visible {
  background: rgba(248, 113, 113, 0.12);
}

.capacity-card span,
.capacity-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.capacity-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin: 4px 0 8px;
}

progress {
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
}

.tab-list {
  display: grid;
  gap: 4px;
}

.tab-button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 10px;
  text-align: left;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab-button.is-active {
  background: #ffffff;
  border-color: var(--line);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent), 0 8px 22px rgba(15, 23, 42, 0.04);
}

.app-shell[data-app-theme="dark"] .tab-button.is-active {
  background: #111827;
}

.editor-panel {
  display: grid;
  gap: 14px;
  padding: 0;
}

.control-panel,
.mail-frame,
.output-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.section-heading,
.card-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.section-heading h2,
.section-heading p,
.card-heading h3 {
  margin: 0;
}

.section-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.template-card,
.install-card,
.signature-row {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius);
  text-align: left;
}

.template-card.is-selected,
.install-card.is-selected,
.signature-row.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent), 0 12px 26px rgba(15, 23, 42, 0.06);
}

.control-panel {
  padding: 20px;
  overflow: hidden;
}

.control-panel:has(.template-setup) {
  padding: 0;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-title h1 {
  font-size: 21px;
  line-height: 1.15;
  margin: 0;
  letter-spacing: 0;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 520px;
}

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

.form-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.form-grid.compact.design-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  align-items: start;
}

.design-form-grid .range-field {
  grid-column: 1 / -1;
}

.design-form-grid .field,
.design-form-grid .color-field {
  min-width: 0;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field.is-invalid input {
  border-color: #f59e0b;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.field-hint-warning,
.field-warning {
  color: #92400e;
}

.field-warning {
  margin-top: 8px;
  border: 1px solid #fde68a;
  border-radius: 7px;
  background: #fffbeb;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.field-warning-inline {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  column-gap: 7px;
  row-gap: 4px;
  margin-top: 0;
  position: relative;
  z-index: 0;
}

.field-warning-inline svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  margin-top: 1px;
}

.field-warning-inline button {
  grid-column: 2;
}

.field-warning button,
.validation-card button,
.install-blocker-card button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
}

.field-label-row,
.color-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-label-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.color-control {
  flex-wrap: wrap;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
}

.color-control input[type="color"] {
  flex: 0 0 52px;
  width: 52px;
}

.color-preview {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.color-preview.is-transparent {
  background:
    linear-gradient(45deg, #cbd5e1 25%, transparent 25% 75%, #cbd5e1 75%),
    linear-gradient(45deg, #cbd5e1 25%, transparent 25% 75%, #cbd5e1 75%);
  background-color: #ffffff;
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
}

.color-clear-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.color-auto-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--accent);
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.color-auto-button.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
  color: var(--ink);
  min-height: 40px;
  padding: 9px 10px;
  font-weight: 500;
}

.app-shell[data-app-theme="dark"] .field input,
.app-shell[data-app-theme="dark"] .field select,
.app-shell[data-app-theme="dark"] .field textarea,
.app-shell[data-app-theme="dark"] .output-code,
.app-shell[data-app-theme="dark"] .output-plain {
  background: #0b1220;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
  background: #ffffff;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.45;
}

.field input[type="color"] {
  padding: 4px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.design-token-actions {
  align-items: center;
  margin: 12px 0 0;
}

.design-token-actions .secondary-button {
  min-width: 0;
}

.account-card {
  display: grid;
  gap: 9px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 15px;
}

.app-shell[data-app-theme="dark"] .account-card {
  background: #111827;
}

.account-card-highlight {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: inset 3px 0 0 var(--accent);
}

.account-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-card strong {
  font-size: 20px;
  line-height: 1.2;
}

.account-card small {
  color: var(--muted);
  line-height: 1.45;
}

.account-actions {
  margin-top: 4px;
}

.status-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 13px;
  font-weight: 800;
  line-height: 1;
}

.status-pill-active {
  border-color: rgba(22, 163, 74, 0.32);
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
}

.app-shell[data-app-theme="dark"] .status-pill-active {
  color: #86efac;
}

.billing-status-list {
  display: grid;
  gap: 7px;
  margin: 4px 0;
}

.billing-status-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
  padding: 8px 10px;
}

.app-shell[data-app-theme="dark"] .billing-status-list span {
  background: #0b1220;
}

.billing-status-list b,
.billing-status-list em {
  font-size: 12px;
  font-style: normal;
}

.billing-status-list em {
  color: var(--muted);
  text-align: right;
}

.billing-warning {
  border: 1px solid #fde68a;
  border-radius: 7px;
  background: #fffbeb;
  color: #92400e;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.billing-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.range-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.range-slider {
  width: 100%;
  accent-color: var(--accent);
}

.range-slider-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.range-slider-wrap small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.range-number-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.range-number {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 5px 6px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.range-number-wrap small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.app-shell[data-app-theme="dark"] .range-number {
  background: #0b1220;
  color: var(--ink);
}

.image-fit-controls {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.app-shell[data-app-theme="dark"] .image-fit-controls,
.app-shell[data-app-theme="dark"] .asset-preview {
  background: #0b1220;
}

.image-fit-controls strong {
  font-size: 12px;
}

.copy-mode-note {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.copy-mode-note strong {
  color: var(--ink);
}

.app-shell[data-app-theme="dark"] .copy-mode-note {
  background: #0f172a;
  border-color: #263244;
}

.app-shell[data-app-theme="dark"] .copy-mode-note strong {
  color: #f8fafc;
}

.apple-mail-install-flow {
  display: grid;
  gap: 14px;
}

.install-warning-card {
  display: grid;
  gap: 6px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  padding: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.install-warning-card strong {
  color: #7c2d12;
  font-size: 14px;
}

.apple-mail-step-list {
  display: grid;
  gap: 10px;
}

.apple-mail-step-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.apple-mail-step-card.is-active {
  border-color: var(--accent);
  background: #eff6ff;
}

.apple-mail-step-card .step-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.apple-mail-step-card h3 {
  margin: 2px 0 4px;
  font-size: 15px;
}

.apple-mail-step-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.apple-mail-step-card code,
.field-hint code {
  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  padding: 3px 6px;
  color: var(--ink);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.apple-mail-step-card .inline-actions {
  margin-top: 8px;
}

.app-shell[data-app-theme="dark"] .install-warning-card {
  background: #241a08;
  border-color: #b45309;
}

.app-shell[data-app-theme="dark"] .install-warning-card strong {
  color: #fed7aa;
}

.app-shell[data-app-theme="dark"] .apple-mail-step-card {
  background: #0f172a;
  border-color: #263244;
}

.app-shell[data-app-theme="dark"] .apple-mail-step-card.is-active {
  background: #10233f;
  border-color: #60a5fa;
}

.app-shell[data-app-theme="dark"] .apple-mail-step-card code,
.app-shell[data-app-theme="dark"] .field-hint code {
  background: #0b1220;
  border-color: #263244;
  color: #e5edf7;
}

.range-pair {
  display: grid;
  gap: 7px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.upload-control {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--accent);
  min-height: 38px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.app-shell[data-app-theme="dark"] .upload-control {
  background: #111827;
}

.upload-control.is-disabled,
.preview-only-control.is-disabled {
  opacity: 0.68;
  cursor: progress;
  pointer-events: none;
}

.upload-control > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.asset-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.asset-controls .upload-control {
  margin-top: 0;
}

.preview-only-control {
  display: inline-flex;
  align-items: center;
  flex-basis: 100%;
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.upload-status.is-error {
  background: #fff1f2;
  color: #be123c;
}

.upload-status.is-preview {
  background: #fffbeb;
  color: #92400e;
}

.upload-status.is-success {
  background: #ecfdf5;
  color: #047857;
}

.upload-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: upload-spin 0.7s linear infinite;
}

@keyframes upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.asset-remove-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #fecdd3;
  border-radius: 7px;
  background: #ffffff;
  color: #be123c;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.asset-remove-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell[data-app-theme="dark"] .asset-remove-button {
  background: #111827;
  border-color: #7f1d1d;
  color: #fb7185;
}

.full-width {
  grid-column: 1 / -1;
  margin-top: 13px;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 0;
  font-weight: 700;
}

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

.asset-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;
}

.template-setup {
  display: grid;
  gap: 18px;
  padding: 20px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.template-setup-header h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
}

.template-setup-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.template-group {
  display: grid;
  gap: 10px;
}

.template-group-title {
  margin: 0;
  color: #8b8175;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.template-stack {
  display: grid;
  gap: 14px;
}

.template-option {
  display: grid;
  gap: 0;
  width: 100%;
  min-height: 284px;
  padding: 0;
  border: 1px solid #ebe5dd;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(58, 45, 31, 0.07);
  cursor: pointer;
}

.template-option.is-selected {
  border-color: color-mix(in srgb, var(--accent) 58%, #ebe5dd);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent), 0 12px 28px rgba(37, 99, 235, 0.1);
}

.template-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 34%, transparent);
  outline-offset: 3px;
}

.template-option-footer {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  padding: 15px 20px 17px;
  border-top: 1px solid #dbeafe;
  background: #f6f9fd;
}

.template-option-footer strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
}

.template-option-footer small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.template-radio {
  display: block;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 3px solid #d6d0c7;
}

.template-option.is-selected .template-radio {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 5px #ffffff;
  background: var(--accent);
}

.template-option.is-selected .template-option-footer {
  background: #eef6ff;
  border-top-color: #bfdbfe;
}

.app-shell[data-app-theme="dark"] .template-option {
  background: #ffffff;
  border-color: #e2e8f0;
}

.app-shell[data-app-theme="dark"] .template-option-footer {
  background: #f6f9fd;
  border-top-color: #dbeafe;
}

.app-shell[data-app-theme="dark"] .template-option.is-selected .template-option-footer {
  background: #eef6ff;
  border-top-color: #bfdbfe;
}

.app-shell[data-app-theme="dark"] .template-option-footer strong {
  color: #111827;
}

.app-shell[data-app-theme="dark"] .template-option-footer small {
  color: #64748b;
}

.template-live-preview {
  height: 196px;
  padding: 22px 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 122, 255, 0.07), transparent 34%),
    #ffffff;
  border-bottom: 1px solid #f0ebe4;
  overflow: hidden;
}

.template-live-preview-inner {
  width: 580px;
  transform: scale(0.62);
  transform-origin: top left;
  pointer-events: none;
}

.template-live-preview-inner [data-template-preview-link] {
  cursor: default !important;
}

.template-preview {
  position: relative;
  display: block;
  height: 154px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #eff6ff, #f8fafc) border-box;
  border-bottom: 1px solid #f0ebe4;
  overflow: hidden;
}

.template-preview > span {
  position: absolute;
  display: block;
}

.tp-photo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid !important;
  place-items: center;
  background: linear-gradient(135deg, #0f172a, #64748b);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.tp-name,
.tp-role,
.tp-company,
.tp-email,
.tp-phone,
.tp-location,
.tp-web {
  height: 14px;
  line-height: 14px;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 3px;
  padding: 0 5px;
  font-size: 9px;
  letter-spacing: 0;
}

.tp-name {
  color: #111827;
  font-weight: 800;
  background: #f8fafc;
}

.tp-role,
.tp-company,
.tp-email,
.tp-phone,
.tp-location,
.tp-web {
  color: #64748b;
  background: #f8fafc;
}

.tp-email,
.tp-phone,
.tp-location,
.tp-web {
  padding-left: 17px;
}

.tp-email::before,
.tp-phone::before,
.tp-location::before,
.tp-action::before,
.tp-web::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.tp-email::before {
  -webkit-mask-image: url("/assets/email-icons/email-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/email-magenta.png?v=20260614-v106");
}

.tp-phone::before {
  -webkit-mask-image: url("/assets/email-icons/office-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/office-magenta.png?v=20260614-v106");
}

.tp-location::before {
  -webkit-mask-image: url("/assets/email-icons/location-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/location-magenta.png?v=20260614-v106");
}

.tp-web::before {
  -webkit-mask-image: url("/assets/email-icons/link-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/link-magenta.png?v=20260614-v106");
}

.tp-action::before {
  left: 0;
  top: 2px;
  width: 13px;
  height: 13px;
  -webkit-mask-image: url("/assets/email-icons/calendar-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/calendar-magenta.png?v=20260614-v106");
}

.tp-divider {
  width: 2px;
  background: var(--accent);
}

.tp-cta {
  height: 18px;
  line-height: 18px;
  border-radius: 4px;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
  background: var(--accent);
}

.tp-action {
  height: 18px;
  line-height: 18px;
  overflow: hidden;
  padding-left: 18px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.tp-logo {
  height: 22px;
  line-height: 22px;
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  color: #111827;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.tp-rule {
  height: 2px;
  background: var(--accent);
}

.tp-social {
  display: none;
  gap: 5px;
}

.tp-social .tp-social-icon {
  position: static;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #94a3b8;
}

.tp-social .tp-social-icon::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: #ffffff;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.tp-social-linkedin::before {
  -webkit-mask-image: url("/assets/social-icons/linkedin-white.svg?v=20260614-v106");
  mask-image: url("/assets/social-icons/linkedin-white.svg?v=20260614-v106");
}

.tp-social-facebook::before {
  -webkit-mask-image: url("/assets/social-icons/facebook-white.svg?v=20260614-v106");
  mask-image: url("/assets/social-icons/facebook-white.svg?v=20260614-v106");
}

.tp-social-instagram::before {
  -webkit-mask-image: url("/assets/social-icons/instagram-white.svg?v=20260614-v106");
  mask-image: url("/assets/social-icons/instagram-white.svg?v=20260614-v106");
}

.tp-social-x::before {
  -webkit-mask-image: url("/assets/social-icons/x-white.svg?v=20260614-v106");
  mask-image: url("/assets/social-icons/x-white.svg?v=20260614-v106");
}

.template-preview .tp-cta,
.template-preview .tp-divider,
.template-preview .tp-action,
.template-preview .tp-rule,
.template-preview .tp-social,
.template-preview .tp-logo,
.template-preview .tp-web,
.template-preview .tp-phone,
.template-preview .tp-location,
.template-preview .tp-company {
  display: none !important;
}

.template-preview-vertical-01 .tp-photo {
  left: 32px;
  top: 22px;
}

.template-preview-vertical-01 .tp-name {
  left: 112px;
  top: 24px;
  width: 80px;
}

.template-preview-vertical-01 .tp-role {
  left: 112px;
  top: 45px;
  width: 116px;
}

.template-preview-vertical-01 .tp-email {
  left: 112px;
  top: 76px;
  width: 152px;
}

.template-preview-vertical-01 .tp-action {
  display: block !important;
  left: 112px;
  top: 108px;
  width: 90px;
}

.template-preview-vertical-02 .tp-photo {
  left: 32px;
  top: 42px;
}

.template-preview-vertical-02 .tp-divider {
  display: block !important;
  left: 98px;
  top: 34px;
  height: 96px;
}

.template-preview-vertical-02 .tp-name {
  left: 124px;
  top: 40px;
  width: 82px;
}

.template-preview-vertical-02 .tp-role {
  left: 124px;
  top: 61px;
  width: 132px;
}

.template-preview-vertical-02 .tp-email {
  left: 124px;
  top: 92px;
  width: 152px;
}

.template-preview-vertical-02 .tp-action {
  display: block !important;
  left: 124px;
  top: 122px;
  width: 90px;
}

.template-preview-vertical-03 .tp-photo {
  left: 26px;
  top: 44px;
}

.template-preview-vertical-03 .tp-name {
  left: 86px;
  top: 38px;
  width: 76px;
}

.template-preview-vertical-03 .tp-role {
  left: 86px;
  top: 59px;
  width: 112px;
}

.template-preview-vertical-03 .tp-email {
  left: 86px;
  top: 88px;
  width: 136px;
}

.template-preview-vertical-03 .tp-social {
  display: flex !important;
  left: 232px;
  top: 88px;
}

.template-preview-single-column-01 .tp-photo,
.template-preview-single-column-03 .tp-photo {
  left: 26px;
  top: 28px;
}

.template-preview-single-column-01 .tp-name,
.template-preview-single-column-03 .tp-name {
  left: 86px;
  top: 30px;
  width: 74px;
}

.template-preview-single-column-01 .tp-role,
.template-preview-single-column-03 .tp-role {
  left: 86px;
  top: 51px;
  width: 124px;
}

.template-preview-single-column-01 .tp-email,
.template-preview-single-column-03 .tp-email {
  left: 26px;
  top: 86px;
  width: 176px;
}

.template-preview-single-column-01 .tp-cta,
.template-preview-single-column-03 .tp-phone {
  display: block !important;
  left: 26px;
  top: 120px;
  width: 126px;
}

.template-preview-single-column-03 .tp-web {
  display: block !important;
  left: 172px;
  top: 120px;
  width: 108px;
}

.template-preview-two-column-01 .tp-photo,
.template-preview-two-column-02 .tp-photo,
.template-preview-two-column-04 .tp-photo {
  left: 28px;
  top: 42px;
}

.template-preview-two-column-01 .tp-divider,
.template-preview-two-column-02 .tp-divider,
.template-preview-two-column-04 .tp-divider {
  display: block !important;
  left: 150px;
  top: 34px;
  height: 92px;
}

.template-preview-two-column-01 .tp-name,
.template-preview-two-column-02 .tp-name,
.template-preview-two-column-04 .tp-name {
  left: 86px;
  top: 43px;
  width: 58px;
}

.template-preview-two-column-01 .tp-role,
.template-preview-two-column-02 .tp-role,
.template-preview-two-column-04 .tp-role {
  left: 86px;
  top: 64px;
  width: 54px;
}

.template-preview-two-column-01 .tp-email,
.template-preview-two-column-02 .tp-email,
.template-preview-two-column-04 .tp-email {
  left: 176px;
  top: 40px;
  width: 142px;
}

.template-preview-two-column-01 .tp-phone,
.template-preview-two-column-02 .tp-phone,
.template-preview-two-column-04 .tp-phone {
  display: block !important;
  left: 176px;
  top: 63px;
  width: 92px;
}

.template-preview-two-column-01 .tp-web,
.template-preview-two-column-02 .tp-web {
  display: block !important;
  left: 176px;
  top: 86px;
  width: 118px;
}

.template-preview-two-column-04 .tp-location {
  display: block !important;
  left: 176px;
  top: 86px;
  width: 118px;
}

.template-preview-two-column-02 .tp-logo,
.template-preview-two-column-04 .tp-logo {
  display: block !important;
  left: 28px;
  top: 124px;
  width: 112px;
}

.template-preview-two-column-01 .tp-action,
.template-preview-two-column-04 .tp-action {
  display: block !important;
  left: 86px;
  top: 94px;
  width: 58px;
}

.template-preview-two-column-04 .tp-action {
  left: 78px;
  top: 86px;
  width: 82px;
}

.template-preview-two-column-04 .tp-rule {
  display: block !important;
  left: 28px;
  right: 28px;
  top: 114px;
}

.template-preview-two-column-04 .tp-divider {
  height: 72px;
}

.template-card,
.install-card {
  padding: 13px;
  display: grid;
  gap: 8px;
  min-height: 120px;
}

.template-card small,
.install-card span,
.metric-card small,
.signature-row small {
  color: var(--muted);
  line-height: 1.35;
}

.template-compact {
  background: linear-gradient(#f8fafc 0 38%, #dbeafe 38% 44%, #f8fafc 44%);
}

.template-agency {
  background: linear-gradient(90deg, var(--accent) 0 10%, #f8fafc 10%);
}

.template-plain {
  background: repeating-linear-gradient(#f8fafc 0 10px, #e2e8f0 11px 12px);
}

.asset-card,
.metric-card,
.instruction-card,
.validation-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.asset-card {
  min-width: 0;
}

.asset-preview {
  display: grid;
  place-items: center;
  height: 116px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe5ef;
  color: var(--muted);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #475569;
  font-weight: 800;
  letter-spacing: 0;
}

.asset-placeholder-avatar {
  border-radius: 50%;
  background:
    radial-gradient(circle at 72% 24%, rgba(147, 197, 253, 0.85) 0 12%, transparent 13%),
    linear-gradient(135deg, #007aff 0%, #0f172a 100%);
  color: #ffffff;
  font-size: 28px;
}

.asset-placeholder-logo,
.asset-placeholder-cta {
  border: 1px solid #dbe5ef;
  border-radius: 7px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
}

.asset-placeholder-cta {
  background: linear-gradient(135deg, #007aff, #0f172a);
  color: #ffffff;
  text-transform: uppercase;
}

.asset-preview-avatar {
  width: 132px;
  height: 132px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.asset-shape-circle {
  border-radius: 50%;
}

.asset-shape-rounded {
  border-radius: 14px;
}

.asset-shape-square {
  border-radius: 7px;
}

.asset-preview-avatar img {
  border-radius: inherit;
}

.asset-preview-logo img {
  object-fit: contain;
}

.asset-preview-logo,
.asset-preview-cta {
  height: 132px;
  padding: 12px;
}

.asset-preview-logo img,
.asset-preview-cta img {
  object-fit: contain;
}

.asset-preview-cta {
  aspect-ratio: auto;
}

.asset-card .upload-control {
  margin-top: 10px;
}

.asset-card .range-field {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "slider slider";
  gap: 6px 8px;
  margin-top: 10px;
}

.asset-card .range-field > span:first-child {
  grid-area: label;
  min-width: 0;
}

.asset-card .range-number-wrap {
  grid-area: value;
  min-width: 0;
  justify-self: end;
  grid-template-columns: minmax(44px, 52px) auto;
}

.asset-card .range-slider {
  grid-area: slider;
  min-width: 0;
  margin: 0;
}

.asset-card .range-slider-wrap {
  grid-area: slider;
}

.asset-card .range-number {
  min-height: 28px;
  padding: 4px 6px;
}

.asset-card .image-fit-controls {
  margin-top: 12px;
  padding: 10px 12px;
  gap: 10px;
}

.asset-card .range-pair {
  gap: 10px;
}

.metric-card span,
.metric-card strong,
.metric-card small {
  display: block;
}

.metric-card strong {
  font-size: 26px;
  margin: 4px 0;
}

.signature-list,
.team-table {
  display: grid;
  gap: 8px;
}

.signature-row {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.signature-row-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 10px;
  text-align: left;
}

.signature-row-copy {
  min-width: 0;
}

.signature-row-copy strong,
.signature-row-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-row-status {
  white-space: nowrap;
}

.signature-delete-button {
  display: grid;
  place-items: center;
  width: 42px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: #dc2626;
}

.signature-delete-button svg {
  width: 18px;
  height: 18px;
}

.signature-delete-button:hover,
.signature-delete-button:focus-visible {
  background: #fef2f2;
  outline: 0;
}

.avatar-dot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.instruction-card {
  margin: 14px 0;
}

.instruction-card h3 {
  margin: 0 0 9px;
  font-size: 16px;
}

.instruction-card ol {
  margin: 0;
  padding-left: 21px;
  color: var(--muted);
  line-height: 1.55;
}

.validation-card {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.validation-card button {
  color: #92400e;
}

.validation-card.is-ok {
  display: flex;
  align-items: center;
  color: #006ee6;
  background: #eef7ff;
  border-color: #b8dcff;
}

.note-card {
  margin-top: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.install-blocker-card,
.empty-state-card {
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  background: #fffbeb;
  color: #92400e;
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px;
  line-height: 1.45;
}

.empty-state-card {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

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

.preview-panel {
  display: grid;
  gap: 14px;
}

.mail-frame {
  padding: 22px;
  min-height: 520px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease;
}

.mail-frame-light {
  background: #ffffff;
}

.mail-frame-neutral {
  background: #f1f5f9;
}

.mail-frame-dark {
  background: #111827;
  color: #e5e7eb;
}

.mail-frame-dark .mail-header {
  border-color: #334155;
}

.mail-frame-dark .mail-header span {
  color: #cbd5e1;
}

.mail-frame-dark .preview-template-name,
.mail-frame-dark .preview-chrome-strong {
  color: #f8fafc;
}

.mail-frame-dark .preview-chrome-text {
  color: #dbeafe;
}

.app-shell[data-app-theme="dark"] .mail-frame {
  background: #111827;
  border-color: #334155;
}

.app-shell[data-app-theme="dark"] .mail-frame .mail-header {
  border-color: #334155;
}

.app-shell[data-app-theme="dark"] .mail-frame .mail-header span {
  color: #cbd5e1;
}

.app-shell[data-app-theme="dark"] .mail-frame .preview-template-name,
.app-shell[data-app-theme="dark"] .mail-frame .preview-chrome-strong {
  color: #f8fafc;
}

.app-shell[data-app-theme="dark"] .mail-frame .preview-chrome-text {
  color: #dbeafe;
}

.mail-frame-neutral .signature-preview {
  background: #f8fafc;
}

.mail-frame-dark .signature-preview {
  background: #111827;
  border-color: #334155;
}

.mail-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.mail-header > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mail-header span {
  color: var(--muted);
  font-size: 13px;
}

.preview-template-label {
  color: var(--accent) !important;
  font-size: 11px !important;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.preview-template-name {
  display: block;
  margin: -2px 0 5px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.preview-mode-button {
  flex: 0 0 auto;
}

.preview-mode-control {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.preview-mode-control small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.signature-preview {
  min-height: 350px;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  padding: 18px;
  background: transparent;
  border: 1px solid #edf2f7;
  border-radius: 7px;
}

.output-card {
  padding: 16px;
}

.output-code,
.output-plain {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.output-plain {
  min-height: 90px;
  margin-top: 10px;
}

.flash-message {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #111827;
  color: #ffffff;
  border-radius: 7px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 30;
}

.flash-action,
.flash-dismiss {
  border: 0;
  background: transparent;
  color: #ffffff;
  padding: 0;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
}

.flash-dismiss {
  color: #cbd5e1;
  font-size: 12px;
  text-decoration: none;
}

.flash-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.welcome-card {
  width: min(100%, 560px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
  padding: 30px;
}

.welcome-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.welcome-card h2 {
  margin: 10px 0;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
}

.welcome-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.welcome-steps,
.auth-flow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.welcome-steps span,
.auth-flow-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.welcome-steps strong,
.auth-flow-list strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--accent);
}

.welcome-steps small,
.auth-flow-list small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.auth-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 247, 242, 0.94)),
    #faf7f2;
}

.auth-landing {
  display: block;
  padding: 0;
}

.auth-nav {
  padding-top: 22px;
}

.auth-nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.auth-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.auth-nav-link,
.auth-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 36px;
  padding: 8px 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.auth-nav-link {
  background: transparent;
  color: var(--muted);
}

.auth-nav-link.is-active {
  color: var(--ink);
}

.auth-nav-cta {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.2);
}

.auth-nav-cta.is-active {
  background: var(--accent);
}

.auth-hero {
  padding-top: clamp(48px, 8vh, 86px);
  padding-bottom: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(360px, 0.82fr);
  gap: 48px;
  align-items: center;
}

.auth-hero-single {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.auth-hero-route .auth-copy {
  display: none;
}

.auth-hero-route .auth-card {
  justify-self: center;
}

.auth-copy {
  min-width: 0;
}

.auth-eyebrow,
.auth-panel-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-copy h1 {
  max-width: 760px;
  margin: 14px 0 16px;
  font-size: 68px;
  line-height: 0.96;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 620px;
  margin: 0;
  color: #475569;
  font-size: 19px;
  line-height: 1.55;
}

.auth-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.auth-feature-list a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: #1e3a8a;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.auth-feature-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.auth-trust-strip {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-demo-video {
  width: min(100%, 700px);
  margin-top: 28px;
}

.auth-demo-video-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.auth-demo-video-header span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-demo-video-header strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.auth-demo-video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #faf7f2;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.11);
  aspect-ratio: 16 / 9;
}

.auth-demo-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-demo-video-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 34px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
}

.auth-demo-video-toggle:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.22);
  outline-offset: 2px;
}

.auth-template-showcase {
  width: min(100%, 700px);
  margin-top: 32px;
}

.auth-template-meta {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.auth-template-meta span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-template-meta strong {
  font-size: 18px;
}

.auth-template-meta small {
  color: var(--muted);
  line-height: 1.45;
}

.auth-template-stage {
  min-height: 250px;
  margin-top: 14px;
}

.auth-template-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.11);
  padding: 28px;
}

.auth-template-card.is-active {
  display: block;
}

.auth-template-heading {
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-preview-header,
.auth-preview-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.auth-preview-header strong,
.auth-preview-header small,
.auth-preview-body strong,
.auth-preview-body small,
.auth-preview-lines span {
  display: block;
}

.auth-preview-header small,
.auth-preview-body small,
.auth-preview-lines {
  color: var(--muted);
}

.auth-preview-body {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.85fr);
  margin-top: 24px;
  padding-top: 22px;
  border-top: 2px solid var(--accent);
}

.auth-preview-lines {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.auth-preview-rule {
  width: 62%;
  height: 2px;
  margin-top: 24px;
  background: var(--accent);
}

.auth-template-card strong,
.auth-template-card small,
.auth-template-card span {
  display: block;
}

.auth-template-card small,
.auth-template-card span {
  color: var(--muted);
}

.auth-photo {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #dbe5ee;
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.12),
    0 12px 26px rgba(15, 23, 42, 0.16);
}

.auth-photo-small {
  width: 58px;
  height: 58px;
}

.auth-classic-grid {
  display: grid;
  grid-template-columns: 74px minmax(132px, 0.86fr) 2px minmax(178px, 1fr);
  column-gap: 22px;
  row-gap: 16px;
  align-items: start;
}

.auth-classic-grid .auth-photo {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin-top: 4px;
}

.auth-classic-identity {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 2px;
  padding-top: 5px;
}

.auth-classic-identity strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
}

.auth-classic-divider {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 2px;
  height: 126px;
  background: var(--accent);
}

.auth-classic-contact {
  grid-column: 4;
  grid-row: 1;
  display: grid;
  gap: 5px;
  padding-top: 5px;
  font-size: 13px;
}

.auth-contact-row {
  position: relative;
  min-height: 16px;
  padding-left: 22px;
  line-height: 16px;
}

.auth-contact-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.auth-contact-email::before {
  -webkit-mask-image: url("/assets/email-icons/email-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/email-magenta.png?v=20260614-v106");
}

.auth-contact-office::before {
  -webkit-mask-image: url("/assets/email-icons/office-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/office-magenta.png?v=20260614-v106");
}

.auth-contact-mobile::before {
  -webkit-mask-image: url("/assets/email-icons/mobile-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/mobile-magenta.png?v=20260614-v106");
}

.auth-contact-location::before {
  -webkit-mask-image: url("/assets/email-icons/location-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/location-magenta.png?v=20260614-v106");
}

.auth-contact-link::before {
  -webkit-mask-image: url("/assets/email-icons/link-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/link-magenta.png?v=20260614-v106");
}

.auth-classic-action {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--accent) !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 18px;
  white-space: nowrap;
}

.auth-classic-action span {
  color: inherit;
}

.auth-classic-schedule {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
}

.auth-classic-website {
  grid-column: 4;
  grid-row: 2;
  align-self: end;
}

.auth-mini-icon {
  display: inline-block !important;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background: currentColor;
  color: var(--accent) !important;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.auth-mini-calendar {
  -webkit-mask-image: url("/assets/email-icons/calendar-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/calendar-magenta.png?v=20260614-v106");
}

.auth-mini-link {
  -webkit-mask-image: url("/assets/email-icons/link-magenta.png?v=20260614-v106");
  mask-image: url("/assets/email-icons/link-magenta.png?v=20260614-v106");
}

.auth-classic-rule {
  grid-column: 1 / -1;
  display: block;
  height: 2px;
  margin-top: 2px;
  background: var(--accent);
}

.auth-classic-logo {
  grid-column: 1 / -1;
  color: #0f172a !important;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-vertical-grid {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.auth-vertical-content {
  display: grid;
  gap: 10px;
}

.auth-template-logo-text {
  color: var(--accent);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-vertical-panel {
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--accent);
  padding-left: 14px;
}

.auth-contact-lines {
  display: grid;
  gap: 5px;
  margin: 8px 0 4px;
  font-size: 13px;
}

.auth-template-banner {
  display: grid;
  gap: 18px;
  align-content: start;
}

.auth-banner-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.78fr);
  gap: 24px;
  align-items: start;
}

.auth-banner-top .auth-contact-lines {
  margin: 0;
}

.auth-banner-strip {
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 15px 0;
}

.auth-banner-strip strong {
  color: #0f172a;
  font-size: 24px;
  letter-spacing: 0;
}

.auth-banner-strip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
}

.auth-template-line {
  width: 100%;
  height: 2px;
  margin: 10px 0;
  background: var(--accent);
}

.auth-template-minimal {
  display: grid;
  align-content: start;
  gap: 14px;
}

.auth-minimal-grid {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.auth-minimal-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  font-size: 13px;
}

.auth-minimal-contact .auth-contact-row {
  display: inline-flex;
  align-items: center;
}

.auth-minimal-contact span:not(:last-child)::after {
  content: " /";
}

.auth-template-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.auth-template-controls button {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: #1e3a8a;
  min-height: 44px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.auth-template-controls button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.auth-template-controls button:focus-visible,
.auth-feature-list a:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.22);
  outline-offset: 2px;
}

.auth-card {
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
  padding: 28px;
}

.auth-home-form {
  justify-self: end;
  width: 100%;
  max-width: 500px;
}

.auth-card-wide {
  width: min(100%, 680px);
}

.auth-card-onboarding {
  width: min(100%, 560px);
}

.auth-compact-signup-card {
  display: none;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  padding: 22px;
}

.auth-compact-signup-card h2 {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.auth-compact-signup-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.auth-compact-signup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.auth-compact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-compact-links a,
.auth-links a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.auth-compact-links a:hover,
.auth-links a:hover {
  text-decoration: underline;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand small {
  color: var(--muted);
  font-size: 12px;
}

.auth-card h1,
.auth-card h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-panel-kicker + h2 {
  margin-top: 10px;
}

.auth-card p {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-onboarding-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.35;
}

.auth-onboarding-note strong {
  font-size: 14px;
}

.auth-onboarding-note span {
  color: #45617f;
  font-size: 13px;
}

.auth-onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-form .field {
  color: #475569;
}

.auth-form .field input {
  min-height: 46px;
  border-color: #dbe3ee;
  background: #ffffff;
  padding: 10px 12px;
}

.auth-form .field input::placeholder {
  color: #9aa7b8;
}

.auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
}

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.password-strength {
  display: grid;
  gap: 7px;
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
}

.password-strength::before {
  content: "";
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
}

.password-strength-bar {
  display: block;
  width: 12%;
  height: 7px;
  margin-top: -14px;
  border-radius: 999px;
  background: #ef4444;
  transition: width 0.18s ease, background 0.18s ease;
}

.password-strength[data-score="2"] .password-strength-bar,
.password-strength[data-score="3"] .password-strength-bar {
  background: #f59e0b;
}

.password-strength[data-valid="true"] .password-strength-bar {
  background: #10b981;
}

.password-strength strong {
  color: var(--ink);
  font-size: 12px;
}

.password-strength small {
  line-height: 1.4;
}

.auth-or-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.auth-magic-button {
  width: 100%;
  min-height: 44px;
}

.auth-method-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: -4px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 18px;
  row-gap: 8px;
  margin-top: 16px;
}

.auth-links span {
  color: var(--muted);
  font-size: 13px;
}

.auth-links button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 2px 0;
  font-weight: 800;
  line-height: 1.2;
}

.auth-marketing-sections {
  width: min(100%, var(--public-shell-max));
  margin: 0 auto;
  padding: 12px var(--public-shell-gutter) 42px;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.auth-feature-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
  padding: 22px;
}

.auth-feature-card span,
.auth-pricing-teaser span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-feature-card h2 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.auth-feature-card p,
.auth-pricing-teaser p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-pricing-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 22px;
}

.auth-pricing-teaser strong {
  display: block;
  margin: 7px 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.auth-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-footer span {
  flex: 1 1 420px;
}

.auth-footer a {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--accent);
}

.auth-security-note {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-message,
.auth-note {
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #153e75;
  padding: 10px 12px;
  margin: 0 0 14px;
  line-height: 1.45;
}

.auth-steps {
  margin: 0;
  padding-left: 22px;
  color: var(--ink);
  line-height: 1.7;
}

.auth-steps code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 4px;
}

.auth-note {
  margin-top: 18px;
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

@media (max-width: 1023px) {
  .auth-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 30px;
    padding-top: 42px;
    padding-bottom: 34px;
  }

  .auth-hero-home .auth-home-form {
    display: none;
  }

  .auth-compact-signup-card {
    display: block;
  }

  .auth-copy h1 {
    font-size: clamp(40px, 8vw, 58px);
    line-height: 1;
  }

  .auth-template-showcase {
    width: 100%;
  }

  .auth-demo-video {
    width: 100%;
  }

  .auth-template-controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    margin-inline: calc(var(--public-shell-gutter) * -1);
    padding-inline: var(--public-shell-gutter);
    padding-bottom: 4px;
  }

  .auth-template-controls button {
    flex: 0 0 auto;
  }
}

@media (max-width: 1280px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-actions {
    justify-content: flex-end;
    margin-left: auto;
    max-width: 100%;
  }

  .account-pill {
    max-width: 180px;
  }

  .workspace {
    grid-template-columns: 200px minmax(360px, 1fr);
  }

  .preview-panel {
    grid-column: 2;
  }

}

@media (max-width: 900px) {
  :root {
    --public-shell-gutter: 18px;
  }

  .auth-nav {
    padding-top: 18px;
  }

  .auth-hero {
    grid-template-columns: 1fr;
    justify-content: center;
    align-items: start;
    gap: 28px;
    padding-top: 44px;
    padding-bottom: 34px;
  }

  .auth-card {
    justify-self: center;
    max-width: 560px;
  }

  .auth-copy h1 {
    font-size: 44px;
    line-height: 1.02;
  }

  .auth-copy p {
    font-size: 16px;
  }

  .auth-template-showcase,
  .auth-demo-video,
  .auth-card {
    width: 100%;
  }

  .auth-template-stage {
    min-height: 270px;
  }

  .auth-card {
    padding: 24px;
  }

  .auth-marketing-sections {
    padding-top: 0;
    padding-bottom: 34px;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-pricing-teaser {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-onboarding-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .workspace {
    display: block;
  }

  .topbar-actions {
    margin-top: 12px;
  }

  .sidebar {
    position: static;
    margin: 12px;
  }

  .editor-panel,
  .preview-panel {
    margin: 12px;
  }

  .tab-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-grid,
  .install-grid,
	  .asset-grid,
	  .account-grid,
	  .metric-grid,
	  .form-grid,
  .form-grid.compact {
    grid-template-columns: 1fr;
  }

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

  .range-field {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .panel-title {
    display: block;
  }

  .panel-title .secondary-button {
    margin-top: 10px;
  }
}

@media (max-width: 560px) {
  :root {
    --public-shell-gutter: 14px;
  }

  .welcome-card {
    padding: 24px;
  }

  .welcome-card h2 {
    font-size: 26px;
  }

  .welcome-steps,
  .auth-flow-list {
    grid-template-columns: 1fr;
  }

  .auth-nav-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-nav-actions {
    width: 100%;
  }

  .auth-nav-link,
  .auth-nav-cta {
    flex: 1;
  }

  .auth-hero {
    gap: 22px;
    padding-top: 24px;
    padding-bottom: 30px;
  }

  .auth-copy h1 {
    font-size: 34px;
  }

  .auth-marketing-sections {
    padding-top: 0;
    padding-bottom: 30px;
  }

  .auth-compact-signup-form {
    grid-template-columns: 1fr;
  }

  .auth-classic-grid,
  .auth-template-banner {
    grid-template-columns: 1fr;
  }

  .auth-classic-grid .auth-photo,
  .auth-classic-identity,
  .auth-classic-divider,
  .auth-classic-contact,
  .auth-classic-schedule,
  .auth-classic-website,
  .auth-classic-rule,
  .auth-classic-logo {
    grid-column: 1;
    grid-row: auto;
  }

  .auth-classic-divider {
    width: 100%;
    height: 2px;
  }

  .auth-template-card {
    padding: 22px;
  }

  .auth-template-logo {
    width: 100%;
  }

  .range-number-wrap {
    max-width: 96px;
  }

  .panel-actions {
    justify-content: stretch;
  }

  .panel-actions .primary-button,
  .panel-actions .secondary-button {
    width: 100%;
    justify-content: center;
  }

  .mail-frame {
    padding: 14px;
    min-height: 420px;
  }

  .mail-header {
    display: grid;
    justify-content: stretch;
  }

  .preview-mode-control {
    justify-items: start;
  }

  .signature-preview {
    padding: 12px;
  }
}

.public-page {
  min-height: 100vh;
  background: #faf7f2;
  color: var(--ink);
}

.public-nav {
  padding-top: 20px;
  padding-bottom: 20px;
}

.public-nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-nav a {
  color: inherit;
  text-decoration: none;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.public-nav-links a:hover,
.public-footer a:hover {
  color: var(--accent);
}

.public-nav-cta {
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.2);
  padding: 8px 12px;
}

.public-main {
  padding-top: 54px;
  padding-bottom: 72px;
}

.public-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(28px, 4vw, 54px);
}

.public-eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-panel h1 {
  margin: 12px 0 16px;
  color: var(--ink);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.96;
  letter-spacing: 0;
}

.public-panel h2 {
  margin: 30px 0 10px;
  color: var(--ink);
  font-size: 22px;
}

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

.public-panel ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.public-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 34px;
  color: var(--muted);
  font-size: 13px;
}

.public-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 720px) {
  .public-nav-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-nav-links {
    flex-wrap: wrap;
  }

  .public-main {
    padding-top: 24px;
  }
}

@media (max-width: 560px) {
  :root {
    --public-shell-gutter: 14px;
  }
}
