/*
 * Home (home/show): the progress ladder is the hero, the rest sits flat on
 * the page under section headers. The header parts live in the shell's
 * .app-head; the page content is .pg-home. Shared pieces (cards, buttons,
 * chips, meters, nodes, covers) come from ui.css. Every rule is scoped under
 * .shell: Propshaft links every stylesheet on every page.
 */

/* ── Header (inside the shell's .app-head) ── */
.shell .home-head { min-width: 0; }
.shell .home-site { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shell .home-site .app-fav { width: 28px; height: 28px; padding: 3px; border-radius: 8px; }
.shell .home-site h1 { min-width: 0; }
.shell .home-site .ui-chip { flex: none; }

.shell .app-head__title .home-status {
  display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px;
  margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--app-ink-2);
}
.shell .home-status > span { display: inline-flex; align-items: center; }
.shell .home-status > span + span::before { content: '·'; margin: 0 8px; color: var(--app-ink-3); }
.shell .home-status b { font-weight: 600; color: var(--app-ink); }
.shell .home-dot { flex: none; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--app-ember); animation: app-ping 2.4s ease-out infinite; }
.shell .home-dot.is-off { background: var(--app-ink-3); animation: none; }
.shell .home-dot.is-paused { background: var(--app-amber); animation: none; }
.shell .home-status__warn { color: var(--app-accent); font-weight: 600; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* Held (a paused subscription, a hold from the Monday email): the sentence
   and its Resume, a link-weight button like the plan warning. */
.shell .home-status__hold { flex-wrap: wrap; column-gap: 10px; row-gap: 2px; }
.shell .home-status__form { display: inline-flex; margin: 0; }
.shell .home-status__resume {
  padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600; color: var(--app-accent);
  text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.shell .home-status__resume:hover { opacity: 0.85; }
.shell .home-status__resume:focus-visible { outline: 2px solid var(--app-focus); outline-offset: 2px; border-radius: 4px; }

.shell .home-pace {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--app-ink-2); font: inherit;
  text-decoration: underline dotted var(--app-ink-3); text-underline-offset: 3px;
  transition: color 0.15s var(--app-ease);
}
.shell .home-pace svg { color: var(--app-ink-3); }
.shell .home-pace:hover, .shell .ui-popover.is-open .home-pace { color: var(--app-ink); text-decoration-color: currentColor; }
.shell .home-pace__panel { width: 300px; }
.shell .home-pace__form { display: grid; gap: 12px; }
.shell .home-pace__form .app-menu__label { padding: 0; }
.shell .home-pace__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shell .home-pace__a { font-size: 13px; color: var(--app-ink-2); }
.shell .home-pace__hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--app-ink-3); }
.shell .home-pace__form .ui-btn { justify-self: start; }

/* "Paced to match Google" (IndexPace): a chip that opens its reason. The
   chip's ring separates it from the pace, so no dot that would start a
   wrapped line on phones. */
.shell .home-status > span:has(+ .home-status__paced) { margin-right: 8px; }
.shell .home-status > .home-status__paced::before { content: none; }
.shell .home-paced { border: 0; cursor: pointer; transition: box-shadow 0.15s var(--app-ease), color 0.15s var(--app-ease); }
.shell .home-paced:hover, .shell .ui-popover.is-open .home-paced { color: var(--app-ink); box-shadow: inset 0 0 0 1px var(--app-ink-3); }
.shell .home-paced:focus-visible { outline: 2px solid var(--app-focus); outline-offset: 2px; }
.shell .home-paced__panel { width: 320px; }
.shell .home-paced__body { display: grid; gap: 10px; }
.shell .home-paced__body .app-menu__label { padding: 0; }
.shell .home-paced__text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--app-ink); }
.shell .home-paced__hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--app-ink-3); }
.shell .home-paced__form { margin: 2px 0 0; }

.shell .home-switch__form { display: inline-flex; margin: 0; }

/* ── The ladder ── */
.shell .pg-home .home-lq { container: home-ladder / inline-size; }
.shell .pg-home .home-ladder { position: relative; padding: 12px 12px 0; }
.shell .pg-home .home-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }

