/* The mirage docs palette, worn by a search page: ink on paper, one restrained link
   blue, hairlines instead of boxes. Hand-written and short, like the page it dresses. */

:root {
  --paper: #fbfbfa;
  --ink: #1c1f23;
  --dim: #6b7280;
  --meta: #5f6b86;
  --rule: #e4e6e9;
  --link: #35558a;
  --code-bg: #f0f0ee;
  --sans: "Inter Variable", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --paper: #101114;
  --ink: #e8e8ea;
  --dim: #9aa0a8;
  --meta: #9aa4b8;
  --rule: #2a2c31;
  --link: #8fb0e8;
  --code-bg: #1b1c21;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/InterVariable.woff2") format("woff2");
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15.5px/1.65 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 1000px; margin: 0 auto; padding: 0 24px 96px; }

a { color: var(--link); text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; }

/* -- the masthead: a wordmark, a theme toggle, and nothing else ----------------- */

header.bar {
  display: flex; align-items: baseline; gap: 12px;
  padding: 28px 0 14px; border-bottom: 1px solid var(--rule);
}
header.bar h1 { font-size: 1.65rem; font-weight: 620; letter-spacing: -0.015em; margin: 0; }
header.bar .sub { color: var(--dim); font-size: 13px; flex: 1; }
header.bar button {
  background: none; border: 0; color: var(--dim); cursor: pointer;
  font: inherit; font-size: 15px; padding: 2px 6px;
}

/* -- the search form ------------------------------------------------------------ */

form { padding: 18px 0 0; }
.line { display: flex; gap: 8px; }
input[type="search"], input[type="text"] {
  font: inherit; color: var(--ink); background: transparent;
  border: 1px solid var(--rule); border-radius: 6px; padding: 9px 12px;
}
input[type="search"] { flex: 1; font-size: 16px; }
input[type="search"]:focus, input[type="text"]:focus { outline: 0; border-color: var(--link); }
form button {
  font: inherit; font-weight: 620; color: var(--paper); background: var(--ink);
  border: 0; border-radius: 6px; padding: 9px 18px; cursor: pointer;
}

/* The CLI's flags, laid out as one line of small labelled fields. */
.opts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--dim); }
.opts label { display: flex; align-items: center; gap: 5px; }
.opts input { width: 5.5em; padding: 3px 6px; font-size: 12.5px; font-family: var(--mono); }

/* -- the stat line: the number the whole page exists to show -------------------- */

.stat { font-family: var(--mono); font-size: 0.78rem; color: var(--dim); margin: 18px 0 4px; min-height: 1.4em; }
.stat b { color: var(--ink); font-weight: 620; }
.stat .err { color: #b3261e; }
.resolved { font-size: 13.5px; color: var(--meta); margin: 0 0 14px; min-height: 1.2em; }

/* The page has to show what it is before you have typed anything, or it reads as broken. */
.tries { font-size: 13.5px; color: var(--dim); margin: 0 0 18px; }
.tries a { margin: 0 2px; }

/* Nothing to show is not the same as an empty table with a header over it. */
.wrap:not(.on), pre.cmd:empty { display: none; }

/* -- the tufte table: rules top and bottom, none between ----------------------- */

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-family: var(--mono); }
table.on { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
thead th {
  text-align: right; font-weight: 600; font-size: 0.8rem; color: var(--dim);
  padding: 0.45rem 1.1rem 0.35rem 0; border-bottom: 0.75px solid var(--ink);
  font-family: var(--sans); white-space: nowrap;
}
thead th:first-child, td:first-child { text-align: left; }
td { text-align: right; padding: 0.34rem 1.1rem 0.34rem 0; white-space: nowrap; }
tbody tr:hover { background: var(--code-bg); }
.wrap { overflow-x: auto; }

/* -- the footer: exports, and the command that says the same thing -------------- */

.exports { margin: 22px 0 0; font-size: 13.5px; color: var(--dim); min-height: 1.2em; }
.exports a { margin-right: 4px; }
pre.cmd {
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.55; color: var(--ink);
  background: var(--code-bg); border: 1px solid var(--rule); border-radius: 6px;
  padding: 0.75rem 0.95rem; margin: 12px 0 0; overflow-x: auto;
}
footer { border-top: 1px solid var(--ink); margin-top: 40px; padding-top: 12px; color: var(--dim); font-size: 12.5px;
         display: flex; justify-content: space-between; flex-wrap: wrap; }

/* -- deep-sky fields, shown only in that mode ---------------------------------- */

.opts .deep input { width: auto; }
.dso-only { display: none; }
body.dso .dso-only { display: flex; }

/* -- what is in this container: the TOC, as the file states it ------------------ */

details#about { margin-top: 34px; border-top: 1px solid var(--rule); padding-top: 14px; }
details#about summary { cursor: pointer; color: var(--dim); font-size: 13px; }
details#about summary::marker { color: var(--rule); }
details#about table { margin-top: 12px; }
.note { color: var(--dim); font-size: 12.5px; margin: 10px 0 0; }
td.dim { color: var(--dim); }
