/* The guides, new design: the guide pages' film, notes and tables, and the guides index with its search.
   Loaded after new.css and pages.css. */

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Guide hero ---------- */
.guide-hero h1 { font-size: clamp(36px, 5.2vw, 62px); line-height: 1.02; max-width: 20ch; }
.guide-hero .crumbs span[aria-current] { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.launch-note {
  display: inline-block; margin-top: 16px; padding: 7px 14px; border-radius: 999px;
  background: #ffffffb8; box-shadow: 0 0 0 1px var(--hairline), var(--lift-1);
  font-size: 14px; line-height: 1.45; color: var(--ink);
}
.launch-note a { color: var(--violet); font-weight: 600; text-decoration: none; white-space: nowrap; }
.launch-note a::after { content: " ›"; }
.launch-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- The screen recording under the hero ---------- */
.guide-film { max-width: 1000px; margin: clamp(-40px, -3vw, -16px) auto clamp(48px, 7vw, 80px); padding: 0 var(--gutter); }
.guide-film video, .guide-film img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius);
  background: #f3e9ed; box-shadow: 0 0 0 1px var(--hairline), var(--lift-2);
}
.guide-film figcaption { max-width: 62ch; margin: 16px auto 0; text-align: center; font-size: 16px; line-height: 1.5; font-weight: 500; color: var(--ink); text-wrap: balance; }
.guide-film figcaption small { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--ink-3); }
.page-hero + .article-layout { margin-top: clamp(8px, 2vw, 24px); }

/* ---------- Inside a guide ---------- */
.prose > :first-child { margin-top: 0; }
.prose .callout > * + * { margin-top: .7em; }
.prose .callout p { color: var(--ink); }
.prose .callout ul { margin-top: .6em; }
.prose .answer { background: linear-gradient(180deg, #fff 0%, #fff8fb 100%); box-shadow: 0 0 0 1px #ff5fa833, var(--lift-1); }
.prose .callout-warn { background: #fff8ec; box-shadow: 0 0 0 1px #e8a41440; }
.prose .callout-warn p { font-size: 16px; color: #5a3b06; }
.prose .callout-warn strong { color: #3d2700; }

.prose pre {
  overflow-x: auto; padding: 16px 18px; border-radius: 14px;
  background: #1c1018; color: #fbeef3; box-shadow: var(--lift-1);
  font: 500 13.5px/1.65 ui-monospace, "SF Mono", Menlo, monospace;
}
.prose pre code { padding: 0; background: none; color: inherit; font: inherit; white-space: pre; }
.prose code { overflow-wrap: anywhere; line-height: 1.5; }

.prose .note { margin-top: 12px; font-size: 14px; line-height: 1.55; opacity: 1; color: var(--ink-3); }
.prose .source { margin-top: 10px; font-size: 14px; color: var(--ink-3); }

/* Tables: the two-column facts list, and the wide comparison that scrolls sideways on a phone */
.prose .facts th { width: 34%; padding-left: 0; color: var(--ink); }
.prose .facts td { color: var(--ink-2); }
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--hairline), var(--lift-1);
  /* A soft shadow on the right edge while there's more to scroll to; it slides away at the end */
  background:
    linear-gradient(to left, var(--surface) 40%, #fff0) right center / 48px 100% no-repeat local,
    radial-gradient(farthest-side at 100% 50%, #1c101824, #1c101800) right center / 16px 100% no-repeat scroll,
    var(--surface);
}
.prose .facts.compare { min-width: 920px; font-size: 14px; line-height: 1.45; }
.prose .facts.compare th, .prose .facts.compare td { width: auto; padding: 12px 14px; }
.prose .facts.compare tr:first-child > * { background: #ff5fa80d; color: var(--ink); }
.prose .facts.compare tr:last-child > * { border-bottom: 0; }
.prose .facts.compare th { position: sticky; left: 0; background: var(--surface); box-shadow: 1px 0 0 var(--hairline); }
.prose .facts.compare tr:first-child th { background: #fff5f9; }
@media (max-width: 560px) {
  .prose .facts:not(.compare), .prose .facts:not(.compare) tbody, .prose .facts:not(.compare) tr,
  .prose .facts:not(.compare) th, .prose .facts:not(.compare) td { display: block; width: auto; }
  .prose .facts:not(.compare) tr { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  .prose .facts:not(.compare) th, .prose .facts:not(.compare) td { padding: 0; border: 0; }
  .prose .facts:not(.compare) th { margin-bottom: 4px; }
}

/* ---------- Link cards as lists ---------- */
.guide-cards { list-style: none; margin: 0; padding: 0; }
.guide-cards > li { display: grid; }
.guide-cards > li[hidden] { display: none; }
.related > .h2 { margin-bottom: 28px; }

/* ---------- Guides index ---------- */
.guide-index { max-width: 1080px; }
.guide-tools { display: grid; gap: 14px; justify-items: center; margin: 0 auto clamp(40px, 6vw, 64px); max-width: 720px; }
.guide-tools[hidden] { display: none; }
.guide-search {
  position: relative; display: flex; align-items: center; width: 100%; height: 54px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--hairline-strong), var(--lift-1);
  transition: box-shadow .2s ease;
}
.guide-search:focus-within { box-shadow: 0 0 0 2px var(--violet-ui), 0 8px 28px #ff5fa82e; }
.guide-search > svg { position: absolute; left: 20px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.guide-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0 52px 0 50px; border: 0; border-radius: inherit; background: none;
  font: 400 16px/1 var(--text); color: var(--ink); outline: none; -webkit-appearance: none; appearance: none;
}
.guide-search input::placeholder { color: var(--ink-3); }
.guide-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.guide-search kbd { position: absolute; right: 16px; }
.guide-search:focus-within kbd { display: none; }

.guide-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.guide-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  font: 500 14px/1 var(--text); color: var(--ink-2);
  background: var(--surface); box-shadow: 0 0 0 1px var(--hairline);
  transition: box-shadow .2s ease, color .2s ease, background .2s ease;
}
.guide-chip span { font-size: 12.5px; color: var(--ink-3); }
.guide-chip:hover { color: var(--ink); box-shadow: 0 0 0 1px #ff5fa859; }
.guide-chip[aria-pressed="true"] { background: #1c1018; color: #fff; box-shadow: none; }
.guide-chip[aria-pressed="true"] span { color: #ffffffb3; }
.guide-chip:focus-visible { outline: 2px solid var(--violet-ui); outline-offset: 3px; }
.guide-status { font-size: 13.5px; color: var(--ink-3); min-height: 1.4em; }

.guide-group + .guide-group, .guide-results + .guide-group { margin-top: clamp(48px, 7vw, 72px); }
.guide-group[hidden], .guide-results[hidden] { display: none; }
.guide-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.guide-group-head h2 { font: 700 clamp(24px, 3vw, 30px)/1.15 var(--display); letter-spacing: -.035em; }
.guide-group-head p { font-size: 15px; color: var(--ink-3); }

.guide-hit { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--hairline); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.guide-hit mark { background: #ff5fa833; color: var(--ink); border-radius: 3px; padding: 0 2px; }

.guide-empty { display: grid; justify-items: center; gap: 16px; padding: 40px 0; text-align: center; color: var(--ink-2); }
.guide-empty[hidden] { display: none; }
