:root {
  --ink: #1c1a17;
  --muted: #6b6258;
  --accent: #b45309;      /* amber — beer */
  --bg: #fdfbf7;
  --rule: #e7e0d6;
  --max: 44rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  border-bottom: 1px solid var(--rule);
}
.site-title { font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.site-nav a { margin-left: 1rem; color: var(--muted); }

/* Language switcher */
.lang-nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.lang-nav .lang-switch { color: var(--muted); }
.lang-nav .lang-current { font-weight: 600; color: var(--ink); }

/* Headings */
h1 { line-height: 1.2; font-size: 2rem; margin: 0 0 .5rem; }
h2 { margin-top: 2.25rem; font-size: 1.4rem; }
h3 { margin-top: 1.75rem; font-size: 1.15rem; }

/* Intro / lead */
.intro { margin: 1rem 0 2.5rem; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* Homepage landing */
.hero { margin: 1rem 0 2.5rem; }
.hero h1 { font-size: 2.3rem; line-height: 1.15; margin-bottom: .5rem; }
.byline { color: var(--muted); font-size: .95rem; }
.cta { display: inline-block; font-weight: 600; }
.track-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .5rem; margin: .5rem 0; }
.track-grid li { border: 1px solid var(--rule); border-radius: 8px; }
.track-grid a { display: block; padding: .7rem .9rem; }
.track-grid a:hover { background: #fff5e6; text-decoration: none; }
.home-faq h3 { font-size: 1.05rem; margin: 1.25rem 0 .2rem; }

/* Post list */
.posts { list-style: none; padding: 0; }
.post-item { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.post-link { font-size: 1.2rem; font-weight: 600; }
.post-item time { display: block; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.post-excerpt { margin: .4rem 0 0; color: var(--muted); }

/* Post meta */
.post-meta { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
.post-tags .tag { color: var(--accent); font-size: .85rem; margin-right: .4rem; }
.post-content p:first-of-type { font-size: 1.08rem; }

/* Body content */
.post-content img, .page-content img { max-width: 100%; height: auto; border-radius: 6px; }
blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: .25rem 0 .25rem 1rem;
  color: var(--muted);
}
code { background: #f1ece4; padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }
pre { background: #f1ece4; padding: 1rem; border-radius: 8px; overflow-x: auto; }
pre code { background: none; padding: 0; }

/* Tags (clickable) */
a.tag { color: var(--accent); font-size: .85rem; margin: 0 .35rem .35rem 0; text-decoration: none; display: inline-block; }
a.tag:hover { text-decoration: underline; }
.tag-cloud { margin: 1rem 0 2.5rem; line-height: 2.2; }
.tag-cloud .count { color: var(--muted); font-size: .72rem; }
.tag-section { margin-top: 2.25rem; scroll-margin-top: 1rem; }
.tag-section h2, .archive-year h2 { border-bottom: 1px solid var(--rule); padding-bottom: .3rem; }
.tag-section time, .archive-year time { color: var(--muted); font-size: .82rem; }
.tag-section ul, .archive-year ul { list-style: none; padding: 0; }
.tag-section li, .archive-year li { padding: .35rem 0; }

/* Share buttons */
.share { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; margin:2.5rem 0 0; padding-top:1.25rem; border-top:1px solid var(--rule); }
.share-label { font-weight:600; font-size:.9rem; margin-right:.25rem; }
.share-btn { display:inline-flex; align-items:center; gap:.4rem; font-size:.85rem; padding:.35rem .8rem; border:1px solid var(--rule); border-radius:999px; color:var(--accent); background:none; cursor:pointer; text-decoration:none; line-height:1.4; font-family:inherit; }
.share-btn svg { width:15px; height:15px; fill:currentColor; flex:none; }
.share-btn:hover { background:#fff5e6; text-decoration:none; }

/* Post title banner — framed-minimal, per-track accent (applies to every post) */
.post-banner { position: relative; margin: .25rem 0 2rem; padding-top: .5rem; text-align: center; }
.banner-brewing    { --pb: #b45309; } /* amber — beer/brewing */
.banner-distilling { --pb: #7c4a2b; } /* oak — distilling/whiskey */
.banner-wine       { --pb: #7b2d43; } /* plum — winemaking */
.banner-neutral    { --pb: #1c1a17; } /* ink — all other tracks */
.post-banner .pb-circle { position: absolute; top: 48%; left: 50%; width: min(72%, 320px); aspect-ratio: 1 / 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--pb); opacity: .06; z-index: 0; pointer-events: none; }
.post-banner .pb-frame { position: relative; z-index: 1; border: 1px solid var(--pb); border-radius: 14px; padding: 2rem 1.5rem; background: transparent; }
.post-banner .post-title { margin: 0; }
.post-banner .pb-rule { display: block; width: 44px; height: 3px; margin: 1rem auto 0; border-radius: 2px; background: var(--pb); opacity: .85; }
.post-banner .pb-track { margin: .85rem 0 0; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pb); }
@media (max-width: 30rem) { .post-banner .pb-frame { padding: 1.4rem 1rem; } }

/* Related reading */
.related { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.related h2 { margin-top: 0; font-size: 1.1rem; }
.related ul { list-style: none; padding: 0; }
.related li { padding: .35rem 0; }

/* Prev / next post nav */
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0 .75rem; flex-wrap: wrap; }
.post-nav a { max-width: 47%; font-size: .95rem; }
.post-nav .next { margin-left: auto; text-align: right; }
.browse-links { color: var(--muted); font-size: .9rem; margin-top: 0; }

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .85rem;
}

/* Contact & feedback form */
.contact-form { display: flex; flex-direction: column; gap: .4rem; margin: 1.5rem 0; max-width: 34rem; }
.contact-form label { font-weight: 600; font-size: .9rem; margin-top: .6rem; }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: .6rem .7rem; width: 100%; box-sizing: border-box; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.contact-form textarea { resize: vertical; }
.contact-form .cta { align-self: flex-start; margin-top: 1rem; border: none; cursor: pointer; }
.contact-note { font-size: .8rem; color: var(--muted); margin-top: .6rem; }

/* Search */
.search-box { width: 100%; max-width: 34rem; font: inherit; padding: .7rem .9rem; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); box-sizing: border-box; }
.search-box:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.search-status { color: var(--muted); font-size: .9rem; margin: .9rem 0 .3rem; }
