/* Michler IT · Sites-Verwaltung · Corporate Design 1.1 */
@font-face { font-family: "MIT Recursive"; src: url(/static/fonts/Recursive-VF.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "MIT Fraunces"; src: url(/static/fonts/Fraunces-VF.woff2) format("woff2"); font-weight: 300 600; font-display: swap; }

:root {
  --bg: #F1F1EC; --surface: #E8E7DF; --fg: #13232C; --muted: #5B6670; --line: rgba(19,35,44,.32); --line-soft: rgba(19,35,44,.14);
  --signal: #1D6A53; --ctrl: #5B6670; --btn: #13232C; --btn-fg: #F1F1EC; --btn-hover: #1B2B35;
  --sans: "MIT Recursive", ui-sans-serif, system-ui, sans-serif; --serif: "MIT Fraunces", Georgia, serif; --mono: "MIT Recursive", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #13232C; --surface: #1B2B35; --fg: #F1F1EC; --muted: #A7B0B6; --line: rgba(241,241,236,.28); --line-soft: rgba(241,241,236,.12);
    --signal: #6FC2A3; --ctrl: #A7B0B6; --btn: #F1F1EC; --btn-fg: #13232C; --btn-hover: #E8E7DF; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); }
body { margin: 0; font: 400 16px/1.55 var(--sans); font-variation-settings: "MONO" 0, "CASL" 0; font-feature-settings: "tnum" 1; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--line); }
a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 0, "WONK" 0; letter-spacing: 0; margin: 0; }
h1 { font-size: 40px; line-height: 1.1; }
h2 { font-size: 26px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; }
.meta, .k, th, label .k { font: 500 12px/1.5 var(--mono); font-variation-settings: "MONO" 1; color: var(--muted); letter-spacing: 0; }
.mono { font-family: var(--mono); font-variation-settings: "MONO" 1; }
.muted { color: var(--muted); }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top { padding-top: env(safe-area-inset-top); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand svg { height: 22px; width: auto; display: block; }
.brand .meta { padding-left: 14px; border-left: 1px solid var(--line); line-height: 22px; }
.top .who { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
main.wrap { padding-top: 48px; padding-bottom: 96px; }

/* buttons: Tinte, 2 px, no pills, no shadows */
.btn, button.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--btn); border-radius: 2px;
  background: var(--btn); color: var(--btn-fg); font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.quiet { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--fg); background: transparent; }
.btn.danger { background: transparent; color: var(--fg); border-color: var(--fg); }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .22em; }
.linkbtn:hover { text-decoration-color: currentColor; }
svg.i { width: 18px; height: 18px; flex: none; }

/* page head */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.head .meta { margin-bottom: 8px; }
.stats { display: flex; gap: 32px; margin: 0 0 40px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stats div { display: flex; align-items: baseline; gap: 10px; }
.stats b { font: 400 30px/1 var(--serif); }

/* table of sites */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 500; }
td { padding: 16px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr.row:hover td { background: var(--surface); }
td .name { font: 400 19px/1.3 var(--serif); text-decoration: none; }
td .name:hover { text-decoration: underline; }
td .sub { display: block; color: var(--muted); font-size: 14px; }
.domains { list-style: none; margin: 0; padding: 0; font: 400 14px/1.7 var(--mono); font-variation-settings: "MONO" 1; }
.domains a { text-decoration: none; }
.domains a:hover { text-decoration: underline; }
.section-title { margin: 56px 0 8px; }
.empty { padding: 32px 0; color: var(--muted); }

/* status: glyph + word, never colour alone */
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--mono); font-variation-settings: "MONO" 1; white-space: nowrap; }
.status::before { font-family: var(--sans); font-size: 14px; }
.status.live { color: var(--signal); } .status.live::before { content: "✓"; }
.status.preview::before { content: "◐"; }
.status.offline { color: var(--muted); } .status.offline::before { content: "–"; }
.lock { font: 500 13px/1 var(--mono); font-variation-settings: "MONO" 1; white-space: nowrap; }
.lock.no { color: var(--muted); }

