/* Grimoire.
 *
 * A library that has to be read, linked to and found — so it is a site before
 * it is an app: real pages, real URLs, and nothing that needs JavaScript to
 * make sense.
 */
:root {
  --bg-default: #0d1117;
  --bg-muted: #161b22;
  --bg-subtle: #21262d;
  --border-default: #30363d;
  --border-muted: #21262d;
  --fg-default: #e6edf3;
  --fg-muted: #8b949e;
  --fg-subtle: #6e7681;
  --accent-fg: #2f81f7;
  --success-fg: #3fb950;
  --attention-fg: #d29922;
  --danger-fg: #f85149;
  --btn-primary-bg: #238636;
  --btn-primary-hover: #2ea043;
  --header-bg: rgba(13, 17, 23, 0.92);
  --brick: #a8402f;
  --purple: #a8402f;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  background: var(--bg-default);
  color: var(--fg-default);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
}
a { color: var(--accent-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ── header ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-muted);
  height: 56px;
}
header .wrap {
  max-width: 1280px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--fg-default); font-weight: 600; font-size: 16px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.find { flex: 1; max-width: 420px; }
.find input {
  width: 100%;
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--fg-default);
  font-size: 14px;
  font-family: inherit;
}
.find input:focus { outline: none; border-color: var(--accent-fg); }
.find input::placeholder { color: var(--fg-muted); }
header .sp { flex: 1; }
.lnk { color: var(--fg-default); font-size: 14px; font-weight: 500; padding: 6px 10px;
  border-radius: 6px; }
.lnk:hover { background: var(--bg-subtle); text-decoration: none; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 16px; font-size: 14px; font-weight: 500;
  border-radius: 6px; border: 1px solid transparent;
  background: var(--btn-primary-bg); color: #fff;
  cursor: pointer; line-height: 20px; font-family: inherit;
}
.btn:hover { background: var(--btn-primary-hover); text-decoration: none; }
.btn.ghost {
  background: var(--bg-subtle); color: var(--fg-default);
  border-color: var(--border-default);
}
.btn.ghost:hover { background: var(--bg-muted); border-color: var(--fg-muted); }
.btn.sm { padding: 4px 12px; font-size: 12px; }

/* ── layout ── */
main { padding: 24px 0 64px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 900px; }
.two { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
}
.card.flat { background: transparent; border: 0; padding: 0; }
.box { border: 1px solid var(--border-default); border-radius: 6px; overflow: hidden; }
.box-head {
  background: var(--bg-muted);
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--fg-muted);
  flex-wrap: wrap; gap: 8px;
}

