/* The intranet: one hand-written file, no framework. Minimal on purpose (ELB, 2026-11-21). */
:root {
  --bg: #ffffff; --fg: #1d1f1c; --muted: #6b7068; --line: #e4e6e1;
  --accent: #63943b; --accent-fg: #ffffff; --warn: #a33a2b; --soft: #f5f6f3;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141613; --fg: #e9ebe6; --muted: #9aa094; --line: #2b2e29;
          --accent: #85bc00; --accent-fg: #141613; --warn: #e07a6a; --soft: #1c1f1b; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
main { max-width: 56rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* the door: logo, one word, one button */
.door { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
        align-items: center; justify-content: center; gap: 1.25rem; padding: 2rem 1rem; text-align: center; }
.door img { width: 88px; height: 88px; }
.door h1 { font-size: 1.25rem; font-weight: 500; letter-spacing: .02em; margin: 0; }
.door p { color: var(--muted); max-width: 26rem; margin: 0; }

/* top bar */
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
         max-width: 56rem; margin: 0 auto; padding: 1rem; border-bottom: 1px solid var(--line); }
header .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 500; }
header .brand img { width: 32px; height: 32px; }
header nav { display: flex; align-items: center; gap: 1rem; font-size: .95rem; }
header nav a { text-decoration: none; color: var(--muted); }
header nav a:hover { color: var(--fg); }

/* buttons */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; padding: .6rem 1.1rem; border-radius: .5rem; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-fg); text-decoration: none; cursor: pointer; }
.btn.quiet, button.quiet { background: transparent; color: var(--fg); border-color: var(--line); }
button.link { background: none; border: 0; padding: 0; color: var(--muted); }
button.link:hover { color: var(--fg); }
button.danger { background: transparent; color: var(--warn); border-color: var(--warn); }
form.inline { display: inline; margin: 0; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem;
         list-style: none; padding: 0; margin: 1rem 0 0; }
.tiles a { display: block; padding: 1.1rem 1rem; border: 1px solid var(--line); border-radius: .75rem;
           text-decoration: none; min-height: 5rem; }
.tiles a:hover { border-color: var(--accent); }
.tiles b { display: block; font-weight: 500; }
.tiles small { color: var(--muted); word-break: break-all; }
.empty { color: var(--muted); }

/* admin */
.tabs { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem;
        overflow-x: auto; }
.tabs a { padding: .5rem 0; text-decoration: none; color: var(--muted); white-space: nowrap; }
.tabs a.on { color: var(--fg); border-bottom: 2px solid var(--accent); }
h2 { font-size: 1.1rem; font-weight: 500; margin: 1.5rem 0 .75rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .5rem .5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); }
.tag { font-size: .8rem; padding: .05rem .45rem; border-radius: 1rem; border: 1px solid var(--line); color: var(--muted); }
.tag.off { color: var(--warn); border-color: var(--warn); }
.error { color: var(--warn); }
.box { background: var(--soft); border-radius: .75rem; padding: 1rem; margin: 1rem 0; }
.box code { word-break: break-all; }

.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .75rem; align-items: end; }
label { display: grid; gap: .25rem; font-size: .85rem; color: var(--muted); }
input, select { font: inherit; color: var(--fg); background: var(--bg); padding: .5rem .6rem;
                border: 1px solid var(--line); border-radius: .5rem; width: 100%; min-width: 0; }
label.check { display: flex; align-items: center; gap: .5rem; }
label.check input { width: auto; }

/* phones: tables become stacked rows */
@media (max-width: 40rem) {
  header nav { gap: .75rem; }
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  table.stack td { display: block; border: 0; padding: .1rem 0; }
}
