@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url(fonts/tss4AoFBci4C4gvhPXrt3wjT1MqSzhA4t7IIcncBiwKjhFyDHi0j0Cc.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url(fonts/tss4AoFBci4C4gvhPXrt3wjT1MqSzhA4t7IIcncBiwKthFyDHi0j.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --page-bg: #eef0f2;
  --frame-blue: #2f80c3;
  --ink: #0a0a0a;
  --navy: #092a42;
  --accent: #6ba5d9;
  --dome: #e4e7ea;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: #ffffff;
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Mono", monospace;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.65;
}

strong { font-weight: 800; }

.page-frame {
  position: relative;
  margin: 0 auto;
  background: #ffffff;
  overflow: clip;
  padding: 64px 24px 0;
}

/* ---------- Header ---------- */

.article-header {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 960px;
  margin: 0 auto 48px;
}

.header-logo {
  width: 36px;
  height: auto;
  margin-bottom: 24px;
  opacity: 0.9;
}

.article-title {
  font-family: "PT Mono", monospace;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 40px auto 0;
}

/* ---------- Lower section (grey arc + article) ---------- */

.article-lower {
  position: relative;
  padding: 97px 0 48px;
}

/* ---------- Dome backdrop ---------- */

.dome {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  background: var(--dome);
  border-radius: 50% 50% 0 0 / min(480px, 42vw) min(480px, 42vw) 0 0;
  z-index: 0;
}

/* ---------- Author / share row ---------- */

.article-meta {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.meta-name,
.meta-date {
  margin: 0;
  line-height: 1.4;
}

.meta-name { font-size: 0.95rem; }

.meta-date {
  font-size: 0.85rem;
  color: #5c636b;
}

.meta-share {
  display: flex;
  gap: 8px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  transition: background-color 0.2s;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
}

.share-btn:hover { background: var(--accent); }

/* ---------- Body ---------- */

.article-body {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 64px;
}

.article-body p {
  margin: 0 0 20px;
}

.article-body ul {
  margin: 0 0 20px;
  padding-left: 24px;
}

.article-body li { margin-bottom: 10px; }

.article-body a {
  color: inherit;
  text-decoration: underline;
}

.article-body a:hover { color: var(--accent); }

.article-body h2 {
  font-family: "PT Mono", monospace;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 56px 0 16px;
}

.article-body h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 36px 0 12px;
}

/* ---------- Inline code ---------- */

.article-body code {
  font-family: "Atkinson Hyperlegible Mono", monospace;
  font-size: 0.85em;
  font-weight: 400;
  padding: 1px 6px;
  background: #ffffff;
  border: 1px solid #c6ccd2;
  border-radius: 5px;
  white-space: nowrap;
}

/* ---------- Figures ---------- */

.code-figure,
.flow-figure {
  margin: 28px 0;
}

.code-figure img,
.flow-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.flow-figure {
  margin-left: -60px;
  margin-right: -60px;
}

.caption {
  text-align: center;
  font-size: 0.875rem;
  max-width: 560px;
  margin: -8px auto 24px !important;
}

/* ---------- IoC tables ---------- */

.ioc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.875rem;
}

.ioc-table th,
.ioc-table td {
  border: 1px solid #c6ccd2;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.ioc-table th {
  font-family: "PT Mono", monospace;
  font-weight: 700;
  background: #e4e7ea;
}

.cve-table th,
.cve-table td {
  word-break: normal;
}

.cve-table th:nth-child(-n+2),
.cve-table td:nth-child(-n+2) {
  white-space: nowrap;
}

/* ---------- CTA ---------- */

.article-cta {
  text-align: center;
  margin: 56px 0 24px;
}

.article-cta p {
  margin: 0 0 10px;
}

.article-body .cta-button {
  display: inline-block;
  margin-top: 12px;
  background: #181818;
  color: #fff;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100rem;
  padding: 10px 24px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  transition: background-color 0.2s, color 0.2s;
}

.article-body .cta-button:hover {
  background: var(--accent);
  color: #000;
}

/* ---------- Footer ---------- */

.article-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 56px;
  font-size: 0.75rem;
}

.back-link {
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.back-link:hover { color: var(--accent); }

.top-back-link {
  position: absolute;
  top: 32px;
  left: 40px;
  z-index: 3;
  font-size: 0.75rem;
}

.footer-copy {
  margin: 12px 0 0;
  opacity: 0.6;
  letter-spacing: 0.5px;
}

/* ---------- Table of contents ---------- */

.article-body h2 { scroll-margin-top: 40px; }
html { scroll-behavior: smooth; }

.toc-rail { display: none; }

@media screen and (min-width: 1360px) {
  .toc-rail {
    display: block;
    position: absolute;
    top: 64px;
    bottom: 0;
    left: calc(100% + 80px);
    width: 210px;
  }

  .toc {
    position: sticky;
    top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #c6ccd2;
    border-radius: 10px;
  }
}

.toc-title {
  font-family: "PT Mono", monospace;
  font-size: 1rem;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #c6ccd2;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li { margin: 0; }

.toc a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid transparent;
  color: #7b8189;
  font-size: 0.8125rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.toc a:hover { color: var(--ink); }

.toc a.active {
  color: var(--ink);
  font-weight: 600;
  border-left-color: var(--accent);
}

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid #2b2b2b;
  backdrop-filter: blur(12px);
  padding: 12px 24px;
  transition: opacity 0.4s, transform 0.4s;
}

.cookie-banner.hidden {
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

.cookie-text {
  color: #fff;
  font-size: 0.55rem;
  font-weight: 200;
  line-height: 1rem;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 0.5px;
}

.cookie-text a {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

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

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: "Atkinson Hyperlegible Mono", sans-serif;
  font-size: 0.55rem;
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 100rem;
  padding: 5px 12px;
  cursor: pointer;
  border: 1px solid #2b2b2b;
  transition: background-color 0.2s, color 0.2s;
}

.cookie-btn--decline {
  background: transparent;
  color: #fff;
}

.cookie-btn--decline:hover { background: #2b2b2b; }

.cookie-btn--accept {
  background: #181818;
  color: #fff;
}

.cookie-btn--accept:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ---------- Responsive ---------- */

@media screen and (max-width: 767px) {
  .page-frame {
    margin: 0;
    padding: 40px 16px 0;
  }
  .article-lower { padding: 125px 0 32px; }
  .dome {
    width: 160%;
    border-radius: 50% 50% 0 0 / 150px 150px 0 0;
  }
  .top-back-link { top: 16px; left: 16px; }
  .hero-image { margin-top: 28px; }
  .cookie-banner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
  }
  .flow-figure {
    margin-left: 0;
    margin-right: 0;
  }
  .cve-table {
    display: block;
    overflow-x: auto;
    font-size: 0.75rem;
  }
  .cve-table th,
  .cve-table td { padding: 6px; }
  body { font-size: 1rem; }
  .article-title { font-size: 1.875rem; }
  .article-body h2 { font-size: 1.5rem; }
  .article-body h3 { font-size: 1.25rem; }
  .article-body { padding-top: 48px; }
}
