:root {
  color-scheme: light dark;
  --bg: #f4f6f9;
  --card: #fff;
  --text: #0f172a;
  --muted: #5b6474;
  --line: #e3e7ee;
  --brand: #0b6fb8;
  --brand-ink: #fff;
  --soft: #e8f2fb;
  --warn-bg: #fff4e5;
  --warn: #8a4b00;
  --err-bg: #fdecec;
  --err: #a11d1d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --card: #161b22;
    --text: #e6edf3;
    --muted: #9aa4b2;
    --line: #2a313c;
    --brand: #4aa3e8;
    --brand-ink: #06121d;
    --soft: #13283a;
    --warn-bg: #2b2112;
    --warn: #f0b46a;
    --err-bg: #2c1515;
    --err: #f19999;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
}
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}
header {
  margin-bottom: 28px;
}
header img {
  display: block;
  height: 32px;
  width: auto;
}
h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.centre {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
}
p {
  margin: 0 0 12px;
}
a {
  color: var(--brand);
}
.status,
.note {
  background: var(--soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.status.ended,
.note {
  background: var(--warn-bg);
  color: var(--warn);
}
.note.error {
  background: var(--err-bg);
  color: var(--err);
}
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 16px;
}
.plan {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.plan.best {
  border: 2px solid var(--brand);
}
.tag {
  position: absolute;
  top: -11px;
  left: 18px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}
.plan h2 {
  font-size: 18px;
  margin: 0 0 8px;
}
.price {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.price span {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
.per {
  color: var(--muted);
  font-size: 14px;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 20px;
  flex: 1;
}
.plan li {
  padding: 6px 0 6px 24px;
  position: relative;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.plan li::before {
  content: '✓';
  position: absolute;
  left: 2px;
  color: var(--brand);
  font-weight: 700;
}
button,
.button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: var(--brand-ink);
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  padding: 14px 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:hover,
.button:hover {
  filter: brightness(1.08);
}
button:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--soft);
  outline-offset: 2px;
}
.small,
footer {
  color: var(--muted);
  font-size: 14px;
}
footer {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav {
  margin: 0;
}
button.link {
  width: auto;
  background: none;
  color: var(--brand);
  padding: 6px 0;
  font-weight: 600;
  font-size: 15px;
}
.signin {
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin: 20px 0 12px;
}
.signin label {
  font-weight: 600;
  font-size: 15px;
}
.signin input {
  font: inherit;
  font-size: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}
.signin input,
.signin select {
  font: inherit;
  font-size: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}
.signin input:focus,
.signin select:focus {
  outline: 3px solid var(--soft);
  border-color: var(--brand);
}
/* Android / iPhone: two large choices */
.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border: 0;
  padding: 0;
  margin: 4px 0 0;
}
.choice legend {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}
.signin .choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
}
.signin .choice input {
  width: auto;
  padding: 0;
  accent-color: var(--brand);
}
.signin .choice label:has(input:checked) {
  border-color: var(--brand);
  outline: 2px solid var(--soft);
}
/* Get the app */
.app {
  margin: 24px 0 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.app h2 {
  font-size: 18px;
  margin: 0 0 6px;
}
.app .button {
  margin: 14px 0 10px;
}
h2.section {
  font-size: 20px;
  margin: 32px 0 0;
}
.usage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}
.meter {
  display: flex;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.meter span {
  color: var(--muted);
}
table.history {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
}
.history th,
.history td {
  text-align: left;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.history th {
  color: var(--muted);
  font-weight: 600;
  border-top: 0;
}
@media (max-width: 560px) {
  .history th:nth-child(4),
  .history td:nth-child(4) {
    display: none;
  }
}
.receipt {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  max-width: 560px;
}
.receipt dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
  margin: 16px 0;
}
.receipt dt {
  color: var(--muted);
}
.receipt dd {
  margin: 0;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  word-break: break-all;
}
@media print {
  .noprint,
  header .nav,
  footer {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  .receipt {
    border: 0;
    padding: 0;
  }
}
.plan form + form {
  margin-top: 8px;
}
button.secondary {
  background: var(--card);
  color: var(--brand);
  border: 1px solid var(--brand);
  font-size: 15px;
  padding: 11px 16px;
}
button.link.once {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--muted);
  text-decoration: underline;
}
