@font-face {
  font-family: Manrope;
  src: url("/assets/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #101614;
  --surface: #19201d;
  --text: #f3f8f4;
  --muted: #b1c2b8;
  --line: #303c35;
  --accent: #c8f0b6;
  --accent-text: #172b18;
  --error: #ffbbab;
  font: 16px Manrope, system-ui, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --page: #f2f6f1;
    --surface: #fff;
    --text: #17231b;
    --muted: #4f6257;
    --line: #d7e1d9;
    --accent: #203b2a;
    --accent-text: #fff;
    --error: #9b3128;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f2f6f1;
  --surface: #fff;
  --text: #17231b;
  --muted: #4f6257;
  --line: #d7e1d9;
  --accent: #203b2a;
  --accent-text: #fff;
  --error: #9b3128;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.shell {
  width: 100%;
  max-width: 540px;
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: max(14px, env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right), var(--tg-content-safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left), var(--tg-content-safe-area-inset-left, 0px));
}

.topbar { min-height: 58px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.wordmark { display: flex; gap: 6px; align-items: center; font-size: 25px; font-weight: 800; letter-spacing: -.08em; }
.logo { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; position: relative; }
.logo img { position: absolute; max-width: none; }
.support-button {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  min-height: 44px;
  padding-inline: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
}

.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  min-height: 235px;
  padding: 25px 24px 29px;
  border-radius: 28px;
  background: radial-gradient(ellipse at 89% 10%, #e6f8c9 0%, transparent 52%), linear-gradient(125deg, #bae7b9, #8cb98c);
  color: #162b1d;
}
.hero-content { position: relative; z-index: 1; }
h1, h2, p { margin: 0; }
h1 { font-weight: 800; font-size: clamp(35px, 8vw, 49px); line-height: 1.05; letter-spacing: -.075em; margin: 23px 0 8px; }
.hero p { max-width: 269px; line-height: 1.5; font-weight: 700; font-size: 15px; }
.hero-symbol, .tile-icon { display: grid; place-items: center; border-radius: 16px; flex: none; }
.hero-symbol { width: 47px; height: 47px; background: #203b2a; color: #e2f6cd; }
.hero-art { position: absolute; left: 57%; top: -36%; width: 72%; aspect-ratio: 1; transform: rotate(-20deg); opacity: .65; }
.hero-art span { position: absolute; inset: 8%; border: 1px solid #416c4b66; border-radius: 29%; }
.hero-art span:nth-child(2) { inset: 20%; background: #d6f6ba55; }
.hero-art span:nth-child(3) { inset: 32%; background: #ebffd670; }

.account { background: var(--surface); border: 1px solid var(--line); border-radius: 25px; padding: 20px; margin-top: 16px; }
.account-heading { display: flex; align-items: flex-start; gap: 12px; }
.tile-icon { width: 43px; height: 43px; border: 1px solid var(--line); color: var(--text); }
h2 { font-size: 19px; font-weight: 800; letter-spacing: -.035em; line-height: 1.3; }
.account p, dialog p, dialog li { font-size: 14px; color: var(--muted); line-height: 1.57; }
.account-heading p { margin-top: 4px; }
.account .status-pill { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 0; padding: 6px 11px; background: var(--page); border-radius: 24px; font-weight: 750; color: var(--text); }
.status-pill::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.account .status-pill[data-status="verified"] { color: var(--accent); }
.account .status-pill[data-status="needs_attention"] { color: var(--error); }
.actions:not(:has(button:not([hidden]))) { display: none; }
.actions { display: grid; gap: 8px; margin-top: 16px; }
.primary, .text-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
}
.primary { background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.text-button { background: none; color: var(--muted); text-align: left; padding-left: 0; }
form#link-form { margin-top: 18px; display: grid; gap: 9px; }
label { font-size: 13px; font-weight: 800; }
input { min-height: 48px; border: 1px solid var(--line); border-radius: 13px; background: var(--page); color: var(--text); padding: 9px 12px; }
input::placeholder { color: var(--muted); opacity: .85; }
.feedback, .account .feedback { margin-top: 10px; color: var(--error); font-size: 13px; }
.privacy-note { margin-top: 17px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }

.icon::before { content: ""; width: 20px; height: 20px; display: block; background: currentColor; mask: var(--icon) center/contain no-repeat; }
.icon-help { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9a2.5 2.5 0 0 1 5 0c0 2-2.5 2-2.5 4m0 3h.01'/%3E%3C/svg%3E"); }
.icon-shield { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-3.5 7-9V5l-7-3-7 3v8c0 5.5 7 9 7 9zM9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.icon-lock { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='5' y='10' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3m-4 4v2'/%3E%3C/svg%3E"); }
.icon-link { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 7l2.5-2.5a4 4 0 0 1 5.7 5.7L15 13.4a4 4 0 0 1-5.7 0m4.7 3.6l-2.5 2.5a4 4 0 0 1-5.7-5.7L9 10.6a4 4 0 0 1 5.7 0'/%3E%3C/svg%3E"); }
.privacy-note .icon::before { width: 16px; height: 16px; }
dialog { width: min(430px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 25px; padding: 22px; background: var(--surface); color: var(--text); }
dialog::backdrop { background: #08130dc4; }
dialog h2 { margin-top: 12px; }
dialog ol { padding-inline-start: 23px; margin: 12px 0; }
dialog li + li { margin-top: 6px; }
.close-button { float: right; width: 44px; height: 44px; background: var(--page); border: 1px solid var(--line); border-radius: 50%; color: var(--text); font-size: 23px; }

@media (min-width: 650px) {
  .shell { padding-top: 48px; }
  .hero { padding: 32px; }
}
