/* The TigerTag JavaScript SDK site — the look of the TigerTag protocol site (dark by
   default, light when the system asks for it or when chosen with the button). */
:root {
  --bg: #14161a; --card: #1e2128; --line: #2b2f38; --text: #f2f2f2;
  --muted: #9aa0aa; --accent: #f58220; --link: #f58220; --code: #101216;
  --c-comment: #7d8590; --c-string: #a5d6a7;
  --shadow: rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f7; --card: #ffffff; --line: #dde0e6; --text: #16181d;
    --muted: #5d6470; --accent: #e06d0c; --link: #b04a08; --code: #f0f1f4;
    --c-comment: #6a737d; --c-string: #1a7f37;
    --shadow: rgba(0, 0, 0, .12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f5f7; --card: #ffffff; --line: #dde0e6; --text: #16181d;
  --muted: #5d6470; --accent: #e06d0c; --link: #b04a08; --code: #f0f1f4;
  --c-comment: #6a737d; --c-string: #1a7f37;
  --shadow: rgba(0, 0, 0, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: clip;
}
a { color: var(--link); }
img { max-width: 100%; height: auto; }
.wrap { width: min(1200px, 100% - 48px); margin-left: auto; margin-right: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }
.muted, p { color: var(--muted); }
p { margin: 0 0 14px; }
b { color: var(--text); }
h1, h2, h3 { line-height: 1.2; color: var(--text); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); margin: 0 0 8px; letter-spacing: -.01em; }
h3 { font-size: 1.08rem; margin: 0 0 8px; }
.sub { font-size: 1.05rem; max-width: 760px; margin-bottom: 22px; }
.gap { margin-top: 48px; }
.center { text-align: center; }
section { margin-top: 64px; scroll-margin-top: 80px; }

/* Header: the logo, the sections, GitHub, the theme and the language. */
header.bar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.bar .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; white-space: nowrap; }
.brandmark b { color: var(--accent); }
.brandmark small { font-size: .78rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; }
.brandmark img { height: 36px; width: auto; }
.logo-light { display: none; }
:root[data-shown="light"] .logo-light { display: block; }
:root[data-shown="light"] .logo-dark { display: none; }
.nav { display: flex; gap: 18px; flex: 1; justify-content: center; flex-wrap: wrap; }
@media (max-width: 1320px) { .nav { gap: 12px; } .nav a { font-size: .88rem; } }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--text); }
.tools { display: flex; gap: 8px; align-items: center; }
.themebtn, .langbtn, .iconbtn {
  display: flex; align-items: center; gap: 6px; height: 40px; cursor: pointer; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: .9rem;
}
.themebtn, .iconbtn { width: 40px; justify-content: center; }
.langbtn { padding: 0 12px; list-style: none; }
.langbtn::-webkit-details-marker { display: none; }
.themebtn:hover, .langbtn:hover, .iconbtn:hover { border-color: var(--accent); color: var(--text); }
.themebtn svg, .langbtn svg, .iconbtn svg { width: 17px; height: 17px; flex: none; }
.themebtn .sun { display: none; }
:root[data-shown="light"] .themebtn .sun { display: block; }
:root[data-shown="light"] .themebtn .moon { display: none; }
.langbox { position: relative; }
.langlist {
  position: absolute; right: 0; top: 46px; margin: 0; padding: 6px; list-style: none; min-width: 180px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px var(--shadow);
}
.langlist a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.langlist a:hover, .langlist a[aria-current="true"] { background: var(--bg); color: var(--accent); }

