/*
 * Color refinement: Vivid-but-calm category accents + two focused step guides.
 * Loaded after category-palette.css so the rest of the site's original UI,
 * routes, data, and interactive behavior remain unchanged.
 *
 * Design principles:
 * 1. A category has ONE dark readable color, ONE brighter icon color,
 *    and ONE pale background. No saturated text on bright surfaces.
 * 2. Arrival steps share BLUE; dental steps share VIOLET. Step order is
 *    communicated by numbers rather than more arbitrary hues.
 * 3. Orange is reserved for warnings, never another process-stage color.
 */

/* Palette: livelier icons, quiet surfaces, legible dark labels. */
:root {
  --rainbow-green: #08775b;
  --rainbow-green-vivid: #10aa83;
  --rainbow-green-soft: #e8faf1;
  --rainbow-green-line: #afe7d1;

  --rainbow-blue: #1859a8;
  --rainbow-blue-vivid: #3788ee;
  --rainbow-blue-soft: #edf5ff;
  --rainbow-blue-line: #bcd7fb;

  --rainbow-amber: #89510c;
  --rainbow-amber-vivid: #e8a22b;
  --rainbow-amber-soft: #fff5df;
  --rainbow-amber-line: #f1d8a5;

  --rainbow-coral: #aa3d56;
  --rainbow-coral-vivid: #ed7287;
  --rainbow-coral-soft: #fff0f3;
  --rainbow-coral-line: #f3c2ce;

  --rainbow-indigo: #4453a9;
  --rainbow-indigo-vivid: #7885ec;
  --rainbow-indigo-soft: #eef0ff;
  --rainbow-indigo-line: #cbd1f9;

  --rainbow-violet: #7043a4;
  --rainbow-violet-vivid: #aa78e1;
  --rainbow-violet-soft: #f6efff;
  --rainbow-violet-line: #ddc9f3;

  --rainbow-cyan: #0c748b;
  --rainbow-cyan-vivid: #1ba6be;
  --rainbow-cyan-soft: #eaf9fb;
  --rainbow-cyan-line: #b4e4ec;

  --rainbow-slate: #536780;
  --rainbow-slate-soft: #eef3f8;
  --rainbow-slate-line: #cfdce8;
}

/* A single color key used throughout each major service. */
.tone-green, .route-prepare { --category-vivid: var(--rainbow-green-vivid); }
.tone-blue, .route-arrival { --category-vivid: var(--rainbow-blue-vivid); }
.tone-amber { --category-vivid: var(--rainbow-amber-vivid); }
.tone-coral { --category-vivid: var(--rainbow-coral-vivid); }
.tone-indigo, .route-opd { --category-vivid: var(--rainbow-indigo-vivid); }
.tone-violet, .route-foreigner { --category-vivid: var(--rainbow-violet-vivid); }

/* Dental is a separate guide: identifiable by a violet tooth icon. */
.hero-route-dental, .route-dental {
  --category: var(--rainbow-violet);
  --category-vivid: var(--rainbow-violet-vivid);
  --category-soft: var(--rainbow-violet-soft);
  --category-line: var(--rainbow-violet-line);
}

