:root {
  --bg: #070000;
  --bg-grad: #120000;
  --panel: #120404;
  --panel-2: #1a0808;
  --ink: #f3e6e6;
  --muted: #9a7a7a;
  --red: #e10600;
  --red-hot: #ff2a2a;
  --red-dim: #7a0b0b;
  --line: #3a1010;
  --ok: #3fb950;
  --ok-bg: #1a3d22;
  --code-bg: #0a0000;
  --code-ink: #e8c4c4;
  --danger-bg: #1a0000;
  --glow: rgba(225, 6, 0, 0.18);
  --scan-line: rgba(0, 0, 0, 0.18);
  --scan-opacity: 0.35;
  --font: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html[data-color="light"] {
  --bg: #f7f0f0;
  --bg-grad: #fff8f8;
  --panel: #fff;
  --panel-2: #fff6f6;
  --ink: #1c0a0a;
  --muted: #6b4545;
  --red: #c10500;
  --red-hot: #a10400;
  --red-dim: #e8b4b4;
  --line: #e4c8c8;
  --ok: #1a7f37;
  --ok-bg: #d8f0de;
  --code-bg: #fff;
  --code-ink: #4a2020;
  --danger-bg: #fff0f0;
  --glow: rgba(193, 5, 0, 0.08);
  --scan-line: rgba(0, 0, 0, 0.04);
  --scan-opacity: 0.2;
}

@media (prefers-color-scheme: light) {
  html:not([data-color="dark"]):not([data-color="light"]),
  html[data-color="system"] {
    --bg: #f7f0f0;
    --bg-grad: #fff8f8;
    --panel: #fff;
    --panel-2: #fff6f6;
    --ink: #1c0a0a;
    --muted: #6b4545;
    --red: #c10500;
    --red-hot: #a10400;
    --red-dim: #e8b4b4;
    --line: #e4c8c8;
    --ok: #1a7f37;
    --ok-bg: #d8f0de;
    --code-bg: #fff;
    --code-ink: #4a2020;
    --danger-bg: #fff0f0;
    --glow: rgba(193, 5, 0, 0.08);
    --scan-line: rgba(0, 0, 0, 0.04);
    --scan-opacity: 0.2;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color-scheme: light dark;
}

html[data-color="light"] { color-scheme: light; }
html[data-color="dark"] { color-scheme: dark; }

html[data-style="blackhat"][data-color="dark"] {
  --bg: #050505;
  --bg-grad: #101010;
  --panel: #121212;
  --panel-2: #1a1a1a;
  --ink: #f2f2f2;
  --muted: #8a8a8a;
  --red: #e8e8e8;
  --red-hot: #ffffff;
  --red-dim: #3a3a3a;
  --line: #2a2a2a;
  --ok: #3fb950;
  --ok-bg: #1a3d22;
  --code-bg: #000;
  --code-ink: #d8d8d8;
  --danger-bg: #161616;
  --glow: rgba(255, 255, 255, 0.1);
  --scan-line: rgba(0, 0, 0, 0.28);
  --scan-opacity: 0.35;
}

html[data-style="blackhat"][data-color="light"] {
  --bg: #f4f4f4;
  --bg-grad: #fafafa;
  --panel: #fff;
  --panel-2: #f0f0f0;
  --ink: #111;
  --muted: #5a5a5a;
  --red: #1a1a1a;
  --red-hot: #000;
  --red-dim: #c8c8c8;
  --line: #d4d4d4;
  --ok: #1a7f37;
  --ok-bg: #d8f0de;
  --code-bg: #fff;
  --code-ink: #222;
  --danger-bg: #ececec;
  --glow: rgba(0, 0, 0, 0.05);
  --scan-line: rgba(0, 0, 0, 0.04);
  --scan-opacity: 0.2;
}

body {
  margin: 0 auto;
  max-width: 42rem;
  padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(2rem + env(safe-area-inset-bottom));
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--glow), transparent 55%),
    linear-gradient(180deg, var(--bg-grad) 0%, var(--bg) 28%);
  min-height: 100vh;
}

.scan {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    var(--scan-line) 3px
  );
  opacity: var(--scan-opacity);
  z-index: 0;
}

header.page,
main,
footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--red-hot);
  text-decoration: none;
}

a.brand:hover {
  color: var(--red-hot);
  filter: brightness(1.12);
}

.github-btn,
a.github-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid #3d444d;
  background: #24292f;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  box-shadow: none;
}

.github-btn:hover,
a.github-cta:hover {
  background: #32383f;
  color: #fff;
  filter: none;
}

a.github-cta {
  width: 100%;
  min-height: 2.75rem;
}

