@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap");
:root {
  color-scheme: light;
  --paper: #f7f4ec;
  --ink: #142c42;
  --orange: #e66332;
  --muted: #66727a;
  --line: #d8d9d3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.55 "DM Sans",
    sans-serif;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
header {
  max-width: 1180px;
  margin: auto;
  padding: 25px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.wordmark span {
  color: var(--orange);
}
header > a:last-child {
  font-size: 14px;
  text-underline-offset: 4px;
}
.shell {
  max-width: 1080px;
  margin: 64px auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: start;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--orange);
}
h1 {
  font:
    800 clamp(45px, 6vw, 70px)/0.96 "Barlow Condensed",
    sans-serif;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin: 20px 0 25px;
}
h2 {
  font:
    700 30px/1.1 "Barlow Condensed",
    sans-serif;
  margin: 0 0 12px;
}
.intro p {
  max-width: 390px;
  color: var(--muted);
}
.plan {
  margin-top: 32px;
  border-top: 3px solid var(--orange);
  padding-top: 18px;
}
.price {
  font:
    700 38px "Barlow Condensed",
    sans-serif;
}
.price small {
  font:
    400 15px "DM Sans",
    sans-serif;
}
.plan p {
  font-size: 14px;
}
.card {
  background: #fffdf8;
  border: 1px solid var(--line);
  padding: 32px;
  box-shadow: 5px 5px 0 #e9e6dd;
}
.tabs {
  display: flex;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  padding: 0 0 10px;
  color: var(--muted);
}
.tabs button[aria-selected="true"] {
  border-color: var(--orange);
  color: var(--ink);
  font-weight: 700;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 18px 0 7px;
}
input {
  width: 100%;
  background: white;
  border: 1px solid #b5bfc3;
  padding: 12px 13px;
  border-radius: 2px;
  color: var(--ink);
}
input:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.primary,
.secondary {
  width: 100%;
  display: block;
  border: 1px solid var(--ink);
  padding: 13px 18px;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  margin-top: 20px;
}
.primary {
  color: white;
  background: var(--ink);
}
.primary:hover {
  background: #244861;
}
.secondary {
  background: transparent;
  color: var(--ink);
}
#connections-link:disabled {
  opacity: 1;
  color: var(--muted);
  border-color: #a7aaa8;
  cursor: not-allowed;
}
#connections-requirement {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 400;
}
/* Google's pre-approved light web button; preserve its logo and proportions. */
#google {
  display: block;
  margin: 20px auto 0;
  padding: 0;
  border: 0;
  background: white;
  border-radius: 4px;
}
#google img {
  display: block;
}
#google:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
#google:hover:not(:disabled) {
  box-shadow: 0 1px 3px #0003;
}
.orange {
  background: var(--orange);
  border-color: var(--orange);
}
.fine {
  font-size: 12px;
  color: var(--muted);
}
.notice {
  background: #fff1d6;
  border-left: 3px solid var(--orange);
  padding: 12px 14px;
  font-size: 14px;
  margin: 20px 0;
}
.error {
  color: #a73122;
}
#status {
  white-space: pre-line;
  min-height: 24px;
  font-size: 14px;
}
#status:empty {
  display: none;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.badge {
  display: inline-block;
  background: #e4efdf;
  color: #355a27;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}
.connection-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.connection-actions button {
  padding: 8px 12px;
}
.connection-actions .disconnect {
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
}
.hidden,
[hidden] {
  display: none !important;
}
footer {
  max-width: 1080px;
  margin: 50px auto 20px;
  padding: 0 32px;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 25px 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 760px) {
  header {
    padding: 18px 20px;
  }
  .shell {
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 35px auto;
    padding: 0 20px;
  }
  .intro p {
    max-width: none;
  }
  h1 {
    font-size: 48px;
  }
  .card {
    padding: 24px;
  }
  .plan {
    margin-top: 22px;
  }
  footer {
    padding: 0 20px;
  }
}

/* Compact member pages keep the account actions in view on laptop screens. */
.member-layout .shell {
  max-width: 920px;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin: 24px auto;
}
.member-layout h1 {
  font-size: 38px;
  margin: 10px 0 0;
}
.member-layout #intro {
  display: none;
}
.member-layout .card {
  padding: 24px;
}
.member-layout #account-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.member-layout #account-view:not(:has(#upgrade:not([hidden]))) {
  grid-template-columns: minmax(0, 1fr);
}
.member-layout .primary,
.member-layout .secondary {
  margin-top: 12px;
  padding: 10px 14px;
}
.member-layout #upgrade {
  margin: 0;
}
.member-layout #upgrade h3 {
  margin-top: 0;
}
.member-layout footer {
  max-width: 920px;
  margin: 16px auto;
}
#connect-discord:disabled {
  cursor: default;
}
@media (max-width: 600px) {
  .member-layout #account-view {
    grid-template-columns: minmax(0, 1fr);
  }
  .member-layout h1 {
    font-size: 32px;
  }
  .member-layout .row {
    align-items: center;
  }
  .connection-actions {
    flex-direction: column;
    align-items: stretch;
  }
  #connect-telegram {
    max-width: 150px;
  }
}

.password-field {
  position: relative;
}
.password-field input {
  padding-right: 52px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
}
.password-toggle:hover {
  color: var(--ink);
  background: var(--paper);
}
.password-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}
.password-toggle .eye-slash {
  display: none;
}
.password-toggle[data-visible="true"] .eye-slash {
  display: block;
}

.recovery-link {
  display: inline-block;
  margin: 16px 0;
  text-underline-offset: 4px;
}
.error {
  color: #a53221;
}
.member-layout:has(#forgot-view:not([hidden]), #reset-view:not([hidden]))
  .shell {
  max-width: 620px;
}
dialog#telegram-confirm {
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  margin: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 70px #142c4250;
}
dialog#telegram-confirm::backdrop {
  background: #142c42b3;
}
#telegram-confirm-name {
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  font-weight: 700;
}
dialog#telegram-confirm h2 {
  margin: 12px 0;
}