/* ── a source code ── */
.src-head {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 16px; margin-bottom: 16px;
}
.src-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.src-title h1 { font-size: 20px; font-weight: 400; }
.src-title h1 a { font-weight: 600; }
.src-title h1 span { color: var(--fg-muted); }
.vis {
  font-size: 12px; padding: 0 7px;
  border: 1px solid var(--border-default);
  border-radius: 2em; color: var(--fg-muted); line-height: 18px;
}
.src-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs { display: flex; border-bottom: 1px solid var(--border-default);
  margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs .tab {
  padding: 8px 16px; color: var(--fg-muted); font-weight: 500;
  border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer;
}
.tabs a.on, .tabs .tab.on { color: var(--fg-default); border-bottom-color: #f78166; }
.tabs a:hover, .tabs .tab:hover { color: var(--fg-default); text-decoration: none; }
.counter { background: var(--bg-subtle); border-radius: 2em; padding: 0 6px;
  font-size: 12px; margin-left: 4px; }

/* ── files ── */
.row {
  display: grid; grid-template-columns: 1fr 120px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-muted);
  align-items: center; font-size: 14px;
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--bg-muted); }
.row .nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row .nm a { color: var(--fg-default); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.row .nm a:hover { color: var(--accent-fg); }
.row .sz { color: var(--fg-muted); text-align: right; font-size: 12px; }
.ic { width: 16px; height: 16px; fill: var(--fg-muted); flex-shrink: 0; }

/* ── code and readme ── */
.code-view {
  display: flex; font-family: var(--mono); font-size: 12px; line-height: 20px;
  overflow-x: auto; background: var(--bg-default);
}
.line-numbers {
  text-align: right; padding: 16px 8px 16px 16px;
  color: var(--fg-subtle); user-select: none;
  border-right: 1px solid var(--border-muted); min-width: 48px;
}
.line-numbers span { display: block; }
.code-content { padding: 16px; white-space: pre; flex: 1; }
.readme { padding: 32px; font-size: 16px; line-height: 1.6; }
.readme h1 { font-size: 28px; font-weight: 600; border-bottom: 1px solid var(--border-default);
  padding-bottom: 8px; margin-bottom: 16px; }
.readme h2 { font-size: 22px; font-weight: 600; border-bottom: 1px solid var(--border-default);
  padding-bottom: 6px; margin: 24px 0 12px; }
.readme h3 { font-size: 18px; font-weight: 600; margin: 20px 0 10px; }
.readme p, .readme ul, .readme ol { margin-bottom: 16px; }
.readme ul, .readme ol { padding-left: 24px; }
.readme li { margin-bottom: 4px; }
.readme code {
  background: var(--bg-subtle); padding: 2px 6px; border-radius: 4px;
  font-size: 85%; font-family: var(--mono);
}
.readme pre {
  background: var(--bg-muted); border: 1px solid var(--border-default);
  border-radius: 6px; padding: 16px; overflow-x: auto; margin-bottom: 16px;
}
.readme pre code { background: none; padding: 0; }

/* ── about ── */
.about h2 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.about p { color: var(--fg-muted); margin-bottom: 12px; font-size: 13px; }
.about .meta { display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-size: 12px; color: var(--fg-muted); }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.topic {
  background: rgba(47,129,247,0.15); color: var(--accent-fg);
  border-radius: 2em; padding: 0 10px; font-size: 12px; line-height: 22px;
}

/* ── search results ── */
.result { padding: 16px 0; border-bottom: 1px solid var(--border-muted); }
.result:last-child { border-bottom: none; }
.result h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.result p { color: var(--fg-muted); margin-bottom: 8px; font-size: 14px; }
.result .meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px;
  color: var(--fg-muted); align-items: center; }
.lang-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block;
  margin-right: 4px; }
.results-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
}
.results-count { font-size: 16px; font-weight: 600; }

/* ── the landing ── */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 100px 24px 110px;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(138,42,30,0.34), transparent),
              radial-gradient(ellipse 60% 40% at 80% 50%, rgba(47,129,247,0.12), transparent),
              var(--bg-default);
}
.hero h1 {
  font-size: clamp(38px, 6.5vw, 68px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; margin: 0 auto 24px; max-width: 900px;
}
.hero .lede { font-size: 19px; color: var(--fg-muted); max-width: 640px;
  margin: 0 auto 36px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero .btn { padding: 10px 24px; font-size: 16px; }
.orb { position: absolute; border-radius: 50%; filter: blur(44px); opacity: .4;
  pointer-events: none; }
.orb-1 { width: 300px; height: 300px; background: var(--brick); bottom: 8%; left: 8%; }
.orb-2 { width: 200px; height: 200px; background: var(--accent-fg); bottom: 18%; right: 12%; }
.orb-3 { width: 150px; height: 150px; background: var(--success-fg); top: 26%; right: 22%; }
.features {
  max-width: 1200px; margin: 0 auto; padding: 72px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px;
}
.feature {
  background: var(--bg-muted); border: 1px solid var(--border-default);
  border-radius: 12px; padding: 28px;
}
.feature h3 { font-size: 19px; margin-bottom: 10px; }
.feature p { color: var(--fg-muted); font-size: 15px; }

/* ── bits ── */
.lede { color: var(--fg-muted); font-size: 15px; }
.empty { text-align: center; padding: 48px 20px; color: var(--fg-muted); }
.empty h1 { font-size: 22px; color: var(--fg-default); margin-bottom: 8px; }
.muted { color: var(--fg-muted); }
.label { display: inline-block; padding: 0 7px; font-size: 12px; font-weight: 500;
  border-radius: 2em; line-height: 18px; border: 1px solid transparent; }
.label.ok { background: rgba(46,160,67,0.15); color: var(--success-fg);
  border-color: rgba(46,160,67,0.4); }
footer.site {
  border-top: 1px solid var(--border-muted); padding: 40px 24px;
  text-align: center; color: var(--fg-muted); font-size: 13px;
}
footer.site a { color: var(--fg-muted); margin: 0 12px; }
footer.site a:hover { color: var(--fg-default); }

/* ── the classes the pages actually emit ─────────────────────────────────
   The stylesheet above was written from a template; these are what
   index.php, mine.oql, person.oql, search.oql and source.oql really use.
   Without them every card collapsed into unstyled text. */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 28px 0 40px;
}
.grid > div {
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 20px;
}
.grid h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.grid p { color: var(--fg-muted); font-size: 14px; }

main h2 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  margin: 36px 0 14px;
}

