:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --ink: #161410;
  --muted: #5f5b52;
  --line: #dde3dd;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --green: #17765a;
  --cyan: #0b7189;
  --charcoal: #11100d;
  --soft: #eef2ee;
  --shadow: 0 20px 50px rgba(22, 20, 16, 0.11);
  --radius: 8px;
  --shell: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 790px;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.35rem);
}

h3 {
  font-size: 1.08rem;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.shell {
  width: min(var(--shell), calc(100% - 40px));
  margin-inline: 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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 30;
  transform: translateY(-150%);
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid rgba(230, 224, 214, 0.9);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1280px, calc(100% - 40px));
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #2dade0;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.1rem;
  margin-left: auto;
  font-size: 0.92rem;
  color: #3f3a32;
}

.nav-links a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-links .nav-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.58rem 0.9rem;
  border: 1px solid rgba(37, 99, 235, 0.38);
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--accent);
}

.nav-links .nav-download:hover,
.nav-links .nav-download:focus-visible {
  border-color: var(--accent-dark);
  background: #3b82f6;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-left: auto;
  min-width: max-content;
}

.language-picker label {
  color: #183a8a;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.language-picker select {
  min-height: 34px;
  max-width: 160px;
  appearance: none;
  padding: 0.38rem 1.72rem 0.38rem 0.62rem;
  border: 1px solid rgba(29, 78, 216, 0.48);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, transparent 50%, #ffffff 50%) calc(100% - 14px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #ffffff 50%, transparent 50%) calc(100% - 10px) 50% / 6px 6px no-repeat,
    var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.language-picker select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero {
  position: relative;
  min-height: clamp(600px, 76vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--charcoal);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/btc-tools-asic-management-hero.jpg");
  background-image: image-set(
    url("assets/btc-tools-asic-management-hero.webp") type("image/webp"),
    url("assets/btc-tools-asic-management-hero.jpg") type("image/jpeg")
  );
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(10, 9, 7, 0.94) 0%, rgba(10, 9, 7, 0.9) 44%, rgba(10, 9, 7, 0.72) 62%, rgba(10, 9, 7, 0.3) 84%, rgba(10, 9, 7, 0.12) 100%),
    linear-gradient(0deg, rgba(10, 9, 7, 0.5), rgba(10, 9, 7, 0.05) 38%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fffaf0;
  padding: 4.5rem 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 700px;
  margin-top: 1.2rem;
  color: #efe7da;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.78rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
}

.button-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

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

.button-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fffaf0;
  border-color: rgba(255, 255, 255, 0.34);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  max-width: 820px;
  margin: 2.3rem 0 0;
}

.hero-facts div {
  min-height: 92px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.hero-facts dt {
  color: #d6c8b3;
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
}

.hero-facts dd {
  margin: 0.25rem 0 0;
  font-weight: 800;
}

.intro-band {
  padding: 2.4rem 0;
  background: #201c16;
  color: #f8efe1;
}

.intro-band .section-kicker,
.trust .section-kicker {
  color: #60a5fa;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
}

.intro-grid h2 {
  font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.intro-grid p:last-child {
  color: #dfd3c2;
  margin: 0;
}

.section {
  padding: clamp(4rem, 8vw, 6.8rem) 0;
}

.section.alt {
  background: var(--soft);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

.align-start {
  align-items: start;
}

.section-head {
  max-width: 820px;
  margin-bottom: 2rem;
}

.section-head p:not(.section-kicker) {
  color: var(--muted);
  font-size: 1.05rem;
}

.topic-grid article,
.video-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(22, 20, 16, 0.04);
}

.topic-grid p,
.video-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.feature-list,
.download-grid,
.steps,
.fix-grid,
.comparison-grid {
  display: grid;
  gap: 1rem;
}

.feature-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-list article,
.download-card,
.steps article,
.fix-grid article,
.comparison-grid article {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(22, 20, 16, 0.04);
}

.feature-list p,
.download-card p,
.steps p,
.fix-grid p,
.comparison-grid p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 900;
}

.download-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.platform-downloads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.2rem;
}

.platform-button {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 86px;
  padding: 1rem;
  border: 1px solid rgba(29, 78, 216, 0.46);
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22), 0 10px 30px rgba(22, 20, 16, 0.05);
}

.platform-button:hover,
.platform-button:focus-visible {
  border-color: var(--accent-dark);
  background: #3b82f6;
  box-shadow: 0 20px 46px rgba(37, 99, 235, 0.3), 0 10px 30px rgba(22, 20, 16, 0.08);
  transform: translateY(-1px);
}

