/* Articles for AI Mode Cleaner (Bulk Delete Chats for Google™ AI Mode):
   /ai-mode-history/ and /ai-mode-chats-disappeared/. The layout follows
   /chatgpt-arrows-missing/ (its rules live in that page's <style>): a short answer,
   the install button and a demo on the first screen, the story below. The colour
   here is the extension's sky instead of the lavender of Branch Switcher.
   A file of its own, not site.css: site.css is cached under one ?v= key on every
   page, and these rules matter to two pages only. Since 1.4.0 /ai-mode-cleaner/
   loads it too, for the archive window in its "Keep a copy" card. */

/* ---------------------------------------------------------------- first screen */

.art__hero {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 56px;
  align-items: center;
  padding-top: clamp(24px, 4vw, 44px);
}

.art__text {
  flex: 1 1 420px;
  min-width: 0;
}

.art__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.art__hero .aim-demo {
  max-width: 540px;
}

.answer__label {
  display: none;
  color: var(--sky-ink);
  font-weight: 600;
}

.answer__text {
  margin: 18px 0 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.answer__text a,
.trio a {
  color: var(--sky-ink);
}

.answer__row {
  margin-top: 24px;
}

.answer__small {
  margin-top: 14px;
}

/* Three short answers under the title: where the history is, how to delete it,
   how to keep it. The last one leads to the extension and is set off in sky. */
.trio {
  display: grid;
  margin: 16px 0 0;
}

.trio__item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 2px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.trio__q {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}

.trio__a {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.trio__item--keep {
  margin-top: 4px;
  padding: 12px 16px;
  background: var(--sky-soft);
  border: 1px solid var(--sky-rim);
  border-radius: 12px;
  box-shadow: 0 3px 0 0 var(--sky-rim);
}

.trio__item--keep .trio__q {
  color: var(--sky-ink);
}

.trio__item--keep .trio__a {
  color: var(--ink);
}

.trio + .on-desk .answer__row,
.trio ~ .on-touch {
  margin-top: 20px;
}

/* One forum post with its counter, right on the first screen. */
.proof {
  margin: 22px 0 0;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky-rim);
  border-radius: 10px;
}

.proof blockquote {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

.proof figcaption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--sky-ink);
}

.proof figcaption a {
  color: inherit;
}

/* A phone or tablet can't install the extension: send the link instead. */
.on-touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .on-desk {
    display: none;
  }

  .on-touch {
    display: block;
  }
}

.send .send__note {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--sky-ink);
}

.send__btn {
  margin-top: 10px;
}

