/*
Theme Name: MicroSlate
Theme URI: https://blog.phoenix.boston
Author: Phoenix Wang
Description: Readable long-form notes — theology, faith, and community.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Version: 1.1.0
Text Domain: microslate
*/

:root {
  /* Original warm palette, tuned for comfortable long-form reading */
  --ms-paper: #f7f3eb;
  --ms-ink: #292524;
  --ms-mist: #e8e0d4;
  --ms-accent: #0f5c4c;
  --ms-accent-hover: #0a4a3d;
  --ms-muted: #78716c;
  --ms-quote-bg: #f0ebe3;
  --ms-quote-border: #0f5c4c;
  --ms-term-bg: rgba(15, 92, 76, 0.12);
  --ms-shell-width: 45rem;
  --ms-body-size: 1.125rem;
  --ms-body-leading: 1.75;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ms-paper: #1c1917;
    --ms-ink: #f5f0e8;
    --ms-mist: #44403c;
    --ms-accent: #6ee7b7;
    --ms-accent-hover: #a7f3d0;
    --ms-muted: #a8a29e;
    --ms-quote-bg: #292524;
    --ms-quote-border: #6ee7b7;
    --ms-term-bg: rgba(110, 231, 183, 0.12);
  }

  body {
    background:
      radial-gradient(1200px 600px at 10% -10%, rgba(15, 92, 76, 0.12), transparent 55%),
      radial-gradient(900px 500px at 100% 0%, rgba(120, 113, 108, 0.08), transparent 50%),
      var(--ms-paper);
  }
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 92, 76, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(120, 113, 108, 0.12), transparent 50%),
    var(--ms-paper);
  color: var(--ms-ink);
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: var(--ms-body-size);
  line-height: var(--ms-body-leading);
}

.ms-shell {
  width: min(var(--ms-shell-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.ms-site-header {
  padding: 0.5rem 0 0;
}

.ms-brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

.ms-brand a {
  color: inherit;
  text-decoration: none;
}

.ms-brand a:hover {
  color: var(--ms-accent);
}

.ms-tagline {
  margin: 0.5rem 0 0;
  color: var(--ms-muted);
  font-size: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ms-nav {
  margin-top: 1.5rem;
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--ms-mist);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.ms-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.ms-nav a {
  color: var(--ms-muted);
  text-decoration: none;
}

.ms-nav a:hover {
  color: var(--ms-accent);
}

.ms-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.ms-list li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--ms-mist);
}

.ms-list a {
  color: inherit;
  text-decoration: none;
}

.ms-list a:hover h2 {
  color: var(--ms-accent);
}

.ms-list h2 {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.ms-meta {
  color: var(--ms-muted);
  font-size: 0.9rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ms-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
}

.ms-meta-row .ms-meta-sep {
  color: var(--ms-mist);
}

.ms-byline {
  margin: 0.35rem 0 0;
  color: var(--ms-muted);
  font-size: 0.95rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ms-excerpt {
  margin: 0.55rem 0 0;
  color: var(--ms-muted);
}

.ms-article header {
  margin: 2.25rem 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ms-mist);
}

.ms-article h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ms-content {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  line-height: 1.75;
  max-width: 42rem;
}

.ms-content p {
  margin: 0 0 1.5em;
}

.ms-content p:last-child {
  margin-bottom: 0;
}

.ms-content h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.25rem 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ms-content h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
}

.ms-content a {
  color: var(--ms-accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.ms-content a:hover {
  color: var(--ms-accent-hover);
}

.ms-content blockquote,
.ms-content .ms-pullquote {
  border-left: 4px solid var(--ms-quote-border);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  font-style: italic;
  background: var(--ms-quote-bg);
  border-radius: 0 0.35rem 0.35rem 0;
  color: var(--ms-ink);
}

.ms-content blockquote p,
.ms-content .ms-pullquote p {
  margin-bottom: 0.75em;
  font-size: 1.05em;
  line-height: 1.65;
}

.ms-content blockquote p:last-child,
.ms-content .ms-pullquote p:last-child {
  margin-bottom: 0;
}

.ms-term {
  font-style: italic;
  color: var(--ms-accent);
}

.ms-content em {
  font-style: italic;
}

.ms-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--ms-mist);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.ms-post-nav a {
  color: var(--ms-accent);
  text-decoration: none;
  display: block;
  padding: 0.75rem 0;
}

.ms-post-nav a:hover {
  text-decoration: underline;
}

.ms-post-nav .ms-nav-next {
  text-align: right;
}

.ms-post-nav .ms-nav-label {
  display: block;
  color: var(--ms-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.ms-footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--ms-mist);
  color: var(--ms-muted);
  font-size: 0.9rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.ms-footer p {
  margin: 0 0 0.75rem;
}

.ms-footer a {
  color: var(--ms-accent);
  text-decoration: none;
}

.ms-footer a:hover {
  text-decoration: underline;
}

.ms-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ms-footer-copy {
  font-size: 0.85rem;
  color: var(--ms-muted);
}

.ms-subscribe {
  margin-top: 2rem;
  max-width: 28rem;
}

.ms-subscribe h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
}

.ms-subscribe-lede {
  color: var(--ms-muted);
  margin: 0 0 1.5rem;
}

.ms-subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ms-subscribe-form input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--ms-mist);
  border-radius: 0.35rem;
  background: var(--ms-paper);
  color: var(--ms-ink);
  font-size: 1rem;
}

.ms-subscribe-form input[type="email"]:focus {
  outline: 2px solid var(--ms-accent);
  outline-offset: 1px;
}

.ms-subscribe-form button {
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 0.35rem;
  background: var(--ms-accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.ms-subscribe-form button:hover:not(:disabled) {
  background: var(--ms-accent-hover);
}

.ms-subscribe-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.ms-subscribe-msg {
  margin-top: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

.ms-subscribe-msg.is-success {
  color: var(--ms-accent);
}

.ms-subscribe-msg.is-error {
  color: #b91c1c;
}

@media (prefers-color-scheme: dark) {
  .ms-subscribe-msg.is-error {
    color: #fca5a5;
  }
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
