/* ═══════════════════════════════════════════════════════════════════
   ARTICLE-THEME.CSS — 古迹行笺
   Design Language: quiet museum archive, warm paper, celadon ink
   ═══════════════════════════════════════════════════════════════════ */

/* Fonts mirror the React app: clean sans body with a restrained Song-style display face. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Noto+Serif+SC:wght@500;600;700;900&display=swap');

/* ── Design Tokens ── */
:root {
  /* Shared museum palette from frontend/src/index.css. */
  --rf-amber:        #A43B30;
  --rf-amber-dim:    #842F27;
  --rf-amber-glow:   rgba(164, 59, 48, .16);
  --rf-bronze:       #A77C38;
  --rf-phosphor:     #4F7C69;
  --rf-phosphor-dim: #355C4C;
  --rf-phosphor-glow:rgba(79, 124, 105, .14);
  --rf-void:         #EEF1EC;
  --rf-void-light:   #E3E8DF;
  --rf-surface:      #FBFAF5;
  --rf-surface-up:   #F6F2E8;
  --rf-surface-up2:  #E8EEE6;
  --rf-text:         #20231F;
  --rf-text-dim:     #687064;
  --rf-text-muted:   #8A9383;
  --rf-border:       #C8D0C2;
  --rf-border-glow:  rgba(79, 124, 105, .42);
  --rf-danger:       #B42318;
  --rf-info:         #4F7C69;
  --rf-accent:       var(--rf-amber);
  --rf-card:         var(--rf-surface-up);

  /* Typography */
  --font-display:  'Songti SC', 'Noto Serif SC', Georgia, serif;
  --font-body:     'Geist', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono:     'Geist', 'PingFang SC', sans-serif;

  /* Spacing Scale */
  --sp-2xs: 4px;
  --sp-xs:  8px;
  --sp-sm:  12px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(45,53,42,.08);
  --shadow-md:  0 10px 28px rgba(45,53,42,.10);
  --shadow-lg:  0 18px 45px rgba(45,53,42,.12);
  --shadow-glow:0 0 0 1px var(--rf-border-glow), 0 16px 36px rgba(45,53,42,.10);

  /* Transitions */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 150ms;
  --dur-norm: 250ms;
  --dur-slow: 400ms;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

/* ── Body: porcelain archive background ── */
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--rf-text);
  background:
    linear-gradient(180deg, rgba(255,253,246,.72), rgba(238,241,236,.94) 42%, rgba(226,232,222,.88)),
    repeating-linear-gradient(90deg, rgba(79,124,105,.045) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(167,124,56,.035) 0 1px, transparent 1px 42px),
    var(--rf-void);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* no scanlines for modern museum style */

/* ── Container ── */
.rf-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

/* ── Top Navigation ── */
.rf-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 245, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rf-border);
  padding: 0 var(--sp-lg);
}

.rf-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.rf-nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--rf-text);
  text-decoration: none;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.rf-nav__logo {
  width: 40px;
  height: 40px;
  overflow: hidden;
  flex: 0 0 40px;
  border: 1px solid var(--rf-border);
  border-radius: 8px;
  background: var(--rf-bg);
}

.rf-nav__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.32);
}

@keyframes rf-pulse {
  0%, 100% { opacity: .8; }
  50% { opacity: 1; }
}

.rf-nav__links {
  display: flex;
  gap: var(--sp-xs);
  list-style: none;
}

.rf-nav__link {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--rf-text-dim);
  text-decoration: none;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: var(--r-sm);
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.rf-nav__link:hover {
  color: var(--rf-amber);
  background: var(--rf-amber-glow);
}

.rf-nav__link.active {
  color: var(--rf-amber);
  background: var(--rf-amber-glow);
  font-weight: 600;
}

/* ── Page Header ── */
.rf-hero {
  text-align: center;
  padding: var(--sp-3xl) 0 var(--sp-xl);
  position: relative;
}

.rf-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rf-amber), var(--rf-bronze), transparent);
}

.rf-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--rf-text);
  letter-spacing: 0;
  margin-bottom: var(--sp-md);
  text-shadow: none;
}

.rf-hero__subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--rf-text-dim);
  letter-spacing: 0;
}

/* ── Card ── */
.rf-card {
  background: rgba(251, 250, 245, .88);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-norm) var(--ease-out),
              box-shadow var(--dur-norm) var(--ease-out);
}

.rf-card:hover {
  border-color: var(--rf-border-glow);
  box-shadow: var(--shadow-md);
}

