/* Placeholder styling for milestone 0.
   Kept in a separate file on purpose: the content security policy forbids
   inline styles, and starting out compliant is cheaper than retrofitting. */

:root {
  color-scheme: dark;
  --bg: #14161a;
  --surface: #1c1f25;
  --border: #2b3039;
  --text: #e6e8eb;
  --muted: #9aa2ad;
  --accent: #4a9d7f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 3rem 1.5rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

main {
  max-width: 44rem;
  margin: 0 auto;
}

h1 {
  margin: 0 0 .25rem;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: .75rem;
  background: var(--accent);
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.lead {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

li { margin-bottom: .4rem; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

footer {
  margin-top: 2rem;
  color: var(--muted);
  font-size: .875rem;
}

/* --- Formular und Statusmeldungen (Meilenstein 1) ----------------------- */

.hint {
  color: var(--muted);
  font-size: .9rem;
}

code {
  background: #0f1114;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1rem .35rem;
  font-size: .85em;
}

form {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: 1.25rem;
}

label {
  font-size: .85rem;
  font-weight: 600;
  margin-top: .65rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input {
  background: #0f1114;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .6rem .7rem;
  font-size: .95rem;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  margin-top: 1.5rem;
  background: var(--accent);
  color: #0f1114;
  border: none;
  border-radius: 6px;
  padding: .7rem 1rem;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

button:hover:not(:disabled) { filter: brightness(1.1); }
button:disabled { opacity: .6; cursor: default; }

.message {
  border-radius: 6px;
  padding: .7rem .9rem;
  margin-top: 1rem;
  font-size: .9rem;
  border: 1px solid var(--border);
}

.message.error {
  border-color: #7f4a4a;
  background: #2a1c1c;
  color: #f0c9c9;
}

[hidden] { display: none !important; }

.message.warn,
.hint.warn {
  border: 1px solid #7f6a3a;
  background: #2a2419;
  color: #f0e0c0;
  border-radius: 6px;
  padding: .7rem .9rem;
}

/* --- Layout für die Anwendung (Meilenstein 2/3) ------------------------- */

body { padding: 0; }

main {
  max-width: 58rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

#topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; letter-spacing: -0.01em; }
.spacer { flex: 1; }

.linkish {
  background: none;
  border: none;
  color: var(--accent);
  margin: 0;
  padding: .2rem .1rem;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
}

.linkish:hover { text-decoration: underline; }
.back { display: inline-block; margin-bottom: 1rem; }

h1 { font-size: 1.6rem; margin: 0 0 .5rem; letter-spacing: -0.02em; }
h1::after { content: none; }
h2 { margin-top: 2rem; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }

.stack { display: flex; flex-direction: column; gap: .75rem; margin: 1.25rem 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.card-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .25rem;
}

.badge {
  font-size: .75rem;
  padding: .1rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge.healthy { border-color: #3d6b56; color: #8fd6b4; }
.badge.unreachable, .badge.unauthorized { border-color: #7f4a4a; color: #f0c9c9; }

.row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.row button { margin-top: 0; }

button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--border); }
button.danger { background: transparent; color: #e79a9a; border: 1px solid #7f4a4a; }
button.small { padding: .35rem .6rem; font-size: .8rem; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1.25rem 1.25rem;
  margin-top: 1.5rem;
}

summary { cursor: pointer; font-weight: 600; padding: .25rem 0; }

label.checkbox {
  flex-direction: row;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 400;
}

label.checkbox input { width: auto; }

textarea {
  background: #0f1114;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .6rem .7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: .9rem;
}

th {
  text-align: left;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: .5rem .6rem;
}

td {
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

td.contents {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .85rem;
  word-break: break-all;
}

.message.ok { border-color: #3d6b56; background: #18241e; color: #b9e3cd; }
.message.warn { border-color: #7f6a3a; background: #2a2419; color: #f0e0c0; }

footer {
  max-width: 58rem;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  font-size: .8rem;
}

/* --- Cluster, Topologie und Protokoll (Meilenstein 4) ------------------- */

select {
  background: #0f1114;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .5rem .6rem;
  font-family: inherit;
  font-size: .9rem;
}

.warn-text { color: #e7c98a; }

.steps {
  margin-top: .75rem;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.step {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding-left: .75rem;
  border-left: 2px solid var(--border);
  font-size: .85rem;
}

.step.succeeded { border-left-color: var(--accent); }
.step.failed { border-left-color: #b06060; }
.step.skipped { border-left-color: #6b6b6b; }

nav { display: flex; gap: 1rem; }

/* --- Übersicht und DNSSEC (Meilenstein 5) ------------------------------- */

.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.25rem 0;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  min-width: 9rem;
}

.tile-value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ds {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem;
  background: #0f1114;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .35rem .5rem;
  margin-top: .3rem;
  word-break: break-all;
}

td.detail { background: #0f1114; }
