/* Taste of Tea Brew — tool styles. Shared by the app page, the tool pages and article embeds.
   Follows tasteoftea.com: Playfair Display headings, DM Sans text, cream #faf9f1, ink #1a1a1a, border #ddd8cc,
   primary button #4a6741 (uppercase), deep green #23423f, links #176225, sage #C3CCA6, gold #fdc656. */
.tob {
  --tob-bg: #faf9f1; --tob-card: #ffffff; --tob-ink: #1a1a1a; --tob-muted: #5a6457; --tob-line: #ddd8cc;
  --tob-primary: #4a6741; --tob-deep: #23423f; --tob-link: #176225; --tob-sage: #C3CCA6; --tob-sage-soft: #e9eee4;
  --tob-gold: #fdc656; --tob-liquor: #93451c; --tob-r: 14px;
  --tob-head: var(--font-heading--family, "Playfair Display", Georgia, "Times New Roman", serif);
  --tob-body: var(--font-body--family, "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  box-sizing: border-box; display: block; width: 100%; max-width: 1040px; margin: 24px auto; padding: 22px 18px 18px;
  background: var(--tob-card); color: var(--tob-ink); border: 1px solid var(--tob-line); border-radius: 18px;
  font-family: var(--tob-body); font-size: 16px; line-height: 1.5; text-align: left;
  box-shadow: 0 1px 0 rgba(44, 42, 30, .04), 0 12px 32px -18px rgba(35, 66, 63, .25);
}
.tob *, .tob *::before, .tob *::after { box-sizing: border-box; }
.tob p, .tob dl, .tob dd, .tob ul { margin: 0; }
.tob button { font-family: inherit; }
.tob :focus-visible { outline: 2px solid var(--tob-link); outline-offset: 2px; }

.tob-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.tob .tob-title { font-family: var(--tob-head); font-weight: 400; font-size: clamp(24px, 2.2vw + 14px, 32px); line-height: 1.15; margin: 0; color: var(--tob-ink); letter-spacing: 0; text-transform: none; }
.tob-head--bare { justify-content: flex-end; }
.tob-head--bare:empty { display: none; }
.tob-unit { min-width: 52px; min-height: 40px; padding: 0 14px; border: 1px solid var(--tob-line); border-radius: 100px; background: var(--tob-bg);
  color: var(--tob-ink); font-size: 15px; font-weight: 500; cursor: pointer; }
.tob-unit:hover { border-color: var(--tob-primary); }

.tob-grid { display: grid; gap: 18px; }
.tob-side, .tob-stage { display: grid; gap: 16px; align-content: start; min-width: 0; }
.tob-grid--timer .tob-stage { order: -1; }
/* two columns only when the tool itself is wide (container query): in a narrow article column it stays stacked */
.tob { container: tob / inline-size; }
.tob [hidden] { display: none !important; }
.tob-grid--percup .tob-stage { order: -1; }
@media (min-width: 860px) { .tob { padding: 28px 30px 24px; } }
@container tob (min-width: 720px) {
  .tob-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; align-items: start; }
  .tob-grid--timer { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .tob-grid--timer .tob-stage, .tob-grid--percup .tob-stage { order: 0; }
  .tob-stage { position: sticky; top: 90px; }
  .tob .tob-answer { display: none; }
}

.tob-field { display: grid; gap: 8px; }
.tob-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tob-muted); }

/* chips */
.tob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tob-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 1px solid var(--tob-line);
  border-radius: 100px; background: var(--tob-card); color: var(--tob-ink); font-size: 15px; line-height: 1; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .12s; white-space: nowrap; }
.tob-chip:hover { border-color: var(--tob-primary); }
.tob-chip:active { transform: scale(.97); }
.tob-chip.is-on { background: var(--tob-deep); border-color: var(--tob-deep); color: #fff; }
.tob-chip.is-off { opacity: .45; cursor: not-allowed; }
.tob-chip--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.tob-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
/* on touch screens the tea list scrolls sideways; with a mouse it wraps (nothing hidden off-screen) */
@media (hover: none) and (max-width: 859px) {
  .tob-chips--teas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 4px; scroll-snap-type: x proximity; }
  .tob-chips--teas::-webkit-scrollbar { display: none; }
  .tob-chips--teas .tob-chip { scroll-snap-align: start; }
}

