/* The Garden. Layout idea: one quiet reading column. Each tradition recolours a single accent.
   Epicureanism = ochre, Paganism = ember, Shinrin-Yoku = moss. */
/* Fonts are served from this site (SIL Open Font License), so visitors' browsers do not contact Google.
   Cormorant Garamond by Christian Thalmann; Literata by TypeTogether. Latin-extended files load only when a page needs them. */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cormorant-garamond-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/cormorant-garamond-latin-ext-500-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/literata-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/literata-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/literata-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/literata-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f4f1e8;
  --surface: #fbf9f3;
  --ink: #23271f;
  --muted: #5c6154;
  --line: #d9d4c4;
  --home: #4d6b3a;
  --epi: #8a6417;
  --pag: #7a3b2e;
  --shi: #2f6b55;
  --accent: var(--home);
  --accent-ink: #ffffff;
  --danger: #a3261e;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Literata", Georgia, "Times New Roman", serif;
  --col: 44rem;
  --prose: 1.3rem;      /* running text in articles */
  --card-text: 1.15rem; /* text inside cards */
  --wide: 70rem;
  color-scheme: light;
}
:root[data-tradition="epicureanism"] { --accent: var(--epi); }
:root[data-tradition="paganism"]     { --accent: var(--pag); }
:root[data-tradition="shinrin-yoku"] { --accent: var(--shi); }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161914; --surface: #1d211a; --ink: #e9e7dc; --muted: #a6ab9b; --line: #333929;
    --home: #9cc27f; --epi: #d9ad54; --pag: #dd8f7b; --shi: #7fc3a8;
    --accent-ink: #14170f; --danger: #f08a82;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); line-height: 1.7;
  font-feature-settings: "kern", "liga";
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

