/* Guides on blokada.org. Plain CSS so a guide renders without the homepage's
   Vue bundle; the look follows the homepage: black gradient header with a
   skewed edge, Open Sans, orange primary buttons, black and white otherwise. */
:root {
  --ink: #1c1c1e;
  --muted: #5f6368;
  --accent: #ff9400;
  --line: #e6e6e8;
  --soft: #f6f6f7;
  --code-bg: #f1f1f3;
  --filled: #fff0d9;
  --bg: #ffffff;
  --hero: linear-gradient(150deg, #121212 15%, #1c1c1e 70%, #5a5a5a 94%);
}

/* Dark mode for the body. The header and the call to action are dark in
   both themes. Follows the system unless the reader picked one (data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ececef;
    --muted: #a1a1aa;
    --line: #2e2e33;
    --soft: #1c1c1f;
    --code-bg: #26262b;
    --filled: #4a3614;
    --bg: #121214;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ececef;
  --muted: #a1a1aa;
  --line: #2e2e33;
  --soft: #1c1c1f;
  --code-bg: #26262b;
  --filled: #4a3614;
  --bg: #121214;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

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

/* Header: the homepage hero, shorter. */
.hero {
  background: var(--hero);
  color: #fff;
  padding-bottom: 72px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), 0 100%);
}
.hero .wrap { max-width: 1000px; }
.hero a { color: #fff; text-decoration: none; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; }
.brand img { display: block; height: 40px; width: auto; }
.topbar-links { display: flex; align-items: center; gap: 24px; font-size: 0.9rem; }
.topbar-links a:not(.btn) { color: rgba(255, 255, 255, 0.95); }
.topbar-links a:not(.btn):hover { color: #fff; opacity: 0.8; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: rgba(255, 255, 255, 0.1); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }

.hero-text { max-width: 760px; margin: 0 auto; padding: 40px 16px 24px; }
.hero h1 { font-size: 2.3rem; line-height: 1.2; font-weight: 600; margin: 4px 0 16px; }
.hero .lead { font-size: 1.2rem; font-weight: 300; margin: 0 0 12px; color: rgba(255, 255, 255, 0.92); }
.hero .meta, .hero .crumbs { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); margin: 0; }
.hero .crumbs a { color: rgba(255, 255, 255, 0.75); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; font-size: 0.8rem; }
.hero .crumbs a:hover { color: #fff; }

main { padding: 16px 16px 48px; }

h2 { font-size: 1.45rem; line-height: 1.3; font-weight: 600; margin: 40px 0 12px; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 28px 0 8px; }

.intro { font-size: 1.1rem; color: var(--muted); }
.small { font-size: 0.9rem; color: var(--muted); }

code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

pre { background: var(--code-bg); border-radius: 6px; padding: 12px 14px; overflow-x: auto; }
pre code { background: none; padding: 0; }

table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 0.95rem; display: block; overflow-x: auto; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }

ol li, ul li { margin: 4px 0; }

.device, .cta, .note {
  border-radius: 6px;
  padding: 16px 18px;
  margin: 24px 0;
}
.device { background: var(--soft); border: 1px solid var(--line); }
.device p { margin: 0; }
.note { border-left: 4px solid var(--ink); background: var(--soft); border-radius: 0 6px 6px 0; }
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }

/* Copy boxes: an address with a copy button next to it (added by ui.js). */
.copy {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  vertical-align: middle;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--code-bg);
  overflow: hidden;
}
.copy code { background: none; border-radius: 0; padding: 3px 8px; align-self: center; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 34px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 8px;
}
.copy-btn:hover { color: var(--ink); background: var(--soft); }
.copy-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.copy-btn.is-done { color: #1f9d55; }
/* Copying a placeholder helps nobody: only once the page has a device. */
.copy .copy-btn { display: none; }
.has-device .copy .copy-btn { display: inline-flex; }

pre.copy-block { position: relative; padding-right: 48px; }
pre.copy-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}

/* The personalise script adds .has-device once it has filled the page. */
.if-device { display: none; }
.has-device .if-device { display: block; }
.has-device .if-no-device { display: none; }
.has-device [data-dns], .has-device .copy { background: var(--filled); }
.has-device .copy code { background: none; }

/* Closing call to action: the header's gradient again. */
.cta { background: var(--hero); color: #fff; margin-top: 48px; padding: 28px; }
.cta h2 { margin-top: 0; }
.cta .small, .cta .small a { color: rgba(255, 255, 255, 0.75); }
.cta .small a { text-decoration-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Buttons as on the homepage: small caps-lock labels, 4px corners. */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 4px;
  padding: 11px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary, .cta .btn-primary { background: var(--accent); color: #fff; }
.btn-white, .hero .btn-white, .cta .btn-white { background: #fff; color: #121212; }
a.btn[data-dns] { background: var(--accent); color: #fff; }

.cards { list-style: none; padding: 0; display: grid; gap: 12px; }
.cards a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); }
.cards a:hover { border-color: var(--ink); }
.cards strong { display: block; font-weight: 600; }

.comments { padding-bottom: 48px; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { padding: 24px 16px; }
.site-footer a { color: var(--muted); }
.languages { display: flex; gap: 16px; margin-bottom: 8px; }
.languages [aria-current] { font-weight: 700; color: var(--ink); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { min-height: 72px; }
  .brand img { height: 34px; }
  .topbar-cta { display: none; }
  .topbar-links { gap: 18px; }
  .hero { padding-bottom: 56px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 36px), 0 100%); }
  .hero-text { padding: 16px 0 24px; }
  .hero h1 { font-size: 1.75rem; }
  .hero .lead { font-size: 1.05rem; }
}

/* The forum frame; its inside is styled by discourse-embedded.css on the forum. */
#discourse-comments iframe { display: block; }
