:root {
  --ink: #2e3b62;
  --muted: #646e8a;
  --paper: #f3f3f6;
  --white: #fff;
  --blue: #3d4f85;
  --blue-dark: #2e3b62;
  --blue-light: #cfd7ec;
  --logo-navy: #2a2f73;
  --logo-red: #ca3126;
  --logo-red-soft: #f8e8e6;
  --logo-green: #00be00;
  --logo-green-dark: #087a23;
  --logo-green-soft: #e6f5e9;
  --line: #dfe2ea;
  --danger: #a73535;
  --warning: #8a5a00;
  --shadow: 0 18px 50px rgba(46, 59, 98, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-weight: 600;
  color: var(--blue-dark);
}

a {
  color: var(--blue-dark);
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--white);
  padding: 0.6rem;
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 42px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links > a:not(.button) {
  text-decoration: none;
}

.inline-form {
  display: inline;
}

.link-button,
.danger-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.danger-link {
  color: var(--danger);
}

.main-content {
  flex: 1;
  padding-block: 4rem 5rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
  background: var(--white);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem 0 5rem;
}

.hero h1,
.page-heading h1,
.narrow h1,
.docs h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0.2rem 0 1.3rem;
}

.narrow h1,
.docs h1,
.page-heading h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 650px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--logo-red);
  margin: 0 0 0.95rem;
}

.hero-card,
.card,
.table-card,
.secret-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 2rem;
  position: relative;
}

.battery-mark {
  height: 104px;
  width: 58px;
  border: 6px solid var(--logo-navy);
  border-radius: 3px;
  position: relative;
  margin-bottom: 1.5rem;
}

.battery-mark::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 7px;
  background: var(--logo-navy);
  top: -13px;
  left: 12px;
  border-radius: 3px 3px 0 0;
}

.battery-mark span {
  position: absolute;
  inset: 7px;
  background: repeating-linear-gradient(
    to top,
    var(--logo-green) 0 8px,
    transparent 8px 13px
  );
  clip-path: inset(100% 0 0 0);
  animation: battery-level 13.8s steps(6, end) infinite;
  will-change: clip-path;
}

@keyframes battery-level {
  0%,
  100% {
    clip-path: inset(100% 0 0 0);
  }

  45%,
  55% {
    clip-path: inset(0 0 0 0);
  }
}

.actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue-dark);
  background: var(--blue-dark);
  color: var(--white);
  text-decoration: none;
  padding: 0.78rem 1.15rem;
  border-radius: 3px;
  font-weight: 750;
  cursor: pointer;
}

.button:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.button.secondary {
  background: var(--white);
  color: var(--blue-dark);
}

.button.small {
  padding: 0.52rem 0.8rem;
}

.button.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-grid article {
  padding: 1.5rem;
  /* border-top: 3px solid var(--blue-light); */
  border-top: 3px solid var(--logo-green);
}
/*
.feature-grid article:nth-child(1) {
  border-top-color: var(--logo-red);
}

.feature-grid article:nth-child(2) {
  border-top-color: var(--logo-green);
}
*/
.narrow {
  width: min(650px, 100%);
  margin-inline: auto;
}

.form-card,
.card {
  padding: 1.6rem;
}

.form-card > div {
  margin-bottom: 1.2rem;
}

.form-card label {
  font-weight: 700;
  display: block;
  margin-bottom: 0.35rem;
}

.form-card input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #aeb5c8;
  border-radius: 4px;
  background: var(--white);
}

.form-card input:not([type="checkbox"]):focus {
  outline: 3px solid rgba(0, 190, 0, 0.12);
  border-color: var(--logo-green-dark);
}

.form-card > div:has(input[type="checkbox"]) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.7rem;
  align-items: start;
}

.form-card > div:has(input[type="checkbox"]) label {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-weight: 500;
}

.form-card > div:has(input[type="checkbox"]) input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.25rem 0 0;
  accent-color: var(--logo-green-dark);
}

.form-card > div:has(input[type="checkbox"]) .errorlist {
  grid-column: 2;
}

.form-card .helptext,
.fine-print {
  color: var(--muted);
  font-size: 0.88rem;
}

.form-card ul.errorlist {
  color: var(--danger);
  padding-left: 1.2rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.75rem;
  margin-bottom: 0 !important;
}

.form-actions a {
  margin-left: auto;
  text-align: right;
}

.check {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.alert {
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  border-radius: 4px;
  border-left: 4px solid var(--logo-green-dark);
  background: var(--logo-green-soft);
}

.alert.warning {
  border-color: #d89a20;
  background: #fff7e6;
  color: #5e430e;
}

.alert.error {
  border-color: var(--danger);
  background: #fff0f0;
  color: #742424;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stats article {
  background: var(--blue-dark);
  color: var(--white);
  border-radius: 6px;
  padding: 1.25rem;
}

.stats span {
  display: block;
  color: #d8deee;
  font-size: 0.85rem;
}

.stats strong {
  display: block;
  font-size: 1.65rem;
  margin-top: 0.3rem;
}

.table-card {
  overflow: hidden;
}

.table-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--line);
}

.table-heading h2 {
  margin: 0;
}

.table-scroll {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

tr[class*="deactivated"],
tr[class*="expired"] {
  color: #7a8090;
  background: #f6f6f8;
}

.status {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  background: var(--logo-green-soft);
  color: var(--logo-green-dark);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status.expired,
.status.deactivated,
.status.user-inactive {
  background: #eee;
  color: #666;
}

.empty {
  padding: 3rem;
  text-align: center;
}

.account-actions {
  margin-top: 3rem;
}

.secret-card {
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.secret-card code {
  overflow-wrap: anywhere;
  word-break: break-all;
  flex: 1;
  font-size: 1rem;
}

.details > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0;
}

.details dt {
  font-weight: 750;
}

.details dd {
  margin: 0;
}

.docs {
  width: min(780px, 100%);
  margin-inline: auto;
}

.docs h2 {
  margin-top: 2.5rem;
}

.docs h3 {
  margin-top: 1.8rem;
}

.docs li + li {
  margin-top: 0.45rem;
}

.guide-nav {
  margin: 2rem 0 2.75rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--logo-green);
}

.guide-nav ol {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.docs pre {
  overflow: auto;
  background: #202a47;
  color: #edf0f8;
  border-radius: 6px;
  padding: 1.2rem;
}

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.success-text {
  color: var(--logo-green-dark);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .battery-mark span {
    animation: none;
    clip-path: inset(34% 0 0 0);
  }
}

@media (max-width: 800px) {
  .nav {
    align-items: flex-start;
    padding: 1rem 0;
  }

  .brand img {
    height: 38px;
  }

  .nav-links {
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-grid,
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .page-heading {
    align-items: start;
    flex-direction: column;
  }

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .main-content {
    padding-top: 2rem;
  }

  .nav-links > a:not(.button):first-child {
    display: none;
  }

  .brand img {
    height: 34px;
  }

  .feature-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .secret-card {
    align-items: stretch;
    flex-direction: column;
  }

  .secret-card .button {
    width: 100%;
  }

  .form-actions {
    gap: 1rem;
  }
}
