/* Connect-Sekai — Dynamic Dark Theme Redesign */
/* Hypebeast / VICE / A24 Inspired */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=Noto+Sans+JP:wght@400;500;700;800&family=Noto+Naskh+Arabic:wght@400;600;700&display=swap');

/* ── Custom Properties ── */
:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a25;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #f0f0f0;
  --text-sub: #888;
  --text-muted: #555;
  --gold: #d4a843;
  --gold-light: #f0c850;
  --gold-subtle: rgba(212,168,67,.1);
  --gold-glow: rgba(212,168,67,.25);
  --emerald: #00c76a;
  --royal: #a855f7;
  --crimson: #ef4444;
  --white: #ffffff;
  --font-heading: 'Sora', 'Noto Sans JP', sans-serif;
  --font-body: 'Inter', 'Noto Sans JP', sans-serif;
  --font-arabic: 'Noto Naskh Arabic', serif;
  --max-width: 1200px;
  --radius: 4px;
  --radius-sm: 2px;
  --shadow: 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
  --shadow-glow: 0 0 20px rgba(212,168,67,.15);
  --transition: .3s ease;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-margin-top: 80px;
}

[id] { scroll-margin-top: 80px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: var(--text);
}
h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }

.section-title {
  position: relative;
  padding-bottom: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sub);
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

a { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ── RTL Support ── */
[dir="rtl"] body { font-family: var(--font-arabic); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 { font-family: var(--font-arabic); }
[dir="rtl"] .site-nav { direction: rtl; }
[dir="rtl"] .header-inner { flex-direction: row-reverse; }
[dir="rtl"] .article-back { direction: rtl; }
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { content: '\\'; }

/* ── Grid System ── */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-accent { color: var(--gold); }
.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: .5rem;
  flex-shrink: 0;
}
.logo-mark {
  display: none;
}

/* ── Nav Dot ── */
.nav-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: .3rem;
  flex-shrink: 0;
}
.nav-dot--uae { background: var(--gold); }
.nav-dot--saudi { background: var(--emerald); }
.nav-dot--brunei { background: var(--royal); }
.nav-dot--japan { background: var(--crimson); }

/* ── Desktop Nav ── */
.site-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  color: var(--text-sub);
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s var(--ease-out);
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a.active { color: var(--gold); }
.site-nav a.active::after { transform: scaleX(1); }

/* ── Language Dropdown ── */
.lang-dropdown { position: relative; }
.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: border-color var(--transition), color var(--transition);
}
.lang-dropdown-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.lang-dropdown-btn svg { transition: transform var(--transition); }
.lang-dropdown.is-open .lang-dropdown-btn svg { transform: rotate(180deg); }
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 120px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
}
.lang-dropdown.is-open .lang-dropdown-menu { display: block; }
.lang-dropdown-menu a {
  display: block;
  padding: .5rem .75rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-sub);
  transition: background var(--transition), color var(--transition);
}
.lang-dropdown-menu a:hover { background: rgba(255,255,255,.05); color: var(--text); }
.lang-dropdown-menu a.active { color: var(--gold); font-weight: 600; }

.lang-switch { display: none; }

/* ── Hamburger Menu Button ── */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; }
.mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Menu Panel ── */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 149;
  opacity: 0;
  transition: opacity var(--transition);
}
.mobile-menu-overlay.is-open { display: block; opacity: 1; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  right: 0;
  width: 280px;
  max-width: 80vw;
  height: calc(100vh - 72px);
  background: var(--surface);
  box-shadow: -4px 0 24px rgba(0,0,0,.4);
  z-index: 150;
  padding: 1.5rem;
  flex-direction: column;
  gap: .75rem;
  transform: translateX(100%);
  transition: transform var(--transition);
  overflow-y: auto;
  border-left: 1px solid var(--border);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu a {
  display: block;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-sub);
  transition: background var(--transition), color var(--transition);
}
.mobile-menu a:hover,
.mobile-menu a.active {
  background: rgba(255,255,255,.05);
  color: var(--gold);
}
.mobile-menu hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: .5rem 0;
}

