:root {
  --bg: #faf8f5;
  --text: #1b4332;
  --muted: #52796f;
  --faint: #95a5a0;
  --accent: #1b4332;
  --gold: #c8922a;
  --rule: rgba(27, 67, 50, 0.08);
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Page shell ── */

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 6rem 1.5rem 2rem;
  max-width: 48rem;
  margin: 0 auto;
}

/* ── Site header (fixed nav) ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 1.5rem;
}

.site-header-inner {
  max-width: 48rem;
  margin: 0 auto;
}

.site-name {
  display: flex;
  align-items: center;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.site-name a,
.site-name-link {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.site-name-green {
  color: var(--accent);
}

.site-name-gold {
  color: var(--gold);
}

.site-name-tld {
  color: var(--accent);
}

.site-logo {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.35rem;
  width: 2rem;
  height: 2rem;
}

.site-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-link {
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--faint);
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.header-link:hover,
.header-link:focus-visible {
  color: var(--accent);
}

.site-intro {
  margin: 0.5rem 0 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 42ch;
  line-height: 1.5;
}

.site-tagline {
  margin: 0.25rem 0 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Today's tip ── */

.tip-card {
  max-width: 48rem;
  margin-top: auto;
  margin-bottom: auto;
}

.tip-instruction {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  border-left: 3px solid var(--gold);
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--text);
}

.tip-example {
  max-width: 56ch;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.65;
  color: var(--muted);
}

.tool-link {
  color: var(--gold);
  font-style: italic;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.tool-link:hover,
.tool-link:focus-visible {
  opacity: 0.8;
}

/* ── Inline clean.tools CTA ── */

.tip-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.tip-footer a {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.tip-footer a:hover,
.tip-footer a:focus-visible {
  color: var(--accent);
}

/* ── Page footer ── */

.page-footer {
  margin-top: auto;
  padding-top: 3rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--faint);
  text-align: center;
}

.page-footer a {
  color: var(--faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.page-footer a:hover,
.page-footer a:focus-visible {
  color: var(--accent);
}

.page-footer .separator {
  user-select: none;
}

/* ── Archive (past tips) ── */

.page--archive {
  justify-content: flex-start;
  padding-top: 10rem;
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.archive-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

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

.archive-instruction {
  padding-left: 1.25rem;
  border-left: 3px solid var(--gold);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.archive-example {
  max-width: 56ch;
  font-size: clamp(0.88rem, 1.5vw, 0.95rem);
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 767px) {
  .page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tip-instruction,
  .archive-instruction {
    padding-left: 1rem;
  }
}

@media (min-width: 1024px) {
  .site-logo {
    width: 2.5rem;
    height: 2.5rem;
  }

  .site-name {
    font-size: clamp(2.1rem, 4.4vw, 2.64rem);
  }

  .site-tagline {
    font-size: 1.14rem;
  }

  .tip-instruction {
    font-size: clamp(2.88rem, 6.96vw, 4.8rem);
  }

  .tip-example {
    max-width: 60ch;
    font-size: clamp(1.38rem, 2.64vw, 1.62rem);
  }

  .archive-instruction {
    font-size: clamp(2.04rem, 4.08vw, 2.64rem);
  }

  .archive-example {
    max-width: 60ch;
    font-size: clamp(1.2rem, 2.28vw, 1.38rem);
  }
}
