* {
  box-sizing: border-box;
}
:root {
  --ink: #24251f;
  --soft: #66685f;
  --line: #ddded4;
  --paper: #f6f6f0;
  --wine: #832c39;
  --olive: #536348;
  --white: #fff;
  --gold: #d1b17f;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.5 "Inter",
    "Arial",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #ba784c;
  outline-offset: 3px;
}
a {
  color: var(--wine);
}
[hidden] {
  display: none !important;
}
header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
header > div,
main {
  width: min(1140px, calc(100% - 48px));
  margin: auto;
}
header > div {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
}
header strong {
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 22px;
  letter-spacing: -1.3px;
}
header .brandlabel {
  border-left: 1px solid var(--line);
  padding-left: 14px;
  color: var(--soft);
  font-weight: 600;
  font-size: 14px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ecdfda;
  color: #763442;
}
main {
  padding: 45px 0 65px;
}
.title-row,
.card-head,
.toolbar,
.linkrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-family: "Instrument Sans", Arial, sans-serif;
  font-size: clamp(33px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}
h2 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.date,
.muted,
small {
  color: var(--soft);
}
.date {
  margin-top: 7px;
  font-size: 14px;
}
.button,
select,
.btnlink {
  border: 1px solid #d1d3c8;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 600;
  font-size: 14px;
}
.button:hover,
select:hover {
  border-color: var(--soft);
}
.primary {
  background: var(--wine);
  border-color: var(--wine);
  color: white;
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.ghost {
  background: transparent;
}
.linkrow {
  margin: 25px 0 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef0e7;
}
.linkrow > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.linkrow strong {
  font-size: 14px;
}
.linkrow code {
  font-size: 13px;
  overflow-wrap: anywhere;
  color: #3c4934;
}
.linkrow .button {
  padding: 7px 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.metric {
  min-width: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  padding: 18px 18px 14px;
  color: var(--ink);
}
.metric[aria-pressed="true"] {
  border-color: var(--wine);
  box-shadow: inset 0 3px var(--wine);
}
.metric .label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
}
.metric .knum {
  display: block;
  font-size: clamp(26px, 3.5vw, 41px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.metric .ico {
  width: 17px;
  height: 17px;
  color: var(--olive);
}
.middle {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(250px, 1fr);
  gap: 15px;
  margin: 16px 0;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  min-width: 0;
}
.card-head span {
  font-size: 13px;
  color: var(--soft);
}
.chart {
  margin-top: 18px;
}
.plot {
  height: 139px;
  display: flex;
  align-items: flex-end;
  gap: clamp(1px, 0.27vw, 4px);
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent calc(33.333% - 1px),
    #ecede5 calc(33.333% - 1px),
    #ecede5 33.333%
  );
}
.bar {
  flex: 1;
  background: #85977a;
  min-width: 0;
  border-radius: 3px 3px 0 0;
}
.bar:last-child {
  background: var(--wine);
}
.axis {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  color: var(--soft);
  font-size: 12px;
}
.earn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  color: white;
  background: #57313a;
  border-color: #57313a;
}
.earn h2 {
  color: #f0dedc;
}
.earn .sum {
  font-size: clamp(31px, 4.2vw, 49px);
  letter-spacing: -0.05em;
  line-height: 1.1;
  font-weight: 650;
}
.earn .numbers {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid #86666a;
  font-size: 14px;
}
.numbers div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.earn small {
  color: #e7d8d8;
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
}
td,
th {
  padding: 12px 9px;
  border-bottom: 1px solid #ecede6;
  white-space: nowrap;
}
td:first-child,
th:first-child {
  padding-left: 0;
}
th {
  font-size: 12px;
  color: var(--soft);
  font-weight: 650;
}
tr:last-child td {
  border: 0;
}
.status {
  display: inline-block;
  padding: 3px 8px;
  background: #eaf0e4;
  color: #3b5134;
  border-radius: 5px;
  font-size: 12px;
}
.status.alt {
  background: #f6eadd;
  color: #734b26;
}
.empty {
  padding: 24px 0;
  color: var(--soft);
}
.notice {
  padding: 12px 15px;
  background: #f5e6d5;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 14px;
}
.notice:empty {
  display: none;
}
.error {
  color: #7b2635;
}
.access {
  max-width: 420px;
  margin: 8vh auto;
}
.access form,
.fields {
  display: grid;
  gap: 12px;
}
label {
  display: grid;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}
input {
  width: 100%;
  border: 1px solid #c8cbc0;
  border-radius: 7px;
  min-height: 40px;
  padding: 7px 10px;
  color: var(--ink);
  background: white;
}
.fields {
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(290px, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.admin-layout .fields .wide {
  grid-column: 1/-1;
}
.admin-layout .toolbar {
  margin: 10px 0;
}
.tools,
.admin-detail {
  margin-top: 18px;
}
.tools summary {
  cursor: pointer;
  font-weight: 650;
}
.tools .toolbar {
  justify-content: flex-start;
  margin-top: 12px;
}
.stack {
  display: grid;
  gap: 14px;
}
.smallbtn {
  padding: 5px 9px;
  font-size: 13px;
}
.notice a {
  font-weight: 650;
}
.bottom {
  margin: 17px 0;
  color: var(--soft);
  font-size: 13px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.card-head {
  margin-bottom: 8px;
}
.bar:hover {
  background: var(--olive);
}
@media (max-width: 760px) {
  header > div,
  main {
    width: calc(100% - 28px);
  }
  main {
    padding-top: 26px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .middle,
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .earn .sum {
    margin: 4px 0;
  }
  .card {
    padding: 17px;
  }
  .identity .personal {
    display: none;
  }
  .linkrow {
    margin-top: 19px;
  }
  .admin-layout > aside {
    grid-row: 1;
  }
  .metric {
    padding: 12px;
  }
  .title-row {
    align-items: flex-end;
  }
  .date {
    font-size: 13px;
  }
  header > div {
    min-height: 58px;
  }
  .plot {
    height: 120px;
  }
  .access {
    margin: 6vh auto;
  }
  .bottom {
    margin-top: 12px;
  }
}
@media (max-width: 420px) {
  .identity {
    gap: 4px;
  }
  header > div {
    gap: 8px;
  }
  header .brandlabel {
    padding-left: 8px;
    font-size: 12px;
  }
  .linkrow {
    gap: 8px;
  }
  .linkrow > div {
    display: block;
  }
  .linkrow code {
    display: block;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .title-row {
    gap: 8px;
  }
  .card-head {
    align-items: flex-start;
  }
}

.sample-mail {
  width: min(580px, 92vw);
  max-height: 82vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 18px 60px #24251f30;
}
.sample-mail::backdrop {
  background: #25282055;
}
.sample-mail pre {
  font:
    15px/1.6 Arial,
    sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sample-mail .button {
  float: right;
}
.tools section {
  margin-top: 20px;
}
.tools section h2 {
  margin-bottom: 8px;
}

.range-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-button {
  background: transparent;
  border: 0;
  padding: 0.25rem 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--wine);
  font-size: 0.9rem;
  justify-self: start;
}
.account-panel {
  max-width: 570px;
  margin: 2rem auto;
}
.account-form {
  display: grid;
  gap: 0.85rem;
}
.invite-item {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.invite-item:last-child { border-bottom: 0; }
.invite-item h3 { margin: 0; font-size: 1rem; }
.invite-item summary { cursor: pointer; }
.invite-copy { display: flex; gap: 8px; }
.invite-copy input { min-width: 0; }
.invite-people { margin: 8px 0; padding-left: 20px; }
.invite-people li { padding: 5px 0; overflow-wrap: anywhere; }
.name-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 470px) {
  .name-fields {
    grid-template-columns: 1fr;
  }
  header .identity .avatar {
    display: none;
  }
  main .account-panel {
    margin: 1rem auto;
  }
}
