/* ==========================================================================
   RankGrid CMS - Recap Homepage 4 Editorial Design System (Light + Dark)
   Font: Pretendard Variable | Palette: Recap Light & Dark Tokens
   ========================================================================== */

:root {
  /* Recap Core Design Tokens (Light Mode) */
  --rc-bg: #F8F9FA;
  --rc-surface: #FFFFFF;
  --rc-surface-muted: #E8EEF7;
  --rc-surface-subtle: #F1F3F6;
  --rc-border: #E5E7EB;
  --rc-text: #111827;
  --rc-text-muted: #6B7280;
  --rc-accent: #1D68E3;
  --rc-accent-hover: #1557C0;
  --rc-highlight: #DCE8FF;
  --rc-shadow-header: 0 4px 20px rgba(17, 24, 39, 0.06);
  --rc-shadow-card: 0 10px 30px rgba(17, 24, 39, 0.08);

  /* Compatibility & Semantic Aliases */
  --brand-color: var(--rc-accent);
  --accent-color: var(--rc-text);
  --brand-50: var(--rc-surface-muted);
  --brand-100: var(--rc-highlight);
  --brand-200: #BFDBFE;
  --brand-600: var(--rc-accent);
  --brand-700: var(--rc-accent-hover);
  --brand-glow: rgba(29, 104, 227, 0.24);
  --brand-soft: var(--rc-surface-muted);
  --brand-soft-strong: var(--rc-highlight);
  --brand-border: var(--brand-200);

  --surface-0: var(--rc-bg);
  --surface-1: var(--rc-surface);
  --surface-2: var(--rc-surface-subtle);
  --bg-page: var(--rc-bg);
  --bg-surface: var(--rc-surface);
  --bg-muted: var(--rc-surface-subtle);

  --ink-900: var(--rc-text);
  --ink-700: #374151;
  --ink-500: var(--rc-text-muted);
  --ink-400: #9CA3AF;
  --text-primary: var(--rc-text);
  --text-secondary: var(--ink-700);
  --text-muted: var(--rc-text-muted);

  --hairline: var(--rc-border);
  --hairline-strong: #D1D5DB;
  --border-color: var(--rc-border);
  --border-strong: var(--hairline-strong);

  --success: #059669;
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;
  --warning: #B45309;
  --warning-bg: #FFFBEB;
  --warning-border: #FDE68A;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;

  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.05);
  --shadow-md: var(--rc-shadow-card);
  --shadow-lg: 0 20px 44px rgba(17, 24, 39, 0.14);

  --container-wide: 1200px;
  --container-narrow: 760px;
  --header-height: 84px;
  --font-sans: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

html[data-theme="dark"] {
  --rc-bg: #141414;
  --rc-surface: #202124;
  --rc-surface-muted: #2B2D31;
  --rc-surface-subtle: #25272B;
  --rc-border: #2E3035;
  --rc-text: #FFFFFF;
  --rc-text-muted: #9CA3AF;
  --rc-accent: #3B82F6;
  --rc-accent-hover: #2563EB;
  --rc-highlight: rgba(59, 130, 246, 0.24);
  --rc-shadow-header: 0 6px 24px rgba(0, 0, 0, 0.45);
  --rc-shadow-card: 0 12px 32px rgba(0, 0, 0, 0.45);

  --brand-200: rgba(59, 130, 246, 0.36);
  --brand-glow: rgba(59, 130, 246, 0.35);
  --ink-700: #D1D5DB;
  --ink-400: #9CA3AF;
  --hairline-strong: #3B3E45;

  --success: #34D399;
  --success-bg: rgba(16, 185, 129, 0.14);
  --success-border: rgba(52, 211, 153, 0.34);
  --warning: #FBBF24;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --warning-border: rgba(251, 191, 36, 0.32);
  --danger: #F87171;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(248, 113, 113, 0.34);
}

/* ==========================================================================
   Base Reset & Typography
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  background: var(--rc-bg);
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--rc-bg);
  color: var(--rc-text);
  line-height: 1.6;
  letter-spacing: -0.014em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--rc-accent);
  text-decoration: none;
  transition: color 0.16s ease;
}

a:hover {
  color: var(--rc-accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rc-icon,
.rg-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: inline-block;
}

.rc-icon-sm,
.rg-icon-sm {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: inline-block;
}

.rg-icon-lg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-block;
}

/* ==========================================================================
   Reading Progress Bar
   ========================================================================== */

.rg-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 90;
  background: var(--rc-accent);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
  will-change: transform;
}

/* ==========================================================================
   Layout Containers & Utility Headings
   ========================================================================== */

.rc-container-wide,
.rg-container-wide,
.rg-container {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}

.rc-container-narrow,
.rg-container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.rc-main,
.rg-main {
  min-height: calc(100vh - 300px);
}

.rg-page-body {
  padding: 32px 0 64px;
}

.rc-micro-heading {
  margin: 0 0 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rc-text-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.rc-btn-primary,
.rg-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--rc-accent);
  color: #FFFFFF;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

.rc-btn-primary:hover,
.rg-btn-primary:hover {
  background: var(--rc-accent-hover);
  color: #FFFFFF;
}

.rc-btn-primary.rc-btn-sm,
.rg-btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.rc-btn-secondary,
.rg-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--rc-surface);
  color: var(--rc-text);
  border: 1px solid var(--rc-border);
  border-radius: 6px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.rc-btn-secondary:hover,
.rg-btn-secondary:hover {
  background: var(--rc-surface-subtle);
  border-color: var(--hairline-strong);
  color: var(--rc-text);
}

.rc-btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #FFFFFF;
  color: #111827;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, transform 0.14s ease;
}

.rc-btn-white:hover {
  background: #F3F4F6;
  color: #111827;
  transform: translateY(-1px);
}

.rg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.16s ease;
}

.rc-btn-block,
.rg-btn-block {
  width: 100%;
}

.rg-btn:disabled,
.rg-btn.is-loading,
.rc-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Smart Floating Header (.rc-header-wrap & .rc-header-bar)
   ========================================================================== */

