:root {
  color-scheme: light;
  --font-sans: 'Inter', 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --tracking-normal: -0.01em;
  --background: 0 0% 100%;
  --background-accent: 217 91% 97%;
  --foreground: 240 10% 12%;
  --muted: 240 8% 40%;
  --muted-foreground: 240 6% 45%;
  --border: 240 6% 90%;
  --border-strong: 240 6% 84%;
  --card: 240 5% 98%;
  --card-foreground: 240 10% 12%;
  --card-border: 240 6% 92%;
  --surface-contrast: 240 6% 96%;
  --primary: 217 91% 60%;
  --primary-strong: 221 66% 35%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 8% 90%;
  --secondary-foreground: 240 10% 22%;
  --accent: 217 91% 60%;
  --accent-soft: 217 91% 60% / 0.18;
  --danger: 0 75% 55%;
  --ring: 217 91% 60%;
  --radius-xl: 44px;
  --radius-lg: 30px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-2xs: 0 1px 2px hsl(240 10% 10% / 0.05);
  --shadow-xs: 0 1px 2px hsl(240 10% 10% / 0.08);
  --shadow-sm: 0 1px 3px hsl(240 10% 10% / 0.08), 0 1px 2px -1px hsl(240 10% 10% / 0.06);
  --shadow-md: 0 12px 28px hsl(240 10% 10% / 0.08), 0 4px 12px -2px hsl(240 10% 10% / 0.04);
  --shadow-lg: 0 24px 50px hsl(240 10% 10% / 0.12);
  --page-width: 1184px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: 240 10% 7%;
    --background-accent: 240 8% 12%;
    --foreground: 0 0% 92%;
    --muted: 240 5% 65%;
    --muted-foreground: 240 4% 58%;
    --border: 240 8% 18%;
    --border-strong: 240 8% 24%;
    --card: 240 8% 11%;
    --card-foreground: 0 0% 92%;
    --card-border: 240 7% 20%;
    --surface-contrast: 240 8% 16%;
    --secondary: 240 8% 20%;
    --secondary-foreground: 0 0% 90%;
    --shadow-lg: 0 30px 55px hsl(0 0% 0% / 0.45);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  letter-spacing: var(--tracking-normal);
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  background-image: radial-gradient(circle at 12% 15%, hsl(var(--accent) / 0.08), transparent 58%),
    linear-gradient(180deg, hsl(var(--background)) 0%, hsl(var(--background-accent)) 70%);
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  padding: clamp(24px, 4vw, 48px) 0;
}

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

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

.page {
  width: min(var(--page-width), 100%);
  padding: clamp(32px, 6vw, 64px) clamp(16px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
}

.content {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 40px);
}

.header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(32px, 6vw, 60px);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--surface-contrast)) 60%);
  border: 1px solid hsl(var(--card-border));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.header::before,
.header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.7;
}

.header::before {
  inset: -120px auto auto -80px;
  width: clamp(260px, 38vw, 420px);
  height: clamp(260px, 38vw, 420px);
  background: radial-gradient(circle, hsl(var(--accent) / 0.35), transparent 65%);
}

.header::after {
  inset: auto -140px -140px auto;
  width: clamp(260px, 40vw, 440px);
  height: clamp(260px, 40vw, 440px);
  background: radial-gradient(circle, hsl(var(--primary-strong) / 0.35), transparent 70%);
}

.header-top,
.header-text,
.cta-strip,
.primary-selector,
.filters,
.summary,
.visualization,
.data-table {
  position: relative;
  z-index: 1;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 32px);
  flex-wrap: wrap;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}

.logo-mark {
  width: clamp(48px, 6vw, 64px);
  height: clamp(48px, 6vw, 64px);
  filter: drop-shadow(0 12px 30px hsl(var(--accent) / 0.35));
}

.logo-wordmark {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logo-subtitle {
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: hsl(var(--muted));
}

.language-control select {
  appearance: none;
  border-radius: var(--radius-sm);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface-contrast))
    url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(63,72,96,.8)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  padding: 10px 36px 10px 14px;
  font-size: 0.95rem;
  color: hsl(var(--foreground));
  min-width: 160px;
  cursor: pointer;
  box-shadow: var(--shadow-2xs);
}

.language-control select:focus-visible {
  outline: 2px solid hsl(var(--ring) / 0.35);
  box-shadow: 0 0 0 4px hsl(var(--accent-soft));
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: clamp(320px, 60vw, 680px);
}

.header-text h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.15;
}

.tagline {
  margin: 0;
  color: hsl(var(--muted));
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-strong)) 120%);
  color: hsl(var(--primary-foreground));
  box-shadow: 0 16px 32px hsl(var(--accent) / 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px hsl(var(--accent) / 0.4);
}

