/*
 * Stepped registration page (/start).
 *
 * Standalone, like landing_20261113.css: the register2 layout does not load
 * Bootstrap or application.css. Every rule is namespaced under .r2 so this
 * file stays inert if it is ever pulled into a Bootstrap page by mistake.
 *
 * The chrome is the postcard landing page's — brand top left (lifted out of
 * the card onto the page), links top right, legal bottom left, phone menu —
 * on a flat pale-purple page instead of the meadow video. The card keeps the
 * postcard's 691px width and its proportions as a minimum height: --u is
 * 1/576 of the card's width, so calc(N * var(--u)) is N design-pixels and the
 * card is at least the 576×384 postcard, growing taller to fit each step.
 * Below 768px the card goes full-bleed and the brand row becomes a top bar.
 */

.r2 {
  --r2-canvas: #f3f0fa;
  --r2-card: #ffffff;
  --r2-ink: #1e1533;
  --r2-ink-2: #5c5670;
  --r2-ink-3: #8a84a0;
  --r2-line: rgba(30, 21, 51, 0.25);
  --r2-line-soft: rgba(30, 21, 51, 0.12);
  --r2-tint: #7c5cd6;
  --r2-focus-ring: rgba(124, 92, 214, 0.25);
  --r2-strip: #ede9f7;
  --r2-green: #11af22;
  --r2-green-hover: #0e9a1d;
  --r2-red: #b42318;
  --r2-orange: #e87331;
  --r2-radius: 12px;

  color-scheme: light;
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--r2-canvas);
  color: var(--r2-ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.r2 *,
.r2 *::before,
.r2 *::after {
  box-sizing: border-box;
}

.r2 :where(h1, h2, p, figure, ul) {
  margin: 0;
}

/* ---- Flash --------------------------------------------------------------- */

.r2-flash {
  position: relative;
  z-index: 3;
  margin: 16px 16px 0;
  padding: 12px 16px;
  border-radius: var(--r2-radius);
  background: #e4ddf7;
  color: var(--r2-ink);
  font-size: 15px;
}

.r2-flash--alert {
  background: #fbe3dc;
  color: #6b2a1a;
}

/* ---- Page corners: brand top left, nav top right, legal bottom left ------ */

/* Absolute rather than fixed: the card can grow taller than the viewport, and
   chrome that scrolled with it would otherwise sit on top of the form. */
.r2-brand,
.r2-nav,
.r2-legal {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 20px 28px;
  line-height: 1.4;
}

.r2-nav,
.r2-legal {
  gap: 24px;
  font-size: 14px;
  color: rgba(30, 21, 51, 0.7);
}

.r2-nav {
  top: 0;
  right: 0;
  font-size: 18px;
}

.r2-legal {
  bottom: 0;
  left: 0;
  flex-wrap: wrap;
  row-gap: 6px;
}

/* The links behind More in the phone menu run on with the rest here. */
.r2-legal-extra {
  display: contents;
}

.r2-nav-link,
.r2-legal-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.r2-nav-link:hover,
.r2-nav-link:focus-visible,
.r2-legal-link:hover,
.r2-legal-link:focus-visible {
  color: var(--r2-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-legal-copy {
  color: rgba(30, 21, 51, 0.6);
}

/* Brand row. Sized in --bu (1px on desktop) so the phone reflow can scale the
   whole row down together rather than wrapping the AAHA block. */
.r2-brand {
  --bu: 1px;

  top: 0;
  left: 0;
  flex-wrap: nowrap;
  gap: calc(12 * var(--bu));
  white-space: nowrap;
  color: var(--r2-ink);
}

.r2-brand > * {
  flex-shrink: 0;
}

.r2-brand-mark {
  width: calc(25 * var(--bu));
  height: auto;
  display: block;
  border-radius: 6px;
}

.r2-brand-word {
  font-size: calc(22 * var(--bu));
  font-weight: 700;
  letter-spacing: -0.3px;
}

.r2-brand-divider {
  width: 1px;
  height: calc(26 * var(--bu));
  background: rgba(30, 21, 51, 0.3);
}

.r2-brand-aaha {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-size: calc(12 * var(--bu));
}

.r2-brand-aaha-title {
  font-weight: 700;
}

.r2-brand-aaha-sub {
  color: var(--r2-ink-2);
}

/* Menu toggle and menu: phone only, enabled in the phone reflow below. */

.r2-menu-toggle,
.r2-menu {
  display: none;
}

/* ---- Stage: centre the card, clear of the corner chrome ------------------ */

.r2-stage {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* Top-aligned so the stepper stays put as the card changes height between
     steps. Enough top padding to clear the brand row and nav, and enough at
     the bottom that a tall card never runs under the legal line. */
  padding: 96px 16px 80px;
}

/* The stepper and the card, stacked and sharing one width. This is the
   container for the cq units, so 100cqw is the card width either way. */
.r2-flow {
  /* 691px = the 576px design × 1.2; --u below scales everything to match. */
  width: min(691px, 100%);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.r2-card {
  width: 100%;
  border-radius: var(--r2-radius);
  overflow: hidden;
  border: 1px solid var(--r2-line-soft);
  /* The postcard's shadow stack, lightened for a pale page. */
  box-shadow:
    0 1px 2px rgba(30, 21, 51, 0.06),
    0 12px 32px -8px rgba(30, 21, 51, 0.14),
    0 40px 80px -24px rgba(30, 21, 51, 0.18);
}

/* ---- Postcard ------------------------------------------------------------ */

.r2-postcard {
  --u: calc(100cqw / 576);

  position: relative;
  min-height: calc(384 * var(--u));
  display: flex;
  flex-direction: column;
  background: var(--r2-card);
  color: var(--r2-ink);
}

.r2-noscript {
  padding: max(24px, calc(36 * var(--u))) max(20px, calc(40 * var(--u)));
}

.r2-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.r2-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: max(18px, calc(22 * var(--u)));
  padding: max(24px, calc(32 * var(--u))) max(20px, calc(40 * var(--u))) max(20px, calc(28 * var(--u)));
}

/* Stepper: sits on the page just above the card's top edge, flush with it. */

.r2-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 2px;
  list-style: none;
}

.r2-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--r2-ink-3);
  cursor: default;
  text-align: left;
}