/* decorative corner brackets */
.rf-card::before,
.rf-card::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--rf-amber-dim);
  opacity: .35;
  pointer-events: none;
}
.rf-card::before {
  top: 8px; left: 8px;
  border-top: 2px solid; border-left: 2px solid;
}
.rf-card::after {
  bottom: 8px; right: 8px;
  border-bottom: 2px solid; border-right: 2px solid;
}

.rf-card__heading {
  font-family: var(--font-display);
  font-size: 1.35em;
  font-weight: 700;
  color: var(--rf-amber);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--rf-border);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.rf-card__heading::before {
  content: '▸';
  color: var(--rf-phosphor);
  font-size: 0.8em;
}

/* ── Stat Cards (row) ── */
.rf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

.rf-stat {
  background: var(--rf-surface);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg) var(--sp-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* top glow bar */
.rf-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rf-amber), var(--rf-phosphor));
}

.rf-stat__value {
  font-family: var(--font-mono);
  font-size: 2.2em;
  font-weight: 700;
  color: var(--rf-amber);
  line-height: 1.1;
  text-shadow: none;
}

.rf-stat__label {
  font-family: var(--font-mono);
  font-size: 0.72em;
  color: var(--rf-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--sp-2xs);
}

/* ── Form Elements ── */
.rf-form-group {
  margin-bottom: var(--sp-lg);
}

.rf-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 700;
  color: var(--rf-amber-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-xs);
}

.rf-input,
.rf-select {
  width: 100%;
  padding: var(--sp-sm) var(--sp-md);
  font-family: var(--font-body);
  font-size: 0.95em;
  color: var(--rf-text);
  background: var(--rf-void-light);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  appearance: none;
}

.rf-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23687064' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.rf-input:focus,
.rf-select:focus {
  border-color: var(--rf-amber);
  box-shadow: 0 0 0 3px var(--rf-amber-glow);
}

.rf-input::placeholder {
  color: var(--rf-text-muted);
}

.rf-input:disabled,
.rf-select:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ── Buttons ── */
.rf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  font-family: var(--font-mono);
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rf-void);
  background: linear-gradient(135deg, var(--rf-amber), var(--rf-amber-dim));
  border: none;
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-lg);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast);
  text-decoration: none;
}

.rf-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--rf-amber-glow);
}

.rf-btn:active:not(:disabled) {
  transform: translateY(0);
}

.rf-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

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

.rf-btn--ghost {
  background: transparent;
  color: var(--rf-amber);
  border: 1px solid var(--rf-amber-dim);
}

.rf-btn--ghost:hover:not(:disabled) {
  background: var(--rf-amber-glow);
  box-shadow: none;
  transform: none;
}

.rf-btn--sm {
  font-size: 0.72em;
  padding: var(--sp-2xs) var(--sp-sm);
}

.rf-btn--phosphor {
  background: linear-gradient(135deg, var(--rf-phosphor), var(--rf-phosphor-dim));
  color: var(--rf-void);
}

/* ── Tags ── */
.rf-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rf-amber);
  background: var(--rf-amber-glow);
  border: 1px solid rgba(164, 59, 48, .22);
  padding: 2px 10px;
  border-radius: var(--r-pill);
}

.rf-tag--green {
  color: var(--rf-phosphor);
  background: var(--rf-phosphor-glow);
  border-color: rgba(79, 124, 105, .24);
}

/* ── Loading Spinner ── */
.rf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  padding: var(--sp-2xl);
  color: var(--rf-text-dim);
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rf-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--rf-border);
  border-top-color: var(--rf-amber);
  border-radius: 50%;
  animation: rf-spin .8s linear infinite;
}

@keyframes rf-spin {
  to { transform: rotate(360deg); }
}

/* blinking cursor for text-based loading */
.rf-loading__text::after {
  content: '█';
  animation: rf-blink 1s step-end infinite;
  color: var(--rf-amber);
}

@keyframes rf-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Result Grid ── */
.rf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-md);
}

.rf-grid-item {
  background: var(--rf-surface-up);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  transition: border-color var(--dur-norm), transform var(--dur-norm), box-shadow var(--dur-norm);
  cursor: default;
}

.rf-grid-item:hover {
  border-color: var(--rf-amber-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.rf-grid-item__title {
  font-family: var(--font-display);
  font-size: 1.1em;
  font-weight: 700;
  color: var(--rf-text);
  margin-bottom: var(--sp-xs);
}

.rf-grid-item__meta {
  font-size: 0.85em;
  color: var(--rf-text-dim);
  margin-bottom: var(--sp-2xs);
}

/* ── Pagination ── */
.rf-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
  font-family: var(--font-mono);
  font-size: 0.82em;
}

.rf-pagination__info {
  color: var(--rf-text-dim);
  letter-spacing: 0.06em;
}

/* ── Modal ── */
.rf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--sp-lg);
  animation: rf-fadeIn var(--dur-norm) var(--ease-out);
}