/* Header: a thin accent bar marks which tradition you are in. */
.site-header {
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: baseline; justify-content: space-between;
  padding: 1.1rem max(1rem, 5vw) 1rem; border-bottom: 1px solid var(--line); border-top: 4px solid var(--accent);
  position: sticky; top: 0; z-index: 20; background: var(--bg);
}
.brand { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; }
nav a { color: var(--muted); text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

main { padding: 0 max(1rem, 5vw) 5rem; }
.hero, .prose, .practice-wrap { max-width: var(--col); margin-inline: auto; }
.practice-wrap { max-width: var(--wide); }
:root[data-tradition="home"] .hero { max-width: var(--wide); }
.hero { padding: 4.5rem 0 1.5rem; }
.prose > :first-child { margin-top: 0; }
/* Reading size. Change --prose in :root to resize all running text. */
.prose, .paths-intro { font-size: var(--prose); line-height: 1.7; }
.prose .meta, .prose .muted { font-size: .9rem; }

.eyebrow { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.eyebrow a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(2.8rem, 8vw, 5rem); letter-spacing: -.01em; margin: 0 0 1.25rem; }
h2 { font-size: 2rem; margin: 3.25rem 0 .75rem; }
h2::before { content: ""; display: block; width: 2.25rem; height: 2px; background: var(--accent); margin-bottom: .7rem; }
h3 { font-size: 1.4rem; margin: 1.75rem 0 .35rem; }
.lede { font-size: 1.3rem; line-height: 1.6; color: var(--muted); max-width: 52ch; }
.muted, .meta { color: var(--muted); font-size: .88rem; }
.meta { margin: 0 0 .5rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
p, li, dd { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
li::marker { color: var(--accent); }
section[id], h2[id] { scroll-margin-top: 1rem; }

/* Home */
.trio { max-width: var(--wide); margin: 1.5rem auto 2.5rem; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { display: flex; flex-direction: column; gap: .6rem; padding: 1.6rem 1.6rem 1.4rem; background: var(--surface);
  border: 1px solid var(--line); border-top: 4px solid var(--c); color: var(--ink); text-decoration: none; }
.card h2 { margin: 0; font-size: 2rem; }
.card h2::before { display: none; }
.card p { margin: 0; flex: 1; color: var(--muted); }
.card .go { color: var(--c); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.card:hover { border-color: var(--c); }
.card.epi { --c: var(--epi); } .card.pag { --c: var(--pag); } .card.shi { --c: var(--shi); }

/* Reading components */
.terms dt { font-weight: 600; margin-top: .9rem; }
.terms dd { margin: 0; color: var(--muted); }
.timeline dt { font-variant-numeric: tabular-nums; color: var(--accent); }
.remedy { padding-left: 1.4rem; }
.remedy li { margin: .5rem 0; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.35; }
.callout { padding: .85rem 1.1rem; background: var(--surface); border-left: 4px solid var(--accent); }
.alert { padding: .85rem 1.1rem; background: var(--surface); border-left: 4px solid var(--danger); }
.sources { padding-left: 1.3rem; }
.paths-intro { max-width: var(--col); }
.toc { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.75rem; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; }

/* Card grids */
.wheel, .practices, .booklist { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin: 1rem 0 2rem; }
.festival, .practice, .entry, .book { background: var(--surface); border: 1px solid var(--line); padding: 1.1rem 1.3rem; }
.practice { border-top: 3px solid var(--accent); }
.festival h3, .practice h3, .book h3 { margin-top: 0; }
.festival p, .practice p, .practice ol, .book p, .entry p { margin: .35rem 0; font-size: var(--card-text); line-height: 1.6; }
.practice .meta, .festival .meta, .book .meta, .entry .meta { font-size: .9rem; }
.book h3 { font-size: 1.25rem; }
.practice ol { padding-left: 1.3rem; }
.festival.is-next { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.path-link { display: block; color: inherit; text-decoration: none; }
.path-link:hover { border-color: var(--accent); }
.path-link h3 { color: var(--accent); }
.entry { margin: 1rem 0; }
.pre { white-space: pre-wrap; }

/* Tools and forms */
.tool { display: grid; gap: .55rem; padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); margin: 1.5rem 0; }
.tool h3 { margin: 0; }
.tool fieldset { border: 0; padding: 0; margin: .6rem 0 0; }
.tool legend { font-weight: 600; padding: 0; }
.tool fieldset label { display: block; font-weight: 400; }
label { font-weight: 600; }
input[type="radio"] { accent-color: var(--accent); }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%; padding: .6rem .75rem; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 3px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
button { font: inherit; font-weight: 600; padding: .6rem 1.2rem; cursor: pointer; border-radius: 3px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); justify-self: start; }
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button.ghost { background: transparent; color: var(--accent); }
button.small { padding: .2rem .7rem; font-size: .85rem; }
.row { display: flex; gap: .75rem; }
form.inline { display: inline; }
.result { margin: .6rem 0 0; font-weight: 600; min-height: 1.5em; }
.phase { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.3; margin: 0; min-height: 3.6em; }
.clock { font-size: 2.8rem; font-variant-numeric: tabular-nums; margin: 0; color: var(--accent); }

.site-footer { padding: 2.25rem max(1rem, 5vw); border-top: 1px solid var(--line); text-align: center; }
.site-footer p { margin: .25rem 0; }
.site-footer .small { font-size: .8rem; }
.footer-nav { justify-content: center; margin: .9rem 0 .75rem; }
code { font-size: .85em; background: var(--surface); padding: .1em .35em; border: 1px solid var(--line); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .card, .path-link, button { transition: border-color .2s, transform .2s, filter .2s; }
  .card:hover { transform: translateY(-2px); }
}

@media (max-width: 640px) {
  /* Compact one-row header so the sticky bar stays small on phones. The menu scrolls sideways if needed. */
  html { scroll-padding-top: 4.5rem; }
  .site-header { padding: .55rem 1rem .5rem; gap: .1rem 1rem; }
  .brand { font-size: 1.35rem; }
  .site-header nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: .15rem 1.1rem; letter-spacing: .06em; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a { white-space: nowrap; }
}
@media (max-width: 480px) {
  .hero { padding-top: 2.75rem; }
  h2 { font-size: 1.75rem; }
}

/* Printable practices: buttons are added by app.js; printing uses a clean copy (#print-sheet). */
.print-btn { font: inherit; font-size: .85rem; font-weight: 400; padding: 0; margin-top: .5rem; background: none; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.print-all { margin: 1rem 0 -.5rem; text-align: right; }
#print-sheet { display: none; }

@media print {
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #999; --home: #4d6b3a; --epi: #8a6417; --pag: #7a3b2e; --shi: #2f6b55; }
  .site-header { position: static; }
  .site-header nav, .footer-nav, .tool, .skip, .site-footer p.muted, .print-btn, .print-all { display: none; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
  body.print-one > *:not(#print-sheet) { display: none !important; }
  body.print-one #print-sheet { display: block; max-width: 40rem; margin: 0 auto; padding: 0; }
  #print-sheet .practices { display: block; margin: 0; }
  #print-sheet .practice { break-inside: avoid; page-break-inside: avoid; background: #fff; border: 1px solid #999; border-top: 4px solid var(--accent); margin: 0 0 1.2rem; padding: 1rem 1.2rem; }
  #print-sheet .practice h3 { font-size: 1.5rem; }
  #print-sheet .practice p, #print-sheet .practice ol { font-size: 12pt; line-height: 1.55; }
  #print-sheet .practice li { margin: .3rem 0; }
  #print-sheet .print-title { font-size: 1.9rem; margin: 0 0 1rem; padding-top: 0; }
  #print-sheet .print-title::before { display: none; }
  #print-sheet .print-foot { margin: 1rem 0 0; font-size: .8rem; letter-spacing: .06em; color: #444; text-align: center; }
}

/* Admin */
.admin-tabs { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; margin: 0 0 1.5rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.admin-tabs form { margin: 0; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.admin-table th, .admin-table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.admin-actions { display: flex; gap: .75rem; align-items: center; white-space: nowrap; }
.admin-form { max-width: 48rem; }
.admin-form textarea { min-height: 6rem; resize: vertical; }
.admin-form input[readonly] { opacity: .7; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }
.cancel { align-self: center; }

/* Home illustration */
.home-art { max-width: var(--wide); margin: 0 auto 1.25rem; }
.home-art svg { display: block; width: 100%; height: auto; }
.art { fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.art * { vector-effect: non-scaling-stroke; }
.art .solid { fill: var(--bg); }
.art .ground { stroke: var(--muted); opacity: .5; }
.art .a-epi { stroke: var(--epi); }
.art .a-pag { stroke: var(--pag); }
.art .a-shi { stroke: var(--shi); }

/* Page illustrations */
.page-art { max-width: var(--col); margin: 0 auto 1.5rem; }
.page-art svg { display: block; width: 100%; height: auto; }
.art .pathfill { fill: var(--bg); stroke: none; }
.art .a-accent { stroke: var(--accent); }

/* Festival pages */
.more { color: var(--accent); font-size: .72rem !important; letter-spacing: .1em; text-transform: uppercase; margin-top: .6rem !important; }
.dates { display: grid; grid-template-columns: max-content 1fr; gap: .15rem 1.5rem; margin: 0 0 1rem; }
.dates dt, .dates dd { margin: 0; }
.festival-nav { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 1.1rem; line-height: 1.4; }
.festival-nav a { text-decoration: none; }
.festival-nav .centre { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; }
.festival-nav a[rel="next"] { text-align: right; }

/* Epicurean deeper pages */
.doctrines { list-style: none; padding: 0; margin: 1rem 0 2rem; }
.doctrines li { display: grid; grid-template-columns: 3.4rem 1fr; gap: .25rem 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.doctrines .num { font-variant-numeric: tabular-nums; color: var(--accent); font-size: .85rem; letter-spacing: .06em; padding-top: .35rem; }
.doctrines .note { grid-column: 2; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.compare { width: 100%; border-collapse: collapse; font-size: 1.05rem; line-height: 1.5; }
.compare th, .compare td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.compare tbody th { font-weight: 600; width: 22%; }
@media (max-width: 40rem) { .compare { font-size: .98rem; } .compare th, .compare td { padding: .6rem .5rem; } .doctrines li { grid-template-columns: 2.6rem 1fr; } }

/* Contact form. The honeypot field is for spam robots and stays out of sight and out of the tab order. */
.contact-form { max-width: var(--col); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
.contact-form textarea { min-height: 9rem; resize: vertical; }
.policy-date { color: var(--muted); font-size: .9rem; }
