:root {
  color-scheme: light;
  --blue-900: #050505;
  --blue-800: #050505;
  --blue-700: #202020;
  --blue-100: #f2f2f2;
  --blue-050: #fafafa;
  --ink: #111111;
  --muted: #666666;
  --line: #e7e7e7;
  --panel: #ffffff;
  --soft: #f6f6f6;
  --success: #0f8f5b;
  --warning: #a05f00;
  --danger: #c64040;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --site-footer-height: 38px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding-bottom: var(--site-footer-height);
  background: #f7f7f7;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: grid;
  min-height: var(--site-footer-height);
  place-items: center;
  padding: 6px 16px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
  backdrop-filter: blur(14px);
}

.site-footer a {
  color: #333333;
  text-decoration: none;
}

.site-footer a:hover {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 18px;
  min-height: 96px;
  padding: 0 40px;
  border-bottom: 1px solid #eeeeee;
  background: #ffffff;
  color: #111111;
  box-shadow: none;
}

.topbar:not(.has-primary-nav) {
  grid-template-columns: auto 1fr auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #000000;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  display: block;
  width: 40px;
  height: 12px;
  content: "";
  border-radius: 0;
  background: #000000;
  transform: skewX(-34deg);
}

.brand-mark::before {
  top: 6px;
  left: 4px;
}

.brand-mark::after {
  right: 4px;
  bottom: 6px;
}

.brand-mark span {
  display: none;
}

.brand-text {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-nav[hidden] {
  display: none;
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.nav-link,
.login-button,
.topic-button,
.advanced-button,
.icon-button,
.auth-tab,
.auth-submit,
.content-action,
.tool-button,
.secondary-item {
  border: 0;
  border-radius: 8px;
}

.nav-link {
  min-height: 46px;
  padding: 0 18px;
  background: transparent;
  color: #171717;
  font-size: 17px;
  font-weight: 520;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  background: #f2f2f2;
  color: #000000;
}

.search-shell {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto auto;
  align-items: center;
  min-height: 52px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.topic-button,
.advanced-button,
.search-shell input,
.search-shell .icon-button {
  height: 52px;
  color: #fff;
}

.topic-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
}

.topic-button svg {
  width: 17px;
  height: 17px;
}

.search-shell input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-shell input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.advanced-button {
  padding: 0 12px;
  background: transparent;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: transparent;
  color: currentColor;
}

.icon-button svg,
.mobile-menu-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.login-button {
  min-width: 148px;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid #000000;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-weight: 700;
}

.login-button:hover {
  background: #202020;
}

.account-shell {
  position: relative;
  justify-self: end;
}

.account-menu[hidden] {
  display: none;
}

.account-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  display: grid;
  width: min(300px, calc(100vw - 32px));
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.account-menu::before {
  position: absolute;
  top: -7px;
  right: 28px;
  width: 12px;
  height: 12px;
  content: "";
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #ffffff;
  transform: rotate(45deg);
}

.account-menu-head {
  display: grid;
  gap: 6px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
}

.account-menu-head strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-head span {
  color: var(--muted);
  font-size: 12px;
}

.account-menu button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #222222;
  font-weight: 720;
  text-align: left;
  padding: 0 12px;
}

.account-menu button:hover {
  background: #f4f4f4;
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: #111111;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 96px - var(--site-footer-height));
}

.layout.is-home {
  grid-template-columns: 1fr;
}

.sidebar[hidden] {
  display: none;
}

.sidebar {
  position: sticky;
  top: 96px;
  height: calc(100vh - 96px - var(--site-footer-height));
  padding: 22px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 12px;
  color: var(--muted);
}

.sidebar-head p {
  margin: 0;
  font-size: 13px;
  font-weight: 760;
}

.icon-button.soft {
  color: #303030;
  background: #f3f3f3;
}

.secondary-nav {
  display: grid;
  gap: 8px;
}

.secondary-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  background: transparent;
  color: #2b3442;
  text-align: left;
  font-size: 20px;
  font-weight: 680;
}

.secondary-item svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.secondary-item.is-active {
  background: #f1f1f1;
  color: var(--blue-800);
}

.secondary-item:hover {
  background: #f6f6f6;
}

