/* ============================================================
   subscribe.css — email-report subscription surfaces
   Used by /subscribe (subscribe.html) and /manage (manage.html).
   Inherits the design tokens defined in css/style.css.
   ============================================================ */

/* ── Shared page scaffold (mirrors the legal pages' inline block) ── */
.page-content { padding: 32px 0 48px; }

.page-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-data); font-size: 0.62rem;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none; margin-bottom: 28px;
}
.page-back:hover { color: var(--cyan); text-decoration: none; }
.page-back svg { display: block; }

.page-title {
  font-family: var(--font-data); font-size: 0.72rem; font-weight: 600;
  color: var(--text-dim); letter-spacing: 1.8px;
  text-transform: uppercase; margin-bottom: 8px;
}
.page-lead {
  font-size: 0.9rem; color: var(--text-dim); line-height: 1.7;
  max-width: 620px; margin-bottom: 26px;
}

/* ── Card ─────────────────────────────────────────────────────── */
.sub-card {
  max-width: 620px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
}
.sub-card-title {
  font-size: 1.02rem; font-weight: 700; color: var(--text);
  margin: 0 0 20px;
}

/* ── Form ─────────────────────────────────────────────────────── */
.sub-form { margin: 0; }

.sub-field-label,
.sub-topics-title {
  display: block;
  font-family: var(--font-data); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}

.sub-email {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-data); font-size: 0.9rem;
  padding: 12px 14px;
  margin-bottom: 22px;
  transition: border-color .15s;
}
.sub-email:focus { outline: none; border-color: var(--cyan); }
.sub-email::placeholder { color: var(--text-muted); }

.sub-topics-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.sub-topics-title { margin-bottom: 0; }

.sub-toggle-all {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-data); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--cyan); padding: 4px 2px;
}
.sub-toggle-all:hover { text-decoration: underline; }

.sub-topics { list-style: none; margin: 0 0 24px; padding: 0; }
.sub-topic { margin: 0; }
.sub-topic + .sub-topic { border-top: 1px solid var(--border-dim); }

.sub-topic-row {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 14px 4px; cursor: pointer;
}
.sub-topic-row:hover .sub-topic-label { color: var(--text); }

/* Hide the native checkbox; drive the custom box from it. */
.sub-topic-cb {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.sub-topic-box {
  flex: 0 0 auto; margin-top: 2px;
  width: 18px; height: 18px; border-radius: 4px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  position: relative; transition: all .15s;
}
.sub-topic-cb:checked + .sub-topic-box {
  background: var(--cyan); border-color: var(--cyan);
}
.sub-topic-cb:checked + .sub-topic-box::after {
  content: ""; position: absolute;
  left: 5px; top: 1.5px; width: 5px; height: 9px;
  border: solid #04121a; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sub-topic-cb:focus-visible + .sub-topic-box {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}

.sub-topic-text { display: flex; flex-direction: column; gap: 2px; }
.sub-topic-label {
  font-size: 0.9rem; font-weight: 600; color: var(--text-dim);
  transition: color .15s;
}
.sub-topic-blurb {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.5;
}

/* ── Submit ───────────────────────────────────────────────────── */
.sub-submit {
  width: 100%;
  background: var(--cyan);
  color: #04121a;
  border: none; border-radius: var(--radius);
  font-family: var(--font-data); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.5px;
  padding: 13px 16px; cursor: pointer;
  transition: opacity .15s, transform .05s;
}
.sub-submit:hover { opacity: 0.9; }
.sub-submit:active { transform: translateY(1px); }
.sub-submit:disabled { opacity: 0.5; cursor: default; }

.sub-privacy {
  font-size: 0.74rem; color: var(--text-muted); line-height: 1.6;
  margin: 14px 0 0;
}
.sub-privacy a, .sub-unsub-line a, .sub-note a { color: var(--cyan); }

/* ── Success / notes / messages ───────────────────────────────── */
.sub-success { text-align: center; padding: 10px 4px 6px; }
.sub-success-mark {
  width: 52px; height: 52px; margin: 0 auto 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--green); border: 1.5px solid var(--green);
  background: var(--green-dim);
}
.sub-success-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.sub-success-body {
  font-size: 0.88rem; color: var(--text-dim); line-height: 1.7;
  max-width: 440px; margin: 0 auto;
}

.sub-note { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; padding: 8px 0; }
.sub-note--warn { color: var(--amber); }

.sub-account {
  font-size: 0.8rem; color: var(--text-muted);
  font-family: var(--font-data);
  margin: 0 0 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-dim);
}
.sub-account b { color: var(--text-dim); font-weight: 600; }

.sub-msg {
  font-size: 0.82rem; margin-top: 14px; padding: 10px 12px;
  border-radius: var(--radius); line-height: 1.5;
}
.sub-msg--ok  { color: var(--green); background: var(--green-dim); border: 1px solid rgba(34,197,94,.25); }
.sub-msg--err { color: var(--red);   background: var(--red-dim);   border: 1px solid rgba(239,68,68,.25); }

.sub-unsub-line {
  font-size: 0.76rem; color: var(--text-muted); line-height: 1.6;
  margin: 22px 0 0; padding-top: 16px;
  border-top: 1px solid var(--border-dim);
}
.sub-unsub-link { color: var(--text-dim); text-decoration: underline; }
.sub-unsub-link:hover { color: var(--red); }

@media (max-width: 640px) {
  .sub-card { padding: 22px 18px 20px; }
}
