:root {
  /* Green Tea: fresh owner-operated Teahub, distinct from the SP instance. */
  --color-primary: #2f9e44;
  --color-primary-dark-1: #27863a;
  --color-primary-dark-2: #1f6f30;
  --color-primary-light-1: #43ad57;
  --color-primary-light-2: #63bd72;
  --color-green: #2f9e44;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="gitea-auto"] {
    --color-primary: #58b96a;
    --color-primary-dark-1: #48a75a;
    --color-primary-dark-2: #3b944c;
    --color-primary-light-1: #6bc77b;
    --color-primary-light-2: #84d391;
    --color-green: #58b96a;
  }
}

#navbar-logo {
  width: auto;
  gap: 0.45rem;
}

#navbar-logo::after {
  content: "Teahub";
  font-size: 1rem;
  font-weight: 650;
  white-space: nowrap;
}

#navbar-logo img {
  width: 30px;
  height: 30px;
}

.page-content.home img.logo {
  width: 180px;
  height: 180px;
}

/* Homepage: Green Tea uses Gitea surfaces with the proven Teahub split composition. */
.teahub-home {display:grid;min-height:calc(100vh - 8.5rem);place-items:center;padding:0 1.5rem;}
.teahub-home-shell {width:min(100% - 4rem,1440px);max-width:none!important;}
.teahub-home-hero {display:grid;grid-template-columns:minmax(0,1.45fr) minmax(15rem,.55fr);align-items:center;gap:clamp(2rem,5vw,5rem);width:100%;padding:clamp(4rem,12vh,9rem) 0;margin:0 auto;}
.teahub-home-copy {min-width:0;}
.teahub-home-brand {margin:0 0 clamp(2.5rem,5vh,3.5rem);color:var(--color-text);font-size:clamp(2.5rem,4vw,3.6rem);font-weight:700;letter-spacing:-.045em;line-height:1;}
.teahub-home-equation {display:flex;align-items:baseline;flex-wrap:nowrap;white-space:nowrap;width:max-content;max-width:100%;margin:0;color:var(--color-text);font-size:clamp(4rem,6.4vw,7rem);font-weight:540;line-height:.9;font-kerning:normal;}
.teahub-home-equation > span:not(.teahub-home-plus),.teahub-home-equation em {letter-spacing:-.07em;}
.teahub-home-equation em {display:inline-block;color:inherit;font-family:Georgia,"Times New Roman",serif;font-size:.94em;font-weight:400;line-height:1;letter-spacing:-.055em;}
.teahub-home-plus {color:var(--color-primary);font-size:.64em;font-weight:560;letter-spacing:0;line-height:1;margin-inline:.16em;}
.teahub-home-cta {margin-top:2rem!important;border-radius:.65rem!important;padding:.9rem 1.2rem!important;}
.teahub-home-cta span {display:inline-block;margin-left:.25rem;font-size:.9em;}
.teahub-home-cup {justify-self:center;display:grid;place-items:center;min-width:0;width:min(100%,20rem);aspect-ratio:1;font-size:clamp(6rem,13vw,9rem);line-height:1;}

@media (max-width:767px) {
  .teahub-home {min-height:auto;padding:0 1rem;}
  .teahub-home-shell {width:min(100% - 1rem,1440px);}
  .teahub-home-hero {grid-template-columns:1fr;gap:2.5rem;padding:3rem 0 4rem;text-align:center;}
  .teahub-home-copy {text-align:center;}
  .teahub-home-brand {margin-bottom:2rem;font-size:clamp(2rem,8vw,2.7rem);}
  .teahub-home-equation {justify-content:center;width:100%;font-size:clamp(2.7rem,12.5vw,4.3rem);}
  .teahub-home-cup {grid-row:2;width:min(68vw,15rem);font-size:clamp(6rem,25vw,9rem);}
}

/* Logged-in home: upstream dashboard with a minimal Tea action. */
.teahub-dashboard-layout {align-items:flex-start;gap:1.5rem;}
.teahub-chat-form {margin-bottom:.55rem;}
.teahub-codex-row {display:flex;align-items:center;gap:.5rem;min-height:1.8rem;margin-bottom:1.25rem;font-size:.8rem;}
.teahub-codex-row .button {margin:0!important;}
#teahub-codex-code {color:var(--color-text-light-2);}
.teahub-chat-thread {margin-bottom:1rem;}
.teahub-chat-user {margin:.45rem 0;color:var(--color-text-light-2);font-size:.88rem;}
.teahub-chat-agent {padding:.55rem 0 1rem;border-bottom:1px solid var(--color-secondary);}
.teahub-chat-agent details {margin-bottom:.6rem;color:var(--color-text-light-2);font-size:.8rem;}
.teahub-chat-agent summary {cursor:pointer;}
.teahub-chat-stream {margin-top:.5rem;white-space:pre-wrap;}
.teahub-chat-chunk + .teahub-chat-chunk {margin-top:.35rem;}
.teahub-chat-answer {white-space:pre-wrap;color:var(--color-text);}
.teahub-chat-actions {margin-top:.55rem;font-size:.8rem;}
.teahub-chat-form .ui.action.input > input {font-size:1rem;}
.teahub-dashboard-sidebar {display:grid;gap:1rem;}
.teahub-sidebar-block {min-width:0;}
.teahub-sidebar-heatmap .ui.segment,.teahub-sidebar-repos .ui.segment {margin:0;}
.teahub-sidebar-repos #dashboard-repo-list {width:100%;}

/* Teahub should not send users to upstream Gitea help. */
a.item[href="https://docs.gitea.com"] {display:none!important;}

@media (max-width:767px) {
  .teahub-home {min-height:auto;padding:3rem 1rem;}
  .teahub-home-equation {font-size:clamp(2.35rem,12vw,4rem);}
}

.teahub-codex-code-wrap{display:inline-flex;align-items:center;gap:.35rem}
.teahub-codex-code-wrap[hidden]{display:none}
.teahub-codex-code-wrap code{font-size:.9em;letter-spacing:.04em;user-select:all}