.content {
  min-width: 0;
  padding: 32px 32px calc(32px + var(--site-footer-height));
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.section-hero {
  display: grid;
  gap: 20px;
  min-height: 320px;
  padding: 36px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.home-grid {
  grid-template-columns: minmax(0, 1fr);
}

.home-feed-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.home-hot-card,
.home-feed-main {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.home-hot-card {
  position: sticky;
  top: 128px;
  padding: 18px;
}

.home-hot-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.home-hot-card-head span {
  color: #111111;
  font-size: 18px;
  font-weight: 820;
}

.home-hot-card-head strong {
  color: #666666;
  font-size: 12px;
}

.home-hot-list {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.home-hot-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
}

.home-hot-rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.home-hot-list button {
  border: 0;
  background: transparent;
  color: #161616;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
  text-align: left;
}

.home-hot-list button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-hot-list small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.home-feed-main {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.home-feed-header {
  display: grid;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.home-feed-header h1 {
  max-width: 860px;
  margin: 8px 0 10px;
  color: #111111;
  font-size: 36px;
  line-height: 1.14;
  font-weight: 840;
  letter-spacing: 0;
}

.home-feed-header p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.home-feed-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-feed-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #333333;
  font-size: 14px;
  font-weight: 760;
}

.home-feed-tabs button.is-active,
.home-feed-tabs button:hover {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.home-timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.home-timeline::before {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 77px;
  width: 1px;
  content: "";
  background: #dddddd;
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 24px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.timeline-card::before {
  position: absolute;
  top: 28px;
  left: 72px;
  z-index: 1;
  width: 11px;
  height: 11px;
  content: "";
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #111111;
  box-shadow: 0 0 0 1px #111111;
}

.timeline-time {
  padding-top: 20px;
  color: #111111;
  font-size: 14px;
  font-weight: 820;
  text-align: right;
}

.timeline-card-body {
  grid-column: 3;
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  background: #fbfbfb;
}

.timeline-card-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.timeline-card h2 {
  margin: 0;
  color: #111111;
  font-size: 21px;
  line-height: 1.35;
}

.timeline-card p {
  margin: 0;
  color: #4f4f4f;
  line-height: 1.72;
}

.timeline-reason {
  padding: 12px 14px;
  border-left: 3px solid #111111;
  background: #ffffff;
  color: #303030 !important;
  font-size: 14px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-tags span {
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eeeeee;
  color: #222222;
  font-size: 12px;
  font-weight: 760;
}

.home-case-block {
  margin-top: 22px;
}

.home-hero {
  grid-template-columns: minmax(320px, 0.88fr) minmax(340px, 1.12fr);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 20px;
}

.platform-preview {
  overflow: hidden;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.08);
}

.preview-top {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #f6f6f6;
}

.preview-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c8c8c8;
}

.preview-body {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 300px;
}

.preview-rail {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #fafafa;
}

.preview-rail strong {
  margin-bottom: 8px;
  color: var(--blue-800);
}

.preview-rail span {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #506176;
  font-size: 13px;
  font-weight: 760;
}

.preview-rail span.is-on {
  background: var(--blue-100);
  color: var(--blue-800);
}

.preview-main {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.preview-kicker {
  width: max-content;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0f0f0;
  color: var(--blue-800);
  font-size: 12px;
  font-weight: 780;
}

.preview-main h3 {
  margin: 0;
  font-size: 26px;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.preview-metrics span {
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.preview-metrics b {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-800);
  font-size: 24px;
}

.preview-list {
  display: grid;
  gap: 10px;
}

.preview-list div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
}

.preview-list i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111111;
}

.preview-list span {
  overflow: hidden;
  color: #2b3442;
  font-size: 14px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-list em {
  min-width: 40px;
  color: var(--success);
  font-size: 12px;
  font-style: normal;
  font-weight: 780;
  text-align: right;
}

.eyebrow {
  margin: 0;
  color: var(--blue-800);
  font-size: 14px;
  font-weight: 780;
}

.section-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  font-weight: 820;
  letter-spacing: 0;
}

.section-hero p {
  max-width: 720px;
  margin: 0;
  color: #4d5d72;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.content-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: #000000;
  color: #fff;
  font-weight: 720;
}

.content-action.secondary {
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #111111;
}

.stats-panel,
.notice-panel,
.tool-playground,
.auth-card,
.case-card,
.member-card,
.info-panel,
.admin-create-panel,
.admin-table-panel,
.admin-header {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.stat {
  min-height: 120px;
  padding: 22px;
  background: #fff;
}

.stat strong {
  display: block;
  color: var(--blue-800);
  font-size: 32px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 640;
}

.section-block {
  margin-top: 26px;
}

.section-block:first-child {
  margin-top: 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.case-grid,
.tool-grid,
.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.case-card,
.member-card,
.info-panel {
  padding: 22px;
}

.case-showcase {
  display: grid;
  gap: 18px;
}

.case-feature {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 0.52fr);
  gap: 22px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.case-feature.is-reversed {
  grid-template-columns: minmax(0, 0.52fr) minmax(260px, 0.48fr);
}

.case-feature.is-reversed .case-feature-media {
  order: 2;
}

.case-feature-media {
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #f7f7f7;
}

.case-feature-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.case-feature-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 18px 12px;
}

.case-feature-copy h3 {
  margin: 0;
  color: #111111;
  font-size: 28px;
  line-height: 1.22;
}

.case-feature-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.case-card h3,
.member-card h3,
.info-panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.case-card p,
.member-card p,
.info-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.metric-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.metric-list span,
.tool-status,
.auth-badge,
.tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 12px;
  font-weight: 760;
}

.tool-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-card {
  display: grid;
  gap: 16px;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-card h3 {
  margin: 0;
  font-size: 19px;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tool-status {
  justify-self: start;
}

.tool-status.pending {
  background: #fff5df;
  color: var(--warning);
}

.tool-button {
  align-self: end;
  min-height: 40px;
  border: 1px solid #dfdfdf;
  background: #f7f7f7;
  color: var(--blue-800);
  font-weight: 720;
}

.tool-button.danger {
  color: var(--danger);
  background: #fff2f2;
}

.textbook-agent-card {
  min-height: 260px;
}

.textbook-agent-meta,
.textbook-citations,
.textbook-scope-list,
.textbook-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.textbook-agent-meta span,
.textbook-citations span,
.textbook-scope-list span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #333333;
  font-size: 12px;
  font-weight: 700;
}

.textbook-chat-shell {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 188px);
}

.textbook-agent-panel,
.textbook-chat-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.textbook-agent-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
}

.textbook-agent-panel h2,
.textbook-chat-header h2 {
  margin: 0;
  color: #111111;
  font-size: 24px;
  line-height: 1.25;
}

.textbook-agent-panel p,
.textbook-chat-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.textbook-field {
  display: grid;
  gap: 8px;
  color: #333333;
  font-size: 14px;
  font-weight: 720;
}

.textbook-field select {
  min-height: 44px;
  width: 100%;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  padding: 0 12px;
}

.textbook-chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.textbook-chat-header {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.textbook-prompt-row {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.textbook-prompt-row .tool-button {
  min-height: 36px;
  padding: 0 12px;
  text-align: left;
}

.textbook-messages {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 22px;
  background: #f7f7f7;
}

.textbook-message {
  display: grid;
  gap: 8px;
  max-width: 84%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.textbook-message.user {
  justify-self: end;
  background: #111111;
  color: #ffffff;
}

.textbook-message span {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.72;
}

.textbook-message div {
  white-space: pre-line;
  line-height: 1.75;
}

.textbook-message.user .textbook-citations {
  display: none;
}

.textbook-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.textbook-chat-form textarea {
  min-height: 72px;
  resize: vertical;
  border: 1px solid #dddddd;
  border-radius: 8px;
  padding: 12px;
  outline: 0;
}

.textbook-chat-form textarea:focus,
.textbook-field select:focus {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.tool-button:disabled,
.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.official-doc-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.official-doc-panel,
.official-result-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.official-doc-panel h2,
.official-result-panel h2 {
  margin: 0;
  font-size: 22px;
}

.official-doc-panel p,
.official-result-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.official-upload {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px dashed #cfcfcf;
  border-radius: 8px;
  background: #fafafa;
  color: #111111;
  font-weight: 760;
}

.official-upload input {
  width: 100%;
  color: var(--muted);
}

.official-rule-list {
  display: grid;
  gap: 10px;
}

.official-rule-list span {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #2b2b2b;
  background: #fbfbfb;
  font-weight: 680;
}

.official-result-panel {
  margin-top: 18px;
}

.official-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.official-issue-list {
  display: grid;
  gap: 10px;
}

.official-issue-list article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.official-issue-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.official-issue-list strong {
  font-size: 15px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.admin-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.admin-header p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.workspace-header,
.workspace-panel,
.workspace-form,
.workspace-list-panel,
.task-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.workspace-header {
  padding: 28px;
}

.workspace-header h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.1;
}

.workspace-header p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.workspace-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 22px;
}

.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-tabs .tool-button {
  padding: 0 16px;
}

.workspace-tabs .tool-button.is-active {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.workspace-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.workspace-card {
  display: grid;
  min-height: 220px;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.workspace-card h3,
.task-card h3,
.workspace-list-item h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.workspace-card p,
.task-card p,
.workspace-list-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.workspace-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.workspace-tools-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.task-tools-grid {
  align-items: stretch;
}

.workspace-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.task-tool-form {
  min-height: 470px;
  grid-template-rows: auto auto minmax(112px, 1fr) auto auto auto;
  align-content: stretch;
}

.task-tool-form .auth-submit {
  margin-top: auto;
}

#taskForm {
  grid-template-rows: auto auto minmax(112px, 1fr) auto auto;
}

#extractForm {
  grid-template-rows: auto minmax(112px, 1fr) auto minmax(22px, auto) auto auto;
}

.workspace-form h2,
.task-column h2 {
  margin: 0;
  font-size: 21px;
}

.workspace-form input,
.workspace-form textarea,
.task-card select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  outline-color: #111111;
}

.workspace-form textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.workspace-form.compact {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.file-upload-control {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  font-weight: 760;
}

.file-upload-control input {
  width: min(220px, 48vw);
  min-height: auto;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}

.file-upload-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.task-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 320px;
  padding: 18px;
  background: #fbfbfb;
}

.task-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.task-card h3 {
  padding-right: 92px;
}

.task-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  gap: 6px;
}

.task-mini-button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-size: 12px;
  font-weight: 760;
}

.task-mini-button:hover {
  background: #f4f4f4;
}

.task-mini-button.danger {
  border-color: #f0d4d4;
  background: #fff7f7;
  color: var(--danger);
}

.task-mini-button.danger:hover {
  background: #fdecec;
}

.task-source {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.task-source a,
.workspace-list-item a {
  color: #111111;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.workspace-list-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.workspace-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
}

.workspace-list-head h2 {
  margin: 0;
  font-size: 22px;
}

.workspace-list-item {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.workspace-list-item.is-pinned {
  border-color: #bbbbbb;
  background: #ffffff;
}

.workspace-list-item span {
  color: var(--muted);
  font-size: 13px;
}

.bookmark-pin-label {
  justify-self: start;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 760;
}

.bookmark-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.bookmark-manage-actions .tool-button {
  min-height: 36px;
  padding: 0 12px;
}

.workspace-dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px 24px calc(24px + var(--site-footer-height));
}

.workspace-dialog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.36);
  cursor: default;
}

.workspace-edit-dialog {
  position: relative;
  display: grid;
  width: min(100%, 480px);
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.2);
}

.workspace-dialog-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.workspace-dialog-title h2 {
  margin: 0;
  font-size: 24px;
}

.workspace-empty-text {
  margin: 0;
  padding: 18px;
  border: 1px dashed #d2d2d2;
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  align-items: start;
}

.admin-create-panel,
.admin-table-panel {
  padding: 22px;
}

.admin-create-panel {
  display: grid;
  gap: 14px;
}

.admin-create-panel h2 {
  margin: 0;
  font-size: 22px;
}

.admin-create-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 700;
}

.admin-create-panel input,
.admin-create-panel select,
.admin-table select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  outline-color: #111111;
}

