:root {
  color-scheme: light;
  --background: #f4f5f3;
  --surface: #ffffff;
  --foreground: #20231f;
  --muted: #686f68;
  --border: #d8ddd8;
  --primary: #17643a;
  --primary-hover: #0f5130;
  --accent: #e8f2eb;
  --danger: #a52a2a;
  --shadow: 0 8px 24px rgba(21, 32, 24, 0.08);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(23, 100, 58, 0.2);
  outline-offset: 1px;
}

.muted {
  color: var(--muted);
}

.topbar {
  height: 58px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand,
.session-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-actions span {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--foreground);
  color: #fff;
  font-weight: 800;
}

main {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto 64px;
}

.guest-layout {
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  align-items: center;
  gap: 80px;
  padding: 48px 0;
}

.intro {
  max-width: 480px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

h2 {
  margin: 0;
  font-size: 17px;
}

.intro > p:last-of-type {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.steps {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.steps li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--primary);
  background: var(--surface);
  font-weight: 700;
}

.steps strong {
  display: block;
  padding-top: 1px;
}

.steps p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-shell {
  min-height: 490px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  min-width: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: var(--foreground);
  border-bottom-color: var(--primary);
}

.auth-panel {
  display: grid;
  gap: 16px;
  padding: 30px;
}

.section-heading {
  margin-bottom: 3px;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: grid;
  gap: 7px;
  color: #3f453f;
  font-size: 13px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 0 11px;
  color: var(--foreground);
  background: var(--surface);
  border: 1px solid #bdc5bd;
  border-radius: 4px;
}

input {
  height: 42px;
}

textarea {
  min-height: 92px;
  padding-block: 10px;
  resize: vertical;
  overflow-wrap: anywhere;
}

.field-help {
  margin: -9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-hover);
}

.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--foreground);
}

.secondary:hover,
.quiet:hover {
  background: #eef0ed;
}

.quiet,
.text-action {
  background: transparent;
  color: var(--muted);
}

.quiet {
  padding-inline: 10px;
}

.text-action {
  min-height: 28px;
  justify-self: start;
  padding: 0;
}

.text-action:hover {
  color: var(--primary);
}

.status-panel {
  align-content: center;
  min-height: 420px;
  text-align: center;
}

.status-panel > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 50%;
  color: var(--primary);
  background: var(--accent);
  font-size: 22px;
  font-weight: 800;
}

.account-layout {
  padding: 52px 0;
}

.account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.status-badge {
  padding: 5px 8px;
  border-radius: 4px;
  color: var(--primary);
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.account-section {
  padding: 28px;
  background: var(--surface);
}

.account-section > p {
  line-height: 1.6;
}

.account-section form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.session-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.session-section .secondary {
  margin-top: auto;
}

.notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100% - 48px));
  padding: 13px 16px;
  border-radius: 4px;
  color: #fff;
  background: var(--foreground);
  box-shadow: var(--shadow);
}

.notice.error {
  background: var(--danger);
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 16px;
  }

  .session-actions span {
    max-width: 130px;
  }

  main {
    width: min(100% - 24px, 480px);
  }

  .guest-layout {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 34px 0;
  }

  .intro {
    max-width: none;
  }

  h1 {
    font-size: 25px;
  }

  .steps {
    display: none;
  }

  .auth-shell {
    min-height: 0;
  }

  .auth-panel {
    padding: 24px 20px;
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .session-section .secondary {
    margin-top: 18px;
  }

  .notice {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }
}

.page-foot {
  width: min(980px, calc(100% - 40px));
  margin: -48px auto 32px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
