/* ===========================================================================
   count.css . THE COUNT, the free browser local file reader.

   Pairs with /count.js. Styles two things and nothing else:
     [data-count-zone]  the drop zone the visitor drags a file onto
     #countResult       the result cards and the running total

   Tokens are read from the host page with a fallback, so this file is correct
   on a pupul page and still legible if it is ever loaded on its own.
   Radii 18 / 12 / 10. Cards white 3.5 to 5.5 percent. Lines white 10 and 18.
   Mobile first. Nothing here can produce horizontal scroll.
   =========================================================================== */

.count-scope,
[data-count-zone],
[data-count-zone] *,
#countResult,
#countResult *{box-sizing:border-box}

/* --------------------------------------------------------------------------
   1. THE DROP ZONE
   -------------------------------------------------------------------------- */

[data-count-zone]{
  display:block;
  position:relative;
  margin-top:28px;
  padding:26px 20px 24px;
  border:1px dashed var(--line2,rgba(255,255,255,.18));
  border-radius:18px;
  background:var(--card,rgba(255,255,255,.035));
  box-shadow:0 18px 36px -26px rgba(0,0,0,.6),rgba(255,255,255,.055) 0 1px 0 inset;
  text-align:center;
  transition:border-color .18s ease,background-color .18s ease,transform .18s ease;
}
@media (min-width:640px){
  [data-count-zone]{padding:38px 32px 34px}
}
[data-count-zone].is-drag{
  border-color:var(--accent,#8FA6FF);
  border-style:solid;
  background:linear-gradient(180deg,rgba(143,166,255,.10),rgba(255,255,255,.03));
}
[data-count-zone].is-busy{cursor:progress}
[data-count-zone]:focus-within{
  border-color:var(--accent,#8FA6FF);
  outline:2px solid rgba(143,166,255,.42);
  outline-offset:3px;
}

.count-label{
  display:block;
  font-size:clamp(19px,2.4vw,25px);
  line-height:1.24;
  letter-spacing:-.026em;
  font-weight:700;
  color:var(--fg,#ECEEF1);
  text-wrap:balance;
}
.count-micro{
  margin:10px auto 0;
  max-width:34em;
  font-size:14.5px;
  line-height:23px;
  color:var(--fg2,#98A1AB);
}
.count-run{
  -webkit-appearance:none;appearance:none;
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  margin-top:20px;
  min-height:48px;
  padding:13px 24px;
  width:100%;
  max-width:340px;
  border:0;
  /* This is the primary call to action of the free product and it sits on
     pages where every other button is the estate pill: 999px radius, flat
     accent2 fill, white label. It is drawn to that spec here rather than
     inventing a second primary button design on the same screen. */
  border-radius:var(--pill,999px);
  background:var(--accent2,#5C7BFF);
  color:#fff;
  box-shadow:0 4px 24px rgba(92,123,255,.34);
  font:inherit;
  font-size:16px;
  font-weight:700;
  letter-spacing:-.012em;
  cursor:pointer;
  transition:transform .15s ease,box-shadow .15s ease;
}
.count-run:hover{transform:translateY(-1px);box-shadow:0 10px 34px rgba(92,123,255,.46)}
.count-run:active{transform:translateY(0)}
.count-run:focus-visible{outline:3px solid rgba(143,166,255,.55);outline-offset:3px}
.count-run[disabled]{opacity:.55;cursor:progress;transform:none;box-shadow:none}
.count-file-input{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;
}
.count-formats{
  margin:14px auto 0;
  max-width:40em;
  font-size:13px;
  line-height:21px;
  letter-spacing:-.004em;
  color:var(--fg3,#6B747E);
}
.count-formats + .count-formats{margin-top:6px}

/* --------------------------------------------------------------------------
   2. THE LOCALITY INDICATOR. Every word of it is produced by measurement.
   -------------------------------------------------------------------------- */

.count-locality{
  margin:20px auto 0;
  max-width:44em;
  padding:12px 14px;
  border:1px solid rgba(79,191,146,.30);
  border-radius:12px;
  background:linear-gradient(180deg,rgba(79,191,146,.08),rgba(255,255,255,.02));
  text-align:left;
}
.count-locality-top{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.count-dot{
  flex:none;width:8px;height:8px;margin-top:6px;border-radius:999px;
  background:var(--ok,#4FBF92);
  box-shadow:0 0 0 4px rgba(79,191,146,.16);
  animation:count-pulse 2.6s ease-in-out infinite;
}
@keyframes count-pulse{0%,100%{opacity:1}50%{opacity:.45}}
/* The watcher saw the page around this widget make a request of its own. The
   box stops reading as "nothing happened" and reads as "something happened and
   here it is", which is what the headline now says in words. */
.count-locality.has-other{
  border-color:rgba(232,180,92,.30);
  background:linear-gradient(180deg,rgba(232,180,92,.08),rgba(255,255,255,.02));
}
.count-locality.has-other .count-dot{
  background:var(--warn,#E8B45C);
  box-shadow:0 0 0 4px rgba(232,180,92,.16);
}
@media (prefers-reduced-motion:reduce){
  .count-dot{animation:none}
  [data-count-zone],.count-run{transition:none}
}
.count-locality-head{
  font-size:14.5px;line-height:22px;font-weight:700;color:var(--fg,#ECEEF1);
}
.count-meter{
  margin-top:6px;
  font-family:var(--mono,'Martian Mono',ui-monospace,Menlo,monospace);
  font-size:10.5px;line-height:19px;letter-spacing:.06em;
  color:var(--ok,#4FBF92);
}
.count-locality details{margin-top:9px}
.count-locality summary{
  font-size:13.5px;line-height:21px;color:var(--fg2,#98A1AB);
  cursor:pointer;list-style:none;
}
.count-locality summary::-webkit-details-marker{display:none}
.count-locality summary::before{content:'+ ';color:var(--fg3,#6B747E)}
.count-locality details[open] summary::before{content:'- '}
.count-locality summary:focus-visible{outline:2px solid rgba(143,166,255,.55);outline-offset:2px;border-radius:6px}
.count-checks{margin:8px 0 0;padding:0;list-style:none;display:grid;gap:7px}
.count-checks li{
  position:relative;padding-left:20px;
  font-size:13.5px;line-height:21px;color:var(--fg2,#98A1AB);
}
.count-checks li::before{
  content:'';position:absolute;left:2px;top:8px;width:5px;height:5px;
  border-radius:999px;background:var(--ok,#4FBF92);
}

/* --------------------------------------------------------------------------
   3. STATUS AND PROGRESS
   -------------------------------------------------------------------------- */

.count-status{
  margin:16px auto 0;max-width:44em;min-height:22px;
  font-family:var(--mono,'Martian Mono',ui-monospace,Menlo,monospace);
  font-size:10.5px;line-height:19px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--fg3,#6B747E);
  overflow-wrap:anywhere;
}
.count-status.is-error{color:var(--warn,#E0697B);text-transform:none;letter-spacing:.02em;font-size:13.5px;line-height:21px;font-family:inherit}
.count-bar{
  margin:10px auto 0;max-width:44em;height:3px;border-radius:999px;
  background:rgba(255,255,255,.10);overflow:hidden;
}
.count-bar span{
  display:block;height:100%;width:0;border-radius:999px;
  background:linear-gradient(90deg,var(--accent,#8FA6FF),var(--accent2,#5C7BFF));
  transition:width .2s linear;
}
.count-bar[hidden]{display:none}

/* --------------------------------------------------------------------------
   4. RESULTS
   -------------------------------------------------------------------------- */

#countResult{display:block;margin-top:26px;scroll-margin-top:84px}
#countResult[hidden]{display:none}
#countResult:empty{display:none}

.count-total{
  border:1px solid var(--line,rgba(255,255,255,.10));
  border-radius:18px;
  background:var(--card,rgba(255,255,255,.045));
  padding:18px 18px 16px;
}
.count-total-head{
  font-family:var(--mono,'Martian Mono',ui-monospace,Menlo,monospace);
  font-size:10px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--fg3,#6B747E);
}
.count-stats{
  display:grid;gap:14px;margin-top:14px;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
}
.count-stat-v{
  display:block;font-size:clamp(20px,3.4vw,27px);line-height:1.1;
  letter-spacing:-.03em;font-weight:700;color:var(--fg,#ECEEF1);
  overflow-wrap:anywhere;
}
.count-stat-k{
  display:block;margin-top:4px;font-size:13px;line-height:20px;color:var(--fg2,#98A1AB);
}
.count-stat.is-zero .count-stat-v{color:var(--ok,#4FBF92)}
.count-stat.is-range{grid-column:span 2}
.count-stat.is-range .count-stat-v{
  font-size:clamp(14px,1.8vw,19px);line-height:1.32;letter-spacing:-.02em;
  overflow-wrap:normal;word-break:keep-all;white-space:nowrap;
}

.count-card{
  margin-top:16px;
  /* the Count pages carry a sticky nav, and the card is scrolled to after a
     run, so it must not land underneath it */
  scroll-margin-top:84px;
  border:1px solid var(--line,rgba(255,255,255,.10));
  border-radius:18px;
  background:var(--card,rgba(255,255,255,.035));
  padding:20px 18px;
  box-shadow:0 18px 36px -26px rgba(0,0,0,.6);
}
@media (min-width:640px){.count-card{padding:24px 26px}}
.count-card.is-unknown{border-color:var(--line2,rgba(255,255,255,.18));background:rgba(255,255,255,.02)}
.count-card.is-error{border-color:rgba(224,105,123,.32);background:linear-gradient(180deg,rgba(224,105,123,.07),rgba(255,255,255,.02))}

.count-card-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.count-source{
  font-family:var(--mono,'Martian Mono',ui-monospace,Menlo,monospace);
  font-size:10px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--accent,#8FA6FF);
}
.count-card.is-error .count-source{color:var(--warn,#E0697B)}
.count-card.is-unknown .count-source{color:var(--fg3,#6B747E)}
.count-filename{
  font-family:var(--mono,'Martian Mono',ui-monospace,Menlo,monospace);
  font-size:10px;letter-spacing:.06em;color:var(--fg3,#6B747E);
  overflow-wrap:anywhere;min-width:0;
}
.count-headline{
  margin:10px 0 0;
  font-size:clamp(21px,3.2vw,29px);line-height:1.16;letter-spacing:-.03em;
  font-weight:700;color:var(--fg,#ECEEF1);text-wrap:balance;
}
.count-sub{margin:8px 0 0;font-size:15px;line-height:24px;color:var(--fg2,#98A1AB)}

.count-facts{
  display:grid;gap:0;margin:18px 0 0;
  border-top:1px solid var(--line,rgba(255,255,255,.10));
}
.count-fact{
  display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;
  padding:11px 0;border-bottom:1px solid var(--line,rgba(255,255,255,.10));
}
.count-fact-k{flex:1 1 190px;min-width:0;font-size:14.5px;line-height:22px;color:var(--fg2,#98A1AB)}
.count-fact-v{
  flex:0 1 auto;min-width:0;
  font-family:var(--mono,'Martian Mono',ui-monospace,Menlo,monospace);
  font-size:13px;line-height:22px;letter-spacing:-.01em;
  color:var(--fg,#ECEEF1);font-weight:400;
  overflow-wrap:anywhere;text-align:right;
}
.count-note{
  margin:12px 0 0;font-size:13.5px;line-height:21px;color:var(--fg3,#6B747E);
}
.count-missing{
  margin:16px 0 0;padding:13px 14px;
  border:1px solid var(--line,rgba(255,255,255,.10));
  border-radius:10px;background:rgba(255,255,255,.02);
}
.count-missing-h{
  font-family:var(--mono,'Martian Mono',ui-monospace,Menlo,monospace);
  font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--fg3,#6B747E);
}
.count-missing p{margin:8px 0 0;font-size:14.5px;line-height:23px;color:var(--fg2,#98A1AB)}
.count-looked{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:8px}
.count-looked li{font-size:14px;line-height:22px;color:var(--fg2,#98A1AB);overflow-wrap:anywhere}
.count-looked b{color:var(--fg,#ECEEF1);font-weight:700}
.count-looked code{
  font-family:var(--mono,'Martian Mono',ui-monospace,Menlo,monospace);
  font-size:11.5px;color:var(--fg3,#6B747E);overflow-wrap:anywhere;
}

.count-foot{
  margin:22px 0 0;padding-top:18px;
  border-top:1px solid var(--line,rgba(255,255,255,.10));
}
.count-foot p{margin:0;font-size:14.5px;line-height:23px;color:var(--fg2,#98A1AB)}
.count-foot p + p{margin-top:12px}
.count-post{
  margin:14px 0 0;font-size:clamp(17px,2vw,20px);line-height:1.42;
  letter-spacing:-.018em;color:var(--fg,#ECEEF1);font-weight:700;text-wrap:balance;
}
/* The next step, offered at the one moment a person is holding their own
   numbers. Same pill as .count-run so the two primary actions on the page are
   one design. It is a plain link and carries nothing in its href. */
.count-go{
  display:inline-flex;align-items:center;justify-content:center;
  margin-top:18px;min-height:48px;padding:13px 24px;
  width:100%;max-width:340px;
  border-radius:var(--pill,999px);
  background:var(--accent2,#5C7BFF);
  color:#fff;text-decoration:none;
  box-shadow:0 4px 24px rgba(92,123,255,.34);
  font:inherit;font-size:16px;font-weight:700;letter-spacing:-.012em;
  transition:transform .15s ease,box-shadow .15s ease;
}
.count-go:hover{transform:translateY(-1px);box-shadow:0 10px 34px rgba(92,123,255,.46);text-decoration:none}
.count-go:active{transform:translateY(0)}
.count-go:focus-visible{outline:3px solid rgba(143,166,255,.55);outline-offset:3px}
.count-foot .count-golede{margin-top:10px;font-size:13px;line-height:21px;color:var(--fg3,#6B747E)}
@media (prefers-reduced-motion:reduce){.count-go{transition:none}.count-go:hover{transform:none}}

.count-reset{
  -webkit-appearance:none;appearance:none;
  margin-top:16px;min-height:44px;padding:11px 18px;
  border:1px solid var(--line2,rgba(255,255,255,.18));border-radius:10px;
  background:transparent;color:var(--fg2,#98A1AB);
  font:inherit;font-size:14.5px;cursor:pointer;
}
.count-reset:hover{color:var(--fg,#ECEEF1);border-color:var(--accent,#8FA6FF)}
.count-reset:focus-visible{outline:3px solid rgba(143,166,255,.55);outline-offset:3px}