.send__copy {
  display: block;
  margin-top: 10px;
  padding: 6px 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--sky-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.send__copy[hidden] {
  display: none;
}

/* Up to 640 px the answer sits on a sky plate and the button spans the width.
   The page name leaves the masthead (it's in the title anyway) and so does
   "All extensions", which goes where the etcetera. mark goes: with them the
   masthead takes two lines and the button falls off a 360×640 first screen. */
@media (max-width: 640px) {
  .masthead .crumbs__sep,
  .masthead .crumbs__item,
  .masthead .nav > a {
    display: none;
  }

  .answer {
    margin-top: 18px;
    padding: 18px 18px 20px;
    background: var(--sky-soft);
    border: 1px solid var(--sky-rim);
    border-radius: 14px;
    box-shadow: 0 4px 0 0 var(--sky-rim);
  }

  .answer__label {
    display: block;
  }

  .answer__text {
    margin-top: 6px;
    font-size: 17px;
    color: var(--ink);
  }

  .send__btn {
    display: block;
    text-align: center;
  }

  .send__copy {
    margin-inline: auto;
  }

  /* The label runs into its answer: a line saved on each, and the send button
     stays on the first screen. */
  .trio__item {
    display: block;
    padding: 10px 0;
  }

  .trio__q,
  .trio__a {
    display: inline;
  }

  .trio__q {
    margin-right: 4px;
  }

  .trio__q::after {
    content: '.';
  }

  .trio__item--keep {
    padding: 12px 14px;
  }

  .trio__a {
    font-size: 15.5px;
  }

  .proof blockquote {
    font-size: 15px;
  }
}

/* The table of contents as a row of links under the first screen. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.chips .eyebrow {
  margin: 0 6px 0 0;
  color: var(--muted);
}

.chips a {
  padding: 6px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
}

.chips a:hover {
  background: var(--line-soft);
  color: var(--ink);
}

/* ---------------------------------------------------------------- the story */

.art .doc__body {
  margin-top: 32px;
}

.art .doc__intro {
  margin-top: 0;
}

.doc__body h3 {
  margin: 32px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.quote {
  margin: 16px 0 0;
  padding: 16px 20px;
  background: var(--sky-soft);
  border: 1px solid var(--sky-rim);
  border-radius: 12px;
  box-shadow: 0 3px 0 0 var(--sky-rim);
}

.quote blockquote {
  margin: 0;
}

.doc__body .quote p {
  margin: 0;
  color: var(--ink);
}

.quote figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  color: var(--sky-ink);
}

.quote figcaption a {
  color: inherit;
}

/* Steps people can take themselves. */
.doc__body ol.steps {
  gap: 12px;
}

.doc__body ol.steps strong {
  color: var(--ink);
}

kbd {
  font: inherit;
  font-weight: 600;
}

/* ---------------------------------------------------------------- archive demo */

/* The extension's "Chat archive" page (1.4.0) in a small browser window: the
   window is the .aim frame of the AI Mode demo (site.css), the page inside
   follows extensions/ai-mode-cleaner/entrypoints/archive/style.css, and its words
   are the extension's own (src/i18n/messages/en.ts, archive and panel). The markup
   is the first frame; assets/aimc-archive-demo.js types a search into it once and
   then leaves the window to the visitor. */
.arc {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.4 var(--font-body);
}

.arc__top {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.arc__top svg {
  flex: none;
}

.arc__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.arc__search {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 10px;
  height: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.arc__search:focus-within {
  border-color: var(--sky-rim);
  box-shadow: 0 0 0 2px var(--sky-soft);
}

.arc__search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  outline: 0;
  font: inherit;
  color: var(--ink);
}

.arc__search input::-webkit-search-cancel-button {
  display: none;
}

.arc__count {
  flex: none;
  font-size: 12.5px;
  color: var(--muted);
}

.arc__body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.arc__list {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 236px;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.arc__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 12px 8px;
}

.arc__chip {
  padding: 3px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 12px/1.35 var(--font-body);
  color: var(--ink-3);
  cursor: pointer;
}

.arc__chip[aria-pressed='true'] {
  background: var(--sky-soft);
  border-color: var(--sky-rim);
  color: var(--sky-ink);
}

.arc__items {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: none;
}

.arc__items::-webkit-scrollbar {
  display: none;
}

.arc__item {
  display: block;
  width: 100%;
  padding: 9px 12px 10px;
  background: none;
  border: 0;
  border-top: 1px solid var(--line-soft);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.arc__item:hover {
  background: var(--paper);
}

.arc__item[aria-current='true'] {
  background: var(--paper);
  box-shadow: inset 3px 0 0 var(--sky-rim);
}

.arc__t {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arc__m {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.arc__m.is-lost {
  color: #8a4b00;
  font-weight: 500;
}

.arc__s {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-3);
}

.arc mark {
  padding: 0 2px;
  background: var(--sky-soft);
  border-radius: 3px;
  color: inherit;
}

.arc__none {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13px;
}

.arc__read {
  flex: 1;
  min-width: 0;
  padding: 14px 18px 0;
  overflow: hidden;
  overflow: clip;
  background: var(--paper);
  mask-image: linear-gradient(#000 calc(100% - 28px), transparent);
}

.arc__lost {
  display: inline-block;
  margin: 0;
  padding: 3px 9px;
  background: #fdebd3;
  border: 1px solid #d9a35a;
  border-radius: 999px;
  color: #8a4b00;
  font-size: 12px;
  font-weight: 600;
}

.arc__lost[hidden] {
  display: none;
}

.arc__rt {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.arc__rm {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.arc__q {
  margin: 14px 0 0 auto;
  width: fit-content;
  max-width: 88%;
  padding: 8px 13px;
  background: var(--line-soft);
  border-radius: 16px 5px 16px 16px;
  font-size: 13.5px;
}

.arc__a {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* A narrow window keeps the list, as the archive does. */
@container (max-width: 470px) {
  .arc__read,
  .arc__count {
    display: none;
  }

  .arc__list {
    flex: 1;
    width: auto;
    border-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arc * {
    transition: none !important;
  }
}
