/* ==========================================================================
   Page styles, set E: ring-finder.html (the tournament ring finder).
   Loaded after redesign.css and pages-b.css (which supplies the dl-badge store
   buttons). Tokens, nav, island, footer, stars and the character slot all come
   from redesign.css. Prefix: rf-.
   ========================================================================== */

/* ---------- Head island with the search ---------- */
.rf-head-grid { position: relative; z-index: 1; }
.rf-head .lede { max-width: 560px; }

.rf-search { margin-top: 28px; max-width: 600px; }
.rf-label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--text-caption);
  line-height: 22px;
  color: var(--color-signal-blue);
}
.rf-field { display: flex; flex-wrap: wrap; gap: 10px; }
.rf-field input {
  flex: 1 1 240px;
  min-width: 0;
  height: 56px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-buttons);
  background: var(--color-white-surface);
  color: var(--color-edge-navy);
  font: 400 18px/1 var(--font-rubik);
}
.rf-field input::placeholder { color: #6b84a3; }
.rf-field input:focus-visible { outline: 3px solid var(--color-signal-orange); outline-offset: 2px; }
.rf-go { flex: 0 0 auto; height: 56px; padding: 0 22px; font-size: 18px; gap: 12px; }
.rf-go .rs-chevron { width: 20px; height: 20px; }
.rf-search.is-busy .rf-go { opacity: .7; cursor: progress; }
.rf-note {
  margin-top: 12px;
  font-size: var(--text-caption);
  line-height: 22px;
  color: var(--color-signal-blue);
}
@media (max-width: 479px) {
  .rf-go { flex: 1 1 100%; justify-content: space-between; }
}

.rf-head-art {
  position: relative;
  width: min(86%, 380px);
  margin: 28px 0 -64px auto;
  pointer-events: none;
}
@media (min-width: 900px) {
  .rf-head { padding-bottom: 88px; }
  .rf-head-copy { max-width: 560px; }
  .rf-head-art { position: absolute; right: var(--gutter); bottom: -120px; width: 400px; margin: 0; }
}
@media (min-width: 1200px) {
  .rf-head-copy { max-width: 600px; }
  .rf-head-art { width: 460px; right: calc(var(--gutter) + 10px); }
}

/* ---------- Results ---------- */
.rf-results { padding: 112px 0 24px; }
@media (min-width: 900px) { .rf-results { padding-top: 152px; } }

.rf-status { max-width: 760px; margin: 0 auto; text-align: center; color: var(--color-edge-navy); }
.rf-status p { font-size: var(--text-body); line-height: 1.3; text-wrap: pretty; }
.rf-status p + p { margin-top: 10px; }
.rf-status .rf-status-title {
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}
.rf-status a { color: var(--color-edge-navy); text-underline-offset: 3px; }

.rf-list {
  display: grid;
  gap: var(--element-gap);
  max-width: 760px;
  margin: 28px auto 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) { .rf-list:has(> :nth-child(2)) { grid-template-columns: 1fr 1fr; } }
.rf-card {
  padding: 24px 24px 22px 28px;
  border-radius: var(--radius-cards);
  background: var(--color-white-surface);
  box-shadow: var(--shadow-xl);
  color: var(--color-edge-navy);
}
.rf-card-name { font-size: var(--text-card-title); line-height: var(--leading-card-title); font-weight: 700; }
.rf-card-ring {
  margin-top: 6px;
  font-size: clamp(38px, 9vw, var(--text-section-heading));
  line-height: 1.1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* A slot with no ring number of its own ("Follows traditional competition in
   Saturday ring"): a sentence, so it gets sentence-sized type. */
.rf-card-ring--note { font-size: var(--text-card-title); line-height: var(--leading-card-title); text-wrap: pretty; }
.rf-card-when { font-size: var(--text-card-title); line-height: 1.3; font-weight: 500; color: var(--color-signal-orange); }
.rf-card-div { margin-top: 10px; font-size: 16px; line-height: 1.4; }
/* Event type above the division: "Creative/Xtreme" or "Traditional". */
.rf-card-type {
  margin-top: 12px;
  font-size: 12px; line-height: 1.3; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-graphite);
}
.rf-card-div--typed { margin-top: 2px; }
.rf-card-count { margin-top: 4px; font-size: var(--text-caption); line-height: 22px; color: var(--color-graphite); }

/* ---------- The app panel: copy + a drawn phone ---------- */
.rf-app {
  display: grid;
  gap: 32px;
  margin-top: 48px;
  padding: 36px 22px;
  border-radius: var(--radius-cards);
  background: var(--panel-dark-bg);
  color: var(--color-white-surface);
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 399px) { .rf-app { padding: 32px 14px; } }
@media (min-width: 900px) {
  .rf-app { grid-template-columns: 1fr auto; align-items: center; gap: 48px; padding: 56px 64px; }
}
.rf-kicker { font-size: var(--text-caption); line-height: 22px; color: var(--color-signal-blue); }
.rf-app h2 {
  margin-top: 8px;
  font-size: clamp(30px, 7vw, var(--text-promo-heading));
  line-height: var(--leading-promo-heading);
  font-weight: 700;
  text-wrap: balance;
}
.rf-app-copy > p:not(.rf-kicker):not(.rf-app-note) { margin-top: 16px; max-width: 520px; font-size: var(--text-body); line-height: 1.3; }
.rf-app-copy strong { font-weight: 500; color: var(--color-signal-orange); }
.rf-app-points { display: grid; gap: 8px; max-width: 520px; margin: 16px 0 0; padding: 0; list-style: none; }
.rf-app-points li { position: relative; padding-left: 26px; font-size: var(--text-body); line-height: 1.3; }
.rf-app-points li::before {
  content: ""; position: absolute; left: 2px; top: .38em;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--color-signal-blue); border-bottom: 2.5px solid var(--color-signal-blue);
  transform: rotate(-45deg);
}
.rf-badges { margin-top: 26px; justify-content: flex-start; }
.rf-app .rs-store--web { color: var(--color-white-surface); border-color: rgba(255, 255, 255, .7); }
.rf-app-note { margin-top: 14px; font-size: var(--text-caption); line-height: 22px; color: var(--color-signal-blue); }

/* The phone is a drawing of the app's own screen in its LIGHT theme (Adam,
   2026-10-01), so inside it the app's Ringside light tokens apply
   (TKD Companion src/app/globals.css, html.light). */
.rf-phone {
  --ph-bg: #e6eff8; --ph-card: #ffffff; --ph-strip: #f4f8fd; --ph-line: rgba(24, 61, 109, .14);
  --ph-text: #0b2a4d; --ph-muted: #4a6080; --ph-accent: #c2560f;
  --ph-gold: #8a6400; --ph-silver: #6b7785;
  justify-self: center;
  width: min(100%, 310px);
  margin: 0;
  padding: 10px;
  border-radius: var(--radius-phone);
  background: #1d1f25;
  box-shadow: var(--shadow-phone);
}
.rf-phone-screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: var(--ph-bg);
  color: var(--ph-text);
  font-family: var(--font-rubik);
  font-variant-numeric: tabular-nums;
}
.rf-ph-body { flex: 1; padding: 24px 14px 16px; }
.rf-ph-eyebrow { font-size: 10px; letter-spacing: .12em; color: var(--ph-muted); }
.rf-ph-card {
  margin-top: 10px; padding: 14px;
  border: 1px solid var(--ph-line); border-radius: 14px;
  background: var(--ph-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 8px 32px rgba(11, 42, 77, .08);
}
.rf-ph-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rf-ph-ring { font-size: 11px; letter-spacing: .1em; color: var(--ph-muted); }
.rf-ph-ring b { margin-left: 4px; font-size: 28px; line-height: 1; font-weight: 700; color: var(--ph-text); letter-spacing: 0; }
.rf-ph-ring.is-note span { display: none; }
.rf-ph-ring.is-note b { margin-left: 0; font-size: 11px; line-height: 1.35; font-weight: 500; letter-spacing: .06em; }
.rf-ph-when { flex: none; font-size: 12px; line-height: 1; font-weight: 500; color: var(--ph-accent); }
.rf-ph-type {
  margin-top: 10px;
  font-size: 10px; line-height: 1.3; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ph-muted);
}
.rf-ph-type[hidden], .rf-ph-div[hidden] { display: none; }
.rf-ph-type + .rf-ph-div { margin-top: 2px; }
.rf-ph-div { margin-top: 10px; font-size: 13px; line-height: 1.35; text-wrap: pretty; }
.rf-ph-count { margin-top: 6px; font-size: 12px; color: var(--ph-muted); }
.rf-ph-count b { color: var(--ph-text); font-weight: 500; }
/* The one coral thing on the screen: the button that sets the ring up. */
.rf-ph-cta {
  margin-top: 12px; padding: 13px 10px;
  border-radius: 10px;
  background: var(--gradient-coral-launch); color: #fff;
  text-align: center; font-size: 15px; line-height: 1.2; font-weight: 700;
}

