/* app.whatstudio.digital landing: license key + apps. Uses ws-theme tokens. */
.ah-balance { margin: 0; color: var(--ws-text-2); }
.ah-balance strong { font-size: 32px; color: var(--ws-text); }
.ah-rewards-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.ah-rewards-actions { align-items: center; }
.ah-discord-on { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 8px 0 14px; border-radius: 99px; background: rgba(34, 197, 94, .14); color: #16a34a; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ah-discord-on[hidden], body.app-home .ah-btn[hidden] { display: none; }
.ah-discord-on button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.ah-discord-on button:hover { background: rgba(34, 197, 94, .2); }
.ah-discord-on svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
body.app-home .ah-btn.ah-btn-icon { width: 38px; padding: 0; display: inline-grid; place-items: center; }
.ah-btn-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
#discordLinked b { color: var(--ws-text); font-weight: 600; }
.ah-rewards summary { width: fit-content; cursor: pointer; text-decoration: underline; }
.ah-rewards dl { margin: 14px 0 0; }
.ah-rewards dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--ws-line-soft); }
.ah-rewards dd { margin: 0; white-space: nowrap; font-weight: 700; }
.ah-rewards details + details { margin-top: 10px; }
.ah-rewards details[hidden] { display: none; }
.ah-steps { margin: 14px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ws-text); font-size: 14px; }
.ah-steps a { color: inherit; text-decoration: underline; }
.ah-steps code { font: 600 13px/1 ui-monospace, "SF Mono", Menlo, monospace; }
.ah-rewards dt small { display: block; margin-top: 2px; color: var(--ws-text-3); font-size: 13px; }
.ah-rewards dd.is-minus { color: var(--ws-text-2); }
.ah-rewards dd.is-pending { color: var(--ws-text-3); font-weight: 600; }
/* How to get points / Points history: five and a half rows (earn.js sets the height), then a thin scroll. */
.ah-rewards dl.is-scroll { overflow-y: auto; overscroll-behavior: contain; padding-right: 10px; scrollbar-width: thin; scrollbar-color: var(--ws-line) transparent; }
.ah-rewards dl.is-scroll::-webkit-scrollbar { width: 6px; }
.ah-rewards dl.is-scroll::-webkit-scrollbar-track { background: transparent; }
.ah-rewards dl.is-scroll::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--ws-line); }
.ah-rewards dl.is-scroll::-webkit-scrollbar-thumb:hover { background: var(--ws-text-3); }
body.app-home {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body.app-home .ah-main {
  flex: 1;
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 150px 0 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
body.app-home .ah-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
body.app-home .ah-hero .ws-product-title { margin: 0; }
body.app-home .ah-lead { margin: 0; max-width: 34em; color: var(--ws-text-2); font-size: 17px; line-height: 1.5; }

body.app-home .ah-card, body.app-home .ah-hero { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
body.app-home .ah-card {
  background: var(--ws-surface);
  border-radius: var(--ws-r-lg);
  padding: clamp(20px, 4vw, 32px);
}
body.app-home .ah-form { display: flex; flex-direction: column; gap: 16px; }
body.app-home .ah-form[hidden], body.app-home .ah-signed[hidden] { display: none; }
body.app-home .ah-card-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--ws-text); }
body.app-home .ah-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--ws-r-xs);
  background: var(--ws-accent-soft);
  color: var(--ws-text);
  font-size: 14px;
  line-height: 1.45;
}
body.app-home .ah-fields { display: flex; flex-direction: column; gap: 10px; }
body.app-home .ah-field-extra { position: relative; }
body.app-home .ah-field-extra .ah-input { padding-right: 52px; }
body.app-home .ah-remove { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ws-text-3); font-size: 20px; cursor: pointer; }
body.app-home .ah-remove:hover { background: var(--ws-surface-2); color: var(--ws-text); }
body.app-home .ah-add { align-self: flex-start; margin-top: -4px; padding: 4px 0; border: 0; background: none; color: var(--ws-text-2); font: 600 14px/1.3 Inter, system-ui, sans-serif; cursor: pointer; }
body.app-home .ah-add span { display: inline-block; width: 18px; font-weight: 700; }
body.app-home .ah-add:hover { color: var(--ws-text); }
body.app-home .ah-keys { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
body.app-home .ah-keys li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--ws-bg); font-size: 14px; color: var(--ws-text); }
body.app-home .ah-keys li small { color: var(--ws-text-3); font: 500 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
body.app-home .ah-unlocked-form .ah-card-title, body.app-home .ah-unlocked-form #rememberRow { display: none; }
body.app-home .ah-signed + .ah-form { margin-top: 18px; }
body.app-home .ah-field { display: flex; flex-direction: column; gap: 8px; }
body.app-home .ah-label { font-size: 13px; font-weight: 600; color: var(--ws-text-2); }
body.app-home .ah-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--ws-bg);
  color: var(--ws-text);
  font: 600 15px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