.r2-step--done {
  color: var(--r2-ink);
  cursor: pointer;
}

.r2-step--done:hover .r2-step-label,
.r2-step--done:focus-visible .r2-step-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-step--active {
  color: var(--r2-ink);
}

.r2-step-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--r2-line);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--r2-ink-3);
  background: #fff;
}

.r2-step--active .r2-step-dot {
  border-color: var(--r2-green);
  background: var(--r2-green);
  color: #fff;
}

.r2-step--done .r2-step-dot {
  border-color: var(--r2-ink);
  background: var(--r2-ink);
  color: #fff;
}

.r2-step-dot svg {
  width: 14px;
  height: 14px;
}

.r2-step-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.r2-step-line {
  flex: 1;
  height: 2px;
  min-width: 12px;
  border-radius: 1px;
  background: var(--r2-line-soft);
}

.r2-step-line--done {
  background: var(--r2-green);
}

/* Heading */

.r2-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.r2-eyebrow {
  font-size: max(11px, calc(12 * var(--u)));
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--r2-tint);
}

.r2-headline {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: max(22px, calc(28 * var(--u)));
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

.r2-lede {
  font-size: max(14px, calc(15 * var(--u)));
  color: var(--r2-ink-2);
  max-width: calc(460 * var(--u));
}

/* Chip badge: the microchip number, shown on steps 2 and 3. */

.r2-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: var(--r2-strip);
  font-size: 14px;
  line-height: 1.3;
}

.r2-chip-label {
  color: var(--r2-ink-2);
}

.r2-chip-number {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.6px;
}

/* Fields */

.r2-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 16px;
}

@container (min-width: 480px) {
  .r2-fields {
    grid-template-columns: 1fr 1fr;
  }

  .r2-field--wide {
    grid-column: 1 / -1;
  }
}

.r2-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.r2-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

/* Required mark. Decorative only: the controls carry aria-required. */
/* The pet's name, once known, in the headlines of steps 2 and 3. */
.r2-pet-name {
  color: var(--r2-orange);
}

/* The word that carries a result headline: "registered" in the CTA's green,
   "not found" in the pet name's orange. */
.r2-headline-ok {
  color: var(--r2-green);
}

.r2-headline-warn {
  color: var(--r2-orange);
}

.r2-required {
  margin-left: 3px;
  color: var(--r2-red);
  font-weight: 700;
}

.r2-input {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--r2-line);
  border-radius: var(--r2-radius);
  background: #fff;
  color: var(--r2-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}

.r2-input::placeholder {
  color: var(--r2-ink-3);
}

/* Focus in the page's lavender rather than the CTA green, which would read
   as "valid" on a field that has not been checked yet. */
.r2-input:focus {
  outline: none;
  border-color: var(--r2-tint);
  box-shadow: 0 0 0 3px var(--r2-focus-ring);
}

.r2-input:disabled {
  background: #f6f4fb;
  color: var(--r2-ink-2);
}

.r2-input--invalid,
.r2-input--invalid:focus {
  border-color: var(--r2-red);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

/* An input with a badge sitting inside its right end (the chip maker on
   step 1). The wrap is the positioning context; the input makes room. */
.r2-input-wrap {
  position: relative;
}

.r2-input--badged {
  padding-right: 128px;
}

.r2-input-badge {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--r2-strip);
  color: var(--r2-tint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}

select.r2-input {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%231e1533' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

input[type="date"].r2-input {
  min-height: 46px;
}

.r2-hint {
  font-size: 13px;
  color: var(--r2-ink-2);
}

/* SMS opt-in notice under the phone field; spans both columns on desktop. */
.r2-consent {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--r2-ink-2);
}

.r2-error {
  font-size: 13px;
  color: var(--r2-red);
}

.r2-form-alert {
  padding: 10px 14px;
  border-radius: var(--r2-radius);
  background: #fbe3dc;
  color: #6b2a1a;
  font-size: 14px;
}

/* Breed combobox */

.r2-combobox {
  position: relative;
}

.r2-combobox-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--r2-line-soft);
  border-radius: var(--r2-radius);
  box-shadow: 0 12px 28px -8px rgba(30, 21, 51, 0.25);
}

.r2-combobox-option {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.r2-combobox-option--active,
.r2-combobox-option:hover {
  background: var(--r2-strip);
}

/* Agreement */

.r2-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--r2-ink-2);
}

.r2-check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--r2-green);
}

.r2-check a {
  color: var(--r2-ink);
  font-weight: 600;
}

.r2-check--invalid {
  color: var(--r2-red);
}

/* Footer strip */

