:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #203a33;
  background: #f6f8f7;
  font-size: 16px;
  font-synthesis: none;
  --ink: #17392e;
  --muted: #687a73;
  --line: #e1e8e4;
  --green: #1f654a;
  --lime: #d8f182;
  --panel: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button {
  border: 0;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #579c72;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-weight: 500;
  letter-spacing: -1.3px;
  font-size: 2.55rem;
  line-height: 1.18;
  margin-bottom: 14px;
}
h2 {
  font-size: 1.4rem;
  letter-spacing: -0.4px;
  line-height: 1.35;
  font-weight: 550;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
}
p {
  line-height: 1.65;
}
small {
  font-size: 0.8rem;
}
svg {
  vertical-align: middle;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: #122923;
  color: #dfe9e2;
  padding: 34px 20px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.37rem;
  font-weight: 550;
  letter-spacing: 1px;
  padding-left: 10px;
}
.brand small {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 1.8px;
  margin-top: 6px;
  color: #9cad9f;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid #73846b;
  border-radius: 13px;
  font-family: Georgia, serif;
  letter-spacing: -3px;
  font-size: 2rem;
  line-height: 1;
  padding: 0 8px 8px;
  color: var(--lime);
}
.new-button {
  background: var(--lime);
  color: #193126;
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  border-radius: 7px;
  margin: 40px 0 24px;
  font-size: 0.9rem;
  font-weight: 600;
}
.new-button span {
  font-size: 1.35rem;
}
.sidebar nav > a {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #aebeb5;
  font-size: 0.89rem;
  padding: 13px 12px;
  border-radius: 6px;
  margin-bottom: 5px;
}
.sidebar nav > a.active {
  color: #f5faf3;
  background: #284036;
}
.sidebar nav > a:hover {
  background: #203a2e;
  color: white;
}
.sidebar nav > a > span:first-child {
  font-size: 1.3rem;
  width: 21px;
  text-align: center;
  line-height: 1;
}
.nav-label {
  font-size: 0.62rem;
  letter-spacing: 1.6px;
  color: #85998b;
  margin: 40px 12px 14px;
}
.nav-count {
  font-size: 0.7rem;
  background: #3a5044;
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: auto;
}
.nav-count:empty {
  display: none;
}
.sidebar-note {
  margin-top: auto;
  padding: 60px 12px 30px;
}
.sidebar-note p {
  font-family: Georgia, serif;
  font-size: 1.22rem;
  line-height: 1.45;
  color: #d5e6d7;
  margin: 17px 0 8px;
}
.sidebar-note small {
  font-size: 0.72rem;
  color: #91a597;
  line-height: 1.5;
}
.tiny-line {
  display: block;
  width: 28px;
  height: 2px;
  background: #a2b968;
}
.account {
  border-top: 1px solid #31453b;
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  background: none;
  text-align: left;
  padding: 22px 6px 0;
  width: 100%;
  font-size: 0.8rem;
}
.avatar {
  height: 33px;
  width: 33px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #425a48;
  color: #ebf7ce;
}
.account small {
  display: block;
  color: #93a697;
  font-size: 0.625rem;
  margin-top: 6px;
}
.account > span:last-child {
  margin-left: auto;
}
.main-wrap {
  margin-left: 248px;
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 82px;
  border-bottom: 1px solid var(--line);
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  gap: 16px;
  background: #fcfdfc;
}
.workspace-dot {
  display: inline-block;
  border: 1px solid #87a893;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
}
.slash {
  color: #bcc7c0;
  margin: 0 13px;
}
.top-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.mode-badge {
  font-size: 0.68rem;
  background: #edf2eb;
  padding: 6px 10px;
  border-radius: 5px;
  color: #5e735f;
  white-space: nowrap;
}
.text-button {
  background: none;
  color: var(--green);
  font-size: 0.82rem;
  padding: 7px 0;
}
.text-button:hover {
  text-decoration: underline;
}
main {
  max-width: 1360px;
  margin: auto;
  padding: 49px 48px 56px;
  min-height: calc(100vh - 145px);
}
.eyebrow {
  font-size: 0.67rem;
  letter-spacing: 1.8px;
  color: #6e8177;
  font-weight: 650;
  margin-bottom: 16px;
}
.page-intro {
  margin-bottom: 32px;
}
.page-intro p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 620px;
  margin-bottom: 0;
}
.welcome-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: #60786b;
  font-size: 0.8rem;
}
.welcome-line span {
  width: 21px;
  height: 1px;
  background: #9aaf9b;
}
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 26px;
  align-items: start;
}
.composer,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.composer {
  overflow: hidden;
  box-shadow: 0 5px 24px #203e2810;
}
.composer-heading {
  padding: 25px 27px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.composer-heading h2 {
  margin: 0;
  font-size: 1.18rem;
}
.step-label {
  font-size: 0.7rem;
  color: var(--muted);
}
.input-tabs {
  display: flex;
  gap: 24px;
  margin: 24px 27px 0;
  border-bottom: 1px solid var(--line);
}
.input-tabs button {
  background: none;
  color: #7b8b80;
  font-size: 0.82rem;
  padding: 0 0 13px;
  border-bottom: 2px solid transparent;
}
.input-tabs button.selected {
  color: var(--ink);
  border-color: var(--green);
  font-weight: 600;
}
.composer-body {
  padding: 23px 27px;
}
.field-label {
  font-size: 0.85rem;
  font-weight: 550;
  color: #344f41;
}
.hint {
  font-size: 0.78rem;
  color: #7b8a82;
  line-height: 1.55;
  margin: 9px 0 18px;
}
.composer textarea {
  padding: 0;
  border: 0;
  resize: vertical;
  min-height: 155px;
  line-height: 1.85;
  font-size: 1rem;
  background: transparent;
  box-shadow: none;
}
.composer textarea::placeholder {
  color: #9aa79f;
}
.composer textarea:focus {
  outline: 0;
}
.input-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #8d9b92;
  font-size: 0.7rem;
  margin-top: 14px;
}
.composer-actions {
  padding: 18px 27px;
  background: #fbfcfa;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.privacy {
  font-size: 0.7rem;
  color: #819183;
  display: flex;
  gap: 7px;
  align-items: center;
}
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 13px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 550;
  line-height: 1.3;
}
.primary {
  background: #245f47;
  color: white;
}
.primary:hover {
  background: #184e38;
}
.secondary {
  background: #fff;
  border: 1px solid #d9e3db;
  color: #385644;
}
.secondary:hover {
  background: #edf4ee;
}
.danger {
  background: #9e3436;
  color: white;
}
.full {
  width: 100%;
}
.support-panel {
  padding: 25px 21px;
  background: #edf2ec;
  border: 1px solid #e2e9de;
  border-radius: 10px;
}
.support-icon {
  width: 34px;
  height: 34px;
  background: #dce9d4;
  color: #567044;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.1rem;
  margin-bottom: 23px;
}
.support-panel h3 {
  font-family: Georgia, serif;
  font-size: 1.24rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 13px;
}
.support-panel p {
  font-size: 0.8rem;
  color: #6b7c69;
  line-height: 1.7;
  margin-bottom: 24px;
}
.support-steps {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.support-step {
  display: flex;
  gap: 13px;
  font-size: 0.76rem;
  color: #425d43;
  align-items: center;
}
.support-step > span {
  font-family: Georgia, serif;
  font-size: 0.75rem;
  border: 1px solid #c7d6be;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.help-note {
  font-size: 0.7rem;
  line-height: 1.7;
  color: #82907f;
  margin: 18px 9px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 34px 0 17px;
}
.section-head h2 {
  font-size: 0.98rem;
  margin: 0;
}
.section-head span {
  font-size: 0.7rem;
  color: #839084;
}
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.scenario {
  padding: 20px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  position: relative;
  color: #365340;
}
.scenario:hover {
  border-color: #9bb69d;
  transform: translateY(-2px);
}
.scenario .scenario-icon {
  font-size: 1.15rem;
  display: block;
  margin-bottom: 15px;
  color: #688766;
}
.scenario strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 550;
  margin-bottom: 7px;
}
.scenario p {
  font-size: 0.72rem;
  line-height: 1.65;
  color: #7c897f;
  margin-bottom: 0;
}
.scenario .arrow {
  position: absolute;
  right: 17px;
  top: 22px;
  color: #9cad9f;
}
.recent-empty {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 21px 22px;
  border: 1px dashed #d6e0d7;
  border-radius: 8px;
  background: #fafcf9;
}
.recent-empty > span {
  font-size: 1.5rem;
  color: #90a389;
}
.recent-empty p {
  font-size: 0.79rem;
  color: #7a8b7b;
  margin: 0;
  line-height: 1.6;
}
.recent-empty strong {
  display: block;
  color: #4c6350;
  font-size: 0.82rem;
  font-weight: 500;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 19px 0 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.82rem;
  color: #49624f;
  font-weight: 500;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d8e1da;
  border-radius: 6px;
  background: #fff;
  color: #2b4837;
  padding: 12px 13px;
  font-size: 0.89rem;
}
textarea {
  min-height: 105px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a3bd96;
  outline-offset: 1px;
}
.wide-field {
  grid-column: 1/-1;
}
.context-summary {
  background: #f2f6f0;
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #62725e;
  line-height: 1.6;
  max-height: 100px;
  overflow: auto;
}
.form-error {
  color: #a63b3b;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 12px 0 0;
}
.form-error:empty {
  display: none;
}
.demo-note {
  border: 1px solid #e4dfbf;
  background: #fbfaed;
  color: #797045;
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 0.76rem;
  line-height: 1.6;
  margin-bottom: 22px;
}
.analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}
.analysis-layout .panel {
  padding: 26px;
  margin-bottom: 20px;
}
.analysis-layout .panel h2 {
  font-size: 1.1rem;
}
.analysis-layout .panel p {
  font-size: 0.88rem;
  color: #66796b;
}
.action-panel {
  background: #163c2c !important;
  color: white;
  border: 0 !important;
}
.action-panel .eyebrow {
  color: #b0d395;
}
.action-panel h2 {
  font-size: 1.45rem !important;
  color: #f0f9e9;
}
.action-panel p {
  color: #bfcebd !important;
}
.action-panel ol {
  padding-left: 21px;
  margin-bottom: 0;
}
.action-panel li {
  padding-left: 7px;
  margin-top: 15px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #e0ecdc;
}
.quote {
  font-family: Georgia, serif;
  font-size: 1.17rem !important;
  line-height: 1.75 !important;
  color: #2f5838 !important;
  background: #f1f5ec;
  border-left: 3px solid #9cb779;
  padding: 20px 22px;
  margin: 14px 0 6px;
  border-radius: 0 5px 5px 0;
  white-space: pre-wrap;
}
.signal {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.signal:last-child {
  padding-bottom: 0;
}
.signal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.signal-head h3 {
  margin: 0;
  text-transform: capitalize;
}
.confidence {
  font-size: 0.65rem;
  color: #7a897b;
  white-space: nowrap;
}
.signal p {
  margin: 0 0 10px;
}
.evidence {
  font-size: 0.72rem;
  color: #7c8b79;
  border-left: 2px solid #d2dfc6;
  padding-left: 11px;
  line-height: 1.65;
}
.meta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: #86907e;
  font-size: 0.73rem;
  margin: 12px 0 26px;
}
.tag {
  display: inline-block;
  background: #eef3e9;
  color: #5f7651;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 0.7rem;
}
.avoid-list {
  padding-left: 17px;
  color: #8a6954;
  font-size: 0.84rem;
  line-height: 1.7;
}
.avoid-list li {
  margin-top: 10px;
}
.outcome-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.status-badge {
  background: #e5efe0;
  color: #577749;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.7rem;
  text-transform: capitalize;
}
.status-badge.worse {
  background: #f7e7e3;
  color: #a25143;
}
.status-badge.unresolved,
.status-badge.unchanged {
  background: #f4eedf;
  color: #8a7750;
}
.history-tools {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.history-tools input {
  max-width: 390px;
}
.history-tools select {
  width: auto;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 23px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.history-item:hover {
  border-color: #99b28d;
}
.history-item h3 {
  margin: 8px 0;
  line-height: 1.5;
}
.history-item .meta-row {
  margin: 0;
}
.history-item .arrow {
  color: #789868;
  font-size: 1.3rem;
}
.history-item > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.empty-panel {
  padding: 45px 25px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.empty-panel h2 {
  font-family: Georgia, serif;
  font-size: 1.5rem;
}
.empty-panel p {
  color: #7c8b7a;
  font-size: 0.88rem;
  margin-bottom: 23px;
}
.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 26px 0;
}
.stat {
  padding: 25px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}
.stat span {
  font-size: 0.78rem;
  color: #7f8c7b;
}
.stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 500;
  margin: 14px 0;
}
.stat small {
  color: #8a9785;
  font-size: 0.7rem;
}
.plain-panel {
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 22px;
}
.plain-panel p {
  font-size: 0.86rem;
  color: #70816e;
}
.plain-panel h2 {
  font-size: 1.1rem;
}
.plain-panel code {
  font-size: 0.82rem;
}
.plain-panel form {
  max-width: 620px;
}
.key-form {
  display: flex;
  gap: 12px;
}
.key-list {
  margin-top: 22px;
}
.key-row {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.key-row strong {
  font-size: 0.87rem;
  font-weight: 500;
}
.key-row p {
  font-size: 0.73rem;
  margin: 6px 0 0;
}
.secret {
  margin-top: 17px;
  padding: 20px;
  background: #f0f7e9;
  border: 1px solid #c8dab7;
  border-radius: 7px;
  overflow-wrap: anywhere;
}
.secret code {
  display: block;
  margin: 13px 0;
  font-size: 0.78rem;
}
.secret p {
  margin: 0;
  font-size: 0.8rem;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 22px;
  background: #132d23;
  color: #dbe9cd;
  border-radius: 7px;
  font-size: 0.76rem;
  line-height: 1.85;
  overflow: auto;
}
.endpoints {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.endpoints td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.endpoints td:first-child {
  color: #335d3e;
  font-family: monospace;
  width: 47%;
}
.trajectory {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 0.73rem;
  margin: 17px 0 25px;
}
.trajectory span {
  background: #edf3e8;
  padding: 8px;
  border-radius: 5px;
}
.timeline-note {
  display: flex;
  gap: 15px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-note p {
  margin: 5px 0;
  color: #798a74;
  font-size: 0.86rem;
}
.timeline-note h3 {
  margin: 0;
  font-size: 0.91rem;
}
.timeline-note > span {
  font-size: 1.2rem;
  color: #769b5b;
}
.timeline-note small {
  font-size: 0.7rem;
  color: #91a187;
}
footer {
  padding: 0 48px 24px;
  color: #99a494;
  font-size: 0.67rem;
  text-align: center;
}
dialog {
  border: 1px solid #dae3d5;
  border-radius: 13px;
  padding: 35px;
  width: 460px;
  max-width: calc(100vw - 30px);
  color: var(--ink);
  box-shadow: 0 24px 100px #09291940;
}
dialog::backdrop {
  background: #0c261ea8;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 13px;
}
dialog p {
  font-size: 0.85rem;
  color: #82927b;
}
dialog label {
  margin-bottom: 17px;
}
.dialog-close {
  position: absolute;
  right: 17px;
  top: 11px;
  background: none;
  color: #7f9077;
  font-size: 1.5rem;
}
.auth-switch {
  display: block;
  margin: 14px auto 0;
}
.auth-switch:hover {
  color: #17392e;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #173b2b;
  color: #f0f8e7;
  padding: 14px 25px;
  font-size: 0.85rem;
  border-radius: 8px;
  box-shadow: 0 5px 20px #18332230;
  z-index: 20;
  max-width: 90vw;
}
.loading-state {
  text-align: center;
  padding: 70px 20px;
}
.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 2px solid #dfe9d8;
  border-top-color: #396b43;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 23px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading-state p {
  font-size: 0.85rem;
  color: #7a8d73;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  main {
    padding-top: 65px;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1fr) 295px;
    gap: 32px;
  }
  .composer-body {
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .composer textarea {
    min-height: 185px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 220px;
    padding: 28px 16px 18px;
  }
  .main-wrap {
    margin-left: 220px;
  }
  .topbar {
    padding: 0 30px;
  }
  main {
    padding: 38px 30px;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .right-rail {
    display: none;
  }
  h1 {
    font-size: 2.2rem;
  }
  .analysis-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .analysis-layout .panel {
    padding: 22px;
  }
  .topbar {
    font-size: 0.73rem;
  }
}
@media (max-width: 900px) {
  .analysis-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    width: 190px;
    padding: 28px 12px 18px;
  }
  .main-wrap {
    margin-left: 190px;
  }
  .brand {
    font-size: 1.15rem;
    gap: 8px;
  }
  .brand small {
    font-size: 0.5rem;
  }
  .sidebar nav > a {
    font-size: 0.79rem;
    gap: 9px;
  }
  .sidebar-note {
    padding-left: 10px;
  }
  .sidebar-note p {
    font-size: 1.1rem;
  }
  .new-button {
    font-size: 0.8rem;
  }
  .topbar {
    padding: 0 24px;
  }
  .topbar > div:first-child {
    max-width: 140px;
    line-height: 1.7;
  }
  .slash {
    margin: 0 7px;
  }
  main {
    padding: 32px 24px;
  }
  .scenario-grid {
    grid-template-columns: 1fr;
  }
  .scenario {
    padding: 16px 18px;
  }
  .scenario .scenario-icon {
    float: left;
    width: 25px;
    margin: 2px 13px 0 0;
  }
  .scenario strong {
    margin-left: 38px;
  }
  .scenario p {
    margin-left: 38px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 19px;
  }
  .stat span {
    font-size: 0.72rem;
  }
  .stat small {
    font-size: 0.65rem;
  }
}
@media (max-width: 660px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 17px 18px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
  }
  .brand {
    padding: 0;
    font-size: 1.15rem;
  }
  .brand small {
    font-size: 0.51rem;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 1.7rem;
    padding-left: 6px;
    border-radius: 10px;
  }
  .new-button {
    margin: 0;
    padding: 7px 13px;
    font-size: 0.73rem;
  }
  .new-button span {
    font-size: 1rem;
  }
  .sidebar nav {
    grid-column: 1/-1;
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin: 0 -18px;
    padding: 0 14px 6px;
  }
  .sidebar nav > a {
    white-space: nowrap;
    font-size: 0.76rem;
    padding: 10px;
  }
  .sidebar nav > a > span:first-child,
  .nav-label,
  .sidebar-note,
  .account {
    display: none;
  }
  .main-wrap {
    margin: 0;
  }
  .topbar {
    height: 57px;
    padding: 0 21px;
    font-size: 0.65rem;
  }
  .topbar > div:first-child {
    max-width: none;
  }
  .top-actions {
    gap: 14px;
  }
  .mode-badge {
    font-size: 0.6rem;
  }
  .topbar .text-button {
    font-size: 0.72rem;
  }
  .topbar .slash,
  #page-name {
    display: none;
  }
  main {
    padding: 31px 20px 35px;
    min-height: 60vh;
  }
  .welcome-line {
    font-size: 0.74rem;
    margin-bottom: 19px;
  }
  h1 {
    font-size: 2rem;
    letter-spacing: -0.8px;
  }
  .page-intro {
    margin-bottom: 25px;
  }
  .page-intro p {
    font-size: 0.87rem;
  }
  .composer-heading {
    padding: 22px 19px 0;
  }
  .composer-heading h2 {
    font-size: 1.06rem;
  }
  .composer-body {
    padding: 21px 19px;
  }
  .input-tabs {
    margin: 22px 19px 0;
    gap: 20px;
  }
  .input-tabs button {
    font-size: 0.76rem;
  }
  .composer textarea {
    font-size: 0.91rem;
    min-height: 155px;
  }
  .composer-actions {
    padding: 16px 19px;
  }
  .privacy {
    font-size: 0.63rem;
    max-width: 125px;
    line-height: 1.5;
  }
  .primary,
  .secondary,
  .danger {
    font-size: 0.77rem;
    padding: 12px 17px;
    gap: 9px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide-field {
    grid-column: 1;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 17px 20px;
    flex-wrap: wrap;
  }
  .stat strong {
    font-size: 1.5rem;
    margin: 0;
  }
  .stat small {
    margin-left: auto;
  }
  .plain-panel {
    padding: 21px;
  }
  .history-tools {
    flex-direction: column;
  }
  .history-tools select {
    width: 100%;
  }
  .history-item {
    padding: 18px;
  }
  .history-item h3 {
    font-size: 0.89rem;
  }
  .key-form {
    flex-direction: column;
  }
  .endpoints td {
    display: block;
    width: 100% !important;
    padding-bottom: 5px;
  }
  .endpoints td + td {
    padding-top: 0;
    padding-bottom: 12px;
  }
  .key-row {
    align-items: start;
  }
  .analysis-layout .panel {
    padding: 21px;
  }
  .quote {
    font-size: 1.08rem !important;
    padding: 16px 18px;
  }
  footer {
    font-size: 0.62rem;
    line-height: 1.6;
    padding: 0 25px 20px;
  }
  .confidence {
    font-size: 0.59rem;
  }
  .signal-head {
    align-items: flex-start;
  }
  .signal-head h3 {
    font-size: 0.92rem;
  }
  .section-head span {
    font-size: 0.65rem;
  }
  dialog {
    padding: 30px 25px;
  }
  dialog h2 {
    font-size: 1.65rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Comfortable reading sizes, including compact and mobile layouts. */
.brand small {
  font-size: 0.75rem;
  letter-spacing: 0.65px;
}
.nav-label,
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 1.2px;
}
.sidebar-note small,
.account small,
.mode-badge,
.step-label,
.privacy,
.input-bottom,
.help-note,
.confidence,
.meta-row,
.tag,
.status-badge,
.evidence,
.section-head span,
.key-row p,
.timeline-note small,
.stat small,
footer {
  font-size: 0.75rem;
}
.topbar,
.text-button,
.input-tabs button,
label,
.field-label,
.support-step,
.scenario strong,
.scenario p,
.recent-empty strong,
.recent-empty p,
.hint,
.history-tools,
.key-row strong,
.endpoints {
  font-size: 0.875rem;
}
.page-intro p,
.analysis-layout .panel p,
.plain-panel p {
  font-size: 1rem;
}
.support-panel p {
  font-size: 0.875rem;
}
.sidebar-note p {
  font-size: 1.2rem;
}
.stat span {
  font-size: 0.875rem;
}
.scenario p {
  line-height: 1.55;
}
.analysis-layout .panel .hint {
  font-size: 0.875rem;
}
.analysis-layout .panel .quote {
  font-size: 1.17rem;
}
.brand {
  min-width: 0;
}
.brand small {
  white-space: nowrap;
}
.sidebar nav {
  min-width: 0;
}
@media (max-width: 900px) {
  .brand small {
    font-size: 0.75rem;
    letter-spacing: 0;
  }
  .brand {
    gap: 7px;
    padding-left: 2px;
  }
  .brand-mark {
    width: 35px;
    flex-shrink: 0;
  }
  .topbar {
    font-size: 0.75rem;
  }
  .topbar > div:first-child {
    max-width: 160px;
  }
  .sidebar nav > a {
    font-size: 0.875rem;
    gap: 8px;
  }
  .sidebar nav > a > span:first-child {
    width: 17px;
  }
  .sidebar-note small {
    font-size: 0.75rem;
  }
  .account small {
    line-height: 1.6;
  }
  .account {
    align-items: start;
  }
  .account > span:last-child {
    display: none;
  }
  .confidence {
    white-space: normal;
    text-align: right;
  }
  .stats .stat span {
    font-size: 0.875rem;
  }
}
@media (max-width: 660px) {
  .sidebar {
    gap: 16px;
  }
  .sidebar nav > a {
    font-size: 0.875rem;
    padding: 9px;
  }
  .topbar > div:first-child {
    max-width: none;
    font-size: 0.75rem;
  }
  .topbar .text-button,
  .mode-badge {
    font-size: 0.75rem;
  }
  .primary,
  .secondary,
  .danger,
  .new-button {
    font-size: 0.875rem;
  }
  .composer-actions {
    align-items: center;
  }
  .privacy {
    max-width: 132px;
  }
  .section-head {
    gap: 14px;
  }
  .section-head span {
    text-align: right;
  }
  .input-tabs {
    gap: 16px;
  }
  .input-tabs button {
    font-size: 0.875rem;
  }
  .composer textarea {
    font-size: 1rem;
  }
  .page-intro p {
    font-size: 1rem;
  }
  .scenario p {
    font-size: 0.875rem;
  }
  .confidence {
    font-size: 0.75rem;
  }
  .endpoints td {
    overflow-wrap: anywhere;
  }
  .meta-row {
    font-size: 0.75rem;
  }
}

/* Explicit language controls remain available before and after sign-in. */
.language-control {
  display: inline-flex;
  flex-shrink: 0;
  margin: 0;
}
.language-control select {
  width: auto;
  min-width: 105px;
  margin: 0;
  padding: 7px 26px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  cursor: pointer;
}
.auth-language {
  margin-bottom: 24px;
}
html:lang(zh-CN) {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    sans-serif;
}
html:lang(zh-CN) h1,
html:lang(zh-CN) h2,
html:lang(zh-CN) h3 {
  letter-spacing: 0;
  line-height: 1.5;
}
html:lang(zh-CN) .eyebrow,
html:lang(zh-CN) .nav-label,
html:lang(zh-CN) .section-head > span {
  letter-spacing: 0.08em;
}
html:lang(zh-CN) .sidebar-note,
html:lang(zh-CN) .support-panel h3,
html:lang(zh-CN) .quote {
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
}
html:lang(zh-CN) .input-tabs button {
  white-space: nowrap;
}
@media (max-width: 900px) {
  .top-actions {
    gap: 10px;
  }
}
@media (max-width: 660px) {
  .topbar {
    height: auto;
    min-height: 72px;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .top-actions {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }
  .language-control select {
    min-width: 100px;
    font-size: 0.8rem;
  }
  html:lang(zh-CN) .privacy {
    max-width: none;
  }
}

/* Continued coaching, deliberate context sharing, and private workspace tools. */
.draft-notice,
.follow-up-panel {
  background: #eef3ec;
  border: 1px solid #d1ddd1;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 24px;
}
.draft-notice p {
  margin: 8px 0 16px;
}
.check-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
}
.check-line input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 3px 0 0;
  accent-color: var(--green);
}
.check-line small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}
.draft-toggle {
  margin-bottom: 18px;
  font-size: 0.86rem;
}
.conversation-preview {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.conversation-preview .section-head {
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.conversation-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr) 24px;
  align-items: start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.conversation-row textarea {
  min-height: 88px;
  height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.conversation-row input {
  width: 100%;
}
.context-extra {
  margin-top: 20px;
}
.history-picker {
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 8px;
  max-height: 310px;
  overflow-y: auto;
  margin-top: 18px;
}
.history-picker legend {
  font-weight: 600;
  padding: 0 6px;
}
.history-picker label {
  margin: 14px 0;
}
.follow-up-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.follow-up-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 9px;
  position: relative;
  text-decoration: none;
}
.follow-up-card h3 {
  margin: 14px 0 8px;
  font-size: 1rem;
}
.follow-up-card p {
  font-size: 0.875rem;
  color: var(--muted);
  padding-right: 20px;
}
.follow-up-card .arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
}
#action-form label,
#person-form label,
#forgot-form label,
#reset-form label {
  margin: 18px 0;
}
#action-form textarea {
  min-height: 95px;
}
.coaching-controls {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.coaching-controls[disabled] {
  opacity: 0.65;
}
.rewrite-buttons {
  flex-wrap: wrap;
  margin: 18px 0;
}
.coaching-panel .form-grid {
  margin: 20px 0;
}
#coaching-form textarea,
#practice-form textarea {
  min-height: 108px;
}
#coaching-form button,
#practice-form button {
  margin-top: 12px;
}
.practice-section {
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.practice-section summary,
.coaching-message summary {
  cursor: pointer;
  font-weight: 600;
}
.practice-section label {
  margin: 16px 0;
}
.translation-controls {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.translation-controls label {
  margin: 0;
  flex: 1;
}
.translation-controls button {
  margin-bottom: 0;
}
.coaching-message {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  overflow-wrap: anywhere;
}
.coaching-message:last-child {
  padding-bottom: 0;
}
.coaching-message .quote {
  font-size: 1.15rem;
  margin: 14px 0;
}
.coaching-message li {
  margin-bottom: 8px;
}
.your-message {
  background: #f3f1eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 14px 0;
}
.your-message small {
  color: var(--muted);
}
.your-message p,
.practice-prompt p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}
.model-content {
  white-space: pre-wrap;
}
.practice-prompt {
  border-left: 3px solid #a4bca4;
  padding: 14px 18px;
  margin: 20px 0;
  background: #f3f7f1;
}
.translation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.translation-grid > div {
  min-width: 0;
}
.translation-grid small {
  color: var(--muted);
}
.people-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: start;
}
.people-layout .plain-panel {
  margin: 0;
}
.person-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.person-card div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.person-card h3,
.person-card p {
  margin: 0;
}
.person-card p {
  margin-top: 6px;
  color: var(--muted);
}
.person-card .avatar {
  flex-shrink: 0;
}
.person-timeline-entry {
  border-bottom: 1px solid var(--line);
}
.person-timeline-entry .history-item {
  border: 0;
}
.person-timeline-entry > p {
  padding: 0 20px 18px;
}
.danger-link {
  margin-top: 24px;
  color: #983e36;
}
.adoption-stats .stat small {
  line-height: 1.6;
}
#recovery-secret .secret code {
  display: block;
  overflow-wrap: anywhere;
  margin: 16px 0;
}
#recovery-secret button {
  margin: 8px 8px 0 0;
}
.budget-note {
  padding: 8px 12px;
  border-radius: 6px;
  background: #f3f1eb;
  display: inline-block;
}
@media (max-width: 1000px) {
  .people-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 660px) {
  .conversation-row {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 8px;
  }
  .conversation-row label:first-child {
    grid-column: 1;
  }
  .conversation-row label:nth-child(2) {
    grid-column: 1;
  }
  .conversation-row button {
    grid-column: 2;
    grid-row: 1;
  }
  .translation-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .translation-grid > div + div {
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .draft-notice,
  .follow-up-panel {
    padding: 16px;
  }
  .people-layout .section-head {
    flex-wrap: wrap;
  }
  .rewrite-buttons {
    gap: 8px;
  }
}

.selected-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: -12px 0 24px;
  font-size: 0.85rem;
  color: var(--muted);
}
.selected-context .tag {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