.shell .pg-home .home-step {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start;
  grid-template-areas: "top top" "num delta" "meter meter" "say say" "act act";
  min-width: 0; padding: 20px 20px 22px; border-radius: 12px;
}
.shell .pg-home .home-step > * { position: relative; z-index: 1; min-width: 0; }
.shell .pg-home .home-step.is-current::before {
  content: ''; position: absolute; inset: 0; z-index: 0; border-radius: 12px; pointer-events: none;
  background: var(--app-warm-panel); box-shadow: inset 0 0 0 1px var(--app-warm-line);
}

.shell .pg-home .home-step__top { grid-area: top; display: flex; align-items: center; gap: 10px; height: 18px; z-index: 2; }
.shell .pg-home .home-step__label {
  margin: 0; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--app-ink-2); white-space: nowrap;
}
.shell .pg-home .home-step.is-current .home-step__label { color: var(--app-accent); }
.shell .pg-home .home-step__rung {
  flex: 1; min-width: 12px; height: 1px; margin: 0 -32px 0 4px;
  background: repeating-linear-gradient(90deg, var(--app-hair-2) 0 4px, transparent 4px 8px);
}
.shell .pg-home .home-step.is-done .home-step__rung { background: var(--app-sheen); }

.shell .pg-home .home-step__short, .shell .pg-home .home-step__frac { display: none; }

.shell .pg-home .home-step__num { grid-area: num; display: flex; align-items: baseline; gap: 2px; min-height: 56px; margin: 20px 0 0; color: var(--app-ink); white-space: nowrap; }
.shell .pg-home .home-step__num b {
  font-family: var(--f-display); font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums;
}
.shell .pg-home .home-step__den { font-family: var(--f-display); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--app-ink-3); font-variant-numeric: tabular-nums; }
.shell .pg-home .home-step.is-ahead .home-step__num b { color: var(--app-ink-3); }
.shell .pg-home .home-step.is-hatched .home-step__num { align-items: center; }