/* Vivid navigation strokes, while the card itself stays white/pastel. */
.service-card {
  background: linear-gradient(145deg, #fff 0%, var(--category-soft, #edf5ff) 165%);
  border-color: var(--category-line, #dce5ef);
  box-shadow: 0 5px 19px rgba(34, 55, 88, .05);
}
.service-card::after {
  width: 5px;
  background: var(--category-vivid, var(--category, #1859a8));
}
.service-card .card-icon {
  color: var(--category, #1859a8);
  background: var(--category-soft, #edf5ff);
  border-color: var(--category-line, #c8d8ed);
  box-shadow: 0 2px 0 rgba(255,255,255,.65) inset;
}
.service-card .card-action {
  color: var(--category, #1859a8);
  background: #fff;
  border-color: var(--category-line, #c8d8ed);
}
.service-card:hover,
.service-card:focus-visible {
  border-color: var(--category-vivid, var(--category, #1859a8));
  box-shadow: 0 10px 26px rgba(32, 59, 94, .11);
}
/* A little color in list icons. All body text remains dark neutral. */
.unified-entry .unified-symbol,
.unified-entry:nth-child(even) .unified-symbol {
  background: var(--row-soft, #edf5ff);
  color: var(--row-color, #1859a8);
}
.unified-entry .unified-action {
  color: var(--row-color, #1859a8);
  background: var(--row-soft, #edf5ff);
}

/* Process pages: one dominant hue each. */
.route-arrival {
  --flow-accent: #1764b3;
  --flow-accent-deep: #164e8c;
  --flow-soft: #edf5ff;
  --flow-line: #c9def7;
  --flow-line-muted: #e3ebf4;
}
.route-dental {
  --flow-accent: #7650ad;
  --flow-accent-deep: #5e3c94;
  --flow-soft: #f4effd;
  --flow-line: #dccdf2;
  --flow-line-muted: #eee6f6;
}

/* The old multi-colored step rule is intentionally overridden here.
   All badges and icons in a journey now share their page's accent. */
.route-arrival .guided-journey .journey-item,
.route-dental .guided-journey .journey-item {
  --step-color: var(--flow-accent);
  --step-soft: var(--flow-soft);
  --step-line: var(--flow-line);
}
.route-arrival .guided-journey::before,
.route-dental .guided-journey::before {
  background: var(--flow-line) !important;
}
.route-arrival .guided-journey .journey-item .journey-marker,
.route-dental .guided-journey .journey-item .journey-marker {
  background: var(--flow-accent) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px var(--flow-line), 0 4px 10px rgba(20,48,84,.08) !important;
  border-color: #fff;
}
.route-arrival .guided-journey .journey-item .journey-symbol,
.route-dental .guided-journey .journey-item .journey-symbol {
  color: var(--flow-accent) !important;
  background: var(--flow-soft) !important;
  border: 1px solid var(--flow-line) !important;
}
.route-arrival .journey-label,
.route-dental .journey-label {
  color: var(--flow-accent-deep) !important;
  letter-spacing: .025em;
}
.route-arrival .journey-item .journey-card,
.route-dental .journey-item .journey-card,
.route-dental .dental-item .journey-card {
  background: #fff !important;
  border: 1px solid #dce6ef !important;
  box-shadow: 0 4px 16px rgba(30, 55, 88, .042) !important;
}
.route-arrival .journey-card-header,
.route-dental .journey-card-header {
  border-bottom: 1px solid var(--flow-line-muted);
  padding-bottom: 13px;
  margin-bottom: 11px;
}
.route-arrival .journey-card-header h3,
.route-dental .journey-card-header h3 {
  color: #1c3a51 !important;
  line-height: 1.2;
}
.route-arrival .journey-item .fact-glyph,
.route-dental .journey-item .fact-glyph,
.route-arrival .journey-item .journey-fact:nth-child(2) .fact-glyph,
.route-dental .journey-item .journey-fact:nth-child(2) .fact-glyph {
  color: var(--flow-accent) !important;
  background: var(--flow-soft) !important;
}
.route-arrival .journey-item .journey-fact,
.route-dental .journey-item .journey-fact,
.route-arrival .journey-item .journey-fact:nth-child(2),
.route-dental .journey-item .journey-fact:nth-child(2) {
  background: #f9fbfd !important;
  border-color: #e3ebf2 !important;
}
.route-arrival .journey-fact strong,
.route-dental .journey-fact strong {
  color: #214358;
}
.route-arrival .journey-fact .fact-label,
.route-dental .journey-fact .fact-label {
  color: #5a7180;
}

/* Rights and explanations: remove the three competing green/blue/purple schemes. */
.route-arrival .eligibility-option .option-dot,
.route-arrival .entitlement-detail:nth-child(n) .entitlement-icon,
.route-arrival .substeps li b {
  color: var(--flow-accent) !important;
  background: var(--flow-soft) !important;
  border-color: var(--flow-line) !important;
}
.route-arrival .entitlement-primary {
  background: #f7faff;
  border-color: var(--flow-line-muted);
}
.route-arrival .entitlement-secondary {
  background: #fff;
  border-color: var(--flow-line-muted);
}
.route-arrival .mini-kicker,
.route-arrival .entitlement-primary h4,
.route-arrival .entitlement-detail h4,
.route-arrival .subsection-label { color: var(--flow-accent-deep) !important; }
.route-arrival .sidebar-inner {
  background: #f8fbff;
  border: 1px solid var(--flow-line);
}
.route-arrival .journey-sidebar nav a:nth-child(n) span {
  color: var(--flow-accent) !important;
  background: var(--flow-soft) !important;
  border: 1px solid var(--flow-line);
}
.route-arrival .sidebar-contact>span {
  background: var(--flow-soft);
  color: var(--flow-accent);
}

/* Notes: info is page-colored, exceptions have a restrained amber edge.
   No warning text is rendered in a low-contrast pastel color. */
.route-arrival .journey-advice,
.route-arrival .journey-notice.notice-mint,
.route-dental .journey-advice {
  background: var(--flow-soft) !important;
  border: 0 !important;
  border-left: 3px solid var(--flow-accent) !important;
  color: #24475f !important;
  box-shadow: none !important;
}
.route-arrival .journey-advice>svg,
.route-arrival .journey-notice.notice-mint>svg,
.route-dental .journey-advice>svg,
.route-dental .journey-advice .advice-mark,
.route-dental .journey-advice .advice-mark svg {
  color: var(--flow-accent) !important;
}
.route-arrival .journey-notice.notice-peach {
  background: #fff8ef !important;
  border: 0 !important;
  border-left: 3px solid #c17a2f !important;
  color: #71471f !important;
  box-shadow: none !important;
}
.route-arrival .journey-notice.notice-peach>svg {
  color: #a9611c !important;
}
.route-arrival .guide-endnote,
.route-dental .guide-endnote {
  color: var(--flow-accent-deep);
  background: var(--flow-soft) !important;
  border: 1px solid var(--flow-line) !important;
}
.route-arrival .guide-endnote a,
.route-dental .guide-endnote a { color: var(--flow-accent-deep); }
.route-dental .inline-phone {
  color: var(--flow-accent-deep);
  background: var(--flow-soft);
  border: 1px solid var(--flow-line);
}
.route-dental .inline-phone:hover { background: #ebe1fb; }

/* A consistent hero motif across screen sizes. */
.hero-route-arrival .page-process-meta strong {
  color: #1859a8;
  background: #edf5ff;
  border-color: #bcd7fb;
}
.hero-route-dental .page-process-meta strong {
  color: #7043a4;
  background: #f6efff;
  border-color: #ddc9f3;
}

/* On phones, preserve compact, white reading panels and clear step divisions. */
@media (max-width: 700px) {
  .route-arrival .journey-item .journey-card,
  .route-dental .journey-item .journey-card {
    border-color: #e2eaf2 !important;
    border-radius: 17px !important;
    padding: 16px 15px 17px !important;
    box-shadow: 0 3px 12px rgba(29, 51, 78, .04) !important;
  }
  .route-arrival .journey-card-header,
  .route-dental .journey-card-header {
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  /* Icon tint follows the section; don't repeat accent on every row. */
  .route-arrival .journey-item .journey-fact,
  .route-dental .journey-item .journey-fact {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #e6edf4 !important;
    border-radius: 0 !important;
  }
  .route-arrival .journey-item .journey-fact:last-child,
  .route-dental .journey-item .journey-fact:last-child { border-bottom: 0 !important; }
  .route-arrival .journey-notice,
  .route-arrival .journey-advice,
  .route-dental .journey-advice {
    border-radius: 5px 11px 11px 5px !important;
    padding: 12px 13px !important;
  }
  .route-arrival .entitlement-detail:nth-child(n) .entitlement-icon {
    color: var(--flow-accent) !important;
    background: var(--flow-soft) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card { transition: none; }
}