body.app-home .ah-input::placeholder { color: var(--ws-text-3); font-weight: 500; }
body.app-home .ah-input:focus { border-color: var(--ws-accent); box-shadow: 0 0 0 4px var(--ws-accent-soft); }
body.app-home .ah-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
body.app-home .ah-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ws-text); }
body.app-home .ah-terms { align-items: flex-start; font-weight: 500; line-height: 1.4; }
body.app-home .ah-terms .ah-check-box { flex: none; margin-top: 1px; }
body.app-home .ah-terms a { color: inherit; text-decoration: underline; }
body.app-home .ah-check small { font-weight: 500; color: var(--ws-text-3); margin-left: 4px; }
body.app-home .ah-check input { position: absolute; opacity: 0; pointer-events: none; }
body.app-home .ah-check-box {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  background: var(--ws-bg); box-shadow: inset 0 0 0 1.5px var(--ws-line);
  display: grid; place-items: center; transition: background .15s, box-shadow .15s;
}
body.app-home .ah-check-box::after {
  content: ""; width: 10px; height: 6px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0);
  transition: transform .15s;
}
body.app-home .ah-check input:checked + .ah-check-box { background: var(--ws-accent); box-shadow: none; }
body.app-home .ah-check input:checked + .ah-check-box::after { transform: rotate(-45deg) scale(1); }
body.app-home .ah-check input:focus-visible + .ah-check-box { outline: 2px solid var(--ws-accent); outline-offset: 2px; }
body.app-home .ah-link { color: var(--ws-text-2); font-size: 14px; font-weight: 600; text-decoration: none; }
body.app-home .ah-link:hover { color: var(--ws-accent-text); }
body.app-home .ah-link-strong { color: var(--ws-text); }

