/* Chakra Petch is SIL OFL 1.1; the license ships beside the fonts as OFL.txt. */
@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/account/assets/chakra-petch-600-latin.woff2?v=a5888696e9eb1b4b) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/account/assets/chakra-petch-700-latin.woff2?v=ce5095dc1cb200aa) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0A0E1A;
  --ink-raised: #1A2033;
  --paper: #F6F3EE;
  --surface: #FFFFFF;
  --ember: #E8912D;
  /* The plain ember is 2.2:1 on paper; this one clears the 3:1 a focus indicator needs. */
  --ember-focus: #C46F12;
  --link: #A85A0C;
  --link-hover: #7A3F05;
  --text-strong: #2A3142;
  --text-muted: #4A5368;
  --text-faint: #5C6478;
  --line: #C9C3B8;
  --line-hover: #A9A294;
  /* A field's edge must reach 3:1 on white and on paper; a button's label carries its own contrast. */
  --field-line: #8A8375;
  --field-line-hover: #6F685B;
  --rule: #DDD6CA;
  --card-line: #E2DBCF;
  --card-rule: #EEE8DE;
  --on-dark-muted: #9AA3B5;
  --on-dark-soft: #C9D0DD;
  --on-dark-strong: #E8ECF4;
  --dark-line: #3A4460;
  --danger-text: #9B2C1F;
  --danger-line: #E3B6AE;
  --error-surface: #FDF0EE;
  --error-line: #F1C4BC;
  --error-text: #8A1F12;
  --error-icon: #B42318;
  --success-surface: #E4F3E9;
  --success-line: #A9D8B8;
  --success-text: #14532D;
  --success-icon: #15803D;
  --warning-text: #8A4B00;
  --warning-line: #E8C48F;
  --font-display: "Chakra Petch", "Segoe UI", sans-serif;
  --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, Consolas, monospace;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--ember-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wordmark {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 4px;
  text-transform: uppercase;
  white-space: nowrap;
  color: #FFFFFF;
}

/* Signed out: art on the left, the form column on the right. */

.auth-split {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-art {
  position: relative;
  flex: 1 1 55%;
  overflow: hidden;
  padding: 48px 56px;
  background: var(--ink);
}

.auth-pane {
  display: flex;
  flex: 1 1 45%;
  flex-direction: column;
  justify-content: center;
  min-width: 452px;
  padding: 48px clamp(24px, 6.875vw, 88px);
  background: var(--paper);
}

.auth-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  max-width: 404px;
}

.horizon {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.horizon-planet,
.horizon-atmosphere,
.horizon-moon,
.horizon-star {
  position: absolute;
  display: block;
}

.horizon-planet {
  left: 120px;
  bottom: -530px;
  width: 900px;
  height: 900px;
  border: 1px solid var(--ember);
  border-radius: 50%;
  background: #0F1424;
}

.horizon-atmosphere {
  left: 150px;
  bottom: -510px;
  width: 840px;
  height: 840px;
  border: 1px solid #1F2740;
  border-radius: 50%;
}

.horizon-moon {
  top: 180px;
  left: 74%;
  width: 46px;
  height: 46px;
  border: 1px solid var(--dark-line);
  border-radius: 50%;
  background: #121A2E;
}

.horizon-star {
  width: 2px;
  height: 2px;
  background: #8891A5;
}

.horizon-star-1 {
  top: 250px;
  left: 13%;
  width: 3px;
  height: 3px;
  background: #6F788C;
}

.horizon-star-2 {
  top: 120px;
  left: 54%;
}

.horizon-star-3 {
  top: 330px;
  left: 87%;
}

.horizon-star-4 {
  top: 360px;
  left: 37%;
  background: #6F788C;
}

/* Text and flow shared by both layouts. */

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--ink);
}

h1 {
  font-size: 34px;
  letter-spacing: 0.5px;
}

