:root {
  --bg: #FAF8F5;
  --surface: #F2EFE9;
  --text: #1C1B19;
  --muted: #6E6A63;
  --faint: #9E9990;
  --border: #E5E0D8;
  --accent: #B84A39;
  --max-w: 650px;
}

[data-theme="dark"] {
  --bg: #141312;
  --surface: #1D1C1A;
  --text: #EAE6DF;
  --muted: #9C968D;
  --faint: #6B665F;
  --border: #2A2825;
  --accent: #D46554;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  line-height: 1.72;
  transition: background-color 0.25s ease, color 0.25s ease;
  padding: 0 1.4rem;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 0 5rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(184, 74, 57, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.theme-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-family: inherit;
  font-size: 0.72rem;
  transition: all 0.15s ease;
}

.theme-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* Hero / Intro */
.intro {
  margin-bottom: 3.5rem;
}

.intro h1 {
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}

.intro p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Episode List */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.note-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.note-card:last-child {
  border-bottom: none;
}

.note-meta {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 0.45rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.note-meta .note-num {
  color: var(--accent);
  font-weight: 600;
}

.note-card h2 {
  font-size: 1.42rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  transition: color 0.15s ease;
}

.note-card:hover h2 {
  color: var(--accent);
}

.note-excerpt {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.62;
}

/* Single Article */
.article-header {
  margin-bottom: 2.6rem;
}

.article-header h1 {
  font-size: 2.05rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.24;
  margin-top: 0.5rem;
}

.article-body p {
  margin-bottom: 1.45rem;
  font-size: 1.06rem;
}

.article-body:not(.legal-body) p:first-of-type::first-letter {
  font-size: 2.9rem;
  float: left;
  line-height: 0.88;
  padding-right: 0.42rem;
  padding-top: 0.14rem;
  color: var(--accent);
  font-weight: 500;
}

.legal-body h2 {
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 2.1rem 0 0.7rem;
  color: var(--text);
}

.legal-body ul {
  margin: 0 0 1.45rem 1.35rem;
  font-size: 1.02rem;
}

.legal-body li {
  margin-bottom: 0.55rem;
}

.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Reactions & Comments */
.feedback-section {
  margin-top: 3.5rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--border);
}

.reaction-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.reaction-prompt {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.reaction-buttons {
  display: flex;
  gap: 0.65rem;
}

.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.react-btn:hover {
  border-color: var(--muted);
}

.react-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(184, 74, 57, 0.08);
}

.comments-heading {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.8rem;
}

.comment-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.95rem 1.15rem;
}

.comment-meta {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  color: var(--faint);
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
}

.comment-author {
  color: var(--text);
  font-weight: 600;
}

.comment-body {
  font-size: 0.96rem;
  line-height: 1.58;
  white-space: pre-wrap;
}

.comment-empty {
  color: var(--faint);
  font-size: 0.92rem;
  font-style: italic;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-submit {
  align-self: flex-start;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 0.48rem 1.15rem;
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.comment-submit:hover {
  opacity: 0.85;
}

.hp-field {
  display: none !important;
}

/* Prev / Next Navigation */
.post-nav {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.post-nav a {
  text-decoration: none;
  color: var(--text);
  max-width: 48%;
}

.post-nav .dir {
  display: block;
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 0.25rem;
}

.post-nav .nav-title {
  font-size: 0.98rem;
  line-height: 1.35;
  transition: color 0.15s ease;
}

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

.post-nav .next {
  margin-left: auto;
  text-align: right;
}

/* Archive Index List */
.archive-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.archive-item a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s ease;
}

.archive-item:first-child a {
  border-top: 1px solid var(--border);
}

.archive-left {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.archive-num {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.archive-title {
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.35;
}

.archive-item a:hover .archive-title {
  color: var(--accent);
}

.archive-mins {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--faint);
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  margin-top: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

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

@media (max-width: 600px) {
  html { font-size: 17px; }
  .container { padding: 2.2rem 0 3.5rem; }
  .intro h1 { font-size: 1.85rem; }
  .article-header h1 { font-size: 1.7rem; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
  .post-nav .next { text-align: left; margin-left: 0; }
}