/* ── Hero (Full-bleed) ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 6rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,0.2) 0%, rgba(10,10,15,0.6) 50%, rgba(10,10,15,0.95) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.04em;
  max-width: 800px;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-sub);
  max-width: 600px;
  line-height: 1.6;
}
.hero .badge {
  margin-bottom: 1rem;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: .85rem;
  color: var(--text-sub);
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 2rem;
  padding: .75rem 2rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.hero-cta:hover {
  background: var(--gold);
  color: var(--bg);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--text-sub);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  animation: scrollBounce 2s infinite;
}
.scroll-indicator svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-sub);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Country Hero (smaller) */
.hero-country {
  min-height: 50vh;
  padding: 8rem 0 4rem;
  align-items: center;
  text-align: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bg) 0%, var(--surface2) 100%);
}
.hero-country .hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-country h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero-uae { background: linear-gradient(160deg, var(--bg) 0%, #1a1508 60%, #2a2210 100%); }
.hero-saudi { background: linear-gradient(160deg, var(--bg) 0%, rgba(0,199,106,0.1) 100%); }
.hero-brunei { background: linear-gradient(160deg, var(--bg) 0%, rgba(168,85,247,0.1) 100%); }
.hero-japan { background: linear-gradient(160deg, var(--bg) 0%, rgba(239,68,68,0.1) 100%); }

/* ── Marquee Band ── */
.marquee-band {
  overflow: hidden;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  animation: marquee 20s linear infinite;
}
.marquee-track span {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--gold);
  padding: 0 2rem;
}
.marquee-dot {
  color: var(--text-muted);
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Site Summary (AIO Intro) ── */
.site-summary {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-sub);
}
.section-intro { padding: 2rem 0 0; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .35s var(--ease-out), border-color .35s ease, box-shadow .35s ease;
  content-visibility: auto;
  contain-intrinsic-size: 0 350px;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,168,67,.3);
  box-shadow: 0 0 30px rgba(212,168,67,.08);
}
.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--surface2);
  transition: transform .6s var(--ease-out);
}
.card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 1.25rem; }
.card-body h3 { margin-bottom: .5rem; font-size: 1.1rem; }
.card-body p { font-size: .9rem; color: var(--text-sub); line-height: 1.6; }
.card-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .75rem;
  font-size: .75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ── Country Cards (Home) ── */
.country-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
}
.country-card-bg {
  position: absolute;
  inset: 0;
  background: var(--surface2);
  transition: transform .6s var(--ease-out);
}
.country-card:hover .country-card-bg { transform: scale(1.05); }
.country-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(10,10,15,.8) 100%);
}
.country-card-content {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  width: 100%;
}
.country-card h3 {
  font-size: 1.3rem;
  margin-bottom: .25rem;
  font-weight: 700;
}
.country-card p {
  font-size: .85rem;
  color: var(--text-sub);
}
.country-card-more {
  display: inline-block;
  margin-top: .75rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.country-card--uae { border-left: 3px solid var(--gold); }
.country-card--saudi { border-left: 3px solid var(--emerald); }
.country-card--brunei { border-left: 3px solid var(--royal); }
.country-card--japan { border-left: 3px solid var(--crimson); }

/* Country Card Badge */
.country-card-badge {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: var(--radius);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: .75rem;
  text-transform: uppercase;
}
.country-card-badge--uae { background: rgba(212,168,67,.15); color: var(--gold); }
.country-card-badge--saudi { background: rgba(0,199,106,.15); color: var(--emerald); }
.country-card-badge--brunei { background: rgba(168,85,247,.15); color: var(--royal); }
.country-card-badge--japan { background: rgba(239,68,68,.15); color: var(--crimson); }

/* ── Magazine Layout (Featured Articles) ── */
.magazine-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 960px) {
  .magazine-grid {
    grid-template-columns: 3fr 2fr;
    grid-template-rows: auto auto;
  }
  .magazine-grid .card-feature { grid-row: 1 / 3; }
  .magazine-grid .card-feature .card-img { aspect-ratio: 16/10; }
  .magazine-grid .card-feature .card-body h3 { font-size: 1.5rem; }
}
.card-side {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  align-items: stretch;
}
.card-side .card-img {
  aspect-ratio: 1/1;
  border-radius: var(--radius) 0 0 var(--radius);
  height: 100%;
}
.card-side .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.25rem;
}
.card-side .card-body h3 { font-size: 1rem; }
.card-side .card-body p { font-size: .8rem; }
@media (max-width: 639px) {
  .card-side { grid-template-columns: 100px 1fr; }
  .card-side .card-body { padding: .75rem; }
  .card-side .card-body h3 { font-size: .9rem; }
}

