/* attest.olocus.com — app-less witness consent surface.
   Renders inside the shared `.app-shell` / `.app-main` chrome (see
   attest_shell.rs) so the surface looks + feels identical to
   olocus.com. Colours, spacing, radius + motion all come from
   tokens.css, so light/dark switching is automatic. This file holds
   only the witness-specific additions on top of the shared card/button
   idiom: the witness chrome (coral left border + overline), the
   disclosure ladder, and the "what can they learn?" expander. */

.attest-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
  margin-block-start: var(--space-5);
  padding: var(--space-5);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-secondary);
  /* Witness chrome (STYLE-GUIDE §3): the user's chrome retreats and the
     witness card carries a coral left edge so it is unmistakably a
     bounded "you are acting as a witness" surface. */
  border-left: 3px solid var(--color-primary-accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

/* "witness" overline — names the actor before anything else. */
.attest-overline {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-accent);
  margin: 0;
}

.attest-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-heading);
}

.attest-subtitle {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
  color: var(--color-text-heading);
}

.attest-helper {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-body);
  overflow-wrap: anywhere;
}

.attest-helper--muted {
  color: var(--color-text-muted);
}

/* Recognition detail (who asked) — the short key, de-emphasised. */
.attest-fingerprint {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--color-bg-surface);
  padding: 0 var(--space-1);
  border-radius: var(--r-sm);
  color: var(--color-text-muted);
}

.attest-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.attest-section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Disclosure ladder — each rung an independently legible row; never
   collapsed into a single indicator (STYLE-GUIDE §0). */
.attest-disclosure-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.attest-disclosure-option {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--r-md);
  background: var(--color-bg-surface);
  cursor: pointer;
}

.attest-disclosure-option input[type="radio"] {
  margin-block-start: 0.15rem;
  accent-color: var(--color-primary-accent);
}

.attest-disclosure-option--selected {
  border-color: var(--color-primary-accent);
  box-shadow: inset 0 0 0 1px var(--color-primary-accent);
}

.attest-toggle {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.attest-toggle input[type="checkbox"] {
  inline-size: 1.2rem;
  block-size: 1.2rem;
  accent-color: var(--color-primary-accent);
}

/* "What can they learn?" expander — keeps the honest detail (what the
   relay stores, the v1 linkability limit) available without weighing
   down the lead copy. */
.attest-details {
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--r-md);
  background: var(--color-bg-surface);
  padding: var(--space-3) var(--space-4);
}

.attest-details > summary {
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-heading);
  list-style: none;
}

.attest-details > summary::-webkit-details-marker {
  display: none;
}

.attest-details > summary::after {
  content: "＋";
  float: inline-end;
  color: var(--color-text-muted);
}

.attest-details[open] > summary::after {
  content: "－";
}

.attest-details > p {
  margin: var(--space-3) 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.attest-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-block-start: var(--space-2);
}

.attest-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 2.75rem;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.attest-cta--primary {
  background: var(--color-primary-bg);
  color: var(--color-text-on-primary);
}

.attest-cta--primary[disabled] {
  background: var(--color-bg-overlay);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.attest-cta--decline {
  background: transparent;
  border-color: var(--color-border-strong, var(--color-border-secondary));
  color: var(--color-text-heading);
}

/* Standalone full-width CTA — used on the guest receipt, where the
   actions stack vertically rather than sitting in an `.attest-actions`
   row. */
.attest-cta--block {
  display: flex;
  inline-size: 100%;
  margin-block-start: var(--space-2);
}

/* Guest receipt (`/g`) — the kept artifact's field list, read
   field-by-field (independent legibility). */
.guest-receipt-detail {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.guest-receipt-detail dt {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-heading);
}

.guest-receipt-detail dd {
  margin: var(--space-1) 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-body);
  overflow-wrap: anywhere;
}

.attest-banner {
  padding: var(--space-3);
  border-radius: var(--r-md);
  border: 1px solid var(--red-500);
  background: var(--color-bg-surface);
  color: var(--color-text-body);
}

/* Succession consent section (PROTOCOL.md §6.6.3). The stated loss
   date is the object of consent: its own card, rendered as the largest
   text in the section — the witness co-signs this exact date via the
   claim hash, so nothing may visually outrank it. */
.attest-succession-loss-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--r-md);
  background: var(--color-bg-surface);
}

.attest-succession-loss-date {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-heading);
}

.attest-error {
  color: var(--red-500);
}

/* Mutual-receipt consent bullet list. */
.mutual-consent-lines {
  margin: 0;
  padding-inline-start: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text-body);
}
