/* Public battery passport - follows the Modual design system: five colours, Montserrat
   with Light for headings, square corners, flat blocks. Phone first: most visitors
   arrive by scanning the QR code on a battery.

   No script and no third-party request: the page is this stylesheet, one font and two
   logos, all served from here. The Content-Security-Policy depends on that. */

@font-face {
  font-family: "Montserrat";
  src: url("/static/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --blue: #2e5efc;
  --blue-700: #1c3fc2;
  --yellow: #fbba00;
  --grey-900: #1f1f21;
  --grey-700: #404042;
  --grey-500: #6f6f71;
  --grey-300: #b8b8ba;
  --grey-200: #e3e3e4;
  --grey-50: #f7f7f7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--grey-900);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

main { flex: 1; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
:focus-visible { outline: 3px solid rgb(46 94 252 / 0.45); outline-offset: 2px; }

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rule { border: 0; width: 56px; height: 4px; margin: 14px 0 22px; background: var(--yellow); }
.rule--blue { background: var(--blue); }

.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--grey-200);
}
.hd img { display: block; height: 26px; width: auto; }
.hd .eyebrow { color: var(--grey-500); }

.split { display: grid; grid-template-columns: 1fr; }

.panel { padding: 40px 24px; color: #fff; background: var(--blue); }
.panel--dark { background: var(--grey-900); }
.panel .lbl { margin: 0 0 6px; font-size: 14px; opacity: 0.85; }
.panel h1 {
  margin: 0;
  font-weight: 300;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.panel h1.wrap { font-size: 30px; }
.panel p.lead { margin: 18px 0 22px; max-width: 44ch; }

.body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px;
}
.body h2 { margin: 0; font-weight: 300; font-size: 26px; line-height: 1.2; text-wrap: balance; }
.body p { margin: 0; max-width: 52ch; color: var(--grey-700); }

.badge { display: inline-block; padding: 5px 9px; font-size: 12px; font-weight: 500; background: var(--yellow); color: var(--grey-900); }

.stats { display: grid; grid-template-columns: 1fr; }
.stat { padding: 22px 24px; color: #fff; }
.stat:nth-child(1) { background: var(--grey-700); }
.stat:nth-child(2) { background: var(--blue); }
.stat:nth-child(3) { background: var(--yellow); color: var(--grey-900); }
.stat b { display: block; font-weight: 300; font-size: 38px; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat span { font-size: 13px; }

.sec { padding: 32px 24px; }
.sec--alt { background: var(--grey-50); }

.facts { margin: 0; border-top: 1px solid var(--grey-200); }
.facts div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--grey-200); }
.facts dt { font-size: 13px; color: var(--grey-500); }
.facts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }

.docs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--grey-200); }
.docs li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--grey-200); }
.docs small { color: var(--grey-500); white-space: nowrap; }

.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 18px; }
.topics h3 { margin: 0 0 2px; font-size: 16px; font-weight: 500; }
.topics p { margin: 0; font-size: 14px; color: var(--grey-700); }

.note { margin: 0; font-size: 13px; color: var(--grey-500); }

.lookup { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; max-width: 440px; }
.lookup label { flex: 1 0 100%; font-size: 13px; font-weight: 500; color: inherit; }
.lookup input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 11px 12px;
  font: inherit;
  color: var(--grey-900);
  background: #fff;
  border: 1px solid var(--grey-300);
  border-radius: 0;
}
.btn { padding: 11px 18px; font: inherit; font-weight: 500; color: #fff; background: var(--blue); border: 0; border-radius: 0; cursor: pointer; }
.btn:hover { background: var(--blue-700); }
.btn--accent { color: var(--grey-900); background: var(--yellow); }
.btn--accent:hover { background: #d49d00; }

.ft { display: flex; flex-direction: column; gap: 10px; padding: 28px 24px; color: #fff; background: var(--grey-900); }
.ft img { display: block; height: 24px; width: auto; align-self: flex-start; }
.ft p { margin: 0; font-size: 13px; color: #cfcfd1; }
.ft a { color: #fff; }

@media (min-width: 800px) {
  .hd, .sec, .ft { padding-left: max(56px, calc(50vw - 590px)); padding-right: max(56px, calc(50vw - 590px)); }
  .split { grid-template-columns: 1fr 1fr; }
  .panel { padding: 72px 56px 72px max(56px, calc(50vw - 590px)); }
  .panel h1 { font-size: 64px; }
  .panel h1.wrap { font-size: 40px; }
  .body { padding: 72px 56px; }
  .body h2 { font-size: 34px; }
  /* One row, however many figures there are: a battery may lack one of the three. */
  .stats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .stat { padding: 28px 56px; }
  .stat:first-child { padding-left: max(56px, calc(50vw - 590px)); }
  .stat b { font-size: 46px; }
  .facts div { grid-template-columns: 280px 1fr; gap: 24px; }
  .facts dt { font-size: 15px; }
  .topics { grid-template-columns: repeat(3, 1fr); }
  .ft { flex-direction: row; align-items: center; justify-content: space-between; }
  .ft img { align-self: center; }
}
