/* Terrella — the page's palette is the app's palette, sampled from a screenshot
   rather than invented. Single theme, painted explicitly. */

:root {
  --ink:       #1B1F22;  /* the app's sidebar */
  --surface:   #272D2F;  /* the app's window ground */
  --surface-2: #2E3538;
  --line:      #363D40;
  --paper:     #DFE0E0;  /* the app's primary text */
  --muted:     #9AA1A4;
  --accent:    #4C8DF6;  /* the app's own blue */

  /* the app's per-type accents, used as-is */
  --t-person: #4C8DF6;  --t-org: #A970D8;   --t-place: #E0524A;
  --t-inter:  #43B36B;  --t-note: #8E9AA4;  --t-book: #A9784F;
  --t-idea:   #D9B03C;  --t-topic: #E08B3C; --t-project: #6E6CE0;
  --t-goal:   #DE5E9B;  --t-skill: #3FA8A4; --t-decision: #45A9C4;

  --measure: 34rem;
  --step--1: 0.8125rem;
  --step-0:  1.0625rem;
  --step-1:  1.25rem;
  --step-2:  1.55rem;
  --step-3:  2rem;
  --step-4:  clamp(2.1rem, 4.2vw, 3rem);
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 600; letter-spacing: -0.012em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2.5rem, 66rem); margin-inline: auto; }
.measure { max-width: var(--measure); }

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

/* ---------- masthead ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.4rem 0; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-size: var(--step-1); font-weight: 600; color: var(--paper); text-decoration: none; letter-spacing: -0.01em; }
.masthead nav { display: flex; gap: 1.5rem; font-size: var(--step--1); }
.masthead nav a { color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--paper); }

/* ---------- hero ---------- */
.hero { padding: 3.5rem 0 0; }
.hero h1 { font-size: var(--step-4); line-height: 1.15; max-width: 22ch; }
.hero p.lede { font-size: var(--step-1); color: var(--muted); margin: 1.1rem 0 0; max-width: 46ch; line-height: 1.5; font-weight: 400; }

.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-top: 1.75rem; }
.btn {
  display: inline-block; padding: 0.6rem 1.15rem; border-radius: 6px;
  background: var(--accent); color: #0E1A2E; font-weight: 600;
  text-decoration: none; font-size: var(--step--1);
}
.btn:hover { background: #6FA3F8; color: #0E1A2E; }
.btn-quiet { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-quiet:hover { color: var(--paper); border-color: var(--muted); background: transparent; }

.hero-shot { margin: 2.75rem 0 0; }

/* ---------- the chain ---------- */
.chain { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.chain li { display: grid; grid-template-columns: auto 1fr; gap: 0 0.9rem; align-items: start; }
.chain .node { grid-column: 2; padding: 0.1rem 0; color: var(--paper); }
.chain .dot { grid-column: 1; width: 8px; height: 8px; border-radius: 50%; margin-top: 0.55rem; background: var(--muted); }
.chain .edge {
  grid-column: 2; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: var(--step--1); color: var(--muted); padding: 0.05rem 0 0.3rem;
}
.chain .rail { grid-column: 1; width: 1px; background: var(--line); margin: 0 auto; min-height: 1.3rem; }

/* ---------- sections ---------- */
section { padding: 3.5rem 0; border-top: 1px solid var(--line); }
section h2 { font-size: var(--step-3); line-height: 1.2; }
section .body { color: var(--muted); margin: 1rem 0 0; }
section .body strong { color: var(--paper); font-weight: 500; }

.split { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 60rem) { .split { grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; } }

/* ---------- inverse label pairs ---------- */
.pairs { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.pairs li {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.9rem; align-items: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--step--1);
  padding: 0.6rem 0; border-bottom: 1px solid var(--line);
}
.pairs li:first-child { border-top: 1px solid var(--line); }
.pairs .from { text-align: right; color: var(--paper); }
.pairs .to { text-align: left; color: var(--paper); }
.pairs .swap { color: var(--muted); }

/* ---------- screenshots ---------- */
figure { margin: 0; }
figure img {
  display: block; width: 100%; height: auto; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
}
figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 0.8rem; line-height: 1.5; }
.shots { display: grid; gap: 2rem; grid-template-columns: 1fr; margin-top: 2.5rem; }
@media (min-width: 52rem) { .shots { grid-template-columns: 1fr 1fr; } }

/* ---------- the twelve kinds ---------- */
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.55rem 1.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.kinds li { display: flex; align-items: center; gap: 0.55rem; font-size: var(--step--1); color: var(--paper); }
.kinds .swatch { width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* ---------- plain claims ---------- */
.keeps { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
.keeps p { margin: 0; color: var(--muted); }
.keeps b { color: var(--paper); font-weight: 600; display: block; margin-bottom: 0.15rem; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; color: var(--muted); font-size: var(--step--1); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.75rem 3rem; justify-content: space-between; align-items: start; }
footer nav { display: flex; flex-direction: column; gap: 0.45rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--paper); }
.colophon { max-width: 26rem; line-height: 1.6; }

/* ---------- document pages ---------- */
.doc { padding: 2.75rem 0 2rem; }
.doc h1 { font-size: var(--step-3); line-height: 1.2; }
.doc h2 { font-size: var(--step-1); font-weight: 600; margin: 2.25rem 0 0.6rem; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--paper); font-weight: 500; }
.doc .updated { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--step--1); color: var(--muted); margin-top: 0.6rem; }
.doc ul { padding-left: 1.1rem; }
.doc li { margin: 0.45rem 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
