/* RummyBeacon V3 – Card layout, midnight blue + champagne gold */
:root {
  --rb-primary: #18263D;
  --rb-secondary: #3E5B80;
  --rb-gold: #D0AD6A;
  --rb-gold-light: #F1E6D0;
  --rb-bg: #F5F3EE;
  --rb-card: #FFFFFF;
  --rb-text: #283344;
  --rb-text-muted: #727C8B;
  --rb-border: #E5E7EB;
  --rb-radius: 14px;
  --rb-shadow: 0 1px 3px rgba(24, 38, 61, 0.05);
  --rb-container: 1160px;
  --rb-gutter: 15px;
  --rb-card-pad: 14px;
  --rb-card-gap: 12px;
  --rb-section-y: 22px;
  --rb-font-body: "DM Sans", "Segoe UI", sans-serif;
  --rb-font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --rb-header-h: 58px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  max-width: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  font-family: var(--rb-font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--rb-text);
  background: var(--rb-bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: var(--rb-secondary); text-decoration: none; }
a:hover { color: var(--rb-gold); }

h1, h2, h3, h4 {
  font-family: var(--rb-font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--rb-primary);
  margin: 0 0 0.4em;
  overflow-wrap: break-word;
}

p { margin: 0 0 0.75em; overflow-wrap: break-word; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.rb-container {
  width: 100%;
  max-width: var(--rb-container);
  margin: 0 auto;
  padding-left: var(--rb-gutter);
  padding-right: var(--rb-gutter);
}

/* Unified card */
.rb-card {
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  box-shadow: var(--rb-shadow);
  max-width: 100%;
  min-width: 0;
}

/* Horizontal scroll helpers (scrollbar hidden, scroll kept) */
.rb-scroll-x,
.rb-chips,
.rb-app-scroll,
.rb-shots,
.rb-update-list,
.rb-related {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rb-scroll-x::-webkit-scrollbar,
.rb-chips::-webkit-scrollbar,
.rb-app-scroll::-webkit-scrollbar,
.rb-shots::-webkit-scrollbar,
.rb-update-list::-webkit-scrollbar,
.rb-related::-webkit-scrollbar {
  display: none;
}

/* Header */
.rb-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--rb-card);
  color: var(--rb-primary);
  min-height: var(--rb-header-h);
  border-bottom: 1px solid var(--rb-border);
  box-shadow: 0 1px 0 rgba(24, 38, 61, 0.04);
}

.rb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--rb-header-h);
  gap: 10px;
  min-width: 0;
}

.rb-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rb-brand__link,
.rb-brand .custom-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.rb-brand__logo,
.rb-brand .custom-logo { width: 34px; height: 34px; object-fit: contain; }

.rb-brand__name {
  font-family: var(--rb-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rb-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-brand__name:hover { color: var(--rb-secondary); }

.rb-header__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.rb-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rb-border);
  border-radius: 10px;
  background: transparent;
  color: var(--rb-primary);
  cursor: pointer;
  padding: 0;
}
.rb-nav-toggle__bar {
  display: block; width: 16px; height: 2px; background: currentColor; position: relative;
}
.rb-nav-toggle__bar::before,
.rb-nav-toggle__bar::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor;
}
.rb-nav-toggle__bar::before { top: -5px; }
.rb-nav-toggle__bar::after { top: 5px; }

.rb-nav {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: var(--rb-header-h);
  background: var(--rb-card);
  padding: 8px var(--rb-gutter) 14px;
  border-bottom: 1px solid var(--rb-border);
  box-shadow: var(--rb-shadow);
}
.rb-nav.is-open { display: block; }
.rb-nav ul { list-style: none; margin: 0; padding: 0; }
.rb-nav a {
  display: block;
  padding: 10px 8px;
  color: var(--rb-text);
  font-weight: 500;
  border-radius: 8px;
}
.rb-nav a:hover,
.rb-nav .current-menu-item > a {
  background: var(--rb-gold-light);
  color: var(--rb-primary);
}

.rb-header__cta { display: none; }

