@import url("./theme-rules.css");

:root {
  --bg: var(--theme-bg);
  --panel: var(--theme-panel);
  --panel-muted: var(--theme-panel-muted);
  --border: var(--theme-border);
  --border-strong: var(--theme-border-strong);
  --text: var(--theme-text);
  --muted: var(--theme-text-muted);
  --accent: var(--theme-accent);
  --accent-hover: var(--theme-accent-hover);
  --accent-dim: var(--theme-accent-soft);
  --accent-border: var(--theme-accent-border);
  --danger: var(--theme-danger);
  --danger-soft: var(--theme-danger-soft);
  --link: var(--theme-link);
  --focus: var(--theme-focus);
  --radius: var(--theme-radius);
  --shadow: var(--theme-shadow);
  font-family: var(--theme-font);
}

* { box-sizing: border-box; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 1rem 1rem 3rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.shell {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

main.shell {
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.admin-shell { max-width: 960px; }
.campaign-subnav {
  display: flex;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.campaign-subnav a {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
}
.campaign-subnav a.active {
  background: var(--accent, #2563eb);
  border-color: transparent;
  color: #fff;
}
.entry-detail h2 { margin-top: 0; }
.billing-shell { max-width: 560px; }
.billing-header h1 { margin-bottom: 0.35rem; }
.billing-login-card,
.billing-sub-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.billing-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.billing-sub-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.billing-code-field {
  display: block;
  margin: 0.75rem 0;
}
.billing-code-field input {
  width: 100%;
  margin-top: 0.35rem;
}
.billing-cancel { margin-top: 0.75rem; }
.billing-sub-list--mid-fulfillment { margin-top: 1rem; opacity: 0.85; }
.billing-sub-card--pending-fulfillment { border-style: dashed; }

.ytp-fulfillment-stepper {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.ytp-fulfillment-stepper--compact { margin-top: 0; }
.ytp-fulfillment-steps {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.ytp-fulfillment-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  opacity: 0.45;
}
.ytp-fulfillment-step.is-current,
.ytp-fulfillment-step.is-done { opacity: 1; }
.ytp-fulfillment-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.85rem;
}
.ytp-fulfillment-step.is-current .ytp-fulfillment-step-num {
  background: var(--accent, #2563eb);
  border-color: transparent;
  color: #fff;
}
.ytp-fulfillment-step.is-done .ytp-fulfillment-step-num {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
}
.ytp-fulfillment-step-label {
  font-size: 0.78rem;
  line-height: 1.2;
}
.ytp-fulfillment-panel h3 { margin: 0 0 0.35rem; }
.ytp-fulfillment-panel--success {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.ytp-fulfillment-actions { margin-top: 0.85rem; }
.ytp-fulfillment-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.ytp-fulfillment-manage { margin: 0.75rem 0 0; }
.ytp-fulfillment-manage a { font-weight: 600; }
.ytp-fulfillment-email { margin-top: 0.35rem; }

.dashboard-shell { max-width: 640px; }
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.dashboard-header h1 { margin: 0; }
.dashboard-account-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.dashboard-login-card,
.dashboard-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.dashboard-card-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.dashboard-countdown {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}
.dashboard-countdown-deadline {
  color: var(--muted);
  font-weight: 400;
}
.dashboard-next-step { margin: 0.75rem 0 0; }
.dashboard-next-step a { font-weight: 600; }
.dashboard-card-head + .form-block-group {
  margin-top: 0.75rem;
}
.dashboard-card .form-block-group {
  margin-top: 1rem;
}
.dashboard-card .form-block-group + .form-block-group {
  margin-top: 1rem;
}
.dashboard-phone-field,
.dashboard-code-field {
  display: block;
  margin: 0.75rem 0;
}
.dashboard-phone-field input,
.dashboard-code-field input {
  width: 100%;
  margin-top: 0.35rem;
}
.dashboard-toast {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #78350f;
  font-weight: 600;
  text-align: center;
  animation: dashboard-toast-in 0.35s ease;
}
@keyframes dashboard-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.account-shell { max-width: 640px; }
.account-header h1 { margin: 0.25rem 0; }
.account-back { margin: 0 0 0.5rem; }
.account-back a { font-weight: 500; }
.account-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.account-section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.account-label-field {
  display: block;
  margin: 0.75rem 0;
}
.account-label-field input {
  width: 100%;
  margin-top: 0.35rem;
}
.account-entry-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 0;
}
.account-entry-head h3 {
  margin: 0;
  font-size: 1rem;
}
.account-retract-btn { margin-top: 0.65rem; }
.account-login-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}
.account-danger { border-color: #e8b4b4; }
.account-delete-block { margin-top: 0.75rem; }
button.danger {
  background: #b42318;
  color: #fff;
  border-color: #b42318;
}
button.danger:hover { background: #912018; }

.hero { margin-bottom: 1.5rem; }
.hero.compact { margin-bottom: 1rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 0.35rem;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 0.5rem; }
.lede { color: var(--muted); margin: 0; line-height: 1.5; }
.muted { color: var(--muted); margin: 0 0 1rem; line-height: 1.5; }

.progress {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  margin: 1.25rem 0 0.5rem;
  overflow: hidden;
}
#progressBar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #15803d);
  transition: width 0.25s ease;
}
.phase-label { color: var(--muted); font-size: 0.9rem; margin: 0; }

.scroll-form { display: flex; flex-direction: column; gap: 1rem; }

.form-block-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.15rem 0;
  padding: 0.85rem 0.75rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid hsla(320, 28%, 68%, 0.2);
  background: transparent;
  overflow: hidden;
}
.form-block-group::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    hsla(270, 48%, 72%, 0.18) 0%,
    hsla(320, 55%, 76%, 0.18) 50%,
    hsla(8, 60%, 74%, 0.18) 100%
  );
  pointer-events: none;
}
.form-block-group--0 {
  border-color: hsla(220, 28%, 68%, 0.2);
}
.form-block-group--0::before {
  background: linear-gradient(
    135deg,
    hsla(185, 48%, 72%, 0.18) 0%,
    hsla(220, 55%, 76%, 0.18) 50%,
    hsla(250, 60%, 74%, 0.18) 100%
  );
}
.form-block-group--0 .field-block:not(.section-title-block) {
  box-shadow: 0 1px 2px hsla(220, 30%, 40%, 0.06);
}
.form-block-group > * {
  position: relative;
  z-index: 1;
}
.form-block-group .field-block:not(.section-title-block) {
  background: color-mix(in srgb, white 42%, transparent);
  border-color: color-mix(in srgb, white 55%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 1px 2px hsla(320, 30%, 40%, 0.06);
}

.field-block {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: opacity 0.2s ease;
}
.field-block.research-locked {
  opacity: 0.55;
}
.field-block.research-locked input,
.field-block.research-locked textarea,
.field-block.research-locked select,
.field-block.research-locked button {
  pointer-events: none;
}
.field-block.follow-up {
  margin-left: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-border);
}
.field-block.disabled:not(.research-locked) { opacity: 0.7; }

@keyframes block-reveal {
  from {
    opacity: 0;
    transform: translateY(-0.5rem) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes block-reveal-highlight {
  0% {
    box-shadow:
      0 0 0 3px hsla(320, 68%, 58%, 0.44),
      0 0 22px hsla(22, 88%, 68%, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 hsla(320, 68%, 58%, 0), 0 0 0 hsla(22, 88%, 68%, 0);
  }
}
.field-block.block-revealed,
.ytp-stripe-section.block-revealed,
.check.block-revealed,
.radio-card.block-revealed,
.segment-btn.block-revealed {
  animation:
    block-reveal 0.52s cubic-bezier(0.22, 1, 0.36, 1) both,
    block-reveal-highlight 2s ease-out 0.06s both;
}
@media (prefers-reduced-motion: reduce) {
  .field-block.block-revealed,
  .ytp-stripe-section.block-revealed,
  .check.block-revealed,
  .radio-card.block-revealed,
  .segment-btn.block-revealed {
    animation: none;
  }
}

.field-heading,
.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}
.section-title-block {
  margin: 1.25rem 0 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(
    135deg,
    hsla(270, 55%, 42%, 0.92) 0%,
    hsla(320, 65%, 52%, 0.92) 50%,
    hsla(8, 75%, 48%, 0.92) 100%
  );
  color: #fff;
  text-align: center;
}
.form-block-group--0 .form-group-header.section-title-block {
  background: linear-gradient(
    135deg,
    hsla(185, 55%, 42%, 0.92) 0%,
    hsla(220, 65%, 52%, 0.92) 50%,
    hsla(250, 75%, 48%, 0.92) 100%
  );
}
.form-block-group--drawing {
  border-color: hsla(220, 55%, 58%, 0.35);
}
.form-block-group--drawing::before {
  background: linear-gradient(
    135deg,
    hsl(205.28deg 77.57% 52.78% / 16%) 0%,
    hsl(161.29deg 78% 62% / 14%) 48%,
    hsla(22, 92%, 72%, 0.18) 100%
  );
}
.form-group-header--stripes.section-title-block {
  background: linear-gradient(
    135deg,
    hsla(205.28, 77.57%, 52.78%, 0.92) 0%,
    hsla(161.29, 78%, 62%, 0.92) 48%,
    hsla(22, 92%, 72%, 0.92) 100%
  );
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.form-block-group--drawing .entry-success-card {
  border: none;
  background: transparent;
  padding: 0;
}
.form-block-group--drawing .entry-referral-invite-lede {
  margin: 0 0 0.75rem;
  text-align: center;
  line-height: 1.5;
}
.form-block-group--drawing .entry-referral-copy-status {
  margin: 0.5rem 0 0;
  text-align: center;
}
.section-title-block .section-subtitle-line {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}
.form-block-group--drawing .section-title-block .section-title-line {
  font-size: 1.15rem;
}
.section-title-block .section-title-line {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.field-label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.rich-text { line-height: 1.6; color: var(--text); }
.rich-text p { margin: 0.5rem 0; }
.rich-text p:first-child { margin-top: 0; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
.rich-text strong { color: var(--text); font-weight: 600; }
.rich-text em { font-style: italic; }
.rich-text u { text-underline-offset: 2px; }
.rich-text a { color: var(--link); }
.rich-text details { margin: 0.35rem 0 0; }
.rich-text details summary {
  display: inline;
  cursor: pointer;
  color: var(--link);
  list-style: none;
  user-select: none;
}
.rich-text details summary::-webkit-details-marker { display: none; }
.rich-text details summary:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rich-text details[open] summary { margin-bottom: 0.5rem; }
.rich-text mark {
  display: inline;
  background: var(--accent-dim);
  color: inherit;
  padding: 0.06em 0;
  margin: 0;
  border-radius: 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.rich-text blockquote {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent-border);
  background: var(--accent-dim);
  font-weight: 400;
  color: var(--text);
}
.rich-text blockquote.kelly-blockquote {
  border-width: 0;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  background: linear-gradient(
    135deg,
    hsla(300, 72%, 52%, 0.28) 0%,
    hsla(330, 78%, 62%, 0.26) 48%,
    hsla(22, 92%, 72%, 0.3) 100%
  );
}
.rich-text blockquote p {
  margin: 0;
}
.field-label .rich-text blockquote {
  font-weight: 400;
}
.field-label .rich-text blockquote.kelly-blockquote {
  font-weight: 400;
}

.phase, .card {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.phase h2, .card h2 { margin-top: 0; font-size: 1.15rem; }
.hidden { display: none !important; }

label { display: block; margin: 0.75rem 0; }
input[type="text"],
input[type="tel"],
input[type="email"],
textarea,
select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--theme-input-bg);
  color: var(--text);
  font-size: 16px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--focus);
}
textarea { resize: vertical; }

.stripe-elements-mount {
  margin-top: 0.35rem;
  min-height: 5rem;
  padding: 0.85rem 0.75rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: var(--theme-input-bg);
}
.form-block-group .ytp-stripe-section {
  background: transparent;
  border: none;
  padding: 0.15rem 0 0.5rem;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.ytp-stripe-section .field-label {
  margin-bottom: 0.35rem;
}
.ytp-stripe-section .stripe-elements-mount {
  margin-top: 0.5rem;
  min-height: 8rem;
  padding: 1rem 0.85rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 88%, white);
}
.ytp-stripe-section .stripe-ytp-pay {
  margin-top: 1rem;
}
.stripe-elements-placeholder {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-style: italic;
}
.stripe-ytp-pay {
  margin-top: 0.75rem;
  width: 100%;
}

.admin textarea.form-flow-json {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}

.check, .radio-card {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0.5rem 0;
  background: var(--panel);
}
.radio-card { cursor: pointer; }
.radio-card:hover { border-color: var(--border-strong); }
.check.muted { opacity: 0.75; }
.check input, .radio-card input { margin-top: 0.2rem; }

.choice-options.horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.choice-options.horizontal .check,
.choice-options.horizontal .radio-card {
  flex: 1 1 auto;
  margin: 0;
  min-width: min(100%, 3.5rem);
}

.choice-options.segment {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.choice-options.range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.choice-options.range .range-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-self: center;
}
.range-scale-label {
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.35;
}
.choice-options.range .range-scale-label .rich-text {
  line-height: inherit;
  font-size: inherit;
  color: inherit;
}
.choice-options.range .range-scale-label .rich-text p {
  margin: 0;
  display: inline;
}
.choice-options.range .range-scale-label:first-of-type {
  text-align: end;
  justify-self: end;
}
.choice-options.range .range-scale-label:last-of-type {
  text-align: start;
  justify-self: start;
}
.segment-btn {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.25rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  background: var(--panel);
  color: var(--text);
}
.segment-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--panel-muted);
}
.segment-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.segment-btn.selected:hover:not(:disabled) {
  background: var(--accent-hover);
}
.segment-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.segment-btn.segment-btn-stacked {
  width: 4.25rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.4rem 0.35rem;
  line-height: 1;
}
.segment-btn.segment-btn-stacked .segment-btn-top {
  font-size: 1.1rem;
  font-weight: 700;
}
.segment-btn.segment-btn-stacked .segment-btn-sub {
  font-size: 0.72rem;
  font-weight: 500;
}

@media (max-width: 560px) {
  .choice-options.segment {
    flex-direction: column;
    align-items: stretch;
  }
  .choice-options.segment .segment-btn {
    width: 100%;
  }

  .choice-options.range {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .choice-options.range .range-scale-label,
  .choice-options.range .range-scale-label:first-of-type,
  .choice-options.range .range-scale-label:last-of-type {
    max-width: 100%;
    text-align: center;
    align-self: center;
  }
  .choice-options.range .range-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .choice-options.range .segment-btn {
    width: 100%;
  }

  .choice-options.horizontal {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .choice-options.horizontal .check,
  .choice-options.horizontal .radio-card {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }
}

.field-label + input[type="text"],
.field-label + textarea {
  margin-top: 0.35rem;
}

button {
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}
button:hover:not(:disabled) { background: var(--accent-hover); }
a.secondary.entry-dashboard-btn {
  display: inline-block;
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
a.secondary.entry-dashboard-btn:hover {
  background: #bbf7d0;
}
.entry-submit-dashboard { margin: 0.75rem 0 0; }
.entry-submit-blockers {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
}
.entry-submit-blockers-intro {
  margin: 0.65rem 0 0.25rem;
}
.entry-submit-blockers li {
  margin: 0.2rem 0;
}
button.entry-blocker-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
button.entry-blocker-link:hover {
  color: var(--text);
}

@keyframes essential-step-warn {
  0% {
    box-shadow:
      0 0 0 3px hsla(0, 72%, 52%, 0.42),
      0 0 18px hsla(0, 72%, 52%, 0.28);
  }
  100% {
    box-shadow:
      0 0 0 2px hsla(0, 72%, 52%, 0.55),
      0 0 24px hsla(0, 72%, 52%, 0.38);
  }
}
.field-block.essential-step-scroll-warn {
  animation: essential-step-warn 1.1s ease-in-out infinite alternate;
  border-radius: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .field-block.essential-step-scroll-warn {
    animation: none;
    box-shadow: 0 0 0 2px hsla(0, 72%, 52%, 0.55);
  }
}

.essential-steps-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  margin: 0;
  padding: 0.55rem 1rem;
  border: none;
  border-bottom: 1px solid hsla(0, 72%, 42%, 0.35);
  background: hsla(0, 85%, 96%, 0.96);
  color: hsl(0, 65%, 32%);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px hsla(0, 50%, 20%, 0.12);
}
.essential-steps-banner:hover {
  background: hsl(0, 85%, 93%);
}

button.secondary {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
button.secondary:hover:not(:disabled) {
  background: #bbf7d0;
}
button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-strong);
}
button.ghost:hover:not(:disabled) {
  background: var(--panel-muted);
  color: var(--text);
}
button:disabled { opacity: 0.45; cursor: not-allowed; }

.nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.status { color: var(--muted); font-size: 0.9rem; min-height: 1.25rem; }
.status.error { color: var(--danger); font-weight: 500; }
.status.ok { color: var(--accent); }

.form-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 2rem 1rem;
}
.form-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: form-spin 0.8s linear infinite;
}
@keyframes form-spin {
  to { transform: rotate(360deg); }
}
.form-load-error { margin-top: 1rem; }

.summary-list { padding-left: 1.1rem; line-height: 1.6; color: var(--muted); }
.review {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

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

.field-block[data-field="entry_submit"] .field-heading {
  margin-bottom: 0.5rem;
}
.field-block[data-field="entry_submit"] .hint {
  margin-bottom: 1.25rem;
}
.field-block[data-field="entry_submit"] button[type="button"] {
  margin-top: 0.25rem;
}
.preview {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  color: var(--accent-hover);
  font-size: 0.95rem;
}

.entry-success-card {
  border: 1px solid var(--accent-border);
  background: linear-gradient(180deg, var(--accent-dim) 0%, var(--panel) 100%);
  border-radius: var(--radius);
  padding: 0.25rem 0;
}

.referral-share-card {
  margin: 1rem 0 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius);
  background: var(--accent-dim);
  text-align: center;
}
blockquote.prize-potential-blockquote {
  margin: 0 0 0.85rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    hsl(205.28deg 77.57% 52.78% / 28%) 0%,
    hsl(161.29deg 78% 62% / 26%) 48%,
    hsla(22, 92%, 72%, 0.3) 100%
  );
  font-weight: 400;
  color: var(--text);
  text-align: center;
}
blockquote.prize-potential-blockquote p {
  margin: 0;
}
blockquote.prize-potential-blockquote strong {
  color: var(--text);
  font-weight: 600;
}
.referral-share-lede {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.referral-share-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.referral-share-link {
  text-decoration: none;
  line-height: 1.35;
}
.referral-share-copy {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  cursor: pointer;
}
.referral-share-copy:hover {
  background: var(--accent-hover);
}
.referral-copy-status { margin: 0.35rem 0 0; font-size: 0.9rem; }
.referral-share-link--url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--link);
  word-break: break-all;
}
.referral-share-link--url:hover {
  text-decoration: underline;
}

.completion-card {
  border: 1px solid var(--accent-border);
  background: linear-gradient(180deg, var(--accent-dim) 0%, var(--panel) 55%);
  border-radius: var(--radius);
  padding: 0.5rem 0 0.25rem;
  text-align: center;
}
.completion-card .rich-text h2 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  color: var(--accent);
}
.completion-recap {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--text);
}
.completion-recap strong { color: var(--accent); }