/* ── More Links (Index page) ── */
.more-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.more-link {
  font-size: .8rem;
  font-weight: 600;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background var(--transition), color var(--transition);
}
.more-link:hover { background: rgba(212,168,67,.1); }
.more-link--uae { color: var(--gold); }
.more-link--saudi { color: var(--emerald); }
.more-link--brunei { color: var(--royal); }
.more-link--japan { color: var(--crimson); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.badge-uae { background: rgba(212,168,67,.15); color: var(--gold); }
.badge-saudi { background: rgba(0,199,106,.15); color: var(--emerald); }
.badge-brunei { background: rgba(168,85,247,.15); color: var(--royal); }
.badge-japan { background: rgba(239,68,68,.15); color: var(--crimson); }
.badge-genre { background: rgba(255,255,255,.08); color: var(--text-sub); }
.badge-genre-business { background: rgba(255,255,255,.08); color: var(--text-sub); }
.badge-genre-real-estate { background: rgba(212,168,67,.1); color: var(--gold); }
.badge-genre-lifestyle { background: rgba(0,199,106,.1); color: var(--emerald); }
.badge-genre-culture { background: rgba(168,85,247,.1); color: var(--royal); }
.badge-genre-technology { background: rgba(59,130,246,.12); color: #60a5fa; }
.badge-genre-entertainment { background: rgba(239,68,68,.1); color: var(--crimson); }

/* ── Sub Navigation (Regions & Genres) ── */
.sub-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.sub-nav::-webkit-scrollbar { display: none; }
.sub-nav a {
  padding: 0.45rem 1.25rem;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-sub);
  font-size: 0.8rem;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}
.sub-nav a:hover { color: var(--text); border-color: var(--border-hover); }
.sub-nav a.active,
.sub-nav a[aria-selected="true"] {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.genre-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* ── Country Overview ── */
.country-overview {
  padding-top: 2rem;
  padding-bottom: 0;
}
.country-description {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-sub);
  font-size: .95rem;
  line-height: 1.8;
}

/* ── Breadcrumb Navigation ── */
.breadcrumb {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
  font-size: .8rem;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.breadcrumb-item { display: flex; align-items: center; }
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin: 0 .5rem;
  color: var(--text-muted);
}
.breadcrumb-item a {
  color: var(--text-sub);
  transition: color var(--transition);
}
.breadcrumb-item a:hover { color: var(--gold); }
.breadcrumb-item--current span {
  color: var(--text);
  font-weight: 500;
}

/* ── Article Detail ── */
.article-back {
  display: inline-block;
  font-size: .85rem;
  margin-bottom: 1.5rem;
  color: var(--text-sub);
}
.article-back:hover { color: var(--gold); }

/* Article Hero — Full-bleed */
.article-hero {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg) 100%);
}

.article-hero-img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  background: var(--surface2);
}

/* Article Body — floating card on dark bg */
.article-content-card {
  max-width: 760px;
  margin: -4rem auto 0;
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
}

.article-header { margin-bottom: 2rem; }
.article-header h1 {
  margin-bottom: .75rem;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.2;
}
.article-meta { flex-wrap: wrap; }
.article-body {
  font-size: 1.05rem;
  line-height: 1.9;
  max-width: 760px;
  color: var(--text);
}
.article-body p { margin-bottom: 1.25rem; }
.article-body h2 { margin: 2rem 0 1rem; }
.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-sub);
}
[dir="rtl"] .article-body blockquote {
  border-left: none;
  border-right: 3px solid var(--gold);
  padding-left: 0;
  padding-right: 1.25rem;
}

/* Reading Time Badge */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .6rem;
  background: rgba(255,255,255,.06);
  border-radius: 2rem;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-sub);
  white-space: nowrap;
}
.reading-time svg { flex-shrink: 0; }

/* Article Summary Box (AIO) */
.article-summary {
  max-width: 760px;
  margin: 0 0 2.5rem;
  padding: 1.5rem 2rem;
  background: rgba(212,168,67,.05);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}