/* Buttons */
.rb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-family: var(--rb-font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
}
.rb-btn--primary {
  background: var(--rb-gold);
  color: var(--rb-primary);
}
.rb-btn--primary:hover {
  background: #ddbc7c;
  color: var(--rb-primary);
}
.rb-btn--ghost {
  background: transparent;
  border-color: rgba(241, 230, 208, 0.55);
  color: #fff;
}
.rb-btn--ghost:hover {
  border-color: var(--rb-gold);
  color: var(--rb-gold-light);
}
.rb-btn--outline {
  background: transparent;
  border-color: var(--rb-primary);
  color: var(--rb-primary);
}
.rb-btn--outline:hover {
  background: var(--rb-primary);
  color: #fff;
}
.rb-btn--block { width: 100%; }

/* Hero – shorter on mobile */
.rb-hero {
  background: linear-gradient(155deg, #18263D 0%, #243552 55%, #3E5B80 100%);
  color: #fff;
  padding: 1.05rem 0 0.95rem;
  min-height: 0;
}
.rb-hero__title {
  color: #fff;
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  margin-bottom: 0.35rem;
  max-width: 18ch;
}
.rb-hero__text {
  color: rgba(255, 255, 255, 0.88);
  max-width: 36rem;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
}
.rb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.7rem;
}
.rb-hero .rb-search {
  margin: 0;
  box-shadow: none;
}

/* Sections */
.rb-section { padding: var(--rb-section-y) 0; }
.rb-section--alt { background: #fff; }
.rb-section__head { margin-bottom: 0.75rem; }
.rb-section__title {
  font-size: clamp(1.12rem, 3vw, 1.32rem);
  margin-bottom: 0.2rem;
}
.rb-section__lead {
  color: var(--rb-text-muted);
  margin: 0;
  max-width: 38rem;
  font-size: 0.9rem;
}

/* Search */
.rb-search {
  display: flex;
  gap: 6px;
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  padding: 5px;
  box-shadow: var(--rb-shadow);
  max-width: 100%;
  min-width: 0;
}
.rb-search input[type="search"] {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  padding: 0.5rem 0.65rem;
  background: transparent;
  color: var(--rb-text);
  min-width: 0;
}
.rb-search button { flex-shrink: 0; min-height: 36px; }

/* Category chips – equal height cards, light gold active */
.rb-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  max-width: 100%;
}
.rb-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--rb-border);
  background: var(--rb-card);
  color: var(--rb-text);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--rb-shadow);
}
.rb-chip:hover {
  border-color: var(--rb-gold);
  color: var(--rb-primary);
}
.rb-chip.is-active {
  background: var(--rb-gold-light);
  border-color: #e2c896;
  color: var(--rb-primary);
  font-weight: 600;
}

/* App cards */
.rb-app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rb-card-gap);
}

.rb-app-scroll {
  display: flex;
  gap: var(--rb-card-gap);
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 100%;
}
.rb-app-scroll .rb-app-card {
  flex: 0 0 min(248px, 76vw);
  max-height: none;
  min-height: 0;
}