body.app-home .ah-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border: 0; border-radius: 99px;
  font: 700 15px/1 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--ws-ease), opacity .2s;
}
body.app-home .ah-btn:active { transform: scale(.98); }
body.app-home .ah-btn-primary { background: var(--ws-accent-btn); color: #fff; width: 100%; }
body.app-home .ah-btn-primary:hover { background: var(--ws-accent); }
body.app-home .ah-btn-primary:disabled { opacity: .6; cursor: progress; }
body.app-home .ah-btn-primary.is-busy span::after { content: "…"; }
body.app-home .ah-btn-secondary { background: var(--ws-text); color: var(--ws-bg); }
body.app-home .ah-btn-secondary:hover { opacity: .88; }
body.app-home .ah-btn-ghost { background: var(--ws-surface-2); color: var(--ws-text); }
body.app-home .ah-btn-ghost:hover { background: var(--ws-surface-3); }
body.app-home .ah-btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
body.app-home .ah-status { margin: 0; min-height: 20px; font-size: 14px; line-height: 1.45; color: var(--ws-text-2); }
body.app-home .ah-status.is-error { color: var(--ws-accent-text); }

body.app-home .ah-signed-head { display: flex; align-items: center; gap: 14px; }
body.app-home .ah-signed-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
body.app-home .ah-signed-head strong { font-size: 17px; color: var(--ws-text); }
body.app-home .ah-signed-head small { font-size: 13px; color: var(--ws-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.app-home .ah-dot { width: 10px; height: 10px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 5px rgba(48, 209, 88, .16); flex: none; }

/* App cards: the same plugin cards as tools.html, two side by side. Hidden until a key unlocks them. */
body.ws26.app-home .ws-main > section.designer-tools.ah-apps { padding: 12px 0 0; background: transparent; }
body.app-home .ah-grid .work-card.is-locked, body.app-home .ah-grid .work-card.is-soon { cursor: default; }
body.app-home .ah-grid .work-card.is-soon .plugin-pixel-thumb { opacity: .4; }
body.app-home .ah-grid .work-card.is-soon .plugin-title-row span,
body.app-home .ah-grid .work-card.is-locked .plugin-title-row span { color: var(--ws-text-2); }
body.app-home .ah-grid .work-card.is-open .plugin-title-row span { background: var(--ws-accent-soft); color: var(--ws-accent-text); }
body.app-home .ah-grid .work-card.is-purchase .plugin-title-row span { background: var(--ws-text); color: var(--ws-bg); }

body.app-home .ah-more { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 8px; }

body.app-home .ah-footer {
  width: min(100% - 32px, 1120px); margin: 0 auto; padding: 28px 0 36px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--ws-line-soft); color: var(--ws-text-3); font-size: 13px;
}
body.app-home .ah-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
body.app-home .ah-footer a { color: var(--ws-text-2); text-decoration: none; }
body.app-home .ah-footer a:hover { color: var(--ws-text); }

@media (max-width: 640px) {
  body.app-home .ah-main { padding-top: 120px; }
  body.app-home .ah-lead { font-size: 16px; }
}

body.app-home .ah-add:disabled { opacity: .4; cursor: default; }
body.app-home .ah-add:disabled:hover { color: var(--ws-text-2); }
body.app-home .ah-buy { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--ws-line-soft); color: var(--ws-text-2); font-size: 14px; font-weight: 600; }
body.app-home .ah-buy[hidden] { display: none; }
body.app-home .ah-buy .ah-btn { height: 44px; padding: 0 20px; }
body.app-home .ah-unlocked-form .ah-buy { display: none; }
/* App tiles sit a step off the page background so the name tile never melts into it (light theme). */
body.ws26.app-home .ah-grid .work-card .work-media,
body.ws26.app-home .ah-grid .plugin-pixel-thumb { background: var(--ws-surface) !important; }
body.app-home .ah-status:empty { display: none; }

/* Accounts (2026-11-10): Account | Key only switch, log in / sign up / code steps. */
body.app-home .ah-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 22px; border-radius: 99px; background: var(--ws-bg); }
body.app-home .ah-tabs[hidden] { display: none; }
body.app-home .ah-tab { height: 40px; border: 0; border-radius: 99px; background: transparent; color: var(--ws-text-2); font: 700 14px/1 Inter, system-ui, sans-serif; cursor: pointer; transition: background .2s, color .2s; }
body.app-home .ah-tab:hover { color: var(--ws-text); }
body.app-home .ah-tab[aria-selected="true"] { background: var(--ws-surface-2); color: var(--ws-text); }
/* Sliding pill behind the selected tab (Account | Key only). */
body.app-home .ah-tabs { position: relative; }
body.app-home .ah-tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px); border-radius: 99px; background: var(--ws-surface-2); transition: transform .32s cubic-bezier(.22,.8,.24,1); }
body.app-home .ah-tabs:has(.ah-tab:last-child[aria-selected="true"])::before { transform: translateX(calc(100% + 4px)); }
body.app-home .ah-tabs .ah-tab { position: relative; z-index: 1; }
body.app-home .ah-tabs .ah-tab[aria-selected="true"] { background: transparent; }
body.app-home .ah-center { text-align: center; }
body.app-home .ah-rewards summary { transition: color .2s; }
@media (prefers-reduced-motion: reduce) { body.app-home .ah-tabs::before { transition: none; } }
body.app-home .ah-head { display: flex; flex-direction: column; gap: 6px; }
body.app-home .ah-sub[hidden] { display: none; }
body.app-home .ah-sub { margin: 0; color: var(--ws-text-2); font-size: 14px; line-height: 1.45; }
body.app-home #authForm .ah-input:not(.ah-code) { font-family: Inter, system-ui, sans-serif; letter-spacing: 0; }
body.app-home .ah-code { letter-spacing: .32em; font-size: 18px; }
body.app-home #authForm [data-show] { display: none; }
body.app-home #authForm[data-step="login"] [data-show~="login"],
body.app-home #authForm[data-step="register"] [data-show~="register"],
body.app-home #authForm[data-step="code"] [data-show~="code"],
body.app-home #authForm[data-step="reset"] [data-show~="reset"],
body.app-home #authForm[data-step="resetCode"] [data-show~="resetCode"] { display: flex; }
body.app-home #authForm p[data-show] { justify-content: center; flex-wrap: wrap; gap: 6px; }
body.app-home .ah-switch { margin: 0; color: var(--ws-text-3); font-size: 14px; }
body.app-home button.ah-link { padding: 0; border: 0; background: none; cursor: pointer; font-family: inherit; }
body.app-home .ah-signed-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
body.app-home .ah-signed-actions .ah-add { margin-top: 0; }
body.app-home .ah-signed-actions [hidden] { display: none; }
body.app-home .ah-signed + .ah-form, body.app-home .ah-signed ~ #authForm { margin-top: 18px; }
body.app-home #profileLink[hidden] { display: none; }
body.app-home .ah-card > .ah-buy { margin-top: 18px; }
/* Log in / Profile in the app header only (not on the main site). */
body.app-home .ah-account-btn { display: inline-flex; align-items: center; height: 38px; margin-left: 10px; padding: 0 16px; border-radius: 99px; background: var(--ws-text); color: var(--ws-bg); font: 700 14px/1 Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap; transition: opacity .2s; }
body.app-home .ah-account-btn:hover { opacity: .85; }
body.app-home .ah-account-btn[hidden] { display: none; }
body.app-home #main-header nav { margin-left: auto; }
@media (max-width: 760px) { body.app-home .ah-account-btn { margin-left: auto; margin-right: 10px; } }
/* Profile page (/account/) */
body.app-profile .ah-main { gap: 20px; }
body.app-profile .ah-keys { margin: 0; }
body.app-home .ah-keys-edit li { align-items: center; }
body.app-home .ah-keys-edit li span { flex: 1; min-width: 0; }
body.app-home .ah-keys-empty { justify-content: center !important; color: var(--ws-text-2) !important; }
body.app-home .ah-keys-edit li span b { display: block; font-weight: 600; }
body.app-home .ah-keys-edit li span em { display: block; margin-top: 2px; color: var(--ws-text-3); font-size: 13px; font-style: normal; }
body.app-home .ah-key-show { padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ws-text-3); font: 500 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; cursor: pointer; white-space: nowrap; }
body.app-home .ah-key-show:hover, body.app-home .ah-key-show[data-step="ask"] { background: var(--ws-surface-2); color: var(--ws-text); }
body.app-home .ah-key-show[data-step="ask"] { font-family: Inter, system-ui, sans-serif; font-weight: 600; }
body.app-home .ah-key-full { user-select: all; word-break: break-all; text-align: right; }
body.app-home .ah-auto-keys { align-self: center; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ws-text-2); text-decoration: underline; cursor: pointer; }
body.app-home .ah-auto-keys:hover { color: var(--ws-text); }
body.app-home .ah-auto-keys:disabled { opacity: .5; cursor: default; }
body.app-home .ah-key-remove { padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ws-text-3); font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; }
body.app-home .ah-key-remove:hover, body.app-home .ah-key-remove[data-confirm="1"] { background: var(--ws-surface-2); color: var(--ws-accent-text); }
body.app-home #pwForm [data-show] { display: none; }
body.app-home #pwForm[data-step="code"] [data-show~="code"] { display: flex; }
body.app-home #pwForm #pwNew { font-family: Inter, system-ui, sans-serif; letter-spacing: 0; }
body.app-home .ah-btn-secondary:disabled { opacity: .6; cursor: progress; }
body.app-home .ah-btn-secondary.is-busy span::after { content: "…"; }
body.app-home .ah-account-btn[aria-current="page"] { background: var(--ws-surface-2); color: var(--ws-text); }