.gh-mark {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hat {
  width: 1.15rem;
  height: 0.7rem;
  border: 2px solid var(--red);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  position: relative;
  box-shadow: 0 0 10px rgba(225, 6, 0, 0.55);
}

.hat::after {
  content: "";
  position: absolute;
  left: -0.35rem;
  right: -0.35rem;
  bottom: -0.18rem;
  height: 0.18rem;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.kicker {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-hot);
  text-shadow: 0 0 18px rgba(225, 6, 0, 0.6);
}

.hero,
.intro {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
}

.intro p { margin: 0 0 0.7rem; }
.intro #repo-url-box { margin: 0 0 0.85rem; }

.dev-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.dev-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.dev-name:hover { color: var(--red-hot); }

.dev-avatar {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

a.read-more {
  color: var(--red-hot);
  font-weight: 600;
  text-decoration: none;
  background: color-mix(in srgb, var(--red) 16%, transparent);
  padding: 0.05em 0.35em;
  border-radius: 0.2em;
}

a.read-more:hover {
  color: var(--red-hot);
  background: color-mix(in srgb, var(--red) 28%, transparent);
}

.intro-more { margin: 0 0 0.7rem; }
.intro-more p { margin: 0; }

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-hot);
  border: 1px solid var(--red-dim);
  padding: 0.18rem 0.5rem;
  margin-bottom: 0.45rem;
}

.badge.bad {
  color: var(--red-hot);
  border-color: var(--red);
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.25);
}

h1 {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
  text-shadow: 0 0 18px rgba(225, 6, 0, 0.35);
}

h2 {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin: 0 0 0.4rem;
}

.lead,
.section-desc,
.safari-note,
.muted,
footer {
  color: var(--muted);
}

.lead { margin: 0 0 0.45rem; }
.safari-note { margin: 0 0 0.85rem; font-size: 0.82rem; }

