:root {
  color-scheme: light;
  --ink: #173e38;
  --muted: #657b73;
  --line: #dce5dd;
  --green: #23685b;
  --paper: #fbfcf8;
  --accent: #986e43;
  font-family: "HK Perks Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #f2f6f1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 95% 5%, #dcebe580, transparent 50%);
}
[hidden] {
  display: none !important;
}
header,
main,
footer {
  max-width: 1240px;
  margin: auto;
  padding: 28px 36px;
}
header {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
header .brand {
  margin-right: auto;
  font-family: "HK Perks Serif", serif;
  font-size: 28px;
  font-weight: 650;
  text-decoration: none;
}
.brand small {
  display: block;
  font:
    10px/1.8 ui-monospace,
    monospace;
  letter-spacing: 3px;
}
.eyebrow {
  letter-spacing: 3px;
  font:
    11px ui-monospace,
    monospace;
  color: var(--green);
  margin-top: 24px;
}
h1 {
  font-family: "HK Perks Serif", serif;
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 550;
  line-height: 1.5;
  margin: 18px 0;
}
h2 {
  font-size: 21px;
  margin: 4px 0 16px;
}
h3 {
  font-size: 17px;
  line-height: 1.7;
}
p,
li {
  line-height: 1.85;
}
a {
  color: var(--green);
  text-underline-offset: 4px;
}
.lede {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 36px;
}
.panel,
.plan {
  background: #ffffffba;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  margin: 22px 0;
  box-shadow: 0 10px 30px #19392b04;
}
.login {
  max-width: 560px;
}
.login form {
  margin: 24px 0;
}
.login small {
  line-height: 1.8;
}
.pill {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 9px;
  background: #e8ede0;
  color: #71662f;
  font:
    12px ui-monospace,
    monospace;
}
label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}
input,
select,
textarea,
button {
  font: inherit;
}
input,
select,
textarea {
  color: var(--ink);
  border: 1px solid #cfdcd4;
  background: #fbfcf9;
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
  width: 100%;
}
textarea {
  min-height: 84px;
  resize: vertical;
}
button {
  border: 1px solid #cddbd3;
  background: #f5f8f2;
  color: var(--green);
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
  min-height: 42px;
}
button:hover {
  background: #e5eee3;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
  padding: 13px 20px;
}
.primary:hover {
  background: #185549;
}
button.danger {
  color: #a34250;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #598e9a;
  outline-offset: 3px;
}
.inline,
.member-bar,
.section-heading,
.row {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.inline {
  align-items: flex-end;
  flex-wrap: wrap;
}
.inline label {
  margin: 8px 0;
}
.grow {
  flex: 1;
  min-width: 240px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.section-heading {
  margin: 30px 0 16px;
}
.section-heading h2 {
  margin: 0;
}
.panel .section-heading {
  margin-top: 0;
}
.muted,
small {
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.stat {
  padding: 22px;
  background: #e5eee580;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.stat b {
  display: block;
  font:
    36px ui-monospace,
    monospace;
  margin-bottom: 8px;
}
.metric {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.metric strong {
  font:
    28px ui-monospace,
    monospace;
  display: block;
}
.metric small {
  display: block;
  margin: 7px 0;
}
.progress {
  height: 6px;
  border-radius: 6px;
  background: #e3e9df;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5b9880, #739ab5);
  width: var(--progress);
}
summary {
  cursor: pointer;
  line-height: 1.8;
  color: var(--green);
  padding: 12px 0;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.guide {
  background: #edf2e780;
  border-left: 3px solid #9aae84;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
}
.guide p {
  margin: 4px 0;
}
.guide li {
  color: #647564;
}
.row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.row:last-child {
  border-bottom: 0;
}
.row > div:first-child {
  flex: 1;
  min-width: 0;
}
.row strong {
  line-height: 1.7;
}
.row p {
  margin: 5px 0;
}
.row .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 390px;
}
.note {
  background: #f2eadc;
  color: #7c6239;
  border-radius: 12px;
  padding: 12px 16px;
}
.unread {
  border-left: 3px solid #6b97b0;
  padding-left: 16px;
}
.tabs {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 0;
}
.code-card {
  margin-top: 22px;
  border: 1px solid #bca679;
  background: #f8f2e7;
  padding: 20px;
  border-radius: 14px;
}
.code-card input {
  font:
    16px ui-monospace,
    monospace;
  margin: 16px 0;
}
.code-card button {
  margin-right: 10px;
}
#feedback {
  position: relative;
  top: 0;
  z-index: 10;
  background: #e1eee4;
  border: 1px solid #adc7b5;
  border-radius: 12px;
  padding: 14px 18px;
}
#feedback.error {
  background: #fff0ed;
  border-color: #ddb7b2;
  color: #953c35;
}
.empty {
  color: var(--muted);
  padding: 24px 0;
}
.ledger {
  font-size: 14px;
}
.ledger .voided {
  opacity: 0.6;
}
.mono {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f6f1;
  padding: 16px;
  border-radius: 10px;
  font-size: 13px;
  max-height: 350px;
  overflow: auto;
}
footer {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-bottom: 35px;
}
section {
  scroll-margin-top: 24px;
}
select {
  max-width: 100%;
}
@media (max-width: 700px) {
  header,
  main,
  footer {
    padding: 20px 18px;
  }
  header {
    gap: 12px;
  }
  header a:not(.brand) {
    font-size: 13px;
  }
  .brand small {
    font-size: 9px;
  }
  .panel,
  .plan {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .member-bar,
  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .inline {
    align-items: stretch;
    flex-direction: column;
  }
  .inline > * {
    width: 100%;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric {
    gap: 20px;
  }
  .metric strong {
    font-size: 24px;
  }
  .row .actions {
    max-width: none;
  }
  .section-heading {
    gap: 10px;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 34px;
  }
  .grow {
    min-width: 0;
  }
  .tabs {
    gap: 14px;
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .panel,
  .plan {
    animation: arrive 0.25s ease both;
  }
  @keyframes arrive {
    from {
      opacity: 0.6;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

h1 {
  text-wrap: balance;
}
