/*
 * Earn Rewards standalone page.
 *
 * Colors, spacing and shadows come from the shared tokens in
 * /public/site.css (resources/css/tokens.css), so html[data-theme="dark"]
 * switches this page with the rest of MarketPawns. Every class is prefixed
 * with `rw-` so it never collides with the main site's component rules.
 */

:root {
  --rw-radius: 14px;
  --rw-radius-sm: 8px;
  --rw-max: 1180px;
  --rw-gold: var(--interactive-bg, #d6b56c);
}

html {
  scroll-behavior: smooth;
}

.rw-body {
  margin: 0;
  font-family: var(--font-family, 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif);
  font-size: 15px;
  line-height: 1.55;
  background: var(--neutral-primary);
  color: var(--text-primary);
}

.rw-body a {
  color: var(--brand-primary);
}

/* Components such as .rw-field set `display`, which would otherwise beat the hidden attribute. */
.rw-body [hidden] {
  display: none !important;
}

/* Base rules this page used to get from the main stylesheet; site.css only
   brings fonts, icons and tokens. :where() keeps them as weak as the
   original element selectors, so every rw- component rule still wins. */
:where(.rw-body, .rw-body *) {
  box-sizing: border-box;
}

:where(.rw-body) :where(a) {
  text-decoration: none;
}

:where(.rw-body) :where(button, input, select, textarea) {
  font: inherit;
}

:where(.rw-body) :focus-visible {
  outline: 3px solid rgba(214, 181, 108, 0.45);
  outline-offset: 2px;
}

/* ---------- Top bar ---------- */

/* Same bar as .mp-site-header (site.css): 64px, logo on the left, glass surface. */
.rw-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-raised);
  background: color-mix(in srgb, var(--surface-raised) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .rw-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.rw-topbar__inner {
  max-width: var(--rw-max);
  min-height: var(--mp-header-h, 64px);
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.rw-back {
  padding-left: var(--space-4);
  border-left: 1px solid var(--mp-hairline, var(--border-light));
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.rw-back:hover {
  text-decoration: underline;
}

.rw-nav {
  display: flex;
  gap: var(--space-1);
  margin: 0 auto;
  flex-wrap: wrap;
}

.rw-nav a {
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-secondary) !important;
  text-decoration: none;
  transition: var(--transition-fast);
}

.rw-nav a:hover,
.rw-nav a:focus-visible {
  color: var(--text-primary) !important;
  background: var(--interactive-hover-light);
}

.rw-user {
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Buttons ---------- */

.rw-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 18px;
  border-radius: var(--rw-radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.rw-btn:focus-visible {
  outline: 2px solid var(--rw-gold);
  outline-offset: 2px;
}

.rw-btn--primary {
  background: var(--rw-gold);
  color: #1c1e40 !important;
}

.rw-btn--primary:hover {
  background: var(--interactive-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.rw-btn--ghost {
  background: transparent;
  border-color: var(--border-medium, var(--border-light));
  color: var(--text-primary) !important;
}

.rw-btn--ghost:hover {
  border-color: var(--rw-gold);
}

.rw-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Layout ---------- */

.rw-main {
  max-width: var(--rw-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-12);
}

.rw-section {
  margin-top: var(--space-12);
  scroll-margin-top: 80px;
}

.rw-section__head {
  max-width: 760px;
  margin-bottom: var(--space-6);
}

.rw-section__head h2 {
  margin: 0 0 var(--space-2);
  font-size: 26px;
  font-weight: 600;
}

.rw-section__head p {
  margin: 0;
  color: var(--text-secondary);
}

.rw-grid {
  display: grid;
  gap: var(--space-4);
}

.rw-grid--cards {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.rw-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.rw-grid--three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.rw-muted {
  color: var(--text-secondary);
}

/* ---------- Hero ---------- */

.rw-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: var(--space-6);
  align-items: stretch;
  padding: var(--space-6);
  border-radius: var(--rw-radius);
  border: 1px solid var(--border-light);
  background:
    linear-gradient(180deg, var(--surface-tint), transparent 96px),
    var(--neutral-light);
  color: var(--text-primary);
  box-shadow: var(--mp-card-shadow, var(--shadow-sm));
}

.rw-eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--brand-primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}

.rw-hero h1 {
  margin: 0 0 var(--space-3);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}

.rw-lead {
  margin: 0 0 var(--space-5);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 620px;
}

.rw-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.rw-summary {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--rw-radius-sm);
  background: var(--surface-sunken);
  border: 1px solid var(--border-light);
}

.rw-summary__title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.rw-summary__label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
}

.rw-summary__amount {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.rw-summary__amount small {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.rw-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.rw-summary__item {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: var(--space-3);
  border-radius: var(--rw-radius-sm);
  background: var(--neutral-light);
  border: 1px solid var(--border-light);
}

.rw-summary__value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.rw-summary__value i {
  font-size: 13px;
  color: var(--interactive-hover);
}

.rw-summary__value small {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.rw-summary__hint {
  font-size: 12px;
  color: var(--text-secondary);
}

.rw-body .rw-summary__link {
  color: var(--brand-primary);
  text-decoration: none;
}

.rw-body .rw-summary__link:hover {
  text-decoration: underline;
}

.rw-summary__progress-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.rw-summary__progress-head strong {
  color: var(--text-primary);
}

.rw-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--border-light);
  overflow: hidden;
}

.rw-progress > span {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: var(--interactive-bg);
}

.rw-summary__guest-text {
  margin: 0;
  color: var(--text-secondary);
}

.rw-summary--guest .rw-btn {
  justify-self: start;
}

/* ---------- Reward pool ---------- */

.rw-pool {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border-light);
  border-radius: var(--rw-radius);
  background: var(--neutral-light);
  box-shadow: var(--mp-card-shadow, var(--shadow-sm));
}

.rw-pool__note,
.rw-pool__unavailable {
  margin: 0;
  color: var(--text-secondary);
}

.rw-pool__figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.rw-pool__figure {
  padding: var(--space-4);
  border-radius: var(--rw-radius-sm);
  background: var(--surface-sunken);
}

.rw-pool__amount {
  display: block;
  margin-top: var(--space-1);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-primary);
}

.rw-pool__amount small {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.rw-pool .rw-progress > span {
  min-width: 0;
}

.rw-panel.rw-issuance {
  padding: 0 var(--space-6);
}

.rw-issuance summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5) 0;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.rw-issuance summary::-webkit-details-marker {
  display: none;
}

.rw-issuance summary span {
  flex: 1;
}

.rw-issuance__chevron {
  color: var(--text-secondary);
  font-size: 13px;
  transition: transform 0.15s ease;
}

.rw-issuance[open] .rw-issuance__chevron {
  transform: rotate(180deg);
}

.rw-issuance .rw-list {
  margin-bottom: var(--space-3);
}

.rw-issuance__link {
  margin-bottom: var(--space-5);
}

.rw-issuance__link a {
  font-weight: 600;
}

/* ---------- Cards & panels ---------- */

.rw-card,
.rw-panel {
  background: var(--neutral-light);
  border: 1px solid var(--border-light);
  border-radius: var(--rw-radius);
  box-shadow: var(--shadow-sm);
}

.rw-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  transition: var(--transition-fast);
}

.rw-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rw-card--highlight {
  border-color: var(--rw-gold);
  background: linear-gradient(160deg, var(--interactive-hover-light), var(--neutral-light) 60%);
}

.rw-card__icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--interactive-hover-light);
  color: var(--interactive-hover);
  font-size: 19px;
}

