/*
 * Minimum text sizes. The area stylesheets set some text as small as 5.4px;
 * this file raises the floor, so it is linked last in
 * app/views/layouts/application.html.erb. Each selector repeats the area's
 * own, so it wins on order alone; the clamp()s replace the per-breakpoint
 * sizes. Where nothing in between competes, the floor is folded into the
 * area's own rule instead; what is left here would lose its place in the
 * cascade there. The size tokens live in base.css's :root.
 *
 * - Spaced uppercase labels: 10.5px on desktop, 10px on phones, with less
 *   letter-spacing so the lines keep their width.
 * - Small sentences and data: 12px on phones up to 13px on desktop.
 * - Buttons, links and filter chips: 12px.
 */

/* Spaced uppercase labels */
.top-brand small {
  font-size: var(--label-size);
  letter-spacing: 0.7px;
  margin-top: 4px;
}
.preview-badge,
.landing .topbar .preview-badge {
  font-size: var(--label-size);
  letter-spacing: 0.7px;
}
.hero-content .eyebrow {
  font-size: var(--label-size);
  letter-spacing: 1.2px;
}
.field small,
.detail-grid small {
  font-size: var(--label-size);
  letter-spacing: 0.7px;
}
.landing-intro .eyebrow {
  font-size: var(--label-size);
  letter-spacing: clamp(1px, 0.1vw + 0.6px, 2px);
}
.landing-photo-note > span {
  font-size: var(--label-size);
  letter-spacing: 1.4px;
}
.floating-piece small {
  font-size: var(--label-size);
  letter-spacing: 0.8px;
}
.landing-editorial .eyebrow {
  font-size: var(--label-size);
  letter-spacing: 1.4px;
}
.landing-feature-image span {
  font-size: var(--label-size);
  letter-spacing: 1px;
}
.showcase-caption small {
  font-size: var(--label-size);
  letter-spacing: 1px;
}
.showcase-end > span {
  font-size: var(--label-size);
  letter-spacing: 2px;
}
.history-heading .eyebrow {
  font-size: var(--label-size);
  letter-spacing: 1.1px;
}
.curiosity > small {
  font-size: var(--label-size);
  letter-spacing: 1px;
}
.chronicle-opening > .eyebrow {
  font-size: var(--label-size);
  letter-spacing: 1.3px;
}
.chronicle-year-nav > span {
  font-size: var(--label-size);
  letter-spacing: 1.2px;
}
.chapter-number {
  font-size: var(--label-size);
  letter-spacing: 1.4px;
}
.chronicle-category {
  font-size: var(--label-size);
  letter-spacing: 0.8px;
}
.chronicle-end > span {
  font-size: var(--label-size);
  letter-spacing: 1.3px;
}
.membership-card > .eyebrow {
  font-size: var(--label-size);
  letter-spacing: 0.8px;
}

/* The landing hero's bottom line wraps on narrow phones rather than shrink. */
.landing-footnote {
  font-size: var(--label-size);
  letter-spacing: clamp(0.3px, 0.12vw, 1.2px);
  flex-wrap: wrap;
  row-gap: 6px;
}

/* Small sentences and data */
.household small,
.profile small,
.profile,
.owner,
.hero-content p,
.arrival-meta,
.arrival-checks div,
.arrival-checks span:last-child,
.metric-value small,
.section-heading .subtitle,
.asset-info .amount,
.asset-meta,
.notice,
footer span,
.progress-meta,
.task-content small,
.person .role,
.person .scope,
.upload-zone p,
.review-content .source,
.swipe-labels,
.review-bottom,
.step small,
.status-list div,
.timeline small,
.landing-strip > span,
.landing-feature > p,
.trust-columns p,
.landing-final small,
.showcase-controls small,
.showcase-caption > span,
.showcase-piece.piece-0 .showcase-caption > span,
.history-sources,
.history-sources > span,
.asset-history p.history-scope,
.chronicle-year-heading p,
.chronicle-story-copy > p,
.chronicle-story-copy > div,
.chronicle-disclosure,
.membership-intro small,
.membership-card > p,
.membership-capacity small,
.membership-price small,
.membership-card ul,
.invitation-principles small,
.showcase-disclosure,
.collection-footnote,
.field-hint,
.field-error,
.form-error,
.privacy-note {
  font-size: var(--small-size);
}
.photo-credit,
.footer-credit {
  font-size: var(--small-size);
  letter-spacing: 0.2px;
}
/* Status pills, such as In preparation */
.tag,
.task .tag {
  font-size: var(--action-size);
  letter-spacing: 0.2px;
}

/* Buttons, links and filter chips */
.button,
.landing-intro .button,
.text-link,
.section-heading .text-link,
.chip,
.search input,
footer button,
.view-links,
.landing .landing-enter,
.quiet-link,
.landing-intro .quiet-link,
.landing-feature .quiet-link,
.showcase-back,
.showcase-controls .button,
.showcase-end a,
.owner-history > a,
.chronicle-filter,
.chronicle-order,
.chronicle-year-nav > a,
.primary-nav > a,
.nav-more > summary,
.more-panel a,
.more-panel .more-home,
.back-link,
.sign-out,
.possession-form input[type="file"],
.admin-action {
  font-size: var(--action-size);
}

/* The admin area. Sightline renders inside this layout but links its
   stylesheet after this one, so these selectors carry an extra `main`. */
main .sl-eyebrow {
  font-size: var(--label-size);
  letter-spacing: 1.6px;
}
main .sl-stat-label,
main .sl-table th,
main .sl-table td::before,
main .sl-jobs .table thead th,
main .sl-badge {
  font-size: var(--label-size);
  letter-spacing: 1px;
}
main .sl-fine-print,
main .sl-stat-note,
main .sl-table small.sl-muted,
main .sl-bars small {
  font-size: var(--small-size);
}
main .sl-jobs .label,
main .sl-jobs .tag {
  font-size: var(--action-size);
}

/* On phones, give the larger text whole lines rather than breaking mid-phrase. */
@media (max-width: 640px) {
  .metric-label {
    letter-spacing: 0;
  }
  .showcase-controls {
    gap: 8px;
  }
  .showcase-controls .button {
    padding: 10px 10px;
  }
  .asset-meta > span {
    display: block;
  }
  .landing-strip > span {
    width: 100%;
  }
  /* The Chronicle's story notes are serif sentences at 17px here, as in the
     prototype, not small text. */
  .chronicle-story-copy > p {
    font-size: 17px;
  }
}