.rc-header-wrap {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 20px 24px 0;
  background: transparent;
  pointer-events: none;
  transition: transform 0.25s ease;
}

.rc-header-wrap.is-hidden {
  transform: translateY(-100%);
}

.rc-header-bar {
  pointer-events: auto;
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  box-shadow: var(--rc-shadow-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
}

.rc-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--rc-text);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.rc-logo:hover {
  color: var(--rc-text);
}

.rc-logo-mark-svg {
  width: 26px;
  height: 26px;
  display: block;
  flex-shrink: 0;
}

.rc-logo-text {
  line-height: 1;
}

.rc-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rc-nav-item {
  position: relative;
}

.rc-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--rc-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.rc-nav-link:hover,
.rc-nav-link.is-active {
  color: var(--rc-accent);
  background: var(--rc-surface-subtle);
}

.rc-chev {
  width: 14px;
  height: 14px;
  color: var(--rc-text-muted);
  transition: transform 0.18s ease;
}

.rc-nav-item.has-dropdown:hover .rc-chev,
.rc-nav-item.is-open .rc-chev {
  transform: rotate(180deg);
}

.rc-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 10px;
  box-shadow: var(--rc-shadow-card);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 70;
}

/* Invisible hover bridge so moving mouse to dropdown stays open */
.rc-nav-item.has-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}

.rc-nav-item.has-dropdown:hover .rc-dropdown,
.rc-nav-item.has-dropdown:focus-within .rc-dropdown,
.rc-nav-item.is-open .rc-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.rc-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--rc-text);
  text-decoration: none;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.rc-dropdown a:hover {
  background: var(--rc-surface-subtle);
  color: var(--rc-accent);
}

.rc-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rc-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--rc-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rc-icon-btn:hover {
  background: var(--rc-surface-subtle);
  color: var(--rc-accent);
}

.rc-icon-btn svg {
  width: 18px;
  height: 18px;
}

.rc-vdivider {
  width: 1px;
  height: 18px;
  background: var(--rc-border);
  flex-shrink: 0;
}

/* Theme switcher icons */
[data-theme-toggle] .rc-icon-sun {
  display: none;
}

[data-theme-toggle] .rc-icon-moon {
  display: block;
}

html[data-theme="dark"] [data-theme-toggle] .rc-icon-sun {
  display: block;
}

html[data-theme="dark"] [data-theme-toggle] .rc-icon-moon {
  display: none;
}

.rc-mobile-toggle {
  display: none;
}

/* ==========================================================================
   Hero Slider (.rc-hero-section & .rc-hero-slider)
   ========================================================================== */

.rc-hero-section {
  padding: 26px 0 18px;
}

.rc-hero-slider {
  position: relative;
  height: 425px;
  border-radius: 12px;
  overflow: hidden;
  background: #111827;
  box-shadow: var(--rc-shadow-card);
}

.rc-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  z-index: 1;
}

.rc-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.rc-hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rc-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 15, 28, 0.84) 0%, rgba(10, 15, 28, 0.48) 55%, rgba(10, 15, 28, 0.18) 100%);
  z-index: 1;
  pointer-events: none;
}

.rc-hero-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.rc-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 40px;
  color: #FFFFFF;
  pointer-events: none;
}

.rc-hero-overlay a,
.rc-hero-overlay button {
  pointer-events: auto;
}

.rc-hero-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #93C5FD;
  margin-bottom: 10px;
}

.rc-hero-cat svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.rc-hero-title {
  margin: 0 0 10px;
  max-width: 700px;
  font-size: clamp(23px, 2.8vw, 34px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.025em;
  color: #FFFFFF;
}

.rc-hero-title a {
  color: inherit;
  text-decoration: none;
}

.rc-hero-title a:hover {
  color: #DBEAFE;
}

.rc-hero-excerpt {
  margin: 0 0 18px;
  max-width: 620px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.rc-hero-excerpt svg {
  width: 15px;
  height: 15px;
  color: #60A5FA;
  flex-shrink: 0;
  margin-top: 3px;
}

.rc-hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 14px;
}

.rc-hero-meta .rc-author-chip,
.rc-hero-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #FFFFFF;
}

.rc-hero-date {
  color: rgba(255, 255, 255, 0.85);
}

.rc-avatar,
.rc-avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--rc-accent);
  color: #FFFFFF;
  font-weight: 700;
  flex-shrink: 0;
}

.rc-avatar {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.rc-avatar-sm {
  width: 22px;
  height: 22px;
  font-size: 10.5px;
}

.rc-hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.rc-hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: #D1D5DB;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

html[data-theme="dark"] .rc-hero-dot {
  background: #4B5563;
}

.rc-hero-dot.is-active {
  background: transparent;
  border-color: var(--rc-accent);
  transform: scale(1.15);
}

/* ==========================================================================
   Horizontal Editorial Feed (.rc-feed-section)
   ========================================================================== */

.rc-feed-section {
  padding: 14px 0 48px;
  scroll-margin-top: 96px;
}

.rc-filter-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--rc-surface-muted);
  color: var(--rc-text);
  font-size: 13.5px;
  font-weight: 600;
}

.rc-filter-bar[hidden] {
  display: none;
}

.rc-filter-bar.is-visible {
  display: flex;
}

.rc-filter-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rc-filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rc-accent);
  flex-shrink: 0;
}

.rc-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--rc-text-muted);
  font-size: 14.5px;
  border-top: 1px solid var(--rc-border);
  border-bottom: 1px solid var(--rc-border);
}

.rc-filter-reset {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--rc-border);
  background: var(--rc-surface);
  color: var(--rc-text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rc-filter-reset:hover {
  border-color: var(--rc-accent);
  color: var(--rc-accent);
}

.rc-feed-list {
  border-top: 1px solid var(--rc-border);
}

.rc-feed-row {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 175px;
  gap: 28px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--rc-border);
}

.rc-feed-row.is-paged-hidden,
.rc-feed-row.is-filtered-hidden {
  display: none;
}

.rc-feed-thumb {
  width: 250px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: var(--rc-surface-subtle);
  flex-shrink: 0;
}

