/* Use the installed system face, including San Francisco on Apple devices. */
.cw, body:has(.cw) .mast {
  --cw-type: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-family: var(--cw-type);
  -webkit-font-smoothing: antialiased;
}
body:has(.cw) .mast {
  --mast: 56px;
  height: var(--mast);
  padding-inline: max(20px, calc((100% - 1024px) / 2));
  color: #1d1d1f;
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid #dcdce0;
}
body:has(.cw) .wordmark, body:has(.cw) .wordmark i {
  font: 600 21px/1.2 var(--cw-type);
  letter-spacing: -.035em;
}
body:has(.cw) .nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  background: transparent; color: #0066cc; border: 0;
  font: 400 14px/1.25 var(--cw-type);
}
body:has(.cw) .nav-link:hover { text-decoration: underline; }
body:has(.cw) .nav-link span, .cw-button span[aria-hidden] { display: none; }

.cw {
  --canvas: #fff;
  --surface: #fff;
  --ink: #1d1d1f;
  --muted: #515155;
  --line: #86868b;
  --divider: #d2d2d7;
  --action: #0066cc;
  --on-action: #fff;
  --focus: #0071e3;
  color-scheme: light;
  container-type: inline-size;
  display: grid; align-content: center;
  padding: clamp(48px, 7vw, 104px) clamp(20px, 5vw, 80px);
  min-height: min(44rem, calc(100svh - 56px));
  background: var(--canvas); color: var(--ink);
  scroll-margin-top: 56px;
  font-size: 1.0625rem; line-height: 1.47;
}
.cw, .cw * { box-sizing: border-box; }
.cw-layout {
  width: 100%; max-width: 960px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px;
}
.cw-intro, .cw-form, .cw-field { min-width: 0; }
.cw h2, .cw h2 em {
  margin: 0; font: 600 clamp(2.125rem, 5.1cqw, 3.5rem)/1.075 var(--cw-type);
  letter-spacing: -.042em; text-wrap: balance;
}
.cw h2 em { display: block; }
.cw-mark { display: block; width: 80px; height: auto; margin-bottom: 24px; }
.cw-form { margin: 0; display: grid; align-content: center; gap: 12px; }
.cw-field { position: relative; display: grid; }
.cw-field > span:first-child {
  position: absolute; z-index: 1; top: 8px; left: 16px;
  color: var(--muted); font: 450 .8125rem/1.25 var(--cw-type); pointer-events: none;
}
.cw-field :is(input, textarea) {
  appearance: none; width: 100%; min-width: 0; min-height: 56px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 25px 15px 7px; background: var(--surface); color: var(--ink);
  font: 400 1.0625rem/1.35 var(--cw-type); caret-color: var(--focus);
}
.cw-button {
  justify-self: start; min-height: 48px; margin: 4px 0 0; padding: 12px 26px;
  border: 1px solid transparent; border-radius: 100px;
  background: var(--action); color: var(--on-action);
  font: 500 1.0625rem/1.25 var(--cw-type); cursor: pointer;
}
.cw .cw-field input:focus, .cw-button:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.cw :is(.cw-status, .cw-error) { grid-column: 1 / -1; margin: 0; font: 400 1rem/1.5 var(--cw-type); }
.cw { --error-ink: #972521; --error-bg: #fff9f8; --error-edge: #e6cac7; }
.cw--varsity, .cw--mono { --error-ink: #ffbcba; --error-bg: #322327; --error-edge: #705255; }
.cw .cw-error {
  position: relative; justify-self: start; max-width: 100%;
  padding: 9px 13px; border: 1px solid var(--error-edge); border-radius: 12px;
  background: var(--error-bg); color: var(--error-ink); text-align: left;
  box-shadow: 0 3px 10px rgb(0 0 0 / 7%); font: 450 .875rem/1.4 var(--cw-type);
}
.cw .cw-field > .cw-error { margin: 8px 2px 0; }
.cw-field > .cw-error::before {
  content: ""; position: absolute; inset: -4px auto auto 17px; width: 6px; height: 6px;
  background: var(--error-bg); border-top: 1px solid var(--error-edge);
  border-left: 1px solid var(--error-edge); transform: rotate(45deg);
}
.cw .cw-field input[aria-invalid="true"] { border-color: var(--error-ink); }
@media (prefers-reduced-motion: no-preference) {
  .cw-error:not([hidden]) { animation: cw-feedback-in 140ms ease-out; }
  @keyframes cw-feedback-in { from { opacity: 0; transform: translateY(-2px); } }
}
.cw-error ul { margin-block: 0; padding-inline-start: 1.25em; }
@media (hover: hover) { .cw-button:hover { filter: brightness(1.08); } }
@media (prefers-reduced-motion: no-preference) {
  .cw-button { transition: transform 140ms ease-out, filter 140ms ease-out; }
  .cw-button:active { transform: scale(.98); }
  .cw-field input { transition: border-color 120ms ease-out; }
}

.waitlist-home { display: flex; flex-direction: column; min-height: 100svh; }
.waitlist-home #main { flex: 1; display: flex; flex-direction: column; }
.waitlist-home #main > .shopify-section:has(.cw) { flex: 1; display: grid; }
.waitlist-home .store-name { margin: 0; font: inherit; }
.waitlist-home .password-access { align-self: center; font-family: system-ui, sans-serif; }

/* Centered invitation. Selected for the Cal Stickers waitlist; theme setting: edition. */
.cw--edition .cw-layout { max-width: 740px; text-align: center; }
.cw--edition .cw-intro::before {
  content: ""; display: block; width: 84px; aspect-ratio: 316/211; margin: 0 auto 28px;
  background: url("cal-mark-blue.svg") center/contain no-repeat;
}
.cw--edition .cw-form { width: min(100%, 360px); margin-inline: auto; text-align: left; }
.cw--edition .cw-button { justify-self: center; margin-top: 8px; }

/* Give empty fields a readable label, then lift it to make room for typing. */
.cw--edition .cw-field:has(:is(input, textarea):placeholder-shown):not(:focus-within) > span:first-child {
  top: 17px; font-size: 1.0625rem; line-height: 1.35;
}
.cw--edition .cw-field input:focus { outline: 2px solid var(--focus); outline-offset: 0; }
.cw--edition .cw-inputs { gap: 4px; }
.cw--edition .cw-email-option > summary {
  margin-inline: auto; color: #0066cc; font-size: .875rem; font-weight: 400;
}
.cw--edition .cw-email-option[open] { margin-bottom: 8px; }
.cw--edition .cw-phone-note, .cw--edition [data-status] { text-align: center; }
.cw--edition .cw-phone-note { font-size: .8125rem; }
@media (prefers-reduced-motion: no-preference) {
  .cw--edition .cw-field > span:first-child { transition: top 120ms ease-out, font-size 120ms ease-out; }
}

/* Midnight split. */
.cw--varsity, .cw--mono {
  color-scheme: dark; --canvas: #101113; --ink: #f5f5f7; --muted: #cbcbcf;
  --surface: #1c1c1e; --line: #79797f; --divider: #434346;
  --action: #f5f5f7; --on-action: #1d1d1f; --focus: #62afff;
}
.cw--varsity .cw-layout, .cw--ticket .cw-layout, .cw--poster .cw-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 7cqw, 88px); align-items: center;
}
.cw--varsity .cw-form { padding-left: clamp(20px, 3cqw, 40px); border-left: 1px solid var(--divider); }