.btn.secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
  box-shadow: var(--shadow-xs);
}

.btn.secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring) / 0.4);
  outline-offset: 3px;
}

.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, hsl(var(--surface-contrast)) 0%, hsl(var(--card)) 100%);
  border: 1px solid hsl(var(--card-border));
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
}

.cta-strip span {
  max-width: 720px;
  line-height: 1.5;
}

.cta-strip a {
  color: hsl(var(--primary-strong));
  font-weight: 600;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid hsl(var(--ring));
  background: hsl(var(--accent-soft));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.cta-strip a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px hsl(var(--accent) / 0.35);
}

.surface-card {
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--surface-contrast)) 120%);
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--card-border));
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.primary-selector,
.filters,
.summary,
.visualization,
.data-table {
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--surface-contrast)) 120%);
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--card-border));
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.primary-helper {
  margin: 0;
  color: hsl(var(--muted));
}

.filters {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: hsl(var(--muted));
}

.filter-select,
.filter-input {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface-contrast));
  color: hsl(var(--foreground));
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 4px hsl(var(--accent-soft));
}

.filter-select:disabled,
.filter-input:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.filter-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.search-group {
  grid-column: 1 / -1;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.section-heading p {
  margin: 0;
  color: hsl(var(--muted));
  max-width: 640px;
}

.summary-industry {
  color: hsl(var(--primary-strong));
  margin-left: 8px;
  font-weight: 600;
}

.summary-grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.summary-card,
.tactic-card {
  border-radius: 22px;
  padding: 22px;
  border: 1px solid hsl(var(--border));
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--surface-contrast)) 120%);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-card.primary {
  background: linear-gradient(140deg, hsl(var(--primary-strong)) 0%, hsl(var(--primary)) 110%);
  border-color: hsl(var(--primary) / 0.4);
  color: white;
}

.summary-label {
  color: hsl(var(--muted));
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.summary-value {
  font-size: 2rem;
  font-weight: 600;
}

.summary-context,
.summary-description,
.metric-note,
.tactic-meta {
  margin: 0;
  color: hsl(var(--muted));
  font-size: 0.85rem;
}

.tactic-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tactic-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: hsl(var(--accent-soft));
  color: hsl(var(--primary-strong));
  font-size: 1.5rem;
}

.metric-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.metric-name {
  font-weight: 600;
}

.metric-value {
  font-size: 1.2rem;
  font-weight: 600;
}

.visualization {
  min-height: 360px;
}

.visualization-inner {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visualization canvas {
  flex: 1;
  max-height: 420px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid hsl(var(--border));
}

.table-wrapper::-webkit-scrollbar {
  height: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: hsl(var(--border-strong));
  border-radius: 999px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: hsl(var(--card));
}

thead {
  background: linear-gradient(180deg, hsl(var(--accent) / 0.1), transparent);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: hsl(var(--muted));
}

tbody tr:hover {
  background: hsl(var(--accent-soft));
}

.numeric {
  text-align: right;
}

.sticky {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--surface-contrast)) 140%);
  padding: clamp(24px, 3.5vw, 36px);
  margin: clamp(-24px, -3.5vw, -36px);
  margin-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 1px solid hsl(var(--border));
  backdrop-filter: blur(14px);
  z-index: 2;
}

.empty-state {
  background: linear-gradient(150deg, hsl(var(--card)) 0%, hsl(var(--surface-contrast)) 80%);
  border: 1px dashed hsl(var(--accent) / 0.4);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  text-align: center;
  color: hsl(var(--muted));
  box-shadow: var(--shadow-sm);
}

.empty-state h2 {
  margin: 0 0 8px;
  color: hsl(var(--foreground));
  font-size: clamp(1.4rem, 2vw, 1.7rem);
}

.empty-state.sub {
  border-style: solid;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hidden {
  display: none !important;
}

.footer {
  margin-top: 12px;
  padding: 32px 0 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: hsl(var(--muted));
  font-size: 0.9rem;
}

.footer-logo {
  width: clamp(140px, 18vw, 200px);
  filter: drop-shadow(0 12px 30px hsl(var(--accent) / 0.3));
}

.footer-highlight {
  color: hsl(var(--primary-strong));
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: hsl(var(--primary-strong));
  outline: 2px solid hsl(var(--ring) / 0.3);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .header {
    padding: clamp(28px, 6vw, 44px);
  }
}

@media (max-width: 768px) {
  .page {
    padding: 32px 18px;
  }

  .header-top {
    justify-content: flex-start;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    flex: 1;
  }

  .cta-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  table {
    min-width: auto;
  }
}
