/* TinyTrigger website: one shared stylesheet for every page.
   No web fonts, no framework, no build step. Dark mode follows the system. */

:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #566070;
  --line: #e2e5ea;
  --field: #f8f9fa;
  --accent: #f59e0b;
  --accent-line: #b45309; /* amber dark enough for underlines and focus rings on light backgrounds */
  --ink: #1f1300;
  --ok: #15803d;
  --no: #6b7280;
  --frame: #000000;
  --frame-line: #000000;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .04);
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, .05), 0 16px 40px rgba(0, 0, 0, .08);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;
  --wrap: 1120px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1317;
    --card: #171f27;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --line: #2b3641;
    --field: #0f161c;
    --accent: #fbbf24;
    --accent-line: #fbbf24;
    --ink: #1a1100;
    --ok: #4ade80;
    --no: #9ca3af;
    --frame-line: #2b3641;
    --shadow-sm: none;
    --shadow-lg: none;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

h1, h2, h3, p, ul, ol, dl, dd, figure, pre, table { margin: 0; }
ul, ol { padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 3px; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
video:focus-visible,
pre:focus-visible {
  outline: 3px solid var(--accent-line);
  outline-offset: 3px;
  border-radius: 4px;
}

code, kbd, pre { font-family: var(--mono); font-size: .9em; }
strong { font-weight: 650; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.01em;
  text-decoration: none;
}
.brand img { width: 26px; height: 24px; }
.site-nav { display: flex; align-items: stretch; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Type ---------- */

h1 {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.028em;
  font-weight: 750;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -.018em;
  font-weight: 700;
  text-wrap: balance;
}
h3 { font-size: 1rem; line-height: 1.4; font-weight: 700; }

.eyebrow {
  font-size: 13px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--muted); max-width: 34em; }
.lead strong { color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.55; }
.nowrap { white-space: nowrap; }

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: .12em .5em .16em;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 7px;
  background: var(--field);
  color: var(--text);
  font-size: .82em;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}
.keys { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--muted); }

