:root {
  --ink: #1a202c;
  --night: #111827;
  --paper: #ffffff;
  --text: #333333;
  --cream: #f4efe6;
  --mist: #f6f2ea;
  --line: #e4dccd;
  --muted: #6b6457;
  --accent: #ab5915;
  --accent-deep: #8f4a12;
  --glow: #f0a964;
  --jade: #2f6f5e;
  --fluid-font-sm: clamp(0.875rem, 1vw, 1rem);
  --fluid-font-md: clamp(1rem, 2vw, 1.25rem);
  --fluid-font-lg: clamp(1.5rem, 4vw, 3rem);
  --fluid-space-sm: clamp(0.5rem, 2vw, 1rem);
  --fluid-space-md: clamp(1rem, 3vw, 2rem);
  --fluid-space-lg: clamp(2rem, 5vw, 4rem);
  --fluid-width: clamp(320px, 90vw, 1200px);
}

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

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  padding-bottom: 5.5rem;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 0.5rem;
}

a { color: var(--accent-deep); }
a:hover { color: var(--accent); }

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

button, input, textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 2px;
}


.fl { display: flex; }
.fl-wrap { flex-wrap: wrap; }
.fl-col { flex-direction: column; }
.ai-c { align-items: center; }
.ai-s { align-items: flex-start; }
.jc-b { justify-content: space-between; }
.jc-c { justify-content: center; }
.g-s { gap: 0.5rem; }
.g-m { gap: 1rem; }
.g-l { gap: max(1.5rem, 2vw); }
.tx-c { text-align: center; }
.tx-s { font-size: var(--fluid-font-sm); }
.tx-m { font-size: var(--fluid-font-md); }
.fw-6 { font-weight: 600; }
.fw-7 { font-weight: 700; }
.up { text-transform: uppercase; letter-spacing: 0.08em; }
.mt-s { margin-top: 0.5rem; }
.mt-m { margin-top: 1rem; }
.mt-l { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-s { margin-bottom: 0.5rem; }
.mb-m { margin-bottom: 1rem; }
.mx-a { margin-left: auto; margin-right: auto; }
.w-f { width: 100%; }
.rd { border-radius: 14px; }
.rd-s { border-radius: 8px; }
.measure { max-width: 62ch; }
.nowrap { white-space: nowrap; }
.c-muted { color: var(--muted); }
.c-glow { color: var(--glow); }
.c-jade { color: var(--jade); }
.on-dark { background: var(--ink); color: var(--cream); }
.on-light { background: var(--paper); color: var(--text); }
.on-mist { background: var(--mist); color: var(--text); }
.on-dark a { color: var(--glow); }
.on-dark a.pour-btn, .on-dark a.pour-btn:hover { color: #fff; }
.on-dark a.pour-btn-alt, .on-dark a.pour-btn-alt:hover { color: inherit; }
.list-plain { list-style: none; padding-left: 0; margin: 0; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sr:focus {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 10000;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  padding: .6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}


.pour-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .85rem 1.6rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease;
}
.pour-btn::after {
  content: " →";
  display: inline-block;
  transition: transform .2s;
}
.pour-btn:hover {
  background: var(--accent-deep);
  color: #fff;
}
.pour-btn:hover::after { transform: translateX(4px); }
.pour-btn-alt {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 2px currentColor;
}
.pour-btn-alt:hover { background: rgba(240, 169, 100, 0.16); color: inherit; }
.pour-btn-sm { padding: .55rem 1rem; font-size: 0.95rem; }
.pour-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.pour-btn.is-busy::after {
  content: "";
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-left-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}


.brew-spinner {
  border: 4px solid rgba(0,0,0,0.1);
  border-left-color: var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.leaf-skel {
  background: linear-gradient(100deg, #ece5d8 30%, #f7f3ec 50%, #ece5d8 70%);
  background-size: 300% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}


.terrace-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.terrace-field-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.terrace-field-input {
  width: 100%;
  min-height: 44px;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text);
}
.terrace-field-input:focus { border-color: var(--accent); }
.terrace-field-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.5;
}
.terrace-field-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}
.terrace-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .leaf-skel, .brew-spinner, .pour-btn.is-busy::after { animation: none; }
  html { scroll-behavior: auto; }
}

.pour-btn-sum { flex-wrap: wrap; column-gap: 0.35rem; row-gap: 0; text-align: center; }
.pour-btn-total { white-space: nowrap; }