.rw-card__body h3 {
  margin: 0 0 var(--space-1);
  font-size: 17px;
}

.rw-card__body p {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
  font-size: 14px;
}

.rw-card__source {
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1) !important;
}

.rw-card__amount {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--text-primary) !important;
  font-size: 20px !important;
  font-weight: 700;
}

.rw-card__amount span:not(.rw-badge) {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.rw-link {
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}

.rw-panel {
  padding: var(--space-5) var(--space-6);
}

.rw-panel + .rw-panel,
.rw-grid + .rw-panel,
.rw-grid + .rw-grid,
.rw-grid + .rw-steps {
  margin-top: var(--space-4);
}

/* Grid gaps already space the items; a sibling margin would push the second panel down. */
.rw-grid > .rw-panel,
.rw-claim > .rw-panel {
  margin-top: 0;
}

.rw-panel h3 {
  margin: 0 0 var(--space-3);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.rw-panel h3 > i {
  color: var(--interactive-hover);
}

.rw-panel > p {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary);
}

.rw-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.rw-list li + li {
  margin-top: var(--space-2);
}

.rw-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--interactive-hover-light);
  color: var(--interactive-hover);
  vertical-align: middle;
}

.rw-badge--success {
  background: rgba(40, 167, 69, 0.14);
  color: var(--accent-success);
}