.rb-app-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  padding: var(--rb-card-pad);
  box-shadow: var(--rb-shadow);
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}
.rb-app-card__icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--rb-bg);
  border: 1px solid var(--rb-border);
}
.rb-app-card__icon img,
.rb-app-icon {
  width: 48px;
  height: 48px;
  object-fit: cover;
}
.rb-app-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rb-app-card__title {
  font-family: var(--rb-font-display);
  font-size: 0.98rem;
  margin: 0;
  color: var(--rb-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-app-card__title a { color: inherit; }
.rb-app-card__cat {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--rb-gold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rb-app-card__excerpt {
  margin: 0;
  font-size: 0.82rem;
  color: var(--rb-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.rb-app-card--compact .rb-app-card__excerpt { display: none; }
.rb-app-card__link {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rb-secondary);
}

.rb-empty {
  padding: 0.9rem;
  border: 1px dashed var(--rb-border);
  border-radius: var(--rb-radius);
  background: rgba(255,255,255,0.6);
  color: var(--rb-text-muted);
  text-align: center;
  font-size: 0.9rem;
}

/* Why cards */
.rb-why-list {
  display: grid;
  gap: var(--rb-card-gap);
}
.rb-why-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: var(--rb-card-pad);
}
.rb-why-item__icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--rb-gold-light);
  color: var(--rb-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}
.rb-why-item__body { min-width: 0; }
.rb-why-item h3 {
  font-size: 0.95rem;
  margin: 0 0 0.15rem;
}
.rb-why-item p {
  margin: 0;
  color: var(--rb-text-muted);
  font-size: 0.84rem;
}

/* Responsible tip card */
.rb-responsible {
  background: var(--rb-primary);
  color: #fff;
  border-radius: var(--rb-radius);
  padding: 0.95rem 1.05rem;
  max-width: 100%;
}
.rb-responsible h2 {
  color: var(--rb-gold);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.rb-responsible p {
  margin: 0;
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
}
.rb-responsible__accent {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--rb-gold);
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

/* FAQ accordion cards */
.rb-accordion {
  display: grid;
  gap: 10px;
  max-width: 100%;
}
.rb-accordion details,
.rb-accordion__item {
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  margin-bottom: 0;
  padding: 0 var(--rb-card-pad);
  box-shadow: var(--rb-shadow);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.rb-accordion summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
  list-style: none;
  color: var(--rb-primary);
  font-size: 0.92rem;
  overflow-wrap: break-word;
}
.rb-accordion summary::-webkit-details-marker { display: none; }
.rb-accordion details[open] summary {
  border-bottom: 1px solid var(--rb-border);
  margin-bottom: 0.5rem;
}
.rb-accordion .rb-accordion__body {
  padding-bottom: 0.75rem;
  color: var(--rb-text-muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

/* Guides */
.rb-guide-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rb-guide-item {
  display: block;
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  padding: 0.75rem 0.8rem;
  box-shadow: var(--rb-shadow);
  min-width: 0;
}
.rb-guide-item h3 {
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}
.rb-guide-item p {
  margin: 0;
  color: var(--rb-text-muted);
  font-size: 0.78rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Update list – compact cards; mobile horizontal */
.rb-update-list {
  display: flex;
  gap: var(--rb-card-gap);
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 100%;
}
.rb-update-item {
  flex: 0 0 min(280px, 85vw);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  min-height: 0;
  max-width: 100%;
}
.rb-update-item__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rb-border);
}
.rb-update-item__icon img { width: 44px; height: 44px; object-fit: cover; }
.rb-update-item__body {
  flex: 1;
  min-width: 0;
}
.rb-update-item h3 {
  font-size: 0.92rem;
  margin: 0 0 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rb-update-item p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--rb-text-muted);
}
.rb-update-item__arrow {
  flex-shrink: 0;
  color: var(--rb-gold);
  font-size: 1.1rem;
  line-height: 1;
}

/* Footer – tighter */
.rb-footer {
  background: var(--rb-primary);
  color: rgba(255,255,255,0.85);
  padding: 1.5rem 0 1rem;
  margin-top: 0.5rem;
}
.rb-footer__grid { display: grid; gap: 0.95rem; }
.rb-footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.4rem;
}
.rb-footer__brand img { width: 34px; height: 34px; }
.rb-footer__brand span {
  font-family: var(--rb-font-display);
  font-size: 1.1rem;
  color: #fff;
  font-weight: 700;
}
.rb-footer p { font-size: 0.88rem; margin-bottom: 0.4rem; }
.rb-footer a { color: rgba(255,255,255,0.85); }
.rb-footer a:hover { color: var(--rb-gold-light); }
.rb-footer nav ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 5px;
}
.rb-footer__copy {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
}

/* Archive */
.rb-archive-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 0.95rem;
}
.rb-archive-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rb-sort select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--rb-border);
  background: #fff;
  padding: 0 10px;
  font: inherit;
  color: var(--rb-text);
  max-width: 100%;
}
.rb-pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}
.rb-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--rb-border);
  background: #fff;
  color: var(--rb-text);
  font-size: 0.88rem;
}
.rb-pagination .current {
  background: var(--rb-primary);
  border-color: var(--rb-primary);
  color: #fff;
}