.rc-feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.rc-feed-row:hover .rc-feed-thumb img {
  transform: scale(1.03);
}

.rc-feed-body {
  min-width: 0;
}

.rc-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rc-accent);
}

.rc-cat-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.rc-feed-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 6px 0 8px;
  color: var(--rc-text);
}

.rc-feed-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.rc-feed-title a:hover {
  color: var(--rc-accent);
}

.rc-feed-excerpt {
  margin: 0;
  font-size: 14px;
  color: var(--rc-text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rc-feed-excerpt svg {
  width: 14px;
  height: 14px;
  color: var(--rc-accent);
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
}

.rc-feed-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 12.5px;
  color: var(--rc-text-muted);
  text-align: right;
}

.rc-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rc-text);
}

.rc-feed-date {
  font-size: 12.5px;
  color: var(--rc-text-muted);
}

.rc-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.rc-load-more-wrap.is-hidden {
  display: none;
}

.rc-btn-load-more {
  background: var(--rc-surface-muted);
  color: var(--rc-text);
  border: 0;
  border-radius: 6px;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.rc-btn-load-more:hover {
  background: var(--rc-highlight);
  color: var(--rc-accent);
}

.rc-feed-empty {
  display: none;
  padding: 40px 20px;
  text-align: center;
  color: var(--rc-text-muted);
  font-size: 14.5px;
  border-bottom: 1px solid var(--rc-border);
}

.rc-feed-empty.is-visible {
  display: block;
}

/* ==========================================================================
   READ BY CATEGORY 6-Column Grid (.rc-cat-section)
   ========================================================================== */

.rc-cat-section {
  padding: 40px 0 52px;
  border-top: 1px solid var(--rc-border);
  scroll-margin-top: 96px;
}

.rc-cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.rc-cat-tile {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--rc-text);
}

.rc-cat-tile-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--rc-surface-subtle);
  border: 1px solid var(--rc-border);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rc-cat-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.rc-cat-tile:hover .rc-cat-tile-img img {
  transform: scale(1.04);
}

.rc-cat-tile.is-active .rc-cat-tile-img {
  border-color: var(--rc-accent);
  box-shadow: 0 0 0 2px var(--rc-highlight);
}

.rc-cat-tile-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rc-text);
  line-height: 1.35;
}

.rc-cat-tile-label svg {
  width: 14px;
  height: 14px;
  color: var(--rc-accent);
  flex-shrink: 0;
}

.rc-cat-tile.is-active .rc-cat-tile-label {
  color: var(--rc-accent);
}

/* ==========================================================================
   Centered CTA ("Updates, No Noise" Clone - .rc-subscribe-section)
   ========================================================================== */

.rc-subscribe-section {
  padding: 64px 0 78px;
  text-align: center;
  border-top: 1px solid var(--rc-border);
}

.rc-fanned-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin: 0 auto 24px;
}

.rc-fanned-card {
  width: 118px;
  height: 118px;
  border-radius: 10px;
  overflow: hidden;
  border: 3px solid var(--rc-surface);
  box-shadow: var(--rc-shadow-card);
  background: var(--rc-surface-subtle);
  flex-shrink: 0;
}

.rc-fanned-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rc-fanned-card:nth-child(1) {
  transform: translateX(14px) translateY(8px) rotate(-11deg);
  z-index: 1;
}

.rc-fanned-card:nth-child(2) {
  width: 132px;
  height: 132px;
  z-index: 2;
}

.rc-fanned-card:nth-child(3) {
  transform: translateX(-14px) translateY(8px) rotate(11deg);
  z-index: 1;
}

.rc-loop-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rc-text);
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--rc-surface), var(--rc-surface)) padding-box,
    linear-gradient(135deg, #3B82F6 0%, #A855F7 50%, #F59E0B 100%) border-box;
  margin-bottom: 16px;
}

.rc-loop-pill svg {
  width: 14px;
  height: 14px;
  color: var(--rc-accent);
}

.rc-subscribe-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.24;
  color: var(--rc-text);
}

.rc-text-hl {
  background: var(--rc-highlight);
  color: var(--rc-text);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}

.rc-subscribe-sub {
  margin: 0 auto 26px;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--rc-text-muted);
}

.rc-subscribe-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 490px;
  margin: 0 auto;
}

.rc-subscribe-form .rc-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--rc-border);
  background: var(--rc-surface);
  color: var(--rc-text);
  font-size: 14px;
}

.rc-subscribe-form .rc-input:focus {
  outline: none;
  border-color: var(--rc-accent);
  box-shadow: 0 0 0 3px var(--rc-highlight);
}

.rc-subscribe-form .rc-btn-primary {
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
}

/* ==========================================================================
   Footer, Marquee & Recirculation Bar (.rc-footer)
   ========================================================================== */

.rc-footer {
  background: var(--rc-surface);
  border-top: 1px solid var(--rc-border);
  padding-top: 52px;
  color: var(--rc-text-muted);
}

.rc-footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr auto;
  gap: 40px;
  padding-bottom: 40px;
}

.rc-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rc-footer-blurb,
.rc-footer-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--rc-text-muted);
  max-width: 300px;
}

.rc-footer-partner {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rc-text);
}

.rc-footer-copy {
  margin: 0;
  font-size: 12.5px;
  color: var(--rc-text-muted);
}

.rc-footer-policy-btns,
.rc-footer-legal-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.rc-policy-btn,
.rc-footer-legal-btns button {
  background: none;
  border: 0;
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rc-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rc-policy-btn:hover,
.rc-footer-legal-btns button:hover {
  color: var(--rc-accent);
}

.rc-footer-disclaimer {
  margin: 0;
  padding: 0 0 24px;
  font-size: 12px;
  color: var(--rc-text-muted);
  line-height: 1.6;
}

.rc-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.rc-footer-col-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rc-text-muted);
}

.rc-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rc-footer-col a,
.rc-footer-col button {
  display: inline-block;
  padding: 0;
  background: none;
  border: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--rc-text);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.rc-footer-col a:hover,
.rc-footer-col button:hover {
  color: var(--rc-accent);
}

