:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --overlay: #191b1e;
  --panel: #14171c;
  --line: #272c34;
  --text: #eff2f5;
  --muted: #b2b8c1;
  --accent: #ed0653;
  --font-sans:
    Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --title-font: "IBM Plex Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #090b0e 0%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

section {
  margin: 2rem 0 0 0;
}

section > h2 {
  margin: 0 0 1rem 0;
}

.lead a,
.note a,
.smallprint a {
  color: var(--accent);
  text-decoration: none;
}

.lead a:hover,
.note a:hover,
.smallprint a:hover {
  text-decoration: underline;
}

.page {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 3rem 0 1.25rem;
}

.hero-top--compact {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.hero-top--compact .hero-logo {
  height: clamp(3rem, 10vw, 5rem);
}

.hero-top--compact .title-lockup h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.site-title-link {
  text-decoration: none;
  color: inherit;
}

.hero-copy {
  padding: 0 0 1rem;
}

.hero-logo {
  display: block;
  width: auto;
  height: clamp(8rem, 28vw, 16rem);
  max-width: min(48vw, 20rem);
  object-fit: contain;
}

.title-lockup {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow a {
  color: inherit;
  text-decoration: none;
}

.eyebrow a:hover {
  text-decoration: underline;
}

.title-lockup h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 800;
  font-family: var(--title-font);
}

.hero,
.panel {
  margin-bottom: 1.25rem;
}

.hero {
  font-size: 1.25em;
  margin-bottom: 0;
}

.bolded {
  font-size: 1.5em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 750;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
}

.lead,
.note,
.smallprint,
.facts,
.wallets {
  color: var(--muted);
}

.lead {
  max-width: 68ch;
  margin: 0 0 0.75rem;
  font-size: 1.12rem;
}

.hero-copy .lead:last-child {
  margin-bottom: 0;
}

.panel {
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
}

.checker-panel {
  display: grid;
  gap: 1rem;
}

.checker-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.checker-hint {
  margin: 0;
  color: #78808b;
  font-size: 0.82rem;
}

.checker-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem 0.75rem;
  align-items: end;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.field-wide {
  min-width: 0;
}

.field input,
.field select {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: #0c0e12;
  color: var(--text);
  padding: 0.75rem 0.85rem;
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(216, 63, 95, 0.35);
  outline-offset: 1px;
  border-color: var(--accent);
}

.checker-button {
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.checker-button:hover {
  filter: brightness(0.96);
}

.checker-result {
  min-height: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.checker-result a {
  color: var(--accent);
  text-decoration: underline;
}

.checker-result.is-vulnerable {
  color: #ff9fb4;
}

.checker-result.is-safe {
  color: var(--text);
}

.checker-result.is-error {
  color: #ffb6a8;
}

.faq {
  display: grid;
  gap: 1rem;
}

.faq-item h3 {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.panel-tight {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.facts,
.wallets {
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
}

.facts li,
.wallets li {
  margin: 0.35rem 0;
}

.facts strong,
.note strong,
.smallprint strong {
  color: var(--text);
  font-weight: 700;
}

.lead strong {
  font-weight: 700;
}

.note,
.smallprint {
  margin: 0.65rem 0 0;
}

.wallets {
  column-count: 2;
  column-gap: 2rem;
}

@media (max-width: 720px) {
  .page {
    width: min(900px, calc(100% - 1.25rem));
    margin: 0 1rem;
  }

  .hero-top {
    gap: 1rem;
    padding: 2rem 0 1rem;
  }

  .hero-logo {
    height: auto;
    width: min(100%, 16rem);
    max-width: 6rem;
  }

  .checker-head,
  .checker-form {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .checker-head {
    display: grid;
  }

  .checker-button {
    width: 100%;
  }

  .title-lockup h1 {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .wallets {
    column-count: 1;
  }
}

.footer {
  width: calc(100% - 2rem);
  margin: 3rem 0 0 0;
  padding: 3rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: grey;
  border-style: solid;
  border-width: 1px 0 0 0;
}

.footer-year {
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0.6;
}

.footer-logo {
  display: block;
  height: 1.5rem;
  width: auto;
  opacity: 0.5;
}

.footer-logo:hover {
  opacity: 1;
}

.footer-tagline {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0.6;
}

.breadcrumb {
  margin: 1.25rem 0 0;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb-sep {
  opacity: 0.4;
}

.articles-index {
  padding: 3rem 0 4rem;
}

.articles-index h1 {
  margin: 0 0 2rem;
}

.article-links {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.article-link {
  display: grid;
  gap: 0.25rem;
  text-decoration: none;
}

.article-link:hover .article-link-title {
  text-decoration: underline;
}

.article-link-title {
  font-weight: 700;
  color: var(--accent);
}

.article-link-desc {
  font-size: 0.9rem;
  color: var(--muted);
}

.post {
  padding: 3rem 0 4rem;
}

.post h1 {
  margin: 0 0 2rem;
}

.post h2 {
  margin: 3rem 0 1rem;
}

.post h3 {
  margin: 2rem 0 0.5rem;
}

.post p {
  margin: 0 0 1rem;
}

.post em {
  color: var(--muted);
}

.post hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.post table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.post table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
  border-bottom: 2px solid var(--line);
}

.post table td {
  padding: 0.55rem 0.9rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.post table tbody tr:last-child td {
  border-bottom: none;
}

.post table th[align="right"],
.post table td[align="right"] {
  text-align: right;
}

.post table th[align="center"],
.post table td[align="center"] {
  text-align: center;
}

.post table tbody tr:hover td {
  background: var(--overlay);
}

.post-figure {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.5rem 0 0.5rem;
  background: var(--overlay);
  border-radius: 0.5rem;
  padding: 1rem;
}

.post-figure .ttl,
.post-figure .title,
.post-figure .ptitle,
.post-figure .cat,
.post-figure .ct,
.post-figure .legn,
.post-figure .vlab,
.post-figure .addr,
.post-figure .hero {
  fill: var(--text);
}

.post-figure .sub,
.post-figure .note,
.post-figure .cap,
.post-figure .legt,
.post-figure .legl,
.post-figure .ax,
.post-figure .axt,
.post-figure .xl,
.post-figure .yl,
.post-figure .yr,
.post-figure .ext,
.post-figure .bandt,
.post-figure .selfl,
.post-figure .meta,
.post-figure .heroof,
.post-figure .herosub {
  fill: var(--muted);
}

.post-figure .kn {
  fill: #78808b;
}

.post-figure .knpub {
  fill: #2f6fed;
}

.post-figure .markt,
.post-figure .swt {
  fill: #f87171;
}

.post-figure .grid,
.post-figure .gridv,
.post-figure .bl {
  stroke: var(--line);
}

.post-figure .mark {
  stroke: #f87171;
}

/* Charts are authored on a white canvas; drop the light backgrounds so the
   dark .post-figure panel shows through (SVGs are inlined, so this applies). */
.post-figure rect[fill="#ffffff"],
.post-figure rect[fill="#fff"],
.post-figure rect[fill="#f4f6fb"] {
  fill: transparent;
}

.warning-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.checker-result-icon svg {
  display: block;
  width: 10rem;
  height: 10rem;
  fill: var(--accent);
}