h2 {
  font-size: 18px;
  letter-spacing: 0.5px;
}

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead,
.body-text {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

.page-link,
.prompt {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.page-link a {
  font-weight: 600;
}

.prompt a {
  font-weight: 700;
}

.plain-list {
  margin: 0;
  padding: 16px 20px;
  list-style: none;
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 1px;
}

.plain-list li + li {
  margin-top: 6px;
}

.qr-image {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  padding: 8px;
  border: 1px solid var(--card-line);
  border-radius: 6px;
  background: #FFFFFF;
}

/* Alerts. */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 14px;
}

.alert-icon {
  flex: none;
  width: 20px;
  height: 20px;
}

.alert-message {
  margin: 0;
}

.alert-error {
  border-color: var(--error-line);
  background: var(--error-surface);
  color: var(--error-text);
}

.alert-error .alert-icon {
  color: var(--error-icon);
}

.alert-success {
  border-color: var(--success-line);
  background: var(--success-surface);
  color: var(--success-text);
}

.alert-success .alert-icon {
  color: var(--success-icon);
}

/* Forms. */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
}

.field-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.field-input:hover {
  border-color: var(--field-line-hover);
}

.field-input:focus-visible {
  outline: 3px solid var(--ember-focus);
  outline-offset: 1px;
  border-color: var(--ink);
}

.field-code {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 4px;
}

.field-hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.field-aside {
  margin: -10px 0 0;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

/* Grows the hit area to 44px without moving the text. */
.field-aside a,
.page-link a,
.prompt a {
  display: inline-block;
  padding: 12px 0;
  margin: -12px 0;
}

.password-field {
  position: relative;
}

.password-field.has-toggle .field-input {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  min-width: 64px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0 3px 3px 0;
  background: var(--surface);
  color: var(--link);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--link-hover);
}

/* Buttons. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
}

.button-icon {
  flex: none;
  width: 16px;
  height: 16px;
}

.button-primary {
  min-height: 48px;
  border-color: var(--ink);
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.button-primary:hover {
  border-color: var(--ink-raised);
  background: var(--ink-raised);
  color: #FFFFFF;
}

.button-primary .button-icon {
  color: var(--ember);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--line-hover);
  background: #FBFAF7;
  color: var(--ink);
}

.button-danger {
  border-color: var(--danger-line);
  background: var(--surface);
  color: var(--danger-text);
}

.button-danger:hover {
  border-color: var(--danger-text);
  color: var(--danger-text);
}

.form-stack > .button {
  width: 100%;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

.divider::before,
.divider::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: var(--rule);
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.provider-grid form {
  margin: 0;
}

.provider-grid .button {
  width: 100%;
}

.provider-icon {
  flex: none;
  width: 18px;
  height: 18px;
}

.provider-discord .provider-icon {
  color: #5865F2;
}

/* Signed in: a dark band with the account tabs above a centred column of cards. */

.shell-header {
  display: flex;
  flex-direction: column;
  padding: 0 64px;
  background: var(--ink);
}

.shell-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.shell-bar .wordmark {
  flex: none;
  font-size: 15px;
}

