:root {
  /* Core Layout Surfaces */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --border-primary: #30363d;
  --border-secondary: #21262d;

  /* Text Elements (Contrast Framework) */
  --text-heading: #f0f6fc;
  --text-body: #c9d1d9;
  --text-muted: #8b949e;

  /* Semantic Accents & Status Indicators */
  --accent-blue: #58a6ff;
  --accent-blue-trans: rgba(88, 166, 255, 0.1);
  --accent-green: #238636;
  --accent-green-hover: #2ea043;
  --accent-orange: #ff9e64;
  --accent-purple: #bb9af7;
  --accent-danger: #f85149;
}

* {
  box-sizing: border-box;
}

html, body {
  padding: 0;
  margin: 0;
  min-width: 320px;
  background-color: var(--bg-primary);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

label {
  cursor: pointer;
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.95em;
  margin-bottom: 6px;
  display: inline-block;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-heading);
  margin-top: 0;
  margin-bottom: 15px;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.section {
  margin-bottom: 45px;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
select {
  padding: 10px 15px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  width: 100%;
  color: var(--text-body);
  font-size: 1em;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, 
select:focus {
  outline: none;
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15) !important;
}

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

input::placeholder {
  color: var(--text-muted);
}

input[disabled] {
  opacity: 0.5;
  background-color: var(--bg-secondary);
  cursor: not-allowed;
}

input[type="checkbox"], 
input[type="radio"] {
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

.small {
  font-size: 0.875em;
}

.error {
  color: var(--accent-danger);
}

.button {
  background: var(--accent-green);
  padding: 12px 24px;
  border-radius: 6px;
  border: 1px solid var(--accent-green);
  cursor: pointer;
  text-decoration: none;
  color: #ffffff;
  display: inline-block;
  min-width: 150px;
  font-size: 1em;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  background: var(--accent-green-hover);
  border-color: var(--accent-green-hover);
  color: #ffffff;
}

.button.button-outline {
  background: transparent;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
}

.button.button-outline:hover {
  border-color: var(--accent-blue);
  background-color: var(--accent-blue-trans);
  color: var(--text-heading);
}

.container {
  margin: 60px auto 15px auto;
  max-width: 550px;  
}

.wrap {
  background-color: var(--bg-secondary);
  padding: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header {
  border-bottom: 1px solid var(--border-secondary);
  padding-bottom: 15px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

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

/* Custom header brand text to match website */
.header .brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header .brand-header img {
  height: 36px;
  width: auto;
}

.header .brand-header span {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.5px;
}

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

.row {
  margin-bottom: 20px;
}

.lists {
  list-style-type: none;
  padding: 0;
  margin-top: 20px;
}

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

.lists li label {
  font-weight: 600;
  color: var(--text-heading);
  margin-left: 8px;
  margin-bottom: 0;
  display: inline;
}

.lists .description {
  margin: 4px 0 12px 24px;
  font-size: 0.875em;
  line-height: 1.4;
  color: var(--text-muted);
}

.form .nonce {
  display: none;
}

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

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

.archive li {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-secondary);
}

.archive li:last-child {
  border-bottom: none;
}

.archive .date {
  display: block;
  color: var(--text-muted);
  font-size: 0.875em;
  margin-bottom: 5px;
}

.feed {
  margin-right: 15px;
}

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

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

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

.pg-page {
  display: inline-block;
  padding: 5px 12px;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid var(--border-secondary);
  color: var(--text-body);
  margin: 0 3px;
  transition: all 0.2s ease;
}

.pg-page:hover {
  border-color: var(--border-primary);
  background-color: var(--bg-primary);
  color: var(--text-heading);
}

.pg-page.pg-selected {
  font-weight: bold;
  background-color: var(--accent-blue-trans);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

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

.login button {
  width: 100%;
  vertical-align: middle;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.login input[name=totp_code] {
  font-size: 2em;
  letter-spacing: 5px;
  text-align: center;
  font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
}

footer.container {
  margin-top: 30px;
  margin-bottom: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8em;
  line-height: 1.6;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

/* Custom metadata tag radius */
.badge, .tag {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.8em;
  font-weight: 600;
}

@media screen and (max-width: 650px) {
  .container {
    margin-top: 20px;
  }
  .wrap {
    margin: 0;
    padding: 25px 20px;
    max-width: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}