[dir="rtl"] .article-summary {
  border-left: none;
  border-right: 3px solid var(--gold);
  border-radius: var(--radius) 0 0 var(--radius);
}
.article-summary-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--gold);
}
.article-summary p {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text-sub);
  margin: 0;
}

/* ── Social Share — Fixed Sidebar ── */
.share-buttons {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  font-size: .8rem;
  font-weight: 500;
  color: var(--white);
  transition: opacity var(--transition), transform var(--transition);
}
.share-btn:hover {
  opacity: .85;
  transform: translateY(-2px);
  color: var(--white);
}
.share-btn--x { background: #fff; color: #000 !important; }
.share-btn--x:hover { color: #000 !important; }
.share-btn--fb { background: #1877F2; }
.share-btn--line { background: #06C755; }

/* ── Related Articles ── */
.related-articles {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.related-articles .section-title { margin-bottom: 1.5rem; }

/* ── SNS Preview & Tags ── */
.sns-preview {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.sns-preview h3 { font-size: 1rem; margin-bottom: .75rem; color: var(--text-sub); }
.sns-preview p { font-size: .9rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tag {
  display: inline-block;
  padding: .2rem .65rem;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  color: var(--text-sub);
  font-weight: 500;
}
.source-link { margin-top: 1.5rem; font-size: .875rem; }
.source-link a { color: var(--gold); font-weight: 500; }

/* ── FAQ Section (AIO Accordion) ── */
.faq-section { padding-bottom: 3rem; }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  gap: 1rem;
}
[dir="rtl"] .faq-question { text-align: right; }
.faq-question:hover { color: var(--gold); }
.faq-question:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.faq-icon {
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-sub);
}
.faq-item.is-open .faq-icon { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0;
}
.faq-item.is-open .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
}
.faq-answer p {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text-sub);
}

/* ── Sections ── */
.section { padding: 5rem 0; }
.section--tight { padding: 2rem 0; }
.section-title { margin-bottom: 2rem; }
.placeholder { text-align: center; padding: 3rem 1rem; color: var(--text-sub); font-size: .95rem; }

/* ── Scroll Fade-in ── */
.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.scroll-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .scroll-fade { opacity: 1; transform: none; transition: none; }
}

/* ── Text Reveal Animation ── */
.text-reveal {
  overflow: hidden;
}
.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform .6s var(--ease-out);
}
.text-reveal.is-visible span {
  transform: translateY(0);
}

/* ── Footer ── */
.site-footer {
  position: relative;
  padding: 4rem 0 2rem;
  margin-top: 0;
  font-size: .8rem;
  color: var(--text-sub);
  background: var(--surface);
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
  }
}
.footer-col-title {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--text-sub);
  margin-bottom: .75rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .5rem;
}
.footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-desc {
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text-sub);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-links a { color: var(--text-muted); font-size: .85rem; }
.footer-links a:hover { color: var(--gold); }
.footer-social {
  display: flex;
  gap: .75rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--text-sub);
  transition: background var(--transition), color var(--transition);
}
.footer-social a:hover {
  background: var(--gold);
  color: var(--bg);
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.footer-powered {
  margin-top: .5rem;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Mobile ── */
@media (max-width: 639px) {
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .hero { min-height: 80vh; padding-bottom: 4rem; }
  .header-inner { gap: .5rem; }
  .site-nav { gap: .5rem; font-size: .7rem; }
  .site-nav:not(.lang-switch):not(.lang-dropdown) { display: none; }
  .lang-switch { display: none; }
  .lang-dropdown { display: none; }
  .mobile-menu-btn { display: flex; }
  .mobile-menu { display: flex; }
  .section { padding: 3rem 0; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .country-card { min-height: 160px; }
  .more-links { gap: 1rem; }
  .share-buttons { gap: .5rem; }
  .share-btn span { display: none; }
  .article-summary { padding: 1.25rem; }
  .faq-question { font-size: .95rem; padding: 1rem 0; }
  .marquee-track span { font-size: .8rem; }
  .article-content-card { padding: 1.5rem; margin-top: -2rem; }
  .hero-country { min-height: 40vh; padding: 6rem 0 3rem; }
}

/* Tablet adjustments */
@media (min-width: 640px) and (max-width: 959px) {
  .mobile-menu-btn { display: none; }
  .mobile-menu { display: none !important; }
  .mobile-menu-overlay { display: none !important; }
  .lang-dropdown { display: block; }
}

/* Desktop */
@media (min-width: 960px) {
  .mobile-menu-btn { display: none; }
  .mobile-menu { display: none !important; }
  .mobile-menu-overlay { display: none !important; }
  .lang-dropdown { display: block; }
}

/* ── Web Vitals ── */
.card, .faq-item, .related-articles {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

/* ── Print Styles ── */
@media print {
  *, *::before, *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  body { font-size: 12pt; line-height: 1.5; background: #fff !important; }
  .site-header, .site-footer, .mobile-menu, .mobile-menu-btn,
  .mobile-menu-overlay, .share-buttons, .sub-nav, .genre-nav,
  .more-links, .sns-preview, .source-link, .marquee-band,
  .scroll-indicator, .newsletter-bar, .newsletter-section,
  .newsletter-cta, .whatsapp-btn {
    display: none !important;
  }
  .hero { min-height: auto; padding: 1rem 0; }
  .hero h1 { font-size: 1.5rem; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  a[href]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  .logo a::after, .breadcrumb a::after, nav a::after { content: none; }
  .article-body { max-width: none; font-size: 11pt; }
  .article-summary { border: 1px solid #ccc; padding: 1rem; }
  .breadcrumb { background: none; border-bottom: 1px solid #ccc; }
}

/* ============================================= */
/* ── Newsletter Subscription Components ──      */
/* ============================================= */

.newsletter-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(10,10,15,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: .75rem 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.3);
}
.newsletter-bar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-bar-text {
  color: var(--text-sub);
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
}
.newsletter-bar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 .25rem;
  line-height: 1;
  transition: color var(--transition);
  flex-shrink: 0;
}
.newsletter-bar-close:hover { color: var(--text); }

/* Subscribe Form (shared) */
.subscribe-form {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.subscribe-input {
  padding: .55rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  font-family: var(--font-body);
  background: rgba(255,255,255,.06);
  color: var(--text);
  min-width: 200px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.subscribe-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,.15);
  background: rgba(255,255,255,.1);
}
.subscribe-input::placeholder { color: var(--text-muted); }
.subscribe-btn {
  padding: .55rem 1.25rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition);
}
.subscribe-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,168,67,.3);
}
.subscribe-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Bar form override */
.subscribe-form--bar .subscribe-input {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.1);
}
.subscribe-form--bar .subscribe-input::placeholder { color: var(--text-muted); }
.subscribe-form--bar .subscribe-input:focus {
  background: rgba(255,255,255,.12);
  border-color: var(--gold);
}

/* Newsletter Section (Homepage) */
.newsletter-section { padding: 2rem 0; }
.newsletter-section-inner {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.newsletter-section-title {
  font-size: 1.6rem;
  margin-bottom: .75rem;
  color: var(--text);
  font-family: var(--font-heading);
}
.newsletter-section-desc {
  color: var(--text-sub);
  font-size: .95rem;
  margin-bottom: 1.5rem;
}
.newsletter-section-form-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.subscribe-form--section {
  max-width: 480px;
  width: 100%;
}
.subscribe-form--section .subscribe-input { flex: 1; }
.newsletter-section-or {
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 1rem;
}

/* Newsletter CTA (Article page) */
.newsletter-cta {
  max-width: 760px;
  margin: 2.5rem 0;
  padding: 1.75rem 2rem;
  background: rgba(212,168,67,.05);
  border: 1px solid rgba(212,168,67,.15);
  border-radius: var(--radius);
  text-align: center;
}
.newsletter-cta-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.subscribe-form--cta {
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}
.subscribe-form--cta .subscribe-input { flex: 1; }

/* WhatsApp Button */
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.5rem;
  background: #25D366;
  color: #fff !important;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.whatsapp-btn:hover {
  background: #1da851;
  transform: translateY(-1px);
  color: #fff;
}
.whatsapp-btn--small {
  padding: .45rem .75rem;
  font-size: .8rem;
  gap: .35rem;
}
.whatsapp-btn--small span { display: none; }
@media (min-width: 640px) {
  .whatsapp-btn--small span { display: inline; }
}

/* Subscribe Feedback Messages */
.subscribe-message { font-size: .8rem; margin-top: .5rem; text-align: center; min-height: 1.2em; }
.subscribe-success { color: var(--emerald); }
.subscribe-error { color: var(--crimson); }

/* Newsletter Bar Mobile */
@media (max-width: 639px) {
  .newsletter-bar { padding: .5rem 0; }
  .newsletter-bar-inner { gap: .5rem; }
  .newsletter-bar-text { font-size: .75rem; width: 100%; text-align: center; }
  .subscribe-form--bar { width: 100%; justify-content: center; }
  .subscribe-form--bar .subscribe-input { min-width: 0; flex: 1; }
  .newsletter-section-inner { padding: 2rem 1.25rem; }
  .newsletter-section-title { font-size: 1.3rem; }
  .subscribe-form--section { flex-direction: column; }
  .subscribe-form--cta { flex-direction: column; }
  .newsletter-cta { padding: 1.25rem; }
  body { padding-bottom: 110px; }
}
@media (min-width: 640px) {
  body { padding-bottom: 60px; }
}

@media print {
  .newsletter-bar, .newsletter-section, .newsletter-cta, .whatsapp-btn {
    display: none !important;
  }
}

/* ============================================= */
/* ── Interactive Tools — Dark Edition       ──   */
/* ============================================= */

@keyframes toolFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toolSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Tool Cards (Index & Homepage) */
.tools-grid { margin-top: .5rem; }
.tool-card {
  text-align: center;
  padding: 2.75rem 2rem 2.25rem;
  position: relative;
  overflow: hidden;
  border-top: none;
  transition: transform .35s var(--ease-out), box-shadow .35s ease, border-color .35s ease;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: height .35s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,168,67,.3);
  box-shadow: 0 0 30px rgba(212,168,67,.08);
}
.tool-card:hover::before { height: 3px; }

.tool-card--tax::before   { background: linear-gradient(90deg, #ef4444, #f87171); }
.tool-card--visa::before  { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.tool-card--realestate::before { background: linear-gradient(90deg, var(--emerald), #34d399); }
.tool-card--cost::before  { background: linear-gradient(90deg, var(--royal), #c084fc); }

.tool-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
  background: rgba(212,168,67,.08);
  color: var(--gold);
}
.tool-card--tax .tool-card-icon   { background: rgba(239,68,68,.1); color: var(--crimson); }
.tool-card--realestate .tool-card-icon { background: rgba(0,199,106,.1); color: var(--emerald); }
.tool-card--cost .tool-card-icon  { background: rgba(168,85,247,.1); color: var(--royal); }

.tool-card-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}
.tool-card h2, .tool-card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.tool-card p { font-size: .88rem; color: var(--text-sub); line-height: 1.65; min-height: 2.8em; }
.tool-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.5rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: gap .3s ease;
}
.tool-card:hover .tool-card-cta { gap: .7rem; }

/* Tool Layout */
.tool-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 3rem;
  align-items: start;
}
.tool-layout--wide { grid-template-columns: 340px 1fr; }

/* Tool Form Panel */
.tool-form-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  position: sticky;
  top: 88px;
}
.tool-form-panel--compact { padding: 1.75rem; }
.tool-form-title {
  font-size: 1.15rem;
  margin-bottom: 1.75rem;
  padding-bottom: .85rem;
  position: relative;
}
.tool-form-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.tool-form { display: flex; flex-direction: column; gap: 1.15rem; }
.tool-field { display: flex; flex-direction: column; gap: .4rem; }
.tool-field label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.tool-input, .tool-select {
  padding: .7rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--font-body);
  background: rgba(255,255,255,.04);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tool-input:hover, .tool-select:hover { border-color: var(--border-hover); }
.tool-input:focus, .tool-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,.1);
  background: rgba(255,255,255,.06);
}
.tool-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.25rem;
}