.rw-badge--muted {
  background: var(--neutral-secondary, var(--border-light));
  color: var(--text-secondary);
}

/* ---------- Influence tiers ---------- */

.rw-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
}

.rw-tier {
  display: grid;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--rw-radius-sm);
  border: 1px solid var(--border-light);
  background: var(--neutral-primary);
}

.rw-tier.is-current {
  border-color: var(--rw-gold);
  background: var(--interactive-hover-light);
  box-shadow: inset 0 0 0 1px var(--rw-gold);
}

.rw-tier__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-primary);
}

.rw-tier i {
  color: var(--interactive-hover);
}

.rw-tier > span {
  font-size: 13px;
  color: var(--text-secondary);
}

.rw-tier > .rw-tier__mult {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ---------- Creator program ---------- */

.rw-platforms {
  margin-top: var(--space-4);
}

.rw-platform {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--rw-radius);
  background: var(--neutral-light);
  border: 1px solid var(--border-light);
}

.rw-platform > i {
  font-size: 30px;
  color: var(--text-secondary);
}

.rw-platform--youtube > i,
.rw-tutorials > i {
  color: #ff0033;
}

.rw-tutorials {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--rw-radius);
  border: 1px solid var(--rw-gold);
  background: var(--interactive-hover-light);
}

.rw-tutorials > i {
  font-size: 30px;
}

.rw-tutorials h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.rw-tutorials p {
  margin: var(--space-1) 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.rw-platform--instagram > i {
  color: #e1306c;
}

.rw-platform--tiktok > i {
  color: #fe2c55;
}

.rw-platform--x > i {
  color: var(--text-primary);
}

.rw-platform--telegram > i {
  color: #2aabee;
}

.rw-platform p {
  margin: var(--space-1) 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.rw-steps {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
  counter-reset: none;
}

.rw-steps li {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--rw-radius);
  background: var(--neutral-light);
  border: 1px solid var(--border-light);
}

.rw-steps li > span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--rw-gold);
  color: #1c1e40;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: var(--space-2);
}

.rw-steps strong {
  display: block;
}

.rw-steps p {
  margin: var(--space-1) 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Rates table ---------- */

/*
 * style.css styles bare table elements for the Board grid: block thead/tbody,
 * flex rows and cells, fixed 20px rows, 10-12px text with ellipsis and a
 * scrollable tbody with gradient overlays. Everything below is scoped with
 * `.rw-body .rw-table` so it outranks those rules (and the dark-theme ones).
 */
.rw-body .rw-table thead,
.rw-body .rw-table tbody {
  position: static;
  z-index: auto;
  width: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  background: none;
  border: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  transition: none;
}

.rw-body .rw-table thead {
  display: table-header-group;
}

.rw-body .rw-table tbody {
  display: table-row-group;
}

.rw-body .rw-table tbody::before,
.rw-body .rw-table tbody::after {
  content: none;
}

.rw-body .rw-table tr {
  display: table-row;
  width: auto;
}

.rw-body .rw-table th,
.rw-body .rw-table td {
  display: table-cell !important;
  min-width: 0;
  height: auto;
  overflow: visible;
  text-overflow: clip;
  vertical-align: middle !important;
  user-select: auto;
  -webkit-user-select: auto;
  border-left: 0;
}

.rw-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--rw-radius-sm);
}

.rw-body .rw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.rw-body .rw-table th,
.rw-body .rw-table td {
  padding: 10px 14px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-light);
}

.rw-body .rw-table thead th {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  color: var(--text-secondary);
  background: var(--neutral-primary);
  vertical-align: bottom !important;
}

.rw-body .rw-table th:first-child,
.rw-body .rw-table td:first-child {
  text-align: left;
}

.rw-body .rw-table tbody th {
  font-weight: 400;
}

.rw-body .rw-table tbody tr:last-child > * {
  border-bottom: 0;
}

.rw-body .rw-table tbody tr:hover {
  background: var(--interactive-hover-gradient);
}

.rw-body .rw-table .rw-table__max {
  font-weight: 700;
  background: var(--interactive-hover-gradient);
}

