/* TNL public download page
   Palette: #ff9900 accent, #146eb4 brand, #232f3e ink, #000000 text, #f2f2f2 surface */

:root {
  --accent: #ff9900;
  --accent-dark: #e08800;
  --brand: #146eb4;
  --brand-dark: #0f5589;
  --brand-soft: #eaf3fb;
  --ink: #232f3e;
  --ink-2: #16202c;
  --bg: #f2f2f2;
  --panel: #ffffff;
  --text: #000000;
  --muted: #5b6675;
  --line: #e2e5e9;
  --radius: 18px;
  --shadow: 0 10px 40px rgb(35 47 62 / 12%);
  --font: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

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

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

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

a:hover {
  color: var(--brand-dark);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 14px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.shell {
  width: min(1120px, 100%);
  padding: 0 20px;
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: var(--accent);
  color: var(--text);
  font-weight: 700;
}

.skip-link:focus {
  top: 0;
  color: var(--text);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(35 47 62 / 92%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.site-header .shell {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
}

.logo:hover {
  color: #ffffff;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent) 0%, #ffbe5c 100%);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgb(255 153 0 / 34%);
}

.logo small {
  display: block;
  color: rgb(255 255 255 / 62%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-links a {
  padding: 8px 12px;
  border-radius: 9px;
  color: rgb(255 255 255 / 82%);
  font-size: 14px;
  font-weight: 600;
}

.header-links a:hover {
  background: rgb(255 255 255 / 10%);
  color: #ffffff;
}

.header-links a.current {
  background: rgb(255 255 255 / 14%);
  color: #ffffff;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 12% 0%, rgb(20 110 180 / 62%) 0%, transparent 62%),
    radial-gradient(760px 420px at 96% 100%, rgb(255 153 0 / 26%) 0%, transparent 58%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #ffffff;
}

.hero .shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 46px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  margin-bottom: 18px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  color: #ffd699;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  max-width: 52ch;
  margin: 16px 0 26px;
  color: rgb(255 255 255 / 80%);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 26px;
  color: rgb(255 255 255 / 72%);
  font-size: 14px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--accent);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease,
    border-color 140ms ease, color 140ms ease;
  box-shadow: 0 10px 26px rgb(255 153 0 / 28%);
}

.btn:hover {
  background: var(--accent-dark);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgb(255 153 0 / 34%);
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn.ghost {
  border-color: rgb(255 255 255 / 34%);
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: #ffffff;
  background: rgb(255 255 255 / 10%);
  color: #ffffff;
  transform: none;
}

.btn.small {
  padding: 9px 15px;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: none;
}

.btn.outline {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}

.btn.outline:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  transform: none;
}

.btn[disabled] {
  background: rgb(255 255 255 / 14%);
  color: rgb(255 255 255 / 60%);
  box-shadow: none;
  cursor: not-allowed;
}

/* ---------- Download card ---------- */

.download-card {
  padding: 26px;
  background: var(--panel);
  border-radius: 22px;
  box-shadow: 0 30px 70px rgb(0 0 0 / 34%);
  color: var(--text);
}

.download-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
}

.download-card h2 svg {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  margin: 14px 0 18px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}

.file-facts {
  display: grid;
  gap: 12px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
}

.fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
}

.fact dt {
  color: var(--muted);
  font-weight: 600;
}

.fact dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.hash-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin-top: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.hash-row code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.card-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-note code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f2f4f6;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.empty-card {
  padding: 30px 26px;
  background: rgb(255 255 255 / 8%);
  border: 1px dashed rgb(255 255 255 / 30%);
  border-radius: 22px;
  color: rgb(255 255 255 / 84%);
  text-align: center;
}

.empty-card h2 {
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 19px;
}

/* ---------- Sections ---------- */

.section {
  padding: 64px 0;
}

.section.tight {
  padding: 48px 0;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 30px;
}

.section-head h2 {
  color: var(--ink);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
}

.section-head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16.5px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.step {
  position: relative;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
}

.step h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 17px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.feature {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16.5px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.panel {
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notes {
  max-height: 380px;
  padding: 18px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
}

.android-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.android-row .meta {
  color: var(--muted);
  font-size: 14.5px;
}

.panel-title {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 20px;
}

/* ---------- Illustrated install guide ---------- */

.guide {
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: guide;
}

.guide-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 28px;
  align-items: center;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.guide-step + .guide-step {
  margin-top: 16px;
}

.guide-step:not(:has(.guide-shot)) {
  grid-template-columns: minmax(0, 1fr);
}

.guide-text {
  position: relative;
  padding-left: 58px;
}

.guide-number {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.guide-text h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 19px;
}

.guide-text p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

.guide-text strong {
  color: var(--ink);
}

.guide-shot {
  margin: 0;
}

.guide-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1a1a1a;
  box-shadow: 0 10px 26px rgb(35 47 62 / 18%);
}

.guide-shot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

details.faq {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

details.faq + details.faq {
  margin-top: 12px;
}

details.faq summary {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

details.faq summary::-webkit-details-marker {
  display: none;
}

details.faq summary::after {
  float: right;
  color: var(--brand);
  font-weight: 800;
  content: "+";
}

details.faq[open] summary::after {
  content: "\2212";
}

details.faq p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 34px 0;
  background: var(--ink);
  color: rgb(255 255 255 / 68%);
  font-size: 14px;
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}

.site-footer a {
  color: rgb(255 255 255 / 82%);
}

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

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero {
    padding: 48px 0 64px;
  }

  .hero .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .download-card {
    padding: 22px;
  }
}

@media (max-width: 860px) {
  .guide-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

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

  /* The tagline wraps to a second line at phone widths and doubles the height
     of the sticky header, so it is dropped there. */
  .logo small {
    display: none;
  }

  .logo {
    gap: 9px;
    font-size: 16px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .header-links a {
    padding: 7px 10px;
  }

  .guide-step {
    padding: 18px;
  }

  .guide-text {
    padding-left: 0;
    padding-top: 52px;
  }

  .guide-number {
    width: 38px;
    height: 38px;
  }

  body {
    font-size: 15.5px;
  }

  .site-header .shell {
    min-height: 60px;
  }

  .header-links a {
    padding: 8px;
    font-size: 13px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section {
    padding: 44px 0;
  }

  .fact {
    flex-direction: column;
    gap: 2px;
  }

  .fact dd {
    text-align: left;
  }

  .android-row .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