/* Single app layout */
.rb-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  font-size: 0.8rem;
  color: var(--rb-text-muted);
  margin-bottom: 0.75rem;
  max-width: 100%;
  min-width: 0;
}
.rb-breadcrumb a { color: var(--rb-secondary); }

.rb-app-layout {
  display: grid;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
}
.rb-app-main {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

/* App profile card */
.rb-app-profile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: var(--rb-card-pad);
}
.rb-app-profile__icon {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rb-border);
}
.rb-app-profile__icon img {
  width: 64px;
  height: 64px;
  object-fit: cover;
}
.rb-app-profile__body {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
.rb-app-profile__title {
  font-size: 1.2rem;
  margin-bottom: 0.15rem;
  overflow-wrap: break-word;
}
.rb-app-profile__meta {
  font-size: 0.8rem;
  color: var(--rb-text-muted);
  margin-bottom: 0.35rem;
}

.rb-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  max-width: 100%;
  overflow-wrap: break-word;
}
.rb-clamp--about { -webkit-line-clamp: 5; }
.rb-clamp.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.rb-readmore {
  background: none;
  border: 0;
  padding: 0;
  color: var(--rb-secondary);
  font-weight: 600;
  cursor: pointer;
  font: inherit;
  margin-top: 0.25rem;
  font-size: 0.86rem;
}

/* Download panel card */
.rb-download-panel {
  background: linear-gradient(135deg, var(--rb-primary), var(--rb-secondary));
  color: #fff;
  border-radius: var(--rb-radius);
  padding: var(--rb-card-pad) 1rem;
  box-shadow: var(--rb-shadow);
  border: 0;
  max-width: 100%;
}
.rb-download-panel h2 { color: #fff; font-size: 1.05rem; }
.rb-download-panel p {
  font-size: 0.88rem;
  overflow-wrap: break-word;
}
.rb-download-panel__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(208, 173, 106, 0.55);
  color: var(--rb-gold-light);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
}
.rb-download-panel__action { margin-bottom: 0; }

