:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #f8f9fb;
  --header-bg: #1a1d21;
  --header-surface: #252930;
  --header-border: #323740;
  --text: #1f2937;
  --text-muted: #5b6574;
  --accent: #f59200;
  --accent-dark: #d97706;
  --accent-soft: #fff7eb;
  --teal: #0ab890;
  --teal-dark: #079272;
  --border: #e2e6ec;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --max-width: 1140px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.site-header {
  background: var(--header-bg);
  color: #f3f4f6;
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: #ffffff;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  border: 1px solid var(--header-border);
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #b4bcc8;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: var(--header-surface);
  color: #f3f4f6;
  border: 1px solid var(--header-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  color: #e5e7eb;
  font-size: 0.94rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: var(--header-surface);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent);
}

.nav-caret {
  font-size: 0.7rem;
  opacity: 0.75;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--header-surface);
  border: 1px solid var(--header-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  list-style: none;
  margin: 0;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 200;
}

.nav-item.has-dropdown:hover > .dropdown-menu,
.nav-item.has-dropdown:focus-within > .dropdown-menu,
.nav-item.has-dropdown.open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  color: #e5e7eb;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
  background: rgba(245, 146, 0, 0.14);
  color: var(--accent);
  text-decoration: none;
}

/* Hero Banner (Homepage) */
.hero {
  background: linear-gradient(135deg, #1a1d21 0%, #262b33 65%, #2f2618 100%);
  color: #f9fafb;
  padding: 52px 0 48px;
  border-bottom: 1px solid var(--header-border);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 780px;
}

.hero-eyebrow {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(245, 146, 0, 0.14);
  border: 1px solid rgba(245, 146, 0, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.65rem);
  line-height: 1.18;
  color: #ffffff;
}

.hero p {
  margin: 0;
  font-size: 1.08rem;
  color: #cbd5e1;
  max-width: 640px;
}

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

/* Main Layout */
.page-shell {
  padding: 36px 0 56px;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.layout-full {
  display: block;
}

.main-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px 36px;
}

.page-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.page-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  line-height: 1.25;
  color: #111827;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid rgba(245, 146, 0, 0.25);
  text-decoration: none;
}

.pill:hover {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

/* Prose / Content Typography */
.content h2 {
  margin: 28px 0 12px;
  font-size: 1.4rem;
  color: #111827;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.content h3 {
  margin: 22px 0 10px;
  font-size: 1.15rem;
  color: #1f2937;
}

.content h4 {
  margin: 18px 0 8px;
  font-size: 1.02rem;
  color: #1f2937;
}

.content p {
  margin: 0 0 16px;
}

.content ul,
.content ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.content li {
  margin-bottom: 6px;
}

.content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}

.content figure {
  margin: 22px auto;
  text-align: center;
}

.content figure img,
.content .screenshot {
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.content figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.control-label {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--teal-dark);
  background: rgba(10, 184, 144, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Buttons & CTAs */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

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

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

.btn-secondary:hover {
  background: var(--teal-dark);
  color: #ffffff;
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-hero-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Callouts & Download Placeholders */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  margin: 20px 0;
}

.callout strong {
  color: #111827;
}

.download-placeholder {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--accent-soft);
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
}

.download-placeholder-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400e;
  background: rgba(245, 146, 0, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.download-placeholder h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  color: #111827;
}

.download-placeholder p {
  margin: 0;
  font-size: 0.92rem;
  color: #4b5563;
}

.download-placeholder code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Responsive Video Embed */
.embed-responsive {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 24px auto;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #111827;
  box-shadow: var(--shadow-sm);
}

.embed-responsive iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Badges (Softpedia, Windows Store, PayPal) */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
}

.badge-img {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  max-height: 90px;
  width: auto;
}

/* Cards & Grids */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  color: #111827;
}

.section-heading a {
  font-size: 0.9rem;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #d0d7e2;
}

.card-thumb {
  aspect-ratio: 16 / 10;
  background: #eef1f5;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumb.contain img {
  object-fit: contain;
  padding: 12px;
  background: #ffffff;
}

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.card-title a {
  color: #111827;
}

.card-title a:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

.card-desc {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
}

.card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-dark);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.widget-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 8px 11px;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--text);
}

.search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: #ffffff;
}

.search-btn {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--header-bg);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.search-btn:hover {
  background: var(--accent);
  color: #111827;
}

.search-results {
  margin-top: 12px;
  display: none;
}

.search-results.visible {
  display: block;
}

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

.search-result-item {
  padding: 8px 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.search-result-item a {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}

.search-result-item a:hover {
  color: var(--accent-dark);
}

.search-result-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-links li + li {
  border-top: 1px solid var(--border);
}

.sidebar-links a {
  display: block;
  padding: 9px 2px;
  color: var(--text);
  font-size: 0.94rem;
}

.sidebar-links a:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

/* Footer */
.site-footer {
  background: var(--header-bg);
  color: #9ca3af;
  border-top: 1px solid var(--header-border);
  padding: 36px 0;
  margin-top: 24px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 28px;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: #d1d5db;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Archive post list */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.archive-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  align-items: center;
}

.archive-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.archive-item h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}

.archive-item p {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .main-card {
    padding: 24px 20px;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .header-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .main-nav {
    display: none;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--header-border);
  }

  .main-nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin: 4px 0 8px 14px;
    display: none;
  }

  .nav-item.has-dropdown.open > .dropdown-menu {
    display: block;
  }

  .archive-item {
    grid-template-columns: 1fr;
  }
}