/* A single grouped panel on the light system-gray canvas. */
.cw--ticket, .cw--seal, .cw--ribbon { --canvas: #f5f5f7; }
.cw--ticket .cw-layout {
  background: var(--surface); border-radius: 28px;
  padding: clamp(24px, 4.5cqw, 60px); gap: clamp(24px, 4cqw, 56px);
}
.cw--ticket h2, .cw--ticket h2 em { font-size: clamp(2rem, 3.8cqw, 3rem); }
.cw--ticket .cw-button, .cw--seal .cw-button, .cw--poster .cw-button { justify-self: stretch; }

/* Left-aligned, with fields on one row under the invitation. */
.cw--margin .cw-layout { max-width: 800px; }
.cw--margin h2, .cw--margin h2 em { font-size: clamp(2.25rem, 5.6cqw, 4rem); }
.cw--margin h2 em { color: var(--muted); }
.cw--margin .cw-form, .cw--mono .cw-form, .cw--ribbon .cw-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; align-items: center;
}
.cw--margin .cw-button, .cw--mono .cw-button, .cw--ribbon .cw-button { margin: 0; }

/* Portrait card with the manufacturer's blue mark. */
.cw--seal .cw-layout {
  max-width: 456px; border: 1px solid #dedee2; border-radius: 28px;
  padding: clamp(24px, 4cqw, 44px); background: var(--surface); gap: 24px;
}
.cw--seal .cw-mark { width: 68px; }
.cw--seal h2, .cw--seal h2 em { font-size: clamp(1.875rem, 3.4cqw, 2.5rem); }