.rf-modal-overlay.active {
  display: flex;
}

@keyframes rf-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rf-modal {
  background: var(--rf-surface);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--sp-xl);
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: rf-slideUp var(--dur-slow) var(--ease-out);
}

@keyframes rf-slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.rf-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--rf-border);
}

.rf-modal__title {
  font-family: var(--font-display);
  font-size: 1.4em;
  font-weight: 700;
  color: var(--rf-amber);
}

.rf-modal__close {
  background: none;
  border: none;
  color: var(--rf-text-dim);
  font-size: 1.5em;
  cursor: pointer;
  padding: var(--sp-2xs);
  line-height: 1;
  transition: color var(--dur-fast);
}

.rf-modal__close:hover {
  color: var(--rf-amber);
}

.rf-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

.rf-detail-item {
  background: var(--rf-void-light);
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
}

.rf-detail-item__label {
  font-family: var(--font-mono);
  font-size: 0.7em;
  color: var(--rf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rf-detail-item__value {
  font-weight: 600;
  color: var(--rf-text);
  margin-top: 2px;
}

/* ── Table ── */
.rf-table-wrap {
  overflow-x: auto;
}

.rf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.rf-table th,
.rf-table td {
  padding: var(--sp-sm) var(--sp-md);
  text-align: left;
  border-bottom: 1px solid var(--rf-border);
}

.rf-table th {
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 700;
  color: var(--rf-amber-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--rf-void-light);
  position: sticky;
  top: 0;
  z-index: 1;
}

.rf-table tr {
  transition: background var(--dur-fast);
}

.rf-table tbody tr:hover {
  background: var(--rf-surface-up);
  cursor: pointer;
}

/* ── Progress Bar ── */
.rf-progress {
  background: var(--rf-border);
  border-radius: var(--r-pill);
  height: 10px;
  overflow: hidden;
  margin: var(--sp-md) 0;
}

.rf-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rf-amber), var(--rf-phosphor));
  transition: width .5s var(--ease-out);
  border-radius: var(--r-pill);
}

/* ── Destination Chips ── */
.rf-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--sp-sm);
}

.rf-chip {
  background: var(--rf-surface-up);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-norm) var(--ease-out);
}

.rf-chip:hover {
  border-color: var(--rf-amber-dim);
  background: var(--rf-surface-up2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.rf-chip__count {
  font-family: var(--font-mono);
  font-size: 1.6em;
  font-weight: 700;
  color: var(--rf-amber);
  line-height: 1.2;
}

.rf-chip__name {
  font-family: var(--font-body);
  font-size: 0.82em;
  color: var(--rf-text-dim);
  margin-top: 2px;
}

/* ── Timeline (Travel Plan) ── */
.rf-timeline {
  position: relative;
  padding: var(--sp-lg) 0;
}

.rf-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--rf-amber), var(--rf-phosphor), var(--rf-amber-dim));
}

.rf-day-section {
  margin-bottom: var(--sp-xl);
  position: relative;
}

.rf-day-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.rf-day-badge {
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--rf-amber), var(--rf-amber-dim));
  color: var(--rf-void);
  padding: var(--sp-2xs) var(--sp-md);
  border-radius: var(--r-sm);
  min-width: 90px;
  text-align: center;
}

.rf-day-title {
  font-family: var(--font-display);
  font-size: 1.3em;
  font-weight: 700;
  color: var(--rf-text);
}

.rf-itinerary-card {
  background: var(--rf-surface-up);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  margin-left: var(--sp-2xl);
  margin-bottom: var(--sp-md);
  position: relative;
  transition: border-color var(--dur-norm), transform var(--dur-norm);
}

.rf-itinerary-card:hover {
  border-color: var(--rf-amber-dim);
  transform: translateX(4px);
}

.rf-itinerary-card::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 20px;
  width: 12px;
  height: 12px;
  background: var(--rf-amber);
  border: 3px solid var(--rf-surface);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--rf-amber-glow);
}

.rf-time-badge {
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 700;
  color: var(--rf-phosphor);
  background: var(--rf-phosphor-glow);
  padding: 2px var(--sp-sm);
  border-radius: var(--r-sm);
  border: 1px solid rgba(79,124,105,.22);
}

.rf-attraction-name {
  font-family: var(--font-display);
  font-size: 1.1em;
  font-weight: 700;
  color: var(--rf-text);
}