.r2-strip {
  background: var(--r2-strip);
  color: var(--r2-ink);
  padding: max(12px, calc(14 * var(--u))) max(20px, calc(40 * var(--u)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* No "Powered by" note (the Fetch offer): the button alone, still on the right. */
.r2-strip--solo {
  justify-content: flex-end;
}

.r2-powered {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.r2-powered-label {
  font-size: max(11px, calc(12 * var(--u)));
  color: var(--r2-ink-2);
}

.r2-powered-domain {
  font-size: max(14px, calc(16 * var(--u)));
  font-weight: 700;
}

.r2-cta {
  display: inline-block;
  margin: 0;
  border: 0;
  font: inherit;
  font-size: max(13px, calc(14 * var(--u)));
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  background: var(--r2-green);
  padding: max(10px, calc(12 * var(--u))) max(16px, calc(20 * var(--u)));
  border-radius: var(--r2-radius);
  text-decoration: none;
  cursor: pointer;
}

.r2-cta:hover,
.r2-cta:focus-visible {
  background: var(--r2-green-hover);
  color: #fff;
}

.r2-cta:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 2px;
}

.r2-cta:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---- Phone reflow -------------------------------------------------------- */

/* Below 768px the brand row becomes a top bar in the flow (with the menu
   chevron at its right), the card fills the rest of the screen edge to edge
   with no radius or shadow, and the corner nav and legal line go away (they
   are in the menu instead). */
@media (max-width: 767px) {
  .r2 {
    background: var(--r2-card);
  }

  .r2-nav,
  .r2-legal {
    display: none;
  }

  .r2-brand {
    /* Hold the row at 0.9px per unit, capped so its ~340 units (with the
       chevron) always fit between the 20px side paddings. */
    --bu: min(0.9px, calc((100vw - 40px) / 350));

    position: static;
    width: 100%;
    padding: 16px 20px 12px;
  }

  .r2-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    width: calc(32 * var(--bu));
    height: calc(32 * var(--bu));
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--r2-ink);
    cursor: pointer;
  }

  .r2-menu-toggle:focus-visible {
    outline: 2px solid var(--r2-ink);
    outline-offset: 2px;
  }

  .r2-menu-chevron {
    width: calc(24 * var(--bu));
    height: calc(24 * var(--bu));
    transition: transform 0.2s ease;
  }

  .r2-menu-toggle[aria-expanded="true"] .r2-menu-chevron {
    transform: rotate(180deg);
  }

  .r2-stage {
    padding: 0;
    align-items: stretch;
  }

  .r2-flow {
    width: 100%;
    flex: 1;
    gap: 0;
  }

  /* Full-bleed card, so the stepper takes the card's own side padding. */
  .r2-stepper {
    padding: 18px 20px 14px;
  }

  .r2-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .r2-postcard {
    flex: 1;
  }

  /* Open state: the page turns orange, the card goes away and the menu takes
     its place, legal line pinned to the bottom. */
  .r2--menu-open {
    background: var(--r2-orange);
    color: #fff;
  }

  .r2--menu-open .r2-brand,
  .r2--menu-open .r2-brand-aaha-sub,
  .r2--menu-open .r2-menu-toggle {
    color: #fff;
  }

  .r2--menu-open .r2-brand-divider {
    background: rgba(255, 255, 255, 0.3);
  }

  .r2--menu-open .r2-stage,
  .r2--menu-open .r2-flash {
    display: none;
  }

  .r2-menu:not([hidden]) {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 16px 20px 24px;
  }

  .r2-menu-nav {
    display: flex;
    flex-direction: column;
  }

  .r2-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
    text-decoration: none;
  }

  .r2-menu-link::after {
    content: "\2192";
    flex-shrink: 0;
  }

  .r2-menu-link:hover,
  .r2-menu-link:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .r2-menu-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(31, 27, 46, 0.85);
  }

  .r2-menu-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  /* More: shows the second row of links below. */
  .r2-menu-legal-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
  }

  .r2-menu-legal-more:hover,
  .r2-menu-legal-more:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .r2-menu-legal-more:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  .r2-menu-legal-more-chevron {
    width: 14px;
    height: 14px;
    transform-origin: center;
    transition: transform 0.2s ease;
  }

  .r2-menu-legal-more[aria-expanded="true"] .r2-menu-legal-more-chevron {
    transform: rotate(180deg);
  }

  .r2-menu-legal-extra {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  .r2-menu-legal-extra[hidden] {
    display: none;
  }

  .r2-menu-legal-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
  }

  .r2-menu-legal-link:hover,
  .r2-menu-legal-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* Stepper items are flex children of the <ol>; the item wrapper adds nothing. */
.r2-step-item {
  display: flex;
}

/* In a narrow card only the current step keeps its label. */
@container (max-width: 479px) {
  .r2-step:not(.r2-step--active) .r2-step-label {
    display: none;
  }
}

/* ---- Auth pages (devise/*, magic_links/*) -------------------------------- */

/* The sign-in, sign-up, password and login-code pages are the same card,
   server-rendered (auth/_card). Everything above applies; these are the
   parts the card did not have: the flash inside the card, the alternative
   ways in under the form, the links row and the login-code input. */

/* The flash, in the card above the form: alerts share .r2-form-alert, the
   rest is this. */
.r2-form-notice {
  padding: 10px 14px;
  border-radius: var(--r2-radius);
  background: #e4ddf7;
  color: var(--r2-ink);
  font-size: 14px;
}

.r2-form-alert a,
.r2-form-notice a {
  color: inherit;
  font-weight: 600;
}

.r2-form-alert-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* Alternatives under the form: an "or" rule, then secondary buttons. */
.r2-alt {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.r2-or {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--r2-ink-3);
}

.r2-or::before,
.r2-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--r2-line-soft);
}

/* Secondary button: the input's outline, the CTA's weight. A link or a
   button; button_to wraps its button in a form (.r2-button-form). */
.r2-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--r2-line);
  border-radius: var(--r2-radius);
  background: #fff;
  color: var(--r2-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.r2-button:hover,
.r2-button:focus-visible {
  border-color: var(--r2-ink);
  background: #faf9fd;
  color: var(--r2-ink);
}

.r2-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--r2-focus-ring);
}

.r2-button svg {
  flex-shrink: 0;
}

.r2-button-form {
  margin: 0;
}

/* Links row under everything: log in, sign up, forgot password. */
.r2-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--r2-ink-2);
  text-align: center;
}

.r2-link {
  color: var(--r2-ink);
  font-weight: 600;
  text-decoration: none;
}

.r2-link:hover,
.r2-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--r2-ink-3);
  text-align: center;
}

/* The remember-me box takes the agreement checkbox's dress. */
.r2-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--r2-green);
}

/* The 6-digit login code. */
.r2-code {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-indent: 0.35em; /* so the letter-spacing after the last digit does not off-centre the group */
  font-variant-numeric: tabular-nums;
  padding-top: 8px;
  padding-bottom: 8px;
}

.r2-code::placeholder {
  color: var(--r2-line-soft);
}

