/* Antilure attack archive (website/blog). Loaded after site.css on blog pages only;
   it uses the tokens, type scale and components defined there. */

/* The Blog link stays marked on every page of the archive, not only on its index. */
.nav-links a[aria-current="true"] {
  color: var(--ink);
  background: var(--chip);
}

/* ---------- Breadcrumb ---------- */

/* site.css styles .crumbs. A case's last crumb is its whole headline, so it stays on one line here. */
.crumbs li[aria-current="page"] {
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Post ---------- */

.post-head { padding-block: clamp(20px, 3vw, 32px) clamp(28px, 4vw, 40px); }
.post-head .page-title { max-width: 22ch; }
.post-dates { max-width: 680px; }

.post-facts {
  max-width: 920px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.post-facts dd { color: var(--ink); }

.post-body h2 { scroll-margin-top: 88px; }
.post-body h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; margin-top: 10px; }
.post-body ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.post-body strong { font-weight: 650; }

.sources { font-size: 15px; color: var(--muted); }
.sources li { padding-left: 2px; }
.sources a { color: var(--ink); }
.sources a:hover { color: var(--red-text); }

/* A sample message drawn for the post. Made-up names; the pattern follows the sources. */
.mail-sample {
  margin: 6px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.mail-sample-head {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  font-size: 14.5px;
}
.mail-sample-head dt { color: var(--muted); }
.mail-sample-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-sample-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15.5px;
}
.mail-sample mark {
  background: transparent;
  color: inherit;
  text-decoration: underline wavy var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.mail-sample figcaption,
.mail-sample .mail-sample-note {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

/* Figures from the annual reports. The wrapper scrolls on narrow screens. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.data-table caption {
  caption-side: top;
  text-align: left;
  padding: 14px 16px 6px;
  font-weight: 650;
}
.data-table th,
.data-table td {
  padding: 10px 16px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}
.data-table thead th { font-weight: 650; color: var(--muted); font-size: 13.5px; }
.data-table tbody th { font-weight: 500; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Tables with many columns keep their width and scroll inside the wrapper. */
.data-table-wide { min-width: 640px; }

.post-foot {
  max-width: 680px;
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
}
.post-nav a:hover { border-color: var(--ink); color: var(--ink); }

.post-cta {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-cta p:not(.h4) { font-size: 15.5px; color: var(--muted); }
.post-cta .btn-row { margin-top: 6px; }

/* ---------- Lists of cases ---------- */

.post-list { margin: 0; padding: 0; list-style: none; }
.post-list > li {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 6px 28px;
}
.post-list > li:last-child { border-bottom: 1px solid var(--line); }
.post-when { padding-top: 3px; }
.post-title { font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; text-wrap: pretty; }
.post-title a { text-decoration: none; }
.post-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-list .muted { text-wrap: pretty; }

/* Inside a post body the list sits in the narrow prose column, clear of the prose list styles. */
.post-body .post-list { display: block; padding-left: 0; }
.prose .post-list > li { grid-template-columns: minmax(0, 1fr); }
.prose .tag-list { flex-direction: row; flex-wrap: wrap; gap: 6px; padding-left: 0; }
.prose .year-cases { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 640px) {
  .post-list > li { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Index ---------- */

.archive-intro { padding-bottom: clamp(32px, 5vw, 48px); }

.overview-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 820px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
}
.overview-card:hover { color: var(--ink); box-shadow: var(--shadow); }
.overview-card .h3 { text-wrap: balance; }

.year-cards {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}
.year-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
}
.year-card:hover { border-color: var(--ink); color: var(--ink); }
.year-card .small { color: var(--muted); text-wrap: pretty; }
.year-card .caption { margin-top: auto; padding-top: 4px; }
.year-num {
  font: 700 34px/1 var(--font-head);
  letter-spacing: -0.035em;
}

.archive-year { display: flex; flex-direction: column; gap: 10px; }
.archive-year + .archive-year { margin-top: clamp(32px, 5vw, 48px); }

.year-links { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }

.feed-link { font-size: 15px; }

/* Headings set on non-heading elements take the display face too. */
.post-cta .h4,
.overview-card .h3 { font-family: var(--font-head); font-weight: 700; color: var(--ink); }

@media (max-width: 640px) {
  /* The headline repeats a case's last crumb; on a phone the trail stops at the year. */
  .crumbs li:nth-child(4) { display: none; }
  /* Facts as label and value rows. */
  .post-facts { gap: 0; }
  .post-facts > div {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
  }
  .post-facts > div:last-child { border-bottom: 1px solid var(--line); }
  .post-facts dt { font-size: 15px; }
}