.scroll-form.form-complete {
  gap: 0;
}
.scroll-form.form-complete .completion-card {
  padding: 1.5rem 1rem;
}
.name-grid {
  display: grid;
  grid-template-columns: 1fr 6rem 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .name-grid { grid-template-columns: 1fr 1fr; }
  .name-grid label:last-child { grid-column: 1 / -1; }
}

.mailing-address-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.mailing-address-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
}
.mailing-address-grid input[type="text"] {
  margin-top: 0;
  padding: 0.4rem 0.55rem;
  font-size: 16px;
}
.mailing-address-grid .inline-hint {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}
.mailing-address-location {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.35rem;
}
.mailing-address-state-zip {
  display: contents;
}
@media (max-width: 560px) {
  .mailing-address-location {
    grid-template-columns: 1fr;
  }
  .mailing-address-state-zip {
    display: grid;
    grid-template-columns: 1fr minmax(5.5rem, 7.5rem);
    gap: 0.35rem;
  }
}
.field-block:has(.mailing-address-grid) .rich-text {
  font-size: 0.9rem;
  line-height: 1.35;
}
.field-block:has(.mailing-address-grid) .rich-text p {
  margin: 0 0 0.25rem;
}

/* Admin */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.metric {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-align: center;
}
.metric span {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}
.metric small { color: var(--muted); }

