/* THE TEA · design tokens (light + dark) */
:root {
  /* brand */
  --steep: #3a6b45;
  --cream: #f5f1e8;
  --stone: #9a958a;

  /* tea categories */
  --cat-green:  #4a7c59;
  --cat-red:    #8b2500;
  --cat-yellow: #c5a63d;
  --cat-oolong: #b87333;
  --cat-white:  #b0a18c;
  --cat-dark:   #3e2723;
  --cat-puerh:  #4e342e;

  /* sheng / shou — sub-accents within puerh */
  --sheng: #5a7a3e;       /* unfermented, jade-leaf */
  --shou:  #4e342e;       /* fermented, dark earth */

  /* light surface */
  --bg:        #f5f1e8;
  --bg-raised: #fafaf3;
  --bg-sunk:   #ece7d9;
  --fg-1:      #1f1d18;
  --fg-2:      #5a554a;
  --fg-3:      #8a8478;
  --hair:      rgba(31, 29, 24, 0.08);
  --hair-2:    rgba(31, 29, 24, 0.14);

  /* type */
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif-cjk: "Noto Serif SC", "Songti SC", "STZhongsong", serif;
  --serif-ed: "EB Garamond", "Hoefler Text", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* type scale (×1.6 from brief baseline) */
  --t-large-title: 26px;
  --t-title:       22px;
  --t-title2:      19px;
  --t-title3:      18px;
  --t-headline:    16px;
  --t-body:        14px;
  --t-footnote:    12px;
  --t-caption:     11px;

  /* spacing (×2) */
  --s-xs:  4px;
  --s-sm:  6px;
  --s-md:  10px;
  --s-lg:  12px;
  --s-xl:  18px;
  --s-xxl: 24px;
  --s-xxxl:32px;

  /* radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  22px;
  --r-pill: 999px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --d-100: 100ms;
  --d-200: 200ms;
  --d-400: 400ms;
  --d-800: 800ms;
}

[data-theme="dark"] {
  --bg:        #1a1814;
  --bg-raised: #252220;
  --bg-sunk:   #14120f;
  --fg-1:      #f0ebe0;
  --fg-2:      #9a958a;
  --fg-3:      #6a6358;
  --hair:      rgba(240, 235, 224, 0.10);
  --hair-2:    rgba(240, 235, 224, 0.16);

  --steep: #5b9168;
  --sheng: #8aa56b;
  --shou:  #a5826e;
}

/* density */
[data-density="compact"] {
  --s-md:  8px;
  --s-lg:  10px;
  --s-xl:  14px;
  --s-xxl: 18px;
  --s-xxxl:24px;
}

/* serif-led pairing */
[data-typeset="serif"] {
  --sans: "EB Garamond", "Hoefler Text", Georgia, serif;
}

/* shared atoms used in screens */
.tt-screen {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-feature-settings: "ss01", "kern";
  -webkit-font-smoothing: antialiased;
}

.tt-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.tt-scroll::-webkit-scrollbar { display: none; }

.tt-hair  { border-bottom: 1px solid var(--hair); }
.tt-hair-t{ border-top: 1px solid var(--hair); }

.tt-mono  { font-family: var(--mono); font-feature-settings: "tnum","zero"; }
.tt-cjk   { font-family: var(--serif-cjk); }
.tt-pinyin{ font-style: italic; color: var(--fg-2); }

/* placeholder imagery — diagonal stripes + caption */
.tt-ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      var(--bg-sunk) 0 14px,
      var(--bg-raised) 14px 28px);
  border: 1px solid var(--hair);
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: flex-end;
  padding: 10px;
}
.tt-ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 40%,
      color-mix(in oklab, var(--bg-raised) 60%, transparent),
      transparent 70%);
  pointer-events: none;
}
.tt-ph > span { position: relative; z-index: 1; }

/* hairline button */
.tt-btn {
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair-2);
  background: transparent;
  color: var(--fg-1);
  cursor: default;
  transition: background var(--d-200) var(--ease), border-color var(--d-200) var(--ease);
}
.tt-btn:hover { background: var(--bg-raised); }
.tt-btn--steep {
  background: var(--steep);
  color: #fafaf3;
  border-color: transparent;
}
.tt-btn--steep:hover { background: color-mix(in oklab, var(--steep) 88%, black); }
.tt-btn--ghost { border-color: transparent; padding-left: 6px; padding-right: 6px; }

/* eyebrow */
.tt-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* chip */
.tt-chip {
  font-size: var(--t-footnote);
  padding: 4px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair-2);
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tt-chip[data-on="1"] {
  background: var(--fg-1);
  color: var(--bg);
  border-color: var(--fg-1);
}

/* numeric / spec list */
.tt-spec {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 18px;
  row-gap: 6px;
  font-size: var(--t-footnote);
}
.tt-spec dt { color: var(--fg-2); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; }
.tt-spec dd { margin: 0; color: var(--fg-1); }

/* hide scrollbar for filter strips */
.tt-noscroll { scrollbar-width: none; }
.tt-noscroll::-webkit-scrollbar { display: none; }
