/* diskvet.dev — one stylesheet, no external fonts or scripts. */

:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --surface-2: #f2f2ee;
  --text: #1c1d1f;
  --muted: #5d6066;
  --border: #deded8;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --ok: #1d7a46;
  --warn: #9a6200;
  --crit: #b3261e;
  --code-bg: #f0f0eb;
  --draft-bg: #fff4d6;
  --draft-border: #e0b44c;
  --draft-text: #5a4200;
  --ph-bg: #fde7e7;
  --ph-text: #8a1c1c;
  --radius: 8px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141517;
    --surface: #1b1d20;
    --surface-2: #222529;
    --text: #e7e7e4;
    --muted: #a3a6ab;
    --border: #33363b;
    --accent: #7fb0ff;
    --accent-text: #0d1726;
    --ok: #5fcf8e;
    --warn: #e0b04f;
    --crit: #ff8a80;
    --code-bg: #1f2226;
    --draft-bg: #3a2f10;
    --draft-border: #8a6a1c;
    --draft-text: #f3dc9c;
    --ph-bg: #4a1f1f;
    --ph-text: #ffc4c4;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  background: var(--surface);
  padding: 4px 8px;
  z-index: 10;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow { max-width: 46rem; }

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}
.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Main menu and the language switcher sit together on the right. */
.site-header .wrap > nav:not(.langs) { margin-left: auto; }
.site-header .langs {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
}
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* Draft banner on legal pages */

.draft {
  background: var(--draft-bg);
  color: var(--draft-text);
  border-bottom: 2px solid var(--draft-border);
  font-weight: 600;
  text-align: center;
  padding: 10px 16px;
  margin: 0;
}

/* Placeholders the author must fill in before publishing */

.ph {
  background: var(--ph-bg);
  color: var(--ph-text);
  border-radius: 3px;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 0.92em;
}

/* Typography */

main { padding: 32px 0 56px; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; margin: 48px 0 12px; }
h3 { font-size: 1.1rem; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 16px; }
li { margin-bottom: 4px; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
  margin: 0 0 16px;
}
pre code { background: none; padding: 0; font-size: 0.88rem; }

/* Buttons */

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-secondary { background: transparent; color: var(--accent); }

/* Tables */

.table-scroll { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
th { background: var(--surface-2); font-weight: 600; }

/* Cards and grids */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 16px 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-top: 0; }
.card ul { padding-left: 1.2em; margin-bottom: 0; }

.plan .price { font-size: 1.6rem; font-weight: 700; margin: 4px 0 0; }
.plan .price-alt { color: var(--muted); margin: 0 0 12px; }
.plan-featured { border: 2px solid var(--accent); }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}
.callout > :last-child { margin-bottom: 0; }

.two-col {
  display: grid;
  gap: 16px 32px;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.status-crit { color: var(--crit); font-weight: 600; }
.status-warn { color: var(--warn); font-weight: 600; }
.status-ok { color: var(--ok); font-weight: 600; }

/* Legal pages */

.legal h2 { font-size: 1.2rem; margin-top: 36px; }
.legal .meta { color: var(--muted); font-size: 0.95rem; }
.legal ol, .legal ul { padding-left: 1.4em; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  margin: 16px 0 24px;
}
.toc ol { margin: 0; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 24px 0 32px;
}
.site-footer p { margin: 0 0 8px; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.site-footer a { color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 0.97rem; }
  .card { padding: 16px; }
  th, td { padding: 6px 8px; }
}
