:root {
  --ink: #111111;
  --ink-2: #52525b;
  --ink-3: #a1a1aa;
  --line: #e7e5e4;
  --paper: #ffffff;
  --wash: #fafaf9;
  --taxi: #f5b301;
  --taxi-wash: #fff8e1;
  --good: #15803d;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
}
body {
  font: 15px/1.5 var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
h1,
h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 40px);
}
.top.bar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding-block: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.brand i {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
}
.link {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-2);
}
.link:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font: 500 15px var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover {
  background: #2a2a2a;
}
.button:active {
  transform: translateY(1px);
}
.button:disabled {
  opacity: 0.6;
  cursor: default;
}
.button.large {
  height: 50px;
  padding: 0 26px;
  font-size: 16px;
  border-radius: 12px;
}
.ghost {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font: 500 13px var(--sans);
  color: var(--ink);
  cursor: pointer;
}
.ghost:hover {
  background: var(--wash);
}
.text-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Landing */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 80px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--taxi);
  box-shadow: 0 0 0 3px var(--taxi-wash);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.lede {
  margin: 20px 0 36px;
  max-width: 30ch;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-2);
}
.fine {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}
.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 40px);
  font-size: 12px;
  color: var(--ink-3);
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--ink-2);
  text-decoration: underline;
}

/* Sign-up */
.auth {
  background: var(--wash);
}
.center {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 16px 80px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
}
.card.form {
  padding: 32px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.04);
}
.form h1,
.form h2 {
  font-size: 22px;
}
.sub {
  margin: 6px 0 24px;
  color: var(--ink-2);
}
.sub b {
  color: var(--ink);
  font-weight: 600;
}
label {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
}
input {
  height: 42px;
  margin: 0 0 16px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 15px var(--sans);
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}
.form .button {
  margin-top: 8px;
  width: 100%;
}
.error {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #b91c1c;
}

/* Dashboard */
.app {
  background: var(--wash);
}
.who {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-2);
}
.who-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--taxi);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}
.dash {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 40px) 64px;
  opacity: 0;
  transition: opacity 0.2s;
}
.ready .dash {
  opacity: 1;
}
.dash h1 {
  font-size: 24px;
  margin: 0 0 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  align-items: start;
}
.panel {
  padding: 24px;
  min-width: 0;
}
.panel h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.balance {
  margin: 10px 0 6px;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}
.note.good::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--good);
  vertical-align: 1px;
}
.notice {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--wash);
  font-size: 14px;
  color: var(--ink-2);
}
.notice p {
  margin: 0;
}
.notice-foot {
  margin-top: 10px !important;
  color: var(--ink);
}
.muted {
  color: var(--ink-3);
  font-weight: 500;
}
.key {
  display: block;
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
  font: 13px var(--mono);
  overflow-x: auto;
  white-space: nowrap;
}
.snippet {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #e7e5e4;
  font: 12.5px/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.snippet .c {
  color: var(--taxi);
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #14532d;
  font-size: 14px;
  animation: arrive 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast svg {
  flex: none;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.16);
}
.dialog::backdrop {
  background: rgba(17, 17, 17, 0.32);
  backdrop-filter: blur(2px);
}
.dialog .form {
  max-width: none;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.actions .button {
  width: auto;
  margin: 0;
  height: 36px;
  font-size: 14px;
}
.actions .ghost {
  height: 36px;
}
.done {
  text-align: center;
  padding: 8px 0;
}
.done h2 {
  margin-top: 12px;
  font-size: 20px;
}
.done .button {
  margin-top: 4px;
}

@media (max-width: 520px) {
  .brand i {
    display: block;
  }
  .brand span {
    line-height: 1.15;
    font-size: 14px;
  }
  .who-email {
    display: none;
  }
  .card.form {
    padding: 24px;
  }
  .balance {
    font-size: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
