/* AreaConverter.in - Production Stylesheet */
:root {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-accent-subtle: #eff6ff;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: #dbeafe;
  --primary-text: #1e40af;
  --accent: #059669;
  --accent-hover: #047857;
  --accent-subtle: #d1fae5;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
}

[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #1f2937;
  --bg-subtle: #1e293b;
  --bg-accent-subtle: #172554;
  --border-color: #334155;
  --border-focus: #60a5fa;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-subtle: #1e3a8a;
  --primary-text: #93c5fd;
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-subtle: #064e3b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

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

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-logo span.highlight {
  color: var(--primary);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-subtle);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
}

.mobile-menu-btn {
  display: none;
}

/* Mobile Nav Drawer */
.mobile-nav-panel {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}

.mobile-nav-panel.open {
  display: block;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-links a {
  padding: 0.6rem 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.mobile-nav-links a:hover {
  background-color: var(--primary-subtle);
  color: var(--primary);
  text-decoration: none;
}

/* Main Content Layout */
main {
  flex: 1;
  padding: 2rem 0 4rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 2rem;
}

.badge-tag {
  display: inline-block;
  background-color: var(--primary-subtle);
  color: var(--primary-text);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h1.hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs span.separator {
  color: var(--text-muted);
}

.breadcrumbs span.current {
  color: var(--text-primary);
  font-weight: 500;
}

/* Converter Card Component */
.converter-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  max-width: 900px;
  margin: 0 auto 2.5rem;
}

.converter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.converter-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.precision-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.precision-select {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* Converter Grid */
.converter-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.converter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.converter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-wrapper {
  position: relative;
}

.converter-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.converter-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.converter-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.converter-select:focus {
  border-color: var(--border-focus);
}

/* Custom Searchable Select */
.searchable-select-wrapper {
  position: relative;
  width: 100%;
}

.searchable-select-wrapper.open {
  z-index: 1200;
}

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

.searchable-select-trigger {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  transition: all 0.15s ease;
  user-select: none;
}

.searchable-select-trigger:hover {
  border-color: var(--primary);
  background-color: var(--bg-subtle);
}

.searchable-select-wrapper.open .searchable-select-trigger,
.searchable-select-trigger:focus-visible {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.trigger-label-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.trigger-name {
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trigger-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background-color: var(--primary-subtle);
  color: var(--primary-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.trigger-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.searchable-select-wrapper.open .trigger-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Dropdown Menu Panel */
.searchable-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 320px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1));
  z-index: 1200;
  overflow: hidden;
  animation: fadeInDown 0.15s ease;
}

.searchable-select-wrapper.open-upward .searchable-select-dropdown {
  top: auto;
  bottom: calc(100% + 6px);
  animation: fadeInUp 0.15s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.searchable-select-wrapper.open .searchable-select-dropdown {
  display: flex;
  flex-direction: column;
}

/* Search Box in Header */
.dropdown-search-header {
  padding: 0.75rem 0.75rem 0.5rem;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-header-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.search-input-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.dropdown-search-input {
  width: 100%;
  padding: 0.65rem 2.2rem 0.65rem 2.25rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dropdown-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.search-count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-clear-btn {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  visibility: hidden;
  transition: background-color 0.1s ease;
}

.search-clear-btn.visible {
  visibility: visible;
}

.search-clear-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

/* Quick Filter Category Chips */
.dropdown-filter-chips {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dropdown-filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary-text);
  background-color: var(--primary-subtle);
}

.filter-chip.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Options List Container */
.dropdown-options-list {
  max-height: 310px;
  overflow-y: auto;
  padding: 0.35rem 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dropdown-options-list::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options-list::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}

.dropdown-options-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted);
}

.searchable-optgroup-title {
  padding: 0.55rem 0.85rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.searchable-option-item {
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.1s ease;
  user-select: none;
  gap: 0.75rem;
  border-left: 3px solid transparent;
}

.searchable-option-item:hover,
.searchable-option-item.highlighted {
  background-color: var(--primary-subtle);
  border-left-color: var(--primary);
}

.searchable-option-item.selected {
  background-color: var(--bg-accent-subtle);
  border-left-color: var(--primary);
}

.option-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
  flex: 1;
}

.option-header-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.option-main-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.searchable-option-item.selected .option-main-text {
  font-weight: 700;
}

.option-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.option-sub-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.search-highlight {
  background-color: rgba(245, 158, 11, 0.28);
  color: inherit;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
}

[data-theme="dark"] .search-highlight {
  background-color: rgba(245, 158, 11, 0.45);
  color: #fef08a;
}

.option-check-icon {
  color: var(--primary);
  opacity: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.searchable-option-item.selected .option-check-icon {
  opacity: 1;
}

.dropdown-no-results {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.no-results-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.no-results-suggestions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
}

.no-results-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
  margin-bottom: 0.25rem;
}

.suggestion-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  cursor: pointer;
  color: var(--primary-text);
  font-weight: 500;
  transition: all 0.15s ease;
}

.suggestion-pill:hover {
  background-color: var(--primary-subtle);
  border-color: var(--primary);
}

.converter-swap-btn {
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary);
  color: var(--primary-text);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.2s ease;
}

.converter-swap-btn:hover {
  background-color: var(--primary);
  color: #ffffff;
  transform: rotate(180deg);
}

/* Region Selector Box */
.region-selector-box {
  background-color: var(--bg-accent-subtle);
  border: 1px solid var(--primary-subtle);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.region-selector-box.hidden {
  display: none;
}

.region-selector-box.region-required-alert {
  border-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
  animation: pulseAmber 2s infinite;
}

@keyframes pulseAmber {
  0%, 100% { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25); }
  50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.45); }
}

