/*
Theme Name: AK47 Sports Guide
Theme URI: https://example.com/ak47-sports-guide
Author: AK47 Sports Guide Editorial Team
Author URI: /
Description: Independent technology publication theme covering AK47 Sports, Android streaming applications, APK installation, Android TV compatibility, troubleshooting, reviews, comparisons and safety guides. Dark, premium, SEO-focused and performance-aware. Not affiliated with any application developer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ak47-sports-guide
Tags: news, dark, two-columns, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Design tokens (dark charcoal + blue/purple accents)
   ========================================================================== */

:root {
  --radius: 0.75rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  --background: oklch(0.08 0.01 240);
  --foreground: oklch(0.96 0.005 240);
  --surface: oklch(0.12 0.015 240);
  --surface-raised: oklch(0.16 0.018 240);
  --card: oklch(0.12 0.015 240);
  --card-foreground: oklch(0.96 0.005 240);
  --popover: oklch(0.12 0.015 240);
  --popover-foreground: oklch(0.96 0.005 240);
  --primary: oklch(0.65 0.18 240);
  --primary-foreground: oklch(0.98 0.01 240);
  --secondary: oklch(0.20 0.02 240);
  --secondary-foreground: oklch(0.94 0.005 240);
  --muted: oklch(0.18 0.016 240);
  --muted-foreground: oklch(0.70 0.015 240);
  --accent: oklch(0.75 0.15 35);
  --accent-foreground: oklch(0.12 0.02 35);
  --destructive: oklch(0.63 0.19 25);
  --destructive-foreground: oklch(0.97 0.01 25);
  --success: oklch(0.70 0.14 150);
  --warning: oklch(0.79 0.14 78);
  --border: oklch(0.22 0.018 240);
  --input: oklch(0.22 0.018 240);
  --ring: oklch(0.65 0.18 240);

  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

* {
  border-color: var(--border);
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--foreground);
  text-decoration: none;
}

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

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

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.container {
  width: 100%;
  max-width: 1152px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.5vw, 2rem);
}

.container--narrow {
  max-width: 48rem;
}

/* ==========================================================================
   3. Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: oklch(0.08 0.01 240 / 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.75rem;
  flex-wrap: wrap;
}

.site-header__logo {
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-header__logo span {
  color: var(--primary);
}

.site-nav {
  margin-left: auto;
  display: none;
  flex-wrap: nowrap;
  gap: 0.125rem;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }

  .mobile-menu {
    display: none;
  }
}

/* Mobile menu styles */
.mobile-menu {
  flex-shrink: 0;
}

.mobile-menu__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--foreground);
  font-size: 1.25rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu__summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.mobile-menu__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 40;
}

.mobile-menu__panel .btn--download {
  width: 100%;
  text-align: center;
  margin-bottom: 0.5rem;
}

.mobile-menu__panel .site-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-left: 0;
}

.mobile-menu__panel .site-nav a {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--foreground);
}

.mobile-menu__panel .site-nav a:hover,
.mobile-menu__panel .site-nav a.is-current {
  background: var(--surface);
  color: var(--primary);
}

.site-nav a {
  border-radius: var(--radius-md);
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  white-space: nowrap;
  color: var(--muted-foreground);
  transition: background-color 0.15s, color 0.15s;
}

.site-nav a:hover {
  background: var(--surface);
  color: var(--foreground);
}

.site-nav a.is-current {
  background: var(--surface);
  color: var(--foreground);
}

.site-header__search {
  display: flex;
  align-items: center;
  color: var(--muted-foreground);
}

.site-header__search .search-form {
  margin: 0;
  max-width: none;
}

.site-header__search .search-form input[type="search"] {
  width: 6.5rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  transition: width 0.15s ease;
}

.site-header__search .search-form input[type="search"]:focus {
  width: 11rem;
}

.site-header__search .search-form button {
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
}

@media (max-width: 640px) {
  .site-header__search {
    display: none;
  }
}

.site-header__search svg {
  width: 1.25rem;
  height: 1.25rem;
}

