* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: #0d0d10;
  --panel-2: #111116;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.16);
  --text: #fafafa;
  --muted: #a1a1aa;
  --faint: #71717a;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --danger: #ef4444;
}

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

body {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: "Inter", "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: #7db0ff;
  text-decoration: none;
}

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

label {
  display: inline-block;
  margin-bottom: 7px;
  color: #d4d4d8;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 14px;
  color: var(--text);
  font-weight: 650;
  line-height: 1.15;
}

h2 {
  font-size: 1.65rem;
}

p {
  margin-top: 0;
}

.section {
  margin-bottom: 36px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #101014;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}

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

input[disabled] {
  opacity: 0.5;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

.small {
  color: var(--muted);
  font-size: 0.875em;
}

.error {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(239,68,68,0.28);
  border-radius: 8px;
  background: rgba(239,68,68,0.10);
  color: #fca5a5;
}

.button {
  width: auto;
  min-width: 150px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: #fff;
}

.button:active {
  transform: translateY(1px);
}

.button.button-outline {
  border-color: var(--line);
  background: #111116;
  color: var(--text);
}

.button.button-outline:hover {
  border-color: var(--line-strong);
  background: #16161b;
  color: #fff;
}

.container {
  width: min(560px, calc(100% - 32px));
  margin: 44px auto 15px;
}

.container.wrap:has(.auth-split) {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}

body:has(.auth-split) {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.026), transparent 320px),
    #050506;
}

body:has(.auth-split) footer.container {
  display: none;
}

.wrap {
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.container.wrap:has(.auth-split) .header {
  min-height: 76px;
  justify-content: flex-start;
  padding: 0 clamp(24px, 4vw, 72px);
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(8,8,10,0.72);
  backdrop-filter: blur(18px);
}

.header .logo img {
  width: auto;
  max-width: 150px;
  max-height: 34px;
}

.container.wrap:has(.auth-split) .header .logo img {
  max-width: 182px;
  max-height: 38px;
}

.auth-panel {
  max-width: 420px;
  margin: 0 auto;
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  min-height: calc(100vh - 76px);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.03), transparent 30%, transparent 70%, rgba(255,255,255,0.018)),
    #050506;
}

.auth-split .auth-intro {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(44px, 7vw, 104px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(130deg, rgba(59,130,246,0.20), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.045), transparent 44%),
    #08080a;
}

.auth-split .auth-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(135deg, rgba(0,0,0,0.48), transparent 70%);
  pointer-events: none;
}

.auth-split .auth-intro > * {
  position: relative;
}

.auth-intro h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6.2vw, 7.2rem);
  font-weight: 800;
  letter-spacing: 0;
}

.auth-intro p:not(.auth-eyebrow) {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.18vw, 1.25rem);
  line-height: 1.55;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
  margin-top: 48px;
}

.auth-stats span {
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent),
    rgba(255,255,255,0.025);
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 650;
}

.auth-stats strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.25rem;
}

.auth-split .auth-panel {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(36px, 6vw, 92px);
  margin: 0;
  border-left: 1px solid rgba(255,255,255,0.035);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.026), transparent 260px),
    #08080a;
}

.auth-panel > * {
  width: min(100%, 520px);
}

.auth-panel form,
.auth-panel form > div,
.auth-panel .button {
  width: min(100%, 520px);
}

.auth-panel input[type="text"],
.auth-panel input[type="email"],
.auth-panel input[type="password"] {
  min-height: 54px;
  padding: 14px 16px;
  font-size: 1rem;
}

.auth-panel .button {
  min-height: 54px;
  font-size: 1rem;
}

.home-panel .button {
  width: 100%;
}

.auth-eyebrow {
  margin-bottom: 9px;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-copy {
  margin-bottom: 24px;
  color: var(--muted);
}

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

.row {
  margin-bottom: 20px;
}

.lists {
  padding: 0;
  list-style-type: none;
}

.lists li {
  margin: 0 0 8px;
}

.lists .description {
  margin: 0 0 15px 25px;
  color: var(--faint);
  font-size: 0.875em;
  line-height: 1.35;
}

.form .nonce {
  display: none;
}

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

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

.archive .date {
  display: block;
  color: var(--faint);
  font-size: 0.875em;
}

.archive li {
  padding: 12px 0;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.feed {
  margin-right: 15px;
}

.home-options {
  margin-top: 30px;
}

.home-options a {
  margin: 0 7px;
}

.auth-secondary-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  color: var(--faint);
  font-size: 0.86rem;
}

.auth-secondary-links a {
  color: var(--muted);
}

.auth-secondary-links a:hover {
  color: var(--text);
}

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

.pg-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.pg-page:hover,
.pg-page.pg-selected {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  font-weight: 650;
}

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

.login button {
  width: 100%;
  vertical-align: middle;
}

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

.login input[name="totp_code"] {
  font-size: 1.8em;
  letter-spacing: 0;
  text-align: center;
}

footer.container {
  margin-top: 24px;
  margin-bottom: 30px;
  color: var(--faint);
  font-size: 0.775em;
  text-align: center;
}

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

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

@media screen and (max-width: 650px) {
  .container {
    width: min(100% - 20px, 560px);
    margin-top: 12px;
  }

  .wrap {
    padding: 24px;
  }
}

@media screen and (max-width: 860px) {
  .container.wrap:has(.auth-split) {
    width: 100%;
    min-height: 100vh;
    grid-template-rows: 68px auto;
  }

  .container.wrap:has(.auth-split) .header {
    min-height: 68px;
    padding: 0 22px;
  }

  .container.wrap:has(.auth-split) .header .logo img {
    max-width: 156px;
    max-height: 32px;
  }

  .auth-split {
    display: block;
    min-height: calc(100vh - 68px);
  }

  .auth-split .auth-intro {
    min-height: 48vh;
    padding: 42px 24px 30px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-intro h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .auth-stats {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 22px;
  }

  .auth-stats span {
    min-height: 0;
  }

  .auth-split .auth-panel {
    min-height: 52vh;
    padding: 34px 24px 44px;
    border-left: 0;
  }
}
