/* Shared by the tools hub and each per-tool page. The front page and the
   article keep their own inline styles: they are one-offs, these are a set. */

:root {
  color-scheme: light;
  --paper:    #edeee9;
  --ink:      #232b28;
  --muted:    #5e6863;
  --faint:    #c3c8c1;
  --rule:     #d8dbd4;
  --term-bg:  #1b2020;
  --term-fg:  #d8ded8;
  --term-dim: #7d8a85;
  --m1:       #b3261e;
  --m4:       #5c8c2b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Newsreader, Georgia, 'Times New Roman', serif;
  font-size: 19px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #d5ddd2; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2.5px; text-decoration-color: var(--faint); }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Wider than the article, narrower than the front page: prose mixed with
   command lines and file paths needs room, but not 64rem of it. */
.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 3.25rem;
  font-size: 0.86rem;
}
.wordmark { font-weight: 500; }
.masthead .crumb { color: var(--muted); }

h1 {
  font-size: 2.3rem;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}

h2 {
  font-size: 1.45rem;
  font-weight: 500;
  margin: 3.1rem 0 1.05rem;
  letter-spacing: -0.008em;
}

h3 {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 2.2rem 0 0.7rem;
}

p { margin: 0 0 1.2rem; }

.standfirst { font-size: 1.18rem; line-height: 1.56; }

code {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84em;
  background: #e3e5df;
  padding: 0.08em 0.3em;
}

/* ---- third-party marks ------------------------------------------------
   Flattened to one ink via an alpha mask, so nothing inside the files
   matters: colour, fill rules, viewBox. A set drawn at 24px and one drawn
   at 128px land at the same weight, and evenodd cut-outs stay open.

   These are other companies' trademarks, used to state compatibility.
   See ../logos/README.md before touching any of it. */
.mark {
  display: inline-block;
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  background-color: var(--ink);
  -webkit-mask: var(--mark) no-repeat center / contain;
  mask: var(--mark) no-repeat center / contain;
}
.m-claude { --mark: url("/logos/claude.svg"); }
.m-openai { --mark: url("/logos/openai.svg"); }
.m-cursor { --mark: url("/logos/cursor.svg"); }
.m-devin  { --mark: url("/logos/devin.svg"); }
.m-cline  { --mark: url("/logos/cline.svg"); }
.m-vscode { --mark: url("/logos/vscode.svg"); }
.m-shell  { --mark: url("/logos/shell.svg"); }
.m-linux  { --mark: url("/logos/linux.svg"); }
.m-apple  { --mark: url("/logos/apple.svg"); }

/* The page's own subject, above its title. */
.mark-lg { width: 2.6rem; height: 2.6rem; margin-bottom: 1.1rem; }

/* ---- the hub grid ----------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 1.8rem 0 0;
}
.card {
  background: var(--paper);
  padding: 1.3rem 1.25rem 1.4rem;
  text-decoration: none;
}
.card:hover { background: #e5e7e1; }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.card .mark { width: 1.6rem; height: 1.6rem; }
.card .name {
  display: block;
  margin: 0.75rem 0 0.3rem;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
}
.card .what { display: block; font-size: 0.92rem; color: var(--muted); line-height: 1.5; }

/* ---- what the installer touched --------------------------------------
   Reference material you come back to, not something to read through. */
.writes {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 1.3rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--rule);
  overflow-wrap: anywhere;
}
.writes b { font-weight: 400; color: var(--ink); }

/* ---- quoted terminal output ------------------------------------------ */

figure { margin: 1.6rem 0; }
figure pre {
  margin: 0;
  background: var(--term-bg);
  color: var(--term-fg);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.62;
  white-space: pre;
  tab-size: 2;
}
figure .sigil { color: var(--term-dim); }
figure .dim { color: var(--term-dim); }
figure .ok { color: var(--m4); }
figcaption {
  font-style: italic;
  color: var(--muted);
  font-size: 0.93rem;
  margin-top: 0.8rem;
}

ul.plain { margin: 0 0 1.2rem; padding-left: 1.2rem; }
ul.plain li { margin-bottom: 0.45rem; }

.note {
  border: 1px solid var(--rule);
  padding: 1rem 1.1rem;
  margin: 0 0 1.3rem;
  font-size: 0.95rem;
}
.note p:last-child { margin-bottom: 0; }

footer {
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}
footer p { margin: 0 0 0.6rem; }
footer .affil { margin-top: 1.6rem; margin-bottom: 0; }

@media (max-width: 38rem) {
  body { font-size: 18px; }
  .page { padding: 1.75rem 1.1rem 3.5rem; }
  .masthead { padding-bottom: 2.25rem; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.3rem; }
  .grid { grid-template-columns: 1fr; }
}