.shell-user {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.shell-user-name {
  overflow: hidden;
  font-size: 14px;
  color: var(--on-dark-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-user form {
  margin: 0;
}

.button-on-dark {
  position: relative;
  min-height: 36px;
  padding: 0 14px;
  border-color: var(--dark-line);
  background: transparent;
  color: var(--on-dark-strong);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

/* A 44px hit area around the 36px the design draws. */
.button-on-dark::after {
  content: "";
  position: absolute;
  inset: -5px 0;
}

.button-on-dark:hover {
  border-color: var(--on-dark-muted);
  color: #FFFFFF;
}

.shell-header :focus-visible {
  outline-color: var(--ember);
}

.shell-tabs {
  display: flex;
  gap: 32px;
  min-height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}

.shell-tab {
  display: flex;
  flex: none;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--on-dark-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.shell-tab:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.shell-tab[aria-current="page"] {
  border-bottom-color: var(--ember);
  color: #FFFFFF;
}

.shell-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 792px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.shell-main h1 {
  font-size: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px 36px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: var(--surface);
}

.card .plain-list {
  background: var(--paper);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.actions form {
  margin: 0;
}

.actions .button,
.setting-actions .button {
  width: auto;
}

.card-rows {
  gap: 0;
  padding: 0;
}

.setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 28px;
}

.setting-row + .setting-row {
  border-top: 1px solid var(--card-rule);
}

.setting-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.setting-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.setting-title .provider-icon {
  width: 20px;
  height: 20px;
}

.setting-detail {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.setting-detail-positive {
  color: var(--success-text);
}

.setting-detail-warning {
  color: var(--warning-text);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.badge-positive {
  border-color: var(--success-line);
  background: var(--success-surface);
  color: var(--success-text);
}

.badge-warning {
  border-color: var(--warning-line);
  color: var(--warning-text);
}

.actions-spacer {
  flex-grow: 1;
}

.card-danger {
  border-color: var(--danger-line);
  border-top: 3px solid var(--danger-text);
}

.card-danger h1,
.card-danger h2 {
  color: var(--danger-text);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.form-cancel {
  display: inline-block;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
}

.shell-main .card .form-stack > .button {
  width: auto;
  align-self: flex-start;
}

.shell-main .card .field-code {
  max-width: 16ch;
  text-align: center;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 40px;
  margin: 0;
  padding: 20px 24px;
  list-style: none;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 1px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.step-title {
  font-size: 16px;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 40px;
}

.key {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.key-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
}

.key-value {
  margin: 0;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 1px;
  user-select: all;
}

.key-group {
  white-space: nowrap;
}

.setting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.setting-actions form {
  margin: 0;
}

@media (max-width: 899px) {
  .auth-split {
    flex-direction: column;
  }

  .auth-art {
    flex: none;
    height: 112px;
    padding: 20px;
  }

  .horizon-planet {
    left: calc(50% - 260px);
    bottom: auto;
    top: 64px;
  }

  .horizon-atmosphere {
    left: calc(50% - 230px);
    bottom: auto;
    top: 104px;
  }

  .horizon-moon {
    top: 26px;
    left: auto;
    right: 18%;
    width: 24px;
    height: 24px;
  }

  .horizon-star-1 {
    top: 70px;
  }

  .horizon-star-2 {
    top: 18px;
  }

  .horizon-star-3 {
    top: 76px;
  }

  .horizon-star-4 {
    top: 48px;
  }

  .auth-pane {
    flex: 1 0 auto;
    justify-content: flex-start;
    min-width: 0;
    padding: 32px 20px 48px;
  }

  .auth-column {
    max-width: 480px;
    margin: 0 auto;
  }

  h1 {
    font-size: 28px;
  }

  /* 16px keeps iOS Safari from zooming into a focused field. */
  .field-input {
    font-size: 16px;
  }

  .shell-header {
    padding: 0 16px;
  }

  .shell-tabs {
    gap: 24px;
  }

  .shell-main {
    padding-top: 24px;
  }

  .card {
    padding: 24px 20px;
  }

  .card-rows {
    padding: 0;
  }

  .setting-row {
    padding: 16px 20px;
  }

  .step-body {
    padding-left: 0;
  }

  .shell-main .card .field-code {
    max-width: none;
  }
}

@media (max-width: 380px) {
  .code-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-pane {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .shell-bar .wordmark {
    font-size: 13px;
    letter-spacing: 3px;
  }

  .shell-user {
    gap: 10px;
  }
}

/* Administration: a wide column, a link row, data tables and checkbox groups. */
.shell-main.shell-main-wide {
  max-width: 1152px;
}

.page-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.page-nav a:hover {
  border-color: var(--line-hover);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table caption {
  padding: 16px 20px 8px;
  color: var(--text-strong);
  font-weight: 700;
  text-align: left;
}

.data-table th {
  padding: 12px 20px;
  border-bottom: 1px solid var(--card-rule);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--card-rule);
  color: var(--ink);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table a {
  font-weight: 600;
}

select.field-input {
  appearance: auto;
  background: var(--surface);
}

.check-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  color: var(--ink);
  font-size: 15px;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}