.rf-card-section {
  margin-bottom: var(--sp-md);
}

.rf-card-section--highlight {
  background: var(--rf-amber-glow);
  border-left: 3px solid var(--rf-amber);
  padding: var(--sp-xs) var(--sp-md);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.rf-card-section--tip {
  background: var(--rf-phosphor-glow);
  border-left: 3px solid var(--rf-phosphor);
  padding: var(--sp-xs) var(--sp-md);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.rf-card-section__title {
  font-family: var(--font-mono);
  font-size: 0.72em;
  font-weight: 700;
  color: var(--rf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.rf-card-section__text {
  color: var(--rf-text);
  line-height: 1.7;
  font-size: 0.92em;
}

/* ── Suggestions ── */
.rf-suggestions li {
  padding: var(--sp-xs) 0;
  padding-left: var(--sp-lg);
  position: relative;
  color: var(--rf-text);
  line-height: 1.7;
  list-style: none;
}

.rf-suggestions li::before {
  content: '◈';
  position: absolute;
  left: 0;
  color: var(--rf-amber);
  font-size: 0.85em;
}

/* ── Budget Card ── */
.rf-budget-card {
  background: linear-gradient(135deg, var(--rf-surface-up), var(--rf-void-light));
  border: 1px solid var(--rf-amber-dim);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  text-align: center;
  margin-top: var(--sp-lg);
}

.rf-budget-card h4 {
  font-family: var(--font-display);
  color: var(--rf-amber);
  font-size: 1.15em;
  margin-bottom: var(--sp-xs);
}

.rf-budget-card p {
  color: var(--rf-text);
  font-size: 1.05em;
}

/* ── Plan Header ── */
.rf-plan-header {
  text-align: center;
  padding: var(--sp-lg);
  background: var(--rf-void-light);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-xl);
}

.rf-plan-header h3 {
  font-family: var(--font-display);
  font-size: 1.8em;
  color: var(--rf-amber);
  margin-bottom: var(--sp-xs);
  text-shadow: none;
}

.rf-plan-header p {
  color: var(--rf-text-dim);
  line-height: 1.6;
}

/* ── Vector Preview ── */
.rf-vector-preview {
  background: var(--rf-void-light);
  padding: var(--sp-md);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--rf-phosphor);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid var(--rf-border);
}

/* ── Empty State ── */
.rf-empty {
  text-align: center;
  padding: var(--sp-2xl);
  color: var(--rf-text-muted);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* ── Error State ── */
.rf-error {
  text-align: center;
  padding: var(--sp-xl);
  color: var(--rf-danger);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* ── Search Mode Toggle ── */
.rf-mode-toggle {
  display: inline-flex;
  gap: 2px;
  background: var(--rf-surface);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-md);
  padding: 3px;
  margin-bottom: var(--sp-md);
}

.rf-mode-toggle label {
  font-family: var(--font-mono);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rf-text-dim);
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.rf-mode-toggle input[type="radio"] {
  display: none;
}

.rf-mode-toggle input[type="radio"]:checked + span {
  background: var(--rf-amber);
  color: var(--rf-void);
}

/* ── Filter Bar ── */
.rf-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-md);
}

/* ── Search Input Group ── */
.rf-search-group {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

.rf-search-group .rf-input {
  flex: 1;
}

/* ── SVG Route Map ── */
.rf-route-map {
  position: relative;
  background: var(--rf-void);
  border: 1px solid var(--rf-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-md);
}

.rf-route-map__svg-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.rf-route-map__svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
}

.rf-route-map__actions {
  display: flex;
  gap: var(--sp-sm);
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .rf-route-map__svg-wrap svg {
    min-width: 600px;
  }
  .rf-route-map__actions {
    justify-content: center;
  }
}

/* ── Footer ── */
.rf-footer {
  text-align: center;
  padding: var(--sp-2xl) 0 var(--sp-xl);
  color: var(--rf-text-muted);
  font-family: var(--font-mono);
  font-size: 0.72em;
  letter-spacing: 0.06em;
}

/* ── Article template: editorial hierarchy using the React museum tokens ── */
.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: var(--sp-xl);
}

