:root {
  color-scheme: light;
  --ink: #10233f;
  --ink-2: #41556f;
  --line: #d9e4ee;
  --tint: #f2f7fa;
  --green: #7ccb2b;
  --green-dark: #235f10;
  --blue: #1ea7e1;
  --blue-dark: #0b6c98;
  --radius: 14px;
  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--tint); color: var(--ink); font: 400 16px/1.55 var(--body); }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -.02em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(100% - 32px, 980px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }

.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.top img { display: block; width: auto; height: 54px; }
.back { color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; }
.back:hover { color: var(--blue-dark); }
main { padding-block: 40px 72px; }
.loading { padding: 60px 0; color: var(--ink-2); text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; border: 2px solid transparent; border-radius: 10px; font: 600 16px/1.2 var(--display); text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.small { min-height: 40px; padding: 7px 16px; font-size: 15px; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #1b3760; }
.btn.ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }

.auth { width: min(100%, 440px); margin-inline: auto; padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 36px rgba(16, 35, 63, .08); }
.auth h1 { font-size: 32px; font-weight: 800; }
.sub { margin-top: 6px; color: var(--ink-2); overflow-wrap: anywhere; }
.done .btn { width: 100%; margin-top: 22px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 22px 0 18px; padding: 4px; background: var(--tint); border-radius: 10px; }
.tab { min-height: 42px; background: transparent; border: 0; border-radius: 8px; color: var(--ink-2); font: 600 15px/1 var(--display); cursor: pointer; }
.tab[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(16, 35, 63, .12); }
#auth-form { display: grid; gap: 14px; }
#auth-form .btn { width: 100%; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.field input { width: 100%; min-height: 48px; padding: 10px 12px; background: #fff; color: var(--ink); border: 1px solid #93a5b8; border-radius: 8px; font: 400 16px/1.3 var(--body); }
.field input:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.hint { color: var(--ink-2); font-size: 13px; }
.msg { padding: 10px 12px; background: #e4f6d2; color: var(--green-dark); border-radius: 8px; font-size: 14px; font-weight: 500; }
.msg.err { background: #fde7e3; color: #8c2619; }
.legal { color: var(--ink-2); font-size: 13px; text-align: center; }
.legal a { color: var(--blue-dark); font-weight: 600; }

.account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.account-head h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 800; }
.account-head .btn { flex: none; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card.wide { grid-column: 1 / -1; }
.card h2 { font-size: 22px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.data { display: grid; width: 100%; }
.data div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.data div:last-child { border-bottom: 0; }
.data dt { flex: none; color: var(--ink-2); font-size: 15px; }
.data dd { min-width: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 3px 10px; background: var(--tint); color: var(--ink); border-radius: 999px; font: 600 13px/1.4 var(--body); letter-spacing: 0; }
.badge.premium { background: var(--ink); color: #fff; }
.badge.free { background: #e4f6d2; color: var(--green-dark); }
.badge.beta { margin-left: 4px; background: #dcf1fb; color: #09587c; vertical-align: 2px; }
.tools { display: grid; width: 100%; }
.tools li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.tools li:first-child { border-top: 0; padding-top: 2px; }
.tools h3 { font-size: 18px; }
.tools p { margin-top: 2px; color: var(--ink-2); font-size: 15px; }
.tools .btn { flex: none; min-width: 112px; }
.password-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; width: 100%; }
.password-form .btn { width: fit-content; }
.password-form .msg { grid-column: 1 / -1; }

@media (max-width: 720px) {
  .top-row { height: 64px; }
  .top img { height: 46px; }
  main { padding-block: 24px 48px; }
  .auth { padding: 22px; }
  .grid, .password-form { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 20px; }
  .password-form .btn { width: 100%; }
}
@media (max-width: 460px) {
  .tools li { align-items: stretch; flex-direction: column; gap: 10px; }
  .tools .btn { width: 100%; }
}