/* "Didn't receive the email?" */
.r2-tips {
  padding: 12px 16px;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  font-size: 14px;
  line-height: 1.45;
  color: var(--r2-ink-2);
}

.r2-tips strong {
  color: var(--r2-ink);
}

.r2-tips ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.r2-tips a {
  color: var(--r2-ink);
  font-weight: 600;
}

/* submitLoading.ts swaps the CTA's .btn-text for a .spinner-border and hides
   with .d-none — Bootstrap's names, which this page does not load. */
.r2 .d-none {
  display: none !important;
}

.r2 .spinner-border {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: r2-spin 0.75s linear infinite;
}

@keyframes r2-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Lookup and found-report pages --------------------------------------- */

/* The ID lookup (/microchips/search, /found), its result, the found report
   and the owner contact page share the card. */

/* A row of .r2-chip badges: the ID that was looked up. */
.r2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.r2-chips .r2-chip {
  max-width: 100%;
}

.r2-chips .r2-chip-number {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The pet's photo on the owner contact page. */
.r2-figure {
  display: flex;
  justify-content: center;
  margin: 0;
}

.r2-figure img {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: var(--r2-radius);
  border: 1px solid var(--r2-line-soft);
}

.r2-tips p {
  margin: 6px 0 0;
}

/* Owner contact page: a titled group of label/value rows. */
.r2-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.r2-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--r2-ink-3);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--r2-line-soft);
}

.r2-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0;
  font-size: 15px;
}

.r2-dl dt {
  color: var(--r2-ink-2);
}

.r2-dl dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.r2-dl a {
  color: var(--r2-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@container (max-width: 400px) {
  .r2-dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .r2-dl dd + dt {
    margin-top: 10px;
  }
}

/* ---- Onboarding card (/microchips/confirmation?src=start) --------------- */

/* The /start card again, after payment: a success line above the card (no
   stepper: eight steps are too many for one), and each step's own form in
   the body with Skip in the strip. Everything above applies; these are the
   parts the /start card did not have. */

/* No top chrome (layout: @bare_chrome): the stage only has to clear the
   page's top edge, not the brand row and nav. */
.r2--bare .r2-stage {
  padding-top: 48px;
}

/* "Success! Now let's get <pet> onboarded.", centred over the card. */
.r2-ob-hero {
  margin: 0 0 6px;
  padding: 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(16px, 3.5cqw, 21px);
  line-height: 1.15;
  letter-spacing: -0.5px;
  text-align: center;
  text-wrap: balance;
}

/* Skip: the white button in the strip. An inset ring rather than a border,
   so it is the same size as the green CTA. */
.r2-cta--skip {
  background: #fff;
  color: var(--r2-ink);
  box-shadow: inset 0 0 0 1px var(--r2-line);
}

.r2-cta--skip:hover,
.r2-cta--skip:focus-visible {
  background: #faf9fd;
  color: var(--r2-ink);
  box-shadow: inset 0 0 0 1px var(--r2-ink);
}

/* Report missing: the CTA in the card body, in the pet name's orange. */
.r2-cta--alert {
  background: var(--r2-orange);
}

.r2-cta--alert:hover,
.r2-cta--alert:focus-visible {
  background: #d4651f;
}

/* A step's own form, and the row of buttons under its fields. */
.r2-ob-form {
  display: flex;
  flex-direction: column;
  gap: max(18px, calc(22 * var(--u)));
}

.r2-ob-form textarea.r2-input {
  height: auto;
  min-height: 0;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.4;
  resize: vertical;
}

.r2-ob-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.r2-ob-saved {
  font-size: 14px;
  font-weight: 600;
  color: var(--r2-green);
}

.r2-ob-note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--r2-ink-3);
}

.r2-ob-linkbutton {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--r2-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Fetch's quote widget (see FetchWidget.tsx). Fetch sizes its form by
   viewport width; the card is never wider than its tablet bucket, so the
   tallest of its heights serves throughout. */
.r2-ob-fetch {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 730px;
}

/* Certificate thumbnail: the sample image the microchip page shows, the
   whole thing one link to the real certificate. */
.r2-ob-cert {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  align-self: center;
  border-radius: 8px;
  color: var(--r2-ink);
  text-decoration: none;
}

.r2-ob-cert-image {
  display: block;
  width: min(260px, 100%);
  height: auto;
  border: 1px solid var(--r2-line-soft);
  border-radius: 8px;
  box-shadow: 0 12px 28px -8px rgba(30, 21, 51, 0.25);
  transition: transform 0.15s ease;
}

.r2-ob-cert-caption {
  font-size: 14px;
  font-weight: 600;
}

.r2-ob-cert:hover .r2-ob-cert-image,
.r2-ob-cert:focus-visible .r2-ob-cert-image {
  transform: translateY(-2px);
}

.r2-ob-cert:hover .r2-ob-cert-caption,
.r2-ob-cert:focus-visible .r2-ob-cert-caption {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-ob-cert:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 4px;
}

/* Upload a Photo: the preview beside the file button. The input itself is
   visually hidden; its label is the button. */
.r2-ob-photo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

.r2-ob-photo-preview {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--r2-line-soft);
  border-radius: var(--r2-radius);
}

.r2-ob-photo-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.r2-ob-photo-actions .r2-button {
  width: auto;
}

.r2-button--busy {
  opacity: 0.7;
  cursor: progress;
}

.r2-button:has(.r2-ob-file:focus-visible) {
  border-color: var(--r2-ink);
  box-shadow: 0 0 0 3px var(--r2-focus-ring);
}

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

@media (max-width: 767px) {
  /* Full-bleed card: the success line takes the card's side padding. */
  .r2-ob-hero {
    margin: 0;
    padding: 20px 20px 16px;
  }
}

/* ---- Account page (/account) --------------------------------------------- */

/* The same card, wide: it fills the stage between the page margins instead
   of holding the 691px postcard. The sizing unit is pinned to what a 691px
   card gets (691 / 576), so padding and type stay the auth cards' rather
   than growing with the width. */

