:root {
  color-scheme: light;
  --ink: #20243b;
  --muted: #525b73;
  --canvas: #f5f6fa;
  --paper: #fff;
  --rule: #d0d5e3;
  --accent: #453a98;
  --unit: 8px;
  font: 16px/1.55 "Atkinson Hyperlegible Next", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 5vw, 3rem); line-height: 1.15; letter-spacing: -.04em; overflow-wrap: anywhere; }
h2 { font-size: 1.35rem; line-height: 1.25; }
h3 { font-size: 1.06rem; overflow-wrap: anywhere; }
a, summary { color: var(--accent); }
a:hover, summary:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
code { font-size: .91em; overflow-wrap: anywhere; }
.frame { width: min(100% - 32px, 1088px); margin-inline: auto; }
header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.top { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 16px; }
.brand { color: var(--ink); text-decoration: none; font-weight: 760; }
.brand span { color: var(--accent); border-left: 1px solid var(--rule); padding-left: 8px; margin-left: 4px; }
main { padding-block: clamp(32px, 6vw, 64px); }
h1 + p { margin-top: var(--unit); }
.muted { color: var(--muted); }
.sign-in { max-width: 520px; }
.sign-in .button, .sign-in a { margin-top: 24px; display: inline-block; }
.back { display: inline-block; margin-bottom: 16px; }

button, .button, input, select { font: inherit; }
button, .button {
  display: inline-block;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--paper);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: #33287f; }
.quiet { background: var(--paper); color: var(--accent); border-color: var(--rule); }
.quiet:hover { background: var(--canvas); }
input, select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #828ba4;
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
}
label { display: grid; gap: 4px; font-weight: 600; }
.field { display: grid; gap: 4px; }
.search { margin-block: 24px; max-width: 620px; }
.actions { display: flex; gap: var(--unit); margin-top: 4px; }

.customers, .subscriptions { padding: 0; margin: 16px 0; list-style: none; }
.customers { border-top: 1px solid var(--rule); }
.customers li { border-bottom: 1px solid var(--rule); padding: 16px 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.customers a { font-weight: 650; width: fit-content; }
.customer-layout { display: grid; gap: 32px; margin-top: 32px; }
.customer-layout h2 + p { margin-top: var(--unit); }
.grant { background: var(--paper); border-top: 3px solid var(--accent); padding: 24px; align-self: start; }
.grant form { margin-top: 24px; display: grid; gap: 16px; }
.grant button { justify-self: start; }
.grant .muted { font-size: .9rem; }

.subscriptions { border-top: 1px solid var(--rule); }
.subscriptions li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.subscription-title { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 16px; row-gap: 4px; }
.status { font-weight: 650; font-size: .86rem; color: var(--muted); }
.status.active { color: #166044; }
.status.scheduled { color: var(--accent); }
.terms { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: var(--unit) 0 0; }
dt { font-size: .86rem; color: var(--muted); }
dd { margin: 0; font-variant-numeric: tabular-nums; }
details { margin-top: var(--unit); }
summary { cursor: pointer; width: fit-content; padding-block: 8px; }
.extension { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.notice { margin-top: 16px; padding: 12px 16px; border-left: 3px solid #166044; background: #e9f5ee; }
.notice.error { border-color: #9b2130; background: #fcecef; }

@media (min-width: 750px) {
  .frame { width: min(100% - 64px, 1088px); }
  .customer-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 350px); }
}
