:root {
  color-scheme: light;
  --ink: #16211f;
  --muted: #5c6b66;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --line: #dfe4dc;
  --sage: #6b8f71;
  --teal: #1f7a8c;
  --coral: #c75c4a;
  --gold: #c59838;
  --shadow: 0 20px 60px rgba(22, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  background-image: linear-gradient(rgba(251, 250, 246, 0.9), rgba(251, 250, 246, 0.95)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1800&q=80");
  background-position: center top;
  background-size: cover;
  content: "";
  inset: 0 0 auto;
  min-height: 520px;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 22px 24px;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 760;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  height: 34px;
  justify-content: center;
  letter-spacing: 0;
  width: 34px;
}

.top-nav {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  gap: 22px;
}

.top-nav a:hover {
  color: var(--ink);
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 24px 56px;
}

.today-section {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  min-height: calc(100vh - 88px);
  padding-bottom: 54px;
}

.eyebrow {
  color: var(--coral);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
  margin-bottom: 24px;
  max-width: 760px;
}

.intro {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
  margin-bottom: 30px;
  max-width: 640px;
}

.today-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 720;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
}

.primary-action {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
  cursor: pointer;
}

.primary-action:hover {
  background: #24302d;
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--ink);
}

.daily-card {
  background: var(--panel);
  border: 1px solid rgba(22, 33, 31, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.entry-image {
  aspect-ratio: 16 / 9;
  background-image: url("https://images.unsplash.com/photo-1453733190371-0a9bedd82893?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
}

.entry-body {
  padding: 30px;
}

.entry-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px;
  margin-bottom: 16px;
}

.entry-meta span {
  align-items: center;
  background: #f1f4ed;
  border-radius: 999px;
  display: inline-flex;
  min-height: 28px;
  padding: 0 10px;
}

.entry-body h2 {
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 14px;
}

.entry-body > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.insight-box {
  border-left: 4px solid var(--teal);
  margin-top: 26px;
  padding-left: 18px;
}

.insight-label {
  color: var(--teal);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.insight-box p {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 0;
}

.archive-section,
.signup-section,
.about-section {
  border-top: 1px solid var(--line);
  padding: 56px 0;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-heading h2,
.about-section h2 {
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1;
  margin-bottom: 0;
}

.search-field {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 170px) minmax(120px, 150px);
  max-width: 560px;
  width: 100%;
}

.search-field input,
.search-field select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  outline: none;
  padding: 0 14px;
  width: 100%;
}

.search-field input:focus,
.search-field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(31, 122, 140, 0.12);
}

.search-field select {
  cursor: pointer;
}

.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.topic-tab {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  min-height: 36px;
  padding: 0 14px;
}

.topic-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.archive-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.note-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  overflow: hidden;
}

.note-card[hidden] {
  display: none;
}

.note-card-image {
  aspect-ratio: 5 / 2;
  background-position: center;
  background-size: cover;
}

.note-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.note-card small {
  color: var(--coral);
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-card h3 {
  font-size: 20px;
  line-height: 1.2;
  margin: 10px 0;
}

.note-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.note-card a {
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: var(--teal);
  font-weight: 760;
  margin-top: auto;
  padding: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 18px;
}

.tag-list a {
  align-items: center;
  background: #eef6f3;
  border: 1px solid #d7e9e2;
  border-radius: 999px;
  color: #2f665b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 760;
  min-height: 26px;
  padding: 0 9px;
}

.tag-list a:hover {
  background: #e2f1eb;
  border-color: var(--teal);
  color: var(--teal);
}

.read-link {
  color: var(--teal);
  display: inline-flex;
  font-weight: 760;
  margin-top: 24px;
}

.back-link {
  color: var(--teal);
  display: inline-flex;
  font-weight: 760;
  margin-bottom: 18px;
}

.note-page {
  margin: 0 auto;
  max-width: 820px;
  padding: 34px 0 70px;
}

.note-hero-image {
  aspect-ratio: 16 / 8;
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  margin-bottom: 28px;
}

.note-page-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px;
  margin-bottom: 18px;
}

.note-page-meta span {
  align-items: center;
  background: #f1f4ed;
  border-radius: 999px;
  display: inline-flex;
  min-height: 28px;
  padding: 0 10px;
}

.note-page h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  margin-bottom: 18px;
}

.note-summary {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.markdown-body {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 18px;
}

.markdown-body h2 {
  font-size: 28px;
  margin: 30px 0 12px;
}

.markdown-body h3 {
  font-size: 22px;
  margin: 26px 0 10px;
}

.markdown-body p,
.markdown-body li,
.markdown-body blockquote {
  color: #33413d;
  font-size: 18px;
  line-height: 1.75;
}

.markdown-body a {
  color: var(--teal);
  font-weight: 720;
}

.markdown-body ul {
  padding-left: 24px;
}

.markdown-body blockquote {
  border-left: 4px solid var(--gold);
  margin-left: 0;
  padding-left: 18px;
}

.note-nav-actions {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 42px;
  padding-top: 22px;
}

.note-nav-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-weight: 760;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  text-align: center;
}

.note-nav-link:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.note-nav-link.is-disabled {
  color: #9aa5a1;
  cursor: not-allowed;
  opacity: 0.68;
}

.note-nav-link.is-disabled:hover {
  border-color: var(--line);
  color: #9aa5a1;
}

.empty-state {
  color: var(--muted);
  grid-column: 1 / -1;
}

.archive-pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.archive-pagination button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 760;
  min-height: 42px;
  padding: 0 16px;
}

.archive-pagination button:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

.archive-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.archive-pagination span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.signup-section {
  align-items: center;
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr minmax(280px, 430px);
}

.signup-section h2 {
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1;
  margin-bottom: 14px;
}

.signup-section p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 620px;
}

.signup-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  padding: 12px;
}

.signup-note {
  color: var(--muted);
  font-size: 13px;
  grid-column: 1 / -1;
  line-height: 1.45;
  margin: 0;
}

.signup-form input[type="email"] {
  border: 0;
  color: var(--ink);
  min-height: 44px;
  outline: none;
  padding: 0 10px;
  width: 100%;
}

.signup-form button {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 760;
  min-height: 44px;
  padding: 0 16px;
}

.signup-form button:hover {
  background: #24302d;
}

.signup-form input:disabled,
.signup-form button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.message-page {
  margin: 0 auto;
  max-width: 760px;
  padding: 56px 24px;
}

.message-page h1 {
  font-size: clamp(38px, 6vw, 64px);
  margin: 42px 0 18px;
}

.message-page p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
  margin-bottom: 26px;
}

.about-section {
  display: grid;
  gap: 40px;
  grid-template-columns: 0.75fr 1.25fr;
}

.principles {
  display: grid;
  gap: 16px;
}

.principles article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: 46px 140px 1fr;
  padding: 18px;
}

.principles span {
  color: var(--gold);
  font-weight: 800;
}

.principles h3,
.principles p {
  margin-bottom: 0;
}

.principles p {
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px;
}

.site-footer p {
  margin: 0;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 900px) {
  .today-section,
  .signup-section,
  .about-section {
    grid-template-columns: 1fr;
  }

  .today-section {
    gap: 30px;
    min-height: auto;
    padding-top: 36px;
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    gap: 18px;
    padding-inline: 18px;
  }

  .top-nav {
    gap: 12px;
  }

  main {
    padding: 12px 18px 42px;
  }

  h1 {
    font-size: 43px;
  }

  .intro {
    font-size: 17px;
  }

  .entry-body {
    padding: 22px;
  }

  .archive-grid,
  .principles article,
  .note-nav-actions {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .signup-form {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
