/* app.diparaf.com, the signer app. The landing page's tokens and type (landing/DESIGN.md), kept small. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations"), url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Red Hat Mono";
  src: url("fonts/red-hat-mono-latin-wght-normal.woff2") format("woff2-variations"), url("fonts/red-hat-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
:root {
  --font: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ground: #fbfcfa; --ground-2: #eef4ef; --sheet: #ffffff;
  --ink: #16191b; --ink-2: #4a5552; --ink-3: #66726e;
  --rule: #d5e1d8; --rule-2: #a9c4b1;
  --blue: #2747c4; --blue-2: #1d3699; --blue-tint: #e6ebfa; --on-blue: #ffffff;
  --ok: #1b7346; --ok-bg: #e2f2e8; --bad: #b3261e; --bad-bg: #fbe6e4; --warn: #8f520a; --warn-bg: #fbefd9;
  --gut: clamp(16px, 5vw, 48px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0e1512; --ground-2: #121c18; --sheet: #142019;
    --ink: #e6ece8; --ink-2: #a9b7b0; --ink-3: #8a9a93;
    --rule: #26352e; --rule-2: #3a5045;
    --blue: #93a8ff; --blue-2: #b6c4ff; --blue-tint: #1c2647; --on-blue: #0b1230;
    --ok: #7fd3a1; --ok-bg: #12301f; --bad: #ffb4ab; --bad-bg: #3a1512; --warn: #f4c27a; --warn-bg: #33240c;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* a component's own display rule must never unhide what the page hid */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.6 var(--font); }
a { color: var(--blue); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wrap { width: min(100% - 2 * var(--gut), 760px); margin-inline: auto; }

.bar { border-bottom: 1px solid var(--rule); background: var(--ground); }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.125rem; }
.mark { width: 28px; height: 28px; flex: none; }
.mark-ring { fill: none; stroke: currentColor; stroke-width: 3; }
.mark-dot { fill: currentColor; }
.mark-paraf { fill: none; stroke: var(--blue); stroke-width: 2.9; stroke-linecap: round; stroke-linejoin: round; }
.who { display: flex; align-items: center; gap: 12px; margin: 0; }
.who-name { color: var(--ink-2); font-size: .9375rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { padding-block: clamp(28px, 6vw, 56px); }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: clamp(20px, 4vw, 36px); }
.panel + .panel { margin-top: 20px; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 600; margin: 0 0 12px; text-wrap: balance; }
h2 { font-size: 1.125rem; line-height: 1.3; font-weight: 600; margin: 28px 0 10px; }
p { margin: 0 0 14px; text-wrap: pretty; }
.lead { font-size: 1.125rem; color: var(--ink-2); }
.fine { font-size: .875rem; color: var(--ink-3); margin-top: 20px; }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 10px 14px; }
.ok-note { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 10px 14px; }
.bad-note { background: var(--bad-bg); color: var(--bad); border-radius: 8px; padding: 10px 14px; }
.caps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.caps li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.caps .sub { display: block; font-size: .875rem; color: var(--ink-3); }
.result { border-radius: 8px; padding: 10px 14px; margin-top: 12px; }
.result.ok { background: var(--ok-bg); color: var(--ok); }
.result.bad { background: var(--bad-bg); color: var(--bad); }
.result.busy { background: var(--ground-2); color: var(--ink-2); }
.mono { font-family: var(--mono); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 8px; font: 500 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .9375rem; }
.btn-ink { background: var(--blue); color: var(--on-blue); }
.btn-ink:hover { background: var(--blue-2); }
.btn-line { background: transparent; color: var(--blue); border-color: var(--rule-2); }
.btn-line:hover { border-color: var(--blue); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: var(--rule); }
.btn-quiet:hover { color: var(--ink); border-color: var(--rule-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.result-sub { display: block; font-size: .875rem; margin-top: 4px; word-break: break-word; }
.result .btn { margin-top: 10px; }
h2.first { margin-top: 0; }

/* forms: signing and revoking */
.sign fieldset { border: 0; border-top: 1px solid var(--rule); margin: 0; padding: 18px 0 6px; min-width: 0; }
.sign fieldset[disabled] { opacity: .6; }
.sign legend { font-weight: 600; padding: 0 0 6px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 560px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.grid .wide, .sign > label.wide { grid-column: 1 / -1; }
.sign label { display: grid; gap: 4px; font-size: .9375rem; color: var(--ink-2); }
.sign input:not([type="checkbox"]):not([type="file"]), .sign select {
  font: 400 1rem/1.3 var(--font); color: var(--ink); background: var(--ground); border: 1px solid var(--rule-2);
  border-radius: 8px; min-height: 44px; padding: 8px 10px; width: 100%;
}
.sign input:focus-visible, .sign select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.sign label.check-row { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.sign label.check-row input { width: 18px; height: 18px; }
.sign details { margin-top: 12px; }
.sign summary { cursor: pointer; color: var(--blue); padding: 6px 0; }
.sign details .grid { margin-top: 8px; }
.drop { position: relative; display: grid; gap: 4px; border: 1.5px dashed var(--rule-2); border-radius: 10px; padding: 18px; cursor: pointer; background: var(--ground); }
.drop:hover, .drop:focus-within { border-color: var(--blue); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-main { color: var(--blue); font-weight: 500; }
.drop-sub { font-size: .875rem; color: var(--ink-3); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.preview { width: 100%; height: min(72vh, 820px); border: 1px solid var(--rule); border-radius: 8px; background: var(--ground-2); }
.summary { margin: 14px 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.summary div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
@media (max-width: 560px) { .summary div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.summary dt { color: var(--ink-3); font-size: .875rem; }
.summary dd { margin: 0; word-break: break-all; }

/* the signer's documents */
.docs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.docs li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.docs .sub { grid-column: 2; font-size: .875rem; color: var(--ink-3); }
.docs .doc-act { grid-column: 3; grid-row: 1 / span 2; }
.pill { display: inline-block; padding: .2em .65em; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.lead .sub { display: block; font-size: .9375rem; color: var(--ink-3); margin-top: 4px; }

.foot { padding-block: 24px 40px; color: var(--ink-3); font-size: .875rem; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
