/* 4irq.com: one stylesheet for every page the publicSite function renders. */

@font-face {
  font-family: "Cairo";
  src: url("/static/fonts/Cairo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Cairo";
  src: url("/static/fonts/Cairo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --text: #1b1b24;
  --muted: #5d5d6e;
  --line: #e3e3ec;
  --accent: #6b2bd9;
  --accent-soft: #efe8fd;
  --quote: #f2f0f8;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111117;
    --surface: #1a1a23;
    --text: #ececf3;
    --muted: #a5a5b8;
    --line: #2c2c3a;
    --accent: #b59cff;
    --accent-soft: #2a2140;
    --quote: #20202b;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-wrap: anywhere;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
}

.wrap {
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.skip {
  position: absolute;
  inset-inline-start: -999px;
}

.skip:focus {
  inset-inline-start: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

main.wrap {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem 2rem;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.4;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.5;
  margin: 2rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

h3,
h4 {
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 1.5rem 0 0.4rem;
  scroll-margin-top: 1rem;
}

p {
  margin: 0 0 1rem;
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.content ul,
.content ol {
  padding-inline-start: 1.5rem;
  margin: 0 0 1rem;
}

.content li {
  margin-bottom: 0.35rem;
}

.content .indent-1 { margin-inline-start: 1.5rem; }
.content .indent-2 { margin-inline-start: 3rem; }
.content .indent-3 { margin-inline-start: 4.5rem; }
.content .indent-4 { margin-inline-start: 6rem; }

.checklist {
  list-style: none;
  padding-inline-start: 0.25rem;
}

.checklist li::before {
  content: "☐";
  margin-inline-end: 0.5rem;
}

.checklist li.checked::before {
  content: "☑";
}

blockquote {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--quote);
  border-inline-start: 4px solid var(--accent);
  border-radius: 0.5rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

figure {
  margin: 1.5rem 0;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.a-center { text-align: center; }
.a-right { text-align: right; }
.a-left { text-align: left; }
.a-justify { text-align: justify; }

.toc {
  background: var(--accent-soft);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
}

.toc-title {
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.toc ol {
  display: block;
  margin: 0;
  padding-inline-start: 1.25rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
  padding: 1.5rem 0 2rem;
}

.site-footer nav {
  margin-bottom: 0.75rem;
}

.social {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  margin: 0;
}

@media (min-width: 720px) {
  body {
    font-size: 18px;
  }

  article {
    padding: 2.5rem 3rem 3rem;
  }

  h1 {
    font-size: 2.3rem;
  }
}

@media print {
  .site-header nav,
  .site-footer nav,
  .skip,
  .toc {
    display: none;
  }

  body,
  article {
    background: #fff;
    color: #000;
    border: 0;
  }

  a {
    color: #000;
  }
}
