.chat-guide {
  --guide-paper: #fffdfa;
  --guide-panel: #fff;
  --guide-wash: #f8f3eb;
  --guide-edge: #e4dbd0;
  --guide-control-edge: #a39486;
  --guide-muted: #645952;
  --guide-accent: #a53525;
  --guide-active: #fcece4;
  --guide-sticky-height: 42px;
  --guide-columns: minmax(165px, .91fr) minmax(0, 1.1fr) minmax(0, 1.19fr) minmax(0, 1.2fr) minmax(0, 1.12fr) minmax(0, 1.18fr);
  max-width: 1280px;
  padding-bottom: 36px;
  font-size: 16px;
  line-height: 1.7;
}

html[data-theme="dark"] .chat-guide {
  --guide-paper: #16141a;
  --guide-panel: #211e25;
  --guide-wash: #28242d;
  --guide-edge: #524953;
  --guide-control-edge: #8b7f8f;
  --guide-muted: #ccc2bc;
  --guide-accent: #ffad96;
  --guide-active: #3a2627;
}

.chat-guide [hidden] { display: none !important; }
.chat-guide [id] { scroll-margin-top: 112px; }
.chat-guide :focus-visible { outline: 2px solid var(--guide-accent); outline-offset: 3px; }
.chat-guide a { color: var(--guide-accent); text-underline-offset: .22em; }
.chat-guide a:hover { text-decoration-thickness: 2px; }
.chat-guide-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.chat-guide-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
}
.chat-guide-back a:hover { text-decoration: underline; }
.chat-guide-hero {
  padding: clamp(17px, 2.4vw, 28px);
  border: 1px solid var(--guide-edge);
  border-radius: 18px;
  background: var(--guide-wash);
}
.chat-guide-hero h1 { font-size: clamp(32px, 4.15vw, 55px); font-weight: 900; letter-spacing: -.045em; line-height: 1.13; }
.chat-guide-title-part { display: inline-block; max-width: 100%; white-space: nowrap; }
.chat-guide-title-number, html[data-theme="dark"] body .chat-guide-title-number { color: var(--guide-accent) !important; }
.chat-guide-hero p { margin-top: 11px; text-wrap: pretty; }
.chat-guide .chat-guide-meta, html[data-theme="dark"] body .chat-guide .chat-guide-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 12px;
  margin-top: 5px;
  color: var(--guide-muted) !important;
  font-size: 13px;
}
.chat-guide-meta a { display: inline-flex; min-height: 28px; align-items: center; font-weight: 700; }
.chat-guide-meta a:hover { text-decoration: underline; }

