/* Sign-in and account pages */

/* ================= Sign in / create account ================= */
.auth-main { padding-block: clamp(28px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.auth-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 20px;
  max-width: 1040px; align-items: stretch;
}
.auth-grid.auth-grid-single { grid-template-columns: minmax(0, 520px); justify-content: center; }
.auth-card {
  display: grid; gap: 18px; align-content: start;
  padding: clamp(24px, 4vw, 44px); border-radius: 22px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bone-2); }
.seg-btn {
  height: 40px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--ink-3);
  transition: background-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.seg-btn:hover { color: var(--ink); }
.seg-btn[aria-selected="true"], .seg-btn[aria-checked="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line) inset; }
.auth-title { font-size: clamp(28px, 3.2vw, 36px); margin-top: 8px; }
.auth-sub { margin-top: -8px; font-size: 15.5px; color: var(--ink-2); }
.auth-step { display: grid; gap: 18px; }   /* one step of a multi-step card (password reset) */
.auth-form { display: grid; gap: 16px; margin-top: 2px; }
.auth-form .field { width: 100%; }
.field-wrap { display: grid; gap: 7px; min-width: 0; align-content: start; }
.field-wrap[hidden] { display: none; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-link { font-size: 13.5px; color: var(--ink-2); }
.pass-row { position: relative; }
.pass-row .field { padding-right: 76px; }
.pass-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  height: 36px; padding: 0 12px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.pass-toggle:hover { background: var(--bone); color: var(--ink); }
.auth-note { font-size: 13px; color: var(--ink-3); }
.auth-switch { font-size: 14.5px; color: var(--ink-3); text-align: center; }
.auth-switch a { color: var(--ink); font-weight: 600; }

.auth-aside {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; align-content: end; gap: 18px; min-height: 440px;
  padding: clamp(28px, 4vw, 44px); border-radius: 22px;
  background: radial-gradient(110% 80% at 80% 20%, #22262C 0%, var(--graphite) 60%); color: var(--on-dark);
}
.auth-aside-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 25%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 75% 25%, #000, transparent 75%);
}
.auth-cube { position: absolute; top: 34px; right: 34px; width: 150px; height: 150px; filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .45)); }
.auth-aside .eyebrow { color: var(--on-dark-2); }
.perk-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-dark); }
.perk-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line-dark); font-size: 15.5px; line-height: 1.45; }
.perk-k { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); }
.perk-k.soon { color: var(--on-dark-3); }

/* The membership pitch in the side panel (login.php): price, the 30-day count, the newest designs */
.auth-pitch { align-content: space-between; gap: 22px; min-height: 0; }   /* the photos sit at the foot when the card beside it is taller */
.pitch-head { display: grid; gap: 10px; }
.pitch-title { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.12; color: var(--on-dark); max-width: 18ch; }
.pitch-lead { font-size: 15px; line-height: 1.5; color: var(--on-dark-2); max-width: 46ch; }
.pitch-new { display: grid; gap: 10px; margin: 0; }
.pitch-new-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-dark); font-size: 13.5px; color: var(--on-dark-2); }
.pitch-count { display: inline-flex; align-items: center; gap: 8px; flex: none; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--on-dark); }
.pitch-count i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime-glow); }
.pitch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pitch-thumb { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--graphite-3); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.pitch-thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale .35s var(--ease); }
.pitch-thumb:hover img { scale: 1.06; }
.pitch-thumb:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.pitch-thumb:nth-child(n+10) { display: none; }   /* three rows, and a fourth beside the taller Create account form */
@media (min-width: 861px) {
  .auth-grid:has(.auth-card[data-mode="signup"]) .pitch-thumb:nth-child(n+10) { display: block; }
}
@media (prefers-reduced-motion: reduce) { .pitch-thumb img { transition: none; } }