.rc-footer-socials {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rc-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--rc-border);
  background: var(--rc-surface-subtle);
  color: var(--rc-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.rc-social-btn:hover {
  border-color: var(--rc-accent);
  color: var(--rc-accent);
  background: var(--rc-surface-muted);
}

.rc-social-btn svg {
  width: 16px;
  height: 16px;
}

.rc-footer-policy-box {
  padding-bottom: 24px;
}

.rc-marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--rc-border);
  border-bottom: 1px solid var(--rc-border);
  padding: 20px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.rc-marquee-track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  animation: rcMarquee 32s linear infinite;
}

.rc-marquee-wrap:hover .rc-marquee-track {
  animation-play-state: paused;
}

.rc-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--rc-text);
  white-space: nowrap;
}

.rc-marquee-item svg {
  width: 26px;
  height: 26px;
  color: var(--rc-accent);
  flex-shrink: 0;
}

@keyframes rcMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.rc-recirc-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 24px 0 20px;
}

.rc-recirc-card,
.rc-recirc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--rc-text);
  min-width: 0;
}

.rc-recirc-thumb,
.rc-recirc-item img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--rc-surface-subtle);
}

.rc-recirc-thumb-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
  font-weight: 800;
  font-size: 14px;
}

.rc-recirc-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--rc-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.rc-recirc-card:hover .rc-recirc-title,
.rc-recirc-item:hover .rc-recirc-title {
  color: var(--rc-accent);
}

/* ==========================================================================
   Floating Up Next Card (#rcUpNext)
   ========================================================================== */

.rc-upnext {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 55;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  box-shadow: var(--rc-shadow-card);
  padding: 14px;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.rc-upnext.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.rc-upnext-top,
.rc-upnext-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.rc-upnext-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
  font-size: 11px;
  font-weight: 700;
}

.rc-upnext-close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--rc-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rc-upnext-close:hover {
  background: var(--rc-surface-subtle);
  color: var(--rc-text);
}

.rc-upnext-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--rc-text);
}

.rc-upnext-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--rc-surface-subtle);
}

.rc-upnext-body {
  min-width: 0;
}

.rc-upnext-title {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rc-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rc-upnext-link:hover .rc-upnext-title {
  color: var(--rc-accent);
}

.rc-upnext-date {
  font-size: 11.5px;
  color: var(--rc-text-muted);
}

/* ==========================================================================
   Search Modal (#rcSearchModal) & Mobile Drawer (#rcMobileDrawer)
   ========================================================================== */

.rc-search-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 76px 16px 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.rc-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rc-search-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rc-search-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 14px;
  box-shadow: var(--rc-shadow-card);
  overflow: hidden;
}

.rc-search-head,
.rc-search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rc-border);
}

.rc-search-lead-icon {
  color: var(--rc-text-muted);
  flex-shrink: 0;
}

.rc-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rc-text-muted);
}

.rc-search-input,
#rcSearchInput {
  flex: 1;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--rc-text);
  font-size: 15px;
  font-weight: 500;
  outline: none;
}

.rc-search-input::placeholder,
#rcSearchInput::placeholder {
  color: var(--rc-text-muted);
}

.rc-search-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--rc-border);
  background: var(--rc-surface-subtle);
  color: var(--rc-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.rc-search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.rc-search-hint {
  padding: 6px 10px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--rc-text-muted);
  text-transform: uppercase;
}

.rc-search-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rc-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--rc-text);
  transition: background-color 0.14s ease;
}

.rc-search-item:hover {
  background: var(--rc-surface-subtle);
}

.rc-search-item-thumb {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--rc-surface-subtle);
}

.rc-search-item-body {
  flex: 1;
  min-width: 0;
}

.rc-search-item-cat {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--rc-accent);
  margin-bottom: 2px;
}

.rc-search-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--rc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-search-item-date {
  font-size: 12px;
  color: var(--rc-text-muted);
  flex-shrink: 0;
}

.rc-search-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--rc-text-muted);
}

/* Mobile Drawer */
.rc-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.rc-mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
}

.rc-mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rc-mobile-drawer-panel,
.rc-mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(320px, 86vw);
  background: var(--rc-surface);
  border-left: 1px solid var(--rc-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.rc-mobile-drawer.is-open .rc-mobile-drawer-panel,
.rc-mobile-drawer.is-open .rc-mobile-panel {
  transform: translateX(0);
}

.rc-mobile-drawer-head,
.rc-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rc-border);
}

.rc-mobile-drawer-foot,
.rc-mobile-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--rc-border);
}

.rc-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rc-mobile-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--rc-text);
  text-decoration: none;
}

.rc-mobile-link:hover {
  background: var(--rc-surface-subtle);
  color: var(--rc-accent);
}

.rc-mobile-group {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--rc-surface-subtle);
}

.rc-mobile-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--rc-text-muted);
  margin-bottom: 8px;
}

.rc-mobile-sublinks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rc-mobile-sublinks a {
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--rc-text);
  text-decoration: none;
}

.rc-mobile-sublinks a:hover {
  color: var(--rc-accent);
}

.rc-mobile-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--rc-border);
}

/* ==========================================================================
   Detail Pages (landing.php & article.php)
   ========================================================================== */

.rc-detail-hero {
  padding: 26px 0 32px;
}

.rc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  font-size: 12.5px;
  color: var(--rc-text-muted);
}

.rc-breadcrumb a {
  color: var(--rc-text-muted);
  text-decoration: none;
}

.rc-breadcrumb a:hover {
  color: var(--rc-accent);
}

.rc-breadcrumb-sep {
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
}

.rc-detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.rc-detail-hero-left {
  min-width: 0;
}

.rc-detail-title {
  margin: 10px 0 14px;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.24;
  color: var(--rc-text);
}

.rc-detail-lead {
  margin: 0 0 22px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--rc-text-muted);
}

.rc-detail-lead svg {
  width: 15px;
  height: 15px;
  color: var(--rc-accent);
  vertical-align: -2px;
  margin-right: 5px;
}

.rc-detail-lead p {
  margin: 0;
  display: inline;
}