.card.pad0 { padding: 0; overflow: hidden; background: var(--bg-muted); }
.list { display: flex; flex-direction: column; }
.list .row {
  display: block;
  padding: 16px;
  border-bottom: 1px solid var(--border-muted);
}
.list .row:last-child { border-bottom: none; }
.list .row:hover { background: var(--bg-subtle); }
.list .row .m { min-width: 0; }
.list .row h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.list .row h3 a { color: var(--accent-fg); }
.list .row p { color: var(--fg-muted); font-size: 13.5px; margin-bottom: 8px; }
.who { color: var(--fg-muted); font-weight: 400; }
.meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px; color: var(--fg-muted); align-items: center;
}

/* a file tree inside a source code */
.tree { display: flex; flex-direction: column; }
.tree .row { display: grid; grid-template-columns: 1fr 110px; }
.tree .f { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tree .r { text-align: right; color: var(--fg-muted); font-size: 12px; }

.crumb {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px; font-size: 14px; flex-wrap: wrap;
}
.crumb .sep { color: var(--fg-muted); }

.pill {
  display: inline-block; padding: 0 8px;
  font-size: 12px; line-height: 19px;
  border: 1px solid var(--border-default);
  border-radius: 2em; color: var(--fg-muted);
}
.pill.on { background: rgba(46,160,67,0.15); color: var(--success-fg);
  border-color: rgba(46,160,67,0.4); }

.hint { color: var(--fg-muted); font-size: 12.5px; margin-top: 6px; }
.boost { display: inline-flex; align-items: center; gap: 6px; }

/* forms — new source code, settings */
label { display: block; font-size: 13px; color: var(--fg-muted); margin: 16px 0 6px; }
input[type=text], input[type=search], select, textarea {
  width: 100%;
  background: var(--bg-default);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--fg-default);
  font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-fg); }
textarea { min-height: 90px; resize: vertical; }

footer.site p { margin-top: 14px; }
footer.site a + a { margin-left: 0; }

/* ── the landing, given room to breathe ──────────────────────────────────
   Bands of alternating background with real vertical rhythm, rather than
   headings stacked on top of each other. */
