/* MailCHK -- shared stylesheet. Sober, not flashy: a lot of whitespace, one
   accent colour (Secure Networks red, sampled from the real logo file --
   #FF1700), system fonts only (no external font/CDN dependency, consistent
   with this project's self-hosted, no-third-party-services posture and the
   strict `default-src 'self'` CSP in security_headers.go). */

:root {
  --bg: #faf9f8;
  --surface: #ffffff;
  --border: #e8e5e3;
  --text: #1c1b1a;
  --text-muted: #6b6764;
  --accent: #ff1700;
  --accent-dark: #cc1200;
  --accent-tint: #fff0ee;
  --pass: #1a7f4b;
  --pass-tint: #eaf6ef;
  --fail-tint: #fdeceb;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 27, 26, 0.04), 0 8px 24px rgba(28, 27, 26, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ---- Layout shell ---- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}

.brand-logo-link {
  display: block;
  line-height: 0;
}

.brand-logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brand img {
  height: 28px;
  width: auto;
  display: block;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

main {
  flex: 1;
  padding: 56px 24px 64px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

.site-footer {
  padding: 22px 24px 32px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---- Typography ---- */

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.lede {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 52ch;
}

/* ---- Cards ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.card + .card {
  margin-top: 20px;
}

/* ---- Form controls ---- */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 16px;
}
input[type="email"]:focus,
input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.captcha-image {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  max-width: 100%;
  height: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.btn:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

/* ---- Explainer row (home page) ---- */

.mechanisms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.mechanism {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.mechanism .abbr {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 4px;
}

.mechanism p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .mechanisms {
    grid-template-columns: 1fr;
  }
}

/* ---- Address / report display ---- */

.address-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--accent-tint);
  border: 1px solid #ffd9d3;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-dark);
  word-break: break-all;
}

.note {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ---- Report status ---- */

.status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}
.status-banner.pending {
  background: #f1efec;
  color: var(--text-muted);
}
.status-banner.error {
  background: var(--fail-tint);
  color: var(--accent-dark);
}

.meta-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 14px;
  margin-bottom: 24px;
}
.meta-list dt {
  color: var(--text-muted);
}
.meta-list dd {
  margin: 0;
  font-weight: 600;
}

table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.results {
  table-layout: fixed;
}
table.results th:nth-child(1),
table.results td:nth-child(1) {
  width: 22%;
}
table.results th:nth-child(2),
table.results td:nth-child(2) {
  width: 26%;
}
table.results th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--border);
}
table.results td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.results tr:last-child td {
  border-bottom: none;
}
table.results td.mechanism-name {
  font-weight: 700;
  white-space: nowrap;
  padding-right: 16px;
}
table.results td.detail {
  color: var(--text-muted);
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: lowercase;
}
.badge.pass {
  background: var(--pass-tint);
  color: var(--pass);
}
.badge.fail {
  background: var(--fail-tint);
  color: var(--accent-dark);
}
.badge.neutral {
  background: #f1efec;
  color: var(--text-muted);
}