.rc-detail-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--rc-border);
  font-size: 13px;
  color: var(--rc-text-muted);
}

.rc-detail-meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rc-meta-sep {
  color: var(--rc-text-muted);
  opacity: 0.6;
}

.rc-share-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rc-share-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--rc-text-muted);
  text-transform: uppercase;
}

.rc-share-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--rc-border);
  background: var(--rc-surface);
  color: var(--rc-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.rc-share-btn:hover {
  border-color: var(--rc-accent);
  color: var(--rc-accent);
}

.rc-share-btn.is-copied {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-bg);
}

.rc-share-btn svg {
  width: 15px;
  height: 15px;
}

.rc-detail-hero-media {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: var(--rc-surface-subtle);
  border: 1px solid var(--rc-border);
}

.rc-detail-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rc-hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--rc-surface-muted) 0%, var(--rc-surface-subtle) 100%);
  color: var(--rc-text-muted);
  font-size: 13.5px;
  font-weight: 600;
}

.rc-divider {
  border: 0;
  border-top: 1px solid var(--rc-border);
  margin: 0 0 32px;
}

/* Main Detail Layout (Content + 340px Sidebar) */
.rc-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 44px;
  align-items: start;
  padding-bottom: 72px;
}

.rc-detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Bright Cobalt Summary CTA Banner */
.rc-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--rc-accent);
  color: #FFFFFF;
}

.rc-summary-banner-text h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
}

.rc-summary-banner-text p {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.88);
}

/* Key Moments Card */
.rc-key-moments {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 22px 24px;
}

.rc-km-heading {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--rc-text);
}

.rc-km-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rc-km-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--rc-text);
  transition: background-color 0.15s ease;
}

.rc-km-link:hover {
  background: var(--rc-surface-subtle);
}

.rc-km-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rc-accent);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rc-km-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rc-km-body strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--rc-text);
}

.rc-km-body span {
  font-size: 13px;
  color: var(--rc-text-muted);
}

.rc-km-arrow {
  color: var(--rc-text-muted);
  font-size: 15px;
  flex-shrink: 0;
}

/* Nested 2-Column Reading Grid (180px Left Rail + Prose) */
.rc-reading-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.rc-reading-rail {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rc-readtime-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rc-text);
}

.rc-readtime-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rc-readtime-row svg {
  width: 15px;
  height: 15px;
  color: var(--rc-accent);
}

.rc-mini-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--rc-surface-subtle);
  margin-top: 10px;
  overflow: hidden;
}

.rc-mini-fill {
  width: 0%;
  height: 100%;
  background: var(--rc-accent);
  transition: width 0.08s linear;
}

.rg-toc-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 10px;
  padding: 16px 14px;
}

.rg-toc-card.is-empty {
  display: none;
}

.rg-toc-list,
#rgTocList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 2px solid var(--rc-border);
}

.rg-toc-link {
  display: block;
  padding: 6px 8px 6px 11px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.42;
  color: var(--rc-text-muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.rg-toc-link:hover {
  color: var(--rc-text);
}

.rg-toc-link.is-active {
  color: var(--rc-accent);
  font-weight: 700;
  border-left-color: var(--rc-accent);
  background: var(--rc-surface-muted);
  border-radius: 0 6px 6px 0;
}

.rc-reading-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  scroll-margin-top: 96px;
}

/* ==========================================================================
   Editorial Prose (.rg-prose)
   ========================================================================== */

.rg-prose {
  font-size: 16.5px;
  line-height: 1.82;
  letter-spacing: -0.012em;
  color: var(--ink-700);
}

.rg-prose h2 {
  position: relative;
  scroll-margin-top: 96px;
  margin: 34px 0 14px;
  padding: 2px 0 2px 14px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--rc-text);
}

.rg-prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 4px;
  background: var(--rc-accent);
}

.rg-prose h2:first-child {
  margin-top: 0;
}

.rg-prose h3 {
  scroll-margin-top: 96px;
  margin: 24px 0 10px;
  font-size: 17.5px;
  font-weight: 700;
  color: var(--rc-text);
  letter-spacing: -0.018em;
}

.rg-prose p {
  margin: 0 0 16px;
}

.rg-prose p:last-child {
  margin-bottom: 0;
}

.rg-prose strong {
  color: var(--rc-text);
  font-weight: 700;
}

.rg-prose ul,
.rg-prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.rg-prose li {
  margin-bottom: 8px;
  padding-left: 2px;
}

.rg-prose li::marker {
  color: var(--rc-accent);
  font-weight: 700;
}

.rg-prose blockquote {
  margin: 20px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--rc-accent);
  background: var(--rc-surface-muted);
  border-radius: 0 10px 10px 0;
  color: var(--rc-text);
  font-weight: 500;
}

.rg-prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--rc-border);
  background: var(--rc-surface);
}

.rg-prose th,
.rg-prose td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--rc-border);
  white-space: nowrap;
}

.rg-prose th {
  background: var(--rc-surface-subtle);
  font-weight: 700;
  color: var(--rc-text);
  font-size: 13.5px;
}

.rg-prose tbody tr:nth-child(even) td {
  background: var(--rc-bg);
}

.rg-prose tbody tr:last-child td {
  border-bottom: 0;
}

.rg-prose hr {
  border: 0;
  border-top: 1px solid var(--rc-border);
  margin: 28px 0;
}

/* Facts Table / Card & Partner Card */
.rc-facts-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 22px 24px;
}

.rc-facts-card .rc-section-title {
  margin: 8px 0 14px;
}

.rc-facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rc-facts-table tr {
  border-bottom: 1px solid var(--rc-border);
}

.rc-facts-table tr:last-child {
  border-bottom: 0;
}

.rc-facts-table th {
  width: 34%;
  padding: 12px 12px 12px 0;
  text-align: left;
  vertical-align: top;
  font-weight: 700;
  color: var(--rc-text-muted);
}

.rc-facts-table td {
  padding: 12px 0;
  color: var(--rc-text);
  font-weight: 600;
  line-height: 1.5;
}

