/* Minimal overrides for Pico.css */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.site-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body.site-body > main {
  flex: 1 0 auto;
}

.site-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, 72rem);
  margin: 0.75rem auto 0;
}

.site-chrome-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-chrome-brand img {
  display: block;
  height: 2rem;
  width: auto;
}

.logout-form {
  margin: 0;
}

.logout-form button {
  margin: 0;
  width: auto;
  min-height: 2rem;
  padding: 0.25rem 0.85rem;
  font-size: 0.85rem;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--pico-muted-color, #6b7280);
  font-size: 0.8125rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
}

body.guide-page main.guide-shell {
  width: min(calc(100% - 2rem), 40rem);
  max-width: 40rem;
  margin-inline: auto;
  align-self: center;
  padding: 1.25rem 0 2.5rem;
}

.guide-article h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.3;
  margin: 0 0 1rem;
}

.guide-article h2 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.6rem;
}

.guide-article h3 {
  font-size: 1rem;
  margin: 1.15rem 0 0.4rem;
}

.guide-article p,
.guide-article li {
  line-height: 1.7;
}

.guide-article ul,
.guide-article ol {
  padding-left: 1.25rem;
}

body.auth-page .site-footer {
  padding-top: 0.5rem;
  padding-bottom: 1rem;
  font-size: 0.75rem;
}

.participant-progress {
  margin-bottom: 1rem;
  color: var(--pico-muted-color);
}

/* Compact auth — vertical layout, tight spacing */
body.auth-page {
  --pico-font-size: 14px;
  --pico-line-height: 1.35;
  --pico-form-element-spacing-vertical: 0.25rem;
  --pico-form-element-spacing-horizontal: 0.5rem;
  --pico-spacing: 0.4rem;
  --pico-typography-spacing-vertical: 0.5rem;
}

body.auth-page main.auth-shell {
  width: min(100%, 18rem);
  margin: 0.5rem auto;
  padding: 0 0.5rem;
}

body.auth-page .auth-card {
  margin: 0;
  padding: 0.65rem 0.75rem;
}

body.auth-page .auth-brand {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--pico-primary);
  text-align: center;
}

body.auth-page .auth-brand a {
  display: inline-block;
  text-decoration: none;
}

body.auth-page .auth-brand img {
  display: block;
  margin: 0 auto;
  height: 2.4rem;
  width: auto;
}

body.auth-page .auth-card h1 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
}

body.auth-page .auth-flash {
  margin: 0 0 0.4rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.78rem;
  list-style: none;
  background: var(--pico-card-sectioning-background-color);
  border-radius: 0.25rem;
}

body.auth-page .auth-form {
  margin: 0;
}

body.auth-page .auth-form label {
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
}

body.auth-page .auth-form input {
  margin-top: 0.12rem;
  margin-bottom: 0;
  min-height: 1.9rem;
  padding: 0.28rem 0.45rem;
  font-size: 0.85rem;
}

body.auth-page .auth-code-line {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.12rem;
}

body.auth-page .auth-code-line input {
  flex: 1;
  margin-top: 0;
}

body.auth-page .auth-code-line button {
  margin: 0;
  min-height: 1.9rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
  white-space: nowrap;
  width: auto;
}

body.auth-page .auth-form > button[type="submit"] {
  margin: 0.35rem 0 0;
  min-height: 2rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  width: 100%;
}

body.auth-page .auth-link {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
}

body.auth-page .auth-code-status {
  display: block;
  margin-top: 0.2rem;
  min-height: 1em;
  font-size: 0.75rem;
}

body.auth-page .auth-code-msg.ok {
  color: var(--pico-ins-color, #2f7d32);
}

body.auth-page .auth-code-msg.error {
  color: var(--pico-del-color, #b00020);
}

body.landing-page.site-body {
  align-items: center;
}

body.landing-page .site-footer {
  width: 100%;
  align-self: stretch;
}

body.landing-page main.landing-shell {
  width: min(calc(100% - 2rem), 960px);
  max-width: 960px;
  margin-inline: auto;
  align-self: center;
  padding: 1.25rem 0 2.5rem;
}

.landing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.landing-brand img {
  display: block;
  height: 2.25rem;
  width: auto;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-nav a {
  text-decoration: none;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
}

.landing-nav-primary {
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
}

.landing-hero {
  text-align: center;
}

.landing-hero h1 {
  margin: 0.35rem auto 0.75rem;
  max-width: 18em;
  font-size: clamp(1.6rem, 5vw, 2.15rem);
  line-height: 1.25;
  font-weight: 700;
}

.landing-kicker {
  margin: 0;
  color: #0f766e;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.landing-lead {
  max-width: 36rem;
  margin: 0 auto 1.25rem;
  color: var(--pico-muted-color, #4b5563);
  line-height: 1.65;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 2.25rem;
}

.landing-btn,
.landing-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.landing-btn {
  background: #0f766e;
  color: #fff;
}

.landing-btn-ghost {
  border: 1px solid #0f766e;
  color: #0f766e;
}

.landing-steps h2,
.landing-note p {
  margin: 0 0 0.85rem;
  text-align: center;
}

.landing-steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .landing-steps ol {
    grid-template-columns: repeat(3, 1fr);
  }
}

.landing-steps li {
  padding: 0.9rem 1rem;
  border: 1px solid var(--pico-muted-border-color, #e5e7eb);
  border-radius: 0.6rem;
  background: #fff;
}

.landing-steps li strong {
  display: block;
  margin-bottom: 0.25rem;
}

.landing-steps li span {
  color: var(--pico-muted-color, #4b5563);
  font-size: 0.95rem;
}

.landing-note {
  max-width: 36rem;
  margin: 1.5rem auto 0;
  color: var(--pico-muted-color, #6b7280);
  font-size: 0.9rem;
  text-align: center;
}

.slide-verify {
  position: relative;
  width: 100%;
  height: 40px;
  margin: 0.55rem 0 0.15rem;
  background: #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.slide-verify-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: #99f6e4;
  border-radius: 20px;
}

.slide-verify-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f766e;
  color: #fff;
  border-radius: 50%;
  cursor: grab;
  z-index: 2;
}

.slide-verify-thumb svg {
  pointer-events: none;
}

.slide-verify-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #9ca3af;
  pointer-events: none;
}

.slide-verify.done .slide-verify-track {
  background: #86efac;
  width: 100% !important;
}

.slide-verify.done .slide-verify-thumb {
  background: #16a34a;
  left: calc(100% - 38px) !important;
  cursor: default;
}

.slide-verify.done .slide-verify-text {
  color: #15803d;
}

@media (max-width: 640px) {
  .site-chrome {
    width: min(100% - 1.25rem, 72rem);
    flex-wrap: nowrap;
    align-items: center;
  }

  button,
  [type="submit"],
  [type="button"],
  .logout-form button {
    min-height: 44px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  table th,
  table td {
    white-space: nowrap;
  }

  body.auth-page main.auth-shell {
    width: min(100% - 1.5rem, 22rem);
  }

  body.auth-page .auth-form input,
  body.auth-page .auth-form > button[type="submit"],
  body.auth-page .auth-code-line button {
    min-height: 44px;
    font-size: 16px;
  }

  body.landing-page main.landing-shell {
    width: min(calc(100% - 1.5rem), 960px);
  }

  body.guide-page main.guide-shell {
    width: min(calc(100% - 1.5rem), 40rem);
  }

  .landing-btn,
  .landing-btn-ghost,
  .landing-nav-primary {
    min-height: 44px;
  }
}
