/* Prepared Living — outdoor theme, mobile first */
:root {
  --forest: #163325;
  --forest-2: #1e4a34;
  --moss: #4f7a4a;
  --moss-2: #6b8f5e;
  --bark: #5c4030;
  --bark-2: #3d2a1c;
  --sand: #e8dcc8;
  --khaki: #c4b59a;
  --paper: #faf6ee;
  --sky: #6a8a96;
  --slate: #3d5a66;
  --ink: #1a2e22;
  --ink-soft: #3a4d40;
  --warning: #7a3216;
  --warning-bg: #f3e0d0;
  --ok: #2d5a3d;
  --line: rgba(60, 45, 30, 0.16);
  --shadow: 0 8px 24px rgba(22, 51, 37, 0.12);
  --radius: 14px;
  --tap: 44px;
  --max: 72rem;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --display: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  color-scheme: light;
  --bg: var(--sand);
  --bg-2: #f4efe6;
  --card: var(--paper);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --accent: var(--forest);
  --accent-2: var(--moss);
  --nav: var(--forest);
  --nav-text: #f4efe6;
  --chip: #e4ddcc;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121c16;
  --bg-2: #18241c;
  --card: #1c2b22;
  --text: #eadfcd;
  --muted: #b9c4b6;
  --accent: #8fbf8a;
  --accent-2: #6b8f5e;
  --nav: #0e1a13;
  --nav-text: #eadfcd;
  --line: rgba(232, 220, 200, 0.14);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --paper: #1c2b22;
  --warning: #f0b090;
  --warning-bg: #3a2418;
  --chip: #243328;
  --khaki: #6b5d4a;
  --sand: #1a2620;
}

* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath fill='none' stroke='%23163325' stroke-opacity='0.07' stroke-width='1' d='M0 80c20-30 40-30 60 0s40 30 60 0 40-30 60 0M0 40c20-20 40-20 60 0s40 20 60 0 40-20 60 0M0 120c20-20 40-20 60 0s40 20 60 0 40-20 60 0'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--bg-2), var(--bg) 18rem);
  background-attachment: fixed;
}
[data-theme="dark"] body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath fill='none' stroke='%238fbf8a' stroke-opacity='0.08' stroke-width='1' d='M0 80c20-30 40-30 60 0s40 30 60 0 40-30 60 0M0 40c20-20 40-20 60 0s40 20 60 0 40-20 60 0M0 120c20-20 40-20 60 0s40 20 60 0 40-20 60 0'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #15201a, var(--bg) 18rem);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--moss-2); }
:focus-visible {
  outline: 3px solid var(--moss-2);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--card);
  color: var(--text);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.site-header {
  background: var(--nav);
  color: var(--nav-text);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  min-height: 3.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}
.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  flex-shrink: 0;
  background: #163325;
}
.brand-text { min-width: 0; }
.brand-name {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-tag {
  font-size: 0.72rem;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.icon-btn {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); }
.menu-btn { font-size: 1.4rem; }

.nav-desk { display: none; }
.nav-desk a, .nav-drawer a, .nav-bottom a {
  color: inherit;
  text-decoration: none;
}
.nav-desk {
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-desk a {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}
.nav-desk a[aria-current="page"], .nav-drawer a[aria-current="page"], .nav-bottom a[aria-current="page"] {
  background: rgba(111, 143, 94, 0.35);
  font-weight: 600;
}

.nav-drawer {
  display: none;
  flex-direction: column;
  padding: 0.5rem 0.9rem 1rem;
  background: var(--nav);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-drawer.is-open { display: flex; }
.nav-drawer a {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  padding: 0 0.4rem;
  border-radius: 8px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 0.9rem 6.5rem;
}
h1, h2, h3, .display {
  font-family: var(--display);
  line-height: 1.2;
  color: var(--accent);
  font-weight: 700;
}
h1 { font-size: 1.7rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.3rem; margin: 1.4rem 0 0.55rem; }
h3 { font-size: 1.08rem; margin: 1rem 0 0.35rem; }
.lede { color: var(--muted); margin: 0 0 1rem; font-size: 1.02rem; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--moss);
  margin: 0 0 0.25rem;
}

.card, .task, .video-card, .tile, .pinned, .notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 1rem 1.05rem; margin: 0 0 1rem; }
.grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
.tile {
  display: block;
  padding: 1rem 1.05rem;
  color: inherit;
  text-decoration: none;
  min-height: var(--tap);
  transition: transform 0.12s ease;
}
.tile:hover { transform: translateY(-1px); border-color: var(--moss); }
.tile h3 { margin: 0 0 0.25rem; color: var(--accent); }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--tap);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--forest);
  background: var(--forest);
  color: #f4efe6;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.98rem;
  cursor: pointer;
  font-family: inherit;
}
[data-theme="dark"] .btn {
  background: #2d5a3d;
  border-color: #4f7a4a;
  color: #f4efe6;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }

.warning, .safety {
  background: var(--warning-bg);
  color: var(--text);
  border-left: 5px solid var(--warning);
  padding: 0.85rem 1rem;
  border-radius: 0 12px 12px 0;
  margin: 0.75rem 0 1rem;
}
.warning strong, .safety strong { color: var(--warning); display: block; margin-bottom: 0.2rem; }

.table-wrap { overflow-x: auto; margin: 0.6rem 0 1.1rem; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 32rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { background: var(--chip); font-size: 0.8rem; letter-spacing: 0.03em; }
caption { text-align: left; font-size: 0.88rem; color: var(--muted); padding: 0 0 0.4rem; caption-side: bottom; }
.table-title { margin: 1rem 0 0.2rem; }

.task {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem;
  margin: 0 0 0.65rem;
  align-items: start;
}
.task input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0.2rem 0 0;
  accent-color: var(--forest);
  cursor: pointer;
}
.task.done .task-title { text-decoration: line-through; opacity: 0.75; }
.task-title { font-weight: 650; margin: 0 0 0.15rem; }
.task-body { margin: 0; color: var(--muted); font-size: 0.95rem; }
.chip {
  display: inline-block;
  background: var(--chip);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.35rem;
}
.month-nav, .filter-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.7rem;
  -webkit-overflow-scrolling: touch;
}
.month-nav a, .filter-row button, .filter-row a {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}
.month-nav a[aria-current="page"], .filter-row button.is-on, .filter-row a.is-on {
  background: var(--forest);
  color: #f4efe6;
  border-color: var(--forest);
}