.referral-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
}
.referral-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.referral-table caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.referral-table th,
.referral-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.referral-table th {
  background: var(--panel-muted);
  font-weight: 600;
}
.referral-table th:last-child,
.referral-table td:last-child,
.referral-table th:nth-child(n + 2),
.referral-table td:nth-child(n + 2) {
  text-align: right;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.kv-list, .event-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}
.kv-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.event-feed {
  max-height: 320px;
  overflow: auto;
}
.event-feed li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.entry-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  max-height: 360px;
  overflow: auto;
}
.entries-tools { align-items: center; }
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.draw-log {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.draw-log li { padding: 0.25rem 0; }
.draw-row { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.5rem 0; }
.draw-row-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.draw-phone {
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  color: var(--text);
}
.draw-contact-note {
  flex: 1 1 10rem;
  min-width: 8rem;
  max-width: 16rem;
  font-size: 0.85rem;
}
.contacted-badge {
  font-size: 0.85rem;
  color: var(--accent);
}
.entry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.entry-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tester-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
.bonus-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #166534;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
.bonus-summary strong {
  color: var(--text);
}
.completion-bonus {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-muted);
}
.completion-bonus.ok {
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
.completion-bonus.muted {
  color: var(--muted);
}
.entry-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.entry-meta strong { display: block; }
.entry-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.entry-row button {
  flex-shrink: 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
}
.phone-verified { margin: 0.75rem 0 0; }

.phone-verify-code-box {
  margin: 0.75rem 0 0.5rem;
  padding: 0.65rem 1rem;
  display: inline-block;
  border: 2px solid var(--accent, #3d6b9e);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
}

.phone-verify-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.phone-verify-wait {
  margin-top: 0.35rem;
}

.phone-verify-intent {
  margin-top: 0.65rem;
}

.phone-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.phone-nanp-hint {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
button.phone-send-ready:not(:disabled) {
  box-shadow:
    0 0 0 2px hsla(142, 55%, 38%, 0.28),
    0 2px 10px hsla(142, 45%, 32%, 0.12);
}
button.secondary.phone-send-ready:not(:disabled) {
  border-color: hsl(142, 45%, 42%);
}
button.phone-send-ready:not(:disabled):hover {
  box-shadow:
    0 0 0 2px hsla(142, 55%, 38%, 0.38),
    0 3px 12px hsla(142, 45%, 32%, 0.18);
}
button.phone-sms-compose {
  width: 100%;
}
.submission-list,
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
.submission-row {
  border-bottom: 1px solid var(--border);
}
.submission-row details { padding: 0.55rem 0; }
.submission-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  cursor: pointer;
  list-style: none;
}
.submission-summary::-webkit-details-marker { display: none; }
.submission-meta { color: var(--muted); font-size: 0.9rem; }
.submission-detail {
  margin: 0.75rem 0 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.55;
}

.mini-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.mini-progress--compact {
  margin: 0.15rem 0 0.45rem;
  padding-left: 0.15rem;
}

.mini-progress--live .mini-progress-step {
  color: var(--accent);
}

.mini-progress-label {
  color: var(--muted);
}

.mini-progress-bar {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.mini-progress-step {
  color: var(--text);
}

.flow-diagram-wrap {
  margin: 0 0 0.85rem;
}

.flow-live-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  color: var(--accent);
}

.flow-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.45);
  animation: flow-live-pulse 1.8s ease-out infinite;
}

