/* Shared styles for the static content pages: terms.html and docs/*.html.
   Colours come from theme.css, so pages follow the selected theme. */

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main,
footer {
  width: 100%;
  max-width: 46em;
  margin: 0 auto;
  padding-left: 1.25em;
  padding-right: 1.25em;
}



main {
  flex: 1;
  padding-top: 1.5em;
  padding-bottom: 3em;
}

h1 {
  font-size: clamp(52px, 7vw, 88px);
  line-height: 1.04;
  margin: 0 0 0.3em;
  font-weight: 500;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  margin: 1.8em 0 0.4em;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

a {
  color: var(--accent);
}

code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92em;
}

ul {
  padding-left: 1.3em;
}

li {
  margin: 0.3em 0;
}

footer {
  padding-top: 1.25em;
  padding-bottom: 2em;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875em;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5em 1.5em;
}


h2 code,
h3 code {
  font-size: 0.9em;
}

h3 {
  font-size: 18px;
  margin: 1.5em 0 0.3em;
  font-weight: 600;
  line-height: 1.3;
}

.lead {
  font-size: 1.08em;
  color: var(--fg-2);
}

pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.5em;
  padding: 0.9em 1em;
  overflow-x: auto;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.86em;
  line-height: 1.5;
}

pre code {
  font-size: inherit;
}

ol {
  padding-left: 1.4em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93em;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5em 0.75em 0.5em 0;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.note {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  border-radius: 0.3em;
  padding: 0.75em 1em;
  margin: 1em 0;
}

.note p {
  margin: 0;
}

/* Wider pages (docs): the same 72rem column as the site header, lined up
   with its logo. */
.page-wide main,
.page-wide footer {
  max-width: 75rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Tabs without script: radio buttons (visually hidden) with labels as the
   tabs; the checked one shows its panel. Arrow keys move between them. */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.3rem;
  margin: 1em 0 0;
}

.tabs > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tabs > label {
  position: relative;
  z-index: 1;
  padding: 0.55em 1em;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 0.5em 0.5em 0 0;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}

.tabs > label:hover {
  color: var(--text);
}

.tabs > input:checked + label {
  color: var(--text);
  background: var(--panel);
  border-color: var(--border);
  margin-bottom: -1px;
  padding-bottom: calc(0.55em + 1px);
}

.tabs > input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tab-panel {
  display: none;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0 0.5em 0.5em 0.5em;
  padding: 0.4em 1.25em 1em;
}

.tab-panel pre {
  background: var(--bg);
}

.tab-panel h3:first-child {
  margin-top: 0.8em;
}

#tab-chatgpt:checked ~ #panel-chatgpt,
#tab-claude:checked ~ #panel-claude,
#tab-gemini:checked ~ #panel-gemini,
#tab-vscode:checked ~ #panel-vscode,
#tab-cursor:checked ~ #panel-cursor,
#tab-claudecode:checked ~ #panel-claudecode,
#tab-codex:checked ~ #panel-codex,
#tab-grok:checked ~ #panel-grok,
#tab-grokcli:checked ~ #panel-grokcli,
#tab-copilot:checked ~ #panel-copilot,
#tab-other:checked ~ #panel-other,
#tab-advanced:checked ~ #panel-advanced,
#tab-unix:checked ~ #panel-unix,
#tab-windows:checked ~ #panel-windows,
#tab-source:checked ~ #panel-source {
  display: block;
}

/* A link styled as a button: one-click installs in the docs. */
.button-link {
  display: inline-block;
  padding: 0.5em 1em;
  border-radius: 0.5em;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  text-decoration: none;
}

.button-link:hover {
  filter: brightness(1.08);
}

/* Docs index: a list of documents as cards. */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 1.2em 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1rem;
}

.doc-list li {
  margin: 0;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  height: 100%;
  padding: 1.1em 1.25em;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.6em;
  color: var(--text);
  text-decoration: none;
}

.doc-card:hover {
  border-color: var(--accent);
}

.doc-title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.doc-desc {
  font-size: 14px;
  color: var(--muted);
}

.crumbs {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 0.4em;
}
