/* Copyright 2026 My Digital Sovereignty Ltd. All rights reserved. Proprietary and confidential; unauthorised copying, use or distribution is prohibited. */

/* email-decision-record-verify.css — standalone stylesheet for the verifier
   page (public/email-decision-record-check.html), served under the strict verifier-page CSP
   (styleSrc 'self' only). This file
   is the page's own, not shared with village-apps.css — "the page loads only
   our own files" and the page's own deliberate isolation from the rest of the site's chrome.

   Text in the local Atkinson Hyperlegible files (public/fonts/atkinson/); digests and the DID in
   the system monospace stack. No CDN, no US-owned font host. */

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/fonts/atkinson/atkinson-hyperlegible-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/fonts/atkinson/atkinson-hyperlegible-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --edrv-bg: #ffffff;
  --edrv-fg: #1a1a1a;
  --edrv-border: #666666;
  --edrv-focus: #0052a3;
  --edrv-verified: #1a6b1a;
  --edrv-changed: #a31515;
  --edrv-caution: #8f4f00;
  --edrv-muted: #4a4a4a;
  --edrv-panel-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --edrv-bg: #121212;
    --edrv-fg: #f0f0f0;
    --edrv-border: #999999;
    --edrv-focus: #6fb4ff;
    --edrv-verified: #5fd35f;
    --edrv-changed: #ff8080;
    --edrv-caution: #e0a64d;
    --edrv-muted: #c0c0c0;
    --edrv-panel-bg: #1e1e1e;
  }
}

:root[data-theme="dark"] {
  --edrv-bg: #121212;
  --edrv-fg: #f0f0f0;
  --edrv-border: #999999;
  --edrv-focus: #6fb4ff;
  --edrv-verified: #5fd35f;
  --edrv-changed: #ff8080;
  --edrv-caution: #e0a64d;
  --edrv-muted: #c0c0c0;
  --edrv-panel-bg: #1e1e1e;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--edrv-bg);
  color: var(--edrv-fg);
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  line-height: 1.5;
}

.edrv-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--edrv-bg);
  color: var(--edrv-fg);
  padding: 0.75rem 1rem;
  border: 2px solid var(--edrv-focus);
  z-index: 100;
}
.edrv-skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.edrv-wrap {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.edrv-wrap * { overflow-wrap: anywhere; }

h1, h2 { font-weight: 700; }
h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }

p { margin: 0 0 1rem; }

.edrv-intro { color: var(--edrv-muted); }

.edrv-field {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 2px dashed var(--edrv-border);
  border-radius: 0.25rem;
}
.edrv-field.edrv-drag-over {
  border-color: var(--edrv-focus);
  background: var(--edrv-panel-bg);
}

label { display: block; font-weight: 700; margin-bottom: 0.35rem; }

input[type="file"],
input[type="text"] {
  font: inherit;
  color: inherit;
  background: var(--edrv-bg);
  border: 2px solid var(--edrv-border);
  border-radius: 0.25rem;
  padding: 0.5rem;
  min-height: 2.75rem;
  width: 100%;
  max-width: 32rem;
}

details.edrv-optional { margin: 1rem 0; }
details.edrv-optional summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}
details.edrv-optional .edrv-optional-body { padding: 0.75rem 0 0.25rem; }

.edrv-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

button {
  font: inherit;
  font-weight: 700;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.25rem;
  border: 2px solid var(--edrv-border);
  background: var(--edrv-bg);
  color: var(--edrv-fg);
  cursor: pointer;
}
button[data-edrv-primary] {
  background: var(--edrv-focus);
  border-color: var(--edrv-focus);
  color: #ffffff;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

:focus-visible {
  outline: 3px solid var(--edrv-focus);
  outline-offset: 2px;
}

.edrv-progress-wrap { margin: 1rem 0; }
progress {
  width: 100%;
  height: 1rem;
  accent-color: var(--edrv-focus);
}
.edrv-progress-stage { color: var(--edrv-muted); font-size: 0.9rem; margin-top: 0.35rem; }

.edrv-result {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 2px solid var(--edrv-border);
  border-radius: 0.25rem;
  background: var(--edrv-panel-bg);
}
.edrv-result[data-verdict-tier="pass"] { border-color: var(--edrv-verified); }
.edrv-result[data-verdict-tier="fail"] { border-color: var(--edrv-changed); }
.edrv-result[data-verdict-tier="caution"] { border-color: var(--edrv-caution); }

.edrv-result-headline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}
.edrv-result-icon { flex: none; width: 1.5rem; height: 1.5rem; }

.edrv-result-body code {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 0.9em;
  background: var(--edrv-bg);
  padding: 0.1em 0.3em;
  border-radius: 0.2em;
}

.edrv-samples {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--edrv-border);
  border-radius: 0.25rem;
}
.edrv-samples-intro { color: var(--edrv-muted); margin-bottom: 0.5rem; }
.edrv-samples button { margin-right: 0.5rem; }

.edrv-sample-note { font-style: italic; color: var(--edrv-muted); }

.edrv-records-table {
  width: 100%;
  margin-top: 1.25rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.edrv-records-table caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.edrv-records-table th,
.edrv-records-table td {
  border: 1px solid var(--edrv-border);
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}
.edrv-records-table th { background: var(--edrv-bg); }
.edrv-records-table tr[data-verdict-tier="pass"] td { border-left: 3px solid var(--edrv-verified); }
.edrv-records-table tr[data-verdict-tier="fail"] td { border-left: 3px solid var(--edrv-changed); }
.edrv-records-table tr[data-verdict-tier="caution"] td { border-left: 3px solid var(--edrv-caution); }

.edrv-record-checks { margin: 0; padding: 0; list-style: none; }
.edrv-record-checks li { padding: 0.1rem 0; }

/* Dossier-wide checks list. The status is always a word (`.edrv-check-status`); the left border
   colour only repeats what the word already says, so nothing here is conveyed by colour alone. */
.edrv-dossier-checks { margin-top: 1.25rem; }
.edrv-dossier-checks h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.5rem; }
.edrv-dossier-checks-list { margin: 0; padding: 0; list-style: none; }
.edrv-dossier-checks-list li {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--edrv-border);
  background: var(--edrv-bg);
}
.edrv-dossier-checks-list li[data-check-status="fail"] { border-left-color: var(--edrv-changed); }
.edrv-dossier-checks-list li[data-check-status="pass"],
.edrv-dossier-checks-list li[data-check-status="checked"] { border-left-color: var(--edrv-verified); }
.edrv-dossier-checks-list li[data-check-status="not_established"] { border-left-color: var(--edrv-caution); }
.edrv-check-label { font-weight: 700; }
.edrv-check-detail { margin: 0.25rem 0 0; font-size: 0.9rem; color: var(--edrv-muted); }

details.edrv-truncated { margin-top: 0.35rem; }
details.edrv-truncated summary { cursor: pointer; font-weight: 700; color: var(--edrv-focus); }

.edrv-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media print {
  .edrv-field, .edrv-buttons, .edrv-progress-wrap { display: none; }
  .edrv-result { border: 1px solid #000; color: #000; background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

@media (max-width: 20rem) {
  .edrv-wrap { padding-left: 0.5rem; padding-right: 0.5rem; }
}