.platform-button.windows {
  border-color: var(--accent-dark);
  box-shadow: 0 20px 46px rgba(37, 99, 235, 0.32), 0 10px 30px rgba(22, 20, 16, 0.08);
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.platform-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.platform-button strong,
.platform-button small {
  display: block;
}

.platform-button strong {
  line-height: 1.2;
}

.platform-button small {
  margin-top: 0.15rem;
  color: #ffffff;
  line-height: 1.3;
}

.download-card {
  min-height: 100%;
}

.download-card.priority {
  border-top: 4px solid var(--green);
}

.download-card.windows-download {
  border-top: 4px solid var(--accent);
}

.card-download {
  margin-top: 1.25rem;
  width: 100%;
}

.tag {
  display: inline-flex;
  margin-bottom: 0.8rem;
  color: var(--cyan);
  font-size: 0.73rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.code-block {
  display: block;
  width: 100%;
  margin: 1rem 0;
  padding: 0.9rem;
  overflow-x: auto;
  white-space: nowrap;
  overflow-wrap: normal;
  border-radius: var(--radius);
  color: #f8efe1;
  background: #171410;
}

.text-link {
  display: inline-flex;
  margin-top: 0.75rem;
  color: var(--accent-dark);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.checklist {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.45rem;
  color: var(--muted);
}

.checklist li + li {
  margin-top: 0.55rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wide-media {
  margin: 0 0 2rem;
}

.wide-media img,
.trust-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.wide-media figcaption,
.trust-media figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.steps article span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--accent);
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: #181510;
  color: #fffaf0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  color: var(--muted);
}

td:first-child {
  color: var(--ink);
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.fix-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.video-grid,
.topic-grid {
  display: grid;
  gap: 1rem;
}

.video-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-card {
  padding: 0;
  overflow: hidden;
}

.video-card h3,
.video-card p {
  padding-inline: 1.1rem;
}

.video-card h3 {
  margin-top: 1rem;
}

.video-card p {
  padding-bottom: 1.15rem;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #171410;
}

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

.trust {
  background: #181510;
  color: #fffaf0;
}

.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: start;
}

.trust .checklist li {
  color: #e7d9c8;
}

.trust .checklist li::before {
  background: var(--green);
}

.trust-media {
  margin: 1.5rem 0 0;
}

.trust-media img {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.trust-media figcaption {
  color: #cbbda8;
}

.narrow {
  max-width: 880px;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 850;
}

details p {
  padding: 0 1.2rem 1.1rem;
  color: var(--muted);
}

.sources {
  background: #fff;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.source-links a {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #3f3a32;
  background: var(--bg);
  font-size: 0.9rem;
  text-decoration: none;
}

.source-links a:hover,
.source-links a:focus-visible {
  border-color: var(--accent);
}

.site-footer {
  padding: 2.4rem 0;
  color: #ded2c1;
  background: #100e0b;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
}

.footer-brand small {
  color: #b9ab99;
}

.site-footer p {
  max-width: 720px;
  margin: 1rem 0 0;
  color: #b9ab99;
  font-size: 0.92rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-language-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-language-links a {
  min-width: 38px;
  padding: 0.22rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.footer-language-links a:hover,
.footer-language-links a:focus-visible {
  border-color: #60a5fa;
  color: #ffffff;
}

.footer-links a {
  color: #fff2df;
  text-decoration: none;
}

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

@media (max-width: 980px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.85rem 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0.2rem;
  }

  .language-picker {
    width: 100%;
    margin-left: 0;
  }

  .language-picker select {
    width: min(260px, 100%);
    max-width: none;
  }

  .hero {
    min-height: 740px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(10, 9, 7, 0.96) 0%, rgba(10, 9, 7, 0.88) 70%, rgba(10, 9, 7, 0.48) 100%),
      linear-gradient(0deg, rgba(10, 9, 7, 0.55), rgba(10, 9, 7, 0.18));
  }

  .intro-grid,
  .two-column,
  .trust-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .download-grid,
  .steps,
  .fix-grid,
  .comparison-grid,
  .platform-downloads,
  .video-grid,
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  [id] {
    scroll-margin-top: 180px;
  }

  .shell {
    width: min(100% - 28px, var(--shell));
  }

  h1 {
    font-size: clamp(2.35rem, 14vw, 3.5rem);
  }

  .language-picker {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .language-picker select {
    width: 100%;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 3rem 0;
  }

  .hero-media {
    background-position: 62% center;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .code-block {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.82rem;
  }

  .wide-media img,
  .trust-media img {
    max-height: 360px;
  }

  .hero-facts,
  .feature-list,
  .download-grid,
  .steps,
  .fix-grid,
  .comparison-grid,
  .platform-downloads,
  .video-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .hero-facts {
    display: none;
  }

  .hero-facts div {
    min-height: auto;
  }

  .section {
    padding: 3.4rem 0;
  }

  .table-wrap {
    overflow: visible;
    box-shadow: none;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .table-wrap tr {
    margin-bottom: 0.9rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .table-wrap td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap td:last-child {
    border-bottom: 0;
  }

  .table-wrap td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    color: var(--accent-dark);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
