/* SupremeBrain tools index — static stylesheet. Light-on-dark, readable, no framework. */

:root {
  --ink: #0b0c10;
  --panel: #14161d;
  --line: #262a36;
  --text: #e6e8ef;
  --muted: #9aa0b5;
  --faint: #6b7189;
  --accent: #4f46e5;
  --cyan: #8fe3ff;
  --royal: #3b82f6;
  --gold: #f5b93b;
  --radius: 10px;
  --max: 68rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: #f7f8fa;
    --panel: #ffffff;
    --line: #e2e5ec;
    --text: #16181f;
    --muted: #565d73;
    --faint: #7b8299;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

main, header.site, footer.site {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem; z-index: 10;
  background: var(--accent); color: #fff; padding: .6rem .9rem; border-radius: var(--radius);
}

/* header */
header.site {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  padding-top: 1.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -.01em;
}
.brand img { display: block; border-radius: 6px; }
header.site nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: .93rem; }
header.site nav a:hover { color: var(--text); }

/* content */
main { padding-top: 2.5rem; padding-bottom: 3.5rem; }

h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 2.2rem 0 .7rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 1.6rem 0 .5rem; }

p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.2rem; }
li { margin: .35rem 0; }

a { color: var(--cyan); }
a:hover { color: #fff; }
@media (prefers-color-scheme: light) {
  a { color: #2b5fd9; }
  a:hover { color: #1a3d94; }
}

.lede { font-size: 1.08rem; color: var(--muted); max-width: 46rem; }
.fine { font-size: .85rem; color: var(--faint); }
.nowrap { white-space: nowrap; }

.crumbs { font-size: .85rem; color: var(--faint); margin-bottom: 1.2rem; }
.crumbs a { color: var(--faint); }
.crumbs a:hover { color: var(--text); }

/* tables */
.grid {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: .94rem;
}
.grid th {
  text-align: left; font-weight: 600; color: var(--muted);
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding: .6rem .7rem;
}
.grid td {
  border-bottom: 1px solid var(--line); padding: .8rem .7rem; vertical-align: top;
}
.grid tbody tr:hover { background: var(--panel); }
.grid td:first-child { white-space: nowrap; }

/* definition lists */
.facts {
  display: grid; grid-template-columns: 11rem 1fr; gap: .5rem 1.2rem;
  margin: 1.5rem 0; padding: 1.1rem 1.2rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .94rem;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* sources */
.sources { font-size: .88rem; }
.sources a { word-break: break-all; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; background: var(--panel); padding: .1rem .35rem; border-radius: 4px;
}

/* footer */
footer.site {
  border-top: 1px solid var(--line); padding-top: 1.5rem; padding-bottom: 2.5rem;
  color: var(--muted); font-size: .9rem;
}
footer.site .fine { margin-top: .5rem; max-width: 46rem; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }

/* signup */
.signup {
  margin-top: 3rem; padding: 1.5rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.signup h2 { margin-top: 0; }
.signup form { display: grid; gap: .9rem; max-width: 32rem; margin-top: 1.2rem; }
.field { display: grid; gap: .35rem; }
.field > span { font-size: .85rem; color: var(--muted); }
.field input {
  padding: .65rem .8rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--ink); color: var(--text); font: inherit; font-size: 1rem;
}
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; font-size: .92rem; }
.check input { margin-top: .3rem; }
.signup button {
  justify-self: start; margin-top: .3rem; padding: .7rem 1.4rem; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.signup button:hover:not(:disabled) { background: var(--royal); }
.signup button:disabled { opacity: .55; cursor: not-allowed; }
#signup-status:empty { display: none; }
#signup-status[data-kind="error"] { color: #fca5a5; }
#signup-status[data-kind="success"] { color: #86efac; }
@media (prefers-color-scheme: light) {
  #signup-status[data-kind="error"] { color: #b91c1c; }
  #signup-status[data-kind="success"] { color: #15803d; }
}

@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .grid { font-size: .88rem; }
  .grid th:nth-child(3), .grid td:nth-child(3) { display: none; }
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dt { margin-top: .6rem; font-size: .82rem; }
}