.r2-stage--wide {
  padding-left: 32px;
  padding-right: 32px;
}

.r2-flow--wide {
  /* Set on the flow as well as the postcard: the found alert above the card
     uses .r2-cta, which is sized in --u. */
  --u: 1.2px;

  width: 100%;
  max-width: 1440px;
}

.r2-flow--wide .r2-postcard {
  --u: 1.2px;
}

/* The portal pages are white with no card edge: the phone look at every
   width. The stage keeps a margin and the card body gives up its own side
   padding, so the alert, the strip and the body share one left edge. */
/* Not while the phone menu is open: that state paints the page orange and
   this rule comes later in the file. */
.r2--portal:not(.r2--menu-open) {
  background: var(--r2-card);
}

.r2--portal .r2-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (min-width: 768px) {
  .r2--portal .r2-stage--wide {
    padding-left: 48px;
    padding-right: 48px;
  }

  .r2--portal .r2-flow--wide .r2-body {
    padding-left: 0;
    padding-right: 0;
  }
}

/* "Pet Portal" in the brand row, in the pet name's orange, sized with the
   wordmark. */
.r2-brand-portal {
  font-size: calc(22 * var(--bu));
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--r2-orange);
}

.r2-nav-link[aria-current="page"] {
  color: var(--r2-ink);
}

/* Offerings strip: the image tiles above the card, in the stepper's slot,
   each with its label underneath. Each is a page of the account; the current
   one has the ink label, hover underlines the label. The image carries no
   ring or shadow. A tile with no page yet (a Soon badge) is inert.
   Wraps on desktop; see the phone reflow. */
.r2-offerings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0 2px;
}

.r2-offering {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--r2-ink-2);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}

.r2-offering-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}

.r2-offering-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a.r2-offering:hover,
a.r2-offering:focus-visible {
  color: var(--r2-ink);
}

a.r2-offering:hover .r2-offering-label,
a.r2-offering:focus-visible .r2-offering-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.r2-offering:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 2px;
}

.r2-offering[aria-current="page"] {
  color: var(--r2-ink);
}

.r2-offering--soon {
  color: var(--r2-ink-3);
}

.r2-offering--soon .r2-offering-tile {
  background: var(--r2-strip);
}

.r2-offering-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: var(--r2-ink-3);
}

.r2-offering-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.r2-offering-badge {
  margin-top: -4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--r2-strip);
  color: var(--r2-tint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Found-pet alert: above the offerings strip and the card. An exclamation
   mark in an orange disc, the copy beside it, the CTA pinned to the right.
   Stacks on a phone. */
.r2-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 16px 20px;
  border: 1px solid var(--r2-orange);
  border-radius: var(--r2-radius);
  background: #fdebe1;
  color: var(--r2-ink);
}

.r2-alert-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

/* The icon is already a disc (Font Awesome's circle-exclamation), drawn in
   the orange at full size. */
.r2-alert-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 40px;
  height: 40px;
  color: var(--r2-orange);
}

.r2-alert-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.r2-alert-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.r2-alert .r2-cta {
  flex-shrink: 0;
}

.r2-alert-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.15;
}

.r2-alert-text {
  margin: 0;
  font-size: 15px;
  color: var(--r2-ink-2);
}

/* Pet grid: as many 4:3 tiles as fit, so the wide card is four or five up
   and a phone two up with no breakpoint. */
.r2-pets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.r2-pet-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.r2-pet {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--r2-line-soft);
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  color: var(--r2-ink);
  text-decoration: none;
}

/* Hover underlines the name; the tile itself does not move or cast a shadow. */
.r2-pet:hover .r2-pet-caption,
.r2-pet:focus-visible .r2-pet-caption {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-pet:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 2px;
}

.r2-pet-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The species stand-in is a square illustration, shown whole and centred in
   the 4:3 tile rather than cropped. */
.r2-pet-placeholder {
  padding: 17%;
  object-fit: contain;
}

/* Screen-reader-only text (the chip number on a tile). */
.r2-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The name along the bottom edge. (.r2-pet-name is the orange name in a
   headline; this is the tile caption.) */
.r2-pet-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(to bottom, rgba(30, 21, 51, 0), rgba(30, 21, 51, 0.72));
  color: #fff;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* No photo: the name sits on the pale species stand-in, so no gradient or
   shadow. */
.r2-pet--no-photo .r2-pet-caption {
  background: none;
  color: var(--r2-tint);
  text-shadow: none;
}

/* "Add a pet": a dashed tile in the CTA's green. */
.r2-pet--add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  border: 2px dashed var(--r2-green);
  background: rgba(17, 175, 34, 0.05);
  color: var(--r2-green);
  font-weight: 700;
  text-align: center;
}

.r2-pet--add:hover .r2-pet-add-label,
.r2-pet--add:focus-visible .r2-pet-add-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-pet-add-icon {
  font-size: 40px;
  line-height: 1;
  font-weight: 300;
}

