/* ==========================================================
   Marigold Influence – Creator List Brief (BRAND-MATCHED)
   On-brand version: bold yellow canvas, coral accents,
   heavy sans wordmark, asterisk motif.
   Brand colors (from marigoldinfluence.com):
     --yellow      #ffd230    (primary canvas)
     --coral       #ff5757    (CTAs, accents)
     --black       #000000    (text, lines)
     --lavender    #8967ac    (rarely used accent)
   ========================================================== */

:root {
  --yellow:       #ffd230;
  --yellow-2:     #f5c416;   /* hover/darker */
  --yellow-soft:  #fff4cc;
  --coral:        #ff5757;
  --coral-2:      #ff7373;   /* hover/lighter */
  --coral-deep:   #e63e3e;
  --black:        #000000;
  --ink:          #1a1a1a;
  --ink-mute:     #5a5a5a;
  --white:        #ffffff;
  --line:         #000000;
  --shadow-card: 4px 4px 0 0 var(--black);
  --shadow-btn:  3px 3px 0 0 var(--black);
  --radius: 0;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ----------- Auth gate states -------------------------------------------
 * On initial load, body has class `auth-init`: hide the form/TOC/hero
 * until JS resolves auth. Once resolved:
 *   .auth-ok      → show form (default)
 *   .auth-needed  → show #auth-overlay
 *   .auth-no-token → show #no-token-notice
 * --------------------------------------------------------------------- */
body.auth-init main,
body.auth-needed main,
body.auth-no-token main { visibility: hidden; }
body.auth-init .site-footer,
body.auth-needed .site-footer,
body.auth-no-token .site-footer { visibility: hidden; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--yellow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ----------- Top double-rule (mimics marigoldinfluence.com) ----------- */
.rule-top {
  position: relative;
  padding: 14px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rule-line {
  height: 1.5px;
  background: var(--black);
  width: 100%;
}

/* ----------- Brand wordmark ----------- */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--black);
}
.brand-mark {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0.005em;
  line-height: 1;
  color: var(--black);
  text-transform: uppercase;
}
.brand-sub {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
}

/* ----------- Header ----------- */
.site-header {
  background: var(--yellow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
}
.header-nav a {
  color: var(--black);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s;
}
.header-nav a:hover { border-bottom-color: var(--coral); }

/* ----------- Hero ----------- */
.hero { padding: 48px 0 24px; }
.hero-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.eyebrow {
  font-family: 'Archivo', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .ast {
  color: var(--coral);
  font-size: 16px;
  line-height: 1;
}
.hero h1 {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  color: var(--black);
  text-transform: none;
}
.hero .lede {
  font-size: 17px;
  color: var(--ink);
  max-width: 580px;
  margin: 0;
  line-height: 1.55;
}
.hero .lede strong { font-weight: 700; }
.hero-aside {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-bottom: 8px;
}
.big-ast {
  font-family: 'Archivo', sans-serif;
  color: var(--coral);
  font-size: 90px;
  line-height: 1;
  display: inline-block;
  transform: rotate(8deg);
  animation: spin-slow 24s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(368deg); } }

/* ----------- Form layout ----------- */
.form-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  padding: 48px 28px 96px;
  align-items: start;
}

/* TOC sidebar */
.toc {
  position: sticky;
  top: 96px;
  font-size: 14px;
}
.toc-title {
  font-family: 'Archivo', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
  color: var(--black);
  margin: 0 0 14px;
}
#toc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-left: 2px solid var(--black);
}
#toc-list li { margin: 0; }
#toc-list a {
  display: block;
  padding: 8px 0 8px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.15s;
  font-weight: 500;
}
#toc-list a:hover { color: var(--black); }
#toc-list a.active {
  color: var(--black);
  font-weight: 700;
  border-left-color: var(--coral);
}
.autosave {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}
.autosave .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 87, 87, 0.18);
}
.autosave.saving .dot { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Cards (white blocks on yellow) */
.brief-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: 36px 36px 32px;
  margin: 0;
  box-shadow: var(--shadow-card);
  scroll-margin-top: 96px;
  overflow: hidden;
}
.card.highlight {
  background: var(--white);
  border-color: var(--coral);
  box-shadow: 4px 4px 0 0 var(--coral);
}
.card legend {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 28px;
  margin: 0;
  border-bottom: 1.5px solid var(--black);
  margin-bottom: 28px;
}
.card.highlight legend { border-bottom-color: var(--coral); }
.card > *:not(legend) { clear: left; }
.card legend .ast {
  color: var(--coral);
  font-size: 18px;
  line-height: 1;
}
.card legend .num {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.card legend .title {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--black);
  text-transform: none;
}