/* Quick info mini-cards */
.rb-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 100%;
}
.rb-quick-item {
  padding: 0.6rem 0.7rem;
  min-width: 0;
}
.rb-quick-item__label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rb-text-muted);
  margin-bottom: 0.15rem;
}
.rb-quick-item__value {
  display: block;
  font-weight: 600;
  color: var(--rb-primary);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Content panels */
.rb-panel {
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  padding: var(--rb-card-pad) 1rem;
  box-shadow: var(--rb-shadow);
  margin-bottom: 0;
  max-width: 100%;
  min-width: 0;
}
.rb-panel--bare {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.rb-panel--bare > h2 {
  margin-bottom: 0.65rem;
}
.rb-panel h2 { font-size: 1.05rem; }
.rb-panel--tip {
  background: linear-gradient(180deg, #F8F1E4 0%, #F1E6D0 100%);
  border-color: #e2c896;
}
.rb-content-body {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  font-size: 0.92rem;
}
.rb-content-body a { overflow-wrap: anywhere; }

.rb-collapse > summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--rb-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rb-primary);
  padding: 0.1rem 0;
  overflow-wrap: break-word;
}
.rb-collapse > summary::-webkit-details-marker { display: none; }
.rb-collapse[open] > summary { margin-bottom: 0.55rem; }

/* Screenshots */
.rb-shots {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  max-width: 100%;
}
.rb-shots__item {
  flex: 0 0 auto;
  padding: 6px;
  margin: 0;
  width: auto;
  background: var(--rb-card);
}
.rb-shots img,
.rb-shots__item img {
  width: auto;
  max-width: 140px;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.rb-list {
  margin: 0;
  padding-left: 1.05rem;
  max-width: 100%;
}
.rb-list li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  overflow-wrap: break-word;
}

.rb-pros-cons {
  display: grid;
  gap: 10px;
  max-width: 100%;
}
.rb-pros-cons__col { min-width: 0; }
.rb-pros-cons h3 {
  font-size: 0.95rem;
  color: var(--rb-secondary);
}

.rb-related {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  max-width: 100%;
}
.rb-related .rb-app-card {
  flex: 0 0 min(240px, 80vw);
  max-height: none;
}

/* Sidebar themed cards */
.rb-app-sidebar {
  display: none;
  min-width: 0;
}
.rb-sidebar-card {
  padding: var(--rb-card-pad) 1rem;
  margin-bottom: 12px;
  background: var(--rb-primary);
  border-color: transparent;
  color: rgba(255,255,255,0.9);
}
.rb-sidebar-card__title {
  color: var(--rb-gold);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.rb-sidebar-card p {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.88);
}
.rb-sidebar-card .rb-btn--outline {
  border-color: var(--rb-gold);
  color: var(--rb-gold-light);
}
.rb-sidebar-card .rb-btn--outline:hover {
  background: var(--rb-gold);
  color: var(--rb-primary);
  border-color: var(--rb-gold);
}
.rb-sidebar-card--accent {
  background: linear-gradient(160deg, #243552 0%, #3E5B80 100%);
}
.rb-sidebar-card__action { margin-bottom: 0; }

.rb-page { padding: 1.2rem 0 1.75rem; }
.rb-page__title {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  margin-bottom: 0.75rem;
}
.rb-content {
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  padding: 1rem;
  box-shadow: var(--rb-shadow);
  font-size: 0.95rem;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
}
.rb-content > *:last-child { margin-bottom: 0; }

.rb-contact-card {
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  padding: 1rem;
  box-shadow: var(--rb-shadow);
}

/* Overflow hardening */
.rb-main,
.rb-page,
.rb-app-main,
.rb-panel,
.rb-card,
.rb-content-body,
.rb-accordion__body {
  max-width: 100%;
  min-width: 0;
}

/* Tablet */
@media (min-width: 768px) {
  :root {
    --rb-gutter: 3%;
    --rb-section-y: 26px;
    --rb-card-pad: 18px;
    --rb-card-gap: 14px;
  }
  .rb-app-grid { grid-template-columns: repeat(2, 1fr); }
  .rb-app-scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }
  .rb-app-scroll .rb-app-card { flex: none; }
  .rb-guide-list { grid-template-columns: repeat(3, 1fr); }
  .rb-footer__grid { grid-template-columns: 1.4fr 1fr; gap: 1.1rem; }
  .rb-pros-cons { grid-template-columns: 1fr 1fr; }
  .rb-related {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }
  .rb-related .rb-app-card { flex: none; }
  .rb-update-list {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .rb-update-item { flex: none; width: auto; }
  .rb-hero { padding: 1.45rem 0 1.25rem; }
  .rb-hero__title { max-width: none; font-size: 1.85rem; }
  .rb-why-list { grid-template-columns: 1fr; }
  .rb-app-main { gap: 14px; }
}

/* Desktop */
@media (min-width: 1024px) {
  :root {
    --rb-gutter: 16px;
    --rb-header-h: 60px;
    --rb-card-pad: 20px;
    --rb-section-y: 28px;
  }
  .rb-nav-toggle { display: none; }
  .rb-nav {
    display: block;
    position: static;
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .rb-nav ul { display: flex; align-items: center; gap: 2px; }
  .rb-nav a { padding: 7px 10px; font-size: 0.88rem; }
  .rb-header__cta { display: inline-flex; min-height: 36px; font-size: 0.85rem; }
  .rb-app-grid { grid-template-columns: repeat(3, 1fr); }
  .rb-app-scroll { grid-template-columns: repeat(3, 1fr); }
  .rb-app-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 16px;
  }
  .rb-app-sidebar {
    display: block;
    position: sticky;
    top: calc(var(--rb-header-h) + 14px);
  }
  .rb-archive-toolbar {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .rb-why-list { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .rb-hero__title { font-size: 2rem; }
}

/* Narrow phones – extra overflow safety */
@media (max-width: 430px) {
  :root {
    --rb-gutter: 14px;
    --rb-card-pad: 12px;
    --rb-card-gap: 10px;
    --rb-section-y: 20px;
  }
  .rb-hero { padding: 0.9rem 0 0.8rem; }
  .rb-app-profile__title { font-size: 1.1rem; }
  .rb-quick-grid { gap: 8px; }
}

/* ========== V4 sitewide page system ========== */
.rb-page > .rb-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rb-container--narrow {
  max-width: 820px;
}

.rb-page-article {
  display: grid;
  gap: 12px;
  max-width: 100%;
  min-width: 0;
}

.rb-page-header {
  padding: var(--rb-card-pad) 1rem;
}
.rb-page-header .rb-page__title {
  margin-bottom: 0.25rem;
}
.rb-page-header .rb-section__lead {
  margin: 0;
}
.rb-page-header__meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--rb-text-muted);
}

.rb-breadcrumb__sep {
  margin: 0 2px;
  color: var(--rb-text-muted);
}
.rb-breadcrumb__current {
  color: var(--rb-text);
  overflow-wrap: break-word;
  min-width: 0;
}

/* Archive toolbar as card */
.rb-archive-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
  padding: var(--rb-card-pad);
}
.rb-archive-toolbar .rb-search {
  box-shadow: none;
}
.rb-chips {
  margin: 4px 0 2px;
}

.rb-term-intro {
  margin: 0;
}

/* App grid: one compact horizontal card per row on mobile */
.rb-app-grid {
  margin-top: 4px;
  gap: var(--rb-card-gap);
}
.rb-app-grid .rb-app-card {
  max-height: none;
  min-height: 0;
}

/* Guide cards (archives, search, related, home) */
.rb-guide-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rb-card-gap);
}
.rb-guide-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.rb-guide-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--rb-bg);
  border-bottom: 1px solid var(--rb-border);
}
.rb-guide-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rb-guide-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--rb-card-pad);
  min-width: 0;
  flex: 1;
}
.rb-guide-card__title {
  font-family: var(--rb-font-display);
  font-size: 1.02rem;
  margin: 0;
  color: var(--rb-primary);
  overflow-wrap: break-word;
}
.rb-guide-card__title a { color: inherit; }
.rb-guide-card__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--rb-text-muted);
}
.rb-guide-card__excerpt {
  margin: 0;
  font-size: 0.86rem;
  color: var(--rb-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rb-guide-card__link {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--rb-secondary);
}

/* Legacy guide-item still used anywhere */
.rb-guide-item {
  display: block;
  background: var(--rb-card);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius);
  padding: var(--rb-card-pad);
  box-shadow: var(--rb-shadow);
  min-width: 0;
}
.rb-guide-item h2,
.rb-guide-item h3 {
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.rb-search-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rb-card-gap);
  margin-top: 4px;
}
.rb-search-results .rb-app-card,
.rb-search-results .rb-guide-card {
  max-width: 100%;
}