@media (max-width: 767px) {
  .r2-stage--wide {
    padding: 0;
  }

  /* The strip takes the card's side padding and scrolls sideways rather than
     wrapping, with the scrollbar hidden. */
  .r2-offerings {
    flex-wrap: nowrap;
    padding: 14px 20px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .r2-offerings::-webkit-scrollbar {
    display: none;
  }

  .r2-offering {
    flex-shrink: 0;
    padding: 6px 6px 8px;
  }

  .r2-offering-tile {
    width: 76px;
    height: 76px;
  }

  /* The alert takes the full-bleed card's side padding and stacks. */
  .r2-alert {
    flex-direction: column;
    align-items: flex-start;
    margin: 16px 20px 0;
  }

  .r2-pets {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .r2-pet-caption {
    font-size: 17px;
    padding: 22px 12px 10px;
  }

  .r2--menu-open .r2-brand-portal {
    color: #fff;
  }
}

/* ---- Chip page (/microchips/:id) ----------------------------------------- */

/* The account page's frame with the pet as the subject. The flow is capped
   so the record does not stretch across a wide screen: the main column keeps
   a readable line length and the sidebar a fixed width. */
.r2-flow--chip {
  max-width: 1080px;
}

/* The eyebrow is the way back to the pet grid. */
.r2-eyebrow-link {
  color: inherit;
  text-decoration: none;
}

.r2-eyebrow-link:hover,
.r2-eyebrow-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Header: the eyebrow above, then the row of photo, heading and the actions
   pinned right. */
.r2-eyebrow--row {
  display: block;
  margin-bottom: 14px;
}

.r2-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* A notice about the record (an unusual chip format) sits between the
   eyebrow and the row, so it is read before the name. */
.r2-tips--notice {
  margin-bottom: 18px;
}

/* The status sits beside the pet's name, on the headline's baseline. */
.r2-headline-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.r2-headline-row .r2-headline {
  margin: 0;
}

.r2-heading-row .r2-heading {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 4px;
}

/* The photo opens the photos page; the camera badge says so. */
.r2-show-photo-link {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 168px;
  height: 168px;
  border-radius: var(--r2-radius);
  color: var(--r2-ink);
}

.r2-show-photo-link:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 3px;
}

.r2-show-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  box-shadow: inset 0 0 0 1px rgba(30, 21, 51, 0.1);
}

/* No photo: the species stand-in (see pet_placeholder_image), shown whole
   and centred rather than cropped. */
.r2-show-photo--placeholder {
  padding: 17%;
  object-fit: contain;
}

.r2-show-photo-badge {
  position: absolute;
  right: -8px;
  bottom: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--r2-ink-2);
  box-shadow:
    0 1px 2px rgba(30, 21, 51, 0.12),
    0 4px 12px -4px rgba(30, 21, 51, 0.3);
  transition: color 0.15s ease, transform 0.15s ease;
}

.r2-show-photo-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.r2-show-photo-link:hover .r2-show-photo-badge,
.r2-show-photo-link:focus-visible .r2-show-photo-badge {
  color: var(--r2-ink);
  transform: translateY(-1px);
}

/* Identifier line under the lede: chip number, tag, status. Quiet, the
   number in tabular figures so it scans. */
.r2-show-ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--r2-ink-2);
}

.r2-show-ident-number {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
  color: var(--r2-ink);
}

.r2-show-ident-sep {
  color: var(--r2-ink-3);
}

.r2-show-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.r2-show-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.r2-show-status--ok {
  color: var(--r2-green);
}

.r2-show-status--alert {
  color: var(--r2-orange);
}

.r2-show-status--danger {
  color: var(--r2-red);
}

.r2-show-status--warn {
  color: #9a6700;
}

/* Actions: one solid button, the rest as links beneath it. */
.r2-show-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.r2-show-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.r2-show-links a {
  color: var(--r2-ink-2);
  font-weight: 600;
  text-decoration: none;
}

.r2-show-links a:hover,
.r2-show-links a:focus-visible {
  color: var(--r2-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Body: the record in a readable column, the sidebar fixed. */
.r2-show-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  padding-top: 8px;
}

.r2-show-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 620px;
  min-width: 0;
}

.r2-show-side {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

@media (min-width: 900px) {
  .r2-show-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 64px;
    padding-top: 16px;
  }
}

/* Groups: a small-caps title with its one link, then the content. Spacing
   does the grouping; no rules. */
.r2-show-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.r2-show-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--r2-ink-3);
}

.r2-show-title a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--r2-ink-2);
  text-decoration: none;
}

.r2-show-title a:hover,
.r2-show-title a:focus-visible {
  color: var(--r2-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A contact: the name carries the weight, the rest is identified by its
   format. */
.r2-show-contact {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--r2-ink-2);
}

.r2-show-contact-name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--r2-ink);
}

.r2-show-contact-sub {
  display: block;
  font-size: 13px;
  color: var(--r2-ink-3);
}

.r2-show-contact a {
  color: inherit;
  text-decoration: none;
}

.r2-show-contact a:hover,
.r2-show-contact a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-show-address {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--r2-ink);
}

/* Emergency contact and vet side by side when there is room. */
.r2-show-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px 32px;
}

/* Medical: special needs are what a finder must know, so they get the
   warning tint; the implant date is a quiet line. */
.r2-show-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r2-radius);
  background: #fdf3e2;
  color: #5e3b0a;
  font-size: 15px;
  line-height: 1.45;
}

.r2-show-callout-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #c47d12;
}

.r2-show-callout-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.r2-show-line {
  margin: 0;
  font-size: 15px;
  color: var(--r2-ink-2);
}

/* The one prompt for whatever is missing, with its CTA inline. */
.r2-show-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  font-size: 14px;
  line-height: 1.45;
  color: var(--r2-ink-2);
}

.r2-show-prompt strong {
  color: var(--r2-ink);
}

.r2-show-prompt-copy {
  flex: 1 1 260px;
}

.r2-show-prompt .r2-cta {
  flex-shrink: 0;
}

/* Photos: a row of square thumbs ending in the dashed "Add" tile, the pet
   grid's pattern. */
.r2-show-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.r2-show-thumb,
.r2-show-thumb--add {
  display: block;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 8px;
}

.r2-show-thumb {
  box-shadow: inset 0 0 0 1px rgba(30, 21, 51, 0.1);
}

.r2-show-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.r2-show-thumb--add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px dashed var(--r2-green);
  background: rgba(17, 175, 34, 0.05);
  color: var(--r2-green);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.r2-show-thumb--add:hover,
.r2-show-thumb--add:focus-visible {
  background: rgba(17, 175, 34, 0.1);
}

.r2-show-thumb-plus {
  font-size: 24px;
  line-height: 1;
  font-weight: 300;
}

.r2-show-thumb:focus-visible,
.r2-show-thumb--add:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 2px;
}

/* Sidebar: the certificate as a compact card on the strip tint. */
.r2-show-cert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  color: var(--r2-ink);
  text-decoration: none;
}

