/**
 * Windows11.io — Fluent Design inspired theme
 * Mimics modern Windows 11 aesthetic: Mica, acrylic, rounded geometry, Segoe UI
 */

:root {
  --w11-accent: #0078d4;
  --w11-accent-hover: #106ebe;
  --w11-accent-soft: rgba(0, 120, 212, 0.12);
  --w11-success: #0f7b0f;
  --w11-warning: #9d5d00;
  --w11-danger: #c42b1c;
  --w11-radius: 12px;
  --w11-radius-lg: 16px;
  --w11-radius-xl: 24px;
  --w11-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
  --w11-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --w11-font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --w11-transition: 180ms cubic-bezier(0.33, 1, 0.68, 1);

  /* Light (default) */
  --bg: #f3f3f3;
  --bg-elevated: #ffffff;
  --bg-mica: rgba(243, 243, 243, 0.85);
  --bg-acrylic: rgba(255, 255, 255, 0.72);
  --text: #1a1a1a;
  --text-secondary: #5d5d5d;
  --text-muted: #8a8a8a;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --surface-hover: rgba(0, 0, 0, 0.04);
  --hero-gradient: linear-gradient(145deg, #e8f4fc 0%, #f3f3f3 40%, #eef6ff 100%);
  --card-glow: 0 0 0 1px var(--border);
}

html.dark {
  --bg: #202020;
  --bg-elevated: #2c2c2c;
  --bg-mica: rgba(32, 32, 32, 0.88);
  --bg-acrylic: rgba(44, 44, 44, 0.78);
  --text: #ffffff;
  --text-secondary: #c8c8c8;
  --text-muted: #9a9a9a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --hero-gradient: linear-gradient(145deg, #1a2a3a 0%, #202020 45%, #1e2836 100%);
  --card-glow: 0 0 0 1px var(--border);
  --w11-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--w11-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--w11-accent); text-decoration: none; transition: color var(--w11-transition); }
a:hover { color: var(--w11-accent-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--w11-accent);
  outline-offset: 2px;
}

/* Layout shell */
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

/* Acrylic header */
.w11-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-acrylic);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.w11-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.w11-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none !important;
}

.w11-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00a4ef 0%, #0078d4 50%, #74c365 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 120, 212, 0.35);
}

.w11-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.w11-nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
}

.w11-nav-links a:hover,
.w11-nav-links a.active {
  background: var(--surface-hover);
  color: var(--text);
}

.w11-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Buttons — Fluent style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--w11-transition), box-shadow var(--w11-transition), transform 100ms ease;
  text-decoration: none !important;
  line-height: 1.25;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--w11-accent);
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover {
  background: var(--w11-accent-hover);
  color: #fff !important;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text) !important;
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary) !important;
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text) !important; }

.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1.1rem;
  border-radius: 10px;
}

.btn-xl {
  padding: 1.1rem 2.25rem;
  font-size: 1.2rem;
  border-radius: 12px;
  min-width: 240px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  background: var(--surface-hover);
  border: none;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Hero — Windows 11 Start-inspired center focus */
.hero {
  position: relative;
  background: var(--hero-gradient);
  overflow: hidden;
  padding: 4rem 1.25rem 5rem;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 120, 212, 0.15), transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(116, 195, 101, 0.08), transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--w11-accent-soft);
  color: var(--w11-accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--text);
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin: 0 auto 2rem;
  max-width: 36em;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}

.hero-cta .btn-primary {
  box-shadow: 0 4px 20px rgba(0, 120, 212, 0.4);
  animation: pulse-soft 2.5s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 120, 212, 0.35); }
  50% { box-shadow: 0 6px 28px rgba(0, 120, 212, 0.55); }
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Cards */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 3.5rem 0; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.section-sub {
  color: var(--text-secondary);
  margin: 0 0 2rem;
  max-width: 40em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-elevated);
  border-radius: var(--w11-radius-lg);
  box-shadow: var(--card-glow), var(--w11-shadow);
  overflow: hidden;
  transition: transform var(--w11-transition), box-shadow var(--w11-transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-glow), var(--w11-shadow-lg);
}

.card-img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  background: var(--bg);
}