.shell .pg-home .home-step__delta {
  grid-area: delta; align-self: end; display: inline-flex; align-items: center; gap: 3px; margin: 0 0 6px; padding-left: 8px;
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; color: var(--app-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.shell .pg-home .home-step__delta svg { color: var(--app-ember); }
.shell .pg-home .home-step__delta span { white-space: pre; }

.shell .pg-home .home-step__meter { grid-area: meter; margin-top: 16px; }
.shell .pg-home .home-step__say { grid-area: say; margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--app-ink-2); text-wrap: pretty; overflow-wrap: break-word; }
.shell .pg-home .home-step__say b { font-weight: 600; color: var(--app-ink); }
.shell .pg-home .home-step__act { grid-area: act; display: flex; margin-top: 12px; }
.shell .pg-home .home-step__form { display: flex; margin: 0; }
.shell .pg-home .home-step__ask { margin: 0; font-size: 13px; line-height: 1.45; color: var(--app-ink-3); }
/* The label wraps rather than being cut in a narrow column. */
.shell .pg-home .home-step__cta { max-width: 100%; height: auto; min-height: 36px; padding-top: 8px; padding-bottom: 8px; white-space: normal; line-height: 1.25; text-align: left; }

.shell .pg-home .home-ladder__foot {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  min-height: 44px; margin: 6px 8px 0; padding: 8px 12px; border-top: 1px solid var(--app-hair);
  font-size: 12.5px; color: var(--app-ink-3);
}
.shell .pg-home .home-ladder__note { display: inline-flex; align-items: center; gap: 7px; }
.shell .pg-home .home-ladder__note svg { flex: none; }
.shell .pg-home .home-ladder.is-complete .home-ladder__note svg { color: var(--app-ok); }
.shell .pg-home .home-how { font-size: 12.5px; }
/* One step per row, hairlines between them. */
.shell .pg-home .home-how__panel {
  top: auto; bottom: calc(100% + 8px); left: auto; right: 0; display: grid; padding: 4px 18px;
  transform-origin: bottom right; transform: translateY(4px) scale(0.985);
}
.shell .pg-home .home-how__item { display: grid; align-content: start; gap: 4px; padding: 11px 0; }
.shell .pg-home .home-how__item + .home-how__item { border-top: 1px solid var(--app-hair); }
.shell .pg-home .home-how__label {
  display: flex; justify-content: space-between; gap: 12px; margin: 0;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--app-ink);
}
.shell .pg-home .home-how__label span { font-size: 11.5px; font-weight: 400; color: var(--app-ink-3); letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.shell .pg-home .home-how__say { display: none; margin: 0; font-size: 13px; line-height: 1.45; color: var(--app-ink); }
.shell .pg-home .home-how__say b { font-weight: 600; }
.shell .pg-home .home-how__src { margin: 0; font-size: 13px; line-height: 1.5; color: var(--app-ink-2); }
.shell .pg-home .home-how__engines { font-size: 12.5px; color: var(--app-ink-3); }

/* The current step gets a little more room for its sentence and button.
   "How Balzac counts" puts each step's name and number in a left column
   and how it is counted beside them, so the five rows line up. */
@container home-ladder (min-width: 720px) {
  .shell .pg-home .home-how__panel { width: 600px; }
  .shell .pg-home .home-how__item { grid-template-columns: 112px minmax(0, 1fr); column-gap: 20px; }
  .shell .pg-home .home-how__item > * { grid-column: 2; }
  .shell .pg-home .home-how__label { grid-column: 1; grid-row: 1 / span 2; flex-direction: column; justify-content: start; gap: 4px; padding-top: 2px; }
  .shell .pg-home .home-how__src { font-size: 13.5px; line-height: 1.45; color: var(--app-ink); }
  .shell .pg-home .home-how__engines { font-size: 12.5px; color: var(--app-ink-3); }
  .shell .pg-home .home-steps:has(> .is-current:nth-child(1)) { grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; }
  .shell .pg-home .home-steps:has(> .is-current:nth-child(2)) { grid-template-columns: 1fr 1.3fr 1fr 1fr 1fr; }
  .shell .pg-home .home-steps:has(> .is-current:nth-child(3)) { grid-template-columns: 1fr 1fr 1.3fr 1fr 1fr; }
  .shell .pg-home .home-steps:has(> .is-current:nth-child(4)) { grid-template-columns: 1fr 1fr 1fr 1.3fr 1fr; }
  .shell .pg-home .home-steps:has(> .is-current:nth-child(5)) { grid-template-columns: 1fr 1fr 1fr 1fr 1.3fr; }
}

@container home-ladder (max-width: 1000px) {
  .shell .pg-home .home-step { padding: 18px 16px 20px; grid-template-areas: "top top" "num num" "delta delta" "meter meter" "say say" "act act"; }
  .shell .pg-home .home-step__delta { justify-self: start; margin: 6px 0 0; padding-left: 0; }
  .shell .pg-home .home-step__rung { margin-right: -24px; }
  .shell .pg-home .home-step__num b { font-size: 44px; }
  .shell .pg-home .home-step__num { min-height: 48px; }
}

/* Under 720px the ladder is a compact list: number, node and label with one
   short line, "10 of 12" and "+3", then the meter. The sentences move into
   "How Balzac counts". */
@container home-ladder (max-width: 719.98px) {
  .shell .pg-home .home-ladder { padding: 4px 4px 0; }
  .shell .pg-home .home-steps { grid-template-columns: minmax(0, 1fr); }
  .shell .pg-home .home-step {
    grid-template-columns: 52px minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
    grid-template-areas: "num top frac" "num short delta" "meter meter meter" "act act act";
    min-height: 64px; padding: 8px 12px 10px;
  }
  .shell .pg-home .home-step + .home-step::after { content: ''; position: absolute; top: 0; left: 12px; right: 12px; height: 1px; background: var(--app-hair); }
  .shell .pg-home .home-step.is-current::after, .shell .pg-home .home-step.is-current + .home-step::after { content: none; }
  .shell .pg-home .home-step__top { gap: 8px; height: auto; }
  .shell .pg-home .home-step__rung { display: none; }
  .shell .pg-home .home-step__short { display: block; grid-area: short; margin: 1px 0 0; font-size: 12.5px; line-height: 1.3; color: var(--app-ink-3); }
  .shell .pg-home .home-step__num { align-self: center; min-height: 0; margin: 0; }
  .shell .pg-home .home-step__num b { font-size: 34px; }
  .shell .pg-home .home-step__den { display: none; }
  .shell .pg-home .home-step__hatch { width: 36px; height: 28px; border-radius: 6px; }
  .shell .pg-home .home-step__frac {
    display: block; grid-area: frac; justify-self: end; margin: 0;
    font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums;
  }
  .shell .pg-home .home-step__delta { justify-self: end; align-self: center; margin: 2px 0 0; padding: 0; font-size: 11px; }
  .shell .pg-home .home-step__delta span { display: none; }
  .shell .pg-home .home-step__meter { height: 3px; margin-top: 8px; }
  .shell .pg-home .home-step__say { display: none; }
  .shell .pg-home .home-step__act { margin-top: 10px; }
  .shell .pg-home .home-step__act .ui-link { min-height: 28px; margin-top: -4px; }
  .shell .pg-home .home-step__cta { width: 100%; height: 44px; }
  .shell .pg-home .home-ladder__foot { flex-wrap: nowrap; align-items: center; gap: 12px; margin: 2px 8px 0; padding: 8px 4px; }
  .shell .pg-home .home-ladder__note { flex: 1 1 auto; font-size: 12px; line-height: 1.35; }
  .shell .pg-home .home-ladder__note svg { display: none; }
  .shell .pg-home .home-how { min-height: 44px; }
  .shell .pg-home .home-how__say { display: block; }
  .shell .pg-home .home-how__panel { right: auto; left: -8px; transform-origin: bottom left; max-height: min(70dvh, 480px); overflow-y: auto; }
}

/* ── Two columns ── */
.shell .pg-home .home-cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); gap: 56px; margin-top: 40px; }
.shell .pg-home .home-side { display: grid; align-content: start; gap: 40px; min-width: 0; }