p code, li code, dd code, td code {
  padding: .1em .38em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  font-size: .86em;
  overflow-wrap: anywhere;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-quiet:hover { filter: none; border-color: var(--muted); }
.btn-small { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
.btn-wide { width: 100%; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card-lift { box-shadow: var(--shadow-lg); }

/* ---------- Home: hero ---------- */

.hero { padding: 72px 0 0; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: end;
}
.hero h1 { margin: 14px 0 22px; }
.hero .actions { margin: 30px 0 14px; }

.trigger-card { padding: 22px 24px 20px; }
.trigger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 16px;
  margin: 10px 0 16px;
  border-bottom: 1px solid var(--line);
}
.trigger-head kbd { font-size: .9em; }
.trigger-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.chain { list-style: none; counter-reset: s; }
.chain li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 14px;
  margin: 0 0 14px;
}
.chain li::before {
  content: counter(s);
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font: 700 13px/26px var(--sans);
  text-align: center;
}
.chain b { font-weight: 650; line-height: 26px; }
.chain code { padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.trigger-card .small { padding-top: 14px; border-top: 1px solid var(--line); }

.shot { margin: 56px 0 0; }
.shot-frame {
  background: var(--frame);
  border: 1px solid var(--frame-line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.shot-frame img { width: 100%; margin: 0 auto; }
.shot figcaption, .caption { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ---------- Sections: heading on the left, content on the right ---------- */

.section { padding: 88px 0 0; }
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px 64px;
  align-items: start;
}
.section-head h2 { margin: 10px 0 14px; }
.section-head p + p { margin-top: 12px; }
.section-body > * + * { margin-top: 22px; }
main > .section:last-child, main > .page:last-child { padding-bottom: 96px; }

.spec { border-top: 1px solid var(--line); }
.spec > div {
  display: grid;
  grid-template-columns: 11.5em minmax(0, 1fr);
  gap: 4px 24px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.spec dt { font-weight: 650; }
.spec dd { color: var(--muted); }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.duo .card h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.duo .card p + p { margin-top: 12px; }
.flow {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .02em;
  color: var(--muted);
}
.flow .arrow { color: var(--accent-line); margin: 0 3px; }

.plain { list-style: none; border-top: 1px solid var(--line); }
.plain li { padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.plain li strong { color: var(--text); }

.code {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  box-shadow: var(--shadow-sm);
  tab-size: 2;
}
.code .k { color: var(--muted); }

.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 8px 8px 14px;
  min-height: 50px;
}
.cmd code {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
}

.install h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.install .card > * + * { margin-top: 14px; }
.install .card > h3 + p { margin-top: 0; }

video.demo {
  width: 100%;
  aspect-ratio: 1536 / 880;
  background: #000;
  border: 1px solid var(--frame-line);
  border-radius: 14px;
}

/* ---------- Comparison table ---------- */

.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td {
  padding: 13px 16px 13px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.compare thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.compare tbody th { font-weight: 500; color: var(--muted); width: 38%; }
.compare td { width: 31%; }
.compare td:last-child, .compare th:last-child { padding-right: 0; }
.compare .pick { font-weight: 650; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

/* ---------- Inner pages ---------- */

.page { padding: 64px 0 0; }
.page-head { max-width: 720px; }
.page-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.75rem); margin: 12px 0 16px; }

.buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px 64px;
  align-items: start;
  margin-top: 48px;
}
.buy-main > section + section { margin-top: 56px; }
.buy-main h2 { margin-bottom: 18px; font-size: 1.375rem; }
.buy-card { position: sticky; top: 24px; padding: 30px 28px; }
.price { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 6px; }
.price b { font-size: 3.25rem; line-height: 1; letter-spacing: -.03em; font-weight: 750; }
.buy-card form { margin: 22px 0 18px; }
.buy-card .btn { padding: 15px 20px; font-size: 16px; }
.notes { list-style: none; font-size: 14px; line-height: 1.55; color: var(--muted); }
.notes li { padding: 10px 0; border-top: 1px solid var(--line); }
.notes li:last-child { padding-bottom: 0; }
.notes strong { color: var(--text); }

.steps { list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; margin: 0 0 14px; }
.steps li::before {
  content: counter(s);
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font: 700 13px/26px var(--sans);
  text-align: center;
}
.steps li > span { min-width: 0; }

.faq { border-top: 1px solid var(--line); }
.faq > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.faq dt { font-weight: 650; margin-bottom: 4px; }
.faq dd { color: var(--muted); }

/* ---------- Legal pages ---------- */

.prose { max-width: 720px; margin-top: 32px; padding: 36px 40px; }
.prose h2 { font-size: 1.1875rem; letter-spacing: -.01em; margin: 34px 0 10px; }
.prose > h2:first-child { margin-top: 0; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 12px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent); }
.prose .caps { font-size: 14px; line-height: 1.6; letter-spacing: .01em; }
.callout {
  max-width: 720px;
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--card);
  font-weight: 650;
}

/* ---------- Changelog ---------- */

.releases { margin-top: 40px; border-top: 1px solid var(--line); }
.release {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 16px 64px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.release:last-child { border-bottom: 0; }
.release-head { position: sticky; top: 20px; align-self: start; }
.release-head h2 { display: inline; font-size: 1.5rem; font-family: var(--mono); letter-spacing: -.02em; }
.release-head h2 a { text-decoration: none; }
.release-head h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent-line); }
.release-date { margin-top: 6px; color: var(--muted); font-size: 14px; }
.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  vertical-align: 4px;
  white-space: nowrap;
}
.badge-new { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.release-body { max-width: 680px; }
.release-body h3 {
  margin: 26px 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 650;
}
.release-body h3:first-child { margin-top: 6px; }
.release-body ul { list-style: none; }
.release-body li { position: relative; padding-left: 18px; margin: 8px 0; color: var(--muted); }
.release-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.release-body li strong { color: var(--text); }

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

.site-footer { margin-top: 0; border-top: 1px solid var(--line); background: var(--card); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  padding-top: 28px;
  padding-bottom: 36px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer a { text-decoration-thickness: 1px; }
.site-footer a:hover { color: var(--text); text-decoration-thickness: 2px; }

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

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero-grid, .section-grid, .buy-grid, .release { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 36px; }
  .section { padding-top: 64px; }
  .section-grid { gap: 24px; }
  .shot { margin-top: 36px; }
  .buy-card, .release-head { position: static; }
  .buy-grid .buy-card { grid-row: 1; }
  .release { padding: 32px 0; gap: 12px; }
  .page { padding-top: 44px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 15.5px; }
  .lead { font-size: 1.0625rem; }
  .site-header .wrap { gap: 8px; }
  .site-nav a { padding: 0 8px; font-size: 14px; }
  /* Four links do not fit next to the logo on a phone; the footer has the Slashpaf link too. */
  .site-nav a[href="https://slashpaf.com"] { display: none; }
  .card { padding: 20px; border-radius: 14px; }
  .trigger-card { padding: 18px 18px 16px; }
  .shot-frame { padding: 6px; border-radius: 12px; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .spec > div { grid-template-columns: minmax(0, 1fr); }
  .hero .actions .btn { flex: 1 1 100%; }
  .prose { padding: 24px 20px; }
  .compare { font-size: 14px; }
  .compare th, .compare td { padding-right: 10px; }
  .compare tbody th { width: 34%; }
  .cmd { flex-direction: column; align-items: stretch; padding: 12px; }
  .site-footer .wrap { flex-direction: column; }
  main > .section:last-child, main > .page:last-child { padding-bottom: 64px; }
}

@media (max-width: 380px) {
  .brand span { font-size: 16px; }
  .site-nav a { padding: 0 6px; }
}

/* Very narrow phones (320 px): keep logo and links from touching. */
@media (max-width: 340px) {
  .brand { gap: 6px; }
  .brand span { font-size: 15px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 0 5px; font-size: 13px; }
}

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

@media print {
  .site-header, .site-footer, .skip, video { display: none; }
  body { background: #fff; }
}