.region-prompt-badge {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: rgba(245, 158, 11, 0.15);
  border-left: 3px solid #f59e0b;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: #b45309;
}

[data-theme="dark"] .region-prompt-badge {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.region-status-badge {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: var(--text-primary);
}

.region-label-group {
  display: flex;
  flex-direction: column;
}

.region-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-text);
}

.region-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.region-select {
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
}

.region-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Calculation Transparency Card */
.calculation-transparency-card {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.transparency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
}

.transparency-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.transparency-item .t-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.transparency-item .t-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.transparency-note {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
  background-color: var(--bg-surface);
  border-left: 3px solid var(--primary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.regional-warning-banner {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #92400e;
  background-color: #fef3c7;
  border-left: 3px solid #f59e0b;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .regional-warning-banner {
  color: #fde68a;
  background-color: rgba(245, 158, 11, 0.15);
}

.status-warning-text {
  color: #d97706;
  font-weight: 600;
}

/* Result Box */
.converter-result-box {
  background: linear-gradient(135deg, var(--bg-subtle), var(--bg-accent-subtle));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.result-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-value-display {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  word-break: break-all;
}

.result-unit-tag {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: 0.35rem;
}

.result-equation {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.result-explanation {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
}

/* Converter Actions */
.converter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  text-decoration: none;
}

.btn-success {
  background-color: var(--accent);
  color: #ffffff;
}

/* Quick Conversion Chips */
.quick-chips-section {
  max-width: 900px;
  margin: 0 auto 3rem;
}

.chips-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.chip:hover {
  background-color: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}

/* Content Sections */
.content-section {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.content-prose {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.content-prose p {
  margin-bottom: 1.25rem;
}

.content-prose h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.75rem 0 0.75rem;
}

.content-prose ul, .content-prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.content-prose li {
  margin-bottom: 0.5rem;
}

/* Notice / Callout Card */
.callout-box {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.callout-box.warning {
  border-left-color: var(--warning);
  background-color: rgba(245, 158, 11, 0.05);
}

.callout-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background-color: var(--bg-accent-subtle);
}

.data-table td.highlight {
  font-weight: 600;
  color: var(--primary);
}

/* Country Grid Cards */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.country-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.country-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  text-decoration: none;
}

.country-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.country-flag {
  font-size: 1.75rem;
}

.country-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.country-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex: 1;
}

.country-units-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.unit-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

/* Worked Examples Grid */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.example-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.example-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.example-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.example-calc {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0.75rem 0;
  line-height: 1.4;
}

.example-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.15rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-question:hover {
  background-color: var(--bg-subtle);
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
  border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
  display: block;
  border-top-color: var(--border-color);
  padding-top: 0.75rem;
}

/* AdSense Slot Placeholder */
.ad-slot-wrapper {
  margin: 2.5rem auto;
  text-align: center;
  max-width: 728px;
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.ad-box {
  min-height: 90px;
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Regional Notice & Status Badges */
.region-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background-color: var(--primary-subtle);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary-text);
  font-size: 0.85rem;
  margin-top: 0.65rem;
  line-height: 1.4;
}

.regional-warning-banner {
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #92400e;
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.84rem;
  line-height: 1.5;
  margin-top: 0.85rem;
  text-align: left;
}

[data-theme="dark"] .regional-warning-banner {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fef08a;
  border-left-color: #f59e0b;
}

/* Region-Aware Land Unit Explorer Component */
.land-unit-explorer-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
}

.explorer-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.explorer-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.explorer-control-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.explorer-select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.explorer-select:focus {
  border-color: var(--border-focus);
}

.explorer-display-panel {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.explorer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.explorer-unit-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.explorer-region-tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background-color: var(--primary);
  color: #ffffff;
}

.explorer-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.explorer-stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.explorer-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.explorer-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.explorer-stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.explorer-notes-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.explorer-notes-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.explorer-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.75rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .nav-desktop {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .converter-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .converter-swap-btn {
    margin: 0 auto;
    transform: rotate(90deg);
  }
  .converter-swap-btn:hover {
    transform: rotate(270deg);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  h1.hero-title {
    font-size: 1.85rem;
  }
}

@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .converter-card {
    padding: 1.25rem;
  }
  .converter-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .converter-actions {
    justify-content: stretch;
  }
  .converter-actions .btn {
    flex: 1;
    justify-content: center;
  }
}