.shell .pg-home .home-sec { min-width: 0; }
.shell .pg-home .home-sec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; padding-bottom: 12px; border-bottom: 1px solid var(--app-hair); }
.shell .pg-home .home-sec__title { margin: 0; white-space: nowrap; font-family: var(--f-display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--app-ink); }
.shell .pg-home .home-sec__meta { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--app-ink-3); white-space: nowrap; }
.shell .pg-home .home-sec__sub { margin: 12px 0 0; font-size: 13px; color: var(--app-ink-3); }
.shell .pg-home .home-eyebrow { margin: 0 0 4px; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--app-ink-3); }
.shell .pg-home .home-kicker { display: block; margin: 0; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--app-ink-3); }
.shell .pg-home .home-kicker--accent { color: var(--app-accent); }
.shell .pg-home .home-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--app-ink-3); }

/* ── This week ── */
.shell .pg-home .home-feed, .shell .pg-home .home-feed__items { margin: 0; padding: 0; list-style: none; }
.shell .pg-home .home-feed__day { padding-top: 24px; }
.shell .pg-home .home-feed__day:first-child { padding-top: 16px; }
.shell .pg-home .home-feed__item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; }
.shell .pg-home .home-feed__thumb { border-radius: 8px; }
.shell .pg-home .home-feed__text { margin: 0; padding-top: 4px; font-size: 14px; line-height: 1.45; color: var(--app-ink-2); overflow-wrap: anywhere; }
.shell .pg-home .home-feed__text b { font-weight: 600; color: var(--app-ink); }
.shell .pg-home .home-feed__link,
.shell .pg-home .home-lead__title a,
.shell .pg-home .home-first__title a {
  color: var(--app-ink); font-weight: 500; text-decoration: none;
  background: linear-gradient(var(--app-hair-2), var(--app-hair-2)) no-repeat 0 100% / 100% 1px;
  transition: background-image 0.15s var(--app-ease);
}
.shell .pg-home .home-lead__title a, .shell .pg-home .home-first__title a { font-weight: inherit; background-size: 0 1px; }
.shell .pg-home .home-feed__link:hover,
.shell .pg-home .home-lead__title a:hover,
.shell .pg-home .home-first__title a:hover { background-image: linear-gradient(var(--app-ember), var(--app-ember)); background-size: 100% 1px; }
.shell .pg-home .home-feed__meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--app-ink-3); }
.shell .pg-home .home-feed__time { padding-top: 6px; font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

.shell .pg-home .home-lead { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 20px; align-items: start; padding: 12px 0 16px; }
.shell .pg-home .home-lead__cover { display: block; border-radius: 10px; }
.shell .pg-home .home-lead__body { min-width: 0; }
.shell .pg-home .home-lead__title {
  margin: 6px 0 0; font-family: var(--f-display); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--app-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shell .pg-home .home-lead__desc {
  margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--app-ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shell .pg-home .home-lead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 10px 0 0; font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-3); }

.shell .pg-home .home-writing {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 16px 0 14px;
  border-bottom: 1px solid var(--app-hair); color: inherit; text-decoration: none;
}
.shell .pg-home .home-writing__tile i {
  position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--app-ember); box-shadow: 0 0 0 2px var(--app-bg); animation: home-pulse 2s ease-out infinite;
}
.shell .pg-home .home-writing__body { display: grid; gap: 4px; min-width: 0; }
.shell .pg-home .home-writing__title { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--app-ink); }
.shell .pg-home .home-writing:hover .home-writing__title { text-decoration: underline; text-decoration-color: var(--app-ember); text-underline-offset: 3px; }
.shell .pg-home .home-writing__meta { font-size: 12.5px; color: var(--app-ink-3); }
.shell .pg-home .home-writing__meter { margin-top: 6px; }
.shell .pg-home .home-writing__meter i { background-size: 200% 100%; animation: home-shimmer 1.6s linear infinite; background-image: linear-gradient(90deg, #ffe0b5 0%, #ffa552 30%, #ff5a3c 50%, #ffa552 70%, #ffe0b5 100%); }

.shell .pg-home .home-first {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 20px; align-items: center;
  margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--app-surface); box-shadow: 0 0 0 1px var(--app-hair);
}
.shell .pg-home .home-first__cover { display: block; border-radius: 10px; }
.shell .pg-home .home-first__body { min-width: 0; }
.shell .pg-home .home-first__title { margin: 6px 0 0; font-family: var(--f-display); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--app-ink); }
.shell .pg-home .home-first__meta { margin: 4px 0 10px; font-size: 13px; color: var(--app-ink-2); }

