:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --testo: #18171a;
  --testo-2: #5f5c66;
  --testo-3: #a6a3ad;
  --linea: #ecebef;
  --traccia: #f5f4f7;
  --accento: #d0601c;        /* the single accent: burnt orange, on the pill, the wait line and the open lock */
  --accento-scuro: #b14d10;
  --accento-velo: #fcf0e8;
  --ombra: 30, 22, 40;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { font-size: clamp(12px, min(3.5vw, 3.1vh), 17px); }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stage { min-height: 100vh; display: grid; place-items: center; padding: 1em; }

/* ---- the card: the blurred document on top, the request below ---- */
.card {
  width: min(22em, 92vw);
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: 1.3em;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(var(--ombra), .04), 0 22px 48px -30px rgba(var(--ombra), .34);
}

.doc {
  height: 7.6em;
  background: linear-gradient(180deg, #f3f2f6, #faf9fb);
  border-bottom: 1px solid var(--linea);
  overflow: hidden;
  display: grid; place-items: end center;
}
.doc__page {
  width: 72%;
  height: 6.6em;
  background: #fff;
  border-radius: .55em .55em 0 0;
  box-shadow: 0 0 0 1px rgba(var(--ombra), .05), 0 10px 24px -14px rgba(var(--ombra), .25);
  padding: .8em .9em 0;
  display: grid; align-content: start; gap: .38em;
  filter: blur(4px);
  opacity: .8;
  will-change: filter, opacity, transform;
}
.doc__kicker { width: 22%; height: .32em; border-radius: 1em; background: var(--accento); opacity: .7; }
.doc__title { width: 78%; height: .55em; border-radius: 1em; background: #2a2730; }
.doc__title--short { width: 46%; }
.doc__chart { display: flex; align-items: end; gap: .3em; height: 1.5em; margin: .2em 0 .1em; }
.doc__chart i { flex: 1; height: calc(var(--h) * 100%); border-radius: .2em .2em 0 0; background: #d8d5de; }
.doc__chart i:nth-child(6) { background: var(--accento); opacity: .75; }
.doc__line { width: 92%; height: .3em; border-radius: 1em; background: #e6e4ea; }
.doc__line--short { width: 60%; }

.panel { padding: 1em 1.2em 1.15em; display: grid; justify-items: start; }

.file { display: flex; align-items: center; gap: .45em; font-size: .78em; color: var(--testo-2); }
.file__icon { width: 1.25em; height: 1.25em; fill: none; stroke: var(--testo-2); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.file__name { font-weight: 600; color: var(--testo); }
.file__app { color: var(--testo-3); }
.file__app::before { content: "·"; margin-right: .45em; }

.panel__title { margin-top: .55em; font-size: 1.2em; font-weight: 660; font-stretch: 106%; letter-spacing: -.01em; }
.panel__sub { margin-top: .15em; font-size: .82em; color: var(--testo-2); }

.roll { display: inline-grid; overflow: hidden; vertical-align: top; line-height: 1.3em; height: 1.3em; }
.roll__line { grid-area: 1 / 1; white-space: nowrap; display: block; }

/* the owner: initials only, no presence dot */
.owner { margin-top: .75em; display: flex; align-items: center; gap: .55em; }
.avatar { will-change: transform; }
.avatar {
  width: 2em; height: 2em; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .78em; font-weight: 650; letter-spacing: .02em;
  color: var(--accento-scuro);
  background: var(--accento-velo);
  box-shadow: inset 0 0 0 1px rgba(208, 96, 28, .22), 0 6px 14px -8px rgba(var(--ombra), .35);
}
.owner__text { display: grid; line-height: 1.2; }
.owner__label { font-size: .66em; letter-spacing: .08em; text-transform: uppercase; color: var(--testo-3); }
.owner__name { font-size: .84em; font-weight: 600; }

/* the optional note */
.note { width: 100%; overflow: hidden; padding-top: .7em; }
.note__toggle { display: inline-flex; align-items: center; gap: .35em; font-size: .78em; color: var(--testo-2); padding: .2em 0; border-radius: .4em; }
.note__toggle svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.note__toggle:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
@media (hover: hover) { .note__toggle:hover { color: var(--testo); } }
.note__box { height: 0; overflow: hidden; }
.note__field {
  margin-top: .45em;
  width: 100%;
  font: inherit; font-size: .82em;
  color: var(--testo);
  padding: .62em .8em;
  border: 1px solid var(--linea);
  border-radius: .7em;
  background: var(--traccia);
  outline: none;
  transition: border-color .2s, background .2s;
}
.note__field:focus { border-color: rgba(208, 96, 28, .55); background: #fff; }

/* ---- the pill: the site's elastic pill, its label widening on the wdth axis ---- */
.pill {
  position: relative;
  margin-top: .85em;
  height: 2.9em;
  min-width: 12.5em;
  padding: 0 1.35em;
  border-radius: 99em;
  background: var(--accento);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 12px 22px -12px rgba(208, 96, 28, .75);
  overflow: hidden;
  will-change: transform;
  touch-action: manipulation;
  transition: background-color .35s ease, box-shadow .35s ease;
}
.pill:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
.pill__face { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; gap: .5em; font-weight: 620; font-size: .95em; font-stretch: var(--wdth, 100%); }
.lock { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.lock__body { fill: rgba(255,255,255,.14); }
.pill__roll { height: 1.3em; }
.pill__wait { position: absolute; left: 1.3em; right: 1.3em; bottom: .5em; height: 1.5px; border-radius: 2px; background: rgba(255,255,255,.22); overflow: hidden; opacity: 0; }
.pill__wait span { position: absolute; top: 0; bottom: 0; left: 0; width: 34%; border-radius: 2px; background: #fff; }
.pill.is-sent { background: #2a2730; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 12px 22px -14px rgba(var(--ombra), .7); }
.pill.is-open { background: var(--accento); }

@media (prefers-reduced-motion: reduce) {
  .doc__page, .owner { will-change: auto; }
}