.article-kicker {
  margin-bottom: var(--sp-sm) !important;
  color: var(--rf-phosphor-dim);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.article-body h2 {
  margin-top: 2em;
  color: var(--rf-text);
  font-family: var(--font-display);
  font-size: 1.75rem;
}

.article-body h3 {
  margin: var(--sp-xl) 0 var(--sp-sm);
  color: var(--rf-text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.article-body p,
.article-body li {
  font-size: 1.0625rem;
  line-height: 1.85;
}

.article-body p { margin-bottom: 1em; }
.article-body ul,
.article-body ol {
  margin: var(--sp-md) 0 var(--sp-xl);
  padding-left: 1.5em;
}

.article-lede {
  margin: 0 0 var(--sp-2xl) !important;
  padding-left: var(--sp-lg);
  border-left: 3px solid var(--rf-phosphor);
  color: var(--rf-text-dim);
  font-family: var(--font-display);
  font-size: 1.16rem !important;
  line-height: 1.9 !important;
}

.article-day {
  margin: 0 0 var(--sp-2xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid rgba(200, 208, 194, .78);
}

.article-tip {
  margin: var(--sp-lg) 0;
  padding: var(--sp-md) var(--sp-lg);
  border: 1px solid rgba(166, 178, 159, .78);
  border-left: 3px solid var(--rf-bronze);
  border-radius: var(--r-md);
  background: rgba(246, 242, 232, .72);
  box-shadow: var(--shadow-sm);
}

.article-tip p {
  margin-bottom: var(--sp-xs);
  color: var(--rf-text-dim);
  font-size: .95rem;
  line-height: 1.7;
}

.article-tip p:last-child { margin-bottom: 0; }
.article-tip strong { color: var(--rf-text); font-weight: 600; }

.article-meta {
  display: flex;
  justify-content: center;
  margin: 0 0 var(--sp-xs);
  color: var(--rf-text-dim);
  font-size: .875rem;
  font-weight: 500;
}

.article-editorial-byline {
  margin: 0 0 var(--sp-2xl) !important;
  color: var(--rf-phosphor);
  font-size: .8rem !important;
  font-weight: 600;
  text-align: center;
}

.article-source-note {
  margin-top: var(--sp-2xl);
  padding: var(--sp-lg);
  border-top: 1px solid var(--rf-border);
  border-bottom: 1px solid var(--rf-border);
  background: rgba(232, 238, 230, .46);
}

.article-source-note h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.article-source-note p {
  color: var(--rf-text-dim);
  font-size: .9rem;
  line-height: 1.7;
}

.article-source-note p:last-child { margin-bottom: 0; }
.article-source-note a { color: var(--rf-phosphor); font-weight: 600; }

.article-backlink {
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--rf-border);
}

.article-backlink a {
  color: var(--rf-amber);
  font-weight: 600;
  text-decoration: none;
}

.day-header {
  position: relative;
  margin: var(--sp-xl) 0 var(--sp-md);
  padding: var(--sp-sm) var(--sp-md) var(--sp-sm) var(--sp-lg);
  border: 1px solid rgba(166, 178, 159, .8);
  border-radius: var(--r-md);
  background: rgba(251, 250, 245, .88);
  color: var(--rf-text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.day-header::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--rf-amber);
}
.heritage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1em; margin-top: 1em; }
.heritage-card { border: 1px solid var(--rf-border); border-radius: 8px; padding: 1em; }
.heritage-card .tag { font-size: .75em; color: var(--rf-accent); margin-bottom: .4em; }
.heritage-card .title { font-weight: 600; margin-bottom: .4em; }
.heritage-card .meta { font-size: .85em; color: var(--rf-text-dim); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .rf-container { padding: 0 var(--sp-md); }
  .rf-card { padding: var(--sp-lg); }
  .rf-nav__name { display: none; }
  .rf-hero__title { font-size: 1.6rem; }
  .rf-grid { grid-template-columns: 1fr; }
  .rf-chips { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .rf-filters { grid-template-columns: 1fr; }
  .rf-timeline::before { left: 16px; }
  .rf-itinerary-card { margin-left: var(--sp-lg); }
  .rf-itinerary-card::before { left: -22px; }
  .rf-detail-grid { grid-template-columns: 1fr; }
  .rf-search-group { flex-direction: column; }
  .article-body p,
  .article-body li { font-size: 1rem; }
  .article-lede { padding-left: var(--sp-md); font-size: 1.05rem !important; }
  .article-meta { justify-content: flex-start; }
  .day-header { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .rf-nav__links { gap: 2px; }
  .rf-nav__link { padding: var(--sp-2xs) var(--sp-xs); font-size: 0.7em; }
  .rf-stat__value { font-size: 1.8em; }
  .rf-nav { padding: 0 var(--sp-xs); }
  .rf-container { padding: 0 var(--sp-md); }
}

@media print {
  .rf-nav,
  .rf-footer,
  .article-backlink { display: none; }
  body { background: #fff; }
  .article-body { max-width: none; }
  .article-day { break-inside: avoid; }
}
