:root {
  color-scheme: dark;
  --b3-green: #00ff66;
  --b3-accent: #00ff66;
  --b3-green-soft: rgba(0, 255, 102, 0.12);
  --b3-bg: #0f110e;
  --b3-panel: #171a15;
  --b3-panel-strong: #23251d;
  --b3-border: #35382e;
  --b3-text: #eeefe9;
  --b3-muted: #c4c6bc;
  --b3-faint: #7e8277;
  --b3-danger: #ff5f57;
  --b3-radius: 18px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --b3-accent: #007d39;
  --b3-green-soft: rgba(0, 125, 57, 0.1);
  --b3-bg: #f2f4ee;
  --b3-panel: #ffffff;
  --b3-panel-strong: #e9ede5;
  --b3-border: #cbd2c5;
  --b3-text: #10130f;
  --b3-muted: #4f564c;
  --b3-faint: #6d756a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--b3-bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(238, 239, 233, 0.055) 1px, transparent 0),
    radial-gradient(circle at 15% 10%, rgba(0, 255, 102, 0.07), transparent 24rem);
  background-size: 22px 22px, auto;
  color: var(--b3-muted);
  font-family: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), transparent 45%);
  content: "";
  pointer-events: none;
}

a {
  color: var(--b3-accent);
  text-decoration-color: rgba(0, 255, 102, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--b3-text);
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--b3-text);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 4.1rem);
}

h2 {
  font-size: clamp(1.55rem, 4vw, 2.1rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1.15rem;
}

label {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--b3-text);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--b3-border);
  border-radius: 10px;
  outline: none;
  background: var(--b3-bg);
  box-shadow: none;
  color: var(--b3-text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: var(--b3-faint);
}

input:focus,
select:focus {
  border-color: var(--b3-green);
  box-shadow: 0 0 0 3px rgba(0, 255, 102, 0.13);
}

input:focus::placeholder {
  color: transparent;
}

input[disabled] {
  opacity: 0.5;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--b3-green);
}

.container {
  width: min(92vw, 720px);
  margin: 46px auto 18px;
}

.wrap {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--b3-border);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(35, 37, 29, 0.95), rgba(20, 22, 18, 0.96));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

:root[data-theme="light"] body {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(16, 19, 15, 0.08) 1px, transparent 0),
    radial-gradient(circle at 15% 10%, rgba(0, 255, 102, 0.12), transparent 24rem);
}

:root[data-theme="light"] body::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 45%);
}

:root[data-theme="light"] .wrap {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 241, 0.98));
  box-shadow: 0 30px 80px rgba(40, 56, 42, 0.16);
}

:root[data-theme="light"] .wrap::after {
  border-color: rgba(0, 125, 57, 0.16);
  box-shadow: 0 0 100px rgba(0, 255, 102, 0.1);
}

.wrap::after {
  position: absolute;
  top: -120px;
  right: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(0, 255, 102, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 100px rgba(0, 255, 102, 0.08);
  content: "";
  pointer-events: none;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 36px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--b3-border);
}

.header .logo {
  flex: 0 1 285px;
}

.header .logo a {
  display: block;
  line-height: 0;
}

.header .logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 145px;
  object-fit: contain;
  object-position: center;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--b3-border);
  border-radius: 50%;
  background: var(--b3-panel-strong);
  box-shadow: none;
  color: var(--b3-text);
  cursor: pointer;
  font: inherit;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--b3-green);
  color: var(--b3-accent);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(0, 255, 102, 0.25);
  outline-offset: 2px;
}

.theme-icon {
  font-size: 1.05rem;
  line-height: 1;
}

:root[data-theme="dark"] .theme-icon-light,
:root[data-theme="light"] .theme-icon-dark {
  display: none;
}

.brand-meta {
  flex: 0 0 auto;
  text-align: right;
}

.brand-meta strong {
  display: block;
  color: var(--b3-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.73rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-meta span {
  display: block;
  margin-top: 5px;
  color: var(--b3-faint);
  font-size: 0.8rem;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--b3-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-hero {
  padding: 8px 0 4px;
}

.home-hero h1 {
  margin-bottom: 18px;
}

.home-hero .lede {
  max-width: 570px;
  margin: 0 auto 30px;
  color: var(--b3-muted);
  font-size: 1.08rem;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.home-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  font-size: 0.9rem;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--b3-border);
}

.status-item {
  padding: 12px;
  border: 1px solid rgba(53, 56, 46, 0.8);
  border-radius: 12px;
  background: rgba(15, 17, 14, 0.55);
  color: var(--b3-muted);
  font-size: 0.78rem;
}

:root[data-theme="light"] .status-item,
:root[data-theme="light"] .lists li,
:root[data-theme="light"] .archive li {
  background: rgba(255, 255, 255, 0.72);
}

.status-item::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--b3-green);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.7);
  content: "";
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

.small {
  font-size: 0.875rem;
}

.error {
  color: #ff8b86;
}

.section {
  margin-bottom: 42px;
}

.button {
  display: inline-flex;
  min-width: 150px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid var(--b3-green);
  border-radius: 999px;
  background: var(--b3-green);
  color: #10130f;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 760;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  border-color: #73ffab;
  background: #73ffab;
  color: #10130f;
  transform: translateY(-1px);
}

.button.button-outline {
  border-color: var(--b3-border);
  background: var(--b3-panel-strong);
  color: var(--b3-text);
}

.button.button-outline:hover {
  border-color: var(--b3-green);
  background: var(--b3-green-soft);
  color: var(--b3-green);
}

.unsub-all {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--b3-border);
}

.row {
  margin-bottom: 22px;
}

.lists {
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.lists li {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--b3-border);
  border-radius: 10px;
  background: rgba(15, 17, 14, 0.45);
}

.lists li label {
  margin-left: 6px;
}

.lists .description {
  margin: 4px 0 0 27px;
  color: var(--b3-faint);
  font-size: 0.84rem;
  line-height: 1.45;
}

.form .nonce {
  display: none;
}

.form .captcha {
  margin-top: 28px;
}

.archive {
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.archive li {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--b3-border);
  border-radius: 10px;
  background: rgba(15, 17, 14, 0.45);
}

.archive .date {
  display: block;
  color: var(--b3-faint);
  font-size: 0.82rem;
}

.feed {
  margin-right: 12px;
  filter: invert(1);
}

.pagination {
  margin-top: 30px;
  text-align: center;
}

.pg-page {
  display: inline-block;
  padding: 0 10px;
  text-decoration: none;
}

.pg-page.pg-selected {
  color: var(--b3-text);
  font-weight: 700;
  text-decoration: underline;
}

.login .submit {
  margin-top: 24px;
}

.login button {
  width: 100%;
}

.login button img {
  max-width: 24px;
  margin-right: 10px;
}

.login input[name="totp_code"] {
  font-size: 2rem;
  letter-spacing: 5px;
  text-align: center;
}

footer.container {
  margin-top: 22px;
  margin-bottom: 34px;
  color: var(--b3-faint);
  font-size: 0.76rem;
  text-align: center;
}

footer a {
  color: var(--b3-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--b3-accent);
}

@media (max-width: 650px) {
  .container {
    width: min(100%, 720px);
    margin-top: 0;
  }

  .wrap {
    min-height: 100vh;
    padding: 28px 22px;
    border: 0;
    border-radius: 0;
  }

  .header {
    align-items: flex-start;
  }

  .header .logo {
    flex-basis: 205px;
  }

  .brand-meta span {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }
}