.admin-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.admin-table td strong {
  display: block;
  margin-bottom: 4px;
}

.admin-table td span {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table select {
  width: 120px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-actions .tool-button {
  min-height: 36px;
  padding: 0 11px;
}

.admin-account-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
}

.admin-account-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 740;
}

.admin-account-tabs button.is-active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.admin-dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-dialog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.36);
  cursor: default;
}

.admin-create-dialog {
  position: relative;
  display: grid;
  width: min(100%, 460px);
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.2);
}

.admin-dialog-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.admin-dialog-title h2 {
  margin: 6px 0 0;
  font-size: 26px;
}

.admin-create-form {
  display: grid;
  gap: 14px;
}

.admin-create-form label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 700;
}

.admin-create-form input,
.admin-create-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  outline-color: #111111;
}

.admin-dialog-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.admin-dialog-actions .auth-submit {
  margin-top: 0;
}

.admin-stats {
  max-width: 820px;
}

.admin-system-body {
  min-height: 100vh;
  background: #f5f5f5;
}

.admin-system {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - var(--site-footer-height));
}

.admin-system-sidebar {
  position: sticky;
  top: 0;
  height: calc(100vh - var(--site-footer-height));
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.admin-system-brand {
  margin-bottom: 34px;
}

.admin-system-brand .brand-text {
  font-size: 24px;
}

.admin-system-brand .brand-mark {
  width: 38px;
  height: 34px;
}

.admin-system-brand .brand-mark::before,
.admin-system-brand .brand-mark::after {
  width: 31px;
  height: 10px;
}

.admin-system-nav {
  display: grid;
  gap: 8px;
}

.admin-system-nav button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #333333;
  font-weight: 720;
  text-align: left;
  padding: 0 14px;
}

