/* ==========================================================================
   Texas STEM Ed — listmonk PUBLIC pages (high contrast, compact)
   Paste into: Settings → Appearance → Public → Custom CSS
   REPLACE everything in that box with this whole file.
   Part 1: dark theme for all public pages (subscribe, manage, archive, login).
   Part 2: extra rules that apply only when the form is shown inside
           txstemed.org (needs the embed JS in the Public JS box).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --bg:      #07121e;
  --surface: #0f2436;
  --raised:  #16344f;
  --line:    #2f5577;
  --text:    #f2f7fb;
  --muted:   #b4c7d8;
  --head:    #ffffff;
  --signal:  #e8501f;
  --signal2: #ff6a3d;
  --beacon:  #ffc24a;
  --bad:     #ff6b5b;
}

html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
}
body {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}
::selection { background: var(--signal); color: #fff; }

a { color: var(--beacon) !important; text-underline-offset: 3px; }
a:hover { color: var(--signal2) !important; }

h1, h2, h3, h4 {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
  font-weight: 600 !important;
  color: var(--head) !important;
  letter-spacing: .022em;
  line-height: 1.15 !important;
  margin: 0 0 .4em !important;
}
h1 { font-size: 2rem !important; }
h2 { font-size: 1.6rem !important; }
h3 { font-size: 1.3rem !important; }
p  { margin: 0 0 .75em !important; }
label { color: var(--text) !important; }

/* Panel — tight */
.container { max-width: 560px !important; margin: 24px auto 0 !important; }
.wrap {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-top: 3px solid var(--signal) !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  padding: 22px 26px !important;
}
.header {
  border-bottom: 1px solid var(--line) !important;
  padding-bottom: 12px !important;
  margin-bottom: 18px !important;
}
.header .logo img { max-width: 130px !important; height: auto; display: block; }
.section { margin-bottom: 20px !important; }
.row { margin-bottom: 12px !important; }
.small { font-size: .875em; color: var(--muted) !important; }

/* Fields */
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  padding: 9px 12px !important;
  background: var(--raised) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 1em !important;
}
input::placeholder { color: var(--muted) !important; opacity: .85; }
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--signal) !important;
  box-shadow: 0 0 0 3px rgba(232,80,31,.3) !important;
}
input:-webkit-autofill, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--raised) inset !important;
}
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--signal);
  width: 16px; height: 16px;
  vertical-align: -2px;
  margin-right: 6px;
}

/* Buttons */
.button, button[type="submit"] {
  display: inline-block;
  min-width: 0 !important;
  padding: 10px 24px !important;
  background: var(--signal) !important;
  color: #fff !important;
  border: 1px solid var(--signal) !important;
  border-radius: 3px !important;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
}
.button:hover, button[type="submit"]:hover {
  background: var(--signal2) !important;
  border-color: var(--signal2) !important;
  color: #fff !important;
}
.button.button-outline {
  background: transparent !important;
  border-color: var(--muted) !important;
  color: var(--head) !important;
}
.button.button-outline:hover { border-color: var(--signal) !important; }

/* List picker */
.lists { list-style: none; padding: 0 !important; margin: 0 0 8px !important; }
.lists li { margin: 0 0 4px !important; }
.lists .description {
  margin: 0 0 8px 24px !important;
  font-size: .85em !important;
  line-height: 1.35 !important;
  color: var(--muted) !important;
}
.unsub-all {
  margin-top: 18px !important;
  padding-top: 18px !important;
  border-top: 1px solid var(--line) !important;
}
.form .captcha { margin-top: 16px !important; }
.error { color: var(--bad) !important; font-weight: 600; }

/* Archive */
.archive { list-style: none; margin: 12px 0 0 !important; padding: 0 !important; }
.archive li {
  margin: 0 0 8px !important;
  padding: 10px 12px !important;
  background: var(--raised) !important;
  border: 1px solid var(--line) !important;
  border-left: 3px solid var(--beacon) !important;
  border-radius: 3px;
}
.archive li a {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: var(--head) !important;
  text-decoration: none !important;
}
.archive li a:hover { color: var(--signal2) !important; }
.archive .date {
  display: block;
  font-family: "IBM Plex Mono", monospace !important;
  font-size: .72rem !important;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--beacon) !important;
}
.feed, .home-options { font-family: "IBM Plex Mono", monospace; font-size: .8rem; }
.home-options { margin-top: 16px !important; }

/* Pagination */
.pagination { margin-top: 16px !important; font-family: "IBM Plex Mono", monospace; }
.pg-page {
  display: inline-block;
  padding: 2px 9px !important;
  margin: 0 2px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text) !important;
  text-decoration: none !important;
}
.pg-page.pg-selected { background: var(--signal); border-color: var(--signal); color: #fff !important; }

/* Login */
.login .submit { margin-top: 12px !important; }
.login button { width: 100%; }

/* Footer */
footer.container {
  margin: 12px auto 24px !important;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: .7rem !important;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted) !important;
}
footer a { color: var(--muted) !important; text-decoration: none; }
footer a:hover { color: var(--beacon) !important; }

@media screen and (max-width: 650px) {
  .container { margin: 10px !important; }
  .wrap { padding: 18px 16px !important; }
  .button, button[type="submit"] { width: 100%; }
}

/* ==========================================================================
   Part 2 — only when shown inside txstemed.org (html.is-embedded is set by
   the Public JS). Matches the SMS panel beside it.
   ========================================================================== */
html.is-embedded,
html.is-embedded body {
  background: #0f2436 !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}
/* No logo, no "Powered by" footer, no second "Subscribe" heading */
html.is-embedded .header,
html.is-embedded footer,
html.is-embedded section > h2:first-child { display: none !important; }

/* One panel, not a panel inside a panel */
html.is-embedded .container,
html.is-embedded .wrap {
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
html.is-embedded .form p { margin: 0 0 16px !important; }

/* Labels and list names white, like the SMS side */
html.is-embedded label,
html.is-embedded .form label {
  display: block;
  color: #ffffff !important;
  font-weight: 600 !important;
  margin: 0 0 6px !important;
}
html.is-embedded .lists label { display: inline; font-weight: 400 !important; margin: 0 !important; }
html.is-embedded .lists h2 {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  color: #ffffff !important;
  margin: 4px 0 10px !important;
}
html.is-embedded .lists { margin: 0 0 16px !important; }
html.is-embedded .lists li {
  margin: 0 0 6px !important;
  padding: 9px 12px !important;
  background: #14304a !important;
  border: 1px solid #23415c !important;
  border-radius: 3px !important;
}

/* Fields and button in the same colours as the SMS form */
html.is-embedded input[type="text"],
html.is-embedded input[type="email"] {
  background: #10283c !important;
  border-color: #23415c !important;
  color: #dde8f2 !important;
  padding: 12px 14px !important;
}
html.is-embedded input[type="checkbox"] { accent-color: #ffc24a; }
html.is-embedded .button,
html.is-embedded button[type="submit"] {
  background: #cc4313 !important;
  border-color: #cc4313 !important;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 12px 22px !important;
}
html.is-embedded .button:hover,
html.is-embedded button[type="submit"]:hover {
  background: #b23a10 !important;
  border-color: #b23a10 !important;
}
html.is-embedded .right { margin: 12px 0 0 !important; }