.tool-btn {
  margin-top: .75rem;
  padding: .85rem 1.75rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  letter-spacing: .02em;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 2px 12px rgba(212,168,67,.25);
}
.tool-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212,168,67,.4);
}
.tool-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(212,168,67,.2);
}

/* Tool Results Panel */
.tool-results-panel {
  min-width: 0;
  animation: toolFadeUp .5s ease both;
}
.tool-results-panel h3 {
  font-size: 1.05rem;
  margin: 2.25rem 0 1.15rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.tool-results-panel h3::before {
  content: '';
  display: inline-block;
  width: 3px; height: 18px;
  background: linear-gradient(180deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  flex-shrink: 0;
}
.tool-results-panel h3:first-of-type { margin-top: 0; }

/* Bar Chart */
.cs-bar-chart { display: flex; flex-direction: column; gap: .85rem; }
.cs-bar-chart--grouped { gap: 1.5rem; }
.cs-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: .65rem;
  animation: toolSlideIn .4s ease both;
}
.cs-bar-row:nth-child(2) { animation-delay: .05s; }
.cs-bar-row:nth-child(3) { animation-delay: .1s; }
.cs-bar-row:nth-child(4) { animation-delay: .15s; }
.cs-bar-row--grouped {
  grid-template-columns: 1fr auto;
  padding-left: 108px;
}
.cs-bar-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-bar-track {
  height: 32px;
  background: rgba(255,255,255,.04);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.cs-bar-fill {
  height: 100%;
  border-radius: var(--radius);
  transition: width .8s cubic-bezier(.25,.8,.25,1);
  min-width: 3px;
}
.cs-bar-fill[style*="--gold"],
.cs-bar-fill[style*="#C9A84C"],
.cs-bar-fill[style*="var(--gold)"] {
  background: linear-gradient(90deg, var(--gold), var(--gold-light)) !important;
}
.cs-bar-fill[style*="--emerald"],
.cs-bar-fill[style*="#1A6B4F"],
.cs-bar-fill[style*="var(--emerald)"] {
  background: linear-gradient(90deg, #00a858, var(--emerald)) !important;
}
.cs-bar-fill[style*="#BC002D"] {
  background: linear-gradient(90deg, #dc2626, var(--crimson)) !important;
}
.cs-bar-value {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 85px;
}
.cs-bar-sub {
  grid-column: 1 / -1;
  font-size: .75rem;
  color: var(--text-sub);
  margin-top: -.3rem;
  padding-left: 108px;
}
.cs-bar-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.cs-bar-group:last-child { border-bottom: none; }
.cs-bar-group > .cs-bar-label { font-size: .92rem; font-weight: 700; margin-bottom: .2rem; }
.cs-bar-legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.cs-bar-legend-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}
.cs-bar-legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-sm);
}

/* Highlight Box */
.cs-highlight {
  background: rgba(212,168,67,.06);
  border: 1px solid rgba(212,168,67,.15);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}
.cs-highlight-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}
.cs-highlight-sub {
  font-size: .85rem;
  color: var(--text-sub);
  margin-top: .4rem;
  line-height: 1.5;
}