.r2-show-cert-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: var(--r2-tint);
}

.r2-show-cert-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.r2-show-cert-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.r2-show-cert-title {
  font-size: 15px;
  font-weight: 600;
}

.r2-show-cert-link {
  font-size: 13px;
  color: var(--r2-ink-2);
}

.r2-show-cert:hover .r2-show-cert-link,
.r2-show-cert:focus-visible .r2-show-cert-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-show-cert:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 2px;
}

/* Activity: icons in pale discs joined by a line, the label, the time. */
.r2-tl {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.r2-tl-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 18px;
}

.r2-tl-item:last-child {
  padding-bottom: 0;
}

.r2-tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--r2-line-soft);
}

.r2-tl-icon {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--r2-strip);
  color: var(--r2-ink-2);
}

.r2-tl-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.r2-tl-icon--danger {
  color: var(--r2-red);
}

.r2-tl-icon--ok {
  color: var(--r2-green);
}

.r2-tl-icon--info {
  color: var(--r2-tint);
}

.r2-tl-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 5px;
}

.r2-tl-label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--r2-ink);
}

a.r2-tl-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-tl-time {
  font-size: 13px;
  color: var(--r2-ink-3);
}

.r2-tl-info {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--r2-ink-2);
}

.r2-show-more {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 767px) {
  .r2-heading-row {
    flex-wrap: wrap;
    gap: 16px;
  }

  .r2-show-photo-link {
    width: 112px;
    height: 112px;
  }

  .r2-show-photo-badge {
    width: 34px;
    height: 34px;
  }

  .r2-show-photo-badge svg {
    width: 15px;
    height: 15px;
  }

  .r2-heading-row .r2-heading {
    flex-basis: calc(100% - 136px);
    padding-top: 0;
  }

  .r2-show-actions {
    width: 100%;
    align-items: stretch;
    padding-top: 4px;
  }

  .r2-show-actions .r2-cta {
    text-align: center;
  }

  .r2-show-links {
    justify-content: center;
  }

  /* The identifiers stack: a wrapped row leaves a separator stranded. */
  .r2-show-ident {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .r2-show-ident-sep {
    display: none;
  }
}

/* ---- Chip sub-pages (edit, photos, activity, transfer, reports) ---------- */

/* Forms in sections on the auth card. */
.r2-form-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.r2-form-sections .r2-section {
  gap: 14px;
}

.r2-section-optional {
  float: right;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--r2-ink-3);
}

textarea.r2-input {
  height: auto;
  min-height: 0;
  line-height: 1.4;
  resize: vertical;
}

.r2-cta--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Prev / next with the position between (activity pages, found reports). */
.r2-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  font-size: 14px;
}

.r2-pagination-info {
  color: var(--r2-ink-3);
}

/* Finder contact: call and email as buttons under the contact card, then
   the close-report panel. */
.r2-finder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.r2-report-close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px 16px;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  font-size: 14px;
  line-height: 1.45;
  color: var(--r2-ink-2);
}

.r2-report-close > span {
  flex: 1 1 260px;
}

/* Photos page: the upload button with the count, then the grid. */
.r2-photos-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.r2-photos-count {
  font-size: 14px;
  color: var(--r2-ink-2);
}

.r2-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.r2-photo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.r2-photo-img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  box-shadow: inset 0 0 0 1px rgba(30, 21, 51, 0.1);
}

.r2-photo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.r2-photo-img:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 2px;
}

.r2-photo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--r2-tint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(30, 21, 51, 0.12);
}

.r2-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.r2-photo-action {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--r2-ink-2);
  cursor: pointer;
}

.r2-photo-action:hover,
.r2-photo-action:focus-visible {
  color: var(--r2-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2-photo-action--danger:hover,
.r2-photo-action--danger:focus-visible {
  color: var(--r2-red);
}

/* The missing report's facts: on the report page and above the photo
   matches. */
.r2-matches {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.r2-lost-summary {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
}

.r2-lost-summary-pet {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.r2-lost-summary-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--r2-ink-2);
}

.r2-lost-summary-copy p {
  margin: 0;
}

.r2-lost-summary-seen strong {
  color: var(--r2-ink);
}

.r2-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.r2-matches-grid--small {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin-top: 12px;
}

.r2-match-slot {
  display: flex;
  min-width: 0;
}

.r2-match {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* The card and its "Hidden: not <pet>" stand-in swap via the hidden
   attribute, which display: flex above would otherwise override. */
.r2-match[hidden] {
  display: none;
}

.r2-match-img {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  box-shadow: inset 0 0 0 1px rgba(30, 21, 51, 0.1);
}

.r2-match-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.r2-match-img:focus-visible {
  outline: 2px solid var(--r2-ink);
  outline-offset: 2px;
}

.r2-match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--r2-ink-3);
}

.r2-match-tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--r2-ink-2);
}

.r2-match-tier::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--r2-green);
}

.r2-match-tier--weak::before {
  background: #e0a400;
}

.r2-match-source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r2-match-answers {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.r2-match-q {
  margin: 0;
  font-size: 13px;
  color: var(--r2-ink-2);
}

.r2-match-q--yes {
  font-weight: 600;
  color: var(--r2-green);
}

.r2-match-buttons {
  display: flex;
  gap: 6px;
}

.r2-answer {
  flex: 1;
  margin: 0;
  padding: 7px 4px;
  border: 1px solid var(--r2-line);
  border-radius: 8px;
  background: #fff;
  color: var(--r2-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.r2-answer:hover,
.r2-answer:focus-visible {
  border-color: var(--r2-ink);
}

.r2-answer--yes[aria-pressed="true"] {
  border-color: var(--r2-green);
  background: var(--r2-green);
  color: #fff;
}

.r2-answer--no[aria-pressed="true"] {
  border-color: var(--r2-red);
  background: var(--r2-red);
  color: #fff;
}

.r2-answer--unsure[aria-pressed="true"] {
  border-color: var(--r2-ink-2);
  background: var(--r2-ink-2);
  color: #fff;
}

.r2-match--hidden {
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 16px;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
  text-align: center;
}

.r2-match--hidden .r2-hint {
  margin: 0;
}

.r2-match--rejected {
  opacity: 0.75;
}

.r2-match-undo {
  margin: 0;
  text-align: center;
  font-size: 13px;
}

.r2-matches-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 16px;
  border: 1px dashed var(--r2-line);
  border-radius: var(--r2-radius);
  font-size: 14px;
  text-align: center;
  color: var(--r2-ink-2);
}

.r2-matches-empty strong {
  color: var(--r2-ink);
}

.r2-matches-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--r2-strip);
  color: var(--r2-ink-3);
}