/* Fields */
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.row { display: grid; gap: 18px; margin-bottom: 22px; }
.row:last-child { margin-bottom: 0; }
.row.two   { grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: 1fr 1fr 1fr; }
.row .field { margin-bottom: 0; }

label, .label {
  display: block;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--black);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.label small {
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.01em;
  text-transform: none;
}
.req {
  font-size: 10px;
  font-weight: 700;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-left: 6px;
  vertical-align: 1px;
}
.hint {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 10px;
  line-height: 1.5;
  font-weight: 400;
}
.hint-spans { margin-top: -10px; margin-bottom: 22px; }

/* Inputs */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--black);
  border-radius: 0;
  padding: 11px 14px;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
input::placeholder, textarea::placeholder { color: #999; }
input:hover, textarea:hover { background: #fffef5; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 3px 3px 0 0 var(--coral);
  background: var(--white);
}
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* Suffix input (% sign) */
.suffix-input {
  position: relative;
  display: inline-block;
  width: 140px;
}
.suffix-input input { padding-right: 32px; }
.suffix-input .suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  pointer-events: none;
  font-weight: 600;
}

/* Checkboxes & radios – square, bold, brand-matched */
.checks, .radios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radios.stacked { flex-direction: column; gap: 6px; }
.check, .radio {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  background: var(--white);
  border: 1.5px solid var(--black);
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.12s;
  user-select: none;
}
.check:hover, .radio:hover {
  background: var(--yellow-soft);
}
.check input, .radio input { accent-color: var(--coral); }
.check:has(input:checked),
.radio:has(input:checked) {
  background: var(--coral);
  border-color: var(--black);
  color: var(--white);
  box-shadow: 2px 2px 0 0 var(--black);
  transform: translate(-1px, -1px);
}
.check:has(input:checked) input,
.radio:has(input:checked) input { accent-color: var(--white); }
.check-other, .radio-other { padding-right: 8px; }
.inline-input {
  width: 120px !important;
  padding: 4px 8px !important;
  font-size: 13px !important;
  border: 1px solid var(--black) !important;
  background: var(--white) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
.check:has(input:checked) .inline-input,
.radio:has(input:checked) .inline-input {
  background: var(--white) !important;
  color: var(--ink) !important;
}
.radios.stacked .radio-other .inline-input { width: auto !important; flex: 1; }

/* Highlight callout */
.callout {
  background: var(--yellow);
  border: 1.5px solid var(--black);
  padding: 16px 20px;
  font-size: 15px;
  color: var(--black);
  margin: 0 0 28px;
  font-weight: 500;
  line-height: 1.5;
}
.callout strong {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 900;
  letter-spacing: -0.005em;
}

/* Submit row */
.submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
}
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--coral);
  border: 2px solid var(--black);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.08s, box-shadow 0.08s, background 0.12s;
}
.btn-primary:hover {
  background: var(--coral-2);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--black);
}
.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--black);
}
.btn-primary:disabled { opacity: 0.7; cursor: progress; }
.btn-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-primary.is-loading .btn-spinner { display: inline-block; }
.btn-primary.is-loading .btn-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mute);
  background: none;
  border: none;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1.5px solid transparent;
  border-radius: 0;
  transition: color 0.15s, border-color 0.15s;
}
.btn-ghost:hover {
  color: var(--coral-deep);
  border-bottom-color: var(--coral-deep);
}

/* Success */
.success-screen { padding: 96px 0 120px; }
.success-wrap {
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}
.success-wrap .big-ast {
  font-size: 120px;
  margin-bottom: 16px;
  display: block;
}
.success-screen h2 {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 48px;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 18px;
  color: var(--black);
}
.success-screen p {
  color: var(--ink);
  font-size: 17px;
  margin: 0 0 12px;
  line-height: 1.55;
}
.success-screen .signoff {
  margin-top: 32px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  font-size: 14px;
}

