/* The TigerTag Python 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;
  --shadow: rgba(0, 0, 0, .45);
  --t-com: #7d8590; --t-str: #a5d6a7; --t-kw: #ff9e5e; --t-num: #79c0ff; --t-cmd: #f58220;
  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;
    --shadow: rgba(0, 0, 0, .12);
    --t-com: #6a737d; --t-str: #1a7f37; --t-kw: #b04a08; --t-num: #0550ae; --t-cmd: #b04a08;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f5f7; --card: #ffffff; --line: #dde0e6; --text: #16181d;
  --muted: #5d6470; --accent: #e06d0c; --link: #b04a08; --code: #f0f1f4;
  --shadow: rgba(0, 0, 0, .12);
  --t-com: #6a737d; --t-str: #1a7f37; --t-kw: #b04a08; --t-num: #0550ae; --t-cmd: #b04a08;
  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; }
section { margin-top: 64px; scroll-margin-top: 80px; }

/* Header: the logo, the sections, 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: 650; color: var(--muted); letter-spacing: .02em; margin-left: 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: 22px; flex: 1; justify-content: center; flex-wrap: wrap; }
.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 {
  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 { width: 40px; justify-content: center; }
.langbtn { padding: 0 12px; list-style: none; }
.langbtn::-webkit-details-marker { display: none; }
.themebtn:hover, .langbtn:hover { border-color: var(--accent); color: var(--text); }
.themebtn svg, .langbtn 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 name and the call to action, the install and quick start beside them. */
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 40px; align-items: center; margin-top: 44px; }
.kicker { color: var(--accent); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 10px; }
h1 { margin: 0; font-size: clamp(3rem, 1.8rem + 5vw, 5.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
h1 span { color: var(--accent); }
h1 em { display: block; font-style: normal; font-size: .46em; font-weight: 750; letter-spacing: -.01em; margin-top: 10px; color: var(--text); }
.headline { text-wrap: balance; margin: 18px 0 12px; color: var(--text); font-weight: 650; line-height: 1.25; font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem); }
.lead { font-size: 1.08rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.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: var(--accent); border-color: var(--accent); color: #1a0f05; }
.btn.small { padding: 8px 14px; font-size: .9rem; }

/* The code window. */
.term { margin: 0; background: var(--code); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px -24px var(--shadow); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.term-bar i:first-child { background: var(--accent); }
.term-bar span { margin-left: 8px; font: 600 .8rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.term-body { padding: 16px; display: grid; gap: 12px; }
.term-body pre { background: transparent; border: 0; padding: 4px 6px; margin: 0; }
.term code { font-size: .8rem; }
.term-body .install { border-bottom: 1px dashed var(--line); padding-bottom: 14px; }
.term figcaption { padding: 0 22px 16px; font-size: .88rem; color: var(--muted); }

/* Four facts. */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.fact b { display: block; font-size: 1.6rem; 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; }
.card p:last-child { margin-bottom: 0; }
.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; align-items: start; }
.stack2 { display: grid; gap: 16px; }
.ico { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.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; background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
code { font: .9rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
.t-com { color: var(--t-com); font-style: italic; }
.t-str { color: var(--t-str); }
.t-kw { color: var(--t-kw); font-weight: 600; }
.t-num { color: var(--t-num); }
.t-cmd { color: var(--t-cmd); font-weight: 600; }
.t-prompt { color: var(--muted); user-select: none; }

/* A code block with its copy button. */
.codebox { position: relative; margin: 0 0 14px; }
.term .codebox { margin: 0; }
.codebox pre { padding-right: 14px; }
.copy {
  position: absolute; top: 8px; right: 8px; font: 600 .75rem system-ui, sans-serif; color: var(--muted); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px;
}
.copy:hover, .copy:focus-visible { color: var(--text); border-color: var(--accent); }
/* Shown when the block is pointed at or focused, so it never hides the code; always on touch screens. */
@media (hover: hover) { .copy { opacity: 0; transition: opacity .15s ease; } .codebox:hover .copy, .copy:focus-visible, .copy.is-done { opacity: 1; } }
.copy.is-done { color: var(--accent); border-color: var(--accent); }

/* Get started. */
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps .card { display: flex; flex-direction: column; min-width: 0; }
.card, .codebox, .term { min-width: 0; }
.steps .card p { flex: 1; }
.steps .codebox { margin: 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; }
.extras { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: 24px; align-items: center; }
.extras .codebox { margin: 0; }
.layout img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); margin: 6px 0 14px; }

/* 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: 28px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .extras { grid-template-columns: minmax(0, 1fr); }
}
/* Phone. */
@media (max-width: 639px) {
  .wrap { width: calc(100% - 32px); }
  section { margin-top: 44px; }
  .facts, .steps, .grid3 { 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; }
  code { font-size: .82rem; }
}