.rc-partner-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 22px 24px;
}

.rc-partner-name {
  margin: 8px 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--rc-text);
}

.rc-partner-actions {
  margin-top: 16px;
}

.rc-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rc-section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--rc-text);
}

.rc-section-sub {
  margin: 4px 0 14px;
  font-size: 13.5px;
  color: var(--rc-text-muted);
}

.rc-section-count {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--rc-surface-subtle);
  color: var(--rc-text-muted);
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================================================
   FAQ Accordion (.rc-faq-section / .rg-faq-list)
   ========================================================================== */

.rc-faq-section {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 24px;
}

.rc-faq-heading {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--rc-text);
}

.rc-faq-list,
.rg-faq-list {
  display: flex;
  flex-direction: column;
}

.rc-faq-item,
.rg-faq-item {
  border-bottom: 1px solid var(--rc-border);
}

.rc-faq-item:last-child,
.rg-faq-item:last-child {
  border-bottom: 0;
}

.rc-faq-q,
.rg-faq-q {
  list-style: none;
  padding: 16px 2px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--rc-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  user-select: none;
  line-height: 1.45;
}

.rc-faq-q::-webkit-details-marker,
.rg-faq-q::-webkit-details-marker {
  display: none;
}

.rc-faq-plus {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--rc-surface-subtle);
  color: var(--rc-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.rc-faq-item[open] .rc-faq-plus {
  transform: rotate(45deg);
  background: var(--rc-accent);
  color: #FFFFFF;
}

.rc-faq-a,
.rg-faq-a {
  padding: 0 2px 18px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--rc-text-muted);
}

/* Related Articles & Next Links */
.rc-related-section {
  padding-top: 8px;
}

.rc-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.rc-related-card {
  display: flex;
  flex-direction: column;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--rc-text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.rc-related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--rc-shadow-card);
  border-color: var(--rc-accent);
}

.rc-related-thumb {
  aspect-ratio: 16 / 9;
  background: var(--rc-surface-subtle);
  overflow: hidden;
}

.rc-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rc-related-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rc-related-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rc-tag-match,
.rc-related-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
  font-size: 11.5px;
  font-weight: 700;
}

.rc-related-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--rc-text);
}

.rc-related-date {
  font-size: 12px;
  color: var(--rc-text-muted);
}

.rc-next-section {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 20px 22px;
}

.rc-next-chips,
.rg-nearby-chips,
.rg-chip-list,
.rc-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rc-next-chip,
.rg-chip,
.rc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--rc-surface-subtle);
  border: 1px solid var(--rc-border);
  color: var(--rc-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rc-next-chip:hover,
.rg-chip:hover,
.rc-chip:hover {
  background: var(--rc-surface-muted);
  border-color: var(--rc-accent);
  color: var(--rc-accent);
}

.rc-hub-back-card,
.rg-hub-back-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.rc-hub-back-info {
  flex: 1;
  min-width: 220px;
}

.rc-hub-back-title {
  display: block;
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--rc-text);
}

.rc-hub-back-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--rc-text-muted);
}

.rc-hub-back-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Right Detail Sidebar (Spotlight + Sticky Gradient Promo Card)
   ========================================================================== */

.rc-detail-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rc-spotlight-box {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 20px;
}

.rc-spotlight-list {
  display: flex;
  flex-direction: column;
}

.rc-spotlight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rc-border);
  text-decoration: none;
  color: var(--rc-text);
}

.rc-spotlight-item:first-of-type {
  padding-top: 2px;
}

.rc-spotlight-item:last-of-type {
  border-bottom: 0;
  padding-bottom: 2px;
}

.rc-spotlight-info {
  min-width: 0;
  flex: 1;
}

.rc-spotlight-title {
  margin: 4px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--rc-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.rc-spotlight-item:hover .rc-spotlight-title {
  color: var(--rc-accent);
}

.rc-spotlight-date {
  font-size: 12px;
  color: var(--rc-text-muted);
}

.rc-spotlight-thumb {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--rc-surface-subtle);
}

.rc-promo-card {
  position: sticky;
  top: 96px;
  padding: 26px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2b2640 0%, #6b3b5b 45%, #1D68E3 100%);
  color: #FFFFFF;
  box-shadow: var(--rc-shadow-card);
}

.rc-promo-card .rc-loop-pill {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
  margin-bottom: 14px;
}

.rc-promo-card .rc-loop-pill svg {
  color: #FFFFFF;
}

.rc-promo-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: #FFFFFF;
}

.rc-promo-desc {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

/* ==========================================================================
   3-Step Self-Check Card (.rg-selfcheck / .rc-card)
   ========================================================================== */

.rg-selfcheck,
.rc-card.rg-selfcheck {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 96px;
  margin: 22px 0 28px;
  background: var(--rc-surface);
  border: 2px solid rgba(29, 104, 227, 0.28);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(29, 104, 227, 0.09);
}

.rg-selfcheck::before,
.rc-card.rg-selfcheck::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1D68E3 0%, #3B82F6 60%, #06B6D4 100%);
}

.rg-sc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.rg-sc-header .rc-section-title {
  margin: 6px 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--rc-text);
}

.rg-sc-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--rc-text-muted);
  line-height: 1.5;
}

.rg-sc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(29, 104, 227, 0.10);
  border: 1px solid rgba(29, 104, 227, 0.22);
  color: var(--rc-accent);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.rg-sc-badge.is-complete {
  background: #059669;
  border-color: #059669;
  color: #FFFFFF;
}

.rg-sc-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--rc-surface-subtle);
  overflow: hidden;
  margin-bottom: 22px;
}

.rg-sc-bar-fill {
  height: 100%;
  width: 33%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1D68E3 0%, #3B82F6 100%);
  transition: width 0.3s ease;
}

.rg-sc-step,
.rc-sc-step {
  display: none;
}

.rg-sc-step.is-active,
.rc-sc-step.is-active {
  display: block;
}

.rg-sc-q {
  margin: 0 0 14px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--rc-text);
  line-height: 1.45;
}