.mobile-menu {
  position: relative;
  margin-left: auto;
}

.mobile-menu__summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.mobile-menu__summary::-webkit-details-marker {
  display: none;
}

.mobile-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  display: grid;
  gap: 0.25rem;
  width: 14rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
}

.mobile-menu__panel a {
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.mobile-menu__panel a:hover {
  background: var(--surface-raised);
  color: var(--foreground);
}

.site-header__tagline {
  border-top: 1px solid oklch(0.29 0.018 172 / 0.6);
  background: oklch(0.20 0.015 172 / 0.4);
}

.site-header__tagline .container {
  overflow-x: auto;
  padding-block: 0.375rem;
}

.site-header__tagline p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .site-nav {
    display: flex;
  }

  .mobile-menu {
    display: none;
  }
}

/* ==========================================================================
   4. Buttons & links
   ========================================================================== */

.btn {
  display: inline-block;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

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

.btn--primary:hover {
  background: oklch(0.68 0.13 168);
  color: var(--primary-foreground);
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn--outline:hover {
  background: var(--surface);
}

.text-link {
  color: var(--primary);
}

.text-link:hover {
  text-decoration: underline;
}

.text-link--muted {
  color: var(--foreground);
}

.text-link--muted:hover {
  color: var(--primary);
}

/* ==========================================================================
   5. Cards & grids
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.card--pad {
  padding: 1.5rem;
}

.card--link {
  transition: border-color 0.15s, background-color 0.15s;
}

.card--link:hover {
  border-color: oklch(0.75 0.14 168 / 0.5);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.grid--tight {
  gap: 0.75rem;
}

/* Mobile-first responsive grids */
@media (min-width: 480px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Platform quicklinks grid */
.platform-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .platform-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .platform-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.platform-card {
  display: flex;
}

.platform-card .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  min-height: 100%;
}

.platform-card__icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.platform-card__label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--foreground);
}

.platform-card .card--link:hover .platform-card__label {
  color: var(--primary);
}

/* Download page primary CTA */
.download-primary {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .download-primary {
    grid-template-columns: 1fr 320px;
  }
}

.download-primary__content h2 {
  margin: 0 0 0.5rem;
  font-size: var(--step-3);
}

.download-primary__meta {
  margin: 0 0 0.75rem;
  font-size: var(--step--1);
  color: var(--muted-foreground);
}

.download-primary__note {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted-foreground);
}

.download-primary__action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.download-primary__action .btn--download-xl {
  padding: 1rem 1.5rem;
  font-size: var(--step-1);
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-direction: column;
}

.download-primary__verify {
  margin: 0;
  text-align: center;
  font-size: var(--step--1);
}

/* Make download URL editable via custom field */

/* Fluid typography scale */
:root {
  --step--2: clamp(0.69rem, 0.67rem + 0.13vw, 0.78rem);
  --step--1: clamp(0.83rem, 0.80rem + 0.17vw, 0.94rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.21vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.15rem + 0.26vw, 1.35rem);
  --step-2:  clamp(1.44rem, 1.37rem + 0.32vw, 1.62rem);
  --step-3:  clamp(1.73rem, 1.63rem + 0.39vw, 1.94rem);
  --step-4:  clamp(2.07rem, 1.93rem + 0.47vw, 2.33rem);
  --step-5:  clamp(2.49rem, 2.29rem + 0.57vw, 2.79rem);
  --step-6:  clamp(2.98rem, 2.72rem + 0.68vw, 3.35rem);
}