@keyframes flow-live-pulse {
  70% { box-shadow: 0 0 0 6px rgba(21, 128, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}

.flow-diagram {
  display: block;
  width: 100%;
  max-width: 11.5rem;
  height: auto;
}

.flow-edge {
  stroke: #9ca3af;
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
}

.flow-edge--done {
  stroke: #22c55e;
  stroke-width: 2;
  stroke-dasharray: none;
}

.flow-edge--current {
  stroke: #d97706;
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.flow-node {
  fill: transparent;
  stroke: #9ca3af;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.flow-node-label {
  fill: #6b7280;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--theme-font);
  pointer-events: none;
}

.flow-marker {
  pointer-events: none;
}

.flow-marker--done {
  fill: #22c55e;
}

.flow-marker-check {
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-marker--current {
  stroke: #d97706;
}

.flow-marker--upcoming {
  stroke: #9ca3af;
}

.flow-marker--ineligible {
  fill: #ef4444;
}

.flow-marker-x {
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.flow-node-group--done .flow-node {
  fill: var(--accent-dim);
  stroke: #22c55e;
  stroke-width: 1.5;
  stroke-dasharray: none;
}

.flow-node-group--done .flow-node-label {
  fill: #166534;
  font-weight: 600;
}

.flow-node-group--current .flow-node {
  fill: #fef3c7;
  stroke: #d97706;
  stroke-width: 2.5;
  stroke-dasharray: none;
}

.flow-node-group--current .flow-node-label {
  fill: #92400e;
  font-weight: 700;
}

.flow-node-group--upcoming .flow-node {
  fill: #f9fafb;
  stroke: #9ca3af;
  stroke-dasharray: 5 4;
}

.flow-node-group--upcoming .flow-node-label {
  fill: #6b7280;
  font-weight: 500;
}

.flow-node-group--ineligible .flow-node {
  fill: #fef2f2;
  stroke: #ef4444;
  stroke-width: 2;
  stroke-dasharray: none;
}

.flow-node-group--ineligible .flow-node-label {
  fill: #b91c1c;
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: #ef4444;
}

.status-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}
.status-in_progress {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}
.status-entered {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
}
.status-research_saved {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}
.detail-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.filters label { margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; align-items: flex-end; }
.row label.grow { flex: 1 1 12rem; margin: 0; }
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.flow-compact-wrap {
  display: flex;
  justify-content: center;
  padding: 0.35rem 0.25rem;
  border-radius: var(--radius);
  background: var(--panel-muted);
  border: 1px solid var(--border);
}

.flow-compact-wrap--live {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 1px rgba(21, 128, 61, 0.12);
}

.flow-diagram-compact {
  display: block;
  width: 3rem;
  height: auto;
}

.collage-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.collage-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.collage-tile {
  width: 100%;
  max-width: 14rem;
  text-align: left;
}

.collage-tile--live .mini-progress--live {
  animation: flow-live-pulse 1.8s ease-out infinite;
}

.collage-tile-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.65rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collage-complete-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  min-height: 5rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.sync-progress-card {
  margin-bottom: 1rem;
}

.sync-bar {
  margin-top: 0.65rem;
}

.sync-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

.sync-bar-count {
  color: var(--muted);
  font-size: 0.78rem;
}

.sync-bar-track {
  height: 0.45rem;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.sync-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, var(--accent));
  transition: width 0.3s ease;
}

.campaign-lifecycle {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.campaign-lifecycle h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin: 0.5rem 0 1rem;
}

.inline-fields label {
  flex: 1 1 10rem;
  margin: 0;
}

.inline-fields button {
  flex: 0 0 auto;
  margin-bottom: 0.1rem;
}

.promo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.promo-table th,
.promo-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.promo-table th {
  background: var(--panel-muted);
  font-weight: 600;
}

.promo-table tr.inactive td {
  opacity: 0.55;
}

.promo-create {
  margin-top: 0.75rem;
}

.closed-banner {
  margin-bottom: 1rem;
}

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

.site-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.site-brand {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.landing-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4rem);
}

.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 2rem 1.5rem;
}

.landing h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
}