.card-body { padding: 1.15rem 1.25rem 1.35rem; flex: 1; display: flex; flex-direction: column; }
.card-cat {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--w11-accent);
  margin-bottom: 0.4rem;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 650;
  margin: 0 0 0.5rem;
  line-height: 1.3;
  color: var(--text);
}
.card-title a { color: inherit; text-decoration: none !important; }
.card-title a:hover { color: var(--w11-accent); }
.card-excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Content article */
.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}
.prose h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 2.25rem 0 0.85rem;
  letter-spacing: -0.02em;
  scroll-margin-top: 5rem;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 650;
  margin: 1.75rem 0 0.65rem;
}
.prose p { margin: 0 0 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.15rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose img {
  border-radius: var(--w11-radius);
  margin: 1.5rem 0;
  box-shadow: var(--w11-shadow);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.prose th, .prose td {
  border: 1px solid var(--border-strong);
  padding: 0.65rem 0.85rem;
  text-align: left;
}
.prose th { background: var(--surface-hover); font-weight: 600; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--w11-accent);
  background: var(--w11-accent-soft);
  border-radius: 0 var(--w11-radius) var(--w11-radius) 0;
  color: var(--text-secondary);
}
.prose code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-hover);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
.prose pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem 1.15rem;
  border-radius: var(--w11-radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose .callout {
  padding: 1rem 1.15rem;
  border-radius: var(--w11-radius);
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.prose .callout-tip { border-color: rgba(15, 123, 15, 0.3); background: rgba(15, 123, 15, 0.08); }
.prose .callout-warn { border-color: rgba(157, 93, 0, 0.3); background: rgba(157, 93, 0, 0.08); }
.prose .callout-info { border-color: rgba(0, 120, 212, 0.3); background: var(--w11-accent-soft); }

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 1rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.breadcrumbs a { color: var(--text-secondary); text-decoration: none !important; }
.breadcrumbs a:hover { color: var(--w11-accent); }
.breadcrumbs .sep { opacity: 0.5; }

/* Page header */
.page-header {
  padding: 1.5rem 0 2rem;
}
.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}
.page-header .lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 48em;
}

/* Sidebar layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}
@media (min-width: 960px) {
  .content-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.sidebar-widget {
  background: var(--bg-elevated);
  border-radius: var(--w11-radius-lg);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--card-glow);
}
.sidebar-widget h3 {
  font-size: 0.95rem;
  font-weight: 650;
  margin: 0 0 0.85rem;
}
.sidebar-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-widget li {
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}
.sidebar-widget li a {
  color: var(--text-secondary);
  text-decoration: none !important;
}
.sidebar-widget li a:hover { color: var(--w11-accent); }

/* Download page steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 4rem;
  margin-bottom: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--w11-radius-lg);
  box-shadow: var(--card-glow);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--w11-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}

/* Comparison table highlight */
.compare-table .win-better {
  background: rgba(15, 123, 15, 0.1);
  font-weight: 600;
}

/* Footer */
.w11-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-grid h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.45rem; }
.footer-grid a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  text-decoration: none !important;
}
.footer-grid a:hover { color: var(--w11-accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.affiliate-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 1rem;
  text-align: center;
  padding: 0 1rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.form-control:focus {
  border-color: var(--w11-accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--w11-accent-soft);
}

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.alert-success { background: rgba(15, 123, 15, 0.12); color: var(--w11-success); }
.alert-error { background: rgba(196, 43, 28, 0.12); color: var(--w11-danger); }
.alert-info { background: var(--w11-accent-soft); color: var(--w11-accent); }

/* Tags / pills */
.pill {
  display: inline-flex;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface-hover);
  color: var(--text-secondary);
  text-decoration: none !important;
}
.pill:hover { background: var(--w11-accent-soft); color: var(--w11-accent); }

/* Nav dropdown */
.nav-dropdown { position: relative; list-style: none; }
.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.nav-drop-btn:hover { background: var(--surface-hover); color: var(--text); }
.nav-drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--w11-shadow-lg);
  padding: 0.4rem;
  list-style: none;
  margin: 0.25rem 0 0;
  z-index: 150;
}
.nav-dropdown.open .nav-drop-menu,
.nav-dropdown:hover .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none !important;
  font-size: 0.9rem;
}
.nav-drop-menu a:hover { background: var(--surface-hover); color: var(--text); }
.nav-search .form-control {
  min-width: 7rem;
  max-width: 10rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.9rem;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .w11-nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .w11-nav-links.open { display: flex; }
  .w11-nav-actions { width: 100%; flex-wrap: wrap; }
  .nav-dropdown { width: 100%; }
  .nav-drop-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding-left: 0.75rem;
  }
  .nav-dropdown.open .nav-drop-menu { display: block; }
  .nav-search { flex: 1; }
  .nav-search .form-control { max-width: none; width: 100%; }
}

/* Ad slots */
.ad-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border: 1px dashed var(--border-strong);
  border-radius: var(--w11-radius);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 1.5rem 0;
}

/* Skip link a11y */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--w11-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
}
.skip-link:focus { left: 0; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface-hover) 25%, var(--border) 50%, var(--surface-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Print */
@media print {
  .w11-header, .w11-footer, .sidebar-widget, .ad-slot, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
