:root {
  color-scheme: dark;
  --background: #101114;
  --surface: #191b20;
  --surface-raised: #202228;
  --border: #30333a;
  --text: #f4f4f5;
  --muted: #a4a7b0;
  --accent: #b7adff;
}
* { box-sizing: border-box; }
html { font: 16px/1.5 Inter, "Segoe UI", system-ui, sans-serif; }
body { margin: 0; background: var(--background); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 10; padding: 10px; background: var(--accent); color: #111; }
.skip:focus { top: 12px; }

.topbar { border-bottom: 1px solid #292b31; }
.topbar-inner { max-width: 1080px; min-height: 64px; padding: 0 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }
.brand img { object-fit: contain; }
.divider { margin: 0 4px; color: #666b74; font-weight: 400; }
.muted, .site-link { color: var(--muted); font-weight: 450; }
.site-link { font-size: .82rem; white-space: nowrap; }
.site-link:hover, footer a:hover, .support a:hover { color: var(--text); }

.shell { max-width: 1080px; min-height: calc(100vh - 126px); margin: auto; padding: 0 28px; }
.heading { padding: 66px 0 31px; }
.eyebrow { display: block; color: #aeb1bb; font-size: .68rem; font-weight: 650; letter-spacing: .09em; }
.heading h1 { margin: 10px 0 7px; font-size: clamp(2rem, 3.6vw, 2.65rem); line-height: 1.13; letter-spacing: -.045em; font-weight: 650; }
.heading p { margin: 0; color: var(--muted); font-size: .93rem; }
.panel { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.loading { max-width: 710px; padding: 30px; color: var(--muted); }
.connect { max-width: 710px; padding: 31px 34px 29px; }
.connect h2 { margin: 0 0 10px; font-size: 1.38rem; line-height: 1.25; letter-spacing: -.025em; font-weight: 620; }
.connect p { max-width: 60ch; margin: 0 0 22px; color: #b5b8c0; font-size: .9rem; line-height: 1.65; }
.connect .fine { margin: 19px 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 42px; padding: 9px 16px; border: 1px solid #494c55; border-radius: 7px; background: var(--surface-raised); color: #e9eaf0; font-size: .84rem; font-weight: 570; transition: background-color .15s, border-color .15s; }
.button:hover:not(:disabled) { background: #2b2e35; border-color: #696d76; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #121218; }
.button.primary:hover:not(:disabled) { border-color: #c9c1ff; background: #c9c1ff; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.secondary { background: transparent; }
.notice { max-width: 710px; margin: 0 0 20px; padding: 12px 15px; border: 1px solid #49445e; border-radius: 7px; background: #22202b; color: #e0dbff; font-size: .84rem; }

.profile { display: flex; align-items: center; gap: 17px; padding: 21px 24px; margin-bottom: 20px; }
.avatar { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; overflow: hidden; border: 1px solid #414550; border-radius: 50%; background: #252630; }
.avatar-image { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { width: 28px; height: 28px; object-fit: contain; }
.profile-copy { min-width: 0; flex: 1; }
.profile h2 { margin: 3px 0 1px; font-size: 1.04rem; line-height: 1.35; font-weight: 620; overflow-wrap: anywhere; }
.profile p { margin: 2px 0 0; color: var(--muted); font-size: .77rem; overflow-wrap: anywhere; }
.mono { font-family: "Cascadia Code", Consolas, monospace; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 20px; align-items: start; }
.licenses, .redeem { padding: 24px; min-height: 260px; }
.card-header { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.panel h2 { margin: 6px 0 0; font-size: 1.25rem; line-height: 1.3; letter-spacing: -.025em; font-weight: 600; }
.count { padding: 4px 9px; border: 1px solid #3b3d45; border-radius: 20px; color: #b6bac3; font-size: .72rem; white-space: nowrap; }
.license-item { padding: 17px 0; border-top: 1px solid var(--border); }
.license-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.license-head strong { font-size: .92rem; font-weight: 600; }
.status { padding: 3px 9px; border: 1px solid #42604c; border-radius: 20px; background: #202b24; color: #abe0bb; font-size: .72rem; white-space: nowrap; }
.status.expired, .status.revoked { border-color: #64434b; background: #2c2024; color: #f0b3c0; }
.status.suspended { border-color: #685639; background: #2e291f; color: #e8d39d; }
.license-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; color: var(--muted); font-size: .78rem; }
.empty { padding: 25px 0 10px; color: var(--muted); font-size: .86rem; }
.redeem p, .download p { margin: 10px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.redeem label { display: block; margin: 18px 0 7px; color: #d2d4db; font-size: .81rem; }
.key-entry { display: flex; gap: 8px; }
.key-entry input { min-width: 0; flex: 1; height: 43px; padding: 8px 11px; border: 1px solid #4a4d56; border-radius: 7px; outline: 0; background: #121419; color: var(--text); font-family: "Cascadia Code", Consolas, monospace; font-size: .83rem; }
.key-entry input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #b7adff22; }
.key-entry .button { min-width: 64px; }
.redeem form > .primary { margin-top: 13px; }
.fine { color: #a2a5af !important; font-size: .76rem !important; line-height: 1.6 !important; }
.error { margin: 9px 0 0 !important; color: #f0afbd !important; font-size: .8rem !important; }
.error:empty { display: none; }
.download { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; margin-top: 20px; }
.download-state { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: .78rem; }
.support { padding: 21px 0 38px; color: var(--muted); font-size: .82rem; }
.support a { color: #c5bcff; }
footer { border-top: 1px solid #292b31; color: #9296a0; font-size: .76rem; }
.footer-inner { max-width: 1080px; margin: auto; padding: 17px 28px; display: flex; justify-content: space-between; gap: 20px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 23px; }

@media (max-width: 800px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .download { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 580px) {
  .topbar-inner { min-height: 61px; padding: 0 18px; }
  .brand { gap: 6px; }
  .brand .divider, .brand .muted { display: none; }
  .site-link { font-size: .75rem; }
  .shell { padding: 0 18px; }
  .heading { padding: 41px 0 24px; }
  .connect { padding: 25px 22px 23px; }
  .profile { padding: 18px; flex-wrap: wrap; }
  .profile .button { width: 100%; margin-top: 2px; }
  .licenses, .redeem, .download { padding: 20px; }
  .download-state { align-items: flex-start; flex-direction: column; }
  .footer-inner { padding: 17px 18px; flex-direction: column; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