.rg-sc-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rg-sc-opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 15px 17px;
  border-radius: 10px;
  border: 1.5px solid var(--rc-border);
  background: var(--rc-bg);
  color: var(--rc-text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rg-sc-opt:hover {
  border-color: var(--rc-accent);
  background: var(--rc-surface-muted);
  box-shadow: 0 4px 12px rgba(29, 104, 227, 0.10);
  transform: translateY(-1px);
}

.rg-sc-opt.is-selected {
  border-color: var(--rc-accent);
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
}

.rg-sc-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline-strong);
  background: var(--rc-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
}

.rg-sc-opt.is-selected .rg-sc-check {
  border-color: var(--rc-accent);
  background: var(--rc-accent);
  color: #FFFFFF;
}

.rg-sc-check svg {
  width: 12px;
  height: 12px;
}

.rg-sc-nav {
  margin-top: 14px;
  display: flex;
  align-items: center;
}

.rg-sc-result {
  display: none;
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ECFDF5 0%, #EFF6FF 100%);
  border: 2px solid #10B981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.10);
}

.rg-sc-result.is-warn {
  background: linear-gradient(135deg, #FFFBEB 0%, #EFF6FF 100%);
  border-color: #F59E0B;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.10);
}

.rg-sc-result.is-active {
  display: block;
}

.rg-sc-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #059669;
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.rg-sc-result.is-warn .rg-sc-score-badge {
  background: #D97706;
}

.rg-sc-result-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--rc-text);
  line-height: 1.35;
}

.rg-sc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.rg-sc-chips:empty {
  display: none;
}

.rg-sc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--rc-surface);
  border: 1px solid rgba(29, 104, 227, 0.22);
  font-size: 13px;
  line-height: 1.3;
  color: var(--rc-text);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.04);
}

.rg-sc-chip-key {
  font-weight: 700;
  color: var(--rc-accent);
}

.rg-sc-chip-val {
  font-weight: 600;
  color: var(--rc-text);
}

.rg-sc-result-desc {
  margin: 0 0 20px;
  font-size: 14.5px;
  color: var(--rc-text);
  opacity: 0.86;
  line-height: 1.65;
}

.rg-sc-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rg-sc-cta-btn {
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(29, 104, 227, 0.25);
}

.rg-sc-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1.5px solid #CBD5E1;
  background: var(--rc-surface);
  color: var(--rc-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.rg-sc-reset-btn:hover {
  border-color: var(--rc-accent);
  background: var(--rc-surface-muted);
}

html[data-theme="dark"] .rg-selfcheck,
html[data-theme="dark"] .rc-card.rg-selfcheck {
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .rg-sc-badge {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
}

html[data-theme="dark"] .rg-sc-badge.is-complete {
  background: #059669;
  border-color: #059669;
  color: #FFFFFF;
}

html[data-theme="dark"] .rg-sc-result {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(59, 130, 246, 0.14) 100%);
  border-color: rgba(16, 185, 129, 0.55);
}

html[data-theme="dark"] .rg-sc-result.is-warn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(59, 130, 246, 0.14) 100%);
  border-color: rgba(245, 158, 11, 0.55);
}

html[data-theme="dark"] .rg-sc-chip {
  background: var(--rc-surface);
  border-color: rgba(59, 130, 246, 0.35);
}

html[data-theme="dark"] .rg-sc-reset-btn {
  border-color: #4B5563;
  background: var(--rc-surface);
  color: var(--rc-text);
}

/* ==========================================================================
   Lead Consultation Modal (#rgLeadModal)
   ========================================================================== */

.rg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17, 24, 39, 0.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.rg-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rg-modal-sheet,
.rg-modal-dialog {
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 26px 24px;
  box-shadow: var(--shadow-lg);
  color: var(--rc-text);
}

.rg-modal-handle {
  display: none;
}

.rg-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.rg-modal-trust {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.rg-modal-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--rc-text);
}

.rg-modal-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--rc-text-muted);
  line-height: 1.5;
}

.rg-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--rc-border);
  background: var(--rc-surface-subtle);
  color: var(--rc-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.rg-modal-close:hover {
  border-color: var(--rc-accent);
  color: var(--rc-accent);
}

.rg-alert-qual {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.rg-field {
  margin-bottom: 14px;
}

.rg-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--rc-text);
}

.rg-req {
  color: var(--danger);
  margin-left: 3px;
}

.rg-input,
.rg-select,
.rg-textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--rc-border);
  border-radius: 8px;
  background: var(--rc-bg);
  color: var(--rc-text);
  font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rg-input:focus,
.rg-select:focus,
.rg-textarea:focus {
  outline: none;
  border-color: var(--rc-accent);
  box-shadow: 0 0 0 3px var(--rc-highlight);
}

.rg-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rg-consent-box {
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0 18px;
}

.rg-consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.rg-consent-row:last-child {
  margin-bottom: 0;
}

.rg-consent-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rc-text);
  cursor: pointer;
}

.rg-consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--rc-accent);
  cursor: pointer;
}

.rg-consent-toggle {
  background: none;
  border: 0;
  color: var(--rc-text-muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.rg-policy-detail {
  display: none;
  margin: 8px 0 12px;
  padding: 12px;
  max-height: 150px;
  overflow-y: auto;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--rc-text-muted);
  white-space: pre-wrap;
  line-height: 1.58;
}

.rg-policy-detail.is-open {
  display: block;
}

.rg-form-error {
  display: none;
  padding: 10px 13px;
  border-radius: 8px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

.rg-form-error.is-visible {
  display: block;
}

.rg-form-success {
  display: none;
  text-align: center;
  padding: 20px 8px 8px;
}

.rg-form-success.is-visible {
  display: block;
}

.rg-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.rg-success-icon svg {
  width: 28px;
  height: 28px;
}

.rg-success-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--rc-text);
}

.rg-success-desc {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--rc-text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Error Pages (404.php / 410.php)
   ========================================================================== */

.rc-error-wrap {
  padding: 64px 0 80px;
}

.rg-error-card,
.rc-error-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 14px;
  padding: 44px 28px;
  text-align: center;
  box-shadow: var(--rc-shadow-card);
  margin-bottom: 24px;
}