.shell .pg-home .home-feed__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--app-hair); font-size: 12.5px; color: var(--app-ink-3);
}
.shell .pg-home .home-last { margin-top: 24px; }

/* ── Up next ── */
.shell .pg-home .home-queue__list { margin: 4px 0 0; padding: 0; list-style: none; }
.shell .pg-home .home-qrow { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--app-hair); }
.shell .pg-home .home-qrow__when {
  display: grid; align-content: center; justify-items: center; gap: 3px; width: 40px; height: 44px;
  border-radius: 8px; background: var(--app-surface); box-shadow: inset 0 0 0 1px var(--app-hair);
}
.shell .pg-home .home-qrow__when b { font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-ink-3); line-height: 1; }
.shell .pg-home .home-qrow__when span { font-family: var(--f-display); font-size: 15px; font-weight: 700; line-height: 1; color: var(--app-ink); font-variant-numeric: tabular-nums; }
.shell .pg-home .home-qrow__when.is-first:not(.is-label) b { color: var(--app-accent); }
.shell .pg-home .home-qrow__when.is-label { background: var(--app-hover); }
.shell .pg-home .home-qrow__when.is-label b { color: var(--app-ink-2); letter-spacing: 0.02em; }
.shell .pg-home .home-qrow__body { min-width: 0; }
.shell .pg-home .home-qrow__title {
  margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--app-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shell .pg-home .home-qrow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 3px 0 0; font-size: 12.5px; color: var(--app-ink-3); }