/* Wide dark invitation, with the form along the baseline. */
.cw--mono { --canvas: #000; --action: #0071e3; --on-action: white; }
.cw--mono .cw-layout { max-width: 880px; text-align: center; }
.cw--mono h2 em { color: #aaaab0; }
.cw--mono .cw-form { text-align: left; }

/* A product tile gives the gold mark its own space. */
.cw--poster .cw-layout { max-width: 900px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.cw--poster .cw-intro { border-radius: 24px; background: #0c243c; color: #f5f5f7; padding: clamp(24px, 4cqw, 48px); }
.cw--poster .cw-mark { width: clamp(84px, 14cqw, 160px); margin-bottom: 32px; }
.cw--poster h2, .cw--poster h2 em { font-size: clamp(1.875rem, 3.3cqw, 2.75rem); }

/* A compact floating form beneath a single centered heading. */
.cw--ribbon .cw-layout { max-width: 1024px; gap: 24px; }
.cw--ribbon h2 { text-align: center; }
.cw--ribbon h2, .cw--ribbon h2 em { font-size: clamp(2rem, 3.8cqw, 3rem); }
.cw--ribbon h2 em { display: inline; }
.cw--ribbon .cw-form {
  width: min(100%, 800px); margin-inline: auto; padding: 12px;
  border: 1px solid var(--divider); border-radius: 24px;
  background: var(--surface); box-shadow: 0 4px 16px #00000008;
}
.cw--ribbon .cw-field input { background: var(--canvas); border-color: transparent; }

@container (max-width: 620px) {
  .cw .cw-layout, .cw .cw-form { grid-template-columns: minmax(0, 1fr); }
  .cw--varsity .cw-form { padding: 0; border: 0; }
  .cw--varsity .cw-layout, .cw--margin .cw-layout, .cw--poster .cw-layout { max-width: 430px; }
  .cw--mono .cw-form, .cw--ribbon .cw-form { width: min(100%, 390px); margin-inline: auto; }
  .cw--mono .cw-button, .cw--ribbon .cw-button { justify-self: stretch; }
}

.cw-inputs {display:grid;gap:12px}
.cw [hidden] {display:none}
.cw-status:empty {display:none}
.cw-restart {justify-self:start;padding:8px 0;color:var(--action);background:none;border:0;text-align:left;font:inherit;cursor:pointer;text-decoration:underline}
.cw-button:disabled {opacity:.6}

/* A grouped contact form with optional email disclosed on demand. */
.cw-contact-rows { display: grid; gap: 12px; }
.cw-email-option > summary {
  display: flex; align-items: center; gap: .35em; width: fit-content;
  min-height: 44px; color: var(--ink); cursor: pointer; list-style: none;
  font: 500 .9375rem/1.35 var(--cw-type);
}
.cw-email-option > summary::-webkit-details-marker { display: none; }
.cw-email-option > summary::before {
  content: ""; width: 6px; height: 6px; margin: 0 6px 0 2px;
  border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
.cw-email-option[open] > summary::before { transform: rotate(135deg); }
.cw-email-option > summary span { color: var(--muted); font-weight: 400; }
.cw-phone-note { margin: 0; color: var(--muted); font: 400 .875rem/1.45 var(--cw-type); }
.cw--split { --canvas: #f5f5f7; }
.cw--split .cw-layout {
  max-width: 960px; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 7cqw, 88px);
}
.cw--split .cw-intro::before {
  content: ""; display: block; width: 72px; aspect-ratio: 316/211;
  margin-bottom: 24px; background: url("cal-mark-blue.svg") center/contain no-repeat;
}
.cw--split h2, .cw--split h2 em { font-size: clamp(2.125rem, 4.2cqw, 3.125rem); text-wrap: balance; }
.cw--split h2 em { display: inline; color: #535357; }
.cw--split .cw-form {
  padding: clamp(22px, 3.3cqw, 36px); gap: 20px;
  background: #fff; border-radius: 24px; border: 1px solid #e5e5e9;
}
.cw--split .cw-inputs { gap: 6px; }
.cw--split .cw-contact-rows {
  background: var(--canvas); border: 1px solid #d2d2d7; border-radius: 14px; gap: 0;
}
.cw--split .cw-contact-rows .cw-field + .cw-field { border-top: 1px solid #d2d2d7; }
.cw--split .cw-contact-rows input {
  background: transparent; border: 0; min-height: 60px; border-radius: 0;
}
.cw--split .cw-contact-rows .cw-field:first-child input { border-radius: 13px 13px 0 0; }
.cw--split .cw-contact-rows .cw-field:last-child input { border-radius: 0 0 13px 13px; }
.cw--split .cw-field input:focus { outline: 2px solid var(--focus); outline-offset: -2px; }
.cw--split .cw-field input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--error-ink); }
.cw--split .cw-field > .cw-error, .cw--split .cw-error {
  margin: 4px 0 2px; padding: 0 12px; border: 0; background: transparent;
  box-shadow: none; font-size: .8125rem; line-height: 1.4;
}
.cw--split .cw-error::before { display: none; }
.cw--split .cw-phone-note { margin-top: 4px; }
.cw--split .cw-button { justify-self: stretch; margin: 0; }
@container (max-width: 680px) {
  .cw--split .cw-layout { max-width: 420px; grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cw--split .cw-intro::before { width: 56px; margin-bottom: 16px; }
  .cw--split .cw-form { padding: 20px; }
}

/* Field states for the waitlist and its review views. */
.cw-field b[aria-hidden] { font-weight: inherit; }
.cw-signup-fields { display: grid; grid-column: 1 / -1; gap: 12px; min-width: 0; }
.cw-optional-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.cw-comments textarea { resize: vertical; }
.cw .cw-field :is(input, textarea):focus {
  border-color: #0071e3; outline: 3px solid #85b8ff; outline-offset: 0;
}
.cw .cw-field :is(input, textarea)[aria-invalid="true"] {
  border: 1px solid #c32720; background: #fff2f3; color: #85211d;
}
.cw .cw-field:has([aria-invalid="true"]) > span:first-child { color: #b4221b; }
.cw .cw-field > .cw-error[data-field-feedback] {
  display: flex; align-items: baseline; gap: 5px; margin: 6px 1px 0;
  padding: 0; border: 0; border-radius: 0; background: transparent; color: #b4221b;
  box-shadow: none; font: 400 .8125rem/1.4 var(--cw-type);
}
.cw .cw-field > .cw-error[data-field-feedback][hidden] { display: none; }
.cw .cw-field > .cw-error[data-field-feedback]::before {
  content: "!"; position: static; width: 1em; height: 1em; flex: none; box-sizing: content-box;
  border: 1px solid currentColor; border-radius: 50%; background: transparent;
  transform: none; text-align: center; font: 600 .625rem/1 var(--cw-type);
}
.cw:is(.cw--mono, .cw--varsity) .cw-field > .cw-error { color: #ffc0bd; }
