/* TongEQ website. Same type and colours as the app: Segoe UI with Thai in
   Noto Sans Thai, deep navy ground, the app's teal for actions and lifts. */

@font-face {
  font-family: 'Noto Sans Thai';
  src: url('assets/fonts/noto-sans-thai-thai.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('assets/fonts/noto-sans-thai-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('assets/fonts/noto-sans-thai-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* The app's own palette (app/src/styles.css). */
  --bg: #0b1020;
  --bg-1: #0e1526;
  --bg-2: #121a30;
  --line: #182340;
  --line-2: #1f2b47;
  --text: #e6ecf8;
  --text-2: #8fa0c0;
  --text-3: #7486a6;
  --accent: #2dd4bf;
  --accent-strong: #14b8a6;
  --accent-hover: #2dd4bf;
  --on-accent: #03221e;
  --accent-tint: rgba(45, 212, 191, 0.12);

  --font: 'Segoe UI', 'Noto Sans Thai', system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(80px, 10vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

/* `hidden` must win over any component's own display (grid, flex). */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  scrollbar-color: #1f2b47 var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
}

::selection {
  background: var(--accent-strong);
  color: var(--on-accent);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

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

.nw {
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.soft {
  color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* ---------- buttons, tags, keys ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: var(--accent-strong);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

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

.btn:active {
  transform: translateY(1px);
}

.btn-small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 0.875rem;
}

.btn-large {
  min-height: 52px;
  padding: 0 26px;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.btn-ghost:hover {
  background: var(--bg-2);
}

.tag {
  display: inline-block;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--accent-tint);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--accent);
  vertical-align: middle;
}

kbd {
  display: inline-block;
  min-width: 2em;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-2);
  font: 600 0.75rem/1.6 var(--font);
  color: var(--text);
  text-align: center;
}

.note {
  margin-top: 28px;
  font-size: 0.875rem;
  color: var(--text-3);
}

.note a {
  color: var(--text-2);
}

/* ---------- top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(11, 16, 32, 0.84);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.bar-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.9375rem;
}

.nav a {
  text-decoration: none;
  color: var(--text-2);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 9vw, 120px);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}

h1 {
  font-size: clamp(2.5rem, 4.4vw, 3.75rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lede {
  margin-top: 24px;
  max-width: 30em;
  font-size: 1.125rem;
  color: var(--text-2);
}

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

.meta {
  margin-top: 18px;
  font-size: 0.875rem;
  color: var(--text-3);
}

/* The real app, flat and framed: no tilt, no props. */
.hero-shot img {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.03),
    0 40px 90px -50px rgba(20, 184, 166, 0.6);
}

.hero-shot figcaption {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.text-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.4);
  cursor: pointer;
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

/* ---------- the demo instrument ---------- */

.try {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--line);
}

.try h3 {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 700;
}

.try-copy p {
  margin: 12px 0 20px;
  max-width: 28em;
  color: var(--text-2);
}

.demo {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--bg-1);
  box-shadow: 0 40px 90px -50px rgba(20, 184, 166, 0.55);
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.demo-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
}

.switch:hover {
  border-color: #34466e;
}

.switch-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #1f2b47;
  transition: background-color 0.35s var(--ease);
}

.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.35s var(--ease);
}

.switch[aria-checked='true'] .switch-track {
  background: var(--accent-strong);
}

.switch[aria-checked='true'] .switch-knob {
  transform: translateX(18px);
}

.meters {
  display: grid;
  gap: 24px;
  margin-top: 30px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.9375rem;
}

/* Level readouts: the page's own face, tabular so the digits don't jitter. */
.readout {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.625rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  min-width: 3ch;
  text-align: right;
}

.track {
  position: relative;
  height: 12px;
  border-radius: 3px;
  background: #18223a;
}

/* The ceiling: -3 dB on a -40..0 scale sits at 92.5% of the track. */
.track::after {
  content: '';
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 92.5%;
  border-left: 1.5px dashed var(--text);
}

.fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--level, 0%);
  border-radius: inherit;
  background: var(--text-2);
  transition: width 1.1s var(--ease), background-color 0.6s var(--ease);
}

[data-meter='gun'] .fill {
  background: #3a4a6b;
}

.meters[data-state='on'] [data-meter='steps'] .fill {
  background: var(--accent-strong);
}

.scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -12px;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.legend-mark {
  height: 14px;
  border-left: 1.5px dashed var(--text);
}

.demo-foot {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.gap-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.gap-row .readout {
  font-size: 1.375rem;
}

.fine {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--text-3);
}