/* Footer */
.site-footer {
  border-top: 1.5px solid var(--black);
  padding: 28px 0;
  font-size: 13px;
  color: var(--black);
  margin-top: 32px;
}
.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand-sm .brand-mark { font-size: 18px; }
.brand-sm .brand-sub { font-size: 11px; letter-spacing: 0.16em; }
.site-footer p { margin: 0; }
.site-footer a {
  color: var(--black);
  text-decoration: none;
  border-bottom: 1.5px solid var(--black);
  padding-bottom: 1px;
}
.site-footer a:hover { color: var(--coral); border-bottom-color: var(--coral); }

/* ----------- Responsive ----------- */
@media (max-width: 900px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-aside { justify-content: flex-start; padding-top: 24px; }
  .big-ast { font-size: 64px; }
  .form-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 20px 64px;
  }
  .toc {
    position: static;
    background: var(--white);
    border: 2px solid var(--black);
    box-shadow: var(--shadow-card);
    padding: 18px;
  }
  .row.two, .row.three { grid-template-columns: 1fr; }
  .card { padding: 28px 22px 24px; }
  .hero { padding: 32px 0 16px; }
  .wrap { padding: 0 20px; }
  .header-wrap { padding: 20px 20px; }
  .brand-mark { font-size: 22px; }
  .brand-sub { font-size: 11px; }
}

@media (max-width: 520px) {
  .header-nav a { font-size: 12px; }
  .checks, .radios { gap: 6px; }
  .check, .radio { padding: 9px 14px; font-size: 13px; }
  .card legend .title { font-size: 20px; }
  .success-screen h2 { font-size: 36px; }
  .footer-wrap { flex-direction: column; align-items: flex-start; }
}

/* ============== Auth overlay (login + private link notice) ============== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: fadeIn 0.18s ease;
}
/* Make the [hidden] attribute actually hide overlays (it would otherwise be
   overridden by the display: flex above) */
.auth-overlay[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.auth-panel {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 2px solid var(--black);
  box-shadow: var(--shadow-card);
  padding: 44px 40px 36px;
  text-align: center;
  position: relative;
}
.auth-ast {
  display: inline-block;
  font-family: 'Archivo', sans-serif;
  color: var(--coral);
  font-size: 48px;
  line-height: 1;
  margin-bottom: 18px;
  transform: rotate(8deg);
  animation: spin-slow 24s linear infinite;
}
.auth-eyebrow {
  font-family: 'Archivo', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-mute);
  margin: 0 0 12px;
}
.auth-title {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--black);
}
.auth-desc {
  font-size: 15px;
  color: var(--ink);
  margin: 0 0 22px;
  line-height: 1.5;
}
.auth-desc strong {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 900;
  letter-spacing: -0.005em;
}
#auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
#auth-password {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  text-align: center;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--black);
  padding: 14px 16px;
  letter-spacing: 0.02em;
  transition: border-color 0.12s, box-shadow 0.12s;
}
#auth-password:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 3px 3px 0 0 var(--coral);
}
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--coral);
  border: 2px solid var(--black);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.08s, box-shadow 0.08s, background 0.12s;
}
.auth-submit:hover {
  background: var(--coral-2);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--black);
}
.auth-submit:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--black);
}
.auth-submit:disabled { opacity: 0.7; cursor: progress; }
.auth-submit.is-loading .auth-submit-label { opacity: 0.7; }
.auth-submit.is-loading .btn-spinner { display: inline-block; }

.auth-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--coral-deep);
  margin: 0 0 14px;
}
.auth-help {
  font-size: 12px;
  color: var(--ink-mute);
  margin: 18px 0 0;
}
.auth-help a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-mute);
}
.auth-help a:hover { color: var(--coral); border-bottom-color: var(--coral); }

@media (max-width: 520px) {
  .auth-panel { padding: 36px 28px 30px; }
  .auth-ast { font-size: 40px; }
}