.rw-body .rw-table thead .rw-table__max {
  color: var(--text-primary);
  background: var(--interactive-hover-light);
}

.rw-table__sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
}

.rw-table__tier {
  display: block;
  font-weight: 600;
}

.rw-table__range {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
}

.rw-rates__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-secondary);
}

.rw-rates__meta i {
  margin-right: 4px;
  color: var(--interactive-hover);
}

.rw-rates-slider {
  margin-top: var(--space-2);
}

.rw-rates-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.rw-rates-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-medium, var(--border-light));
  background: var(--neutral-light);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.rw-rates-tab:hover {
  border-color: var(--rw-gold);
}

.rw-rates-tab.is-active {
  border-color: var(--rw-gold);
  background: var(--interactive-hover-light);
}

.rw-rates-tab:focus-visible {
  outline: 2px solid var(--rw-gold);
  outline-offset: 2px;
}

.rw-rates-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
}

.rw-rates-arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--neutral-light);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rw-rates-arrow:hover {
  border-color: var(--rw-gold);
  background: var(--interactive-hover-light);
}

.rw-rates-arrow:focus-visible {
  outline: 2px solid var(--rw-gold);
  outline-offset: 2px;
}

.rw-rates-viewport {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--rw-radius);
}

.rw-rates-viewport::-webkit-scrollbar {
  display: none;
}

.rw-rates-viewport > .rw-rates {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  margin-top: 0;
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .rw-rates-viewport {
    scroll-behavior: auto;
  }
}

@media (max-width: 720px) {
  .rw-rates-frame {
    grid-template-columns: 1fr 1fr;
  }

  .rw-rates-viewport {
    grid-column: 1 / -1;
    order: -1;
  }
}

.rw-example {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--rw-radius-sm);
  border-left: 3px solid var(--rw-gold);
  background: var(--neutral-primary);
  font-size: 14px;
}

.rw-example p {
  margin: 0;
}

.rw-example__input {
  color: var(--text-secondary);
}

.rw-example__input strong {
  margin-right: 6px;
  color: var(--text-primary);
}

.rw-example__calc {
  margin-top: 4px !important;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.rw-example__total {
  font-size: 16px;
  white-space: nowrap;
}

.rw-example__note {
  margin-top: 2px !important;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Claim form ---------- */

.rw-claim {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.rw-form {
  display: grid;
  gap: var(--space-4);
}

.rw-field {
  display: grid;
  gap: var(--space-1);
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.rw-field label,
.rw-field legend {
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  margin-bottom: var(--space-1);
}

.rw-field input[type="text"],
.rw-field input[type="url"],
.rw-field input[type="number"],
.rw-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--rw-radius-sm);
  border: 1px solid var(--border-medium, var(--border-light));
  background: var(--neutral-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  transition: var(--transition-fast);
}

.rw-field textarea {
  resize: vertical;
}

.rw-field input:focus,
.rw-field textarea:focus {
  outline: none;
  border-color: var(--rw-gold);
  box-shadow: 0 0 0 3px var(--interactive-hover-light);
}

.rw-field .is-invalid {
  border-color: var(--accent-danger) !important;
}

.rw-url-hint {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.rw-url-hint.is-error {
  color: var(--accent-danger);
}

.rw-url-hint.is-success {
  color: var(--accent-success);
}

.rw-field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.rw-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.rw-segmented__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rw-segmented__item span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-medium, var(--border-light));
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.rw-segmented__item input:checked + span {
  border-color: var(--rw-gold);
  background: var(--interactive-hover-light);
}

.rw-segmented__item input:focus-visible + span {
  outline: 2px solid var(--rw-gold);
  outline-offset: 2px;
}

.rw-check {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.rw-check input {
  margin-top: 3px;
}

.rw-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.rw-form__status,
.rw-alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--rw-radius-sm);
  font-size: 14px;
}

.rw-alert {
  margin-bottom: var(--space-4);
}

.rw-alert--success,
.rw-form__status.is-success {
  background: rgba(40, 167, 69, 0.12);
  color: var(--accent-success);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.rw-alert--danger,
.rw-form__status.is-error {
  background: rgba(220, 53, 69, 0.1);
  color: var(--accent-danger);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.rw-alert--warning {
  background: rgba(245, 185, 66, 0.14);
  color: var(--text-primary);
  border: 1px solid rgba(245, 185, 66, 0.4);
}

/* ---------- Estimate ---------- */

.rw-estimate {
  position: sticky;
  top: 84px;
}

.rw-estimate__amount {
  margin: 0 0 var(--space-3) !important;
  font-size: 34px;
  font-weight: 700;
  color: var(--text-primary) !important;
}

.rw-estimate__lines {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3);
  font-size: 14px;
}

.rw-estimate__lines dt {
  color: var(--text-secondary);
}

.rw-estimate__lines dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
}

.rw-estimate__note {
  font-size: 14px;
}

.rw-estimate__note.is-warning {
  color: var(--accent-danger) !important;
}

.rw-estimate__disclaimer {
  font-size: 12px;
  margin-bottom: 0 !important;
}

/* ---------- My claims ---------- */

.rw-claims {
  display: grid;
  gap: var(--space-3);
}

.rw-claim-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--rw-radius);
  background: var(--neutral-light);
  border: 1px solid var(--border-light);
}

