:root {
  font-family: Inter, ui-rounded, "SF Pro Rounded", "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #203126;
  background: #eef6e8;
  font-synthesis: none;
  --th-page: #eef6e8;
  --th-paper: rgba(255, 255, 255, 0.82);
  --th-paper-solid: #fbfdf9;
  --th-ink: #203126;
  --th-muted: #607064;
  --th-accent: #557c5e;
  --th-accent-strong: #466c4f;
  --th-wash: #e3eee0;
  --th-wash-soft: #f2f7ef;
  --th-line: #d5e1d2;
  --th-shadow: 0 1.5rem 5rem rgba(54, 79, 57, 0.08);
  --th-radius: 1.35rem;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-height: 100vh; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.teahub-body {
  background:
    radial-gradient(circle at 12% 5%, rgba(255,255,255,.95), transparent 30rem),
    radial-gradient(circle at 90% 90%, rgba(188,216,174,.32), transparent 30rem),
    var(--th-page);
}
.teahub-app { min-height: 100vh; }
.teahub-sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.teahub-skip {
  position: fixed; left: 1rem; top: .75rem; z-index: 30; padding: .6rem .85rem;
  border-radius: .75rem; background: var(--th-ink); color: white; text-decoration: none;
  transform: translateY(-150%);
}
.teahub-skip:focus { transform: translateY(0); }

/* Anonymous/login */
.teahub-stage {
  min-height: 100vh; display: grid; place-items: center; align-content: center;
  gap: 1.25rem; padding: 2rem 1.25rem;
}
.teahub-card {
  width: min(100%, 28rem); padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid rgba(62, 94, 69, 0.12); border-radius: 2rem;
  background: var(--th-paper); box-shadow: var(--th-shadow); backdrop-filter: blur(1rem);
}
.teahub-brand {
  width: 3.5rem; height: 3.5rem; display: grid; place-items: center; margin-bottom: 1.2rem;
  border-radius: 1.2rem; background: #dfeeda; font-size: 1.9rem; transform: rotate(-2deg);
}
.teahub-kicker {
  margin: 0 0 .45rem; color: #63806a; font-size: .72rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
}
.teahub-card h1 {
  margin: 0; font-size: clamp(2rem, 8vw, 3.15rem); line-height: .98; letter-spacing: -.055em;
}
.teahub-copy { margin: .9rem 0 1.65rem; color: var(--th-muted); font-size: 1.02rem; line-height: 1.55; }
.teahub-login { display: grid; gap: 1rem; }
.teahub-field { display: grid; gap: .45rem; color: #506254; font-size: .86rem; font-weight: 650; }
.teahub-field input, .teahub-filter, .teahub-composer textarea {
  width: 100%; border: 1px solid #c9d9c8; background: var(--th-paper-solid);
  color: var(--th-ink); outline: none; transition: border-color 120ms ease, box-shadow 120ms ease;
}
.teahub-field input { border-radius: .9rem; padding: .82rem .9rem; }
.teahub-field input:focus, .teahub-filter:focus, .teahub-composer textarea:focus {
  border-color: #7ca184; box-shadow: 0 0 0 .22rem rgba(124,161,132,.16);
}
.teahub-remember { display: flex; gap: .55rem; align-items: center; color: var(--th-muted); font-size: .86rem; }
.teahub-button, .teahub-send {
  display: inline-flex; justify-content: center; align-items: center; min-height: 2.8rem;
  border: 0; border-radius: .9rem; background: var(--th-accent); color: #fff;
  padding: .72rem 1rem; font-weight: 750; text-decoration: none; cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}
.teahub-button:hover, .teahub-send:hover { background: var(--th-accent-strong); transform: translateY(-1px); }
.teahub-link { display: inline-block; margin-top: 1rem; color: var(--th-accent); font-size: .88rem; text-underline-offset: .16em; }
.teahub-alerts { margin-bottom: 1rem; }
.teahub-alerts .ui.message {
  margin: 0 0 1rem; border: 1px solid #e5c8c8; border-radius: .8rem;
  background: #fff4f3; color: #7b3d3a; padding: .8rem .9rem;
}
.teahub-footnote { margin: 0; color: #7d927f; font-size: .78rem; }

/* Anonymous landing */
.teahub-landing {
  width: min(100% - 2rem, 1180px); min-height: 100vh; margin: 0 auto;
  display: grid; place-items: center; padding: 2rem 0;
}
.teahub-landing-card {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(16rem, .85fr);
  grid-template-areas:
    "brand cup"
    "equation cup";
  align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem) clamp(2rem, 5vw, 5rem);
  padding: clamp(2.5rem, 5vw, 4.5rem);
  border: 1px solid rgba(62,94,69,.12); border-radius: 2.25rem;
  background: rgba(255,255,255,.34); box-shadow: 0 1.5rem 5rem rgba(54,79,57,.08);
}
.teahub-landing-brand { grid-area: brand; min-width: 0; }
.teahub-name {
  margin: 0; color: var(--th-ink); font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1; letter-spacing: -.045em; font-weight: 850;
}
.teahub-tagline {
  margin: .4rem 0 0; color: var(--th-muted); font-size: clamp(.82rem, 1.05vw, .95rem);
  line-height: 1.25; letter-spacing: -.01em;
}
.teahub-equation-action {
  grid-area: equation;
  width: max-content;
  max-width: 100%;
  margin-top: 2rem;
}
.teahub-formula {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
  margin: 0;
  color: var(--th-ink);
  font-size: clamp(4rem, 6.6vw, 6.4rem);
  line-height: .9;
  font-weight: 620;
  font-kerning: normal;
}
.teahub-formula-git,
.teahub-formula-tea,
.teahub-formula-time {
  letter-spacing: -.07em;
}
.teahub-formula-time {
  color: inherit;
  font: italic 620 1em/1 inherit;
}
.teahub-formula-plus {
  color: var(--th-accent);
  font-size: .64em;
  font-weight: 560;
  letter-spacing: 0;
  line-height: 1;
  margin-inline: .16em;
}
.teahub-landing-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.15rem;
  padding-right: clamp(.35rem, 4.5vw, 3.25rem);
}
.teahub-landing-button {
  gap: .85rem;
  border-radius: 999px;
  padding: .9rem 1.15rem .9rem 1.35rem;
  max-width: 100%;
}
.teahub-landing-button span { margin-left: .25rem; }
.teahub-landing-cup {
  grid-area: cup;
  justify-self: center; position: relative; display: grid; place-items: center;
  width: min(100%, 20rem); aspect-ratio: 1; border-radius: 48% 52% 50% 46%;
  background: rgba(255,255,255,.58); border: 1px solid rgba(62,94,69,.1);
  box-shadow: var(--th-shadow); transform: rotate(2deg);
}
.teahub-cup-face { font-size: clamp(6rem, 13vw, 9rem); filter: saturate(.82); }
@media (min-width: 861px) {
  .teahub-equation-action {
    align-self: center;
    margin-top: 0;
    transform: translateY(-2rem);
  }
}

@media (min-width: 1200px) {
  .teahub-landing-actions {
    padding-right: 0;
    transform: translateX(3.75rem);
  }
}

@media (max-width: 860px) {
  .teahub-landing-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "cup"
      "equation";
    gap: 1.5rem;
  }
  .teahub-landing-brand,
  .teahub-equation-action {
    width: 100%;
    justify-self: center;
    text-align: center;
  }
  .teahub-name {
    text-align: center;
    font-size: clamp(2rem, 5.2vw, 2.7rem);
  }
  .teahub-tagline { text-align: center; }
  .teahub-landing-cup {
    width: min(52vw, 17rem);
    margin: 0 auto;
  }
  .teahub-equation-action {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .teahub-formula {
    font-size: clamp(3.4rem, 9.5vw, 5.2rem);
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
  .teahub-landing-actions {
    justify-content: center;
    padding-right: 0;
    transform: none;
  }
}

@media (max-width: 720px) {
  .teahub-landing { width: min(100% - 1rem, 1180px); padding: .5rem 0; }
  .teahub-landing-card {
    grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; border-radius: 1.6rem;
  }
  .teahub-name { font-size: 1.45rem; }
  .teahub-equation-action { margin-top: 1.5rem; width: 100%; }
  .teahub-formula {
    width: 100%;
    justify-content: center;
    font-size: clamp(2.7rem, 12.5vw, 4.3rem);
  }
  .teahub-formula-plus { margin-inline: .12em; }
  .teahub-landing-actions {
    justify-content: center;
    margin-top: 1.1rem;
    padding-right: 0;
  }
  .teahub-landing-button {
    width: min(100%, 23rem);
    white-space: nowrap;
  }
  .teahub-landing-cup { width: min(62vw, 14rem); }
}

.teahub-login-modal {
  width: min(calc(100% - 2rem), 28rem); border: 1px solid rgba(62,94,69,.13);
  border-radius: 1.6rem; padding: 1.4rem; background: var(--th-paper-solid); color: var(--th-ink);
  box-shadow: 0 2rem 6rem rgba(35,55,40,.22);
}
.teahub-login-modal::backdrop { background: rgba(28,45,33,.28); backdrop-filter: blur(4px); }
.teahub-login-modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.teahub-login-modal h2 { margin:0; font-size:1.65rem; letter-spacing:-.04em; }
.teahub-modal-close {
  width:2.15rem; height:2.15rem; border:1px solid var(--th-line); border-radius:.75rem;
  background:var(--th-wash-soft); color:var(--th-muted); cursor:pointer; font-size:1.25rem; line-height:1;
}
.teahub-modal-close:hover { background:var(--th-wash); color:var(--th-ink); }

/* Signed-in workbench */
.teahub-topbar {
  width: min(100% - 2rem, 1440px); min-height: 4.25rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.teahub-wordmark {
  display: inline-flex; align-items: center; gap: .6rem; color: var(--th-ink);
  font-size: 1.08rem; font-weight: 850; letter-spacing: -.03em; text-decoration: none;
}
.teahub-wordmark-mark {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .75rem;
  background: var(--th-wash); font-size: 1.05rem; transform: rotate(-2deg);
}
.teahub-topbar-meta {
  display: flex; align-items: center; gap: .8rem; min-width: 0;
  color: var(--th-muted); font-size: .78rem;
}
.teahub-user { color: var(--th-ink); font-weight: 750; }
.teahub-signout { color: var(--th-muted); text-underline-offset: .15em; }

.teahub-workbench {
  width: min(100% - 2rem, 1440px); margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  grid-template-areas: "chat rail" "feed rail"; gap: 1rem; align-items: start;
}
.teahub-panel {
  border: 1px solid rgba(62,94,69,.12); border-radius: var(--th-radius);
  background: var(--th-paper); box-shadow: 0 .75rem 2.5rem rgba(54,79,57,.055);
  backdrop-filter: blur(.8rem);
}
.teahub-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.teahub-panel h1, .teahub-panel h2 { margin: 0; color: var(--th-ink); letter-spacing: -.035em; }
.teahub-panel h1 { font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.08; }
.teahub-panel h2 { font-size: 1.15rem; line-height: 1.2; }
.teahub-panel-note { margin: .35rem 0 0; color: #7b8a7d; font-size: .75rem; }

.teahub-chat {
  grid-area: chat; min-height: min(68vh, 46rem); padding: 1.25rem;
  display: grid; grid-template-rows: auto minmax(10rem, 1fr) auto; gap: 1rem;
}
.teahub-chat-head { align-items: center; }
.teahub-quiet-button, .teahub-icon-button {
  border: 1px solid var(--th-line); background: var(--th-paper-solid); color: #48604f; cursor: pointer;
}
.teahub-quiet-button {
  min-height: 2.25rem; padding: .45rem .8rem; border-radius: .75rem; font-size: .78rem; font-weight: 750;
}
.teahub-icon-button {
  width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: .65rem; font-size: 1rem;
}
.teahub-quiet-button:hover, .teahub-icon-button:hover { background: var(--th-wash-soft); }

.teahub-chat-thread {
  min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: .75rem;
  padding: .25rem .15rem .25rem 0; scrollbar-width: thin; scrollbar-color: #bdd0bb transparent;
}
.teahub-chat-empty {
  align-self: center; justify-self: center; max-width: 22rem; text-align: center;
  color: #768679; font-size: .9rem; line-height: 1.55;
}
.teahub-chat-empty[hidden] { display: none; }
.teahub-empty-mark {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-bottom: .55rem;
  border-radius: .8rem; background: var(--th-wash); color: var(--th-accent); font-weight: 900;
}
.teahub-chat-empty p { margin: 0; }
.tea-turn {
  max-width: min(46rem, 92%); border-radius: 1rem; padding: .85rem 1rem;
  font-size: .92rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.tea-turn-user {
  justify-self: end; background: var(--th-accent); color: #fff; border-bottom-right-radius: .35rem;
}
.tea-turn-agent {
  justify-self: start; background: var(--th-wash-soft); color: #314438; border-bottom-left-radius: .35rem;
}
.tea-turn-thinking { color: #708174; font-style: italic; }
.tea-turn-reasoning { margin: 0 0 .65rem; padding-left: .7rem; border-left: 2px solid #c9d8cb; color: #708174; }
.tea-turn-reasoning-label { margin-bottom: .2rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tea-turn-reasoning-text { white-space: pre-wrap; line-height: 1.45; }
.tea-turn details {
  margin-top: .65rem; border-top: 1px solid var(--th-line); padding-top: .55rem;
  color: #6e7c70; font-size: .78rem;
}
.tea-turn summary { cursor: pointer; font-weight: 700; }
.tea-trace { margin-top: .5rem; line-height: 1.5; }

.teahub-composer {
  border: 1px solid var(--th-line); border-radius: 1rem; background: var(--th-paper-solid); padding: .65rem;
}
.teahub-composer textarea {
  display: block; min-height: 4.4rem; max-height: 12rem; resize: vertical; border: 0;
  background: transparent; padding: .45rem .5rem .35rem; line-height: 1.5; box-shadow: none;
}
.teahub-composer textarea:focus { box-shadow: none; }
.teahub-composer-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem .2rem 0 .5rem;
}
.teahub-composer-hint { color: #8a978b; font-size: .68rem; }
.teahub-send {
  min-height: 2.25rem; gap: .4rem; padding: .45rem .8rem; border-radius: .72rem; font-size: .78rem;
}
.teahub-send:disabled, .teahub-quiet-button:disabled { opacity: .55; cursor: wait; transform: none; }

.teahub-rail { grid-area: rail; display: grid; gap: 1rem; position: sticky; top: 1rem; }
.teahub-usage-panel, .teahub-heatmap-panel, .teahub-workspaces, .teahub-feed { padding: 1rem; }
.teahub-panel-link { width:1.9rem;height:1.9rem;display:grid;place-items:center;border:1px solid var(--th-line);border-radius:.65rem;background:var(--th-paper-solid);color:var(--th-accent-strong);text-decoration:none;font-weight:800; }
.teahub-panel-link:hover { background:var(--th-wash-soft); }
.teahub-usage-pool { display:grid;gap:.55rem;margin-top:.85rem; }
.teahub-usage-widget { display:block; width:100%; max-width:320px; height:auto; }
.teahub-usage-row { display:grid;grid-template-columns:3.8rem minmax(0,1fr) auto;gap:.55rem;align-items:center; }
.teahub-usage-name { color:var(--th-ink);font-size:.75rem;font-weight:800;overflow:hidden;text-overflow:ellipsis; }
.teahub-usage-track { height:.48rem;border-radius:999px;overflow:hidden;background:#e4ede1; }
.teahub-usage-fill { display:block;height:100%;border-radius:inherit;background:var(--th-accent); }
.teahub-usage-value { color:var(--th-muted);font-size:.68rem;font-variant-numeric:tabular-nums; }
.teahub-usage-note { margin:.1rem 0 0;color:#819083;font-size:.68rem; }
.teahub-count {
  min-width: 1.75rem; min-height: 1.75rem; display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--th-wash); color: var(--th-accent-strong);
  padding: 0 .5rem; font-size: .68rem; font-weight: 800;
}
.teahub-heatmap-scroll {
  margin-top: .9rem; overflow-x: auto; padding-bottom: .2rem;
  scrollbar-width: thin; scrollbar-color: #bdd0bb transparent;
}
.teahub-heatmap {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, .62rem);
  grid-auto-columns: .62rem; gap: .18rem; width: max-content; min-height: 5.42rem;
}
.teahub-heatmap-cell {
  width: .62rem; height: .62rem; border-radius: .18rem; background: #e6eee2;
  outline: 1px solid rgba(72,96,79,.03);
}
.teahub-heatmap-cell[data-level="1"] { background: #cee0c8; }
.teahub-heatmap-cell[data-level="2"] { background: #a9c5a1; }
.teahub-heatmap-cell[data-level="3"] { background: #7ea77b; }
.teahub-heatmap-cell[data-level="4"] { background: #557c5e; }

.teahub-filter { margin-top: .8rem; border-radius: .78rem; padding: .65rem .75rem; font-size: .82rem; }
.teahub-repos {
  display: grid; gap: .22rem; margin-top: .55rem; max-height: 24rem; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #bdd0bb transparent;
}
.teahub-repo {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; align-items: center;
  padding: .62rem .65rem; border-radius: .78rem; color: var(--th-ink) !important; text-decoration: none;
}
.teahub-repo:visited { color: var(--th-ink) !important; }
.teahub-repo:hover, .teahub-repo:focus-visible { background: var(--th-wash-soft); outline: none; }
.teahub-repo-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .82rem; font-weight: 760; color: var(--th-ink) !important;
}
.teahub-repo-meta { color: #89958a; font-size: .66rem; }
.teahub-repo-empty, .teahub-feed-empty {
  color: #819083; font-size: .8rem; line-height: 1.5; padding: .7rem .2rem;
}

.teahub-feed { grid-area: feed; }
.teahub-feed-list { display: grid; margin-top: .65rem; }
.teahub-feed-item {
  display: grid; grid-template-columns: 1.8rem minmax(0,1fr) auto; gap: .7rem;
  align-items: start; padding: .8rem .1rem; border-top: 1px solid rgba(92,116,95,.11);
}
.teahub-feed-item:first-child { border-top: 0; }
.teahub-feed-live { background: color-mix(in srgb, var(--th-accent) 5%, transparent); }
.teahub-feed-avatar-glyph { display: grid; place-items: center; font-size: 1rem; }
.teahub-feed-live .teahub-feed-detail { white-space: pre-wrap; max-height: 7.5rem; overflow: hidden; }
.teahub-feed-retained details { width: 100%; }
.teahub-feed-retained summary { cursor: pointer; }
.teahub-feed-stream-body { display: grid; gap: .65rem; margin-top: .65rem; }
.teahub-feed-stream-block pre { margin: .25rem 0 0; white-space: pre-wrap; font: inherit; color: var(--th-muted); }
.teahub-feed-receipt { display: inline-block; margin-top: .4rem; color: var(--th-accent); font-size: .78rem; }
.teahub-feed-avatar {
  width: 1.8rem; height: 1.8rem; border-radius: .65rem; object-fit: cover; background: var(--th-wash);
}
.teahub-feed-copy { min-width: 0; color: #526456; font-size: .82rem; line-height: 1.45; }
.teahub-feed-copy strong { color: var(--th-ink); font-weight: 780; }
.teahub-feed-copy a { color: var(--th-accent-strong); font-weight: 720; text-decoration: none; }
.teahub-feed-copy a:hover { text-decoration: underline; text-underline-offset: .15em; }
.teahub-feed-detail {
  display: block; margin-top: .22rem; color: #819083; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.teahub-feed-time { color: #8a978b; font-size: .68rem; white-space: nowrap; padding-top: .08rem; }
.teahub-feed-more { margin-top: .6rem; width: 100%; }

.teahub-workbench-foot {
  width: min(100% - 2rem, 1440px); margin: 1rem auto 0; padding: 0 0 1.25rem;
  color: #859487; font-size: .72rem; text-align: center;
}
.teahub-error { color: #8d5752 !important; }

@media (max-width: 920px) {
  .teahub-topbar, .teahub-workbench, .teahub-workbench-foot { width: min(100% - 1.25rem, 1440px); }
  .teahub-workbench { grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); }
  .teahub-usage-mini { display: none; }
}
@media (max-width: 720px) {
  .teahub-topbar { min-height: 3.8rem; }
  .teahub-user { display: none; }
  .teahub-workbench { display: flex; flex-direction: column; }
  .teahub-chat, .teahub-rail, .teahub-feed { width: 100%; }
  .teahub-chat { min-height: 70vh; order: 1; }
  .teahub-rail { position: static; order: 2; }
  .teahub-feed { order: 3; }
  .teahub-repos { max-height: 18rem; }
}
@media (max-width: 520px) {
  .teahub-landing-card { padding: 1.6rem 1rem 1.9rem; gap: 1.5rem; }
  .teahub-name { font-size: 1.3rem; }
  .teahub-tagline { font-size: .86rem; }
  .teahub-formula {
    font-size: clamp(2.25rem, 11.8vw, 3.55rem);
    letter-spacing: -.055em;
  }
  .teahub-landing-button {
    width: 100%;
    font-size: .92rem;
    padding-inline: 1rem;
  }
  .teahub-landing-cup { width: min(70vw, 13rem); }
}

@media (max-width: 480px) {
  .teahub-stage { align-content: start; padding-top: 8vh; }
  .teahub-card { border-radius: 1.5rem; }
  .teahub-topbar, .teahub-workbench, .teahub-workbench-foot { width: calc(100% - .8rem); }
  .teahub-topbar { padding-inline: .25rem; }
  .teahub-panel { border-radius: 1.05rem; }
  .teahub-chat, .teahub-feed, .teahub-usage-panel, .teahub-heatmap-panel, .teahub-workspaces { padding: .85rem; }
  .teahub-chat-head { align-items: flex-start; }
  .teahub-panel h1 { font-size: 1.55rem; }
  .teahub-composer-hint { display: none; }
  .tea-turn { max-width: 96%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.teahub-mates-shell { width:min(100% - 2rem,1120px);margin:0 auto; }
.teahub-mates-panel { padding:1rem; }
.teahub-mates-head { align-items:center; }
.teahub-mates-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));gap:1rem;margin-top:1rem; }
.teahub-mate-card { display:grid;gap:.9rem;padding:1rem;border:1px solid rgba(62,94,69,.12);border-radius:1rem;background:var(--th-paper-solid); }
.teahub-mate-card.is-unavailable { opacity:.68; }
.teahub-mate-card-head,.teahub-mate-meter-head { display:flex;align-items:center;justify-content:space-between;gap:.75rem; }
.teahub-mate-card h2 { margin:.08rem 0 0;color:var(--th-ink);font-size:1rem;letter-spacing:-.02em; }
.teahub-mate-badge { padding:.28rem .5rem;border-radius:999px;font-size:.66rem;font-weight:800; }
.teahub-mate-badge.is-available { background:var(--th-wash);color:var(--th-accent-strong); }
.teahub-mate-badge.is-unavailable { background:#f0ece8;color:#8b7a70; }
.teahub-mate-meter { display:grid;gap:.35rem; }
.teahub-mate-activity { border-top:1px solid var(--th-line);padding-top:.7rem;display:grid;grid-template-columns:1fr 1fr;gap:.3rem .8rem; }
.teahub-mate-activity > :nth-child(3),.teahub-mate-activity > :nth-child(4){font-size:.78rem;font-weight:750;color:var(--th-ink);}

/* System dashboard */
.teahub-system-shell{width:min(100% - 2rem,1180px);margin:0 auto;}
.teahub-system-head{padding:1rem 1.15rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;}
.teahub-system-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1rem;}
.teahub-system-card{padding:1rem;}
.teahub-system-wide{grid-column:1/-1;}
.teahub-system-stack{display:grid;gap:.62rem;margin-top:.85rem;}
.teahub-system-row,.teahub-system-service{display:flex;align-items:center;justify-content:space-between;gap:1rem;color:var(--th-muted);font-size:.78rem;}
.teahub-system-row strong,.teahub-system-service strong{color:var(--th-ink);font-variant-numeric:tabular-nums;}
.teahub-system-row.is-bad strong{color:#8d5752;}
.teahub-system-service>div{display:grid;gap:.14rem;}
.teahub-system-class{color:#8a978b;font-size:.65rem;text-transform:uppercase;letter-spacing:.08em;}
.teahub-system-meter{display:grid;gap:.35rem;}
.teahub-system-table{display:grid;margin-top:.7rem;}
.teahub-system-timer{display:grid;grid-template-columns:minmax(10rem,1.1fr) minmax(10rem,1fr) minmax(10rem,1fr) minmax(10rem,1fr);gap:.7rem;padding:.58rem .1rem;border-top:1px solid var(--th-line);font-size:.72rem;color:var(--th-muted);}
.teahub-system-timer:first-child{border-top:0;}
.teahub-system-timer strong{color:var(--th-ink);}
.teahub-system-observed{text-align:right;padding:.55rem .2rem 0;}
@media(max-width:720px){.teahub-system-grid{grid-template-columns:1fr}.teahub-system-wide{grid-column:auto}.teahub-system-timer{grid-template-columns:1fr 1fr}.teahub-system-head{align-items:flex-start}}