/* cards and forms */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 24px; }
.card + .card { margin-top: 24px; }
.card h3 { margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; margin: 0; }
.facts dt { font: 500 12px/1.9 var(--mono); font-variation-settings: "MONO" 1; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
form.stack { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field .hint { color: var(--muted); font-size: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
input[type=text], input[type=password], input[type=url], input[type=number], textarea, select {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--ctrl); border-radius: 2px; background: var(--bg); color: var(--fg);
  font: 400 15px/1.4 var(--sans); }
textarea { min-height: 88px; resize: vertical; }
textarea.mono, input.mono { font-family: var(--mono); font-variation-settings: "MONO" 1; font-size: 14px; }
input:hover, textarea:hover, select:hover { border-color: var(--fg); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--signal); outline-offset: 2px; border-color: var(--fg); }
input[type=file] { font: 400 14px var(--sans); color: var(--fg); }
.check { display: flex; gap: 10px; align-items: center; }
.check input { width: 18px; height: 18px; accent-color: var(--fg); }
fieldset { border: 0; padding: 0; margin: 0; }
.radios { display: flex; gap: 8px; flex-wrap: wrap; }
.radios label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; }
.radios input { accent-color: var(--fg); }
.radios label:has(input:checked) { border-color: var(--fg); background: var(--bg); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.note { padding: 12px 16px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); margin-bottom: 24px; }
.note.ok::before { content: "✓ "; color: var(--signal); }
.note.err { border-color: var(--fg); }
.note.err::before { content: "Fehler: "; font-weight: 600; }
.note ul { margin: 4px 0 0; padding-left: 18px; }
.dns-ok { color: var(--signal); } .dns-warn::before { content: "△ "; }
.iters { list-style: none; margin: 0; padding: 0; }
.iters li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.iters li:first-child { border-top: 0; }
.iters .n { font: 400 22px/1 var(--serif); }
.iters .active { font: 500 12px/1 var(--mono); font-variation-settings: "MONO" 1; color: var(--signal); }
.iters .active::before { content: "✓ "; }
.audit { list-style: none; margin: 0; padding: 0; font: 400 13px/1.9 var(--mono); font-variation-settings: "MONO" 1; color: var(--muted); }

/* header: Bereiche, Konto, Wechseln/Abmelden als Linien-Icons */
.mainnav { display: flex; gap: 4px; margin-left: 8px; }
.mainnav a, .iconbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border: 1px solid transparent; border-radius: 2px;
  background: none; color: var(--fg); font: 500 14px/1 var(--sans); text-decoration: none; cursor: pointer; }
.mainnav a:hover, .iconbtn:hover { border-color: var(--line); }
.mainnav a[aria-current] { border-color: var(--fg); }
.top .who { gap: 4px; }
.top .who form { margin: 0; }
.me { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 6px; color: var(--muted); font: 500 13px/1 var(--mono); font-variation-settings: "MONO" 1; }
.iconbtn .lbl { font-size: 14px; }
.btn svg.i { margin-left: -2px; }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card h3 svg.i { width: 20px; height: 20px; color: var(--muted); }
.k-m { display: none; }
td .sub { overflow-wrap: anywhere; }

