/* ==========================================================================
   Common Thread — fitting-room companion app concept
   Only used by /concepts/retail/app/. Shares no rules with
   local-concept-app.css; the palette and type are lifted from
   assets/css/retail-demo.css so the app and the website read as one product.

   Contrast measured in sRGB against WCAG 2.2:
     ink #1d1d1b on paper #f1eadf ............... 14.1 : 1
     ink #1d1d1b on card #fffdfa ................ 16.7 : 1
     muted #5a5049 on paper ..................... 6.5  : 1
     muted #5a5049 on card ...................... 7.7  : 1
     accent-ink #b8331a on paper ................ 5.0  : 1
     accent-ink #b8331a on card ................. 5.9  : 1
     teal-deep #1f6b69 on card .................. 6.1  : 1
     warn #7d5210 on card ....................... 6.7  : 1
     warn #7d5210 on paper ...................... 5.7  : 1
     paper #f1eadf on ink ....................... 14.1 : 1
     blush #f0b6a6 on ink ....................... 9.6  : 1
     teal #59c6c3 on ink ........................ 8.3  : 1
     rgba(paper,.74) on ink ..................... 8.0  : 1
   The bright #e64a2e (3.3 : 1 on paper) is used for fills, rules and garment
   colourways only — never for text and never as a control's only affordance.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --rp-ink: #1d1d1b;
  --rp-ink-soft: #3a352f;
  --rp-muted: #5a5049;
  --rp-paper: #f1eadf;
  --rp-paper-deep: #e6dccd;
  --rp-card: #fffdfa;
  --rp-accent: #e64a2e;
  --rp-accent-ink: #b8331a;
  --rp-accent-deep: #91270f;
  --rp-teal: #59c6c3;
  --rp-teal-deep: #1f6b69;
  --rp-warn: #7d5210;
  --rp-blush: #f0b6a6;
  --rp-line: rgba(29, 29, 27, 0.16);
  --rp-line-strong: rgba(29, 29, 27, 0.34);
  --rp-focus: #8f2712;
  --rp-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rp-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --rp-shadow-sm: 0 3px 12px rgba(29, 29, 27, 0.06);
  --rp-shadow: 0 22px 56px rgba(29, 29, 27, 0.14);
  --rp-shadow-lg: 0 40px 110px rgba(29, 29, 27, 0.28);
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100svh;
  overflow-x: clip;
  background:
    radial-gradient(120% 70% at 88% -8%, rgba(89, 198, 195, 0.16), transparent 62%),
    radial-gradient(90% 60% at 6% 4%, rgba(230, 74, 46, 0.09), transparent 58%),
    var(--rp-paper);
  color: var(--rp-ink);
  font-family: var(--rp-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
  letter-spacing: -0.032em;
  line-height: 1.06;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--rp-focus);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

.rp-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.rp-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.rp-sprite symbol {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rp-icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rp-skip {
  position: fixed;
  z-index: 90;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1.15rem;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--rp-ink);
  color: var(--rp-paper);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease;
}

.rp-skip:focus {
  transform: translateY(0);
}

/* =========================================================== shell ===== */

.rp-shell {
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(1.1rem, 3.2vw, 3.2rem) clamp(1rem, 3.4vw, 3rem) 3rem;
  display: grid;
  gap: clamp(1.6rem, 3.4vw, 3.4rem);
  align-items: start;
}

@media (min-width: 60rem) {
  .rp-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "pitch stage"
      "foot  stage";
    column-gap: clamp(2rem, 4vw, 4.5rem);
    row-gap: 2rem;
  }

  .rp-pitch {
    grid-area: pitch;
  }

  .rp-stage {
    grid-area: stage;
    position: sticky;
    top: clamp(1rem, 2.5vw, 2rem);
  }

  .rp-foot {
    grid-area: foot;
    align-self: end;
  }
}

/* ============================================================ pitch ==== */

.rp-pitch {
  max-width: 34rem;
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.rp-back {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem 0.5rem 0.7rem;
  border: 1px solid var(--rp-line-strong);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.7);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.rp-back:hover {
  border-color: var(--rp-ink);
  background: var(--rp-card);
}

.rp-kicker {
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--rp-accent-ink);
}

.rp-pitch h1 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  text-wrap: balance;
}

.rp-pitch__lede {
  max-width: 46ch;
  color: var(--rp-ink-soft);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
}

.rp-pitch__list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.35rem;
}

