/* Getwebup licence check: one stylesheet, no external requests. */

:root {
  --paper: #eef2f0;
  --sheet: #ffffff;
  --ink: #213431;
  --ink-2: #566763;
  --rule: #d3dcd8;
  --rule-strong: #b8c6c1;
  --spruce: #24574d;
  --spruce-deep: #193f38;
  --spruce-wash: #e2ece9;
  --on-spruce: #ffffff;
  --brass: #b5832a;
  --ok: #2b7a4b;
  --ok-wash: #e2f1e7;
  --warn: #935700;
  --warn-wash: #fbefd9;
  --bad: #a3352b;
  --bad-wash: #f8e3e0;
  --quiet: #6e7d79;
  --radius: 6px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --code: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #142120;
    --sheet: #1b2c2a;
    --ink: #e3ebe8;
    --ink-2: #a3b3ae;
    --rule: #2d413e;
    --rule-strong: #3d5450;
    --spruce: #6fb3a2;
    --spruce-deep: #8fc7b8;
    --spruce-wash: #213a36;
    --on-spruce: #0f1c1a;
    --brass: #d9a54a;
    --ok: #74c795;
    --ok-wash: #1d3528;
    --warn: #e3ac55;
    --warn-wash: #3a2f1a;
    --bad: #f08b7f;
    --bad-wash: #3d2422;
    --quiet: #8c9c98;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.005em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; margin-top: 2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

a { color: var(--spruce); text-underline-offset: .18em; }
a:hover { color: var(--spruce-deep); }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
  border-radius: 3px;
}

code, .code {
  font-family: var(--code);
  font-size: .86em;
  overflow-wrap: anywhere;
}

.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.spaced { margin-top: 1.5rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------ public page */

.public {
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.5rem 16px 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--ink-2); font-weight: 400; }
.public main { flex: 1; padding-top: 3.5rem; }
.public h1 { font-size: 2.4rem; margin-bottom: .6rem; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 32rem; }

.lookup {
  display: flex;
  gap: .5rem;
  margin: 2rem 0 0;
}
.lookup input { flex: 1; min-width: 0; }

.result {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2.5rem 0 0;
  padding: 1.5rem;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.result p { margin: 0; }
.result .what { font-family: var(--serif); font-size: 1.2rem; margin-bottom: .2rem; }

.public footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: .875rem;
}

/* The seal: the one bold element. A round stamp in the status colour. */
.seal {
  --tone: var(--quiet);
  flex: none;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  border: 2px solid var(--tone);
  box-shadow: inset 0 0 0 4px var(--sheet), inset 0 0 0 5.5px var(--tone);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--tone);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.1;
  transform: rotate(-6deg);
  padding: .5rem;
}
.seal small {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  margin-top: .3rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.seal-ok { --tone: var(--ok); }
.seal-warn { --tone: var(--warn); }
.seal-bad { --tone: var(--bad); }
.seal-sm { width: 5.75rem; height: 5.75rem; font-size: .95rem; }

/* ---------------------------------------------------------------- forms */

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.field { margin-bottom: 1.1rem; }
.hint { color: var(--ink-2); font-size: .85rem; margin-top: .3rem; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: .55rem .7rem;
}
textarea { min-height: 12rem; font-family: var(--code); font-size: .85rem; }
input:focus, textarea:focus, select:focus { border-color: var(--spruce); }
input[readonly] { background: var(--paper); color: var(--ink-2); }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  padding: .6rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--spruce);
  background: var(--spruce);
  color: var(--on-spruce);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--spruce-deep); border-color: var(--spruce-deep); color: var(--on-spruce); }
.btn-plain { background: transparent; color: var(--spruce); }
.btn-plain:hover { background: var(--spruce-wash); color: var(--spruce-deep); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: var(--bad); filter: brightness(.92); color: #fff; }
.btn-small { padding: .35rem .7rem; font-size: .85rem; }
.btn-link { background: none; border: 0; padding: 0; color: var(--spruce); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }

.notice {
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin: 0 0 1.25rem;
  border: 1px solid transparent;
}
.notice p:last-child { margin: 0; }
.notice-ok { background: var(--ok-wash); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.notice-err, .notice-bad { background: var(--bad-wash); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.notice-warn { background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

/* ---------------------------------------------------------------- admin */

.top {
  border-bottom: 1px solid var(--rule);
  background: var(--sheet);
}
.top-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: .85rem 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.75rem;
}
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; flex: 1; }
.top nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: .2rem 0;
  border-bottom: 2px solid transparent;
}
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current=page] { color: var(--ink); border-bottom-color: var(--brass); }
.top form { margin: 0; }
.who { color: var(--ink-2); font-size: .875rem; }

.page {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2rem 16px 4rem;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-head h1 { margin: 0; }
.page-head p { margin: .25rem 0 0; }

.sheet {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.sheet + .sheet { margin-top: 1rem; }
.narrow { max-width: 40rem; }

.table-wrap { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); font-size: .82rem; background: var(--sheet); }
tr:last-child td { border-bottom: 0; }
tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
td .sub { display: block; color: var(--ink-2); font-size: .82rem; }
.empty { padding: 1.5rem; color: var(--ink-2); }

.pill { white-space: nowrap; font-weight: 600; font-size: .85rem; }
.pill::before {
  content: "";
  display: inline-block;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  margin-right: .4rem;
  background: currentColor;
  vertical-align: .08em;
}
.pill-ok { color: var(--ok); }
.pill-warn { color: var(--warn); }
.pill-bad { color: var(--bad); }
.pill-quiet { color: var(--quiet); font-weight: 500; }

.attention { list-style: none; margin: 0; padding: 0; }
.attention > li {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--bad);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  margin-bottom: .6rem;
}
.attention .head { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; }
.attention ul { margin: .4rem 0 0; padding-left: 1.1rem; list-style: disc; }
.attention ul li { margin: .15rem 0; }

.summary { font-size: 1.05rem; max-width: 52rem; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
.facts dt { color: var(--ink-2); font-size: .9rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.lic-head { display: flex; gap: 1.5rem; align-items: center; }

.danger { border-color: color-mix(in srgb, var(--bad) 45%, var(--rule)); }
.danger h3 { color: var(--bad); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filters input[type=search] { max-width: 20rem; }
.filters a { padding: .3rem .65rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); border: 1px solid var(--rule); font-size: .875rem; }
.filters a[aria-current=true] { background: var(--spruce); border-color: var(--spruce); color: var(--on-spruce); }

.qr { width: 13rem; max-width: 100%; background: #fff; padding: .5rem; border-radius: var(--radius); border: 1px solid var(--rule); }
.qr svg { display: block; width: 100%; height: auto; }
.secret { font-family: var(--code); font-size: 1.05rem; letter-spacing: .06em; word-spacing: .35em; }

.keys code { display: block; padding: .5rem .65rem; background: var(--paper); border-radius: 4px; margin-top: .2rem; }

.login {
  max-width: 24rem;
  margin: 0 auto;
  padding: 0 16px;
}

@media (max-width: 760px) {
  .top-inner { gap: .5rem 1rem; }
  .top nav { flex-basis: 100%; order: 3; gap: .25rem 1rem; }
  .top form { margin-left: auto; }
  .split { grid-template-columns: 1fr; }
  .public h1 { font-size: 2rem; }
  .public main { padding-top: 2.25rem; }
  .lookup { flex-direction: column; }
  .result { flex-direction: column; align-items: flex-start; }
  .lic-head { align-items: flex-start; flex-direction: column; gap: .75rem; }
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