.rb-related-guides {
  margin-top: 1.25rem;
  display: grid;
  gap: 10px;
}

/* Tip / notice cards */
.rb-tip-card {
  background: linear-gradient(180deg, #F8F1E4 0%, #F1E6D0 100%);
  border-color: #e2c896;
  padding: var(--rb-card-pad);
}
.rb-tip-card p {
  margin: 0;
  color: var(--rb-primary);
  font-size: 0.9rem;
}

.rb-info-card {
  padding: var(--rb-card-pad);
  display: grid;
  gap: 4px;
}
.rb-info-card__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rb-text-muted);
  font-weight: 600;
}
.rb-info-card__value {
  font-weight: 600;
  color: var(--rb-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rb-contact-card {
  padding: var(--rb-card-pad);
}
.rb-contact-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

/* Empty states */
.rb-empty {
  text-align: center;
}
.rb-empty--404,
.rb-empty--search {
  padding: 1.5rem var(--rb-card-pad);
}
.rb-empty__code {
  font-family: var(--rb-font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--rb-gold);
  margin: 0 0 0.35rem;
  line-height: 1;
}
.rb-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0.85rem 0 0;
}
.rb-empty .rb-btn { margin: 0 4px; }

/* Prose content (pages, guides, legal) */
.rb-prose {
  padding: var(--rb-card-pad) 1.05rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--rb-text);
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
}
.rb-prose > *:first-child { margin-top: 0; }
.rb-prose > *:last-child { margin-bottom: 0; }
.rb-prose h1,
.rb-prose h2,
.rb-prose h3,
.rb-prose h4 {
  margin-top: 1.35em;
  margin-bottom: 0.45em;
  line-height: 1.3;
}
.rb-prose h2 { font-size: 1.2rem; }
.rb-prose h3 { font-size: 1.05rem; color: var(--rb-secondary); }
.rb-prose p { margin: 0 0 0.95em; }
.rb-prose ul,
.rb-prose ol {
  margin: 0 0 1em;
  padding-left: 1.2rem;
}
.rb-prose li { margin-bottom: 0.35em; }
.rb-prose a {
  color: var(--rb-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.rb-prose a:hover { color: var(--rb-gold); }
.rb-prose blockquote {
  margin: 0 0 1em;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--rb-gold);
  background: var(--rb-gold-light);
  border-radius: 0 10px 10px 0;
  color: var(--rb-primary);
}
.rb-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
  max-width: 100%;
}
.rb-prose th,
.rb-prose td {
  border: 1px solid var(--rb-border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}
.rb-prose th {
  background: #f3f0ea;
  color: var(--rb-primary);
}
.rb-prose img,
.rb-prose figure,
.rb-prose .wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.rb-prose__thumb {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0 0 1rem;
}
.rb-prose pre,
.rb-prose code {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.rb-prose pre {
  overflow-x: auto;
  padding: 0.75rem;
  background: #f3f0ea;
  border-radius: 10px;
  border: 1px solid var(--rb-border);
}

/* Forms inside content / contact */
.rb-prose input[type="text"],
.rb-prose input[type="email"],
.rb-prose input[type="url"],
.rb-prose input[type="tel"],
.rb-prose input[type="search"],
.rb-prose input[type="number"],
.rb-prose textarea,
.rb-prose select,
.rb-contact-card input[type="text"],
.rb-contact-card input[type="email"],
.rb-contact-card textarea,
.rb-contact-card select,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea,
.wpforms-field input,
.wpforms-field textarea,
.wpforms-field select {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--rb-border);
  border-radius: 10px;
  background: #fff;
  color: var(--rb-text);
  font: inherit;
  box-sizing: border-box;
}
.rb-prose textarea,
.rb-contact-card textarea,
.wpcf7 textarea,
.wpforms-field textarea {
  min-height: 120px;
  resize: vertical;
}
.rb-prose input:focus,
.rb-prose textarea:focus,
.rb-prose select:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus {
  outline: 2px solid rgba(208, 173, 106, 0.55);
  border-color: var(--rb-gold);
}
.rb-prose button[type="submit"],
.rb-prose input[type="submit"],
.wpcf7 input[type="submit"],
.wpforms-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.5rem 1.1rem;
  border: 0;
  border-radius: 10px;
  background: var(--rb-gold);
  color: var(--rb-primary);
  font-weight: 600;
  font-family: var(--rb-font-body);
  cursor: pointer;
  max-width: 100%;
}
.rb-prose button[type="submit"]:hover,
.rb-prose input[type="submit"]:hover,
.wpcf7 input[type="submit"]:hover,
.wpforms-submit:hover {
  background: #ddbc7c;
}

/* Gutenberg alignment safety */
.rb-prose .alignwide,
.rb-prose .alignfull,
.rb-prose .wp-block-group,
.rb-prose .wp-block-columns {
  max-width: 100%;
  min-width: 0;
}
.rb-prose .wp-block-columns {
  gap: 12px;
}

@media (min-width: 768px) {
  .rb-guide-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .rb-search-results {
    grid-template-columns: repeat(2, 1fr);
  }
  .rb-page-article { gap: 14px; }
  .rb-container--narrow { max-width: 860px; }
}

@media (min-width: 1024px) {
  .rb-guide-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .rb-related-guides .rb-guide-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
