/* lab.speculanda.it: stile terminale, lo stesso della pagina di stato
   dell'osservatorio (lab/osservatorio/stato.html ha una copia di palette e
   switch nel suo <style>: se cambi qui, allinea anche lì). */

:root {
  --bg: #fafaf8; --fg: #1d2021; --dim: #6b6f70; --line: #e1e3df;
  --link: #1d5fbf; --code: #eef0ec;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1113; --fg: #d8dcd6; --dim: #7c8384; --line: #24282b;
    --link: #7fb0ff; --code: #1a1d20;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1113; --fg: #d8dcd6; --dim: #7c8384; --line: #24282b;
  --link: #7fb0ff; --code: #1a1d20;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 14px/1.6 ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}
main, .top, .foot { max-width: 60rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* barra: percorso a sinistra, switch a destra */
.top {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; align-items: center;
  padding-top: 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line);
}
.crumbs { margin: 0; font-size: 1rem; font-weight: 600; }
.crumbs a { color: var(--dim); font-weight: 400; }
.crumbs a.here { color: inherit; font-weight: 600; }
.crumbs .sep { color: var(--dim); font-weight: 400; margin: 0 .35em; }

/* switch bianco / nero */
.tema { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.tema button {
  font: inherit; font-size: .8125rem; line-height: 1.6; margin: 0; padding: 0 .6em;
  background: none; border: 0; color: var(--dim); cursor: pointer;
}
.tema button + button { border-left: 1px solid var(--line); }
.tema button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.tema button:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

/* contenuto markdown */
main { padding-top: 1.5rem; padding-bottom: 3rem; }
main h1, main h2, main h3 { font-size: 1rem; line-height: 1.4; margin: 1.75rem 0 .5rem; }
main h1 { margin-top: 0; }
main h1::before { content: "# "; color: var(--dim); }
main h2::before { content: "## "; color: var(--dim); }
main h3::before { content: "### "; color: var(--dim); }
main p, main ul, main ol, main pre, main table, main blockquote { margin: 0 0 1rem; max-width: 46rem; }
main ul { list-style: none; padding-left: 2ch; }
main ul > li::before { content: "-"; color: var(--dim); display: inline-block; width: 2ch; margin-left: -2ch; }
main ol { padding-left: 3ch; }
main li { margin: .25rem 0; }
main code { background: var(--code); border-radius: 3px; padding: .05em .3em; }
main pre { background: var(--code); border-radius: 4px; padding: .75rem 1rem; overflow-x: auto; }
main pre code { background: none; padding: 0; }
main blockquote { border-left: 2px solid var(--line); padding-left: 1rem; color: var(--dim); }
main hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
main img { max-width: 100%; height: auto; }
main table { border-collapse: collapse; }
main th, main td { text-align: left; padding: .25rem .75rem .25rem 0; border-bottom: 1px solid var(--line); }
main th { font-weight: 400; color: var(--dim); }

.foot {
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; padding-top: .75rem; padding-bottom: 2rem;
  border-top: 1px solid var(--line); color: var(--dim); font-size: .8125rem;
}
.foot a { color: inherit; }