/* Password rules (grey until met, then green) + captcha slot */
body.app-home .ah-rules { list-style: none; margin: -6px 0 0; padding: 0; flex-direction: column; gap: 6px; }
body.app-home #authForm .ah-rules:not([data-show]), body.app-profile .ah-rules { display: flex; }
body.app-profile #pwForm .ah-rules[data-show] { display: none; }
body.app-profile #pwForm[data-step="code"] .ah-rules { display: flex; }
body.app-home .ah-rules li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ws-text-3); transition: color .2s; }
body.app-home .ah-rule-mark { position: relative; width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px currentColor; transition: background .2s, box-shadow .2s; }
body.app-home .ah-rule-mark::after { content: ""; position: absolute; left: 5px; top: 3.5px; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.75px 1.75px 0; transform: rotate(45deg) scale(0); transition: transform .2s; }
body.app-home .ah-rules li.is-ok { color: #1fa64a; }
body.app-home .ah-rules li.is-ok .ah-rule-mark { background: #30d158; box-shadow: none; }
body.app-home .ah-rules li.is-ok .ah-rule-mark::after { transform: rotate(45deg) scale(1); }
body.app-home .ah-captcha:empty { display: none; }
body.app-home .ah-captcha { display: flex; justify-content: center; }

body.app-profile .ah-hello { margin: 0; font: 800 clamp(40px, 7vw, 72px)/1.05 Inter, system-ui, sans-serif; letter-spacing: -0.035em; color: var(--ws-text); }

body.app-home .ah-resend:disabled { color: var(--ws-text-3); opacity: .6; cursor: default; }
body.app-home .ah-resend:disabled:hover { color: var(--ws-text-3); }
body.app-home .ah-timer { font-variant-numeric: tabular-nums; }

/* 2026-11-11: home is cards only (same broken grid as the plugins on tools); login is its own page. */
body.app-login .ah-main { padding-top: 140px; }

/* 2026-11-11b: home in two blocks: the plugin apps, then the free utilities (three equal cards). */
body.app-home .ah-block-title { margin: 28px 0 20px; font: 800 clamp(26px, 3.4vw, 38px)/1.1 Inter, system-ui, sans-serif; letter-spacing: -0.03em; color: var(--ws-text); }
body.ws26.app-home .ah-grid-three { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; gap: 24px; }
body.ws26.app-home .ah-grid-three .work-card { grid-column: auto !important; grid-row: auto !important; grid-template-rows: auto auto; align-content: start; margin: 0; }
body.ws26.app-home .ah-grid-three .work-card .work-media { aspect-ratio: 4 / 3 !important; height: auto !important; min-height: 0; }
body.ws26.app-home .ah-grid-three .work-caption { align-self: start; align-content: start; justify-content: flex-start; }
@media (max-width: 1100px) { body.ws26.app-home .ah-grid-three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { body.ws26.app-home .ah-grid-three { grid-template-columns: 1fr; } }

/* Account roles (like Discord roles) */
.ah-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ah-roles[hidden] { display: none; }
.ah-role { --role: #99aab5; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--role) 45%, transparent); background: color-mix(in srgb, var(--role) 12%, transparent); color: var(--ws-text); font-size: 12px; font-weight: 600; line-height: 1; }
.ah-role i { width: 10px; height: 10px; border-radius: 50%; background: var(--role); }
.ah-role[data-role="partner"] { --role: #3ba55d; }
.ah-role[data-role="admin"] { --role: #ed4245; }