.chat-guide-directory { margin-top: 18px; }
.chat-guide-filter {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(0, auto) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid var(--guide-edge);
  border-radius: 12px;
  background: var(--guide-wash);
}
.chat-guide-search { min-width: 0; }
.chat-guide-search input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--guide-control-edge);
  border-radius: 7px;
  background: var(--guide-panel);
  color: inherit;
  font: inherit;
}
.chat-guide-filter fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.chat-guide-filter label:not(.chat-guide-sr) {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 9px;
  border: 1px solid var(--guide-control-edge);
  border-radius: 7px;
  background: var(--guide-panel);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.chat-guide .chat-guide-filter input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--guide-accent);
}
.chat-guide-filter label:has(:checked) {
  border-color: var(--guide-accent);
  background: var(--guide-active);
}
.chat-guide-filter button, .chat-guide-actions button, .chat-guide-select,
.chat-guide-comparison button {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--guide-control-edge);
  border-radius: 7px;
  background: var(--guide-panel);
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}
.chat-guide button:hover:not(:disabled) { border-color: var(--guide-accent); }
.chat-guide button:disabled { opacity: .58; cursor: default; }
.chat-guide-sticky {
  position: sticky;
  top: 0;
  z-index: 3;
}
.chat-guide-results {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--guide-edge);
  background: var(--guide-paper);
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.chat-guide-actions { display: flex; gap: 4px; margin-inline-start: auto; }
.chat-guide-actions [data-open-comparison]:not(:disabled),
.chat-guide-select[aria-pressed="true"] { border-color: var(--guide-accent); background: var(--guide-active); }
html[data-theme="dark"] body .chat-guide :is([data-open-comparison]:not(:disabled), .chat-guide-select[aria-pressed="true"]) {
  border-color: var(--guide-accent) !important;
  background: var(--guide-active) !important;
}
.chat-guide .chat-guide-active-filters {
  flex-basis: 100%;
  padding-bottom: 4px;
  color: var(--guide-muted);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.chat-guide-filter-note, html[data-theme="dark"] body .chat-guide .chat-guide-filter-note {
  grid-column: 1 / -1;
  color: var(--guide-muted) !important;
  font-size: 13px;
}
.chat-guide-empty { padding: 20px 14px; border-bottom: 1px solid var(--guide-edge); }
.chat-guide-note, html[data-theme="dark"] body .chat-guide .chat-guide-note {
  margin-top: 9px;
  color: var(--guide-muted) !important;
  font-size: 13px;
}

.chat-guide-columns, .chat-guide-services li {
  display: grid;
  grid-template-columns: var(--guide-columns);
  align-items: stretch;
}
.chat-guide-columns {
  border-bottom: 1px solid var(--guide-edge);
  background: var(--guide-wash);
  font-size: 13px;
  font-weight: 900;
}
.chat-guide-columns > div, .chat-guide-services dl {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: subgrid;
}
.chat-guide-columns span { padding: 9px 14px; }
.chat-guide-services { margin: 0; padding: 0; list-style: none; }
.chat-guide-services li { border-bottom: 1px solid var(--guide-edge); background: var(--guide-panel); }
.chat-guide-services li:nth-child(even) { background: var(--guide-paper); }
.chat-guide .chat-guide-services li[id] { scroll-margin-top: calc(var(--guide-sticky-height) + 8px); }
.chat-guide-services li:target { box-shadow: inset 3px 0 var(--guide-accent); }
.chat-guide-service-head, .chat-guide-services dl > div { min-width: 0; padding: 14px; }
.chat-guide-service-head:has(> .chat-guide-app-icon) {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-content: start;
  align-items: center;
  gap: 4px 9px;
}
.chat-guide-app-icon {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.chat-guide-select {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 38px;
  margin-top: 5px;
}
.chat-guide-service-head:has(> .chat-guide-app-icon) p { grid-column: 1 / -1; }
.chat-guide-service-head:not(:has(> .chat-guide-app-icon)) p { margin-top: 4px; }
.chat-guide-service-head h3 { font-size: clamp(17px, 1.8vw, 22px); font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.chat-guide-service-head p, html[data-theme="dark"] body .chat-guide-service-head p {
  color: var(--guide-muted) !important;
  font-size: 13px;
  line-height: 1.45;
}
.chat-guide-services dl { margin: 0; }
.chat-guide-services dl > div { border-left: 1px solid var(--guide-edge); }
.chat-guide-services dd {
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.chat-guide .chat-guide-unknown, html[data-theme="dark"] body .chat-guide .chat-guide-unknown { color: var(--guide-muted) !important; }
.chat-guide-services dd a, .chat-guide-reading a { text-decoration: underline; }
.chat-guide-key { display: block; margin-bottom: 2px; font-weight: 900; line-height: 1.45; }
.chat-guide-key:only-child { margin-bottom: 0; }
.chat-guide-detail { display: block; color: var(--guide-muted); font-size: .92em; }
html[data-theme="dark"] body .chat-guide .chat-guide-detail { color: var(--guide-muted) !important; }

.chat-guide-comparison {
  box-sizing: border-box;
  width: min(880px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0 14px 14px;
  overflow: auto;
  border: 1px solid var(--guide-control-edge);
  border-radius: 14px;
  background: var(--guide-panel);
  color: inherit;
}
.chat-guide-comparison::backdrop { background: rgb(31 29 27 / .55); }
body:has(.chat-guide-comparison[open]) { overflow: hidden; }
.chat-guide-comparison-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  background: var(--guide-panel);
}
.chat-guide-comparison-head h2 { font-size: clamp(19px, 3vw, 24px); font-weight: 900; }
.chat-guide-comparison-hint { margin: 0 0 8px; font-size: 14px; }
.chat-guide-comparison-scroll { overflow: auto; }
.chat-guide-comparison table { width: 100%; table-layout: fixed; border-spacing: 0; font-size: 14px; line-height: 1.5; }
.chat-guide-comparison :is(th, td) {
  padding: 8px;
  border-bottom: 1px solid var(--guide-edge);
  border-right: 1px solid var(--guide-edge);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.chat-guide-comparison th { background: var(--guide-wash); font-weight: 900; }
.chat-guide-comparison th:first-child {
  position: sticky;
  left: 0;
  width: clamp(68px, 18vw, 124px);
  border-left: 1px solid var(--guide-edge);
}
.chat-guide-comparison thead th { border-top: 1px solid var(--guide-edge); }
.chat-guide-comparison td { background: var(--guide-paper); }
.chat-guide-comparison-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; margin-top: 3px; }
.chat-guide-comparison-links :is(a, button) {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding-inline: 5px;
  font-size: 12px;
}

.chat-guide-reading h2 { font-size: clamp(21px, 3vw, 31px); font-weight: 900; line-height: 1.25; }
.chat-guide-reading { margin-top: clamp(34px, 6vw, 72px); padding-top: 20px; border-top: 2px solid var(--guide-edge); }
.chat-guide-reading-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-guide-reading-head a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 700; }
.chat-guide-reading h3 { margin-bottom: 5px; font-size: 17px; font-weight: 900; line-height: 1.4; }
.chat-guide-reading-grid, .chat-guide-notes { display: grid; gap: 16px; margin-top: 16px; }
.chat-guide-reading-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chat-guide-reading-grid section { padding: 14px; border: 1px solid var(--guide-edge); border-radius: 10px; background: var(--guide-wash); }
.chat-guide-reading p { font-size: 15px; }
.chat-guide-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 16px; border-top: 1px solid var(--guide-edge); }
.chat-guide-reading .chat-guide-sources { margin-top: 8px; font-size: 13px; }
.chat-guide-original {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
}
.chat-guide-original img { width: clamp(88px, 14vw, 150px); height: auto; border-radius: 5px; }

@media (min-width: 1101px) {
  .chat-guide-services dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 1100px) {
  .chat-guide-columns { display: none; }
  .chat-guide-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; margin-top: 8px; }
  .chat-guide-services li { display: block; border: 1px solid var(--guide-edge); border-radius: 10px; }
  .chat-guide-service-head { padding: 12px; }
  .chat-guide-service-head:has(> .chat-guide-app-icon) { gap: 3px 9px; }
  .chat-guide-app-icon { grid-row: span 2; }
  .chat-guide-service-head:has(> .chat-guide-app-icon) p { grid-column: 2; }
  .chat-guide-services dl { display: block; }
  .chat-guide-services dl > div {
    display: grid;
    grid-template-columns: minmax(0, 6em) minmax(0, 1fr);
    gap: 8px;
    padding: 7px 11px;
    border-left: 0;
    border-top: 1px solid var(--guide-edge);
  }
  .chat-guide-services dt { font-size: 13px; font-weight: 900; line-height: 1.6; }
  .chat-guide-reading-grid, .chat-guide-notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .chat-guide-hero { display: block; padding: 0; border: 0; background: none; }
  .chat-guide-hero h1 { max-width: 15em; text-wrap: balance; }
  .chat-guide-hero p { margin-top: 8px; font-size: 14px; }
  .chat-guide-directory { margin-top: 12px; }
  .chat-guide-filter { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 7px; }
  .chat-guide-filter fieldset { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.18fr) minmax(0, 1fr); }
  .chat-guide-filter label:not(.chat-guide-sr) { justify-content: center; padding-inline: 2px; font-size: 12px; gap: 3px; white-space: nowrap; }
  .chat-guide-filter label:has(input[value="web-free"]) { grid-column: 1 / -1; justify-content: flex-start; padding-inline: 8px; }
  .chat-guide .chat-guide-filter input[type="checkbox"] { width: 14px; height: 14px; }
  .chat-guide-select { min-height: 44px; }
  .chat-guide-comparison table[data-count="3"] { min-width: 490px; }
  .chat-guide-comparison { padding-inline: 8px; }
  .chat-guide-comparison :is(th, td) { padding: 6px; }
  .chat-guide-comparison th:first-child { width: 76px; font-size: 12px; word-break: auto-phrase; }
}
@media (max-width: 560px) {
  .chat-guide-services { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 375px) {
  .chat-guide { padding-inline: 12px; }
  .chat-guide-filter fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.chat-guide-tools { margin-top: clamp(28px, 5vw, 48px); padding-top: 20px; border-top: 2px solid var(--guide-edge); }
.chat-guide-tools h2 { font-size: clamp(20px, 2.8vw, 26px); font-weight: 900; line-height: 1.3; }
.chat-guide-tools-lead { margin: 8px 0 14px; font-size: 14px; color: var(--guide-muted); }
.chat-guide-tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chat-guide-tool-card { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 12px 14px; border: 1px solid var(--guide-edge); border-radius: 10px; background: var(--guide-panel); text-decoration: none; }
.chat-guide-tool-card strong { font-size: 15px; font-weight: 900; line-height: 1.4; }
.chat-guide-tool-card span { font-size: 13px; line-height: 1.5; color: var(--guide-muted); }
.chat-guide-tool-card:hover { border-color: var(--guide-accent); background: var(--guide-wash); }
.chat-guide-tools-reads { margin: 14px 0 0; font-size: 14px; line-height: 1.8; }
@media (max-width: 900px) { .chat-guide-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .chat-guide-tools-grid { grid-template-columns: minmax(0, 1fr); } }
.chat-guide-method {
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px solid var(--guide-edge);
  border-radius: 12px;
  background: var(--guide-panel);
  font-size: 14px;
  line-height: 1.7;
}
.chat-guide-method h2 { font-size: 15px; font-weight: 900; margin: 0 0 8px; }
.chat-guide-method ul { margin: 0; padding-left: 1.25em; }
.chat-guide-method li + li { margin-top: 4px; }
