:root {
  color-scheme: light;
  --page: #f7f7f5;
  --ink: #151515;
  --muted: #5f6163;
  --faint: #96999c;
  --rule: #151515;
  --soft-rule: #dadcde;
  --panel: transparent;
  --button: #242526;
  --button-ink: #ffffff;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--soft-rule);
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--faint);
  font-size: 12px;
}

.api-host::before,
.version-line::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  vertical-align: 1px;
  background: var(--muted);
  border-radius: 999px;
}

.login-chip {
  display: inline-flex;
  max-width: min(240px, 42vw);
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--button-ink);
  background: var(--button);
  border: 1px solid var(--button);
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.itch-icon {
  display: none;
}

.login-chip::before,
.button.primary[data-auth-start]::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h16l1 6H3l1-6Zm1 7h14v7H5v-7Zm4 3h2v2H9v-2Zm4 0h2v2h-2v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h16l1 6H3l1-6Zm1 7h14v7H5v-7Zm4 3h2v2H9v-2Zm4 0h2v2h-2v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-chip.is-authenticated::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 8a7 7 0 0 1 14 0H5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 8a7 7 0 0 1 14 0H5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.shell,
.home-shell {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 82px 0 64px;
}

.home-shell {
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100vh - 64px - 86px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: clamp(48px, 9vw, 120px);
  align-items: center;
  padding: 72px 0;
}

.shell.narrow {
  width: min(520px, calc(100% - 36px));
}

.hero {
  display: grid;
  gap: 34px;
  align-content: center;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(64px, 8vw, 96px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 18px;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel h1,
.notice h1 {
  margin-bottom: 16px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

.lead {
  display: grid;
  gap: 6px;
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.lead strong {
  color: var(--ink);
}

.version-line,
.kicker,
.small,
.mono {
  color: var(--faint);
  font-size: 12px;
}

.rule {
  height: 1px;
  margin: 28px 0 30px;
  background: var(--soft-rule);
}

.account-card {
  width: 100%;
  margin: 0;
  background: var(--panel);
}

.panel,
.notice {
  width: min(520px, 100%);
  margin: 0 auto;
  background: var(--panel);
}

.section-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 2px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-label span:first-child {
  color: var(--ink);
}

.account-card > p,
.panel p,
.notice p {
  margin: 20px 0 16px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  color: var(--button-ink);
  background: var(--button);
}

.button.secondary {
  color: var(--ink);
  background: transparent;
}

.button.wide {
  width: 100%;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  color: var(--faint);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: rgba(23, 22, 19, 0.12);
}

.card-note {
  margin-top: 22px;
  padding-top: 0;
  color: var(--muted);
  font-size: 12px;
}

.card-note strong {
  color: var(--ink);
}

.warning-box {
  display: grid;
  gap: 4px;
  margin: 22px 0;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
}

.warning-box strong {
  color: var(--ink);
}

.actions {
  display: grid;
  gap: 10px;
}

.status-box {
  margin: 18px 0;
  padding-top: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-details {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.account-details div {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--soft-rule);
}

.account-details dt,
.account-details dd {
  margin: 0;
}

.account-details dt {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-details dd {
  color: var(--ink);
  overflow-wrap: anywhere;
  font-weight: 700;
}

.code-form {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

input {
  min-height: 44px;
  width: 100%;
  padding: 9px 11px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  font: inherit;
  text-transform: uppercase;
}

input:focus {
  outline: 2px solid var(--rule);
  outline-offset: 2px;
}

.strip {
  display: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 36px;
  border-top: 1px solid var(--soft-rule);
  color: var(--muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.site-footer a {
  text-decoration: none;
}

.copy p {
  max-width: 62ch;
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .header-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .shell,
  .home-shell {
    width: min(560px, calc(100% - 36px));
    padding-top: 54px;
  }

  .home-shell {
    grid-template-columns: 1fr;
    gap: 42px;
    align-items: start;
    min-height: 0;
    padding-bottom: 56px;
  }

  .hero {
    gap: 20px;
  }

  .lead {
    max-width: 360px;
    text-align: left;
  }

  h1 {
    font-size: clamp(44px, 14vw, 56px);
  }

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

@media (max-width: 460px) {
  .api-host {
    display: none;
  }

  .button,
  .login-chip {
    width: 100%;
  }
}
