
/* Autocapture vs custom events figures. This article-local stylesheet loads after resources.css.
   Element+class selectors keep these ahead of the .article-content p / span rules. */

.ac-record,
.ac-layers,
.ac-matrix {
  margin: 38px 0;
  padding: 34px 36px 32px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-muted);
}

p.ac-record__title,
p.ac-matrix__title,
p.ac-layers__title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
}

p.ac-record__meta,
p.ac-matrix__meta,
p.ac-layers__meta {
  margin: 5px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: #64748b;
}

/* ---------- Figure 1: one click, three records ---------- */

.ac-record__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.ac-card {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
  border: 1px solid #d5dfec;
  border-radius: 10px;
  background: #fff;
}

p.ac-card__kicker {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

p.ac-card__sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #64748b;
}

.ac-log {
  margin: 14px 0 0;
  padding: 11px 12px 12px;
  border-radius: 8px;
  background: #0d2145;
}

p.ac-log__head {
  margin: 0 0 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93b4e8;
}

.ac-log__rows {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 5px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.35;
}

.ac-log__rows span { color: #8fa8cc; }

.ac-log__rows b {
  font-weight: 600;
  color: #f1f6ff;
  overflow-wrap: anywhere;
}

p.ac-card__proves,
p.ac-card__denies {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
}

p.ac-card__proves { color: #14532d; }
p.ac-card__denies { color: #97402f; }

.ac-card__proves i,
.ac-card__denies i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ac-card__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}

.ac-flag {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}

.ac-flag--good { background: #dff0e6; color: #17693f; }
.ac-flag--warn { background: #fdf2dd; color: #6b4e08; }
.ac-flag--bad { background: #f9e3de; color: #8c3025; }

p.ac-record__note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid #d5dfec;
  font-size: 14px;
  line-height: 1.55;
  color: #3d4d66;
  text-wrap: pretty;
}

p.ac-record__note b { color: var(--color-primary); }

/* ---------- Figure 2: four layers ---------- */

.ac-layers__head { margin-bottom: 20px; }

.ac-layers__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ac-layer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 0 16px;
  padding: 14px 16px;
  border: 1px solid #d5dfec;
  border-radius: 10px;
  background: #fff;
}

.ac-layer--last { border-color: #b8dcc7; background: #f4fbf7; }

.ac-layer__n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e5edf9;
  font-size: 14px;
  font-weight: 700;
  color: #1e3a68;
}

.ac-layer__n--last { background: #17693f; color: #fff; }

p.ac-layer__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary);
}

.ac-layer__name em {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5edf9;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1e3a68;
}

p.ac-layer__fields {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #64748b;
}

.ac-layer__claim {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-left: 16px;
  border-left: 2px solid #dbe4f0;
}

.ac-meter {
  display: flex;
  gap: 4px;
}

.ac-meter i {
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background: #dbe4f0;
}

.ac-meter i.is-on { background: #2f6df6; }
.ac-layer--last .ac-meter i.is-on { background: #17693f; }

p.ac-layer__says {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: #1e3a68;
  text-wrap: pretty;
}

p.ac-layer__says--last { color: #14532d; }

.ac-layers__warn {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 15px 18px;
  border-radius: 10px;
  background: #fdf2dd;
}

p.ac-layers__warn-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.4;
  color: #6b4e08;
}

p.ac-layers__warn-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #4a3a09;
  text-wrap: pretty;
}

/* ---------- Figure 3: five accounts, four numbers ---------- */

.ac-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
}

.ac-grid__head,
.ac-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.7fr) repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
}

.ac-row {
  padding: 10px 12px;
  border: 1px solid #d5dfec;
  border-radius: 8px;
  background: #fff;
}

.ac-grid__head { padding: 0 12px; }

.ac-grid__corner {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.ac-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

.ac-col i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6a80;
}

.ac-row__name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
}

.ac-row__name em {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: #64748b;
}

.ac-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ac-cell em { display: none; }

.ac-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.ac-mark--yes { background: #17693f; }
.ac-mark--no { border: 2px solid #b0bdcd; }
.ac-mark--fail { background: #97402f; color: #fff; }
.ac-mark--sys { background: #6b4e08; color: #fff; font-size: 10px; }

p.ac-matrix__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.3;
  color: #64748b;
}

.ac-matrix__legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ac-reads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.ac-read {
  display: flex;
  flex-direction: column;
  padding: 15px 16px 14px;
  border: 1px solid #d5dfec;
  border-radius: 10px;
  background: #fff;
}

p.ac-read__value {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

p.ac-read__def {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 9px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #1e3a68;
  text-wrap: pretty;
}

.ac-read__def em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5a6a80;
}

p.ac-read__who {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid #e3eaf3;
  font-size: 12.5px;
  line-height: 1.4;
  color: #64748b;
}

p.ac-matrix__note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid #d5dfec;
  font-size: 14px;
  line-height: 1.55;
  color: #3d4d66;
  text-wrap: pretty;
}

p.ac-matrix__note b { color: var(--color-primary); }

/* ---------- Narrow ---------- */

@media (max-width: 1180px) {
  .ac-record,
  .ac-layers,
  .ac-matrix { padding: 28px 24px 26px; }

  .ac-record__cols { grid-template-columns: minmax(0, 1fr); }

  .ac-layer {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px 14px;
  }

  .ac-layer__claim {
    grid-column: 2;
    grid-row: 2;
    padding-left: 14px;
  }

  .ac-grid__head,
  .ac-row { grid-template-columns: minmax(130px, 1.5fr) repeat(7, minmax(0, 1fr)); }

  .ac-reads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .ac-layers__warn { grid-template-columns: minmax(0, 1fr); gap: 6px; }

  .ac-grid__head { display: none; }

  .ac-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .ac-cell {
    justify-content: flex-start;
    gap: 9px;
  }

  .ac-cell em {
    display: block;
    font-style: normal;
    font-size: 13px;
    color: #3d4d66;
  }

  .ac-reads { grid-template-columns: minmax(0, 1fr); }
}
