:root {
  color-scheme: light;
  --blue: #111111;
  --accent: #111111;
  --success: #147653;
  --danger: #c53929;
  --ink: #101010;
  --muted: #6b7280;
  --line: #e7e7e7;
  --hairline: #eeeeee;
  --canvas: #eef1f4;
  --white: #fff;
  --background: #fff;
  --foreground: #111722;
  --card: #fff;
  --card-foreground: #111722;
  --muted-foreground: #657389;
  --border: #d6dde6;
  --input: #d6dde6;
  --primary: #111722;
  --primary-foreground: #fff;
  --surface: #fff;
  --surface-raised: #fff;
  --surface-soft: #f6f6f6;
  --surface-muted: #fafafa;
  --thread-line: #e4e4e4;
  --active-pill: #111111;
  --active-pill-text: #ffffff;
  --focus-ring: rgba(17, 17, 17, 0.16);
  --radius: 0.5rem;
  --tabbar-base-height: 66px;
  --tabbar-total-height: calc(var(--tabbar-base-height) + env(safe-area-inset-bottom, 0px));
  --safe-area-top: env(safe-area-inset-top, 0px);
  --topbar-base-height: 66px;
  --topbar-total-height: calc(var(--topbar-base-height) + var(--safe-area-top));
  --viewport-gutter: 24px;
  --viewport-gutter-total: 48px;
  --shell-max-width: 430px;
  --shell-max-height: 932px;
  --shell-radius: 36px;
  --shell-border-width: 1px;
  --tablet-inline-padding: 18px;
  --tablet-inline-padding-negative: -18px;
  --app-font-micro: 10px;
  --app-font-2xs: 11px;
  --app-font-xs: 12px;
  --app-font-sm: 13px;
  --app-font-md: 14px;
  --app-font-ui: 15px;
  --app-font-ui-strong: 15.5px;
  --app-font-control: 16px;
  --app-font-reading: 16px;
  --app-font-input: 20px;
  --app-font-heading: 22px;
  --app-font-empty-heading: 24px;
  --app-font-topbar: 20px;
  --app-font-tabbar: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --blue: #f5f5f5;
    --accent: #f5f5f5;
    --success: #8ee6bd;
    --danger: #ff7f73;
    --ink: #f5f5f5;
    --muted: #a8adb5;
    --line: #292929;
    --hairline: #242424;
    --canvas: #000;
    --white: #0f0f0f;
    --background: #0f0f0f;
    --foreground: #f5f5f5;
    --card: #151515;
    --card-foreground: #f5f5f5;
    --muted-foreground: #a8adb5;
    --border: #292929;
    --input: #2f2f2f;
    --primary: #f5f5f5;
    --primary-foreground: #111;
    --surface: #0f0f0f;
    --surface-raised: #171717;
    --surface-soft: #1c1c1c;
    --surface-muted: #121212;
    --thread-line: #2c2c2c;
    --active-pill: #f5f5f5;
    --active-pill-text: #0f0f0f;
    --focus-ring: rgba(245, 245, 245, 0.24);
  }
}

html[data-text-scale="large"] {
  --app-font-micro: 13.5px;
  --app-font-2xs: 14.85px;
  --app-font-xs: 16.2px;
  --app-font-sm: 17.55px;
  --app-font-md: 18.9px;
  --app-font-ui: 20.25px;
  --app-font-ui-strong: 20.95px;
  --app-font-control: 21.6px;
  --app-font-reading: 21.6px;
  --app-font-input: 27px;
  --app-font-heading: 29.7px;
  --app-font-empty-heading: 32.4px;
  --app-font-topbar: 22px;
  --app-font-tabbar: 14px;
  --tabbar-base-height: 76px;
  --topbar-base-height: 70px;
}

html[data-text-scale="extra-large"] {
  --app-font-micro: 18px;
  --app-font-2xs: 19.8px;
  --app-font-xs: 21.6px;
  --app-font-sm: 23.4px;
  --app-font-md: 25.2px;
  --app-font-ui: 27px;
  --app-font-ui-strong: 27.9px;
  --app-font-control: 28.8px;
  --app-font-reading: 28.8px;
  --app-font-input: 36px;
  --app-font-heading: 39.6px;
  --app-font-empty-heading: 43.2px;
  --app-font-topbar: 25px;
  --app-font-tabbar: 16px;
  --tabbar-base-height: 92px;
  --topbar-base-height: 78px;
}

html[data-text-scale="huge"] {
  --app-font-micro: 30px;
  --app-font-2xs: 33px;
  --app-font-xs: 36px;
  --app-font-sm: 39px;
  --app-font-md: 42px;
  --app-font-ui: 45px;
  --app-font-ui-strong: 46.5px;
  --app-font-control: 48px;
  --app-font-reading: 48px;
  --app-font-input: 60px;
  --app-font-heading: 54px;
  --app-font-empty-heading: 58px;
  --app-font-topbar: 30px;
  --app-font-tabbar: 18px;
  --tabbar-base-height: 112px;
  --topbar-base-height: 92px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  background: var(--white);
}

body {
  align-items: center;
  background: var(--canvas);
  color: var(--ink);
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--viewport-gutter);
}

body.media-viewer-open {
  overflow: hidden;
}

body.learning-sheet-open {
  overflow: hidden;
}

body.access-dialog-open {
  overflow: hidden;
}

body.agent-page-open {
  overflow: hidden;
}

body.ai-chat-open {
  overflow: hidden;
}

button,
textarea,
a,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.phone-shell {
  background: var(--white);
  border: var(--shell-border-width) solid var(--line);
  border-radius: var(--shell-radius);
  height: min(var(--shell-max-height), calc(100vh - var(--viewport-gutter-total)));
  height: min(var(--shell-max-height), calc(100dvh - var(--viewport-gutter-total)));
  max-height: var(--shell-max-height);
  max-width: var(--shell-max-width);
  overflow: hidden;
  width: min(var(--shell-max-width), calc(100vw - var(--viewport-gutter-total)));
}

