/* /alerts/: key-level alert subscriptions. Tokens and components come from /mb.css; the panel and
   toasts are built by /lab/orderflow/notify.js. */
.alerts-page main {
  padding-top: var(--header-h);
}

/* ---------- hero ---------- */
.alerts-hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 120px) clamp(40px, 6vw, 72px);
  overflow: hidden;
}
.alerts-hero-inner {
  position: relative;
  display: grid;
  gap: 24px;
  max-width: 980px;
  margin-inline: auto;
}
.alerts-hero .mb-lead {
  max-width: 62ch;
}
.alerts-chips,
.alerts-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.alerts-cta {
  gap: 14px;
  margin-top: 8px;
}

/* ---------- steps ---------- */
.alerts-steps ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.alerts-steps li {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  border-top: 1px solid var(--line-2);
}
.alerts-steps .mb-num {
  color: var(--teal);
  font-size: 22px;
}
.alerts-steps b {
  font-size: 20px;
}
.alerts-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- section heads ---------- */
.alerts-subscribe,
.alerts-kinds,
.alerts-notes {
  padding-block: clamp(48px, 7vw, 96px) 0;
}
.alerts-head {
  display: grid;
  gap: 12px;
  max-width: 70ch;
  margin-bottom: 28px;
}
.alerts-head .mb-small {
  margin: 0;
}

/* ---------- subscription panel (notify.js) ---------- */
.alerts-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 56px);
  row-gap: 18px;
  align-items: start;
  padding: clamp(22px, 3.5vw, 40px);
}
.alerts-panel > :not(.notify-line) {
  grid-column: 1;
}
.alerts-panel > .notify-line {
  grid-column: 2;
  grid-row: 1 / span 5;
}
.notify-switch {
  justify-self: start;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: var(--teal);
  color: var(--teal-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.notify-switch[aria-pressed="true"] {
  background: transparent;
  color: var(--teal);
}
.notify-note,
.notify-foot {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.notify-foot {
  color: var(--dim);
  font-size: 13px;
}
.alerts-panel fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  border: 0;
}
.alerts-panel legend {
  margin-bottom: 10px;
  color: var(--dim);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}
.alerts-panel .check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: baseline;
  cursor: pointer;
}
.alerts-panel .check input {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
}
.alerts-panel .check span {
  font-weight: 700;
}
.alerts-panel .check small {
  grid-column: 2;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.5;
}
.notify-line {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: var(--r-m);
  background: rgba(6, 199, 85, 0.06);
  box-shadow: inset 0 0 0 1px rgba(6, 199, 85, 0.35);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.notify-line h3 {
  font-size: 20px;
  font-weight: 800;
}
.notify-line > p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}
.notify-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.notify-select select {
  min-height: 38px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  background: var(--panel-solid);
  color: var(--text);
  font: inherit;
}
.notify-keyword {
  display: block;
  padding: 12px 14px;
  border-radius: var(--r-s);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.notify-line-button,
.notify-line-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #06c755;
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.notify-line-button:disabled,
.notify-line-button[aria-disabled="true"] {
  background: rgba(237, 242, 237, 0.08);
  color: var(--muted);
  cursor: not-allowed;
}

/* ---------- event cards ---------- */
.alerts-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.alerts-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 10px;
  padding: 24px;
  border-radius: var(--r-m);
}
.alerts-card-group {
  margin: 0;
  color: var(--teal);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.alerts-card h3 {
  font-size: 22px;
  font-weight: 800;
}
.alerts-card-about {
  margin: 0;
  color: var(--text-2);
  line-height: 1.75;
}
.alerts-card-stat {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.alerts-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
}

/* ---------- notes & footer ---------- */
.alerts-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.alerts-note {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
}
.alerts-note ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2em;
  color: var(--text-2);
  line-height: 1.7;
}
.alerts-note .mb-small {
  margin: 0;
}
.alerts-footer {
  padding-block: 64px 48px;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.8;
}
.alerts-footer a {
  color: var(--muted);
}

/* ---------- toasts (notify.js) ---------- */
.toasts {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: 16px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--r-m);
  border-left: 3px solid var(--teal);
  background: var(--panel-solid);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 24px 60px -20px rgba(0, 0, 0, 0.9);
  pointer-events: auto;
}
.toast p {
  margin: 0;
  line-height: 1.6;
}
.toast small {
  color: var(--dim);
  font-size: 12px;
}
.toast-actions {
  display: flex;
  gap: 8px;
}
.toast-actions button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(237, 242, 237, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.toast-actions button:first-child {
  background: var(--teal);
  color: var(--teal-ink);
  font-weight: 800;
}

@media (max-width: 860px) {
  .alerts-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .alerts-panel > .notify-line {
    grid-column: 1;
    grid-row: auto;
  }
  .alerts-steps ol,
  .alerts-notes {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  .alerts-panel fieldset {
    grid-template-columns: minmax(0, 1fr);
  }
  .alerts-cta .mb-btn {
    width: 100%;
  }
}