/* Besuche */
.visits { margin-bottom: 32px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.visit-sum { margin: 0 0 16px; }
.visit-sum .big { font: 400 26px/1.2 var(--serif); margin-right: 6px; }
.ok { color: var(--signal); }
.ok::before { content: "✓ "; }
.vlist { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--line-soft); }
.vlist > li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.vlist .when { font: 400 14px/1.6 var(--mono); font-variation-settings: "MONO" 1; }
.vlist .when b { font-weight: 600; }
.vlist .what { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.vlist .dev { font-weight: 600; }
.vlist .steps { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.vlist .ip { margin-left: auto; }
.vlist details summary { cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .22em; }
.vlist details ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.vlist li.bot { color: var(--muted); }
.vlist li.own { opacity: .75; }
.tag { font: 500 11px/1 var(--mono); font-variation-settings: "MONO" 1; border: 1px solid var(--line); border-radius: 2px; padding: 3px 6px; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* Protokoll */
.audit li { display: block; }
.audit .t { margin-right: 4px; }
.audit b { color: var(--fg); font-weight: 600; }
.filters { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; align-items: end; }
.filters .field { min-width: 200px; }
.logrows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.logrows li { display: grid; grid-template-columns: 150px 140px minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.logrows .t { font-size: 13px; color: var(--muted); }
.logrows li.warn .d::before { content: "△ "; }

/* schmale Bildschirme: Tabelle wird zur Liste, Kopf zeigt nur Icons */
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; gap: 24px; }
  .row2 { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
  main.wrap { padding-top: 32px; }
  table.sites, table.sites tbody { display: block; }
  table.sites thead { display: none; }
  table.sites tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
  table.sites td { border: 0; padding: 0; }
  table.sites td:first-child { grid-column: 1; }
  table.sites td.c-domains, table.sites td.c-tech, table.sites td.c-seen { grid-column: 1 / -1; }
  table.sites td.c-iter .k-m { display: inline; color: var(--muted); }
  table.sites td.c-iter.none { display: none; }
  table.sites td.c-seen .sub { display: inline; margin-left: 8px; }
  tr.row:hover td { background: none; }
  .logrows li, .vlist > li { grid-template-columns: 1fr; gap: 2px; }
  .vlist .ip { margin-left: 0; }
}
@media (max-width: 720px) {
  .top .wrap { gap: 8px; height: 56px; }
  .brand .meta { display: none; }
  .brand svg { height: 20px; }
  .mainnav { margin-left: auto; }
  .mainnav a span, .iconbtn .lbl, .me-name { display: none; }
  .mainnav a, .iconbtn { padding: 0; width: 40px; justify-content: center; }
  .me { display: none; }
  .head { margin-bottom: 20px; }
  .head .actions, .head .btn { width: 100%; }
  .head .btn { justify-content: center; }
  .stats { gap: 20px; margin-bottom: 28px; }
  .card { padding: 18px; }
  .facts { grid-template-columns: 96px 1fr; }
  .iters li { grid-template-columns: 40px 1fr; }
  .iters li > form, .iters li > .active { grid-column: 2; }
  .section-title { margin-top: 40px; }
  .filters .field { min-width: 0; flex: 1 1 140px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  input[type=text], input[type=password], textarea, select { font-size: 16px; } /* iOS zoomt sonst beim Antippen */
}

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); }
.login .box { width: min(400px, 100%); }
.login .brand { justify-content: center; margin-bottom: 32px; }
.login .brand svg { height: 30px; }
.login .card { padding: 28px; }
.login h1 { font-size: 26px; margin: 4px 0 20px; }

/* Leuchtturm wie in der Cloud: Grund der Anmeldeseiten */
body:has(main.login) { background: var(--bg) url(/static/lighthouse-light.svg?v=3) left 0 bottom -16.25vw / cover no-repeat fixed; }
@media (prefers-color-scheme: dark) { body:has(main.login) { background-image: url(/static/lighthouse-dark.svg?v=3); } }
@media (prefers-reduced-motion: reduce) { body:has(main.login) { background-image: url(/static/lighthouse-light-still.svg?v=3); } }
@media (prefers-reduced-motion: reduce) and (prefers-color-scheme: dark) { body:has(main.login) { background-image: url(/static/lighthouse-dark-still.svg?v=3); } }
@media (max-width: 600px), (orientation: portrait) and (max-width: 1024px) { body:has(main.login) { background-size: 210% auto; background-attachment: scroll; background-position: left 0 bottom calc(45px - (100lvh - 100svh) - 45.675vw); position: relative; } .login { padding-bottom: 132px; } }

/* „Michler IT“ im Text: Zeichen statt „IT“ (Text bleibt für Screenreader) */
.mit-name { white-space: nowrap; }
.mit-mark { height: .74em; width: auto; vertical-align: -.03em; fill: currentColor; }
.mit-mark path { fill: currentColor; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Impressum · Datenschutz · © : on the sea, opposite the lighthouse */
.legalbar{position:fixed;left:0;right:0;bottom:max(6px,calc(5.5vw - 24px));z-index:1;display:flex;justify-content:flex-end;align-items:baseline;gap:20px;
  padding:0 clamp(16px,4vw,56px);font:500 12px/1.4 "MIT Recursive",ui-monospace,monospace;font-variation-settings:"MONO" 1;color:var(--muted);pointer-events:none}
.legalbar a,.legalbar span{pointer-events:auto}
.legalbar a{color:inherit;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:.22em}
.legalbar a:hover{color:var(--fg);text-decoration-color:currentColor}
@media (max-width: 600px), (orientation: portrait) and (max-width: 1024px){.legalbar{position:absolute;bottom:max(6px,calc(89px - (100lvh - 100svh)));flex-direction:column;align-items:flex-end;gap:2px}}
@media (max-height:520px) and (min-width:601px){.legalbar{position:static;justify-content:center;padding:24px 16px}}
body:has(main.login){position:relative}

/* Tablets hochkant: Safari-Leiste sitzt oben, Wasserlinie nur knapp über dem Rand */
@media (orientation: portrait) and (min-width: 601px) and (max-width: 1024px) { body:has(main.login) { background-position: left 0 bottom calc(24px - 34.125vw); } .login { padding-bottom: 180px; } .legalbar { bottom: calc(24px + 11.55vw + 12px); } }
html:has(main.login) { background: none; } /* body background covers the whole canvas, also behind Safari's bar */
html:has(main.login) { height: 100%; } html:has(main.login) body { height: 100%; margin: 0; } /* exactly the visible height: no scrolling on phones */