.rp-pitch__list li {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
  color: var(--rp-ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rp-pitch__list .rp-icon {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.05rem;
  padding: 0.22rem;
  border: 1px solid var(--rp-line);
  border-radius: 0.5rem;
  background: var(--rp-card);
  color: var(--rp-accent-ink);
  box-sizing: border-box;
}

.rp-pitch__actions {
  margin-top: 0.4rem;
}

.rp-fine {
  color: var(--rp-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* ========================================================== buttons ==== */

.rp-btn {
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--rp-accent-ink);
  border-radius: 999px;
  background: var(--rp-accent-ink);
  color: var(--rp-card);
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.rp-btn:hover {
  background: var(--rp-accent-deep);
  border-color: var(--rp-accent-deep);
  transform: translateY(-1px);
}

.rp-btn:active {
  transform: translateY(0) scale(0.99);
}

.rp-btn--ghost {
  border-color: var(--rp-line-strong);
  background: var(--rp-card);
  color: var(--rp-ink);
}

.rp-btn--ghost:hover {
  border-color: var(--rp-ink);
  background: var(--rp-paper-deep);
  color: var(--rp-ink);
}

.rp-btn--ink {
  border-color: var(--rp-ink);
  background: var(--rp-ink);
  color: var(--rp-paper);
}

.rp-btn--ink:hover {
  border-color: #000;
  background: #000;
}

.rp-btn--light {
  border-color: var(--rp-card);
  background: var(--rp-card);
  color: var(--rp-ink);
}

.rp-btn--light:hover {
  border-color: #fff;
  background: #fff;
  color: var(--rp-ink);
}

.rp-btn--sm {
  min-height: 2.75rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.78rem;
}

.rp-btn--full {
  width: 100%;
}

.rp-btn[disabled],
.rp-btn[aria-disabled="true"] {
  border-color: var(--rp-line-strong);
  background: transparent;
  color: var(--rp-muted);
  cursor: not-allowed;
  transform: none;
}

.rp-btn--light[disabled] {
  border-color: rgba(241, 234, 223, 0.4);
  color: rgba(241, 234, 223, 0.8);
}

.rp-linkish {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.2rem;
  color: var(--rp-accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.24em;
}

.rp-linkish:hover {
  color: var(--rp-accent-deep);
}

.rp-linkish--quiet {
  color: var(--rp-muted);
}

.rp-linkish--quiet:hover {
  color: var(--rp-ink);
}

/* =========================================================== phone ===== */

.rp-stage {
  display: grid;
  justify-items: center;
}

.rp-phone {
  width: min(100%, 24.6rem);
  padding: 0.55rem;
  border: 1.5px solid var(--rp-ink);
  border-radius: 2.4rem;
  background: linear-gradient(180deg, #2a2926, #191917);
  box-shadow: var(--rp-shadow-lg);
}

.rp-phone__inner {
  position: relative;
  height: min(50rem, calc(100svh - 6rem));
  min-height: 34rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.95rem;
  background: var(--rp-paper);
  /* Stitched inner edge — a clothing cue rather than a phone bezel. */
  box-shadow: inset 0 0 0 1px rgba(241, 234, 223, 0.35);
}

/* ------------------------------------------------------ woven label -- */

.rp-label {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 0.55rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem 0.7rem;
  background: var(--rp-ink);
  color: var(--rp-paper);
}

.rp-label__stitch {
  height: 2.1rem;
  border-left: 1px dashed rgba(241, 234, 223, 0.45);
}

.rp-label__type {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.rp-label__type strong {
  font-family: var(--rp-serif);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.rp-label__type small {
  overflow: hidden;
  color: rgba(241, 234, 223, 0.74);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-stub {
  min-height: 2.75rem;
  display: grid;
  gap: 0.05rem;
  padding: 0.4rem 0.7rem;
  border: 1px dashed rgba(241, 234, 223, 0.5);
  border-radius: 0.5rem;
  color: var(--rp-paper);
  text-align: right;
}

.rp-stub:hover {
  border-color: var(--rp-paper);
  background: rgba(241, 234, 223, 0.1);
}

.rp-stub__who {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.rp-stub__hooks {
  color: rgba(241, 234, 223, 0.74);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.rp-stub__hooks b {
  color: var(--rp-teal);
  font-weight: 800;
}

/* ------------------------------------------------------- demo strip -- */

.rp-demo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem;
  background: var(--rp-accent-ink);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 640;
  letter-spacing: 0.03em;
}

.rp-demo__dot {
  width: 0.4rem;
  height: 0.4rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
}

/* -------------------------------------------------------- rail nav --- */

.rp-rail {
  position: relative;
  flex: 0 0 auto;
  padding: 0.9rem 0.6rem 0.55rem;
  background: var(--rp-ink);
}

.rp-rail__tube {
  position: absolute;
  top: 0.78rem;
  right: 0.75rem;
  left: 0.75rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(241, 234, 223, 0.85), rgba(241, 234, 223, 0.35));
}

.rp-rail ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.15rem;
}

.rp-rail button {
  position: relative;
  width: 100%;
  min-height: 3.1rem;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  padding: 0 0.1rem 0.3rem;
  color: rgba(241, 234, 223, 0.78);
}

.rp-rail__drop {
  width: 1px;
  height: 0.5rem;
  background: rgba(241, 234, 223, 0.45);
}

.rp-rail__tile {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(241, 234, 223, 0.34);
  border-radius: 0.55rem;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.rp-rail__tile .rp-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.rp-rail__word {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-align: center;
}

.rp-rail button:hover .rp-rail__tile {
  border-color: var(--rp-paper);
  background: rgba(241, 234, 223, 0.12);
}

.rp-rail button[aria-current="page"] {
  color: var(--rp-paper);
}

.rp-rail button[aria-current="page"] .rp-rail__drop {
  height: 0.85rem;
  background: var(--rp-paper);
}

.rp-rail button[aria-current="page"] .rp-rail__tile {
  border-color: var(--rp-paper);
  background: var(--rp-paper);
  color: var(--rp-ink);
}

.rp-rail button[aria-current="page"] .rp-rail__word {
  font-weight: 800;
}

.rp-rail__pip {
  position: absolute;
  top: 0.35rem;
  right: 0.42rem;
  min-width: 1.05rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  background: var(--rp-teal);
  color: var(--rp-ink);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.05rem;
  text-align: center;
}

/* ---------------------------------------------------------- screen --- */

.rp-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 0.9rem 2.2rem;
  background: var(--rp-paper);
  scrollbar-width: thin;
}

.rp-view:focus-visible {
  outline: 3px solid var(--rp-focus);
  outline-offset: -3px;
}

.rp-screen {
  display: grid;
  gap: 0.95rem;
}

.rp-screen__head {
  display: grid;
  gap: 0.3rem;
}

.rp-screen__head h2 {
  font-size: 1.5rem;
  text-wrap: balance;
}

.rp-screen__head p {
  color: var(--rp-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* ============================================================ cards ==== */

.rp-card {
  padding: 0.95rem;
  border: 1px solid var(--rp-line);
  border-radius: 1rem;
  background: var(--rp-card);
  box-shadow: var(--rp-shadow-sm);
}

.rp-card--ink {
  border-color: var(--rp-ink);
  background: var(--rp-ink);
  color: var(--rp-paper);
}

.rp-card--flat {
  background: var(--rp-paper-deep);
  box-shadow: none;
}

.rp-card__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 1rem;
}

/* ------------------------------------------------------ fit banner --- */

.rp-reading {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--rp-line);
  border-left: 4px solid var(--rp-accent-ink);
  border-radius: 0.85rem;
  background: var(--rp-card);
}

.rp-reading__label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rp-accent-ink);
}

.rp-reading__text {
  font-size: 0.85rem;
  line-height: 1.5;
}

.rp-reading__text b {
  font-weight: 750;
}

.rp-reading__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* -------------------------------------------------------- filters ---- */

.rp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rp-filter {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.65rem;
  background: var(--rp-card);
  font-size: 0.76rem;
  font-weight: 680;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.rp-filter:hover {
  border-color: var(--rp-ink);
}

.rp-filter b {
  padding: 0 0.32rem;
  border-radius: 999px;
  background: var(--rp-paper-deep);
  font-size: 0.68rem;
  font-weight: 800;
}

.rp-filter[aria-pressed="true"] {
  border-color: var(--rp-ink);
  background: var(--rp-ink);
  color: var(--rp-paper);
}

.rp-filter[aria-pressed="true"] b {
  background: rgba(241, 234, 223, 0.2);
  color: var(--rp-paper);
}

/* ------------------------------------------------------- garments ---- */

.rp-g {
  width: 100%;
  height: auto;
}

.rp-g__body {
  fill: var(--way, #d8c3a0);
  stroke: var(--rp-ink);
  stroke-width: 2.4;
  stroke-linejoin: round;
  transition: fill 220ms ease;
}

.rp-g__shade {
  fill: var(--shade, rgba(29, 29, 27, 0.2));
  stroke: var(--rp-ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.rp-g__line {
  fill: none;
  stroke: var(--line, var(--rp-ink));
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.5;
}

.rp-g__dot {
  fill: var(--line, var(--rp-ink));
  opacity: 0.5;
}

.rp-g__outline {
  fill: none;
  stroke: var(--rp-ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}

/* ------------------------------------------------------ piece rows --- */

.rp-pieces {
  display: grid;
  gap: 0.7rem;
}

.rp-piece {
  width: 100%;
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.8rem;
  border: 1px solid var(--rp-line);
  border-radius: 1rem;
  background: var(--rp-card);
  box-shadow: var(--rp-shadow-sm);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease;
}

.rp-piece:hover {
  border-color: var(--rp-ink);
  transform: translateY(-1px);
}

.rp-piece__art {
  display: grid;
  place-items: center;
  padding: 0.35rem;
  border-radius: 0.7rem;
  background: var(--rp-paper-deep);
}

.rp-piece__art .rp-g {
  max-width: 3.4rem;
}

.rp-piece__body {
  min-width: 0;
  display: grid;
  gap: 0.28rem;
  align-content: start;
}

.rp-piece__cat {
  color: var(--rp-muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rp-piece__name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--rp-serif);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.rp-piece__price {
  flex: 0 0 auto;
  font-family: var(--rp-sans);
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0;
}

.rp-piece__runs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--rp-muted);
  font-size: 0.72rem;
}

.rp-gauge {
  display: inline-flex;
  gap: 2px;
  flex: 0 0 auto;
}

.rp-gauge i {
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid var(--rp-line-strong);
  border-radius: 50%;
}

.rp-gauge i.is-on {
  border-color: var(--rp-accent-ink);
  background: var(--rp-accent-ink);
}

.rp-piece__size {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.rp-sizetag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--rp-ink);
  border-radius: 0.45rem;
  background: var(--rp-ink);
  color: var(--rp-paper);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.rp-sizetag--soft {
  border-color: var(--rp-line-strong);
  background: transparent;
  color: var(--rp-ink);
  font-weight: 700;
}

.rp-sizetag small {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.rp-avail {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.71rem;
  font-weight: 640;
  line-height: 1.35;
}

.rp-avail::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.rp-avail--here {
  color: var(--rp-teal-deep);
}

.rp-avail--transfer {
  color: var(--rp-warn);
}

.rp-avail--none {
  color: var(--rp-accent-ink);
}

.rp-piece__held {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(31, 107, 105, 0.14);
  color: var(--rp-teal-deep);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ------------------------------------------------------ empty state -- */

.rp-empty {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  padding: 1.4rem 1rem 1.6rem;
  border: 1px dashed var(--rp-line-strong);
  border-radius: 1rem;
  background: var(--rp-card);
  text-align: center;
}

.rp-empty svg.rp-emptyart {
  width: 100%;
  max-width: 13rem;
  height: auto;
}

.rp-empty h3 {
  font-family: var(--rp-serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.rp-empty p {
  max-width: 34ch;
  color: var(--rp-muted);
  font-size: 0.81rem;
  line-height: 1.55;
}

/* =========================================================== forms ==== */

.rp-form {
  display: grid;
  gap: 0.8rem;
}

.rp-fieldset {
  display: grid;
  gap: 0.5rem;
  padding: 0;
  border: 0;
}

.rp-fieldset legend {
  padding: 0;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rp-muted);
}

.rp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rp-chips--grow > .rp-chip {
  flex: 1 1 6.5rem;
}

.rp-chip {
  position: relative;
  min-height: 2.85rem;
  min-width: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.65rem;
  background: var(--rp-card);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.rp-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.rp-chip > span {
  display: grid;
  gap: 0.08rem;
  text-align: center;
  pointer-events: none;
}

.rp-chip small {
  color: var(--rp-muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
}

.rp-chip:hover {
  border-color: var(--rp-ink);
}

.rp-chip:has(input:checked) {
  border-color: var(--rp-ink);
  background: var(--rp-ink);
  color: var(--rp-paper);
}

.rp-chip:has(input:checked) small {
  color: rgba(241, 234, 223, 0.8);
}

.rp-chip:has(input:focus-visible) {
  outline: 3px solid var(--rp-focus);
  outline-offset: 3px;
}

.rp-field {
  display: grid;
  gap: 0.28rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rp-muted);
}

.rp-field input,
.rp-field select {
  min-height: 2.9rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.6rem;
  background: var(--rp-card);
  color: var(--rp-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.rp-field input::placeholder {
  color: #7a716a;
  font-weight: 500;
}

.rp-field input:hover,
.rp-field select:hover {
  border-color: var(--rp-ink);
}

.rp-measures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.rp-measures .rp-field--full {
  grid-column: 1 / -1;
}

/* ================================================== fit output ======== */

.rp-verdicts {
  display: grid;
  gap: 0;
  margin-top: 0.15rem;
}

.rp-verdicts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--rp-line);
}

.rp-verdicts li:first-child {
  border-top: 0;
}

.rp-verdicts li:has(.rp-verdrow) {
  display: block;
  padding: 0;
}

.rp-verdrow {
  width: 100%;
  min-height: 2.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.35rem;
  border-radius: 0.5rem;
  text-align: left;
}

.rp-verdrow:hover {
  background: var(--rp-paper);
}

.rp-verdicts__name {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.rp-verdicts__name span {
  font-size: 0.87rem;
  font-weight: 700;
}

.rp-verdicts__name small {
  color: var(--rp-muted);
  font-size: 0.71rem;
  font-weight: 500;
  line-height: 1.4;
}

.rp-verdicts__size {
  min-width: 3.1rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.5rem;
  background: var(--rp-ink);
  color: var(--rp-paper);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.rp-verdicts__size--one {
  background: var(--rp-paper-deep);
  color: var(--rp-ink);
  font-size: 0.68rem;
  font-weight: 700;
}

/* -------------------------------------------------- memory ledger ---- */

.rp-memory {
  display: grid;
  gap: 0.5rem;
}

.rp-memory li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--rp-line);
  border-radius: 0.7rem;
  background: var(--rp-paper);
}

.rp-memory__what {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.rp-memory__what small {
  color: var(--rp-muted);
  font-size: 0.71rem;
  font-weight: 500;
  line-height: 1.4;
}

.rp-forget {
  min-height: 2.75rem;
  min-width: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.55rem;
  color: var(--rp-muted);
}

.rp-forget:hover {
  border-color: var(--rp-accent-ink);
  color: var(--rp-accent-ink);
}

.rp-nudge {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--rp-teal-deep);
  border-radius: 0.9rem;
  background: rgba(89, 198, 195, 0.16);
}

.rp-nudge h3 {
  font-family: var(--rp-serif);
  font-size: 1.02rem;
  font-weight: 600;
}

.rp-nudge p {
  color: var(--rp-ink-soft);
  font-size: 0.81rem;
  line-height: 1.5;
}

.rp-nudge__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* ==================================================== fitting room ==== */

.rp-hooks {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.9rem;
  background: var(--rp-ink);
  color: var(--rp-paper);
}

.rp-hooks__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.rp-hooks__top strong {
  font-family: var(--rp-serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.rp-hooks__count {
  color: var(--rp-teal);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rp-hookbar {
  position: relative;
  display: flex;
  gap: 0.4rem;
  padding-top: 0.55rem;
}

.rp-hookbar::before {
  content: "";
  position: absolute;
  top: 0.16rem;
  right: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(241, 234, 223, 0.55);
}

.rp-hookbar i {
  position: relative;
  flex: 1 1 0;
  height: 1.5rem;
  border: 1px dashed rgba(241, 234, 223, 0.4);
  border-top: 0;
  border-radius: 0 0 0.4rem 0.4rem;
}

.rp-hookbar i.is-used {
  border-style: solid;
  border-color: var(--rp-teal);
  background: rgba(89, 198, 195, 0.28);
}

.rp-hooks__note {
  color: rgba(241, 234, 223, 0.78);
  font-size: 0.74rem;
  line-height: 1.5;
}

.rp-shoppick {
  display: grid;
  gap: 0.45rem;
}

.rp-held {
  display: grid;
  gap: 0.6rem;
}

.rp-heldcard {
  display: grid;
  gap: 0.6rem;
  padding: 0.8rem;
  border: 1px solid var(--rp-line);
  border-radius: 1rem;
  background: var(--rp-card);
  box-shadow: var(--rp-shadow-sm);
}

.rp-heldcard__top {
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.6rem;
}

.rp-heldcard__art {
  display: grid;
  place-items: center;
  padding: 0.3rem;
  border-radius: 0.6rem;
  background: var(--rp-paper-deep);
}

.rp-heldcard__art .rp-g {
  max-width: 2.5rem;
}

.rp-heldcard__id {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.rp-heldcard__id strong {
  font-family: var(--rp-serif);
  font-size: 0.98rem;
  font-weight: 600;
}

.rp-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.6rem;
  overflow: hidden;
}

.rp-stepper button {
  min-width: 2.5rem;
  min-height: 2.75rem;
  display: grid;
  place-items: center;
  background: var(--rp-card);
  color: var(--rp-ink);
}

.rp-stepper button:hover:not([disabled]) {
  background: var(--rp-paper-deep);
}

.rp-stepper button[disabled] {
  color: #6b635c;
  cursor: not-allowed;
}

.rp-stepper output {
  min-width: 3rem;
  display: grid;
  place-items: center;
  padding: 0 0.35rem;
  border-right: 1px solid var(--rp-line);
  border-left: 1px solid var(--rp-line);
  background: var(--rp-paper);
  font-size: 0.86rem;
  font-weight: 800;
}

.rp-heldcard__lines {
  display: grid;
  gap: 0.35rem;
}

.rp-heldcard__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  justify-content: space-between;
}

.rp-toggle {
  position: relative;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem 0.35rem 0.4rem;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.6rem;
  background: var(--rp-paper);
  font-size: 0.75rem;
  font-weight: 680;
  cursor: pointer;
}

.rp-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rp-toggle__box {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--rp-line-strong);
  border-radius: 0.32rem;
  background: var(--rp-card);
  color: transparent;
}

.rp-toggle__box .rp-icon {
  width: 0.8rem;
  height: 0.8rem;
  stroke-width: 2.6;
}

.rp-toggle:hover {
  border-color: var(--rp-ink);
}

.rp-toggle:has(input:checked) {
  border-color: var(--rp-teal-deep);
  background: rgba(89, 198, 195, 0.18);
}

.rp-toggle:has(input:checked) .rp-toggle__box {
  border-color: var(--rp-teal-deep);
  background: var(--rp-teal-deep);
  color: #fff;
}

.rp-toggle:has(input:disabled) {
  color: var(--rp-muted);
  cursor: not-allowed;
}

.rp-toggle:has(input:focus-visible) {
  outline: 3px solid var(--rp-focus);
  outline-offset: 3px;
}

.rp-fix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.6rem;
  background: var(--rp-paper-deep);
  font-size: 0.74rem;
  line-height: 1.45;
}

.rp-remove {
  min-height: 2.75rem;
  min-width: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.55rem;
  color: var(--rp-muted);
}

.rp-remove:hover {
  border-color: var(--rp-accent-ink);
  color: var(--rp-accent-ink);
}

/* ------------------------------------------------------- stage flow -- */

.rp-stageline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.25rem;
  margin-bottom: 0.15rem;
}

.rp-stageline div {
  display: grid;
  gap: 0.3rem;
  color: var(--rp-muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.rp-stageline div::before {
  content: "";
  height: 4px;
  border-radius: 4px;
  background: var(--rp-line);
}

.rp-stageline div.is-done::before {
  background: var(--rp-accent-ink);
}

.rp-stageline div.is-done {
  color: var(--rp-accent-ink);
}

.rp-stageline div.is-now::before {
  background: var(--rp-ink);
}

.rp-stageline div.is-now {
  color: var(--rp-ink);
  font-weight: 800;
}

.rp-hung {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--rp-teal-deep);
  border-radius: 0.9rem;
  background: rgba(89, 198, 195, 0.16);
}

.rp-hung__code {
  font-family: var(--rp-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.rp-hung__clock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--rp-teal-deep);
}

.rp-hung__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* -------------------------------------------------- try-on ledger ---- */

.rp-try {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid var(--rp-line);
  border-radius: 1rem;
  background: var(--rp-card);
}

.rp-try__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.rp-try__head strong {
  font-family: var(--rp-serif);
  font-size: 0.98rem;
  font-weight: 600;
}

.rp-try__size {
  color: var(--rp-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.rp-try__opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.rp-try__opt {
  min-height: 3.1rem;
  display: grid;
  place-items: center;
  gap: 0.1rem;
  padding: 0.4rem 0.3rem;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.6rem;
  background: var(--rp-paper);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.2;
  text-align: center;
}

.rp-try__opt:hover {
  border-color: var(--rp-ink);
}

.rp-try__opt[aria-pressed="true"] {
  border-color: var(--rp-ink);
  background: var(--rp-ink);
  color: var(--rp-paper);
}

.rp-try__said {
  color: var(--rp-teal-deep);
  font-size: 0.74rem;
  font-weight: 700;
}

.rp-progress {
  display: grid;
  gap: 0.3rem;
}

.rp-progress__bar {
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--rp-paper-deep);
}

.rp-progress__bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--rp-accent-ink);
  transition: width 260ms ease;
}

.rp-progress__label {
  color: var(--rp-muted);
  font-size: 0.73rem;
  font-weight: 700;
}

/* =========================================================== shops ==== */

.rp-shop {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem;
  border: 1px solid var(--rp-line);
  border-radius: 1rem;
  background: var(--rp-card);
  box-shadow: var(--rp-shadow-sm);
}

.rp-shop.is-picked {
  border-color: var(--rp-ink);
  border-left-width: 4px;
}

.rp-shop h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--rp-serif);
  font-size: 1.12rem;
  font-weight: 600;
}

.rp-shop__role {
  color: var(--rp-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rp-shop__line {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  align-items: start;
  gap: 0.45rem;
  font-size: 0.79rem;
  line-height: 1.45;
}

.rp-shop__line .rp-icon {
  margin-top: 0.14rem;
  color: var(--rp-accent-ink);
}

.rp-shop__score {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.6rem;
  background: var(--rp-paper-deep);
  font-size: 0.78rem;
  line-height: 1.45;
}

.rp-shop__score b {
  font-weight: 800;
}

.rp-map {
  width: 100%;
  height: auto;
  border-radius: 0.7rem;
}

.rp-map__ground {
  fill: var(--rp-paper-deep);
}

.rp-map__block {
  fill: rgba(29, 29, 27, 0.14);
  stroke: rgba(29, 29, 27, 0.2);
  stroke-width: 1;
}

.rp-map__street {
  fill: none;
  stroke: var(--rp-card);
  stroke-width: 12;
  stroke-linecap: round;
}

.rp-map__rail {
  fill: none;
  stroke: var(--rp-ink);
  stroke-width: 1.6;
  stroke-dasharray: 6 5;
  opacity: 0.45;
}

.rp-map__pin {
  fill: var(--rp-accent-ink);
  stroke: var(--rp-card);
  stroke-width: 2.4;
}

.rp-map__pin--alt {
  fill: var(--rp-teal-deep);
}

.rp-map__label {
  fill: var(--rp-ink);
  font-family: var(--rp-sans);
  font-size: 11px;
  font-weight: 750;
}

.rp-map__label--faint {
  fill: var(--rp-muted);
  font-size: 9px;
  font-weight: 600;
}

/* ==================================================== piece sheet ===== */

.rp-sheet {
  display: grid;
  gap: 0.85rem;
}

.rp-sheet__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  justify-items: center;
  padding: 0.9rem;
  border-radius: 0.9rem;
  background: var(--rp-paper-deep);
}

.rp-sheet__hero .rp-g {
  max-width: 9.5rem;
}

.rp-ways {
  display: flex;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  margin: 0;
}

.rp-way {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
}

.rp-way input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rp-way::after {
  content: "";
  width: 1.6rem;
  height: 1.6rem;
  border: 1.5px solid var(--rp-ink);
  border-radius: 50%;
  background: var(--swatch, #ccc);
  transition: box-shadow 150ms ease;
}

.rp-way:has(input:checked)::after {
  box-shadow: 0 0 0 3px var(--rp-paper-deep), 0 0 0 5px var(--rp-ink);
}

.rp-way:has(input:focus-visible) {
  outline: 3px solid var(--rp-focus);
  outline-offset: 1px;
}

.rp-sheet__way {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rp-sheet__title {
  display: grid;
  gap: 0.2rem;
}

.rp-sheet__title h3 {
  font-family: var(--rp-serif);
  font-size: 1.4rem;
  font-weight: 600;
}

.rp-sheet__price {
  font-size: 1rem;
  font-weight: 750;
}

.rp-sheet__blurb {
  color: var(--rp-ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.rp-sizegrid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.rp-sizegrid caption {
  padding-bottom: 0.35rem;
  color: var(--rp-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.rp-sizegrid th,
.rp-sizegrid td {
  padding: 0.4rem 0.3rem;
  border-bottom: 1px solid var(--rp-line);
  text-align: center;
}

.rp-sizegrid thead th {
  color: var(--rp-muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.rp-sizegrid tbody th {
  font-weight: 800;
  text-align: left;
}

.rp-sizegrid tr.is-yours {
  background: rgba(230, 74, 46, 0.1);
}

.rp-sizegrid tr.is-yours th::after {
  content: " · yours";
  color: var(--rp-accent-ink);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rp-sizegrid td.is-out {
  color: #7a716a;
}

.rp-spec {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.rp-spec div {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.5rem;
  font-size: 0.79rem;
  line-height: 1.45;
}

.rp-spec dt {
  color: var(--rp-muted);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 0.12rem;
}

.rp-spec dd {
  margin: 0;
}

.rp-pairs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rp-muted);
}

.rp-pair {
  min-height: 2.75rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--rp-line-strong);
  border-radius: 999px;
  background: var(--rp-card);
  color: var(--rp-ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.rp-pair:hover {
  border-color: var(--rp-ink);
  background: var(--rp-paper-deep);
}

/* ========================================================== dialogs ==== */

.rp-dialog {
  /* The `* { margin: 0 }` reset above kills the UA's `margin: auto` on
     <dialog>, which is what centres a modal in the viewport. Put it back. */
  margin: auto;
  width: min(30rem, calc(100vw - 1.6rem));
  max-width: none;
  max-height: min(46rem, calc(100svh - 2rem));
  padding: 0;
  border: 1px solid var(--rp-ink);
  border-radius: 1.2rem;
  background: var(--rp-card);
  color: var(--rp-ink);
  box-shadow: var(--rp-shadow);
  overflow: hidden;
}

.rp-dialog::backdrop {
  background: rgba(24, 22, 20, 0.62);
  backdrop-filter: blur(2px);
}

.rp-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.rp-dialog__close-form {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  padding: 0.55rem 0.55rem 0;
  background: linear-gradient(180deg, var(--rp-card) 62%, transparent);
}

.rp-dialog__close {
  min-height: 2.75rem;
  min-width: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rp-line-strong);
  border-radius: 0.6rem;
  background: var(--rp-card);
  color: var(--rp-ink);
}

.rp-dialog__close:hover {
  border-color: var(--rp-ink);
  background: var(--rp-paper-deep);
}

.rp-dialog__body {
  overflow-y: auto;
  padding: 0.4rem 1.1rem 1.3rem;
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.rp-dialog__body h2 {
  font-family: var(--rp-serif);
  font-size: 1.45rem;
  font-weight: 600;
}

.rp-dialog__lede {
  color: var(--rp-ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.rp-form__summary {
  padding: 0.6rem 0.7rem;
  border-radius: 0.6rem;
  background: var(--rp-paper-deep);
  font-size: 0.79rem;
  line-height: 1.5;
}

.rp-ask__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.rp-dialog--ask {
  width: min(23rem, calc(100vw - 1.6rem));
}

.rp-dialog--ask .rp-dialog__body {
  padding: 1.1rem;
}

/* -------------------------------------------------------- the tag ---- */

.rp-dialog--ticket {
  border-color: #000;
  background: var(--rp-ink);
  color: var(--rp-paper);
}

.rp-dialog--ticket .rp-dialog__close-form {
  background: linear-gradient(180deg, var(--rp-ink) 62%, transparent);
}

.rp-dialog__close--onink {
  border-color: rgba(241, 234, 223, 0.42);
  background: transparent;
  color: var(--rp-paper);
}

.rp-dialog__close--onink:hover {
  border-color: var(--rp-paper);
  background: rgba(241, 234, 223, 0.14);
}

.rp-tag {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 0.9rem;
  background: var(--rp-paper);
  color: var(--rp-ink);
}

.rp-tag__punch {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--rp-line-strong);
}

.rp-tag__hole {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  border: 1.5px solid var(--rp-ink);
  border-radius: 50%;
  background: var(--rp-ink);
  box-shadow: inset 0 0 0 3px var(--rp-paper);
}

.rp-tag__code {
  font-family: var(--rp-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.rp-tag__who {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rp-tag__rows {
  display: grid;
  gap: 0.35rem;
}

.rp-tag__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--rp-line);
  font-size: 0.82rem;
}

.rp-tag__row span {
  font-weight: 600;
}

.rp-tag__row b {
  font-weight: 800;
}

.rp-tag__meta {
  display: grid;
  gap: 0.15rem;
  font-size: 0.76rem;
  color: var(--rp-muted);
}

.rp-tag__weave {
  width: 100%;
  height: 2.6rem;
  border-radius: 0.4rem;
}

/* =========================================================== toast ==== */

/* The toast belongs to the phone, not the page — it is absolutely placed
   inside the device so it reads as in-app, and only becomes viewport-fixed
   below the breakpoint where the device stops being its own scroller. */
.rp-toast {
  position: absolute;
  z-index: 20;
  bottom: 1rem;
  left: 50%;
  max-width: calc(100% - 2rem);
  padding: 0.7rem 1.05rem;
  transform: translate(-50%, 140%);
  border-radius: 0.75rem;
  background: var(--rp-ink);
  color: var(--rp-paper);
  font-size: 0.82rem;
  font-weight: 640;
  line-height: 1.4;
  box-shadow: var(--rp-shadow);
  transition: transform 260ms ease, opacity 260ms ease;
  opacity: 0;
  pointer-events: none;
}

.rp-toast.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ============================================================ foot ==== */

.rp-foot {
  max-width: 40rem;
  display: grid;
  gap: 0.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rp-line);
  color: var(--rp-muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.rp-foot strong {
  color: var(--rp-ink);
}

.rp-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.rp-foot nav a {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--rp-accent-ink);
}

.rp-noscript {
  max-width: 36rem;
  margin: 0 auto 2rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rp-accent-ink);
  border-radius: 0.9rem;
  background: var(--rp-card);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* ==================================================== small screens === */

@media (max-width: 47.99rem) {
  .rp-phone {
    width: 100%;
    padding: 0.3rem;
    border-radius: 1.3rem;
  }

  .rp-phone__inner {
    height: auto;
    min-height: 0;
    border-radius: 1.05rem;
  }

  .rp-view {
    max-height: none;
    overflow: visible;
  }

  .rp-toast {
    position: fixed;
    z-index: 80;
    bottom: 1.15rem;
    max-width: min(24rem, calc(100vw - 2rem));
  }

  /* The pitch is context, not the product — on a phone it must not push the
     phone a screen and a half down the page. */
  .rp-shell {
    gap: 1.35rem;
  }

  .rp-pitch {
    gap: 0.75rem;
  }

  .rp-pitch h1 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .rp-pitch__lede {
    font-size: 0.92rem;
  }

  .rp-pitch__list {
    gap: 0.5rem;
  }

  .rp-pitch__list li {
    grid-template-columns: 1.6rem minmax(0, 1fr);
    font-size: 0.82rem;
  }

  .rp-pitch__list .rp-icon {
    width: 1.2rem;
    height: 1.2rem;
  }
}

@media (max-width: 26rem) {
  .rp-try__opts {
    grid-template-columns: minmax(0, 1fr);
  }

  .rp-heldcard__top {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .rp-heldcard__top > .rp-stepper {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .rp-spec div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