.shell .pg-home .home-qrow__gsc { margin: 3px 0 0; font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-2); font-variant-numeric: tabular-nums; }
.shell .pg-home .home-qrow.is-new { animation: home-arrive 0.5s var(--app-ease) both; }
.shell .pg-home .home-queue__empty { margin-top: 16px; }
.shell .pg-home .home-queue__review { margin-top: 12px; }

.shell .pg-home .home-ask { margin-top: 20px; }
.shell .pg-home .home-ask__field { position: relative; display: flex; align-items: center; }
.shell .pg-home .home-ask__spark { position: absolute; left: 14px; color: var(--app-ink-3); pointer-events: none; }
.shell .pg-home .home-ask input {
  width: 100%; height: 48px; padding: 0 52px 0 40px; border: 0; border-radius: 12px;
  background: var(--app-surface); box-shadow: inset 0 0 0 1px var(--app-hair-2);
  color: var(--app-ink); font: inherit; font-size: 14.5px;
  transition: box-shadow 0.15s var(--app-ease);
}
.shell .pg-home .home-ask input::placeholder { color: var(--app-ink-3); opacity: 1; }
.shell .pg-home .home-ask input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--app-focus), 0 0 0 4px rgba(255, 106, 61, 0.14); }
.shell .pg-home .home-ask__send {
  position: absolute; right: 8px; display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 0; border-radius: 9px; background: var(--app-ink); color: var(--app-bg); cursor: pointer;
  transition: opacity 0.15s var(--app-ease);
}
.shell .pg-home .home-ask__send:hover { opacity: 0.86; }
.shell .pg-home .home-ask__hint { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 8px 0 0; font-size: 12px; color: var(--app-ink-3); }
.shell .pg-home .home-ask__more { color: var(--app-ink-2); font-weight: 500; text-decoration: none; }
.shell .pg-home .home-ask__more:hover { color: var(--app-ink); text-decoration: underline; text-underline-offset: 3px; }
.shell .pg-home .home-ask__hint.is-error { color: var(--app-hot); }
html.dark .shell .pg-home .home-ask__hint.is-error { color: #fca5a5; }

/* ── Google Search ── */
.shell .pg-home .home-search__range { font-family: var(--f-mono); font-size: 11.5px; }
.shell .pg-home .home-gsc { position: relative; display: grid; gap: 20px; padding-top: 16px; }
.shell .pg-home .home-metric__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.shell .pg-home .home-metric__value { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.shell .pg-home .home-metric__value b { font-family: var(--f-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--app-ink); font-variant-numeric: tabular-nums; }
.shell .pg-home .home-metric__value span { font-size: 13px; color: var(--app-ink-2); }
.shell .pg-home .home-delta { display: inline-flex; align-items: center; gap: 3px; margin: 0; font-family: var(--f-mono); font-size: 11.5px; color: var(--app-ink-2); white-space: nowrap; }
.shell .pg-home .home-delta svg { color: var(--app-ember); }
.shell .pg-home .home-delta.is-down svg { color: var(--app-ink-3); }

.shell .pg-home .home-spark { position: relative; height: 44px; margin-top: 10px; touch-action: pan-y; cursor: crosshair; }
.shell .pg-home .home-spark svg { display: block; width: 100%; height: 44px; overflow: visible; }
.shell .pg-home .home-spark__base { stroke: var(--app-hair-2); stroke-width: 1; }
.shell .pg-home .home-spark__bar { fill: var(--app-ink-3); opacity: 0.35; transition: opacity 0.12s var(--app-ease); }
.shell .pg-home .home-spark__bar.is-hot { fill: var(--app-ember); opacity: 1; }
.shell .pg-home .home-spark__area { fill: var(--app-amber); fill-opacity: 0.12; }
.shell .pg-home .home-spark__line { fill: none; stroke: var(--app-amber); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.shell .pg-home .home-spark__cross { stroke: var(--app-ink-3); stroke-width: 1; stroke-dasharray: 2 2; opacity: 0; }
.shell .pg-home .home-spark.is-hover .home-spark__cross { opacity: 1; }
.shell .pg-home .home-spark__dot {
  position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--app-surface); box-shadow: 0 0 0 2px var(--app-amber); opacity: 0; pointer-events: none;
}
.shell .pg-home .home-spark.is-hover .home-spark__dot { opacity: 1; }
.shell .pg-home .home-spark__axis { display: flex; justify-content: space-between; margin-top: -12px; font-family: var(--f-mono); font-size: 10.5px; color: var(--app-ink-3); }
.shell .pg-home .home-tip {
  position: absolute; top: 4px; z-index: 5; transform: translate(-50%, -100%); pointer-events: none;
  padding: 5px 8px; border-radius: 7px; background: var(--app-ink); color: var(--app-bg);
  font-family: var(--f-mono); font-size: 11px; white-space: nowrap;
}
.shell .pg-home .home-tip[hidden] { display: none; }
.shell .pg-home .home-search__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--app-hair); font-size: 12.5px; color: var(--app-ink-3);
}

