/* App waitlist card + confirm/unsubscribe page states (wl-* only).
 * Spec §5.1 + mockup 2026-10-29-app-waitlist-mockup.html. Copied byte-for-byte to dxfviewer.app.
 * Tokens come from the page: dxf (--accent, --text-*, --bg-primary; light = html.light) or
 * dwg article pages (--acc, --ink, --ink2, --mut, --bg; dark-only), with fallbacks. */

.wl-slot[hidden] { display: none !important; }

.wl-card, .wl-page {
  --wl-accent: var(--accent, var(--acc, #6c63ff));
  --wl-accent-hover: var(--accent-hover, var(--acc2, #5b54e6));
  --wl-text: var(--text-primary, var(--ink, #e4e4e7));
  --wl-text2: var(--text-secondary, var(--ink2, #a1a1aa));
  --wl-muted: var(--text-muted, var(--mut, #71717a));
  --wl-field: var(--bg-primary, var(--bg, #1a1a2e));
  --wl-card-bg: linear-gradient(135deg, #2a2a42 0%, #1e1e32 100%);
  --wl-card-border: rgba(108, 99, 255, .3);
  --wl-title: #fff;
  --wl-eyebrow: #a5a0ff;
  --wl-link: #a78bfa;
  --wl-field-border: rgba(255, 255, 255, .1);
  --wl-seg-bg: rgba(0, 0, 0, .25);
  --wl-ok: #4ade80;
  --wl-err: #f87171;
  box-sizing: border-box;
  color: var(--wl-text);
  font-family: inherit;
}
.wl-card *, .wl-page * { box-sizing: border-box; }

/* Default card is dark. Light: html.light (dxf pages), or the OS preference only on slots that opt in with data-wl-theme="auto". */
html.light .wl-card, html.light .wl-page {
  --wl-card-bg: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  --wl-card-border: rgba(99, 102, 241, .35);
  --wl-title: #312e81;
  --wl-eyebrow: var(--wl-accent);
  --wl-link: #4f46e5;
  --wl-field-border: #cbd5e1;
  --wl-seg-bg: rgba(99, 102, 241, .08);
  --wl-ok: #15803d;
  --wl-err: #b91c1c;
  --wl-text: var(--text-primary, #1a1a1a);
  --wl-text2: var(--text-secondary, #525252);
  --wl-muted: var(--text-muted, #737373);
  --wl-field: var(--bg-primary, #fff);
}
@media (prefers-color-scheme: light) {
  .wl-slot[data-wl-theme="auto"] .wl-card,
  .wl-slot[data-wl-theme="auto"] .wl-page {
    --wl-card-bg: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    --wl-card-border: rgba(99, 102, 241, .35);
    --wl-title: #312e81;
    --wl-eyebrow: var(--wl-accent);
    --wl-link: #4f46e5;
    --wl-field-border: #cbd5e1;
    --wl-seg-bg: rgba(99, 102, 241, .08);
    --wl-ok: #15803d;
    --wl-err: #b91c1c;
    --wl-text: #1a1a1a;
    --wl-text2: #525252;
    --wl-muted: #737373;
    --wl-field: #fff;
  }
}

.wl-i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.wl-card {
  position: relative;
  max-width: 100%;
  margin: 6px 0 18px;
  padding: 22px 22px 18px;
  background: var(--wl-card-bg);
  border: 1px solid var(--wl-card-border);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  overflow-wrap: anywhere;
  text-align: left;
}
.wl-head { display: flex; gap: 14px; align-items: flex-start; }
.wl-hbody { flex: 1; min-width: 0; }
.wl-ic { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--wl-accent); color: #fff; display: grid; place-items: center; }
.wl-ic .wl-i { width: 22px; height: 22px; }
.wl-eyebrow { font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: .07em; text-transform: uppercase; color: var(--wl-eyebrow); margin: 2px 0 4px; }
.wl-card .wl-title { font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--wl-title); margin: 0 0 6px; padding: 0; border: 0; }
.wl-card .wl-lede { font-size: 14px; line-height: 1.55; color: var(--wl-text2); margin: 0 0 14px; }

.wl-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 12px; background: var(--wl-seg-bg); border-radius: 12px; }
.wl-seg[hidden] { display: none; }
.wl-seg-btn {
  flex: 1 1 auto; display: flex; gap: 6px; align-items: center; justify-content: center;
  min-height: 36px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent;
  color: var(--wl-text2); font-size: 13px; font-weight: 600; line-height: 1.2; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.wl-seg-btn[aria-pressed="true"] { background: var(--wl-field); color: var(--wl-text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }

.wl-formwrap { position: relative; }
.wl-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.wl-form[hidden] { display: none; }
.wl-input {
  width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 11px 12px;
  background: var(--wl-field); color: var(--wl-text); border: 1px solid var(--wl-field-border); border-radius: 12px;
  font-size: 16px; font-family: inherit; line-height: 1.3;
}
.wl-input::placeholder { color: var(--wl-muted); opacity: 1; }
.wl-input:focus { outline: none; border-color: var(--wl-accent); }
.wl-input:focus-visible { outline: 2px solid var(--wl-accent); outline-offset: 1px; }
.wl-input[aria-invalid="true"] { border-color: var(--wl-err); }

.wl-btn {
  appearance: none; -webkit-appearance: none; display: inline-flex; gap: 8px; align-items: center; justify-content: center;
  width: 100%; min-height: 44px; margin: 0; padding: 11px 18px; border: 1px solid var(--wl-accent); border-radius: 12px;
  background: var(--wl-accent); color: #fff; font-size: 14px; font-weight: 600; font-family: inherit; line-height: 1.2;
  text-decoration: none; cursor: pointer; text-align: center;
}
.wl-btn:hover { background: var(--wl-accent-hover); border-color: var(--wl-accent-hover); color: #fff; }
.wl-btn:disabled { opacity: .7; cursor: progress; }
.wl-btn--ghost { background: transparent; color: var(--wl-text); border-color: var(--wl-field-border); }
.wl-btn--ghost:hover { background: transparent; color: var(--wl-text); border-color: var(--wl-accent); }
.wl-btn--big { width: auto; padding: 12px 24px; font-size: 15px; }

.wl-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 0; }
.wl-switch {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 4px 2px; margin: 0;
  min-height: 44px; color: var(--wl-link); font-size: 13px; font-family: inherit; cursor: pointer; text-align: left;
}
.wl-switch:hover { text-decoration: underline; }
.wl-switch[hidden] { display: none; }

.wl-card .wl-fine { font-size: 11.5px; line-height: 1.45; color: var(--wl-muted); margin: 12px 0 0; }
.wl-fine a, .wl-status-tg { color: var(--wl-link); }

.wl-status {
  display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; padding: 12px;
  font-size: 14px; line-height: 1.5; color: var(--wl-text2); background: var(--wl-seg-bg); border-radius: 12px;
}
.wl-status[hidden] { display: none; }
.wl-status .wl-i { width: 20px; height: 20px; margin-top: 1px; }
.wl-status--ok .wl-i { color: var(--wl-ok); }
.wl-status--ok { color: var(--wl-text); }
.wl-status--err { color: var(--wl-err); }
.wl-status-text { min-width: 0; }
.wl-status-tg { display: inline-flex; gap: 6px; align-items: center; }
.wl-status-tg .wl-i { width: 14px; height: 14px; margin: 0; color: inherit; }

.wl-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.wl-btn:focus-visible, .wl-seg-btn:focus-visible, .wl-switch:focus-visible, .wl-fine a:focus-visible, .wl-status-tg:focus-visible {
  outline: 2px solid var(--wl-accent); outline-offset: 2px;
}

/* Confirm / unsubscribe page states */
.wl-page { max-width: 560px; margin: 0 auto; padding: 40px 0; text-align: center; overflow-wrap: anywhere; }
.wl-big { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--wl-accent); color: #fff; display: grid; place-items: center; }
.wl-big .wl-i { width: 32px; height: 32px; }
.wl-page--warn .wl-big { background: #a1a1aa; }
.wl-page .wl-page-text { font-size: 17px; line-height: 1.5; color: var(--wl-text); margin: 0 0 18px; }
.wl-page .wl-formwrap, .wl-page .wl-fine { max-width: 440px; margin-left: auto; margin-right: auto; }
.wl-page .wl-fine { font-size: 11.5px; line-height: 1.45; color: var(--wl-muted); margin-top: 12px; }
.wl-page .wl-status { text-align: left; }
.wl-page .wl-card { text-align: left; }

/* ≥ 520 px: field and button in one row */
@media (min-width: 520px) {
  .wl-form { flex-direction: row; }
  .wl-input { flex: 1 1 auto; width: auto; }
  .wl-form .wl-btn { width: auto; flex: 0 0 auto; white-space: nowrap; }
  .wl-alt .wl-btn { width: auto; }
  .wl-switch { margin-left: auto; }
}
@media (max-width: 519.98px) {
  .wl-card { padding: 18px 16px 16px; }
  .wl-card .wl-title { font-size: 18px; }
  .wl-seg-btn { white-space: normal; }
}
/* Touch: min 44 px tap targets */
@media (pointer: coarse) {
  .wl-seg-btn { min-height: 44px; }
  .wl-fine a { display: inline-block; padding: 12px 4px; margin: -12px -4px; }
}
