/* Polyfetti — the free document tools.
   Loads after counter.css and reuses its tokens. */

.tool h2 {
  font-family: var(--round);
  font-size: var(--step-1);
  margin: 0 0 6px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}
.row input {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  color: var(--ink);
  flex: 1 1 12rem;
  font: inherit;
  min-width: 0;
  padding: 12px 14px;
}
.row input:focus-visible {
  border-color: var(--shu);
  outline: 2px solid var(--shu);
  outline-offset: 1px;
}
.row .btn { flex: 0 0 auto; }

.out {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 14px;
  margin-top: 14px;
  padding: 16px 18px;
}
.out .big {
  font-family: var(--round);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.out .big + .big { color: var(--ai); }
.out .fine { margin: 8px 0 0; }

.alts {
  list-style: none;
  margin: 10px 0;
  padding: 0;
}
.alts li {
  border-left: 2px solid var(--rule-strong);
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin-bottom: 8px;
  padding-left: 12px;
}

.extra { margin-top: 16px; }
.extra summary {
  color: var(--muted);
  cursor: pointer;
  font-size: var(--step--1);
  padding: 6px 0;
}
.eras {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 12px 0;
  padding: 0;
}
.eras li {
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-bottom: 8px;
}
.eras b { font-family: var(--round); font-size: var(--step-0); }
.eras span { color: var(--muted); font-size: var(--step--1); }
.eras code {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: var(--step--2);
  padding: 2px 7px;
}

/* ---- the glossary ---- */

.gloss-h {
  border-bottom: 1px solid var(--rule);
  font-family: var(--round);
  font-size: var(--step-0);
  margin: 22px 0 0;
  padding-bottom: 6px;
}
.gloss-h span { color: var(--muted); font-size: var(--step--1); font-weight: 400; }

.gloss {
  display: grid;
  gap: 3px 18px;
  grid-template-columns: minmax(7rem, max-content) 1fr;
  margin: 12px 0 0;
}
.gloss dt {
  font-family: var(--round);
  font-size: var(--step--1);
}
.gloss dd {
  color: var(--ink-soft);
  font-size: var(--step--1);
  margin: 0;
}

@media (max-width: 560px) {
  .gloss { grid-template-columns: 1fr; gap: 1px; }
  .gloss dd { margin-bottom: 9px; }
  .row .btn { width: 100%; }
}

/* The reader's output. A textarea rather than a <pre> so it can be selected and
   edited — OCR is nearly always slightly wrong somewhere, and somebody fixing one
   character before copying is the normal case, not the exception. */
#text {
  background: var(--paper-sunk);
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
  line-height: 1.8;
  margin: 10px 0 14px;
  padding: 14px 16px;
  resize: vertical;
  width: 100%;
}
#text:focus-visible { border-color: var(--shu); outline: 2px solid var(--shu); outline-offset: 1px; }

/* ---------------------------------------------------------------------------
   The labelled form field, moved out of sign.css 2026-09-08.

   pdf.html uses `.stack` for every one of its inputs and does not load sign.css,
   so the PDF tool's fields had no wrapper, no label styling and browser-default
   inputs while the signing tool's looked finished. Both load this sheet.
   -------------------------------------------------------------------------- */

.stack { display: block; flex: 1 1 8rem; }
.stack > span {
  color: var(--muted);
  display: block;
  font-size: var(--step--1);
  margin-bottom: 6px;
}
.stack input, .stack select {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}
.stack input[type="range"] { padding: 0; accent-color: var(--shu); }
