/* TumbleTrove hosted-page starter stylesheet.
 * Copy this file into the page folder and link it relatively:
 *   <link rel="stylesheet" href="tt-page.css">   (or ../../tt-page.css from a node page)
 * The page runs sandboxed with an opaque origin, so no web fonts from files:
 * the stack below uses Inter only when the viewer has it installed. */

:root {
  --tt-ground: #171717;
  --tt-surface: #242424;
  --tt-muted-surface: #262626;
  --tt-text: #fafafa;
  --tt-muted: #a6a6a6;
  --tt-border: #454545;
  --tt-accent: #228b6b;
  --tt-accent-text: #3fbf95;
  --tt-radius: 8px;
  --tt-max: 960px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--tt-ground);
  color: var(--tt-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.tt-page {
  max-width: var(--tt-max);
  margin: 0 auto;
  padding: 32px 16px 64px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 1.6em 0 0.5em;
}
h1 {
  font-size: 2rem;
  margin-top: 0;
}
h2 {
  font-size: 1.5rem;
  padding-top: 0.5em;
  border-top: 1px solid var(--tt-border);
}
h3 {
  font-size: 1.15rem;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

a {
  color: var(--tt-accent-text);
}
a:hover {
  color: var(--tt-text);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--tt-muted-surface);
  border: 1px solid var(--tt-border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

.tt-lead {
  font-size: 1.15rem;
  color: var(--tt-muted);
  margin-bottom: 1.5em;
}

.tt-meta {
  color: var(--tt-muted);
  font-size: 0.9rem;
}

/* Images and clips scale to the column and never overflow sideways. */
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--tt-radius);
  border: 1px solid var(--tt-border);
  background: var(--tt-surface);
}

figure {
  margin: 1.25em 0;
}
figcaption {
  color: var(--tt-muted);
  font-size: 0.9rem;
  margin-top: 0.5em;
}

/* Two media side by side on wide screens, stacked on phones. */
.tt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.tt-card {
  background: var(--tt-surface);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  padding: 16px;
}

.tt-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1em 0.55em;
  border-radius: 999px;
  border: 1px solid var(--tt-accent);
  color: var(--tt-accent-text);
}

/* Parameter and connector tables scroll inside their own box. */
.tt-table {
  overflow-x: auto;
  margin: 1em 0;
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
}
.tt-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.tt-table th,
.tt-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 1px solid var(--tt-border);
}
.tt-table th {
  background: var(--tt-surface);
  font-weight: 600;
}
.tt-table tr:last-child td {
  border-bottom: 0;
}