.app-screen {
  --feed-chrome-bottom-shift: 0px;
  --feed-chrome-feed-padding: calc(var(--tabbar-total-height) + 14px);
  --feed-chrome-opacity: 1;
  --feed-chrome-top-shift: 0px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.topbar {
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  flex: 0 0 var(--topbar-total-height);
  grid-template-columns: 56px 1fr 56px;
  margin-top: var(--feed-chrome-top-shift);
  min-height: var(--topbar-total-height);
  opacity: var(--feed-chrome-opacity);
  overflow: hidden;
  padding: var(--safe-area-top) 18px 0;
  position: relative;
  transition:
    margin-top 160ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 160ms ease,
    border-color 160ms ease;
  will-change: margin-top, opacity;
  z-index: 30;
}

.topbar h1 {
  font-size: 20px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  min-width: 0;
  text-align: center;
}

.view-title-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  align-items: center;
  display: flex;
  font: inherit;
  justify-content: center;
  line-height: inherit;
  margin: 0;
  max-width: 100%;
  min-height: 44px;
  overflow: hidden;
  padding: 0 8px;
  text-align: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.view-title-button span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-avatar,
.avatar {
  aspect-ratio: 1;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.mini-avatar {
  height: 36px;
  width: 36px;
}

.avatar-button {
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 36px;
  justify-self: start;
  padding: 0;
  width: 36px;
}

.avatar-button:focus-visible,
.view-title-button:focus-visible,
.tabbar a:focus-visible,
.access-panel button:focus-visible,
.access-panel input:focus-visible,
.sidebar-create-list input:focus-visible,
.sidebar-create-list button:focus-visible,
.access-empty button:focus-visible,
.ai-chat-form button:focus-visible,
.ai-chat-form textarea:focus-visible,
.agent-form button:focus-visible,
.agent-form textarea:focus-visible,
.ai-chat-icon:focus-visible,
.ai-suggestion-grid button:focus-visible,
.agent-icon:focus-visible,
.ai-answer-actions button:focus-visible,
.agent-sample-grid button:focus-visible,
.list-strip button:focus-visible,
.list-detail-card button:focus-visible,
.learned-group-toggle:focus-visible,
.learned-summary button:focus-visible,
.learned-collapse-bar:focus-visible,
.agent-preview-card button:focus-visible,
.agent-result-card button:focus-visible,
.learning-sheet button:focus-visible,
.learning-fast-row input:focus-visible,
.post-actions button:focus-visible,
.thread-toggle:focus-visible,
.draft-media-icon:focus-visible,
.tool:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.avatar {
  height: 40px;
  width: 40px;
}

.avatar-fallback {
  align-items: center;
  background: var(--surface-soft);
  color: var(--muted);
  display: flex;
  font-size: 20px;
  font-weight: 760;
  justify-content: center;
}

.icon-button,
.tool,
.post-actions button,
.draft-media-icon {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.compose-toggle {
  color: var(--ink);
  justify-self: end;
}

.compose-toggle svg {
  height: 27px;
  width: 27px;
}

.compose-toggle.is-open svg {
  transform: rotate(45deg);
}

.composer[hidden] {
  display: none;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.composer {
  border-bottom: 1px solid var(--hairline);
  display: grid;
  flex: 0 0 auto;
  gap: 11px;
  grid-template-columns: 40px 1fr;
  padding: 13px 18px 14px;
}

.composer-main {
  min-width: 0;
  padding-top: 4px;
}

textarea {
  background: transparent;
  border: 0;
  color: var(--ink);
  display: block;
  font-size: 20px;
  line-height: 1.35;
  min-height: 40px;
  outline: 0;
  padding: 4px 0 12px;
  resize: none;
  width: 100%;
}

textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.composer-target {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  margin: -4px 0 10px;
}

.composer-target[hidden] {
  display: none;
}

.composer-meta {
  margin-bottom: 10px;
}

.tag-input {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  min-height: 38px;
  outline: 0;
  padding: 9px 11px;
  width: 100%;
}

.tag-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.tag-input:focus {
  border-color: var(--muted);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.lesson-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin: 0 0 11px;
}

.lesson-action {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 760;
  gap: 8px;
  justify-content: flex-start;
  line-height: 1.2;
  min-height: 42px;
  padding: 9px 11px;
  text-align: left;
  width: 100%;
}

.lesson-action svg {
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.lesson-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.composer-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.tool-row {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.tool {
  color: var(--ink);
  height: 28px;
  min-width: 24px;
}

.tool svg {
  height: 23px;
  width: 23px;
}

.tool span {
  border: 1.9px solid currentColor;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 3px 3px;
}

.draft-media-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.draft-media-list:empty {
  display: none;
}

.draft-media-item {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 6px;
}

.draft-media-item.is-failed {
  background: color-mix(in srgb, var(--danger) 8%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--danger) 40%, var(--hairline));
}

.draft-media-item.is-uploading,
.draft-media-item.is-compressing {
  opacity: 0.78;
}

.draft-media-item img {
  aspect-ratio: 1;
  background: var(--surface-soft);
  border-radius: 6px;
  display: block;
  height: 52px;
  object-fit: cover;
  width: 52px;
}

.draft-media-detail {
  min-width: 0;
}

.draft-media-detail p {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-media-detail span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 4px;
}

.draft-media-item.is-failed .draft-media-detail span {
  color: var(--danger);
}

.draft-media-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}

.draft-media-icon {
  border-radius: 50%;
  color: var(--muted);
  height: 34px;
  width: 34px;
}

.draft-media-icon:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.post-button {
  background: var(--active-pill);
  border: 0;
  border-radius: 20px;
  color: var(--active-pill-text);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  min-width: 64px;
  padding: 12px 18px;
}

.post-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.composer-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  margin: 8px 0 0;
  min-height: 17px;
}

.feed {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: var(--feed-chrome-feed-padding);
  scrollbar-width: none;
  transition: padding-bottom 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.feed::-webkit-scrollbar {
  display: none;
}

.title-list-menu {
  background: color-mix(in srgb, var(--white) 98%, transparent);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 14px 28px rgba(16, 16, 16, 0.08);
  left: 0;
  padding: 8px 14px 10px;
  position: absolute;
  right: 0;
  top: var(--topbar-total-height);
  z-index: 28;
}

.title-list-menu[hidden] {
  display: none;
}

.list-strip {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(16, 16, 16, 0.08);
  margin: 0 auto;
  max-height: min(392px, calc(100dvh - 180px));
  max-width: 356px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: none;
  width: 100%;
}

.list-strip::-webkit-scrollbar {
  display: none;
}

.list-strip button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font-size: 14px;
  font-weight: 660;
  gap: 8px;
  grid-template-columns: 22px minmax(0, 1fr);
  line-height: 1.1;
  min-height: 42px;
  overflow: hidden;
  padding: 0 10px;
  text-align: left;
  width: 100%;
}

.list-strip button + button {
  margin-top: 2px;
}

.list-strip button.active {
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 780;
}

.list-strip button:hover {
  background: var(--surface-muted);
}

.list-menu-check {
  align-items: center;
  color: var(--ink);
  display: flex;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.list-menu-check svg {
  height: 18px;
  stroke-width: 2.4;
  width: 18px;
}

.list-menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-empty {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 92px 34px 140px;
  text-align: center;
}

.access-empty-icon {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--ink);
  display: inline-flex;
  height: 64px;
  justify-content: center;
  margin-bottom: 18px;
  width: 64px;
}

.access-empty-icon svg {
  height: 30px;
  width: 30px;
}

.access-empty h2 {
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.access-empty p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.38;
  margin: 10px 0 20px;
  max-width: 280px;
}

.access-empty button,
.access-primary {
  background: var(--active-pill);
  border: 0;
  border-radius: 20px;
  color: var(--active-pill-text);
  cursor: pointer;
  font-size: 16px;
  font-weight: 760;
  line-height: 1;
  padding: 12px 18px;
}

.empty-feed {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
  padding: 42px 24px 140px;
  text-align: center;
}

.list-detail-card {
  align-items: center;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--hairline);
  display: grid;
  gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 10px 14px;
}

.list-detail-card.is-archived {
  background: color-mix(in srgb, var(--danger) 7%, var(--surface-muted));
}

.list-detail-icon {
  align-items: center;
  background: var(--surface-soft);
  border-radius: 50%;
  color: var(--ink);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.list-detail-icon svg {
  height: 20px;
  width: 20px;
}

.list-detail-main {
  min-width: 0;
}

.list-detail-main p,
.list-detail-main h2,
.list-detail-main span {
  margin: 0;
}

.list-detail-main p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.list-detail-main h2 {
  font-size: 18px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-detail-main span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.2;
  margin-top: 5px;
}

.list-detail-card button {
  align-items: center;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 9px;
}

.list-detail-card button svg {
  height: 18px;
  width: 18px;
}

.list-detail-card button span {
  font-size: 12px;
  font-weight: 760;
}

.list-description-card {
  background: var(--white);
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 7px;
  padding: 13px 20px 14px 88px;
  text-align: left;
  width: 100%;
}

.list-description-card span,
.list-description-card p,
.list-description-card small {
  margin: 0;
}

.list-description-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.list-description-card p {
  color: var(--ink);
  display: -webkit-box;
  font-size: 15px;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.list-description-card.is-expanded p {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.list-description-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.2;
}

.post {
  border-bottom: 1px solid var(--hairline);
  display: grid;
  gap: 11px;
  grid-template-columns: 40px 1fr;
  padding: 14px 16px 11px;
  position: relative;
}

.post::before {
  background: var(--thread-line);
  bottom: -12px;
  content: "";
  display: none;
  left: 35px;
  position: absolute;
  top: 58px;
  width: 2px;
}

.post.is-thread-linked {
  border-bottom-color: transparent;
}

.post.is-thread-linked::before {
  display: block;
}

.post > .avatar {
  background: var(--surface-soft);
  position: relative;
  z-index: 1;
}

.post.is-acknowledged {
  background: color-mix(in srgb, var(--success) 5%, var(--white));
}

.thread-card {
  border-bottom: 1px solid var(--hairline);
}

.thread-card > .post,
.thread-replies .post {
  border-bottom: 0;
}

.post.has-thread {
  cursor: pointer;
}

.post.is-thread-reply {
  background: var(--surface-muted);
  padding-bottom: 12px;
  padding-top: 12px;
}

.thread-card .post.is-acknowledged {
  background: color-mix(in srgb, var(--success) 10%, var(--white));
}

.thread-card .post.is-thread-reply.is-acknowledged {
  background: color-mix(in srgb, var(--success) 13%, var(--surface-muted));
}

.thread-replies {
  display: grid;
}

.thread-card > .learned-summary,
.thread-card > .learned-expanded-item,
.thread-replies .learned-summary,
.thread-replies .learned-expanded-item {
  background: var(--surface-muted);
  padding: 8px 16px 8px 67px;
}

.thread-toggle {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-grid;
  gap: 7px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  line-height: 1;
  margin-top: 10px;
  max-width: 100%;
  min-height: 34px;
  padding: 0 9px;
}

.thread-toggle-icon,
.thread-toggle-caret {
  align-items: center;
  display: inline-flex;
}

.thread-toggle-icon svg,
.thread-toggle-caret svg {
  height: 16px;
  width: 16px;
}

.thread-toggle-copy {
  font-size: 12px;
  font-weight: 760;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-toggle-caret {
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.post.is-thread-expanded .thread-toggle {
  background: color-mix(in srgb, var(--ink) 6%, var(--surface-raised));
  color: var(--ink);
}

.post.is-thread-expanded .thread-toggle-caret {
  transform: rotate(90deg);
}

.learned-group {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 8px 18px;
}

.learned-group-toggle,
.learned-summary button,
.learned-collapse-bar {
  align-items: center;
  background: color-mix(in srgb, var(--success) 8%, var(--surface-raised));
  border: 1px solid color-mix(in srgb, var(--success) 28%, var(--hairline));
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 38px;
  width: 100%;
}

.learned-group-toggle {
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 7px 10px;
  text-align: left;
}

.learned-group-label,
.learned-group-count,
.learned-summary-mark,
.learned-summary-meta {
  align-items: center;
  color: var(--success);
  display: inline-flex;
  font-size: 12px;
  font-weight: 780;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.learned-group-label {
  font-size: 13px;
  gap: 6px;
}

.learned-group-count {
  color: var(--muted);
  justify-self: start;
}

.learned-group-chevron {
  color: var(--success);
  display: inline-flex;
  transform: rotate(90deg);
  transition: transform 160ms ease;
}

.learned-group:not(.is-expanded) .learned-group-chevron {
  transform: rotate(0deg);
}

.learned-group-chevron svg {
  height: 16px;
  width: 16px;
}

.learned-group-items {
  display: grid;
  gap: 8px;
}

.learned-summary button {
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 7px 10px;
  text-align: left;
}

.learned-summary-mark svg {
  height: 15px;
  width: 15px;
}

.learned-summary-copy {
  font-size: 13px;
  font-weight: 690;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learned-summary-meta {
  color: var(--muted);
  font-weight: 680;
  justify-self: end;
  max-width: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.learned-expanded-item {
  display: grid;
  gap: 6px;
}

.learned-collapse-bar {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  text-align: left;
}

.learned-collapse-bar span,
.learned-collapse-bar small {
  align-items: center;
  color: var(--success);
  display: inline-flex;
  font-size: 12px;
  font-weight: 780;
  gap: 5px;
  min-width: 0;
}

.learned-collapse-bar small {
  color: var(--muted);
  font-weight: 700;
}

.learned-collapse-bar svg {
  height: 15px;
  width: 15px;
}

.learned-expanded-item .post {
  border: 1px solid color-mix(in srgb, var(--success) 18%, var(--line));
  border-radius: 8px;
  overflow: hidden;
}

.post.last {
  min-height: 134px;
}

.post-body {
  min-width: 0;
}

.post-head {
  align-items: start;
  display: block;
}

.post-head p {
  font-size: 15px;
  line-height: 1.24;
  margin: 0;
  min-width: 0;
}

.post-head strong {
  font-size: 15.5px;
  font-weight: 800;
}

.post-head span {
  color: var(--muted);
  font-weight: 450;
  white-space: nowrap;
}

.post-copy {
  font-size: 16px;
  line-height: 1.36;
  margin: 4px 0 0;
  unicode-bidi: plaintext;
  white-space: pre-wrap;
}

.text-direction-block {
  display: block;
}

.text-direction-block + .text-direction-block {
  margin-top: 0.65em;
}

.post-copy.is-markdown {
  white-space: normal;
}

.post-copy .pulse-streamdown :where(p, ul, ol, blockquote, pre, table) {
  margin-bottom: 0.65em;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.post-tags span {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  padding: 5px 8px;
}

.post-tags .ack-tag {
  background: color-mix(in srgb, var(--success) 10%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--success) 30%, var(--hairline));
  color: var(--success);
}

.post-media-grid {
  display: grid;
  gap: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.post-media-grid.media-count-1 {
  border: 1px solid var(--line);
  border-radius: 16px;
  display: block;
}

.post-media-grid.media-count-2,
.post-media-grid.media-count-3,
.post-media-grid.media-count-4 {
  border: 1px solid var(--line);
  border-radius: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-media-grid.media-count-3 .post-media-button:first-child {
  grid-row: span 2;
}

.post-media-button {
  background: var(--surface-soft);
  border: 0;
  cursor: pointer;
  display: block;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.post-media-button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}

.post-media {
  display: block;
  width: 100%;
}

.post-body > .post-media {
  border: 1px solid var(--line);
  border-radius: 16px;
  height: auto;
  margin-top: 12px;
  max-height: 520px;
  object-fit: contain;
}

.media-count-1 .post-media {
  height: auto;
  max-height: 520px;
  object-fit: contain;
}

.media-count-2 .post-media,
.media-count-3 .post-media,
.media-count-4 .post-media {
  aspect-ratio: 1;
  height: 100%;
  object-fit: cover;
}

.post-actions {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  max-width: none;
  position: relative;
}

.post-actions > button,
.post-action-menu > button {
  color: var(--muted);
  gap: 0;
  height: 28px;
  justify-content: center;
  min-width: 0;
  width: 28px;
}

.post-actions [data-post-action^="learning-"] {
  gap: 4px;
  min-width: 0;
  padding: 0 1px;
  width: auto;
}

.post-actions button.is-active {
  color: var(--ink);
}

.post-actions [data-post-action="acknowledge"].is-active {
  color: var(--success);
}

.post-actions [data-post-action="review-later"].is-active {
  color: var(--ink);
}

.post-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.post-actions svg {
  height: 20px;
  width: 20px;
}

.post-actions [data-post-action^="learning-"] svg {
  height: 17px;
  width: 17px;
}

.post-actions span {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.post-actions [data-post-action^="learning-"] span {
  clip: auto;
  clip-path: none;
  font-size: 11px;
  font-weight: 760;
  height: auto;
  overflow: visible;
  position: static;
  white-space: nowrap;
  width: auto;
}

.post-action-divider {
  align-self: center;
  background: var(--line);
  flex: 0 0 1px;
  height: 28px;
  margin-left: 1px;
  margin-right: 1px;
}

.post-action-menu {
  position: relative;
}

.post-more-menu[hidden] {
  display: none;
}

.post-more-menu {
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  min-width: 190px;
  padding: 6px;
  position: absolute;
  right: -8px;
  top: 34px;
  z-index: 4;
}

.post-more-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 38px;
  padding: 0 10px;
  width: 100%;
}

.post-more-menu button:hover {
  background: var(--surface-soft);
}

.post-more-menu [data-post-action="archive"] {
  color: var(--danger);
}

.post-more-menu [data-post-action="archive"]:hover {
  background: color-mix(in srgb, var(--danger) 9%, transparent);
}

.post-more-menu svg {
  height: 18px;
  width: 18px;
}

.post-more-menu span {
  clip: auto;
  clip-path: none;
  font-size: 14px;
  font-weight: 740;
  height: auto;
  overflow: visible;
  position: static;
  white-space: nowrap;
  width: auto;
}

.source-learning-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.source-learning-label,
.source-learning-chip {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.1;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
}

.source-learning-label {
  background: var(--surface-soft);
  color: var(--muted);
}

.source-learning-chip {
  background: color-mix(in srgb, var(--success) 10%, var(--surface-raised));
  color: var(--ink);
  overflow-wrap: anywhere;
}

.source-learning-chip.is-grammar {
  background: color-mix(in srgb, #006ee6 10%, var(--surface-raised));
}

.fast-card {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--hairline);
  display: grid;
  gap: 12px;
  padding: 14px 18px 12px;
}

.fast-card-head {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 780;
  gap: 7px;
  line-height: 1;
  text-transform: uppercase;
}

.fast-card-count {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  margin-left: auto;
}

.fast-card-icon {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
}

.fast-card-icon svg {
  height: 17px;
  width: 17px;
}

.fast-card-copy {
  color: var(--ink);
  display: grid;
  gap: 7px;
  line-height: 1.38;
  unicode-bidi: plaintext;
}

.fast-card-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 820;
  line-height: 1.14;
  margin: 0;
  overflow-wrap: anywhere;
}

.fast-card-explanation {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.38;
  margin: 0;
}

.fast-card-example {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
  padding: 10px 11px;
}

.fast-card-example span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.fast-card-example strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 680;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.fast-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fast-actions button {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 780;
  gap: 6px;
  justify-content: center;
  min-height: 36px;
  padding: 0 8px;
}

.fast-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.fast-actions svg {
  height: 16px;
  width: 16px;
}

.learning-sheet[hidden] {
  display: none;
}

.learning-sheet {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 44;
}

.learning-sheet-backdrop {
  background: rgba(0, 0, 0, 0.12);
  inset: 0;
  pointer-events: auto;
  position: absolute;
}

.learning-panel {
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  bottom: 0;
  box-shadow: 0 -20px 48px rgba(0, 0, 0, 0.2);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  left: 0;
  max-height: min(86%, 720px);
  pointer-events: auto;
  position: absolute;
  right: 0;
  overflow: hidden;
}

.learning-grabber {
  align-self: center;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 999px;
  height: 4px;
  margin-top: 8px;
  width: 36px;
}

.learning-sheet-head {
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  min-height: 48px;
  padding: 0 16px;
}

.learning-sheet-head h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-text-button,
.learning-save {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 560;
  min-height: 38px;
  padding: 0;
}

.learning-text-button {
  text-align: left;
}

.learning-save {
  color: #006ee6;
  font-weight: 700;
  text-align: right;
}

.learning-save:disabled {
  color: var(--muted);
  cursor: wait;
  opacity: 0.68;
}

.learning-tabs {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--hairline);
  display: grid;
  flex: 0 0 auto;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px 32px;
}

.learning-tabs button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  min-height: 34px;
}

.learning-tabs button:first-child {
  border-radius: 8px 0 0 8px;
}

.learning-tabs button:last-child {
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.learning-tabs button.active {
  background: var(--active-pill);
  border-color: var(--active-pill);
  color: var(--active-pill-text);
}

.learning-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 12px 14px;
}

.learning-research-form {
  border-bottom: 1px solid var(--hairline);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.learning-research-field {
  display: grid;
  gap: 6px;
}

.learning-research-field span,
.learning-research-note,
.learning-research-status,
.learning-research-eyebrow,
.learning-research-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
  margin: 0;
}

.learning-research-field textarea {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  min-height: 118px;
  padding: 10px;
}

.learning-research-depth {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.learning-research-depth button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  min-height: 34px;
}

.learning-research-depth button:first-child {
  border-radius: 8px 0 0 8px;
}

.learning-research-depth button:last-child {
  border-radius: 0 8px 8px 0;
}

.learning-research-depth button + button {
  border-left: 0;
}

.learning-research-depth button.active {
  background: var(--active-pill);
  border-color: var(--active-pill);
  color: var(--active-pill-text);
}

.learning-research-depth button:disabled:not(.active) {
  cursor: default;
  opacity: 0.48;
}

.learning-research-content {
  display: grid;
  gap: 10px;
}

.learning-research-preview {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.learning-research-preview h3,
.learning-research-brief {
  margin: 0;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

.learning-research-preview h3 {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.learning-research-brief {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.42;
}

.learning-research-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.learning-research-sources a {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 2px;
  max-width: 100%;
  padding: 7px 8px;
  text-decoration: none;
}

.learning-research-sources strong {
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-research-sources span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.15;
  text-transform: uppercase;
}

.learning-research-checklist,
.learning-research-post-list {
  color: var(--ink);
  display: grid;
  font-size: 13px;
  gap: 6px;
  line-height: 1.35;
  margin: 0;
  padding-left: 18px;
}

.learning-research-post-list {
  border-top: 1px solid var(--hairline);
  gap: 8px;
  padding-top: 10px;
}

.learning-research-post-list li {
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

.learning-research-preview button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
  min-height: 36px;
  padding: 0 12px;
  width: fit-content;
}

.learning-suggestion-sections,
.learning-suggestion-section {
  display: grid;
  gap: 12px;
}

.learning-suggestion-section-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 32px;
}

.learning-suggestion-section-head h3 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  line-height: 1.15;
  margin: 0;
}

.learning-suggestion-section-head button,
.learning-card-toggle {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  min-height: 30px;
  padding: 0 10px;
}

.learning-suggestion-section-head button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.learning-suggestion-list {
  display: grid;
  gap: 10px;
}

.learning-suggestion-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.learning-suggestion-card.is-unselected {
  background: var(--surface-muted);
}

.learning-suggestion-card.is-ai-extra {
  border-style: dashed;
}

.learning-suggestion-card.is-collapsed {
  gap: 9px;
}

.learning-collapsed-summary,
.learning-inline-message,
.learning-inline-loading {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.learning-inline-loading {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 11px 12px;
}

.learning-card-footer {
  display: flex;
  justify-content: flex-end;
}

.learning-check-row {
  align-items: start;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
}

.learning-check-row input {
  accent-color: var(--ink);
  height: 18px;
  margin: 2px 0 0;
  width: 18px;
}

.learning-item-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.learning-item-title strong {
  font-size: 16px;
  font-weight: 820;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.learning-item-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.1;
}

.learning-choice {
  display: grid;
  gap: 6px;
}

.learning-choice > span,
.learning-field > span,
.learning-section-head h4 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
  margin: 0;
}

.learning-choice > div {
  display: grid;
  gap: 0;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
}

.learning-choice button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  min-height: 32px;
}

.learning-choice button:first-child {
  border-radius: 8px 0 0 8px;
}

.learning-choice button:not(:first-child) {
  border-left: 0;
}

.learning-choice button:last-child {
  border-radius: 0 8px 8px 0;
}

.learning-choice button.active {
  background: var(--active-pill);
  border-color: var(--active-pill);
  color: var(--active-pill-text);
}

.learning-field-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.learning-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.learning-field.is-wide {
  grid-column: 1 / -1;
}

.learning-field input,
.learning-field textarea {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  min-width: 0;
  outline: 0;
  padding: 9px 10px;
  resize: vertical;
  width: 100%;
}

.learning-field textarea {
  min-height: 42px;
}

.learning-field input:focus,
.learning-field textarea:focus {
  border-color: color-mix(in srgb, var(--ink) 32%, var(--line));
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.learning-section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.learning-section-head button {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  min-height: 30px;
  padding: 0 10px;
}

.learning-explanation-panel {
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 10px;
  padding-top: 11px;
}

.learning-loading,
.learning-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 10px;
  justify-content: center;
  min-height: 190px;
  text-align: center;
}

.learning-empty p {
  margin: 0;
}

.learning-empty button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  min-height: 34px;
  padding: 0 14px;
}

.learning-destination {
  align-items: center;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px calc(env(safe-area-inset-bottom, 0px));
}

.learning-destination span,
.learning-destination button {
  align-items: center;
  display: inline-flex;
}

.learning-destination svg {
  color: var(--muted);
  height: 20px;
  width: 20px;
}

.learning-destination small {
  color: var(--muted);
  font-size: 13px;
}

.learning-destination button {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  padding: 0;
}

.learning-fast-row {
  align-items: center;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 760;
  gap: 9px;
  line-height: 1.25;
  padding-top: 10px;
}

.learning-fast-row input {
  accent-color: var(--ink);
  flex: 0 0 auto;
  height: 17px;
  margin: 0;
  width: 17px;
}

.ai-chat-page[hidden] {
  display: none;
}

.ai-chat-page {
  background: var(--white);
  display: flex;
  flex-direction: column;
  inset: 0;
  position: absolute;
  z-index: 35;
}

.ai-chat-topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  flex: 0 0 72px;
  gap: 12px;
  grid-template-columns: 42px 1fr 42px;
  padding: 0 18px;
}

.ai-chat-topbar h2,
.ai-chat-topbar p {
  margin: 0;
}

.ai-chat-topbar h2 {
  font-size: 18px;
  line-height: 1.1;
}

.ai-chat-topbar p {
  color: var(--success);
  font-size: 12px;
  font-weight: 760;
}

.ai-chat-icon,
.ai-chat-spark {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.ai-chat-icon {
  cursor: pointer;
}

.ai-chat-icon svg,
.ai-chat-spark svg {
  height: 24px;
  width: 24px;
}

.ai-chat-spark {
  background: color-mix(in srgb, var(--success) 12%, var(--surface-soft));
  color: var(--success);
}

.ai-source-post {
  border-bottom: 1px solid var(--hairline);
  flex: 0 0 auto;
  padding: 12px 18px;
}

.ai-source-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  margin: 0 0 5px;
}

.ai-source-copy {
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.38;
  margin: 0;
  overflow: hidden;
  unicode-bidi: plaintext;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ai-source-copy .pulse-streamdown :where(p, ul, ol, blockquote, pre, table) {
  margin-bottom: 0.25em;
}

.ai-web-status {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1.35;
  padding: 8px 18px;
}

.ai-messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 16px 18px 18px;
}

.ai-messages.is-empty {
  align-items: center;
  justify-content: center;
}

.ai-suggestion-panel {
  display: grid;
  justify-items: center;
  margin: auto;
  max-width: 250px;
  width: 100%;
}

.ai-suggestion-grid {
  display: grid;
  gap: 7px;
  justify-items: center;
  width: min(100%, 214px);
}

.ai-suggestion-grid button {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font-size: 13px;
  font-weight: 540;
  line-height: 1.2;
  min-height: 36px;
  overflow-wrap: anywhere;
  padding: 7px 14px;
  text-align: center;
  width: 100%;
}

.ai-suggestion-grid button:hover {
  background: var(--surface-muted);
  border-color: color-mix(in srgb, var(--ink) 18%, var(--line));
}

.ai-message-empty {
  color: var(--muted);
  font-size: 14px;
  margin: auto;
}

.ai-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 88%;
}

.ai-message.is-user {
  align-self: flex-end;
}

.ai-message.is-assistant {
  align-self: flex-start;
}

.ai-message-content {
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.42;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

.ai-message.is-user .ai-message-content {
  background: var(--blue);
  color: var(--white);
  white-space: pre-wrap;
}

.ai-message.is-assistant .ai-message-content {
  background: var(--surface-soft);
  color: var(--ink);
  white-space: normal;
}

.ai-message-content.is-markdown {
  min-width: 0;
}

.pulse-streamdown {
  display: block;
  min-width: 0;
}

.pulse-streamdown :where(p, ul, ol, blockquote, pre, table, h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
}

.pulse-streamdown :where(p, ul, ol, blockquote, pre, table) {
  margin-bottom: 0.7em;
}

.pulse-streamdown :where(p:last-child, ul:last-child, ol:last-child, blockquote:last-child, pre:last-child, table:last-child) {
  margin-bottom: 0;
}

.pulse-streamdown :where(h1, h2, h3, h4, h5, h6) {
  font-size: 1em;
  line-height: 1.3;
  margin-bottom: 0.45em;
}

.pulse-streamdown :where(ul, ol) {
  padding-inline-start: 1.35em;
}

.pulse-streamdown :where(li) {
  margin: 0.2em 0;
}

.pulse-streamdown :where(code) {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  padding: 0.08em 0.28em;
}

.pulse-streamdown :where(pre) {
  background: #17202c;
  border-radius: 8px;
  color: #f6f8fb;
  overflow-x: auto;
  padding: 10px;
}

.pulse-streamdown :where(pre code) {
  background: transparent;
  color: inherit;
  padding: 0;
}

.pulse-streamdown :where(blockquote) {
  border-left: 3px solid var(--line);
  color: var(--muted);
  padding-left: 10px;
}

.pulse-streamdown :where(a) {
  color: var(--success);
  font-weight: 700;
}

.pulse-streamdown :where(strong, b, [data-streamdown="strong"]),
.post-copy strong,
.post-copy b,
.post-copy [data-streamdown="strong"] {
  font-weight: 800 !important;
}

.pulse-streamdown :where(table) {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  width: 100%;
}

.pulse-streamdown :where(th, td) {
  border: 1px solid var(--line);
  padding: 6px 8px;
}

.ai-answer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-answer-actions button {
  background: color-mix(in srgb, var(--success) 10%, var(--surface-raised));
  border: 1px solid color-mix(in srgb, var(--success) 26%, var(--hairline));
  border-radius: 8px;
  color: var(--success);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  min-height: 34px;
  padding: 0 10px;
}

.ai-answer-actions button:disabled {
  cursor: default;
  opacity: 0.68;
}

.ai-answer-actions span {
  color: var(--muted);
  font-size: 11px;
}

.ai-message-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.ai-message-sources a {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--ink);
  display: inline-block;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 8px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-chat-form {
  align-items: flex-end;
  border-top: 1px solid var(--line);
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  grid-template-columns: 42px 1fr 42px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}

.ai-chat-form textarea {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  max-height: 144px;
  min-height: 42px;
  outline: 0;
  padding: 10px 12px;
  resize: none;
}

.ai-chat-form button {
  align-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.ai-chat-form button:disabled {
  cursor: default;
  opacity: 0.68;
}

.ai-chat-form button svg {
  height: 22px;
  width: 22px;
}

.ai-chat-web-button {
  background: var(--surface-soft);
  color: var(--muted);
}

.ai-chat-web-button.is-active {
  background: color-mix(in srgb, var(--success) 12%, var(--surface-soft));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 45%, transparent);
  color: var(--success);
}

.ai-chat-send-button {
  background: var(--success);
  color: var(--white);
}

.ai-chat-send-button svg {
  transform: rotate(45deg);
}

.agent-page[hidden] {
  display: none;
}

.agent-page {
  --agent-bg: #ffffff;
  --agent-panel: #ffffff;
  --agent-panel-strong: #f7f7f8;
  --agent-line: #ececf1;
  --agent-hairline: #f0f0f0;
  --agent-ink: #202123;
  --agent-muted: #6e6e80;
  --agent-soft: #f7f7f8;
  --agent-chip: #f4f4f5;
  --agent-web: #dff0ff;
  --agent-web-ink: #0b65c2;
  --agent-composer-clearance: 144px;
  --focus-ring: rgba(16, 163, 127, 0.22);
  background: var(--agent-bg);
  color: var(--agent-ink);
  display: flex;
  flex-direction: column;
  inset: 0;
  overflow: hidden;
  position: absolute;
  z-index: 38;
}

.agent-page::before {
  display: none;
}

.agent-page > * {
  position: relative;
  z-index: 1;
}

.agent-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid transparent;
  display: grid;
  flex: 0 0 64px;
  gap: 12px;
  grid-template-columns: 42px 1fr 42px;
  padding: 0 14px;
}

.agent-topbar h2 {
  margin: 0;
}

.agent-topbar h2 {
  color: var(--agent-ink);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.1;
}

.agent-brand {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  min-width: 0;
  text-align: center;
}

.agent-brand-image {
  align-items: center;
  background: #f8f8f4;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  overflow: hidden;
  width: 38px;
}

.agent-brand-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.agent-icon,
.agent-spark {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--agent-ink);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.agent-icon {
  cursor: pointer;
}

.agent-icon:hover {
  background: var(--agent-soft);
}

.agent-icon svg,
.agent-spark svg {
  height: 24px;
  width: 24px;
}

.agent-spark {
  background: var(--agent-soft);
  color: var(--agent-ink);
}

.agent-messages {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding: 10px 20px calc(18px + var(--agent-composer-clearance));
  scroll-padding-bottom: var(--agent-composer-clearance);
  scrollbar-color: rgba(32, 33, 35, 0.18) transparent;
}

.agent-empty {
  align-items: center;
  color: var(--agent-muted);
  display: grid;
  gap: 13px;
  justify-items: center;
  margin: auto;
  max-width: 250px;
  text-align: center;
  width: 100%;
}

.agent-empty-mark {
  align-items: center;
  background: var(--agent-soft);
  border: 1px solid var(--agent-line);
  border-radius: 50%;
  display: inline-flex;
  height: 68px;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  width: 68px;
}

.agent-empty-mark img {
  border-radius: 50%;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.agent-empty h3,
.agent-empty p {
  margin: 0;
}

.agent-empty h3 {
  color: var(--agent-ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

.agent-sample-grid {
  display: grid;
  gap: 7px;
  justify-items: center;
  margin-top: 8px;
  width: min(100%, 214px);
}

.agent-sample-grid button {
  align-items: center;
  background: var(--agent-soft);
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  color: var(--agent-ink);
  cursor: pointer;
  display: grid;
  font-size: 13px;
  font-weight: 540;
  gap: 8px;
  grid-template-columns: 18px 1fr;
  line-height: 1.2;
  min-height: 36px;
  overflow-wrap: anywhere;
  padding: 7px 14px;
  text-align: left;
  width: 100%;
}

.agent-sample-grid svg {
  color: var(--agent-ink);
  height: 16px;
  width: 16px;
}

.agent-sample-grid button:hover {
  background: #eeeeef;
  border-color: #dedee3;
}

.agent-message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 90%;
}

.agent-message.is-user {
  align-self: flex-end;
}

.agent-message.is-assistant {
  align-self: flex-start;
}

.agent-message-content {
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 10px 14px;
  unicode-bidi: isolate;
}

.agent-message.is-user .agent-message-content {
  background: var(--agent-soft);
  color: var(--agent-ink);
  font-weight: 480;
  white-space: pre-wrap;
}

.agent-message.is-assistant .agent-message-content {
  background: transparent;
  border: 0;
  color: var(--agent-ink);
  padding-left: 0;
  padding-right: 0;
}

.agent-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-sources a {
  background: var(--agent-soft);
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  color: var(--agent-ink);
  display: inline-grid;
  font-size: 11px;
  font-weight: 720;
  gap: 2px;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 8px;
  text-decoration: none;
}

.agent-sources strong {
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-sources span {
  color: var(--agent-muted);
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
}

.agent-preview-card,
.agent-result-card,
.agent-created-posts,
.agent-operations {
  background: var(--agent-soft);
  border: 1px solid var(--agent-line);
  border-radius: 16px;
  box-shadow: none;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.agent-preview-card p,
.agent-preview-card h3,
.agent-result-card p,
.agent-result-card h3,
.agent-result-card span,
.agent-created-posts p,
.agent-created-post span,
.agent-operations p,
.agent-operation span {
  margin: 0;
}

.agent-preview-card p,
.agent-result-card p,
.agent-created-posts p,
.agent-operations p {
  color: var(--agent-muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.agent-preview-card h3,
.agent-result-card h3 {
  color: var(--agent-ink);
  font-size: 16px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-preview-card ol {
  color: var(--agent-ink);
  font-size: 13px;
  line-height: 1.34;
  margin: 0;
  padding-left: 20px;
}

.agent-preview-brief,
.agent-preview-meta,
.agent-preview-checklist {
  color: var(--agent-muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

.agent-preview-brief {
  color: var(--agent-ink);
}

.agent-preview-checklist ul {
  color: var(--agent-ink);
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.agent-preview-card li {
  margin: 0 0 6px;
}

.agent-result-card span {
  color: var(--agent-muted);
  font-size: 12px;
}

.agent-created-post-list {
  display: grid;
  gap: 8px;
}

.agent-operation-list {
  display: grid;
  gap: 8px;
}

.agent-operation {
  border-top: 1px solid var(--agent-line);
  display: grid;
  gap: 3px;
  padding-top: 8px;
}

.agent-operation:first-child {
  border-top: 0;
  padding-top: 0;
}

.agent-operation-title {
  color: var(--agent-ink);
  display: block;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
}

.agent-operation-detail {
  color: var(--agent-muted);
  display: block;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

.agent-created-post {
  border-top: 1px solid var(--agent-line);
  display: grid;
  gap: 4px;
  padding-top: 8px;
}

.agent-created-post:first-child {
  border-top: 0;
  padding-top: 0;
}

.agent-created-post-copy {
  color: var(--agent-ink);
  display: block;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  unicode-bidi: isolate;
}

.agent-created-post-meta {
  color: var(--agent-muted);
  display: block;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.agent-preview-card button,
.agent-result-card button {
  background: var(--agent-ink);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  min-height: 36px;
  padding: 0 12px;
  width: fit-content;
}

.agent-form {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 18%);
  border-top: 0;
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  grid-template-columns: 1fr;
  min-width: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  width: 100%;
}

.agent-input-shell {
  background: #ffffff;
  border: 1px solid #dcdde4;
  border-radius: 20px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.06);
  display: grid;
  gap: 2px;
  grid-template-rows: auto auto;
  max-width: 100%;
  min-height: 112px;
  min-width: 0;
  overflow: hidden;
  padding: 10px 9px 8px;
}

.agent-input-shell:focus-within {
  border-color: #c7c7d0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.agent-text-row {
  align-items: start;
  display: grid;
  grid-template-columns: 1fr 34px;
  min-height: 58px;
  min-width: 0;
}

.agent-tool-row {
  align-items: center;
  display: flex;
  gap: 6px;
  min-height: 38px;
  min-width: 0;
  width: 100%;
}

.agent-mode {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  justify-content: center;
  min-width: 0;
  padding: 0;
}

.agent-mode button {
  align-items: center;
  background: var(--agent-soft);
  border: 1px solid var(--agent-line);
  border-radius: 999px;
  color: var(--agent-muted);
  cursor: pointer;
  display: inline-flex;
  flex: 1 1 0;
  font-size: 12px;
  font-weight: 620;
  gap: 5px;
  justify-content: center;
  max-width: 92px;
  min-height: 34px;
  min-width: 0;
  padding: 0 10px;
  white-space: nowrap;
}

.agent-mode button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-mode button.active {
  background: var(--agent-web);
  border-color: #d3e8ff;
  box-shadow: none;
  color: var(--agent-web-ink);
}

.agent-mode button svg {
  height: 15px;
  width: 15px;
}

.agent-tool-button,
.agent-expand,
.agent-web-toggle {
  align-items: center;
  background: var(--agent-soft);
  border: 1px solid var(--agent-line);
  border-radius: 50%;
  color: var(--agent-ink);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.agent-expand {
  background: transparent;
  border-color: transparent;
  color: var(--agent-ink);
}

.agent-tool-button svg,
.agent-expand svg {
  height: 18px;
  width: 18px;
}

.agent-web-toggle {
  color: var(--agent-web-ink);
}

.agent-web-toggle.is-active {
  background: var(--agent-web);
  border-color: #c9e5ff;
  color: var(--agent-web-ink);
}

.agent-web-toggle:disabled {
  cursor: default;
  opacity: 0.68;
}

.agent-web-toggle svg {
  height: 18px;
  width: 18px;
}

.agent-form textarea {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--agent-ink);
  font-size: 16px;
  max-height: 144px;
  min-height: 58px;
  outline: 0;
  overflow-y: auto;
  padding: 8px 6px;
  resize: none;
  scrollbar-width: none;
}

.agent-form textarea:focus-visible {
  outline: 0;
}

.agent-form textarea::placeholder {
  color: var(--agent-muted);
}

.agent-form textarea::-webkit-scrollbar {
  display: none;
}

.agent-send {
  align-items: center;
  background: var(--agent-ink);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  width: 36px;
}

.agent-send svg {
  height: 19px;
  width: 19px;
}

.tabbar {
  align-items: center;
  background: color-mix(in srgb, var(--white) 96%, transparent);
  border-top: 1px solid var(--hairline);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: var(--tabbar-total-height);
  left: 0;
  opacity: var(--feed-chrome-opacity);
  padding: 7px 10px calc(6px + env(safe-area-inset-bottom, 0px));
  position: absolute;
  right: 0;
  transform: translateY(var(--feed-chrome-bottom-shift));
  transition:
    opacity 160ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
  z-index: 20;
}

.app-screen {
  position: relative;
}

.app-screen.feed-chrome-hidden .topbar {
  border-bottom-color: transparent;
  pointer-events: none;
}

.app-screen.feed-chrome-hidden .title-list-menu {
  display: none;
}

.app-screen.feed-chrome-hidden .tabbar {
  pointer-events: none;
}

.app-screen.feed-chrome-tracking .topbar,
.app-screen.feed-chrome-tracking .feed,
.app-screen.feed-chrome-tracking .tabbar {
  transition-duration: 0ms;
}

.tabbar a {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-decoration: none;
}

.tabbar svg {
  height: 26px;
  width: 26px;
}

.tabbar span {
  font-size: 12px;
  line-height: 1.2;
}

.tabbar .active {
  color: var(--ink);
}

.tabbar .active svg {
  fill: currentColor;
}

.sidebar[hidden] {
  display: none;
}

.sidebar {
  inset: 0;
  position: absolute;
  z-index: 70;
}

.sidebar-backdrop {
  background: rgba(17, 23, 34, 0.42);
  inset: 0;
  position: absolute;
}

.sidebar-panel {
  background: var(--surface-raised);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 44px rgba(17, 23, 34, 0.18);
  display: grid;
  gap: 18px;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 100%;
  left: 0;
  max-width: 342px;
  overflow-y: auto;
  padding: 20px 18px calc(var(--tabbar-total-height) + 22px);
  position: absolute;
  top: 0;
  width: min(84vw, 342px);
}

.sidebar-head {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 36px;
}

.access-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.sidebar-head h2 {
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.access-icon {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.access-icon svg {
  height: 22px;
  width: 22px;
}

.access-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.access-panel {
  border-bottom: 1px solid var(--hairline);
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 0 18px;
}

.access-panel input,
.sidebar-create-list input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  min-width: 0;
  padding: 13px 12px;
  width: 100%;
}

.access-panel input::placeholder,
.sidebar-create-list input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.access-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
  min-height: 18px;
}

.access-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.access-secondary {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  min-height: 40px;
  padding: 10px 6px;
}

.access-secondary[hidden],
.access-secondary:disabled {
  display: none;
}

.sidebar-create-list {
  border-bottom: 1px solid var(--hairline);
  display: grid;
  gap: 10px;
  margin: 0;
  padding-bottom: 18px;
}

.sidebar-create-list > div {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 42px;
}

.sidebar-create-list button {
  align-items: center;
  background: var(--active-pill);
  border: 0;
  border-radius: 8px;
  color: var(--active-pill-text);
  cursor: pointer;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  padding: 0;
}

.sidebar-create-list button svg {
  height: 22px;
  width: 22px;
}

.sidebar-section {
  min-width: 0;
}

.sidebar-section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sidebar-section-head h3 {
  font-size: 15px;
  line-height: 1;
  margin: 0;
}

.sidebar-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.archived-list-stack {
  display: grid;
  gap: 8px;
}

.archived-list-stack button {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  justify-items: start;
  min-height: 52px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.archived-list-stack span {
  font-size: 14px;
  font-weight: 760;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archived-list-stack small,
.archived-list-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.archived-list-empty {
  margin: 4px 0 0;
}

.media-viewer[hidden] {
  display: none;
}

.media-viewer-nav[hidden] {
  display: none;
}

.media-viewer {
  inset: 0;
  position: absolute;
  z-index: 50;
}

.media-viewer-backdrop {
  background: rgba(0, 0, 0, 0.94);
  inset: 0;
  position: absolute;
}

.media-viewer-shell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  grid-template-rows: 58px minmax(0, 1fr);
  height: 100%;
  position: relative;
}

.media-viewer-topbar {
  align-items: center;
  color: #fff;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 56px 1fr 56px;
  min-height: 58px;
  padding: 0 6px;
  z-index: 2;
}

.media-viewer-icon,
.media-viewer-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.media-viewer-icon svg,
.media-viewer-nav svg {
  height: 25px;
  width: 25px;
}

.media-viewer-count {
  font-size: 15px;
  font-weight: 700;
  justify-self: center;
  line-height: 1;
  margin: 0;
}

.media-viewer-stage {
  align-items: center;
  display: flex;
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: center;
  margin: 0;
  min-height: 0;
  padding: 10px 14px 34px;
  touch-action: pan-y;
}

.media-viewer-stage img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.media-viewer-nav {
  align-self: center;
  grid-row: 2;
  justify-self: center;
  z-index: 2;
}

.media-viewer-prev {
  grid-column: 1;
}

.media-viewer-next {
  grid-column: 3;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

html[data-device-layout="tablet"] body {
  --viewport-gutter: 0px;
  --viewport-gutter-total: 0px;
  --shell-max-width: 100vw;
  --shell-max-height: 100dvh;
  --shell-radius: 0px;
  --tablet-inline-padding: clamp(22px, 4vw, 40px);
  --tablet-inline-padding-negative: clamp(-40px, -4vw, -22px);
  background: var(--white);
  padding: 0;
}

html[data-device-layout="tablet"] .phone-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  max-width: none;
  width: 100vw;
}

html[data-device-layout="tablet"] .topbar {
  grid-template-columns: 64px 1fr 64px;
  padding-left: var(--tablet-inline-padding);
  padding-right: var(--tablet-inline-padding);
}

html[data-device-layout="tablet"] .composer,
html[data-device-layout="tablet"] .post {
  gap: 14px;
  grid-template-columns: 46px minmax(0, 1fr);
  padding-left: clamp(24px, 4vw, 44px);
  padding-right: clamp(24px, 4vw, 44px);
}

html[data-device-layout="tablet"] .title-list-menu {
  padding-left: var(--tablet-inline-padding);
  padding-right: var(--tablet-inline-padding);
}

html[data-device-layout="tablet"] .avatar {
  height: 46px;
  width: 46px;
}

html[data-device-layout="tablet"] .mini-avatar,
html[data-device-layout="tablet"] .avatar-button {
  height: 40px;
  width: 40px;
}

html[data-device-layout="tablet"] .post-copy {
  font-size: 17px;
  line-height: 1.42;
}

html[data-device-layout="tablet"] .post-body > .post-media,
html[data-device-layout="tablet"] .media-count-1 .post-media {
  max-height: 680px;
}

@media (min-width: 461px) and (max-width: 1180px) and (min-height: 600px) {
  body {
    --viewport-gutter: 0px;
    --viewport-gutter-total: 0px;
    --shell-max-width: 100vw;
    --shell-max-height: 100dvh;
    --shell-radius: 0px;
    --tablet-inline-padding: clamp(22px, 4vw, 40px);
    --tablet-inline-padding-negative: clamp(-40px, -4vw, -22px);
    background: var(--white);
    padding: 0;
  }

  .phone-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    max-width: none;
    width: 100vw;
  }

  .topbar {
    grid-template-columns: 64px 1fr 64px;
    padding-left: var(--tablet-inline-padding);
    padding-right: var(--tablet-inline-padding);
  }

  .composer,
  .post {
    gap: 14px;
    grid-template-columns: 46px minmax(0, 1fr);
    padding-left: clamp(24px, 4vw, 44px);
    padding-right: clamp(24px, 4vw, 44px);
  }

  .title-list-menu {
    padding-left: var(--tablet-inline-padding);
    padding-right: var(--tablet-inline-padding);
  }

  .avatar {
    height: 46px;
    width: 46px;
  }

  .mini-avatar,
  .avatar-button {
    height: 40px;
    width: 40px;
  }

  .post-copy {
    font-size: 17px;
    line-height: 1.42;
  }

  .post-body > .post-media,
  .media-count-1 .post-media {
    max-height: 680px;
  }
}

html[data-device-layout="phone"] body {
  --viewport-gutter: 0px;
  --viewport-gutter-total: 0px;
  background: var(--white);
  padding: 0;
}

html[data-device-layout="phone"] .phone-shell {
  border: 0;
  border-radius: 0;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  max-width: none;
  width: 100vw;
}

@media (max-width: 460px) {
  body {
    --viewport-gutter: 0px;
    --viewport-gutter-total: 0px;
    background: var(--white);
    padding: 0;
  }

  .phone-shell {
    border: 0;
    border-radius: 0;
    height: 100dvh;
    max-height: none;
    max-width: none;
    width: 100vw;
  }

  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .composer,
  .post {
    padding-left: 16px;
    padding-right: 16px;
  }

}

@media (max-width: 375px) {
  .tool-row {
    gap: 14px;
  }

  .composer,
  .post {
    grid-template-columns: 40px 1fr;
  }

  .avatar {
    height: 40px;
    width: 40px;
  }

  .post-head p,
  .post-copy {
    font-size: 15px;
  }

  .post-head strong {
    font-size: 15.5px;
  }

}

@media (max-width: 360px) {
  .agent-form {
    padding-left: 8px;
    padding-right: 8px;
  }

  .agent-input-shell {
    border-radius: 18px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .agent-tool-row,
  .agent-mode {
    gap: 5px;
  }

  .agent-tool-button,
  .agent-web-toggle {
    height: 32px;
    width: 32px;
  }

  .agent-mode button {
    flex: 0 0 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    width: 32px;
  }

  .agent-mode button span {
    display: none;
  }

  .agent-mode button svg {
    height: 16px;
    width: 16px;
  }

  .agent-send {
    height: 34px;
    width: 34px;
  }
}

.display-settings {
  border-bottom: 1px solid var(--hairline);
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}

.display-settings-head {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.display-settings-kicker,
.display-settings h3,
.display-settings-head span {
  margin: 0;
}

.display-settings-kicker {
  color: var(--muted);
  font-size: var(--app-font-xs);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.display-settings h3 {
  color: var(--ink);
  font-size: var(--app-font-control);
  line-height: 1.15;
  margin-top: 6px;
}

.display-settings-head span {
  color: var(--muted);
  font-size: var(--app-font-xs);
  font-weight: 740;
  line-height: 1.2;
  text-align: right;
}

.text-scale-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.text-scale-option {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-height: 54px;
  min-width: 0;
  padding: 9px 10px;
  text-align: left;
}

.text-scale-option span {
  font-size: var(--app-font-ui);
  font-weight: 780;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.text-scale-option small {
  color: var(--muted);
  font-size: var(--app-font-xs);
  font-weight: 740;
  line-height: 1;
}

.text-scale-option.is-active {
  background: color-mix(in srgb, var(--ink) 7%, var(--surface-raised));
  border-color: color-mix(in srgb, var(--ink) 32%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent);
}

.app-screen {
  font-size: var(--app-font-ui);
}

.topbar h1 {
  font-size: var(--app-font-topbar);
}

textarea {
  font-size: var(--app-font-input);
}

.composer-target,
.composer-status,
.draft-media-detail span,
.empty-feed,
.access-message,
.sidebar-section-head span,
.archived-list-empty,
.archived-list-stack small,
.list-detail-main span,
.list-description-card small,
.thread-toggle-copy,
.post-tags span,
.source-learning-label,
.source-learning-chip,
.learned-group-label,
.learned-group-count,
.learned-summary-mark,
.learned-summary-meta,
.learned-collapse-bar span,
.learned-collapse-bar small,
.fast-card-head,
.fast-card-example span,
.media-viewer-count {
  font-size: var(--app-font-xs);
}

.tag-input,
.lesson-action,
.draft-media-detail p,
.access-label,
.access-secondary,
.access-panel input,
.sidebar-create-list input,
.sidebar-section-head h3,
.archived-list-stack span,
.list-detail-card button span,
.list-description-card p,
.post-head p,
.post-more-menu span,
.fast-card-explanation,
.fast-actions button,
.tabbar span {
  font-size: var(--app-font-ui);
}

.post-head strong {
  font-size: var(--app-font-ui-strong);
}

.post-head strong,
.post-head span {
  overflow-wrap: anywhere;
  white-space: normal;
}

.post-copy,
.fast-card-example strong,
.ai-answer-body,
.ai-message-content,
.agent-message-content,
.agent-preview-post p,
.agent-created-post p {
  font-size: var(--app-font-reading);
  overflow-wrap: anywhere;
}

.access-empty p,
.access-empty button,
.access-primary,
.post-button,
.list-detail-main h2,
.fast-card-title {
  font-size: var(--app-font-control);
}

.sidebar-head h2 {
  font-size: var(--app-font-heading);
}

.access-empty h2 {
  font-size: var(--app-font-empty-heading);
}

.sidebar-panel {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  max-width: 390px;
  width: min(92vw, 390px);
}

.list-description-card p,
.post-head p,
.post-copy,
.post-more-menu span,
.fast-card-copy,
.learned-summary-copy,
.archived-list-stack span,
.sidebar-section-head h3,
.display-settings,
.access-panel,
.sidebar-create-list {
  overflow-wrap: anywhere;
}

.post-copy {
  line-height: 1.42;
}

.post-copy :where(pre, code),
.fast-card-copy :where(pre, code),
.ai-message-content :where(pre, code),
.agent-message-content :where(pre, code) {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.post-copy :where(ol, ul),
.fast-card-copy :where(ol, ul),
.ai-message-content :where(ol, ul),
.agent-message-content :where(ol, ul) {
  list-style-position: inside;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding-inline-start: 0;
}

.post-actions span {
  display: none;
}

.post-actions [data-post-action^="learning-"] span {
  display: inline;
  font-size: var(--app-font-2xs);
  line-height: 1.1;
  max-width: 100%;
  white-space: normal;
}

.thread-toggle-copy {
  overflow-wrap: anywhere;
  white-space: normal;
}

.tabbar span {
  font-size: var(--app-font-tabbar);
}

.post-more-menu {
  max-width: min(360px, calc(100vw - 34px));
  min-width: min(260px, calc(100vw - 34px));
}

.post-more-menu button {
  align-items: start;
  height: auto;
  min-height: 38px;
  padding-bottom: 9px;
  padding-top: 9px;
}

html[data-text-scale="extra-large"] .display-settings-head,
html[data-text-scale="huge"] .display-settings-head {
  align-items: start;
  grid-template-columns: 1fr;
}

html[data-text-scale="extra-large"] .display-settings-head span,
html[data-text-scale="huge"] .display-settings-head span {
  text-align: left;
}

html[data-text-scale="extra-large"] .text-scale-options,
html[data-text-scale="huge"] .text-scale-options {
  grid-template-columns: 1fr;
}

html[data-text-scale="huge"] .post,
html[data-text-scale="huge"] .composer {
  grid-template-columns: 34px minmax(0, 1fr);
}

html[data-text-scale="huge"] .post-actions > button,
html[data-text-scale="huge"] .post-action-menu > button {
  height: 36px;
  width: 36px;
}

html[data-text-scale="huge"] .post-actions svg {
  height: 26px;
  width: 26px;
}
