/*! © 2015–2026 YourWeb (yourweb.se). All rights reserved. Proprietary – see LICENSE.md */
/* E-postkoll (/verktyg/e-postkoll/). Styles only this tool uses, prefix .mail-.
   Linked after /verktyg/verktyg.css.

   Contents
   01 Hero: the four things that are checked
   02 Result: the four record cards
   03 Records, keys and suggestions */

/* ───────────────────────── 01 Hero ───────────────────────── */

.mail-part {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
  line-height: 1.2;
}

.mail-part small {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ───────────────────────── 02 Result: the four record cards ───────────────────────── */

.mail-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

.mail-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding: 1.1rem;
  border-color: rgb(var(--st-rgb) / 0.3);
}

.mail-card > * {
  min-width: 0;
}

.mail-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.mail-card__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-sm);
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--accent);
}

.mail-card__titles {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.mail-card__title {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.mail-card__sub {
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.mail-card__what {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* What the check found, in the words of the API, and how to fix it. */
.mail-card__finding {
  display: grid;
  gap: 0.55rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.mail-card__headline {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mail-card__detail {
  color: var(--text-soft);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.mail-card__score {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 700;
}

.mail-card__score.is-unmeasured {
  grid-template-columns: minmax(0, 1fr) auto;
}

.mail-card__score b {
  color: var(--st);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (min-width: 40rem) {
  .mail-card {
    padding: 1.35rem;
  }
}

@media (min-width: 52rem) {
  .mail-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* ───────────────────────── 03 Records, keys and suggestions ───────────────────────── */

.mail-block {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.mail-label {
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mail-block .kv--cols {
  gap: 0.75rem 1rem;
  margin-top: 0.25rem;
}

.mail-block .kv > div {
  align-content: start;
}

/* Records stay readable on a phone: slightly tighter than the shared .code, still wrapping. */
.mail-card .code {
  padding: 0.7rem 0.8rem;
  font-size: 0.84rem;
}

.mail-empty {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

/* DKIM selectors that were found */
.mail-keys {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mail-keys li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  font-family: var(--mono);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.mail-keys small {
  color: var(--text-dim);
  font-family: "Raleway", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

/* A record to start from: set apart, never styled as a verdict. */
.mail-suggest {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 1rem;
  border: 1px dashed rgb(var(--accent-rgb) / 0.55);
  border-radius: var(--radius-md);
  background: rgb(var(--accent-rgb) / 0.06);
}

.mail-suggest .mail-label {
  color: var(--accent);
}

.mail-suggest__where {
  color: var(--text-soft);
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.mail-suggest__where strong {
  color: var(--text);
}

.mail-suggest__notes {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.15rem;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.mail-suggest__notes p:first-child {
  padding-top: 0.6rem;
}