.rg-error-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rg-error-icon svg {
  width: 28px;
  height: 28px;
}

.rc-error-code {
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--rc-accent);
  margin-bottom: 12px;
}

.rc-error-badge,
.rg-error-code {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 12px;
}

.rc-error-title,
.rg-error-card h1,
.rc-error-card h1 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--rc-text);
}

.rc-error-desc,
.rg-error-card p,
.rc-error-card p {
  margin: 0 auto 24px;
  max-width: 480px;
  font-size: 14.5px;
  color: var(--rc-text-muted);
  line-height: 1.6;
}

.rc-error-reason {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--rc-text-muted);
}

.rc-error-actions,
.rg-error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.rg-nearby-section {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 24px;
}

.rg-section-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--rc-text);
}

.rg-section-sub {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--rc-text-muted);
}

/* ==========================================================================
   Home Hub Directory (#rc-hub-directory) & YMYL E-E-A-T / Compliance Cards
   ========================================================================== */

.rc-hub-directory {
  padding: 56px 0 64px;
  border-top: 1px solid var(--rc-border);
  background: var(--rc-bg);
}

.rc-hub-dir-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.rc-hub-dir-title {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--rc-text);
}

.rc-hub-dir-sub {
  margin: 0;
  font-size: 14px;
  color: var(--rc-text-muted);
}

.rc-hub-dir-counts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rc-hub-dir-counts span {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rc-accent);
}

.rc-hub-dir-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.rc-hub-dir-group {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 20px 22px;
}

.rc-hub-dir-group-title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rc-border);
  font-size: 15px;
  font-weight: 800;
  color: var(--rc-text);
}

.rc-hub-dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.rc-hub-dir-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--rc-bg);
  border: 1px solid transparent;
  color: var(--rc-text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.rc-hub-dir-link:hover {
  border-color: var(--rc-accent);
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
}

.rc-hub-dir-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--rc-surface-subtle);
  color: var(--rc-text-muted);
  font-size: 11.5px;
  font-weight: 600;
}

.rc-hub-dir-articles {
  margin-top: 24px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 12px;
  padding: 22px;
}

.rc-hub-dir-articles-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: var(--rc-text);
}

.rc-hub-dir-article-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rc-hub-dir-article-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
  color: var(--rc-text);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.rc-hub-dir-article-link:hover {
  border-color: var(--rc-accent);
  background: var(--rc-surface-muted);
}

.rc-hub-dir-article-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--rc-accent);
}

.rc-hub-dir-article-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--rc-text);
}

.rc-eeat-card {
  scroll-margin-top: 96px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-left: 4px solid var(--rc-accent);
  border-radius: 12px;
  padding: 22px 24px;
}

.rc-eeat-card-home {
  margin-top: 24px;
}

.rc-eeat-head {
  margin-bottom: 14px;
}

.rc-eeat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.rc-eeat-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--rc-text);
}

.rc-eeat-grid {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.rc-eeat-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--rc-bg);
  border: 1px solid var(--rc-border);
}

.rc-eeat-row dt {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rc-text-muted);
}

.rc-eeat-row dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rc-text);
  line-height: 1.5;
}

.rc-eeat-sources {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rc-eeat-sources-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rc-text-muted);
  margin-right: 4px;
}

.rc-eeat-source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--rc-surface-subtle);
  border: 1px solid var(--rc-border);
  color: var(--rc-text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.rc-eeat-source-link:hover {
  border-color: var(--rc-accent);
  background: var(--rc-surface-muted);
  color: var(--rc-accent);
}

.rc-compliance-card {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  padding: 20px 22px;
  color: var(--rc-text);
}

.rc-compliance-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--warning);
  margin-bottom: 12px;
}

.rc-compliance-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--rc-text);
}

.rc-compliance-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-700);
}

.rc-compliance-list strong {
  color: var(--rc-text);
}

@media (max-width: 900px) {
  .rc-hub-dir-groups {
    grid-template-columns: 1fr;
  }

  .rc-hub-dir-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .rc-hub-dir-article-grid {
    grid-template-columns: 1fr;
  }

  .rc-eeat-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .rc-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rc-detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .rc-promo-card {
    position: static;
  }
}

@media (max-width: 960px) {
  .rc-feed-row {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px 22px;
  }

  .rc-feed-thumb {
    width: 220px;
  }

  .rc-feed-meta {
    grid-column: 2;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .rc-recirc-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .rc-nav {
    display: none;
  }

  .rc-mobile-toggle {
    display: inline-flex;
  }

  .rc-detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .rc-footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 820px) {
  .rc-reading-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .rc-reading-rail {
    position: static;
  }
}

@media (max-width: 768px) {
  .rc-header-wrap {
    padding: 0;
  }

  .rc-header-bar {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    height: 58px;
    padding: 0 16px;
  }

  .rc-hero-section {
    padding: 0 0 14px;
  }

  .rc-hero-slider {
    margin: 0 -24px;
    border-radius: 0;
    height: 360px;
  }

  .rc-hero-overlay {
    padding: 24px 20px;
  }
}

@media (max-width: 640px) {
  .rc-container-wide,
  .rg-container-wide,
  .rg-container,
  .rc-container-narrow,
  .rg-container-narrow {
    padding: 0 16px;
  }

  .rc-hero-slider {
    margin: 0 -16px;
  }

  .rc-hero-excerpt {
    display: none;
  }

  .rc-feed-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 0;
  }

  .rc-feed-thumb {
    width: 100%;
  }

  .rc-feed-title {
    font-size: 18px;
  }

  .rc-feed-meta {
    grid-column: 1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .rc-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .rc-subscribe-form {
    flex-direction: column;
    align-items: stretch;
  }

  .rc-footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .rc-marquee-item {
    font-size: 26px;
  }

  .rc-recirc-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rc-facts-grid,
  .rc-related-grid,
  .rg-sc-options {
    grid-template-columns: 1fr;
  }

  .rc-header-actions .rc-btn-primary.rc-btn-sm {
    display: none;
  }

  .rc-upnext {
    left: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