.admin-system-nav button:hover,
.admin-system-nav button.is-active {
  background: #f1f1f1;
  color: #000000;
}

.admin-system-main {
  min-width: 0;
  padding: 30px 30px calc(30px + var(--site-footer-height));
}

.admin-system-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-system-top p,
.admin-system-top h1 {
  margin: 0;
}

.admin-system-top p {
  color: var(--muted);
  font-weight: 680;
}

.admin-system-top h1 {
  margin-top: 6px;
  font-size: 32px;
}

.admin-system-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 680;
}

.admin-login-screen {
  display: grid;
  min-height: calc(100vh - var(--site-footer-height));
  place-items: center;
  padding: 24px 24px calc(24px + var(--site-footer-height));
  background: #f5f5f5;
}

.admin-login-card {
  display: grid;
  width: min(100%, 440px);
  gap: 22px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.admin-login-card h1,
.admin-login-card p {
  margin: 0;
}

.admin-login-card p:not(.eyebrow):not(.auth-message) {
  margin-top: 8px;
  color: var(--muted);
}

.notice-panel {
  padding: 24px;
}

.notice-panel h2 {
  margin: 0 0 14px;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  align-items: start;
  color: var(--muted);
}

.timeline time {
  color: var(--blue-800);
  font-weight: 760;
}

.tool-playground {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.tool-playground textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  outline-color: #111111;
}

.tool-result {
  min-height: 92px;
  padding: 14px;
  overflow: auto;
  border: 1px dashed #d2d2d2;
  border-radius: 8px;
  background: var(--blue-050);
  color: #303030;
  white-space: pre-wrap;
}

.auth-panel[hidden] {
  display: none;
}

.auth-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px 24px calc(24px + var(--site-footer-height));
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(10px);
}