/* ---------- sections ---------- */

.section {
  padding-top: var(--section);
}

h2 {
  font-size: clamp(1.875rem, 3.4vw, 2.625rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Heading left, the reason right: every section opens the same way. */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 64px;
  align-items: end;
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.section-head.plain {
  padding-bottom: 0;
  border-bottom: 0;
}

.section-head p {
  max-width: 34em;
  color: var(--text-2);
}

/* ---------- PUBG frequency map ---------- */

.fmap-plot {
  position: relative;
  height: clamp(220px, 28vw, 340px);
  margin-bottom: 28px;
}

.fmap-plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.fmap-grid line {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.fmap-zero {
  stroke: var(--text-3);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
}

.fmap-zone {
  fill: rgba(255, 255, 255, 0.025);
}

.fmap-zone.lift {
  fill: rgba(20, 184, 166, 0.12);
}

.fmap-area {
  fill: url(#fmap-fade);
}

.fmap-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.fmap-x,
.fmap-y,
.fmap-tag {
  position: absolute;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fmap-x {
  bottom: -22px;
  transform: translateX(-50%);
}

.fmap-y {
  left: 0;
  transform: translateY(-50%);
  padding-right: 6px;
  background: var(--bg);
}

.fmap-tag {
  top: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  font-weight: 600;
  color: var(--text);
}

.fmap-tag.lift {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--on-accent);
}

.fmap figcaption {
  margin-top: 36px;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.zones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.zones li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
}

.zone-no {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

.zone-lift .zone-no {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--on-accent);
}

.zone-range {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.zones h3 {
  margin-top: 4px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.zones h3 + p {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--text-2);
}

/* ---------- app screen viewer ---------- */

.viewer {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.viewer-tabs {
  display: grid;
  gap: 4px;
}

.viewer-tabs button {
  display: grid;
  gap: 4px;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  text-align: left;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.viewer-tabs button:hover {
  background: var(--bg-1);
}

.viewer-tabs strong {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
}

.viewer-tabs button > span {
  font-size: 0.875rem;
}

.viewer-tabs [aria-selected='true'] {
  border-color: var(--line-2);
  background: var(--bg-1);
}

.viewer-tabs [aria-selected='true'] strong {
  color: var(--accent);
}

.viewer-screens {
  display: grid;
  place-items: center;
  min-height: 460px;
  padding: clamp(16px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(20, 184, 166, 0.1), transparent 70%),
    var(--bg-1);
}

.screen[hidden] {
  display: none;
}

.screen-cap {
  display: none;
  margin-top: 14px;
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-2);
}

.screen img {
  max-height: 560px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- spec sheet ---------- */

.spec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
}

.spec > div {
  display: grid;
  grid-template-columns: 11em minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.spec dt {
  font-weight: 600;
  font-size: 0.9375rem;
}

.spec dd {
  font-size: 0.9375rem;
  color: var(--text-2);
}

/* ---------- preset families ---------- */

.families {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.family {
  padding-top: 20px;
  border-top: 2px solid var(--line-2);
}

.family:first-child {
  border-top-color: var(--accent-strong);
}

.family h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 3px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
  font-size: 0.875rem;
  color: var(--text-2);
}

/* PUBG, the preset the app is built around. */
.family:first-child .chips li:first-child {
  border-color: rgba(45, 212, 191, 0.4);
  background: var(--accent-tint);
  color: var(--accent);
}

.family-note {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-3);
}

/* ---------- install steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 20px;
  border-top: 2px solid var(--line-2);
}

.steps li:first-child {
  border-top-color: var(--accent-strong);
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 14px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.steps p {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--text-2);
}

/* ---------- pricing table ---------- */

.compare-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-1);
  overflow: hidden;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare th,
.compare td {
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.compare tbody th {
  font-weight: 400;
  text-align: left;
  color: var(--text-2);
}

.compare thead th,
.compare thead td {
  padding-top: 28px;
  padding-bottom: 24px;
  vertical-align: bottom;
}

.compare tfoot td {
  padding-top: 24px;
  padding-bottom: 28px;
  border-bottom: 0;
}

.compare .col-premium {
  width: 24%;
  background: rgba(20, 184, 166, 0.07);
}

.compare thead th:not(.col-premium),
.compare tbody td:not(.col-premium),
.compare tfoot td:nth-child(2) {
  width: 22%;
}

.plan-name {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
}

.plan-price {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  color: var(--text-2);
}

.amount {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.yes,
.no {
  display: inline-block;
  width: 18px;
  height: 18px;
  font-size: 0;
  color: transparent;
  vertical-align: middle;
}

.yes {
  background: no-repeat center / 18px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232dd4bf' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E");
}

.no {
  background: no-repeat center / 12px 1.5px linear-gradient(var(--text-3), var(--text-3));
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.faq-head {
  position: sticky;
  top: 96px;
}

.faq-head p {
  margin-top: 12px;
  color: var(--text-2);
}

.faq-list {
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

summary::after {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--text-2), var(--text-2)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--text-2), var(--text-2)) center / 1.5px 12px no-repeat;
  transition: transform 0.3s var(--ease);
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  padding: 0 0 22px;
  color: var(--text-2);
}

/* ---------- closing ---------- */

.closing {
  margin-top: var(--section);
  padding: clamp(56px, 7vw, 88px) 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
}

.closing-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 64px;
}

.closing p:not(.meta) {
  margin-top: 16px;
  max-width: 32em;
  color: var(--text-2);
}

.closing-actions .meta {
  margin-top: 12px;
}

/* ---------- footer ---------- */

.footer {
  padding: 56px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--text-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 48px;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 26em;
}

.footer .wordmark {
  color: var(--text);
  font-size: 1rem;
}

.footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer nav h2 {
  margin-bottom: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
}

.footer nav a {
  text-decoration: none;
}

.footer nav a:hover,
.footer nav a[aria-current='page'] {
  color: var(--text);
}

.legal {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--text-3);
}

/* ---------- policy and contact pages ---------- */

.doc {
  max-width: 760px;
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(64px, 9vw, 112px);
}

.doc h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.doc-updated {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-3);
}

.doc-summary {
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px solid var(--line-2);
  background: var(--bg-1);
  border-radius: 10px;
}

.doc h2 {
  margin-top: 48px;
  font-size: 1.375rem;
}

.doc p,
.doc ul {
  margin-top: 14px;
  color: var(--text-2);
}

.doc-summary p:first-child {
  margin-top: 0;
}

.doc ul {
  padding-left: 1.25em;
}

.doc li + li {
  margin-top: 6px;
}

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

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}

.contact-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.2s;
}

.contact-list a:hover {
  background: var(--bg-1);
}

.contact-list span {
  color: var(--text-2);
}

/* ---------- smaller screens ---------- */

@media (max-width: 960px) {
  .hero-grid,
  .try,
  .viewer,
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-shot {
    width: min(100%, 720px);
  }

  .demo {
    width: min(100%, 560px);
  }

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

  .viewer-screens {
    min-height: 0;
  }

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

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

  .faq-head {
    position: static;
  }
}

@media (max-width: 767px) {
  :root {
    font-size: 16px;
  }

  .nav {
    display: none;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 32px;
  }

  .actions .btn {
    flex: 1 1 auto;
  }

  .demo {
    padding: 22px;
  }

  .zones,
  .steps,
  .families {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .viewer-tabs button {
    padding: 12px 14px;
  }

  .viewer-tabs button > span {
    display: none;
  }

  .screen-cap {
    display: block;
  }

  .viewer-tabs strong {
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .viewer-tabs .tag {
    display: none;
  }

  .hero-shot {
    width: min(100%, 400px);
    margin: 0 auto;
  }

  .screen img {
    max-height: 520px;
  }

  .spec > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .compare th,
  .compare td {
    padding-left: 12px;
    padding-right: 12px;
  }

  .compare .amount {
    font-size: 1.625rem;
  }

  .compare tfoot .btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.8125rem;
    white-space: normal;
  }

  .closing-actions,
  .closing-actions .btn {
    width: 100%;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

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

  .fill,
  .switch-knob,
  .switch-track,
  summary::after {
    transition: none;
  }
}

/* ---------- buy page ---------- */

.buy {
  margin-top: 40px;
}

.buy-form {
  display: grid;
  gap: 20px;
  max-width: 480px;
}

.buy-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.buy-field input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg-1);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.buy-field input:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.buy-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.buy-check input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--accent-strong);
}

