/*
 * Use-case pages (/use-cases/ and /use-cases/*). Loaded after tokens.css, styles.css and
 * site.css. Built from the shared mail window, chat pieces, .feature-row, .home-faq and the
 * site components; only page layout lives here.
 *
 * A persona page runs: hero (sample inbox) → the chat's checklist (.feature-row) → the
 * starting plan (.uc-plan rows) → the first sort (.uc-walk) → questions → other inboxes.
 */

/* ---- Hero: wider copy column so the headline stays within three lines ------------------- */
.uc-mail-title {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.uc-demo .mail-meta {
  max-width: none;
}
.uc-mail-list .mail-row:last-child {
  border-bottom: 0;
}
@media (min-width: 1000px) {
  .uc-hero.split > .wrap {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }
}

/* ---- Cards with a stretched link ---------------------------------------------------------
 * <article class="card uc-card">
 *   <h3><a href="/use-cases/founders/">Founders <span aria-hidden="true">→</span></a></h3>
 *   <p>…</p><ul class="chip-row" aria-label="Starting labels">…</ul>
 * </article>
 * The heading link's ::after covers the card, so the whole card is clickable while the
 * link's name stays just the heading.
 */
.uc-card {
  position: relative;
  display: flex;
  flex-direction: column;
}
.uc-card h3 a {
  color: var(--ink);
}
.uc-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.uc-card h3 a:focus-visible {
  outline: none;
}
.uc-card h3 a:focus-visible::after {
  outline: 2px solid var(--focus);
  outline-offset: var(--focus-offset);
}
.uc-card h3 a:is(:hover, :focus-visible) {
  color: var(--blue);
}
.uc-card:has(h3 a:is(:hover, :focus-visible)) {
  border-color: var(--control);
}
.uc-card h3 [aria-hidden] {
  display: inline-block;
  color: var(--blue);
}
.uc-card .chip-row {
  margin-top: auto;
  padding-top: var(--space-5);
}
.uc-card p + .chip-row {
  margin-top: auto;
}
.uc-unsure {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--blue) 30%, var(--line-strong));
  background: color-mix(in srgb, var(--blue-soft) 60%, var(--surface));
}
.uc-more {
  margin: var(--space-5) 0 0;
}

/* ---- Mid headings beside a visual (the chat row, "In your own words") -------------------- */
.uc-row-title {
  margin-bottom: var(--space-4);
  font-size: calc(var(--fs-h2) * 0.75);
}
.feature-copy > p:not([class]) {
  max-width: var(--measure);
  color: var(--muted);
}
.feature-copy strong {
  font-weight: 600;
  color: var(--ink);
}

/* ---- The chat's checklist, at mockup scale -----------------------------------------------
 * <ul class="uc-ticks"><li><span class="mock-check is-on"></span>
 *   <span>Option text<span class="visually-hidden"> (ticked)</span></span>
 *   <span class="uc-tick-labels"><span class="chip tone-x">X</span></span></li></ul>
 */
.uc-ticks {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}
.uc-ticks > li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-meta);
  line-height: 1.4;
  color: var(--ink-2);
}
.uc-ticks > li:last-child {
  border-bottom: 0;
}
.uc-ticks > li.is-none {
  color: var(--muted);
}
.uc-tick-labels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  grid-column: 2;
}
.uc-ticks .chip {
  padding: 2px 7px;
  font-size: var(--fs-eyebrow);
}
.uc-chat .chip-row {
  gap: 6px;
}
@media (min-width: 600px) {
  .uc-ticks > li {
    grid-template-columns: 18px minmax(0, 1fr) auto;
  }
  .uc-tick-labels {
    grid-column: auto;
    justify-content: flex-end;
    max-width: 210px;
  }
}

/* ---- The starting plan: one row per label ------------------------------------------------
 * <ol class="uc-plan"><li>
 *   <p class="uc-plan-label"><a class="chip tone-x" href="/labels/#x">X</a></p>
 *   <p class="uc-plan-why">Why it’s on.</p>
 *   <p class="uc-plan-eg"><span class="sender">Sender</span><span>Subject</span></p>
 * </li></ol>
 */
.uc-plan {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: plan;
  border-top: 1px solid var(--line-strong);
}
.uc-plan > li {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line-strong);
  counter-increment: plan;
}
.uc-plan p {
  margin: 0;
}
.uc-plan-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.uc-plan-label::before {
  content: counter(plan);
  min-width: 1.2em;
  font-size: var(--fs-h3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--subtle);
}
.uc-plan .chip {
  padding: 6px var(--space-3);
  font-size: var(--fs-small);
}
.uc-plan a.chip:is(:hover, :focus-visible) {
  box-shadow: inset 0 0 0 1px currentColor;
}
.uc-plan-why {
  max-width: var(--measure);
  color: var(--ink-2);
}
.uc-plan-eg {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-3);
  justify-self: start;
  max-width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--page);
  font-size: var(--fs-meta);
  color: var(--muted);
}
.uc-plan-eg .sender {
  margin: 0;
  color: var(--ink);
}
.uc-plan-note {
  max-width: var(--measure);
  margin: var(--space-5) 0 0;
  color: var(--muted);
}
@media (min-width: 760px) {
  .uc-plan > li {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    align-items: start;
    column-gap: var(--space-6);
  }
  .uc-plan-eg {
    grid-column: 2;
  }
}
@media (min-width: 1000px) {
  .uc-plan > li {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
  .uc-plan-eg {
    grid-column: auto;
    flex-wrap: nowrap;
    justify-self: stretch;
    min-width: 0;
  }
  .uc-plan-eg .sender {
    flex: 0 0 8.5rem;
  }
  .uc-plan-eg > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---- The first sort: four numbered steps, no icons ----------------------------------------
 * <ol class="uc-walk"><li><h3>Sign in.</h3><p>…</p></li>…</ol>
 */
.uc-walk {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: walk;
}
.uc-walk > li {
  padding-top: var(--space-4);
  border-top: 2px solid var(--line-strong);
  counter-increment: walk;
}
.uc-walk > li:first-child {
  border-top-color: var(--blue);
}
.uc-walk > li::before {
  content: counter(walk, decimal-leading-zero);
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--fs-meta);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--blue);
}
.uc-walk h3 {
  margin-bottom: var(--space-2);
}
.uc-walk p {
  margin: 0;
  color: var(--muted);
}
.uc-walk p + p {
  margin-top: var(--space-2);
}
.uc-walk .rules-status {
  margin-top: var(--space-4);
}
@media (min-width: 760px) {
  .uc-walk {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-7);
  }
}
@media (min-width: 1000px) {
  .uc-walk {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--space-6);
  }
}

/* ---- Questions: heading beside the list --------------------------------------------------- */
.uc-faq {
  display: grid;
  gap: var(--space-6);
}
.uc-faq > .section-head {
  margin-bottom: 0;
}
@media (min-width: 1000px) {
  .uc-faq {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-8);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .uc-card {
    transition: border-color 0.2s var(--ease);
  }
  .uc-card h3 [aria-hidden] {
    transition: transform 0.2s var(--ease);
  }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .uc-card:has(h3 a:hover) h3 [aria-hidden] {
    transform: translateX(3px);
  }
}
