/* The public trust center (internal/httpapi/trust_public.go).
 *
 * A stylesheet of its own, served from the trust domain: the CSP is
 * style-src 'self' with no 'unsafe-inline', and this page is a document for
 * strangers, not an application. The same tokens as the policy pages, so the
 * organization's branding (brand.css, emitted after this) recolors it the
 * same way: --accent, the light/dark ground, the typeface.
 */

:root {
  --bg: #ffffff;
  --bg2: #f7f8fa;
  --ink: #14171c;
  --muted: #5b626e;
  --faint: #7a8290;
  --edge: #e3e6ea;
  --accent: #b34a1f;
  --ok: #1c7c4a;
  --warn: #9a6700;
  --bad: #b42318;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --bg2: #14171c;
    --ink: #e9ecf1;
    --muted: #9aa2b1;
    --faint: #6b7280;
    --edge: #232830;
    --accent: #ff8a5c;
    --ok: #4ade80;
    --warn: #f5c451;
    --bad: #ff8a80;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg2);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 32px 20px 56px; }
.preview {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 6px 12px;
}

/* The header card. */
.hero {
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 32px;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand img { max-height: 40px; max-width: 180px; }
.brand .sep { width: 1px; height: 26px; background: var(--edge); }
.brand .label { font-size: 17px; font-weight: 500; }
.hero h1 { font-size: 30px; line-height: 1.2; margin: 26px 0 12px; letter-spacing: -0.01em; }
.hero p { color: var(--muted); margin: 0 0 12px; max-width: 75ch; }
.contacts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; font-size: 15px; }
.who { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.who form { display: inline; }

.button, button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.button.quiet, button.quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--edge);
  padding: 6px 12px;
  font-size: 13px;
}
.button:hover, button:hover { filter: brightness(1.06); }

/* Sections. */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 32px; }
@media (min-width: 900px) { .grid { grid-template-columns: 340px minmax(0, 1fr); } }
.grid.single { grid-template-columns: minmax(0, 1fr); }
h2 { font-size: 19px; margin: 0 0 14px; }
.card {
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 22px 24px;
}
section + section { margin-top: 28px; }
.updated { font-size: 12px; color: var(--faint); font-weight: 400; margin-left: 8px; }

/* Badges: a generic seal per standard - initials, never a certifying
 * body's mark. */
.badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.badge { display: flex; align-items: center; gap: 14px; }
.seal {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-align: center;
  line-height: 1.1;
  padding: 4px;
}
.seal.pending { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.badge .name { font-weight: 500; }
.badge .status { font-size: 13px; color: var(--muted); }
.badge .status.certified { color: var(--ok); }
.declared { font-size: 12px; color: var(--faint); margin: 16px 0 0; }

/* Documents. */
.docgroup + .docgroup { margin-top: 18px; }
.docgroup h3 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.doc .desc { display: block; font-size: 13px; color: var(--muted); }
.lock { flex: none; font-size: 12px; color: var(--muted); border: 1px solid var(--edge); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.lock.open { color: var(--ok); border-color: var(--ok); }

/* Data collected. */
.data { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .data { grid-template-columns: 1fr 1fr; } }
.data li { display: flex; gap: 10px; align-items: baseline; }
.mark { flex: none; width: 18px; text-align: center; font-weight: 700; }
.mark.yes { color: var(--ink); }
.mark.no { color: var(--faint); }
.data .no-text { color: var(--muted); }

/* Subprocessors. */
.subs { list-style: none; margin: 0; padding: 0; }
.sub { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-top: 1px solid var(--edge); }
.sub:first-child { border-top: 0; padding-top: 0; }
.sub .purpose { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.sub .where { color: var(--faint); font-size: 13px; }

/* FAQ. */
details { border-top: 1px solid var(--edge); padding: 14px 0; }
details:first-of-type { border-top: 0; padding-top: 0; }
summary { cursor: pointer; font-weight: 500; }
details p { color: var(--muted); margin: 10px 0 0; white-space: pre-line; }

/* Forms. */
.narrow { max-width: 640px; margin: 0 auto; }
.hero + .narrow { margin-top: 32px; }
form.stack { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: 7px;
  padding: 9px 11px;
}
textarea { min-height: 84px; resize: vertical; }
.row { display: grid; gap: 16px; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }
fieldset { border: 1px solid var(--edge); border-radius: 8px; padding: 14px 16px; margin: 0; }
legend { font-size: 14px; font-weight: 500; padding: 0 6px; }
.choice { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; }
.choice input { width: auto; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.error { border: 1px solid var(--bad); color: var(--bad); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.notice { border: 1px solid var(--edge); background: var(--bg); border-radius: var(--radius); padding: 28px; }
.notice h1 { font-size: 24px; margin: 0 0 10px; }
.notice p { color: var(--muted); margin: 0 0 10px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
hr { border: 0; border-top: 1px solid var(--edge); margin: 28px 0; }

footer { margin-top: 40px; text-align: center; font-size: 12px; color: var(--faint); }