.auth-dialog {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100vh - 48px - var(--site-footer-height));
  overflow-y: auto;
  padding: 30px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #4b5b70;
}

.auth-header {
  display: grid;
  gap: 10px;
}

.auth-header h2 {
  margin: 0;
  font-size: 30px;
}

.auth-header p {
  margin: 0;
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.auth-tab {
  min-height: 42px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.auth-tab.is-active {
  background: #fff;
  color: var(--blue-800);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  outline-color: #111111;
}

.auth-submit {
  min-height: 48px;
  margin-top: 6px;
  border-radius: 999px;
  background: #000000;
  color: #fff;
  font-weight: 780;
}

.auth-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.auth-message.success {
  color: var(--success);
}

.auth-message.error {
  color: var(--danger);
}

.empty-state {
  display: grid;
  gap: 12px;
  min-height: 320px;
  place-items: center;
  border: 1px dashed #d2d2d2;
  border-radius: 8px;
  background: var(--blue-050);
  text-align: center;
}

.empty-state.compact {
  min-height: 180px;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr auto auto;
  }

  .topbar:not(.has-primary-nav) {
    grid-template-columns: auto 1fr auto;
  }

  .primary-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .content-grid,
  .home-feed-shell,
  .case-grid,
  .tool-grid,
  .member-grid,
  .workspace-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-feed-shell,
  .home-feed-header,
  .case-feature,
  .case-feature.is-reversed,
  .textbook-chat-shell {
    grid-template-columns: 1fr;
  }

  .home-hot-card {
    position: static;
  }

  .case-feature.is-reversed .case-feature-media {
    order: 0;
  }
}

@media (max-width: 860px) {
  :root {
    --site-footer-height: 34px;
  }

  .topbar {
    grid-template-columns: 1fr auto auto;
    min-height: 72px;
    padding: 0 16px;
  }

  .topbar:not(.has-primary-nav) {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    grid-column: 1 / -1;
    order: 4;
    padding-bottom: 10px;
  }

  .nav-link {
    min-height: 38px;
    padding: 0 12px;
    font-size: 15px;
  }

  .brand-text {
    font-size: 23px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .login-button {
    min-width: 72px;
    min-height: 42px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-head {
    display: none;
  }

  .secondary-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .secondary-item {
    grid-template-columns: 20px max-content;
    min-height: 42px;
    padding: 0 12px;
    font-size: 15px;
    white-space: nowrap;
  }

  .secondary-item svg {
    width: 20px;
    height: 20px;
  }

  .content {
    padding: 18px 18px calc(18px + var(--site-footer-height));
  }

  .section-hero {
    min-height: auto;
    padding: 24px;
  }

  .content-grid,
  .home-feed-shell,
  .home-hero,
  .home-feed-header,
  .case-feature,
  .case-feature.is-reversed,
  .case-grid,
  .tool-grid,
  .member-grid,
  .stats-panel,
  .official-doc-grid,
  .textbook-chat-shell,
  .workspace-tools-grid,
  .task-board,
  .workspace-card-grid,
  .admin-system {
    grid-template-columns: 1fr;
  }

  .textbook-chat-shell {
    min-height: auto;
  }

  .textbook-chat-panel {
    grid-template-rows: auto auto minmax(320px, 1fr) auto;
  }

  .textbook-message {
    max-width: 100%;
  }

  .home-feed-main {
    padding: 18px;
  }

  .home-feed-header h1 {
    font-size: 30px;
  }

  .home-timeline::before {
    left: 4px;
  }

  .timeline-card {
    grid-template-columns: 1fr;
    padding-left: 28px;
    gap: 8px;
  }

  .timeline-card::before {
    top: 6px;
    left: 0;
  }

  .timeline-time {
    padding-top: 0;
    text-align: left;
  }

  .timeline-card-body {
    grid-column: auto;
  }

  .case-feature,
  .case-feature.is-reversed {
    gap: 14px;
    padding: 14px;
  }

  .case-feature-copy {
    padding: 8px 2px 4px;
  }

  .case-feature-copy h3 {
    font-size: 24px;
  }

  .admin-system-sidebar {
    position: static;
    height: auto;
  }

  .admin-system-main {
    padding: 18px 18px calc(18px + var(--site-footer-height));
  }

  .admin-system-top {
    align-items: start;
    flex-direction: column;
  }

  .workspace-header h1 {
    font-size: 32px;
  }

  .preview-body {
    grid-template-columns: 1fr;
  }

  .preview-rail {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .preview-rail strong {
    display: none;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 10px;
  }

  .brand-text {
    display: none;
  }

  .section-hero h1 {
    font-size: 34px;
  }

  .home-feed-header h1 {
    font-size: 28px;
  }

  .home-feed-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .timeline-card-body {
    padding: 16px;
  }

  .timeline-card h2 {
    font-size: 19px;
  }

  .site-footer {
    font-size: 12px;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }

  .auth-dialog {
    padding: 24px;
  }

  .textbook-chat-form {
    grid-template-columns: 1fr;
  }

  .textbook-chat-form .auth-submit {
    width: 100%;
  }

  .preview-metrics {
    grid-template-columns: 1fr;
  }
}
