/* ===== TidyNook shared styles ===== */

:root {
  --paper: #F6F3EC;
  --paper-soft: #EFEADD;
  --ink: #26241F;
  --ink-soft: #55534B;
  --sage: #56674A;
  --sage-deep: #3E4B37;
  --rust: #A15A34;
  --tan: #EAE3D2;
  --line: #DAD3BF;
  --max-w: 1080px;
  --text-w: 700px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; color: var(--ink-soft); }

a { color: var(--sage-deep); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--rust); }

img { max-width: 100%; display: block; }

/* Layout helpers */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--text-w); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.logo {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo span { color: var(--sage); }
.logo:hover { color: var(--ink); }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
nav.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.96rem;
}
nav.main-nav a:hover { color: var(--rust); }

/* Hero */
.hero {
  padding: 64px 0 48px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero p.lede { font-size: 1.15rem; }

/* Drawer graphic - pure CSS */
.drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.drawer {
  aspect-ratio: 1.4;
  border-radius: 3px;
  border: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 8px 10px;
}
.drawer::before {
  content: "";
  position: absolute;
  top: 10px; left: 50%;
  width: 26px; height: 3px;
  background: rgba(0,0,0,0.18);
  border-radius: 2px;
  transform: translateX(-50%);
}
.drawer span {
  font-size: 0.68rem;
  color: var(--ink-soft);
}
.drawer.c1 { background: var(--tan); }
.drawer.c2 { background: #DDE3D2; }
.drawer.c3 { background: #E7D6C6; }
.drawer.c4 { background: #E7D6C6; }
.drawer.c5 { background: var(--tan); }
.drawer.c6 { background: #DDE3D2; }

/* Category tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0 44px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 44px;
}
.tab {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 6px 6px 2px 2px;
  padding: 10px 18px;
  font-size: 0.92rem;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.tab::before {
  content: "";
  position: absolute;
  top: -1px; left: 14px;
  width: 18px; height: 6px;
  background: var(--sage);
  border-radius: 0 0 3px 3px;
  opacity: 0.55;
}
.tab:hover { border-color: var(--sage); color: var(--sage-deep); }

/* Article cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-bottom: 56px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px;
  background: var(--paper-soft);
}
.card h3 { margin-bottom: 8px; }
.card .tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--sage-deep);
  background: var(--tan);
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.card.empty {
  border-style: dashed;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-size: 0.95rem;
  text-align: center;
}

section.section { padding: 8px 0 40px; }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 36px 0;
}
footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
footer.site-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 0;
}
footer.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
footer.site-footer a:hover { color: var(--rust); }
footer.site-footer .copy { font-size: 0.85rem; color: var(--ink-soft); }

/* Simple pages (about/contact/legal) */
.page-header {
  padding: 56px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.legal h2 { margin-top: 1.6em; }
.legal ul { color: var(--ink-soft); }

.contact-box {
  border: 1px solid var(--line);
  background: var(--paper-soft);
  border-radius: 4px;
  padding: 28px;
  margin-bottom: 20px;
}
.btn {
  display: inline-block;
  background: var(--sage);
  color: #fff;
  padding: 11px 22px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.95rem;
}
.btn:hover { background: var(--sage-deep); color: #fff; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  nav.main-nav ul { gap: 16px; flex-wrap: wrap; }
}