/* ================= Account ================= */
.acct-main { padding-block: clamp(28px, 5vw, 56px) clamp(56px, 8vw, 96px); }
.acct-head { display: grid; gap: 10px; margin-bottom: 28px; }
.acct-title { font-size: clamp(30px, 4vw, 44px); }
.acct-since { font-size: 14.5px; color: var(--ink-3); }
.acct-since:empty { display: none; }
.acct-grid { display: grid; gap: 28px; align-items: start; }

/* the account's tabs: Downloads (the home), Filament, Settings */
.acct-tabs { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.acct-tabs-list { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.acct-tabs-list::-webkit-scrollbar { display: none; }
.acct-tab {
  flex: none; display: inline-flex; align-items: center; gap: 9px; padding: 12px 14px 13px; border-bottom: 2px solid transparent;
  font-size: 15.5px; font-weight: 600; color: var(--ink-3); text-decoration: none; white-space: nowrap;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.acct-tab .ico { width: 18px; height: 18px; }
.acct-tab:hover { color: var(--ink); }
.acct-tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.acct-tab:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.acct-signout { flex: none; margin-bottom: 7px; padding: 6px 10px; border-radius: 8px; font-size: 14.5px; font-weight: 500; color: var(--ink-3); }
.acct-signout:hover { background: var(--paper); color: var(--ink); }

.acct-panels { display: grid; gap: 20px; min-width: 0; max-width: 880px; }
.acct-banner { padding: 14px 18px; border-radius: 12px; font-weight: 500; background: var(--lime-tint); box-shadow: 0 0 0 1px rgba(75, 102, 0, .16) inset; }
.acct-card {
  display: grid; gap: 22px; padding: clamp(20px, 3vw, 32px); border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line);
}
.acct-card-title { font-size: 20px; font-stretch: var(--semi); font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }

.avatar-row { display: flex; align-items: center; gap: 20px; }
.avatar-lg {
  flex: none; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--ink); color: var(--lime); box-shadow: 0 0 0 1px var(--line);
  font-stretch: var(--wide); font-weight: 800; font-size: 28px; letter-spacing: -.02em;
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.avatar-actions { display: grid; gap: 8px; justify-items: start; }
.file-btn { cursor: pointer; }
.file-btn:focus-within { box-shadow: var(--focus); }
.text-btn { font-size: 14px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.text-btn:hover { color: var(--ink); }
.hint { font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.hint.is-ok { color: var(--lime-deep); font-weight: 600; }
.hint.is-err { color: #B42318; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-grid .field { width: 100%; }
.field-span { grid-column: 1 / -1; }
.field[readonly] { background: var(--bone); color: var(--ink-2); }
.prefix-field { position: relative; }
.prefix { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.prefix-field .field { width: 100%; padding-left: 34px; }

.fieldset { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.fieldset legend { padding: 0; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line);
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover { border-color: #C9C5B9; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.chip[aria-pressed="true"]::before { content: ""; width: 7px; height: 7px; margin-right: 8px; border-radius: 2px; background: var(--lime); }
.add-row { display: flex; gap: 10px; max-width: 420px; }
.add-row .field { height: 40px; font-size: 15px; }

.switch-row { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { position: relative; flex: none; width: 42px; height: 24px; margin-top: 1px; border-radius: 12px; background: #D6D3CA; transition: background-color .2s var(--ease); }
.switch::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.switch-row input:checked + .switch { background: var(--ink); }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: var(--lime); }
.switch-row input:focus-visible + .switch { box-shadow: var(--focus); }
.switch-row strong { display: block; font-weight: 600; }

.acct-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }

@media (max-width: 860px) {
  .auth-grid, .acct-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { min-height: 0; padding-top: 150px; }
  .auth-aside.auth-pitch { padding-top: clamp(28px, 4vw, 44px); }
  .auth-cube { width: 104px; height: 104px; top: 26px; right: 26px; }
}
@media (max-width: 560px) {
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .acct-tab { padding: 11px 10px 12px; font-size: 15px; }
  .acct-tab .ico { display: none; }
  .avatar-row { align-items: flex-start; }
  .add-row { max-width: none; }
}

/* ================= The library (/downloads): the account's home ================= */
.lib { display: grid; gap: 40px; min-width: 0; }
.lib-welcome { padding: 14px 18px; border-radius: 12px; font-weight: 500; background: var(--lime-tint); box-shadow: 0 0 0 1px rgba(75, 102, 0, .16) inset; }
.lib-welcome[hidden], .lib-sec[hidden], .lib-promo[hidden], .lib-done[hidden] { display: none; }
.lib-sec { display: grid; gap: 16px; }
.lib-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.lib-h { font-size: 22px; font-stretch: var(--semi); }
.lib-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.lib-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 0 0 1px var(--line); transition: translate .25s var(--ease), box-shadow .25s var(--ease); }
.lib-card:hover { translate: 0 -3px; box-shadow: 0 0 0 1px #D2CEC3, var(--shadow); }
.lib-img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--graphite); }
.lib-img img { width: 100%; height: 100%; object-fit: cover; transition: scale .5s var(--ease); }
.lib-card:hover .lib-img img { scale: 1.035; }
.lib-tag { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: var(--lime); color: #141519; font: 600 10.5px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.lib-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 14px 16px 16px; }
.lib-name { font-size: 17px; font-stretch: var(--semi); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: var(--ink); text-decoration: none; }
.lib-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.lib-meta { font: 500 11.5px/1.5 var(--font-mono); letter-spacing: .03em; color: var(--ink-3); }
.lib-meta { margin-bottom: 10px; }
.lib-body .btn { width: 100%; margin-top: auto; justify-content: center; }
.lib-body .dl-msg:empty { display: none; }
.lib-done { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 15px; color: var(--ink-2); }

/* the newest collection, in its season's theme (components/night.css for Halloween) */
.lib-promo {
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px 40px;
  padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl); background: var(--graphite); color: var(--on-dark);
}
.lib-promo.night-scope { background: linear-gradient(160deg, #07080C 0%, #0B0C12 60%, #10121A 100%); --moon-top: -56px; --moon-right: 26%; --moon-size: 190px; --stars-inset: 0 0 25% 45%; }
.lib-promo.night-scope .bat-1 { --y: 18%; }
.lib-promo.night-scope .bat-2 { --y: 34%; }
.lib-promo.night-scope .bat-3 { --y: 8%; }
.lib-promo > :not(.night) { position: relative; z-index: 1; }
.lib-promo-copy { display: grid; gap: 12px; justify-items: start; max-width: 540px; }
.lib-promo h2 { font-size: clamp(26px, 3vw, 38px); }
.lib-promo.night-scope h2 { padding-bottom: .36em; }
.lib-promo-copy p:not(.eyebrow) { font-size: 16.5px; line-height: 1.55; color: var(--ink-2); }
.lib-promo-copy .btn { margin-top: 4px; }
.lib-promo-wins { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 0 0 18px; list-style: none; }
.lib-promo-wins li { width: clamp(84px, 9vw, 116px); aspect-ratio: 9 / 10; overflow: hidden; border-radius: 50% 50% 8px 8px / 38% 38% 8px 8px; background: #12141B; box-shadow: 0 0 0 1px rgba(255, 236, 200, .18), 0 22px 34px -20px rgba(242, 116, 30, .55); }
.lib-promo-wins li:nth-child(2) { translate: 0 18px; }
.lib-promo-wins img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
  .lib-promo { grid-template-columns: minmax(0, 1fr); }
  .lib-promo.night-scope .night-moon { top: auto; bottom: 40px; right: -36px; width: 150px; }
  .lib-promo-wins li { width: calc((100% - 24px) / 3); max-width: 116px; }
}
@media (max-width: 560px) {
  .lib-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lib-body { padding: 10px 11px 12px; }
  .lib-name { font-size: 15px; }
  .lib-meta { font-size: 10.5px; letter-spacing: 0; }
  .lib-body .btn { --btn-h: 38px; padding: 0 10px; font-size: 14px; }
}