@keyframes home-pulse { 0% { box-shadow: 0 0 0 2px var(--app-bg), 0 0 0 2px rgba(255, 90, 60, 0.5); } 70%, 100% { box-shadow: 0 0 0 2px var(--app-bg), 0 0 0 8px rgba(255, 90, 60, 0); } }
@keyframes home-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes home-arrive { from { opacity: 0; transform: translateY(-4px); } }

/* ── Narrow windows and phones ── */
@media (max-width: 1023.98px) {
  .shell .pg-home .home-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 32px; }
  .shell .pg-home .home-side { gap: 32px; }

  /* The top bar's switcher already names the site: keep the h1 for screen
     readers only. */
  .shell .home-site { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .shell .app-head__title .home-status { margin-top: 0; }
  .shell .home-status .home-status__next { flex-basis: 100%; margin-top: 2px; }
  .shell .home-status .home-status__next::before { content: none; }
  /* The status line next to it says "Autopilot on/off": the switch keeps
     its label for screen readers only. */
  .shell .ui-switch.home-switch { height: 44px; padding: 0 12px; }
  .shell .home-switch .ui-switch__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .shell .home-pace { min-height: 32px; }
  .shell .home-paced { position: relative; }
  .shell .home-paced::after { content: ''; position: absolute; inset: -11px -4px; }
  /* Text links keep their size but get a 44px tall tap area. */
  .shell .home-pace, .shell .home-status__warn, .shell .home-status__resume { position: relative; }
  .shell .home-pace::after, .shell .home-status__warn::after, .shell .home-status__resume::after { content: ''; position: absolute; inset: -6px -4px; }
  .shell .pg-home .home-ask input { height: 52px; padding-right: 58px; }
  .shell .pg-home .home-ask__send { right: 4px; width: 44px; height: 44px; border-radius: 10px; }
}

@media (max-width: 767.98px) {
  .shell .pg-home .home-lead { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .shell .pg-home .home-lead .ui-cover { width: 100%; height: auto; aspect-ratio: 176 / 92; }
  .shell .pg-home .home-first { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .shell .pg-home .home-first .ui-cover { width: 100%; height: auto; aspect-ratio: 168 / 88; }
  .shell .pg-home .home-lead__title, .shell .pg-home .home-qrow__title { display: block; -webkit-line-clamp: none; overflow: visible; }
  .shell .pg-home .home-feed__item { padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .shell .home-dot, .shell .pg-home .home-writing__tile i, .shell .pg-home .home-writing__meter i,
  .shell .pg-home .home-qrow.is-new, .shell .pg-home .ui-node--current::after { animation: none !important; }
}