/* Hero: the words and the install command, the quick start beside them. */
.hero { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 40px; align-items: center; margin-top: 40px; }
h1 { margin: 0; }
h1 .kicker, h1 .name { display: block; }
.kicker { color: var(--accent); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin-bottom: 10px; }
.hero .name { margin: 0; font-size: clamp(2.8rem, 1.6rem + 4.4vw, 4.8rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.hero .name span { color: var(--accent); }
.headline { text-wrap: balance; margin: 16px 0 12px; color: var(--text); font-weight: 650; line-height: 1.25; font-size: clamp(1.2rem, 1rem + 1vw, 1.65rem); }
.lead { font-size: 1.05rem; }
.install { display: flex; align-items: stretch; gap: 8px; margin-top: 20px; max-width: 460px; }
.install pre { flex: 1; margin: 0; font-size: 1.05rem; padding: 12px 16px; }
.install pre code::before { content: "$ "; color: var(--accent); }
.copybtn { flex: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; padding: 0 16px; border-radius: 10px;
  color: var(--text); background: var(--card); border: 1px solid var(--line); min-width: 84px; }
.copybtn:hover { border-color: var(--accent); }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; padding: 12px 20px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); color: var(--text); background: var(--card); font-weight: 600;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, #ff8a2b 0%, #ff7a18 55%, #e6352b 100%); border-color: transparent; color: #fff; }
.btn.small { padding: 8px 14px; font-size: .9rem; }
.show { margin: 0; }
.show figcaption { color: var(--muted); font-size: .92rem; text-align: center; margin-top: 12px; }
.window { background: var(--code); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -20px var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--card); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.window-bar i:first-child { background: #e6352b; } .window-bar i:nth-child(2) { background: #f58220; } .window-bar i:nth-child(3) { background: #3fb950; }
.window-bar span { margin-left: 8px; font: .82rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.window pre { margin: 0; border: 0; border-radius: 0; padding: 18px 20px; background: transparent; }
.window code { font-size: .8rem; line-height: 1.75; }

/* Four facts. */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.fact b { display: block; font-size: 1.5rem; color: var(--accent); line-height: 1.2; }
.fact span { color: var(--muted); font-size: .93rem; }

/* Cards and grids. */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; min-width: 0; }
.card p:last-child { margin-bottom: 0; }
.card.accent { border-color: var(--accent); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid2.tools-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.intro, .show { min-width: 0; }
.ico { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.pill { display: inline-block; font: 600 .78rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.more { display: inline-block; font-weight: 600; text-decoration: none; margin-top: 4px; }
.more:hover { text-decoration: underline; }
.links { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
pre { margin: 0 0 14px; background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
pre:last-child { margin-bottom: 0; }
code { font: .88rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
code .c { color: var(--c-comment); }
code .s { color: var(--c-string); }
pre.alt code { color: var(--muted); }

/* Get started. */
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); grid-template-rows: auto auto 1fr; column-gap: 28px; align-items: start; }
.steps li > .num, .steps li > h3, .steps li > p { grid-column: 1; }
.steps li > .code { grid-column: 2; grid-row: 1 / span 3; min-width: 0; }
.num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #1a0f05; font-weight: 800; margin-bottom: 12px; }
.steps code { font-size: .84rem; }

/* Playground. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* FAQ. */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 12px 0; color: var(--text); }
.faq details p { padding-bottom: 6px; }

/* The call at the end. */
.join {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 30px 32px; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, #c2410c 0%, #b03a12 55%, #9a2f12 100%);
}
.join h2, .join p { color: #fff; margin: 0 0 6px; }
.joinbtn { flex: none; padding: 14px 26px; border-radius: 999px; text-decoration: none; background: #fff; color: #9a2f12; font-weight: 700; white-space: nowrap; }
footer.foot { margin-top: 48px; padding: 28px 0 48px; border-top: 1px solid var(--line); text-align: center; font-size: .9rem; }
footer.foot .links { justify-content: center; }

/* Tablet. */
@media (max-width: 999px) {
  .nav { display: none; }
  header.bar .wrap { justify-content: space-between; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .intro { text-align: center; }
  .install { margin-left: auto; margin-right: auto; }
  .ctas { justify-content: center; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .steps li { grid-template-columns: minmax(0, 1fr); }
  .steps li > .code { grid-column: 1; grid-row: auto; }
  .split { grid-template-columns: minmax(0, 1fr); }
}
/* Phone. */
@media (max-width: 639px) {
  .wrap { width: calc(100% - 32px); }
  section { margin-top: 44px; }
  .facts, .grid2, .grid2.tools-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 20px; border-radius: 14px; }
  .join { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .joinbtn { align-self: stretch; text-align: center; }
  .langbtn span, .brandmark small { display: none; }
  .window code { font-size: .78rem; }
}