.rw-claim-item__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-weight: 500;
}

.rw-claim-item__title a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rw-claim-item__meta {
  font-size: 13px;
  color: var(--text-secondary);
}

.rw-claim-item__side {
  text-align: right;
}

.rw-claim-item__amount {
  display: block;
  margin-top: var(--space-1);
  font-weight: 700;
  font-size: 18px;
}

.rw-claim-item__note {
  grid-column: 1 / -1;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--rw-radius-sm);
  background: var(--neutral-primary);
  font-size: 14px;
}

.rw-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.rw-status--pending {
  background: rgba(245, 185, 66, 0.18);
  color: #9a6b00;
}

html[data-theme="dark"] .rw-status--pending {
  color: var(--accent-warning);
}

.rw-status--approved {
  background: rgba(40, 167, 69, 0.14);
  color: var(--accent-success);
}

.rw-status--rejected {
  background: rgba(220, 53, 69, 0.12);
  color: var(--accent-danger);
}

.rw-empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--text-secondary);
  border: 1px dashed var(--border-medium, var(--border-light));
  border-radius: var(--rw-radius);
}

/* ---------- FAQ ---------- */

.rw-faq {
  display: grid;
  gap: var(--space-2);
  max-width: 860px;
}

.rw-faq details {
  border-radius: var(--rw-radius-sm);
  background: var(--neutral-light);
  border: 1px solid var(--border-light);
  padding: 0 var(--space-5);
}

.rw-faq summary {
  cursor: pointer;
  padding: var(--space-4) 0;
  font-weight: 500;
}

.rw-faq details p {
  margin: 0 0 var(--space-4);
  color: var(--text-secondary);
}

.rw-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .rw-hero,
  .rw-claim {
    grid-template-columns: 1fr;
  }

  .rw-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rw-estimate {
    position: static;
  }

  .rw-nav {
    display: none;
  }

  .rw-user {
    margin-left: auto;
  }
}

@media (max-width: 600px) {
  /* No room next to the logo, which leads to the main site as well. */
  .rw-back {
    display: none;
  }

  .rw-pool {
    padding: var(--space-4);
  }

  .rw-pool__figures {
    grid-template-columns: 1fr;
  }

  .rw-pool__amount {
    font-size: 24px;
  }
  .rw-hero {
    padding: var(--space-6) var(--space-5);
  }

  .rw-hero h1 {
    font-size: 24px;
  }

  .rw-field-row {
    grid-template-columns: 1fr;
  }

  .rw-grid--two,
  .rw-grid--cards {
    grid-template-columns: 1fr;
  }

  .rw-panel {
    padding: var(--space-4);
  }

  .rw-summary {
    padding: var(--space-4);
  }

  .rw-summary__amount {
    font-size: 28px;
  }

  .rw-body .rw-table {
    font-size: 14px;
  }

  .rw-body .rw-table th,
  .rw-body .rw-table td {
    padding: 8px;
  }

  .rw-body .rw-table thead th {
    font-size: 12px;
  }

  .rw-steps {
    grid-template-columns: 1fr;
  }

  .rw-tutorials {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .rw-tutorials .rw-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .rw-claim-item {
    grid-template-columns: 1fr;
  }

  .rw-claim-item__side {
    text-align: left;
  }
}
