:root {
  color-scheme: light;
  --bg: #f4f4f2;
  --ink: #1b1a16;
  --muted: #5b5449;
  --accent: #cc5f2a;
  --card: #fffaf2;
  --stroke: rgba(27, 26, 22, 0.12);
  --shadow: 0 24px 60px rgba(27, 26, 22, 0.15);
  --radius: 28px;
}

body.theme-dark {
  color-scheme: dark;
  --bg: #0f1115;
  --ink: #f1f1ee;
  --muted: #b0b0a6;
  --accent: #f0a86e;
  --card: #161a1f;
  --stroke: rgba(241, 241, 238, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

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

body {
  min-height: 100vh;
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.page {
  position: relative;
  width: min(1120px, 100%);
  display: grid;
  place-items: center;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(32px, 6vw, 64px);
  border: 1px solid var(--stroke);
  max-width: 860px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.card-content {
  display: grid;
  gap: 20px;
}

.kicker {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}

h1 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(2.4rem, 4.2vw, 4rem);
  line-height: 1.05;
  margin-bottom: 0;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 0;
}

.lede-small {
  font-size: 0.7rem;
}

.quote-author {
  display: block;
  margin-top: 8px;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffaf2;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease;
  box-shadow: none;
  width: 100%;
}

.btn:hover {
  transform: none;
  box-shadow: none;
}

.btn span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn:hover span {
  transform: scale(1.06);
}

.meta {
  font-size: 0.95rem;
  color: var(--muted);
}

.posts {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 24px;
}

.posts details {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--card);
  padding: 12px 16px;
  overflow: hidden;
}

.posts summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  gap: 12px;
  align-items: center;
  font-weight: 600;
}

.posts summary::-webkit-details-marker {
  display: none;
}

.week-date {
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
}

.week-title {
  font-size: 1.05rem;
  color: var(--ink);
  text-align: center;
}

.post-body {
  margin-top: 0;
  padding-top: 0;
  color: var(--muted);
  line-height: 1.7;
}

.post-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.post-author img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.post-inline-image {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 16px;
  margin: 0 0 12px;
}

.post-author a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

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

.post-text {
  margin: 0;
}

.qa-list {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.qa-list p {
  margin: 0;
}

.qa-list strong {
  color: var(--ink);
}

.qa-answer {
  margin-left: 0;
  color: var(--muted);
  opacity: 0.8;
}

.posts details .post-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, padding-top 0.25s ease;
}

.posts details.is-open .post-body {
  padding-top: 10px;
  max-height: none;
  opacity: 1;
  overflow: visible;
}

.copy-btn {
  margin-left: auto;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

.copy-btn img {
  width: 18px;
  height: 18px;
  display: block;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

.copy-btn.copied {
  color: #15803d;
  border-color: #15803d;
}

.copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.links {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.socials {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  color: #8a8175;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link img {
  width: 18px;
  height: 18px;
  display: block;
}

.social-link:hover {
  color: var(--muted);
  transform: scale(1.06);
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.links a:hover {
  text-decoration: underline;
}

.footer {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 24px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.orb-a {
  width: 180px;
  height: 180px;
  background: #ffd29b;
  top: -60px;
  left: -40px;
}

.orb-b {
  width: 220px;
  height: 220px;
  background: #f6b3a0;
  right: -60px;
  bottom: -50px;
}

.orb-c {
  width: 120px;
  height: 120px;
  background: #f8c75b;
  right: 120px;
  top: 60px;
  opacity: 0.4;
}

@media (max-width: 600px) {
  .card {
    padding: 32px 24px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .posts details .post-body {
    transition: none;
  }
}
