:root {
  color-scheme: dark;
  --surface-main: #000;
  --surface-lowest: #000;
  --surface-low: #000;
  --surface: #271e16;
  --surface-high: #322820;
  --surface-highest: #3d332b;
  --border: #554336;
  --border-soft: #36291e;
  --text: #f5f2f0;
  --text-warm: #f1dfd3;
  --muted: #b0a8a2;
  --muted-warm: #dbc2b0;
  --primary: #dc7b13;
  --primary-soft: #ffb77d;
  --teal: #75b9be;
  --teal-strong: #8ed2d7;
  --danger: #ffb4ab;
  --danger-strong: #f9624c;
  --success: #8ad7a7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #000;
  color: var(--text);
  font-family: var(--qn-font-body);
  font-size: var(--qn-type-body-size);
  line-height: var(--qn-type-body-line);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: none;
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

.page-shell {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 88px;
}

.hero-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 0 56px;
  text-align: center;
}

.section-kicker {
  margin: 0;
  color: var(--teal-strong);
  font-size: var(--qn-type-kicker-size);
  font-weight: var(--qn-type-kicker-weight);
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p,
ul {
  margin: 0;
}

h1,
h2 {
  font-family: var(--qn-font-heading);
  letter-spacing: 0;
}

h1 {
  margin-top: 16px;
  color: var(--text);
  font-size: var(--qn-type-h1-size);
  font-weight: var(--qn-type-h1-weight);
  line-height: var(--qn-type-h1-line);
}

h2 {
  color: var(--text-warm);
  font-size: var(--qn-type-h2-size);
  font-weight: var(--qn-type-h2-weight);
  line-height: var(--qn-type-h2-line);
}

.hero-copy {
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: var(--qn-type-body-lg-size);
  font-weight: var(--qn-type-body-lg-weight);
  line-height: var(--qn-type-body-lg-line);
}

.content-grid {
  width: min(100%, 560px);
  margin: 0 auto;
}

.panel {
  padding-top: 0;
}

.panel-auth .button {
  margin-top: 24px;
}

.panel-header {
  display: grid;
  gap: 8px;
}

.panel-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-header p:not(.section-kicker) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.auth-form {
  display: grid;
  width: min(100%, 420px);
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(20, 13, 6, 0.72);
  color: var(--text);
  outline: none;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.field input:focus {
  border-color: var(--primary);
  background: rgba(20, 13, 6, 0.9);
}

.field input:disabled {
  color: var(--muted);
  opacity: 0.72;
}

.divider-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100%, 420px);
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
}

.divider-row span {
  height: 1px;
  background: var(--border-soft);
}

.divider-row p {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.button,
.text-button {
  border-radius: 8px;
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  padding: 0 20px;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover:not(:disabled),
.button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  transform: none;
}

.button-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.button-primary {
  width: 100%;
  border-color: var(--primary);
  background: var(--primary);
  color: var(--surface-lowest);
}

.button-primary:disabled {
  border-color: var(--surface-highest);
  background: var(--surface-highest);
  color: var(--muted);
}

.button-secondary {
  width: 100%;
  border-color: var(--border);
  background: rgba(20, 13, 6, 0.58);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--muted);
  background: rgba(61, 51, 43, 0.78);
}

.button-neutral {
  width: 100%;
  border-color: var(--border);
  background: rgba(20, 13, 6, 0.58);
  color: var(--text);
  gap: 10px;
}

.button-neutral:hover,
.button-neutral:focus-visible {
  border-color: var(--muted);
  background: rgba(61, 51, 43, 0.78);
}

.google-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button-danger {
  border-color: var(--danger-strong);
  background: var(--danger-strong);
  color: #2f0904;
}

.button-danger:disabled {
  border-color: var(--surface-highest);
  background: var(--surface-highest);
  color: var(--muted);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--primary-soft);
}

.text-button:disabled {
  color: var(--muted);
}

.plain-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  color: var(--danger);
  line-height: 1.5;
}

.warning-icon {
  flex: 0 0 auto;
  line-height: 1.5;
}

.plain-list {
  margin-top: 18px;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.6;
}

.plain-list li + li {
  margin-top: 8px;
}

.confirm-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  margin-top: 24px;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--danger-strong);
  color: var(--text);
  cursor: pointer;
}

.confirm-toggle input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--danger-strong);
}

.confirm-toggle-copy {
  font-weight: 700;
  line-height: 1.5;
}

.button-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.button-row .button {
  width: auto;
}

.inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.logout-icon {
  font-size: 18px;
  line-height: 1;
}

.feedback,
.success-note {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(34, 26, 19, 0.72);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.feedback[data-kind="error"] {
  border-color: rgba(255, 180, 171, 0.45);
  color: var(--danger);
}

.feedback[data-kind="success"],
.success-note {
  border-color: rgba(138, 215, 167, 0.45);
  color: var(--success);
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(920px, calc(100% - 32px));
    padding: 24px 0 64px;
  }

  .hero-panel {
    padding: 40px 0 44px;
  }

  h1 {
    font-size: var(--qn-type-h1-size);
  }

  .hero-copy {
    font-size: var(--qn-type-body-lg-size);
    max-width: 31ch;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: var(--qn-type-h1-size);
    max-width: 11ch;
    margin-right: auto;
    margin-left: auto;
  }

  .content-grid,
  .panel,
  .field,
  .button {
    min-width: 0;
    max-width: 100%;
  }

  .panel-header-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .text-button-inline {
    margin-left: 0;
  }

  .button-row {
    justify-content: stretch;
  }

  .button-row .button {
    width: 100%;
  }
}