/* The ring once it is set up: the app's points rows. */
.rf-ph-then {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ph-muted);
}
.rf-ph-then::before, .rf-ph-then::after { content: ""; flex: 1; border-top: 1px dashed rgba(24, 61, 109, .28); }
.rf-ph-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-top: 12px;
  font-size: 12px; font-weight: 700; color: var(--ph-muted);
}
.rf-ph-bar b { font-weight: 700; }
.rf-ph-new {
  padding: 5px 9px; border: 1px solid rgba(24, 61, 109, .3); border-radius: 6px;
  color: var(--ph-text); font-size: 11px;
}
.rf-ph-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.rf-ph-r {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--ph-line); border-radius: 10px;
  background: var(--ph-card);
  font-size: 13px;
}
.rf-ph-r[hidden] { display: none; }
.rf-ph-r.is-you { border-color: var(--ph-accent); box-shadow: inset 3px 0 0 var(--ph-accent); }
.rf-ph-place {
  flex: none; width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 12px; font-weight: 700; color: var(--ph-muted);
}
.rf-ph-place--1 { background: var(--ph-gold); color: #fff; }
.rf-ph-place--2 { background: var(--ph-silver); color: #fff; }
.rf-ph-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.rf-ph-r:not(.is-you) .rf-ph-name { font-style: italic; font-weight: 400; color: var(--ph-muted); }
.rf-ph-chips { display: flex; gap: 3px; flex: none; }
.rf-ph-chips i {
  min-width: 19px; padding: 2px 3px; border-radius: 4px;
  background: rgba(24, 61, 109, .1);
  text-align: center; font-style: normal; font-size: 11px; font-weight: 700;
}
.rf-ph-total { flex: none; width: 20px; text-align: right; font-size: 15px; font-weight: 700; }
.rf-ph-tap { flex: none; font-size: 11px; font-weight: 700; color: var(--ph-muted); }

/* The app's bottom bar: Home, Athletes, Events, Rings, School. */
.rf-ph-nav {
  display: flex; justify-content: space-around;
  padding: 8px 4px 12px;
  border-top: 1px solid var(--ph-line);
  background: var(--ph-bg);
}
.rf-ph-nav span {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 500; color: var(--ph-muted);
}
.rf-ph-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rf-ph-nav .is-on { color: var(--ph-accent); }
.rf-ph-nav .is-on svg { stroke-width: 2.6; }

/* ---------- How it works ---------- */
.rf-steps {
  display: grid;
  gap: var(--element-gap);
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) { .rf-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.rf-step {
  padding: 18px 20px 26px;
  border-radius: var(--radius-cards);
  background: var(--color-white-surface);
  box-shadow: var(--shadow-xl);
  color: var(--color-edge-navy);
  transition: transform var(--t-mid) var(--ease);
}
.rf-step:hover { transform: scale(1.02); }
.rf-step-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-cards);
  background: var(--color-ice-surface);
}
.rf-step h3 { margin-top: 18px; font-size: var(--text-card-title); line-height: var(--leading-card-title); font-weight: 700; }
.rf-step p { margin-top: 8px; font-size: 16px; line-height: 1.4; }

/* ---------- Guide link + small print ---------- */
.rf-guide { padding-top: 0; }
.rf-guide-card {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 30px;
  border-radius: var(--radius-cards);
  background: var(--color-white-surface);
  box-shadow: var(--shadow-xl);
  color: var(--color-edge-navy);
  text-decoration: none;
  transition: transform var(--t-mid) var(--ease);
}
.rf-guide-card:hover { transform: scale(1.02); }
.rf-guide-card .rf-kicker { color: var(--color-signal-orange); font-weight: 500; }
.rf-guide-title { font-size: clamp(24px, 5vw, 28px); line-height: 1.2; font-weight: 700; }
.rf-guide-text { font-size: 16px; line-height: 1.4; }
.rf-guide-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 16px; font-weight: 500; }
.rf-guide-more .rs-chevron { width: 18px; height: 18px; }
.rf-guide-card:hover .rs-chevron { transform: translateX(4px); }
.rf-small {
  max-width: 760px;
  margin: 24px auto 0;
  text-align: center;
  font-size: var(--text-caption);
  line-height: 22px;
  color: var(--color-graphite);
}
.rf-small a { color: var(--color-edge-navy); text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .rf-step, .rf-guide-card { transition: none; }
  .rf-step:hover, .rf-guide-card:hover { transform: none; }
}

/* The drawn phone on the narrowest screens: give the names a little more room. */
@media (max-width: 399px) {
  .rf-ph-body { padding-inline: 10px; }
  .rf-ph-r { gap: 6px; padding: 7px; }
  .rf-ph-chips { gap: 2px; }
  .rf-ph-chips i { min-width: 16px; padding: 2px; }
  .rf-ph-total { width: 18px; }
}