.r2-matches-empty-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.r2-matches-rejected summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--r2-ink-2);
}

/* Missing report page: the advice as a numbered list, plain. */
.r2-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--r2-ink-2);
}

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

/* Survey (surveys/_form): one block per question; the radios are visually
   hidden and their labels are the buttons. A conditional question is muted
   until the answer it depends on is chosen. */
.r2-question {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.r2-question--off {
  opacity: 0.5;
}

.r2-question .r2-label {
  margin: 0;
}

.r2-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.r2-choice {
  flex: 1;
  min-width: 64px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--r2-line);
  border-radius: 8px;
  background: #fff;
  color: var(--r2-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.r2-choices--scale {
  flex-wrap: nowrap;
  gap: 4px;
}

.r2-choices--scale .r2-choice {
  min-width: 0;
  padding-left: 0;
  padding-right: 0;
}

.r2-choice:hover {
  border-color: var(--r2-ink);
}

.r2-choice-input:checked + .r2-choice {
  border-color: var(--r2-tint);
  background: var(--r2-tint);
  color: #fff;
}

.r2-choice-input:focus-visible + .r2-choice {
  outline: 2px solid var(--r2-ink);
  outline-offset: 2px;
}

.r2-choice-input:disabled + .r2-choice {
  cursor: default;
}

.r2-scale-ends {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--r2-ink-3);
}

/* BlueTag scan location (microchip_found_reports/gps_location_token). */
.r2-map {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--r2-line-soft);
  border-radius: var(--r2-radius);
  overflow: hidden;
  background: var(--r2-strip);
}

/* Legal pages (home/legal wrapping home/terms, privacy, ownership_disputes).
   The documents keep their .legal-* markup for the snapshots; these rules
   give it the card's type on this layout. application.css has the
   Bootstrap-era set the archives inline. */
.r2-flow--legal {
  max-width: 920px;
}

.r2 .legal-page {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* AAHA mark + disclaimer above the /terms card, on the canvas: logo left,
   text right, stacked on phones. The flow's gap puts the card beneath it. */
.r2-legal-aaha {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 4px 0;
}

.r2-legal-aaha-logo {
  margin: 0;
  flex-shrink: 0;
}

.r2-legal-aaha-logo img {
  display: block;
  width: 170px;
  max-width: 100%;
  height: auto;
}

.r2-legal-aaha-disclaimer {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--r2-ink-2);
}

.r2-legal-aaha-disclaimer strong {
  font-weight: 600;
  color: var(--r2-ink);
}

@media (min-width: 768px) {
  .r2-legal-aaha {
    flex-direction: row;
    gap: 24px;
  }
}

.r2 .legal-title {
  margin: 0 0 6px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: max(26px, calc(32 * var(--u)));
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--r2-ink);
}

.r2 .legal-dates {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--r2-ink-2);
}

.r2 .legal-dates strong {
  font-weight: 600;
  color: var(--r2-ink);
}

.r2 .legal-section {
  margin-bottom: 28px;
}

.r2 .legal-section h2 {
  margin: 0 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.2px;
  color: var(--r2-ink);
}

.r2 .legal-section h3 {
  margin: 16px 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--r2-ink);
}

.r2 .legal-section p,
.r2 .legal-section ul li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--r2-ink-2);
}

.r2 .legal-section p {
  margin: 0 0 12px;
}

.r2 .legal-section p:last-child {
  margin-bottom: 0;
}

.r2 .legal-section ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.r2 .legal-section ul li {
  margin-bottom: 6px;
}

.r2 .legal-section a,
.r2 .legal-footer a {
  color: var(--r2-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.r2 .legal-contact {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--r2-radius);
  background: var(--r2-strip);
}

.r2 .legal-contact p {
  margin: 0;
  font-size: 14px;
}

.r2 .legal-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--r2-line-soft);
  text-align: center;
  font-size: 14px;
}

/* Material change notice (shared/_material_change_notice) on the legal
   pages: a sticky bar that settles into the flow at the foot of the page.
   Mirrors the .mcn-* rules in application.css in the card's palette. */
.r2 .mcn-bar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  border-top: 1px solid var(--r2-line-soft);
  background: var(--r2-card);
  box-shadow: 0 -8px 24px rgba(30, 21, 51, 0.12);
  color: var(--r2-ink-2);
}

.r2 .mcn-bar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 24px;
}

.r2 .mcn-copy {
  /* The notice is long, and on a short window it must not grow to swallow
     the document it is asking people to read. */
  max-height: 40vh;
  overflow-y: auto;
}

.r2 .mcn-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--r2-ink);
}

.r2 .mcn-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.r2 .mcn-actions {
  flex-shrink: 0;
  margin: 0;
}

.r2 .mcn-accept {
  min-width: 144px;
  padding: 10px 28px;
  border: 0;
  border-radius: var(--r2-radius);
  background: var(--r2-green);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.r2 .mcn-accept:hover,
.r2 .mcn-accept:focus-visible {
  background: var(--r2-green-hover);
}

@media (max-width: 767px) {
  .r2 .mcn-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }

  .r2 .mcn-copy {
    max-height: 35vh;
  }

  .r2 .mcn-accept {
    width: 100%;
  }
}