.buy-check a {
  color: var(--accent);
}

.buy-form .btn {
  justify-self: start;
}

.buy-form .btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.buy-error {
  color: #fbbf24;
  font-size: 0.9375rem;
}

.buy-qr {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.buy-qr img {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
}

.buy-amount {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.buy-steps {
  margin: 16px 0 0;
  padding-left: 1.25em;
  color: var(--text-2);
}

.buy-steps li + li {
  margin-top: 6px;
}

.buy-steps a {
  color: var(--accent);
}

.buy-wait {
  margin-top: 20px;
  font-weight: 600;
  color: var(--accent);
}

.buy-wait::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  animation: buy-pulse 1.4s ease-in-out infinite;
}

@keyframes buy-pulse {
  50% {
    opacity: 0.25;
  }
}

.buy-ok {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.buy-done > p:not(.buy-ok):not(.fine) {
  margin-top: 20px;
  color: var(--text-2);
}

.buy-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-1);
}

.buy-key code {
  font: 600 1.25rem/1.3 'Cascadia Mono', Consolas, ui-monospace, monospace;
  letter-spacing: 0.04em;
  color: var(--text);
  word-break: break-all;
}

.buy-fail p {
  margin-bottom: 16px;
  color: var(--text-2);
}

@media (max-width: 767px) {
  .buy-qr {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .buy-key code {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .buy-wait::before {
    animation: none;
  }
}

/* ---------- buy page: Google sign-in ---------- */

.buy-login {
  display: grid;
  gap: 16px;
  max-width: 520px;
}

.doc .buy-login h2 {
  margin-top: 0;
}

.buy-login > p:not(.note):not(.buy-error) {
  margin-top: 0;
}

.buy-google {
  min-height: 44px;
}

.buy-account {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-1);
  font-size: 0.9375rem;
  color: var(--text-2);
}

.buy-account strong {
  color: var(--text);
}

.buy-account-email {
  color: var(--text-3);
}

.buy-owned {
  padding: 16px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 10px;
  background: var(--accent-tint);
}

.doc .buy-owned p,
.doc .buy-owned ul {
  margin-top: 0;
}

.buy-owned ul {
  margin-top: 10px !important;
  padding: 0;
  list-style: none;
}

.buy-owned code {
  font: 600 1rem/1.6 'Cascadia Mono', Consolas, ui-monospace, monospace;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* ---------- header: sign-in and account menu ---------- */

.bar-account {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-right: -24px; /* sits closer to the download button than the nav gap */
}

.bar-account:empty {
  display: none;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px 3px 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.account-menu summary::after {
  display: none;
}

.account-menu[open] summary,
.account-menu summary:hover {
  border-color: var(--accent);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-size: 0.8125rem;
  font-weight: 700;
}

.account-name {
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  display: grid;
  min-width: 240px;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg-2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
}

.account-pop p {
  padding: 6px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--text-3);
  overflow-wrap: anywhere;
}

.account-pop a,
.account-pop button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-pop a:hover,
.account-pop button:hover {
  background: var(--bg-1);
}

.account-pop button {
  color: var(--text-2);
}

/* ---------- Premium page: signed-in home ---------- */

.buy-home {
  display: grid;
  gap: 28px;
  max-width: 560px;
}

.buy-account-who {
  display: grid;
}

.doc .buy-home h2,
.doc .buy-form h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.buy-owned {
  display: grid;
  gap: 14px;
}

.buy-keys {
  display: grid;
  gap: 10px;
  padding: 0 !important;
  list-style: none;
}

.buy-keys .buy-key {
  margin-top: 0;
}

.buy-key-date {
  flex-basis: 100%;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.buy-includes {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  display: grid;
  gap: 8px;
}

.buy-includes li {
  position: relative;
  padding-left: 26px;
  color: var(--text-2);
}

.buy-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 16px;
  height: 16px;
  background: no-repeat center / 16px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232dd4bf' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E");
}

.doc .buy-owned .fine .text-link {
  font-size: inherit;
}

@media (max-width: 767px) {
  .bar-download {
    display: none;
  }

  .bar-account {
    margin-right: 0;
  }

  .account-name {
    display: none;
  }

  .account-menu summary {
    padding-right: 3px;
  }
}

/* ---------- our sign-in button ---------- */

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.btn-google:hover {
  border-color: var(--accent);
  background: #16203a;
}

.btn-google:active {
  transform: translateY(1px);
}

.g-logo {
  flex: none;
  width: 18px;
  height: 18px;
}

.btn-google-lg {
  min-height: 52px;
  padding: 0 24px 0 18px;
  gap: 12px;
  border-radius: 10px;
  font-size: 1rem;
}

.btn-google-lg .g-logo {
  width: 20px;
  height: 20px;
}

@media (max-width: 767px) {
  .bar-account .btn-google {
    padding: 0 12px 0 10px;
  }
}