.landing-code input {
  width: 100%;
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: 0.06em;
}

.landing-continue {
  margin-top: 1rem;
  align-self: center;
  min-width: 10rem;
}

.landing-footer {
  margin-top: auto;
  padding-top: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.landing-footer a,
.text-link {
  color: var(--link);
  text-decoration: none;
}

.landing-footer a:hover,
.text-link:hover {
  text-decoration: underline;
}

.login-affordance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  box-shadow: var(--shadow);
}
a.login-affordance {
  text-decoration: none;
}
.login-affordance:hover {
  border-color: var(--accent-border);
  background: var(--panel-muted);
}
.site-top .login-affordance:hover,
.dashboard-account-bar .login-affordance:hover {
  color: #fff;
  border-color: #fff;
  background: #1a1a1a;
}

.login-affordance--signed-in {
  font-weight: 600;
}
.site-top .login-affordance--signed-in:hover,
.dashboard-account-bar .login-affordance--signed-in:hover {
  color: #fff;
  border-color: #fff;
  background: #1a1a1a;
}

.login-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.35);
}

.login-dialog {
  width: min(100%, 22rem);
}

.login-dialog h2 {
  margin: 0 0 0.75rem;
}

.login-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.login-dialog-actions button {
  width: 100%;
}

.login-dialog label + .login-dialog-actions,
.login-dialog .phone-verify-code-box + .hint {
  margin-top: 0.5rem;
}