.watch {
  margin: 0.9rem 0 1.1rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.7rem;
}
.watch-media {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  align-items: center;
}
.watch img {
  width: 7.5rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bark-2);
}
.watch h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.embed-wrap {
  position: relative;
  padding-top: 56.25%;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
}
.embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.video-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #1a2e22; }
.video-card .meta { padding: 0.8rem 0.9rem 1rem; }
.video-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

.pinned {
  padding: 1rem 1.05rem 1.1rem;
  border-left: 6px solid var(--moss);
  margin-bottom: 1rem;
}
.pinned .kicker { color: var(--moss); }

.nav-bottom {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--nav);
  color: var(--nav-text);
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-bottom a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 3.6rem;
  font-size: 0.68rem;
  gap: 0.15rem;
  letter-spacing: 0.02em;
}
.nav-bottom .ico { font-size: 1.15rem; line-height: 1; }

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(14, 22, 16, 0.62);
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal {
  background: var(--card);
  color: var(--text);
  max-width: 28rem;
  width: 100%;
  border-radius: 18px;
  padding: 1.2rem 1.15rem 1.15rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  max-height: min(90vh, 40rem);
  overflow: auto;
}
.modal h2 { margin-top: 0; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

label.field { display: block; margin: 0 0 0.8rem; font-weight: 650; font-size: 0.92rem; }
input[type="text"], input[type="url"], input[type="date"], input[type="search"], select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  min-height: var(--tap);
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}
textarea { min-height: 6rem; resize: vertical; }
.snippet {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem;
  overflow: auto;
  white-space: pre;
}

.crumbs { font-size: 0.9rem; margin: 0 0 0.7rem; color: var(--muted); }
.crumbs a { color: inherit; }
.progress { font-size: 0.95rem; color: var(--muted); margin: 0 0 0.8rem; }
footer.site-foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 0.9rem 5.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
footer.site-foot a { color: inherit; }
.source-list { padding-left: 1.1rem; }
.source-list li { margin: 0.25rem 0; }

@media (min-width: 720px) {
  .grid.cols-2, .videos-grid { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .menu-btn { display: none; }
  .nav-desk { display: flex; }
  .nav-drawer { display: none !important; }
  h1 { font-size: 2rem; }
  .wrap { padding-bottom: 3rem; }
  .nav-bottom { display: none; }
  footer.site-foot { padding-bottom: 2rem; }
  .video-card { grid-template-columns: 12rem 1fr; }
  .video-card img { height: 100%; aspect-ratio: auto; min-height: 7rem; }
}
@media (min-width: 1024px) {
  .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .videos-grid { grid-template-columns: 1fr 1fr 1fr; }
  .video-card { grid-template-columns: 1fr; }
  .video-card img { aspect-ratio: 16/9; height: auto; }
}

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

.home-search {
  margin: 0.15rem 0 1rem;
}
.home-search-field { position: relative; }
.home-search .search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--moss);
  font-size: 1.15rem;
  pointer-events: none;
  line-height: 1;
}
.home-search input[type="search"] {
  width: 100%;
  min-height: var(--tap);
  padding: 0.7rem 1rem 0.7rem 2.55rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow);
}
.home-search input[type="search"]:focus {
  border-color: var(--moss);
}
.search-results {
  margin: 0.5rem 0 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: min(22rem, 60vh);
  overflow-y: auto;
}
.search-results ul { list-style: none; margin: 0; padding: 0; }
.search-results li { border-bottom: 1px solid var(--line); }
.search-results li:last-child { border-bottom: 0; }
.search-results a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.65rem 1rem;
  min-height: var(--tap);
  color: inherit;
  text-decoration: none;
}
.search-results a:hover, .search-results a:focus { background: var(--bg-2); }
.search-group {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--moss);
}
.search-label { font-weight: 650; color: var(--accent); }
.search-empty { margin: 0; padding: 0.9rem 1rem; }

.todo-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem 0.7rem;
  margin: 0 0 1rem;
}
.todo-box h2 { margin: 0 0 0.2rem; }
.todo-box .progress { margin: 0 0 0.75rem; }
.todo-box .task {
  box-shadow: none;
  margin-bottom: 0.5rem;
}
.todo-box .task:last-of-type { margin-bottom: 0.35rem; }
.todo-more-wrap { margin: 0.55rem 0 0.25rem; }
.todo-more { font-weight: 650; }