.hero { padding: 112px 0 104px; }
.hero .wrap { position: relative; z-index: 1; text-align: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { font-size: 18px; max-width: 620px; margin: 0 auto 34px; }

.band { padding: 72px 0; border-top: 1px solid var(--border-muted); }
.band.alt { background: var(--bg-muted); }
.band-h { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.band-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.band > .wrap > .band-h { margin-bottom: 28px; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature {
  background: var(--bg-muted); border: 1px solid var(--border-default);
  border-radius: 12px; padding: 28px;
}
.band.alt .feature { background: var(--bg-default); }
.feature h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.feature p { color: var(--fg-muted); font-size: 14.5px; }

.srcgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.srccard {
  display: block; background: var(--bg-default);
  border: 1px solid var(--border-default); border-radius: 10px;
  padding: 18px 20px; color: inherit;
}
.srccard:hover { border-color: var(--fg-muted); text-decoration: none; }
.srccard-name { font-size: 15px; margin-bottom: 8px; }
.srccard-name b { color: var(--accent-fg); font-weight: 600; }
.srccard p {
  color: var(--fg-muted); font-size: 13.5px; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 40px;
}
.srccard-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 12px; color: var(--fg-muted); align-items: center;
}
.lang { display: inline-flex; align-items: center; gap: 6px; }
.lang-dot { width: 10px; height: 10px; border-radius: 50%;
  background: var(--brick); display: inline-block; }

.words { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 32px; }
.words dt { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.words dd { color: var(--fg-muted); font-size: 14px; }

@media (max-width: 700px) {
  .hero { padding: 72px 0 64px; }
  .band { padding: 52px 0; }
}

/* ── the landing ─────────────────────────────────────────────────────────
   Its own header, hero and feature strip — the shape of the mockup. The
   inner pages keep the compact header above. */
.Header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-muted);
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.Header-left { display: flex; align-items: center; gap: 16px; }
.Header-logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--fg-default); font-weight: 600; font-size: 18px;
}
.Header-logo:hover { text-decoration: none; }
.Header-logo img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.Header-nav { display: flex; gap: 8px; }
.Header-nav a {
  color: var(--fg-default); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 6px;
}
.Header-nav a:hover { background: var(--bg-muted); text-decoration: none; }
.Header-right { display: flex; align-items: center; gap: 12px; }
.search-box {
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 5px 12px;
  color: var(--fg-default);
  font-size: 14px;
  width: 240px;
  font-family: inherit;
}
.search-box:focus { outline: none; border-color: var(--accent-fg); }
.search-box::placeholder { color: var(--fg-muted); }

.btn-primary { background: var(--btn-primary-bg); color: #fff; border-color: transparent; }
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-outline {
  background: transparent; color: var(--fg-default);
  border-color: var(--border-default);
}
.btn-outline:hover { background: var(--bg-muted); border-color: var(--fg-muted); }
.btn-lg { padding: 10px 24px; font-size: 16px; }

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 24px 120px;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(138,42,30,0.34), transparent),
              radial-gradient(ellipse 60% 40% at 80% 50%, rgba(47,129,247,0.12), transparent),
              var(--bg-default);
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 24px; max-width: 900px;
}
.hero p {
  font-size: 20px; color: var(--fg-muted);
  max-width: 640px; margin-bottom: 40px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  align-items: center; position: relative; z-index: 1; }
.orb { position: absolute; border-radius: 50%; filter: blur(40px);
  opacity: .4; pointer-events: none; }
.orb-1 { width: 300px; height: 300px; background: var(--brick); bottom: 10%; left: 10%; }
.orb-2 { width: 200px; height: 200px; background: var(--accent-fg); bottom: 20%; right: 15%; }
.orb-3 { width: 150px; height: 150px; background: var(--success-fg); top: 30%; right: 25%; }

.features {
  max-width: 1200px; margin: 0 auto; padding: 80px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px;
}
.feature-card {
  background: var(--bg-muted); border: 1px solid var(--border-default);
  border-radius: 12px; padding: 32px;
}
.feature-card h3 { font-size: 20px; margin-bottom: 12px; }
.feature-card p { color: var(--fg-muted); font-size: 15px; }
.feature-card code {
  background: var(--bg-subtle); padding: 2px 6px; border-radius: 4px;
  font-size: 85%; font-family: var(--mono);
}

