/* JuProxy design system */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --ink: #0b0b0c;
  --muted: #5c5c58;
  --faint: #8e8e89;
  --line: #e6e5e0;
  --live: #15803d;
  --term: #111112;
  --danger: #b42318;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

.mono {
  font-family: var(--mono);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
}

.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.u {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.u:hover {
  text-decoration-thickness: 2px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s,
    opacity 0.15s;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #2a2a2c;
}

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light:hover {
  background: #ececea;
}

.btn-line {
  border: 1px solid var(--line);
  background: var(--surface);
}

.btn-line:hover {
  border-color: var(--ink);
}

.btn-ghost:hover {
  background: #efefec;
}

.btn-lg {
  height: 52px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* Top bar used on app pages */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
}

.topbar .logo img,
.nav .logo img {
  display: block;
  width: 122px;
  height: 26px;
  object-fit: contain;
}

.topbar-link {
  display: flex;
  gap: 6px;
  font-size: 15px;
}

.topbar-link span {
  color: var(--muted);
}

.topbar-link a {
  font-weight: 500;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label {
  font-size: 14px;
  font-weight: 500;
}

.input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.input:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 0.5px var(--ink);
}

.input .i {
  color: var(--faint);
}

.input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.input input::placeholder {
  color: var(--faint);
}

.input.mono input {
  font-family: var(--mono);
  font-size: 15px;
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
}

.alert .i {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

/* Centered single-task pages (login, purchase, result pages) */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 80px;
}

.page-col {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-head h1 {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -1.4px;
}

.page-head p {
  color: var(--muted);
}

.help {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.help a {
  color: var(--ink);
}

.result-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
}

.result-icon .i {
  width: 22px;
  height: 22px;
}

@media (max-width: 640px) {
  .topbar {
    padding: 20px 20px;
  }

  .topbar-link span {
    display: none;
  }

  .page-head h1 {
    font-size: 34px;
  }
}
