:root {
      color-scheme: light;
      --color-canvas: 247 248 252;
      --color-paper: 255 255 255;
      --color-ink: 16 24 40;
      --color-muted: 102 112 133;
      --color-line: 228 231 236;
      --color-indigo: 61 75 216;
      --color-indigo-dark: 39 55 184;
      --color-indigo-soft: 238 240 255;
      --color-emerald: 15 159 116;
      --color-emerald-soft: 234 251 245;
      --color-amber: 232 154 34;
      --color-amber-soft: 255 247 232;
      --color-rose-soft: 255 241 243;
      --page-glow-indigo: 61 75 216;
      --page-glow-emerald: 15 159 116;
      --glass-alpha: 0.80;
    }

    html.dark {
      color-scheme: dark;
      --color-canvas: 8 12 21;
      --color-paper: 16 23 36;
      --color-ink: 238 242 248;
      --color-muted: 151 163 184;
      --color-line: 43 53 70;
      --color-indigo: 129 140 248;
      --color-indigo-dark: 99 102 241;
      --color-indigo-soft: 31 38 70;
      --color-emerald: 52 211 153;
      --color-emerald-soft: 12 49 43;
      --color-amber: 251 191 36;
      --color-amber-soft: 66 45 12;
      --color-rose-soft: 70 28 43;
      --page-glow-indigo: 99 102 241;
      --page-glow-emerald: 16 185 129;
      --glass-alpha: 0.86;
    }

    html {
      scroll-padding-top: 88px;
    }

    body {
      background:
        radial-gradient(circle at 6% 4%, rgb(var(--page-glow-indigo) / 0.11), transparent 30rem),
        radial-gradient(circle at 96% 14%, rgb(var(--page-glow-emerald) / 0.10), transparent 26rem),
        rgb(var(--color-canvas));
      transition: background-color 220ms ease, color 220ms ease;
    }

    html.dark body {
      background:
        radial-gradient(circle at 6% 4%, rgb(var(--page-glow-indigo) / 0.16), transparent 32rem),
        radial-gradient(circle at 96% 14%, rgb(var(--page-glow-emerald) / 0.10), transparent 28rem),
        rgb(var(--color-canvas));
    }

    ::selection {
      background: #3D4BD8;
      color: #fff;
    }

    .hero-grid {
      background-image:
        linear-gradient(to right, rgb(var(--color-indigo) / 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(var(--color-indigo) / 0.055) 1px, transparent 1px);
      background-size: 28px 28px;
      mask-image: linear-gradient(to bottom, black, transparent 92%);
    }

    html.dark .hero-grid {
      background-image:
        linear-gradient(to right, rgb(var(--color-indigo) / 0.075) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(var(--color-indigo) / 0.075) 1px, transparent 1px);
    }

    .glass {
      background: rgb(var(--color-paper) / var(--glass-alpha));
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }

    .country-card {
      transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease,
        background-color 220ms ease;
    }

    .country-card:hover {
      transform: translateY(-6px);
      box-shadow: 0 22px 58px rgba(61, 75, 216, 0.14);
      border-color: rgba(61, 75, 216, 0.28);
    }

    .filter-chip {
      transition:
        transform 180ms ease,
        background-color 180ms ease,
        color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
    }

    .filter-chip:hover {
      transform: translateY(-1px);
    }

    .filter-chip[aria-pressed="true"] {
      color: rgb(var(--color-paper));
      background: rgb(var(--color-ink));
      border-color: rgb(var(--color-ink));
      box-shadow: 0 8px 22px rgb(16 24 40 / 0.12);
    }

    html.dark .filter-chip[aria-pressed="true"] {
      color: #FFFFFF;
      background: rgb(var(--color-indigo-dark));
      border-color: rgb(var(--color-indigo));
      box-shadow: 0 8px 24px rgb(var(--color-indigo) / 0.20);
    }

    .compare-toggle[aria-pressed="true"] {
      color: white;
      background: #3D4BD8;
      border-color: #3D4BD8;
    }

    .search-highlight {
      background: linear-gradient(90deg, rgba(61, 75, 216, 0.14), rgba(15, 159, 116, 0.10));
    }

    .fade-up {
      opacity: 0;
      transform: translateY(18px);
      transition: opacity 600ms ease, transform 600ms ease;
    }

    .fade-up.visible {
      opacity: 1;
      transform: translateY(0);
    }

    .modal-backdrop {
      background: rgba(16, 24, 40, 0.52);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

    .drawer-enter {
      animation: drawerIn 240ms ease-out both;
    }

    @keyframes drawerIn {
      from {
        transform: translateY(100%);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .filter-drawer-enter {
      animation: filterDrawerIn 240ms ease-out both;
    }

    @keyframes filterDrawerIn {
      from {
        transform: translateX(100%);
      }
      to {
        transform: translateX(0);
      }
    }

    .progress-ring {
      transition: stroke-dashoffset 280ms ease;
      transform: rotate(-90deg);
      transform-origin: 50% 50%;
    }


    .jvm-tooltip {
      max-width: 280px;
      border: 1px solid rgba(255, 255, 255, 0.14) !important;
      border-radius: 14px !important;
      background: rgba(16, 24, 40, 0.96) !important;
      padding: 11px 13px !important;
      color: #FFFFFF !important;
      font-family: Inter, system-ui, sans-serif !important;
      font-size: 12px !important;
      font-weight: 600 !important;
      line-height: 1.45 !important;
      box-shadow: 0 18px 45px rgba(16, 24, 40, 0.25) !important;
    }




    .profile-tab[aria-selected="true"] {
      color: rgb(var(--color-ink));
      border-color: rgb(var(--color-indigo));
      background: rgb(var(--color-indigo-soft));
    }

    .profile-tab[aria-selected="false"]:hover {
      color: rgb(var(--color-indigo));
      background: rgb(var(--color-canvas));
    }

    .profile-enter {
      animation: profileIn 250ms ease-out both;
    }

    @keyframes profileIn {
      from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    #countryVisaMap {
      width: 100%;
      height: 520px;
    }

    #countryVisaMap .jvm-container {
      background: transparent;
    }

    #countryVisaMap .jvm-region {
      cursor: pointer;
      transition: fill 160ms ease, fill-opacity 160ms ease, stroke 160ms ease;
    }

    #countryVisaMap .jvm-region:hover {
      fill-opacity: 0.82;
      stroke: rgb(var(--color-ink));
      stroke-width: 0.7;
    }

    #countryVisaMap .jvm-zoom-btn {
      display: grid;
      width: 36px;
      height: 36px;
      place-items: center;
      border: 1px solid rgb(var(--color-line));
      border-radius: 11px;
      color: rgb(var(--color-ink));
      background: rgb(var(--color-paper) / 0.96);
      box-shadow: 0 7px 20px rgb(16 24 40 / 0.10);
      font-size: 18px;
      font-weight: 800;
    }

    html.dark #countryVisaMap .jvm-zoom-btn {
      box-shadow: 0 8px 24px rgb(0 0 0 / 0.34);
    }

    html.dark .country-card:hover {
      box-shadow: 0 24px 64px rgb(var(--color-indigo) / 0.16);
      border-color: rgb(var(--color-indigo) / 0.42);
    }

    html.dark .modal-backdrop {
      background: rgb(0 0 0 / 0.68);
    }

    html.dark .shadow-card {
      box-shadow: 0 12px 36px rgb(0 0 0 / 0.24);
    }

    .theme-icon-sun {
      display: none;
    }

    html.dark .theme-icon-sun {
      display: block;
    }

    html.dark .theme-icon-moon {
      display: none;
    }


    /* Refined typography and theme-safe surfaces */
    body {
      font-kerning: normal;
      font-feature-settings: "cv02", "cv03", "cv04", "cv11";
      text-rendering: optimizeLegibility;
    }

    .text-balance {
      text-wrap: balance;
    }

    .text-pretty {
      text-wrap: pretty;
    }

    .eyebrow-label,
    .profile-kicker,
    .cta-eyebrow {
      font-size: 0.6875rem;
      line-height: 1rem;
      font-weight: 800;
      letter-spacing: 0.115em;
      text-transform: uppercase;
    }

    .eyebrow-label {
      color: rgb(var(--color-muted));
    }

    .profile-kicker {
      color: rgb(var(--color-indigo));
    }

    .country-title {
      font-family: Manrope, Inter, system-ui, sans-serif;
      font-size: 1.45rem;
      line-height: 1.12;
      font-weight: 800;
      letter-spacing: -0.035em;
      color: rgb(var(--color-ink));
    }

    .catalog-tag {
      border: 1px solid rgb(var(--color-line) / 0.72);
      font-size: 0.6875rem;
      line-height: 1rem;
      font-weight: 700;
      letter-spacing: -0.01em;
      box-shadow: 0 1px 0 rgb(var(--color-paper) / 0.6) inset;
    }

    .metric-caption {
      font-size: 0.6875rem;
      line-height: 1rem;
      font-weight: 700;
      letter-spacing: 0.025em;
      color: rgb(var(--color-muted));
    }

    .metric-value {
      margin-top: 0.45rem;
      font-size: 0.875rem;
      line-height: 1.35rem;
      font-weight: 750;
      letter-spacing: -0.012em;
      color: rgb(var(--color-ink));
    }

    .primary-action {
      color: #FFFFFF !important;
      background: linear-gradient(135deg, #151D2E 0%, #101828 100%) !important;
      box-shadow: 0 10px 24px rgb(16 24 40 / 0.15);
      transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    }

    .primary-action:hover {
      transform: translateY(-1px);
      background: linear-gradient(135deg, #4F5DE2 0%, #3545C7 100%) !important;
      box-shadow: 0 14px 30px rgb(61 75 216 / 0.22);
    }

    .profile-heading {
      margin-top: 0.7rem;
      max-width: 52rem;
      font-family: Manrope, Inter, system-ui, sans-serif;
      font-size: clamp(2rem, 3.2vw, 3.15rem);
      line-height: 1.04;
      font-weight: 800;
      letter-spacing: -0.052em;
      color: rgb(var(--color-ink));
    }

    .profile-lead {
      margin-top: 1rem;
      max-width: 48rem;
      font-size: 0.9375rem;
      line-height: 1.8;
      color: rgb(var(--color-muted));
    }

    .roadmap-shell {
      background:
        linear-gradient(180deg, rgb(var(--color-paper)) 0%, rgb(var(--color-paper)) 58%, rgb(var(--color-canvas) / 0.55) 100%);
    }

    .roadmap-card {
      position: relative;
      overflow: hidden;
      background: rgb(var(--color-canvas) / 0.72);
      transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
    }

    .roadmap-card::before {
      position: absolute;
      inset-block: 1rem;
      left: 0;
      width: 3px;
      border-radius: 0 999px 999px 0;
      background: rgb(var(--color-line));
      content: "";
    }

    .roadmap-card:hover {
      transform: translateY(-1px);
      border-color: rgb(var(--color-indigo) / 0.30);
      background: rgb(var(--color-paper));
    }

    .roadmap-card.is-final::before {
      background: linear-gradient(180deg, rgb(var(--color-indigo)), rgb(var(--color-emerald)));
    }

    .roadmap-index {
      display: grid;
      width: 3rem;
      height: 3rem;
      flex: none;
      place-items: center;
      border: 1px solid rgb(var(--color-line));
      border-radius: 1rem;
      color: rgb(var(--color-ink));
      background: rgb(var(--color-paper));
      font-size: 0.75rem;
      font-weight: 800;
      box-shadow: 0 6px 18px rgb(16 24 40 / 0.06);
    }

    .roadmap-index.is-final {
      border-color: transparent;
      color: #FFFFFF;
      background: linear-gradient(135deg, #5C68EC, #3D4BD8);
      box-shadow: 0 10px 24px rgb(61 75 216 / 0.22);
    }

    .roadmap-title {
      font-family: Manrope, Inter, system-ui, sans-serif;
      font-size: 1.05rem;
      line-height: 1.45rem;
      font-weight: 750;
      letter-spacing: -0.018em;
      color: rgb(var(--color-ink));
    }

    .roadmap-copy {
      margin-top: 0.45rem;
      max-width: 52rem;
      font-size: 0.875rem;
      line-height: 1.65rem;
      color: rgb(var(--color-muted));
    }

    .roadmap-time {
      display: inline-flex;
      width: fit-content;
      max-width: 14.5rem;
      align-items: center;
      border: 1px solid rgb(var(--color-line));
      border-radius: 0.875rem;
      background: rgb(var(--color-paper));
      padding: 0.55rem 0.75rem;
      color: rgb(var(--color-muted));
      font-size: 0.6875rem;
      line-height: 1.15rem;
      font-weight: 700;
      text-wrap: pretty;
    }

    .roadmap-summary {
      position: relative;
      overflow: hidden;
      background:
        radial-gradient(circle at 92% 12%, rgb(var(--color-indigo) / 0.16), transparent 16rem),
        linear-gradient(135deg, rgb(var(--color-indigo-soft)), rgb(var(--color-paper)));
    }

    .editorial-cta {
      position: relative;
      isolation: isolate;
      color: #FFFFFF;
      background:
        radial-gradient(circle at 82% 0%, rgb(99 102 241 / 0.42), transparent 24rem),
        radial-gradient(circle at 32% 120%, rgb(16 185 129 / 0.28), transparent 26rem),
        linear-gradient(135deg, #111827 0%, #17213A 55%, #132A34 100%);
      border: 1px solid rgb(255 255 255 / 0.10);
      box-shadow: 0 26px 70px rgb(15 23 42 / 0.22);
    }

    .cta-eyebrow {
      color: rgb(255 255 255 / 0.58);
    }

    .cta-title {
      margin-top: 1rem;
      max-width: 50rem;
      font-family: Manrope, Inter, system-ui, sans-serif;
      font-size: clamp(2rem, 4.2vw, 4rem);
      line-height: 0.98;
      font-weight: 800;
      letter-spacing: -0.055em;
      color: #FFFFFF;
      text-wrap: balance;
    }

    .cta-copy {
      margin-top: 1.25rem;
      max-width: 43rem;
      color: rgb(255 255 255 / 0.72);
      font-size: 0.9375rem;
      line-height: 1.75rem;
      text-wrap: pretty;
    }

    .cta-button {
      color: #101828 !important;
      background: #FFFFFF !important;
      box-shadow: 0 10px 28px rgb(0 0 0 / 0.18);
    }

    .cta-button:hover {
      color: #2737B8 !important;
      background: #F8FAFC !important;
    }

    html.dark .country-card {
      background:
        linear-gradient(180deg, rgb(var(--color-paper)) 0%, rgb(12 18 30) 100%);
    }

    html.dark .catalog-tag {
      box-shadow: none;
    }

    html.dark .primary-action {
      color: #FFFFFF !important;
      background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%) !important;
      box-shadow: 0 12px 30px rgb(79 70 229 / 0.27);
    }

    html.dark .primary-action:hover {
      background: linear-gradient(135deg, #818CF8 0%, #6366F1 100%) !important;
      box-shadow: 0 16px 36px rgb(99 102 241 / 0.34);
    }

    html.dark .roadmap-shell {
      background:
        linear-gradient(180deg, rgb(var(--color-paper)) 0%, rgb(12 18 30) 100%);
    }

    html.dark .roadmap-card {
      background: rgb(8 13 23 / 0.72);
    }

    html.dark .roadmap-card:hover {
      background: rgb(18 26 42);
    }

    html.dark .roadmap-index {
      background: rgb(20 29 45);
      box-shadow: none;
    }

    html.dark .roadmap-time {
      background: rgb(12 18 30);
    }

    html.dark .roadmap-summary {
      background:
        radial-gradient(circle at 92% 12%, rgb(var(--color-indigo) / 0.22), transparent 18rem),
        linear-gradient(135deg, rgb(25 32 62), rgb(13 20 33));
    }

    html.dark .editorial-cta {
      background:
        radial-gradient(circle at 82% 0%, rgb(99 102 241 / 0.34), transparent 24rem),
        radial-gradient(circle at 28% 120%, rgb(16 185 129 / 0.20), transparent 27rem),
        linear-gradient(135deg, #101827 0%, #141E33 58%, #10262D 100%);
      border-color: rgb(129 140 248 / 0.18);
      box-shadow: 0 28px 80px rgb(0 0 0 / 0.34);
    }

    /* Safety net for legacy utility combinations that invert in dark mode. */
    html.dark .bg-ink.text-white {
      color: #FFFFFF !important;
      background-color: rgb(var(--color-indigo-dark)) !important;
    }

    html.dark .bg-white.text-ink {
      color: #101828 !important;
      background-color: #FFFFFF !important;
    }


    .soft-overlay {
      background: rgb(16 24 40 / 0.38);
    }

    html.dark .soft-overlay {
      background: rgb(0 0 0 / 0.64);
    }

    @media (max-width: 767px) {
      #countryVisaMap {
        height: 390px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
      }

      .fade-up {
        opacity: 1;
        transform: none;
      }
    }

    /* Product suite: matcher, practice and personal plan */
    .suite-card {
      border: 1px solid rgb(var(--color-line));
      border-radius: 1.35rem;
      background: rgb(var(--color-paper));
      box-shadow: 0 10px 30px rgb(16 24 40 / 0.05);
    }

    .suite-card-soft {
      border: 1px solid rgb(var(--color-line));
      border-radius: 1.15rem;
      background: rgb(var(--color-canvas) / 0.72);
    }

    .suite-input,
    .suite-select,
    .suite-textarea {
      width: 100%;
      border: 1px solid rgb(var(--color-line));
      border-radius: 0.9rem;
      color: rgb(var(--color-ink));
      background: rgb(var(--color-paper));
      outline: none;
      transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    }

    .suite-input,
    .suite-select {
      min-height: 2.85rem;
      padding: 0 0.85rem;
    }

    .suite-textarea {
      min-height: 6.5rem;
      padding: 0.8rem 0.85rem;
      resize: vertical;
    }

    .suite-input:focus,
    .suite-select:focus,
    .suite-textarea:focus {
      border-color: rgb(var(--color-indigo));
      box-shadow: 0 0 0 4px rgb(var(--color-indigo) / 0.10);
    }

    .choice-card {
      display: flex;
      min-height: 4.15rem;
      align-items: center;
      gap: 0.8rem;
      border: 1px solid rgb(var(--color-line));
      border-radius: 1rem;
      padding: 0.85rem 1rem;
      color: rgb(var(--color-ink));
      background: rgb(var(--color-paper));
      text-align: left;
      transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
    }

    .choice-card:hover {
      transform: translateY(-1px);
      border-color: rgb(var(--color-indigo) / 0.35);
    }

    .choice-card[aria-pressed="true"] {
      border-color: rgb(var(--color-indigo));
      background: rgb(var(--color-indigo-soft));
      box-shadow: 0 0 0 3px rgb(var(--color-indigo) / 0.08);
    }

    .evidence-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      border: 1px solid rgb(var(--color-line));
      border-radius: 999px;
      padding: 0.35rem 0.65rem;
      font-size: 0.68rem;
      line-height: 1rem;
      font-weight: 800;
    }

    .evidence-law {
      color: rgb(var(--color-indigo));
      background: rgb(var(--color-indigo-soft));
      border-color: rgb(var(--color-indigo) / 0.18);
    }

    .evidence-practice {
      color: rgb(var(--color-emerald));
      background: rgb(var(--color-emerald-soft));
      border-color: rgb(var(--color-emerald) / 0.18);
    }

    .evidence-unstable {
      color: rgb(var(--color-amber));
      background: rgb(var(--color-amber-soft));
      border-color: rgb(var(--color-amber) / 0.22);
    }

    .progress-track {
      height: 0.5rem;
      overflow: hidden;
      border-radius: 999px;
      background: rgb(var(--color-line));
    }

    .progress-fill {
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, rgb(var(--color-indigo)), rgb(var(--color-emerald)));
      transition: width 260ms ease;
    }

    .tool-accordion > summary {
      list-style: none;
      cursor: pointer;
    }

    .tool-accordion > summary::-webkit-details-marker {
      display: none;
    }

    .tool-accordion[open] .accordion-chevron {
      transform: rotate(180deg);
    }

    .accordion-chevron {
      transition: transform 180ms ease;
    }

    .case-metric {
      border: 1px solid rgb(var(--color-line));
      border-radius: 1rem;
      background: rgb(var(--color-canvas) / 0.68);
      padding: 1rem;
    }

    .fit-ring {
      --fit-value: 0;
      display: grid;
      width: 4.4rem;
      height: 4.4rem;
      place-items: center;
      border-radius: 50%;
      background:
        radial-gradient(circle at center, rgb(var(--color-paper)) 57%, transparent 59%),
        conic-gradient(rgb(var(--color-indigo)) calc(var(--fit-value) * 1%), rgb(var(--color-line)) 0);
    }

    .city-card {
      position: relative;
      overflow: hidden;
      border: 1px solid rgb(var(--color-line));
      border-radius: 1.15rem;
      background: rgb(var(--color-canvas) / 0.72);
    }

    .city-card::after {
      position: absolute;
      right: -2rem;
      top: -2.5rem;
      width: 8rem;
      height: 8rem;
      border-radius: 999px;
      background: rgb(var(--color-indigo) / 0.08);
      content: "";
      filter: blur(1rem);
    }

    html.dark .suite-card,
    html.dark .suite-input,
    html.dark .suite-select,
    html.dark .suite-textarea,
    html.dark .choice-card {
      background: rgb(var(--color-paper));
    }

    html.dark .suite-card-soft,
    html.dark .case-metric,
    html.dark .city-card {
      background: rgb(8 13 23 / 0.72);
    }

    html.dark .fit-ring {
      background:
        radial-gradient(circle at center, rgb(var(--color-paper)) 57%, transparent 59%),
        conic-gradient(rgb(var(--color-indigo)) calc(var(--fit-value) * 1%), rgb(var(--color-line)) 0);
    }


    /* Free product polish: following, freshness, sharing and concise mode */
    .profile-segmented {
      display: inline-flex;
      align-items: center;
      gap: 0.2rem;
      border: 1px solid rgb(var(--color-line));
      border-radius: 0.85rem;
      padding: 0.2rem;
      background: rgb(var(--color-canvas));
    }

    .profile-mode-button {
      min-height: 2.2rem;
      border-radius: 0.65rem;
      padding: 0 0.75rem;
      color: rgb(var(--color-muted));
      font-size: 0.72rem;
      font-weight: 800;
      transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
    }

    .profile-mode-button[aria-pressed="true"] {
      color: rgb(var(--color-ink));
      background: rgb(var(--color-paper));
      box-shadow: 0 4px 14px rgb(16 24 40 / 0.08);
    }

    .quality-meter {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      border: 1px solid rgb(var(--color-line));
      border-radius: 999px;
      padding: 0.35rem 0.6rem;
      background: rgb(var(--color-paper) / 0.86);
      font-size: 0.65rem;
      line-height: 1rem;
      font-weight: 800;
    }

    .quality-dot {
      width: 0.48rem;
      height: 0.48rem;
      border-radius: 999px;
      background: currentColor;
      box-shadow: 0 0 0 3px rgb(var(--color-line));
    }

    .fact-actions {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-top: 0.7rem;
    }

    .fact-action {
      display: inline-grid;
      width: 1.8rem;
      height: 1.8rem;
      place-items: center;
      border: 1px solid rgb(var(--color-line));
      border-radius: 0.55rem;
      color: rgb(var(--color-muted));
      background: rgb(var(--color-paper));
      transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
    }

    .fact-action:hover {
      transform: translateY(-1px);
      color: rgb(var(--color-indigo));
      border-color: rgb(var(--color-indigo) / 0.30);
    }

    .change-banner {
      border: 1px solid rgb(var(--color-indigo) / 0.20);
      border-radius: 1rem;
      color: rgb(var(--color-ink));
      background:
        linear-gradient(135deg, rgb(var(--color-indigo-soft)), rgb(var(--color-paper)));
    }

    .next-action-shell {
      position: relative;
      z-index: 12;
      flex-shrink: 0;
      border-top: 1px solid rgb(var(--color-line));
      background: rgb(var(--color-paper) / 0.95);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
    }

    .next-action-progress {
      width: 3.1rem;
      height: 3.1rem;
    }

    .notification-badge {
      position: absolute;
      right: -0.2rem;
      top: -0.25rem;
      display: grid;
      min-width: 1.15rem;
      height: 1.15rem;
      place-items: center;
      border: 2px solid rgb(var(--color-paper));
      border-radius: 999px;
      padding: 0 0.2rem;
      color: #FFFFFF;
      background: rgb(var(--color-amber));
      font-size: 0.58rem;
      font-weight: 900;
    }

    .notification-badge:empty,
    .notification-badge[data-count="0"] {
      display: none;
    }

    .obstacle-line {
      border-left: 3px solid rgb(var(--color-amber));
      border-radius: 0 0.85rem 0.85rem 0;
      background: rgb(var(--color-amber-soft) / 0.62);
    }

    .history-timeline {
      position: relative;
    }

    .history-timeline::before {
      position: absolute;
      left: 0.42rem;
      top: 0.65rem;
      bottom: 0.65rem;
      width: 1px;
      background: rgb(var(--color-line));
      content: "";
    }

    .history-event {
      position: relative;
      padding-left: 1.8rem;
    }

    .history-event::before {
      position: absolute;
      left: 0.12rem;
      top: 0.42rem;
      width: 0.65rem;
      height: 0.65rem;
      border: 2px solid rgb(var(--color-paper));
      border-radius: 999px;
      background: rgb(var(--color-indigo));
      box-shadow: 0 0 0 1px rgb(var(--color-indigo) / 0.22);
      content: "";
    }

    .scenario-chip[aria-pressed="true"] {
      color: #FFFFFF;
      border-color: rgb(var(--color-indigo));
      background: rgb(var(--color-indigo));
    }

    html.dark .profile-mode-button[aria-pressed="true"],
    html.dark .quality-meter,
    html.dark .fact-action {
      background: rgb(var(--color-paper));
    }

    html.dark .change-banner {
      background:
        linear-gradient(135deg, rgb(var(--color-indigo-soft)), rgb(12 18 30));
    }

    html.dark .next-action-shell {
      background: rgb(var(--color-paper) / 0.96);
    }

    @media (max-width: 767px) {
      .profile-segmented {
        display: none;
      }

      .next-action-shell .next-action-copy {
        max-width: 12rem;
      }
    }