body > footer {
  border-top: 1px solid var(--border-muted);
  padding: 40px 24px; text-align: center;
  color: var(--fg-muted); font-size: 13px;
}
body > footer a { color: var(--fg-muted); margin: 0 12px; }
body > footer a:hover { color: var(--fg-default); }

@media (max-width: 768px) {
  .Header-nav { display: none; }
  .search-box { width: 140px; }
  .hero h1 { font-size: 36px; }
}

/* A button is one line. "Your source codes" was wrapping into a column
   because nothing stopped it. */
.btn, .Header-right .btn, .Header-nav a, .lnk { white-space: nowrap; }
.Header-right { flex-shrink: 0; }
.Header-left { min-width: 0; }
@media (max-width: 1100px) {
  .Header-nav a:nth-child(n+3) { display: none; }
}

/* ── narrow screens ──────────────────────────────────────────────────────
   The landing was laid out for a desktop and then squeezed: the header lost
   its name, the hero kept desktop padding, and the whole page sat in a
   column with dead space either side. */
@media (max-width: 900px) {
  .Header { padding: 0 14px; height: 56px; gap: 10px; }
  .Header-left { flex: 0 0 auto; }
  .Header-logo { font-size: 16px; }
  .Header-logo img { width: 26px; height: 26px; }
  .Header-right { flex: 1; justify-content: flex-end; gap: 8px; min-width: 0; }
  .search-box { display: none; }

  .hero { padding: 56px 20px 64px; min-height: 0; }
  .hero h1 { font-size: clamp(30px, 9vw, 42px); margin-bottom: 16px; }
  .hero p { font-size: 16px; margin-bottom: 28px; }
  .hero-cta { width: 100%; flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .orb-1 { width: 220px; height: 220px; }
  .orb-2 { width: 150px; height: 150px; }
  .orb-3 { width: 110px; height: 110px; }

  .features { padding: 48px 20px; gap: 16px; }
  .feature-card { padding: 22px; }
  .feature-card h3 { font-size: 17px; }
}
@media (max-width: 520px) {
  /* The buttons are what matter at this width; the name goes rather than
     letting everything shrink into unreadability. */
  .Header-logo span, .Header-logo { gap: 6px; }
  .btn { padding: 5px 12px; font-size: 13px; }
}

/* The mark is drawn at twice the size it occupies and then scaled down by the
   browser, so it stays crisp on a retina screen instead of resampling a
   small bitmap upward. */
.Header-logo img, .brand img { display: block; object-fit: contain; }

/* ── search: a field on a wide screen, an icon on a narrow one ── */
.searchform { display: contents; }
.search-icon { display: none; }
.search-close { display: none; }

@media (max-width: 900px) {
  .search-icon {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border: 0; background: transparent;
    color: var(--fg-muted); cursor: pointer; border-radius: 6px;
    flex-shrink: 0;
  }
  .search-icon:hover { background: var(--bg-subtle); color: var(--fg-default); }

  /* Closed, the form is not in the layout at all. Open, it covers the header
     so the field gets the whole width rather than a sliver of it. */
  .searchform { display: none; }
  .searchform.open {
    display: flex; align-items: center; gap: 8px;
    position: absolute; inset: 0;
    background: var(--bg-default);
    padding: 0 14px; z-index: 10;
  }
  .searchform.open .search-box { display: block; width: 100%; }
  .search-close {
    display: block; border: 0; background: transparent;
    color: var(--fg-muted); font-size: 24px; line-height: 1;
    cursor: pointer; padding: 0 4px;
  }
  .Header { position: sticky; }
}

/* the inner-page search behaves like the landing's */
@media (max-width: 900px) {
  .find { display: none; }
  .find.open {
    display: flex; align-items: center; gap: 8px;
    position: absolute; inset: 0;
    background: var(--bg-default); padding: 0 14px; z-index: 10;
  }
  .find.open input { flex: 1; }
  header .wrap { position: relative; }
}