/* Performance: content-visibility for below-fold content */
.card,
.section,
.hero,
.download-cta,
.related-section,
.faq-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero__visual img {
  content-visibility: auto;
  contain-intrinsic-size: 480 360;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Skip link visible on focus */
.screen-reader-text:focus {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--background);
  color: var(--primary);
  padding: 0.5rem 1rem;
  z-index: 10000;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .hero__actions,
  .download-banner,
  .download-cta,
  .related-section,
  .post-toc,
  .download-inline,
  .scheduled-card,
  .breadcrumb,
  .pagination,
  .btn {
    display: none !important;
  }
  .entry--narrow {
    max-width: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  a {
    text-decoration: underline !important;
    color: black !important;
  }
}

/* ==========================================================================
   6. Hero & homepage sections
   ========================================================================== */

.hero {
  padding-block: clamp(3rem, 5vw, 5rem);
}

.hero__kicker,
.section__kicker {
  margin: 0;
  font-size: var(--step--1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1 {
  max-width: 56rem;
  margin-top: 1rem;
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 1.1;
}

.hero__lede {
  max-width: 42rem;
  margin-top: 1.25rem;
  font-size: var(--step-0);
  line-height: 1.75;
  color: var(--muted-foreground);
}

.hero__actions {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__note {
  margin-top: 1.5rem;
  font-size: var(--step--1);
  color: var(--muted-foreground);
}

.hero__visual {
  max-width: 480px;
  margin-left: auto;
}

@media (max-width: 767px) {
  .hero__visual {
    max-width: 100%;
    margin-left: 0;
    margin-top: 1.5rem;
  }
}

.section {
  margin-top: 4rem;
}

.section--card-gap {
  margin-top: 1.5rem;
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.section h2.section--sub {
  font-size: 1.5rem;
}

/* Homepage stat-style definition lists */
.stats {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  font-size: 0.875rem;
}

.stats dt {
  color: var(--muted-foreground);
}

.stats dd {
  margin: 0.25rem 0 0;
}

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

.section__more {
  margin: 1rem 0 0;
  font-size: 0.875rem;
}

/* ==========================================================================
   7. Feature / link cards
   ========================================================================== */

.card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card h3 + p,
.card .card__text {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.card .card__meta {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.card__kicker {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ==========================================================================
   8. Tables
   ========================================================================== */

.table-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table caption {
  margin-bottom: 0.5rem;
  text-align: left;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.data-table th {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 600;
}

.data-table td {
  border-bottom: 1px solid oklch(0.29 0.018 172 / 0.6);
  padding: 0.5rem 0.75rem;
  vertical-align: top;
  color: var(--muted-foreground);
}

/* ==========================================================================
   9. Breadcrumbs & article layout
   ========================================================================== */

.breadcrumbs {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.breadcrumbs li[aria-current] {
  color: var(--foreground);
}

.entry {
  max-width: 1152px;
  margin-inline: auto;
  padding: 2.5rem 1rem;
}

.entry--narrow {
  max-width: 48rem;
  padding-block: 2.5rem;
}

.entry__kicker {
  margin-top: 1.5rem;
}

.entry h1 {
  margin-top: 0.5rem;
  font-size: 1.875rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .entry h1 {
    font-size: 2.25rem;
  }
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.entry__lede {
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Two-column article layout: sticky sidebar TOC + reading column */
.post-layout {
  display: grid;
  gap: 2rem;
  max-width: 72rem;
  margin-inline: auto;
  padding: 0 1rem 2.5rem;
  align-items: start;
}

.post-layout .entry {
  max-width: none;
  margin-inline: 0;
  padding: 0;
}

.post-toc {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  order: -1;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.post-toc__title {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.post-toc__list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.125rem;
}

.post-toc__item a {
  display: block;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted-foreground);
  text-decoration: none;
}

.post-toc__item a:hover {
  background: var(--surface-raised);
  color: var(--foreground);
}

.post-toc__item--h3 {
  padding-left: 0.875rem;
}

.post-toc__item.is-active a {
  background: oklch(0.75 0.14 168 / 0.14);
  color: var(--primary);
}

@media (min-width: 1024px) {
  .post-layout {
    grid-template-columns: 16rem minmax(0, 48rem);
    justify-content: center;
  }

  .post-toc {
    order: 0;
  }
}

/* ==========================================================================
   10. Block renderer (article body)
   ========================================================================== */

.prose {
  margin-top: 1.5rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.prose h3 {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.prose p {
  margin-top: 1rem;
  line-height: 1.75;
  color: oklch(0.96 0.005 172 / 0.9);
}

.prose ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.prose ul li {
  list-style: disc;
  margin: 0.5rem 0;
  line-height: 1.75;
  color: oklch(0.96 0.005 172 / 0.9);
}

.prose ol.steps {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1rem;
}

.steps li h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.steps li .step-num {
  margin-right: 0.5rem;
  color: var(--primary);
}

.steps li p {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.prose blockquote,
.quick-answer {
  margin: 1.5rem 0 0;
  border: 1px solid oklch(0.75 0.14 168 / 0.4);
  border-radius: var(--radius-xl);
  background: oklch(0.75 0.14 168 / 0.1);
  padding: 1.25rem;
}

.quick-answer__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
}

.quick-answer p:last-child {
  margin-bottom: 0;
}

.note {
  margin: 1.5rem 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 1.25rem;
}

.note--warn {
  border-color: oklch(0.79 0.14 78 / 0.4);
  background: oklch(0.79 0.14 78 / 0.1);
}

.note h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.note p:last-child {
  margin-bottom: 0;
}

.claim {
  margin: 1.25rem 0 0;
  border-left: 2px solid var(--border);
  padding-left: 1rem;
}

.claim p:last-child {
  margin-bottom: 0;
}

.verification-tag {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.verification-tag--developer {
  border-color: oklch(0.79 0.14 78 / 0.4);
  color: var(--warning);
}

.verification-tag--users {
  border-color: oklch(0.81 0.12 150 / 0.4);
  color: var(--accent);
}

.verification-tag--verified {
  border-color: oklch(0.72 0.14 160 / 0.4);
  color: var(--success);
}

.unique-detail {
  margin: 2rem 0 0;
  border: 1px solid oklch(0.81 0.12 150 / 0.4);
  border-radius: var(--radius-xl);
  background: oklch(0.81 0.12 150 / 0.1);
  padding: 1.25rem;
  line-height: 1.75;
}

.unique-detail strong {
  font-weight: 600;
}

/* Table of contents */
.toc {
  margin: 1.5rem 0 0;
  padding: 1.25rem;
}

.toc h2 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
}

.toc ul {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.toc li {
  margin-top: 0.375rem;
}

.toc a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.toc a:hover {
  color: var(--foreground);
}

/* ==========================================================================
   11. FAQ
   ========================================================================== */

.faq-section {
  margin-top: 3rem;
}

.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.faq-item dt {
  font-weight: 600;
}

.faq-item dd {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* ==========================================================================
   12. Article trust footer & related
   ========================================================================== */

.related-section {
  margin-top: 3rem;
}

.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.related-section__lede {
  margin-top: 0.75rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

.related-reading {
  margin-top: 2rem;
}

.related-reading h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.related-reading .card__text {
  margin-top: 0.375rem;
}

.related-reading__list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.related-reading__list li {
  list-style: disc;
  margin: 0.5rem 0;
  line-height: 1.75;
}

.related-reading__list .internal-link {
  color: var(--primary);
}

.trust-footer {
  margin-top: 3rem;
  padding: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.trust-footer p {
  margin: 0;
}

.continue-link {
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.scheduled-card {
  margin-top: 2rem;
  padding: 1.5rem;
}

.scheduled-card h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.scheduled-card p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.scheduled-card .btn {
  margin-top: 1rem;
}

/* ==========================================================================
   13. Search
   ========================================================================== */

.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 36rem;
  margin: 2rem 0 0;
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  color: var(--foreground);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
}

.search-form input[type="search"]:focus {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.search-form button {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 0;
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.search-form button:hover {
  background: oklch(0.68 0.13 168);
}

.no-results {
  margin-top: 2rem;
  max-width: 36rem;
  padding: 1.5rem;
}

.no-results p {
  margin: 0.5rem 0 0;
  color: var(--muted-foreground);
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  background: oklch(0.20 0.015 172 / 0.5);
}

.site-footer__cols {
  display: grid;
  gap: 2rem;
  padding-block: 3rem;
}

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

@media (min-width: 1024px) {
  .site-footer__cols {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-footer__col h2 {
  font-size: 0.875rem;
  font-weight: 600;
}

.site-footer__col ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.site-footer__col a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.site-footer__col a:hover {
  color: var(--foreground);
}

.site-footer__bottom {
  border-top: 1px solid var(--border);
}

.site-footer__bottom .container {
  padding-block: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.site-footer__bottom p {
  margin: 0;
}

.site-footer__bottom p + p {
  margin-top: 0.5rem;
}

.site-footer__bottom a {
  color: var(--muted-foreground);
}

.site-footer__bottom a:hover {
  color: var(--foreground);
}

/* ==========================================================================
   15. 404 & author cards
   ========================================================================== */

.error-404 {
  display: flex;
  min-height: 60vh;
  align-items: center;
  justify-content: center;
  padding-inline: 1rem;
}

.error-404__inner {
  max-width: 28rem;
  text-align: center;
}

.error-404 h1 {
  font-size: 4.5rem;
  font-weight: 700;
}

.error-404 h2 {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.error-404 p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.error-404 .btn {
  margin-top: 1.5rem;
}

.author-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-card__avatar {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-raised);
  font-size: 0.875rem;
  font-weight: 600;
}

.author-card h2 {
  font-size: 1rem;
  font-weight: 600;
}

.author-card .author-card__role {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.author-card .author-card__bio {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.author-card .author-card__creds {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ==========================================================================
   16. Download CTAs
   ========================================================================== */

.hero__note {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.btn--download {
  background: linear-gradient(135deg, oklch(0.78 0.15 160), oklch(0.62 0.16 176));
  color: oklch(0.14 0.02 176);
  font-weight: 600;
  box-shadow: 0 4px 18px oklch(0.62 0.16 176 / 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.btn--download:hover {
  background: linear-gradient(135deg, oklch(0.83 0.14 158), oklch(0.66 0.15 174));
  color: oklch(0.14 0.02 176);
  box-shadow: 0 6px 24px oklch(0.62 0.16 176 / 0.45);
  transform: translateY(-1px);
}

.btn--download-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.site-header__download {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.mobile-menu__panel > .btn {
  margin: 0 0 0.5rem;
  width: 100%;
}

/* Dedicated download block (front page) */
.download-cta {
  position: relative;
  overflow: hidden;
}

.download-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 80% at 85% 20%, oklch(0.62 0.16 176 / 0.25), transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 90%, oklch(0.75 0.14 168 / 0.12), transparent 60%);
}

.download-cta__grid {
  position: relative;
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .download-cta__grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

.download-cta h2 {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.download-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.download-cta__side {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: oklch(0.75 0.14 168 / 0.08);
  align-self: start;
}

.download-cta__side h3 {
  font-size: 1rem;
  font-weight: 600;
}

.download-cta__side .card__text {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.download-cta__hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* App spec rows (front page / download block) */
.app-specs {
  display: grid;
  gap: 0.625rem 1.5rem;
  margin: 1.5rem 0 0;
  font-size: 0.875rem;
}

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

.app-specs div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid oklch(0.29 0.018 172 / 0.6);
}

.app-specs dt {
  color: var(--muted-foreground);
}

.app-specs dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
}

/* Downloader transfer codes */
.downloader-codes {
  display: grid;
  gap: 0.625rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.downloader-codes li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.downloader-codes__label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.downloader-codes__code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
}

/* Slim full-width download banner */
.download-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid oklch(0.75 0.14 168 / 0.4);
  border-radius: var(--radius-xl);
  background: oklch(0.75 0.14 168 / 0.1);
}

.download-banner h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.download-banner p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.download-banner .btn {
  flex-shrink: 0;
}

/* Inline download box (article pages) */
.download-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
}

.download-inline__text h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.download-inline__text p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.download-inline__action {
  flex-shrink: 0;
}

/* Footer download strip */
.footer-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 3rem;
}

.footer-download h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-download p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