/* inputs */
.tob-row { display: flex; gap: 8px; align-items: center; }
.tob-row--wrap { flex-wrap: wrap; }
.tob-row--stepper { gap: 14px; }
.tob-input, .tob-select { min-height: 46px; padding: 0 14px; border: 1px solid var(--tob-line); border-radius: 10px; background: var(--tob-card);
  color: var(--tob-ink); font: inherit; font-size: 17px; }
.tob-input { width: 112px; }
.tob-input--full { width: 100%; flex: 1 1 200px; }
.tob-select { flex: 1; min-width: 120px; }
.tob-input:focus, .tob-select:focus { outline: none; border-color: var(--tob-primary); box-shadow: 0 0 0 3px rgba(74, 103, 65, .18); }
.tob-input[aria-invalid="true"] { border-color: #b3261e; }
.tob-error { color: #b3261e; font-size: 14px; min-height: 0; }
.tob-error:empty { display: none; }

/* buttons */
.tob-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 1px solid var(--tob-line);
  border-radius: 100px; background: var(--tob-card); color: var(--tob-ink); font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background .18s, transform .12s, box-shadow .18s; }
.tob-btn:active { transform: scale(.98); }
.tob-btn--primary { background: var(--tob-primary); border-color: var(--tob-primary); color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.tob-btn--primary:hover { background: var(--tob-deep); }
.tob-btn--sage { background: var(--tob-sage); border-color: var(--tob-sage); color: #1a1a1a; }
.tob-btn--sage:hover { background: #b3bd93; }
.tob-btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.tob-btn--start { min-width: 150px; min-height: 54px; font-size: 16px; }
.tob-step { min-width: 56px; min-height: 46px; padding: 0 12px; border: 1px solid var(--tob-line); border-radius: 100px; background: var(--tob-card);
  color: var(--tob-ink); font-size: 15px; font-weight: 500; cursor: pointer; }
.tob-step:hover { border-color: var(--tob-primary); }
.tob-link { border: 0; background: none; color: var(--tob-link); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 40px; padding: 0 10px; }
.tob-x { min-width: 40px; min-height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--tob-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.tob-x:hover { background: var(--tob-sage-soft); color: var(--tob-ink); }
.tob-center { display: flex; justify-content: center; }
.tob-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }

/* timer ring */
.tob-stage { justify-items: stretch; }
.tob-ring { position: relative; width: min(300px, 78vw); aspect-ratio: 1; margin: 4px auto 0; }
.tob-ring__svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tob-ring__track { fill: none; stroke: var(--tob-sage-soft); stroke-width: 10; }
.tob-ring__bar { fill: none; stroke: var(--tob-liquor); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .4s; }
.tob-ring__cup { fill: var(--tob-liquor); opacity: .1; transition: opacity .25s linear, fill .4s; }
.tob-ring__steam path { fill: none; stroke: var(--tob-liquor); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.tob-ring.is-running .tob-ring__steam path { animation: tob-steam 2.4s ease-in-out infinite; }
@keyframes tob-steam { 0% { opacity: 0; transform: translateY(6px); } 35% { opacity: .55; } 100% { opacity: 0; transform: translateY(-10px); } }
.tob-ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.tob-ring__time { font-family: var(--tob-head); font-size: clamp(54px, 9vw, 72px); line-height: 1; font-variant-numeric: tabular-nums; color: var(--tob-ink); }
.tob-ring__sub { margin-top: 6px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--tob-muted); }
.tob-ready { text-align: center; font-size: 15px; color: var(--tob-muted); min-height: 22px; }
.tob-done { display: grid; gap: 12px; justify-items: center; padding: 16px; border-radius: var(--tob-r); background: #fff7df; border: 1px solid #f1df9e; text-align: center; animation: tob-pop .35s ease-out; }
.tob-done[hidden] { display: none; }
.tob-done__msg { font-family: var(--tob-head); font-size: 22px; line-height: 1.25; }
@keyframes tob-pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* facts */
.tob-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tob-fact { padding: 12px 14px; border-radius: 12px; background: var(--tob-bg); border: 1px solid #ece7da; min-width: 0; }
.tob-fact dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tob-muted); margin-bottom: 2px; }
.tob-fact dd { font-size: 16px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.tob-note { color: #3b443a; font-size: 15px; line-height: 1.55; }
.tob-hint { font-size: 14px; line-height: 1.5; color: var(--tob-muted); padding: 10px 12px; border-radius: 10px; background: var(--tob-sage-soft); }
.tob-fine { font-size: 13px; line-height: 1.5; color: var(--tob-muted); }

/* iced tea visual + results */
.tob-visual { display: grid; justify-items: center; gap: 4px; }
.tob-pitcher { width: 150px; height: auto; }
.tob-pitcher__glass { fill: rgba(255, 255, 255, .25); stroke: var(--tob-deep); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.tob-pitcher__handle { fill: none; stroke: var(--tob-deep); stroke-width: 5; stroke-linecap: round; }
.tob-pitcher__liquid { opacity: .75; transition: y .45s cubic-bezier(.2, .8, .2, 1), height .45s cubic-bezier(.2, .8, .2, 1), fill .4s; }
.tob-pitcher__ice rect { fill: rgba(255, 255, 255, .7); stroke: rgba(35, 66, 63, .35); stroke-width: 1; }
.tob-visual__label { font-family: var(--tob-head); font-size: 20px; }
.tob-bags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; min-height: 22px; }
.tob-bag { width: 13px; height: 17px; border-radius: 2px 2px 3px 3px; background: var(--tob-sage); position: relative; animation: tob-pop .25s ease-out both; }
.tob-bag::before { content: ""; position: absolute; left: 6px; top: -6px; width: 1px; height: 6px; background: #8d8a7a; }
.tob-bags__more { font-size: 13px; color: var(--tob-muted); align-self: center; }
.tob-answer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 12px 14px; border-radius: 12px; background: var(--tob-sage-soft); font-size: 15px; color: #3b443a; }
.tob-answer strong { font-family: var(--tob-head); font-size: 24px; font-weight: 400; line-height: 1.15; color: var(--tob-ink); }
.tob-results { display: grid; gap: 8px; }
.tob-results[hidden] { display: none; }
.tob-result { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--tob-bg); border: 1px solid #ece7da; }
.tob-result dt { font-size: 15px; color: #3b443a; }
.tob-result dd { text-align: right; display: grid; }
.tob-result strong { font-family: var(--tob-head); font-size: 22px; font-weight: 400; line-height: 1.15; }
.tob-result small { font-size: 12.5px; color: var(--tob-muted); }

/* per cup */
.tob-count { min-width: 120px; text-align: center; font-family: var(--tob-head); font-size: 26px; }
.tob-big { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.tob-big--one { grid-template-columns: 1fr; }
.tob-big > div { display: grid; gap: 2px; padding: 16px; border-radius: var(--tob-r); background: var(--tob-sage-soft); }
.tob-big strong { font-family: var(--tob-head); font-size: clamp(30px, 3vw + 16px, 40px); font-weight: 400; line-height: 1.05; }
.tob-big span { font-size: 14px; color: var(--tob-muted); }
.tob-spoons { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.tob-spoon { width: 34px; height: 14px; position: relative; display: inline-block; animation: tob-pop .25s ease-out both; }
.tob-spoon::before { content: ""; position: absolute; left: 0; top: 0; width: 18px; height: 14px; border-radius: 50%; background: var(--tob-liquor); opacity: .85; }
.tob-spoon::after { content: ""; position: absolute; left: 15px; top: 5px; width: 19px; height: 4px; border-radius: 2px; background: #b9b4a4; }
.tob-spoon--half::before { clip-path: inset(0 50% 0 0); }

/* caffeine */
.tob-drinks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tob-drink { display: grid; gap: 2px; padding: 12px 14px; min-height: 64px; text-align: left; border: 1px solid var(--tob-line); border-radius: 12px; background: var(--tob-card); cursor: pointer;
  transition: border-color .18s, background .18s, transform .12s; }
.tob-drink:hover { border-color: var(--tob-primary); background: var(--tob-bg); }
.tob-drink:active { transform: scale(.98); }
.tob-drink strong { font-size: 15px; font-weight: 600; }
.tob-drink span { font-size: 13px; color: var(--tob-muted); }
.tob-scale { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.tob-scale__cup { position: relative; width: 34px; height: 42px; border: 2px solid var(--tob-deep); border-top-width: 0; border-radius: 0 0 10px 10px; overflow: hidden; background: #fff; }
.tob-scale__cup i { position: absolute; left: 0; right: 0; bottom: 0; background: #6b3a1e; transition: height .4s ease; }
.tob-scale__label { flex-basis: 100%; font-size: 12.5px; color: var(--tob-muted); }
.tob-log { list-style: none; padding: 0; display: grid; gap: 4px; }
.tob-log li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 6px 4px 6px 12px; border-radius: 10px; background: var(--tob-bg); font-size: 14px; }
.tob-table { border-top: 1px solid var(--tob-line); padding-top: 12px; margin-top: 16px; }
.tob-table summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.tob-table .tob-facts { margin: 8px 0; }

/* product picks */
.tob-recs { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--tob-line); }
.tob-recs[hidden] { display: none; }
.tob .tob-recs__title { font-family: var(--tob-head); font-size: 20px; font-weight: 400; margin: 0 0 12px; text-transform: none; letter-spacing: 0; }
.tob-recs__list { display: grid; gap: 10px; }
@container tob (min-width: 640px) { .tob-recs__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tob-rec { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border-radius: var(--tob-r); background: var(--tob-bg); border: 1px solid #ece7da; }
.tob-rec--ph { min-height: 110px; background: linear-gradient(90deg, var(--tob-bg), #f1efe6, var(--tob-bg)); background-size: 200% 100%; animation: tob-shimmer 1.4s linear infinite; }
@keyframes tob-shimmer { to { background-position: -200% 0; } }
.tob-rec__img img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; display: block; background: #fff; }
.tob-rec__body { display: grid; gap: 4px; min-width: 0; }
.tob-rec__brand { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tob-muted); }
.tob-rec__name { min-height: 2.6em; color: var(--tob-ink); font-weight: 600; font-size: 14.5px; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tob-rec__name:hover { color: var(--tob-link); text-decoration: underline; }
.tob-rec__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.tob-rec__price { font-weight: 600; }
.tob-rec__save { min-height: 34px; padding: 0 12px; border: 1px solid var(--tob-line); border-radius: 100px; background: var(--tob-card); font-size: 13px; cursor: pointer; }
.tob-rec__save[aria-pressed="true"] { background: var(--tob-sage-soft); border-color: var(--tob-sage); }

/* my teas */
.tob-mylist { display: grid; gap: 10px; margin-bottom: 18px; }
.tob-mytea { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: var(--tob-r); background: var(--tob-bg); border: 1px solid #ece7da; }
.tob-mytea img, .tob-mytea__ph { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.tob-mytea__ph { display: grid; place-items: center; color: #fff; font-family: var(--tob-head); font-size: 24px; }
.tob-mytea__body { display: grid; gap: 4px; min-width: 0; }
.tob-mytea__meta { font-size: 13.5px; color: var(--tob-muted); }
.tob-mytea__btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tob-search { display: grid; gap: 6px; }
.tob-hit { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; padding: 6px 10px; border: 1px solid var(--tob-line);
  border-radius: 12px; background: var(--tob-card); text-align: left; font-size: 14.5px; cursor: pointer; }
.tob-hit img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.tob-hit em { font-style: normal; color: var(--tob-link); font-weight: 600; font-size: 13px; }

.tob-more-link { margin-top: 16px; font-size: 14.5px; }
.tob-more-link a { color: var(--tob-link); text-decoration: underline; text-underline-offset: 3px; }

/* inside the app shell the tools are the page: no outer card */
.tob--app { margin: 0 auto; border: 0; box-shadow: none; background: transparent; padding: 18px 16px 24px; }
/* the sideways tea list bleeds exactly to the app's 16px gutter (no horizontal page scroll) */
@media (hover: none) and (max-width: 859px) { .tob--app .tob-chips--teas { margin: 0 -16px; padding: 2px 16px 4px; } }

@media (prefers-reduced-motion: reduce) {
  .tob *, .tob *::before, .tob *::after { animation: none !important; transition: none !important; }
}

/* article/page text styles (e.g. ".blog-post-content p") must not resize the tool's own paragraphs */
.tob p.tob-note { font-size: 15px; line-height: 1.55; }
.tob p.tob-hint { font-size: 14px; line-height: 1.5; }
.tob p.tob-fine { font-size: 13px; line-height: 1.5; }
.tob p.tob-ready, .tob p.tob-answer { font-size: 15px; line-height: 1.4; }
.tob p.tob-more-link { font-size: 14.5px; line-height: 1.5; }
.tob p.tob-error { font-size: 14px; line-height: 1.4; }
