/* done-state.css - the one end screen.
 *
 * WHY THIS FILE EXISTS
 *
 * Four screens close a job on this site: ParaSend after a live hand-over,
 * ParaSend after a link is sealed, ParaSign after a document is signed or sent
 * out for signature, and the two receiving pages after a file lands. Each had
 * grown its own ending, and the ParaSend one said the same thing four times
 * over: a mascot bubble, a headline, a status card and a row of badges, all
 * carrying algorithm names. A person who has just handed a photo to a
 * colleague does not need to be convinced; they need to be told it worked and
 * left alone.
 *
 * THE RHYTHM, and it is the same on all four
 *
 *   a small mark (96px, never more)
 *   one heading in ordinary words
 *   one sentence saying what is true now
 *   the thing they came for, if there is one (a link to copy, a file to save)
 *   one primary button
 *   one quiet line under it
 *   <details> with the technical account, closed
 *
 * The technical names are not deleted, they are folded away. Anyone who wants
 * ML-KEM-768 opens "What made this safe" and finds it in a sentence.
 *
 * Design-system tokens only. This file never redefines one.
 */

.done-state {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-5, 24px) 0 var(--space-6, 32px);
}

/* The mascot, or a plain tick, at a size that leaves the words the stage. */
.done-mark {
  width: 96px;
  height: 96px;
  max-width: 96px;
  display: block;
  margin: 0 auto var(--space-4, 16px);
  user-select: none;
  -webkit-user-drag: none;
}

.done-title {
  font-family: var(--sans);
  font-size: var(--text-xl, 24px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--space-3, 12px);
}

.done-line {
  font-family: var(--sans);
  font-size: var(--text-base, 15px);
  line-height: 1.6;
  color: var(--ink-2, var(--ink-dim));
  margin: 0 auto;
  max-width: 30rem;
}

/* What they came for: a link to copy, a file to save. Optional. */
.done-payload {
  margin: var(--space-5, 24px) auto 0;
  max-width: 30rem;
  text-align: left;
}

.done-payload:empty { display: none; }

.done-link {
  display: block;
  font-family: var(--mono);
  font-size: var(--text-xs, 11px);
  line-height: 1.5;
  color: var(--ink-2, var(--ink));
  background: var(--card, transparent);
  border: 1px solid var(--ink-hair);
  border-radius: 10px;
  padding: var(--space-3, 12px);
  word-break: break-all;
  margin: 0 0 var(--space-2, 8px);
}

.done-link-meta {
  font-family: var(--sans);
  font-size: var(--text-sm, 13px);
  color: var(--ink-dim);
  margin: var(--space-2, 8px) 0 0;
}

.done-actions {
  margin-top: var(--space-5, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3, 12px);
}

/* Exactly one of these per end screen. */
.done-actions .done-primary {
  min-width: 15rem;
}

/* The quiet line under the button. A link in weight, a button in behaviour, and
   a 44px tap target all the same: quiet is about attention, not about being
   hard to hit with a thumb. */
.done-quiet {
  background: none;
  border: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-family: var(--sans);
  font-size: var(--text-sm, 13px);
  color: var(--ink-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  line-height: 1.4;
}

.done-quiet:hover,
.done-quiet:focus-visible { color: var(--ink); }

.done-quiet[hidden] { display: none; }

/* The technical account, folded away. */
.done-details {
  margin: var(--space-6, 32px) auto 0;
  max-width: 30rem;
  text-align: left;
  border-top: 1px solid var(--ink-hair);
  padding-top: var(--space-3, 12px);
}

.done-details > summary {
  font-family: var(--sans);
  font-size: var(--text-sm, 13px);
  color: var(--ink-dim);
  cursor: pointer;
  list-style: none;
  padding: var(--space-2, 8px) 0;
}

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

.done-details > summary::before {
  content: "+";
  display: inline-block;
  width: 1.1em;
  font-family: var(--mono);
  color: var(--ink-dim);
}

.done-details[open] > summary::before { content: "\2212"; }

.done-details > summary:hover,
.done-details > summary:focus-visible { color: var(--ink); }

.done-details-body {
  font-family: var(--sans);
  font-size: var(--text-sm, 13px);
  line-height: 1.65;
  color: var(--ink-dim);
  padding-bottom: var(--space-3, 12px);
}

.done-details-body p { margin: 0 0 var(--space-3, 12px); }
.done-details-body p:last-child { margin-bottom: 0; }
.done-details-body code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--ink-2, var(--ink));
}

@media (max-width: 560px) {
  .done-state { padding-top: var(--space-4, 16px); }
  .done-mark { width: 72px; height: 72px; }
  .done-title { font-size: var(--text-md, 18px); }
  .done-actions .done-primary { width: 100%; min-width: 0; }
}