/* Tool Table */
.tool-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tool-table th, .tool-table td {
  padding: .75rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.tool-table th {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(255,255,255,.03);
  color: var(--text-sub);
}
.tool-table td:first-child, .tool-table th:first-child { text-align: left; font-weight: 600; }
.tool-table tbody tr { transition: background .15s ease; }
.tool-table tbody tr:hover { background: rgba(212,168,67,.04); }
.tool-table tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
.tool-table tbody tr:nth-child(even):hover { background: rgba(212,168,67,.05); }
.tool-table-total td {
  font-weight: 700;
  border-top: 2px solid var(--border-hover);
  background: rgba(255,255,255,.02);
}
.tool-table-highlight td {
  font-weight: 700;
  color: var(--gold);
  background: rgba(212,168,67,.06);
}
.text-positive { color: var(--emerald); font-weight: 700; }
.text-negative { color: var(--crimson); font-weight: 700; }

/* KPI Grid */
.tool-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.tool-kpi {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.35rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.tool-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.tool-kpi:nth-child(2)::before { background: linear-gradient(90deg, var(--emerald), #34d399); }
.tool-kpi:nth-child(3)::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.tool-kpi:nth-child(4)::before { background: linear-gradient(90deg, var(--royal), #c084fc); }
.tool-kpi-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-sub);
  margin-bottom: .5rem;
}
.tool-kpi-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

/* Visa Cards */
.visa-card {
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color .3s ease, transform .3s ease;
}
.visa-card:hover {
  border-color: rgba(212,168,67,.2);
  transform: translateY(-2px);
}
.visa-card-header {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.visa-card-header h3 { font-size: 1.15rem; margin: .35rem 0 .25rem; }
.visa-card-country {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .2rem .65rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  background: rgba(255,255,255,.04);
  color: var(--text-sub);
}
.visa-card-duration { font-size: .82rem; color: var(--text-sub); }
.visa-checklist {
  list-style: none;
  padding: .75rem 1.75rem 1rem;
}
.visa-checklist li {
  padding: .65rem 0 .65rem 2rem;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
  position: relative;
}
.visa-checklist li:last-child { border-bottom: none; }
.visa-check-icon {
  position: absolute;
  left: 0; top: .65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
}
.visa-check-pass .visa-check-icon { background: rgba(0,199,106,.1); color: var(--emerald); }
.visa-check-fail .visa-check-icon { background: rgba(239,68,68,.1); color: var(--crimson); }
.visa-status {
  padding: .85rem 1.75rem;
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.visa-status--eligible {
  background: rgba(0,199,106,.08);
  color: var(--emerald);
}
.visa-status--ineligible {
  background: rgba(239,68,68,.06);
  color: var(--crimson);
}

/* Presets */
.tool-presets {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tool-presets-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.tool-preset-btn {
  padding: .45rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: transparent;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-sub);
  cursor: pointer;
  transition: all .2s ease;
}
.tool-preset-btn:hover {
  background: rgba(212,168,67,.08);
  border-color: var(--gold);
  color: var(--gold);
}

/* Tier Buttons */
.tool-tier-btns {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.5rem;
}
.tool-tier-btn {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: all .25s ease;
}
.tool-tier-btn::before {
  content: '';
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 2px solid var(--border-hover);
  border-radius: 50%;
  transition: all .25s ease;
}
.tool-tier-btn:hover {
  border-color: rgba(212,168,67,.3);
  background: rgba(212,168,67,.03);
}
.tool-tier-btn.active {
  border-color: var(--gold);
  background: rgba(212,168,67,.06);
}
.tool-tier-btn.active::before {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.tool-tier-content { display: flex; flex-direction: column; }
.tool-tier-name { font-size: .95rem; font-weight: 700; color: var(--text); }
.tool-tier-desc { font-size: .78rem; color: var(--text-sub); margin-top: .1rem; }

/* Disclaimer */
.tool-disclaimer {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem 1.75rem;
  background: rgba(255,255,255,.02);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Tool Responsive */
@media (max-width: 639px) {
  .tool-layout, .tool-layout--wide {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .tool-form-panel { position: static; padding: 1.5rem; }
  .tool-card { padding: 2rem 1.25rem; }
  .tool-card-icon { width: 48px; height: 48px; font-size: 1.5rem; }
  .cs-bar-row {
    grid-template-columns: 72px 1fr auto;
    gap: .4rem;
  }
  .cs-bar-row--grouped { padding-left: 0; grid-template-columns: 1fr auto; }
  .cs-bar-sub { padding-left: 0; }
  .cs-bar-label { font-size: .78rem; }
  .cs-bar-value { font-size: .75rem; min-width: 60px; }
  .cs-bar-track { height: 26px; }
  .tool-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .tool-kpi { padding: 1rem .75rem; }
  .tool-kpi-value { font-size: 1.15rem; }
  .tool-table { font-size: .75rem; }
  .tool-table th, .tool-table td { padding: .5rem .6rem; }
  .cs-highlight { padding: 1.25rem; }
  .cs-highlight-value { font-size: 1.25rem; }
  .visa-card-header { padding: 1.25rem; }
  .visa-checklist { padding: .75rem 1.25rem 1rem; }
  .visa-checklist li { padding-left: 1.75rem; }
}

@media (min-width: 640px) and (max-width: 959px) {
  .tool-layout, .tool-layout--wide { grid-template-columns: 1fr; }
  .tool-form-panel { position: static; }
  .tool-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

@media print {
  .tool-form-panel, .tool-presets, .tool-tier-btns, .tool-btn {
    display: none !important;
  }
}