a { color: var(--red-hot); }
a:hover { color: #ff6a6a; }

.level-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.level {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.level.is-open { border-color: var(--red); }

.level-start {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.65rem 0.8rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.level-start.static { cursor: default; min-height: auto; padding-bottom: 0.15rem; }

.level-num {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--red);
  color: var(--red-hot);
  font-size: 0.72rem;
  font-weight: 700;
}

.level-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.level-copy strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.level-copy small,
.choice-row small,
.choice-link small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.level-go {
  flex-shrink: 0;
  color: var(--red-hot);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.level-panel {
  padding: 0 0.8rem 0.85rem;
  border-top: 1px solid var(--line);
}

.level > .level-panel:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}

.panel-copy {
  margin: 0.7rem 0 0.75rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.choice {
  margin: 0.7rem 0 0;
  padding: 0;
  border: 0;
}

.choice legend {
  padding: 0;
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.choice-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.choice-row:first-of-type { border-top: 0; }

.choice-row input {
  margin: 0.2rem 0 0;
  accent-color: var(--red);
}

.choice-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.choice-link:first-child { border-top: 0; }
.choice-link:hover { color: var(--red-hot); }
.choice-link.danger .level-go { color: var(--red); }

.blocklist {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
}

.blocklist summary {
  cursor: pointer;
  color: var(--red-hot);
  font-weight: 600;
}

.blocklist ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.pick-hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--red-hot);
}

.level-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.level-actions:has(:only-child) {
  grid-template-columns: 1fr;
}

a[role="button"].is-disabled,
a[role="button"][aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.profile-section {
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.profile-section.additional {
  margin-top: 1.1rem;
  padding-top: 0.75rem;
}

.profile-section.additional h2 {
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}

.profile-section.additional .section-desc {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
}

.extras {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.15rem 0.7rem 0.55rem;
}

.extras .choice-row {
  padding: 0.38rem 0;
  font-size: 0.82rem;
}

.extras .blocklist {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
}

.extras-detail {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

.extras-detail strong {
  display: block;
  margin: 0.4rem 0 0.15rem;
  color: var(--ink);
  font-size: 0.72rem;
}

.extras-detail ul {
  margin: 0;
  padding-left: 1.05rem;
}

.extras-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.extras-view {
  width: auto;
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border: 0;
  background: transparent;
  color: var(--red-hot);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

.extras-view:disabled {
  opacity: 0.4;
  cursor: default;
}

.extras-bar a[role="button"] {
  width: auto;
  min-width: 7.2rem;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem;
}

.profile-section.danger h2 {
  color: var(--red);
}

.profile-grid {
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 34rem) {
  .profile-grid.pair {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  padding: 0.9rem 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 60, 60, 0.08);
}

.profile-card.recommended {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(225, 6, 0, 0.35), 0 0 22px rgba(225, 6, 0, 0.12);
}

.profile-card.danger {
  border-color: var(--red);
  background: var(--danger-bg);
}

.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.35rem;
}

.profile-head h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
}

.profile-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--red);
  color: var(--red-hot);
  padding: 0.1rem 0.4rem;
}

.tag.ok { color: var(--ok); border-color: #245c32; }

.profile-desc {
  margin: 0 0 0.65rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.profile-card:not(:has(.profile-desc)) .profile-head {
  margin-bottom: 0.65rem;
}

.profile-actions {
  display: grid;
  gap: 0.45rem;
}

.profile-actions.split {
  grid-template-columns: 1fr 1fr;
}

.view-row {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.view-row a { font-weight: 600; }

.action-row {
  display: grid;
  gap: 0.45rem;
}

.audit-actions {
  margin: 0.85rem 0 1rem;
}

.audit-payload {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.35rem 0.85rem 0.7rem;
  margin: 0.65rem 0 0;
}

.audit-payload > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.55rem 0;
  color: var(--red-hot);
}

.proof-panel {
  border-color: var(--red);
  box-shadow: 0 0 18px rgba(225, 6, 0, 0.18);
}

.proof-panel > summary {
  list-style: none;
}

.proof-bounce {
  display: inline-block;
  color: var(--red-hot);
  text-shadow: 0 0 12px rgba(225, 6, 0, 0.45);
}

.proof-bounce.is-live {
  animation: proof-bob 1.5s ease-in-out infinite;
}

@keyframes proof-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .proof-bounce.is-live { animation: none; }
}

.paper-jump {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.9rem;
  text-decoration: none;
  overflow: hidden;
}

.paper-jump .proof-bounce {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 0.88rem;
}

.paper-go {
  flex-shrink: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--red-hot);
  animation: paper-nudge 1.7s ease-in-out infinite;
}

@keyframes paper-nudge {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(5px); }
  60% { transform: translateX(0); }
  75% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .paper-go { animation: none; }
}

.paper-panel > summary {
  display: block;
}

.paper-hook {
  display: block;
  margin-top: 0.45rem;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.45;
}

.paper-body {
  max-width: 42rem;
}

.paper h2 {
  margin-top: 1.4rem;
}

.paper blockquote {
  margin: 0.7rem 0;
  padding: 0.55rem 0.8rem;
  border-left: 3px solid var(--red);
  color: var(--muted);
  font-size: 0.9rem;
}

.paper-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.back {
  margin: 0 0 0.75rem;
}

.paper-author {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.paper-author:hover {
  color: var(--red-hot);
}

.paper-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.paper .refs {
  padding-left: 1.2rem;
}

.paper .refs li {
  margin: 0.35rem 0;
  font-size: 0.82rem;
}

.paper-page .paper-body {
  position: relative;
  z-index: 1;
}

.audit-keys {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}

.audit-keys > li {
  padding: 0.4rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.audit-keys > li:first-child { border-top: 0; }

.audit-keys strong {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
}

.compact-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.audit-xml {
  overflow: auto;
  max-height: 22rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--code-ink);
  background: var(--code-bg);
  border: 1px solid var(--line);
  padding: 0.7rem;
  white-space: pre-wrap;
  word-break: break-word;
}

a[role="button"],
button,
.action,
.guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(225, 6, 0, 0.28);
}

a[role="button"]:hover,
.action:hover {
  background: var(--red-hot);
  color: #fff;
  filter: brightness(1.05);
}

a[role="button"].danger,
.action.danger {
  background: #5a0000;
  border-color: var(--red);
}

a[role="button"].started {
  background: var(--ok-bg);
  border-color: var(--ok);
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
}

a[role="button"].secondary.started {
  background: transparent;
  border-color: var(--ok);
  color: var(--ok);
}

.guide-link,
a.outline,
a[role="button"].secondary,
button.secondary,
.action.secondary {
  background: transparent;
  color: var(--red-hot);
  box-shadow: none;
}

.source-proof {
  margin: 1rem 0 0;
  padding-top: 0.25rem;
}

.url-box {
  position: relative;
  margin: 0.55rem 0 0.75rem;
}

.url-copy {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 1;
  width: auto;
  min-height: 1.7rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #24292f;
  border: 1px solid #3d444d;
  color: #fff;
  box-shadow: none;
}

.copy-block {
  margin: 0;
  padding: 0.7rem 4.2rem 0.7rem 0.8rem;
  background: var(--code-bg);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--code-ink);
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-block code,
.copy-block a {
  font-family: var(--font);
  color: inherit;
}

.github-exact {
  margin: 0.65rem 0 0.15rem;
  font-size: 0.75rem;
  word-break: break-all;
}

.note {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.75rem 0.85rem;
  margin: 0.7rem 0;
}

.note.danger {
  border-color: var(--red);
  background: var(--danger-bg);
}

.note.danger strong { color: var(--red-hot); }

.stack {
  display: grid;
  gap: 0.5rem;
}

.action {
  justify-content: space-between;
  text-transform: none;
  letter-spacing: 0;
}

.action small {
  display: block;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 0.15rem;
}

.action .go { flex-shrink: 0; }

footer {
  margin-top: 1.6rem;
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.site-foot {
  margin-top: 2rem;
  padding: 1rem 0 0.25rem;
  font-size: 0.8rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.85rem;
  margin: 0 0 0.4rem;
}

.foot-copy {
  margin: 0.75rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
}

.chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1rem;
}

.chrome-field {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.chrome-field select {
  width: auto;
  min-height: 1.85rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}

.mode-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  min-width: 1.85rem;
  height: 1.85rem;
  min-height: 1.85rem;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.mode-toggle:hover {
  border-color: var(--red);
  color: var(--red-hot);
  background: var(--panel-2);
}

.mode-toggle .icon-moon,
.mode-toggle .icon-sun {
  display: block;
  width: 1rem;
  height: 1rem;
  background: currentColor;
}

.mode-toggle .icon-moon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mode-toggle .icon-sun {
  display: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-16.25a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0V2.5A.75.75 0 0 1 12 1.75zm0 18.5a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5a.75.75 0 0 1 .75-.75zM1.75 12a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5H2.5A.75.75 0 0 1 1.75 12zm18.5 0a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5h-1.5a.75.75 0 0 1-.75-.75zM4.22 4.22a.75.75 0 0 1 1.06 0l1.06 1.06a.75.75 0 1 1-1.06 1.06L4.22 5.28a.75.75 0 0 1 0-1.06zm13.44 13.44a.75.75 0 0 1 1.06 0l1.06 1.06a.75.75 0 1 1-1.06 1.06l-1.06-1.06a.75.75 0 0 1 0-1.06zM4.22 19.78a.75.75 0 0 1 0-1.06l1.06-1.06a.75.75 0 1 1 1.06 1.06l-1.06 1.06a.75.75 0 0 1-1.06 0zm13.44-13.44a.75.75 0 0 1 0-1.06l1.06-1.06a.75.75 0 1 1 1.06 1.06l-1.06 1.06a.75.75 0 0 1-1.06 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-16.25a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0V2.5A.75.75 0 0 1 12 1.75zm0 18.5a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5a.75.75 0 0 1 .75-.75zM1.75 12a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5H2.5A.75.75 0 0 1 1.75 12zm18.5 0a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5h-1.5a.75.75 0 0 1-.75-.75zM4.22 4.22a.75.75 0 0 1 1.06 0l1.06 1.06a.75.75 0 1 1-1.06 1.06L4.22 5.28a.75.75 0 0 1 0-1.06zm13.44 13.44a.75.75 0 0 1 1.06 0l1.06 1.06a.75.75 0 1 1-1.06 1.06l-1.06-1.06a.75.75 0 0 1 0-1.06zM4.22 19.78a.75.75 0 0 1 0-1.06l1.06-1.06a.75.75 0 1 1 1.06 1.06l-1.06 1.06a.75.75 0 0 1-1.06 0zm13.44-13.44a.75.75 0 0 1 0-1.06l1.06-1.06a.75.75 0 1 1 1.06 1.06l-1.06 1.06a.75.75 0 0 1-1.06 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}

html[data-color="dark"] .mode-toggle .icon-moon { display: none; }
html[data-color="dark"] .mode-toggle .icon-sun { display: block; }

.domain-check {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.domain-check p { margin: 0 0 0.65rem; }
.domain-check p:last-child { margin-bottom: 0; }
.domain-check .url-box { margin: 0.35rem 0 0.75rem; }
.domain-check .note { margin: 0.65rem 0 0; }

.phish-banner,
.local-banner {
  display: none;
}

body.host-phish .phish-banner,
body.host-local .local-banner {
  display: block;
}

.note.safari-box {
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 0.85rem;
  color: var(--muted);
}

body.host-phish a[role="button"],
body.host-phish .guide-link,
body.host-phish a.action,
body.host-phish a[href$=".mobileconfig"],
body.host-phish a[href*="view.html"] {
  pointer-events: none;
  opacity: 0.4;
  filter: grayscale(0.55);
}

body.host-local #host-banner:not(.danger) {
  border-color: var(--line);
}