.form-top {
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.85rem;
}

.form-top .login-affordance,
.dashboard-account-bar .login-affordance {
  min-width: 0;
  min-height: 34px;
  padding: 0.32rem 0.75rem;
  line-height: 1.3;
}

.dashboard-account-bar .login-affordance {
  white-space: nowrap;
}

@media (max-width: 560px) {
  .shell {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding: 1.5rem 1rem 3rem;
  }
  main.shell {
    padding: 0;
  }
}

.recipe-card {
  max-width: 42rem;
}

.recipe-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.recipe-description {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.recipe-meta,
.recipe-times,
.recipe-servings {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

.recipe-meta span + span,
.recipe-times span + span {
  margin-left: 0.35rem;
}

.recipe-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 1.5rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.recipe-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.recipe-toolbar-label {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-right: 0.25rem;
}

.recipe-toggle {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--theme-input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.recipe-toggle.is-active {
  border-color: var(--accent-border);
  background: var(--accent-muted, var(--panel-muted));
  font-weight: 600;
}

.recipe-section {
  margin-top: 1.75rem;
}

.recipe-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
}

.recipe-ingredient-section h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.recipe-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recipe-checklist li + li {
  margin-top: 0.5rem;
}

.recipe-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  cursor: pointer;
  line-height: 1.45;
}

.recipe-check-item input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.recipe-check-item span.is-checked {
  text-decoration: line-through;
  color: var(--muted);
}

.recipe-instructions .recipe-step-num {
  font-weight: 600;
  margin-right: 0.25rem;
}

.recipe-notes {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.recipe-notes li + li {
  margin-top: 0.65rem;
}

.recipe-attribution {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

.recipe-attribution a {
  color: var(--link);
}
