/* iDock account pages. Colours and type follow the iSquad design system tokens. */
:root {
  --bg: #f3f0e8; --surface: #faf8f3; --surface-2: #ebe7dc; --line: #d8d3c5;
  --text: #1b1a22; --muted: #5a5866; --lime: #436c0d; --cyan: #0c6a84;
  --coral: #ad3a0a; --amber: #8f5b09; --on-accent: #faf8f3;
  --display: "Chakra Petch", system-ui, sans-serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e17; --surface: #161827; --surface-2: #1f2236; --line: #2a2e47;
    --text: #f1f2fa; --muted: #a3a7c4; --lime: #bef264; --cyan: #5ce1ff;
    --coral: #ff8a6b; --amber: #ffc857; --on-accent: #0d0e17;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/21px var(--sans); min-height: 100vh; }
p, h1, h2 { margin: 0; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--lime); border-radius: 6px; }
::selection { background: var(--lime); color: var(--on-accent); }

/* Top bar */
.top { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.wm { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 24px; }
.wm .i { color: var(--lime); }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top nav a:not(.btn) { color: var(--muted); font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.top nav a.current:not(.btn) { color: var(--lime); }
.top nav .btn { min-height: 38px; padding: 6px 14px; border-radius: 10px; box-shadow: 0 3px 0 color-mix(in srgb, var(--lime) 45%, #000); margin-bottom: 3px; }
.top form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; min-height: 44px; }
.linkbtn:hover { text-decoration: underline; }

/* Page shell */
main { max-width: 720px; margin: 0 auto; padding: 24px 16px 56px; display: flex; flex-direction: column; gap: 16px; }
main.narrow { max-width: 440px; }
body.embed { background: var(--surface); }
body.embed main { padding: 20px 16px 28px; }
.embedbrand { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.tight { display: flex; flex-direction: column; gap: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }

.h1 { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 30px; text-wrap: balance; }
.h2 { font-weight: 600; font-size: 18px; line-height: 24px; }
.sub, .muted { color: var(--muted); }
.cap { font-size: 13px; line-height: 18px; color: var(--muted); }
.eyebrow { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.strong { font-weight: 600; color: var(--text); }
.num { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; min-height: 44px; }

/* Forms */
form.stack { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); padding: 0; }
.field legend { margin-bottom: 6px; }
.input {
  width: 100%; min-height: 48px; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit;
}
.input::placeholder { color: var(--muted); opacity: .7; }
.input:focus-visible { box-shadow: 0 0 0 2px var(--lime); border-radius: 12px; }
.input.code { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 28px; letter-spacing: .3em; text-align: center; min-height: 60px; }
.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--lime); flex: none; margin: 0; }

/* Buttons: the arcade key */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px;
  border: 0; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important;
  background: var(--lime); color: var(--on-accent); margin-bottom: 4px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--lime) 45%, #000);
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); transition-duration: .06s; }
.btn.block { display: flex; width: 100%; }
.btn.secondary { background: var(--surface-2); color: var(--text); box-shadow: 0 4px 0 var(--line); }
.btn.danger { background: var(--coral); box-shadow: 0 4px 0 color-mix(in srgb, var(--coral) 45%, #000); }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; transform: none !important; } }
.linkrow { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: 13px; line-height: 18px; color: var(--muted); min-height: 44px; align-items: center; text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 16px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
body.embed .card.plain { border: 0; padding: 0; background: none; }
.card.info { border-color: var(--cyan); }
.card.success { border-color: var(--lime); }
.card.danger { border-color: var(--coral); }
.card.warn { border-color: var(--amber); }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-height: 56px; color: var(--text); flex-wrap: wrap; }
a.item:hover { text-decoration: none; }
a.item:hover .strong { text-decoration: underline; }
.item:first-child { border-top: 0; padding-top: 0; }
.item:last-child { padding-bottom: 0; }
.item .meta { flex: 1; min-width: 150px; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.item form { margin: 0; }
.ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--muted); }
.ico.lime { color: var(--lime); } .ico.coral { color: var(--coral); } .ico.cyan { color: var(--cyan); } .ico.amber { color: var(--amber); }
.appicon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); flex: none; display: block; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; font-weight: 700; }
.chev { color: var(--muted); flex: none; }
.mark { width: 72px; height: 72px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; }

/* Status */
.tag { display: inline-flex; align-items: center; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); color: var(--muted); white-space: nowrap; align-self: flex-start; }
.item > .tag { align-self: center; }
.tag.on { color: var(--lime); } .tag.off { color: var(--amber); } .tag.alert { color: var(--coral); } .tag.info { color: var(--cyan); }
.alert { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 18px; background: var(--surface-2); }
.alert.error { color: var(--coral); border-color: var(--coral); }
.alert.ok { color: var(--lime); border-color: var(--lime); }
.bigcode { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 40px; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--lime); text-align: center; padding: 14px; background: var(--surface-2); border-radius: 14px; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 24px; letter-spacing: .04em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { align-self: center; width: 196px; height: 196px; border-radius: 14px; background: #fff; padding: 10px; }
.qr svg { display: block; width: 100%; height: 100%; }
.keyrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.keyrow .num { flex: 1; font-size: 16px; line-height: 24px; letter-spacing: .04em; overflow-wrap: anywhere; }

/* ---- Landing page ---- */
/* Background as on the iSquad home page: plain ground, a soft cyan glow top right and a lime glow
   bottom left, and the animated pixel dither pinned behind the content. No grid. */
body.landing {
  background-color: var(--bg);
  background-image:
    radial-gradient(640px 420px at 88% 18%, color-mix(in srgb, var(--cyan) 16%, transparent), transparent 62%),
    radial-gradient(560px 420px at 8% 96%, color-mix(in srgb, var(--lime) 12%, transparent), transparent 62%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}
.pixelglow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  filter: hue-rotate(var(--glow-hue, 0deg));
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 10%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 10%, transparent 100%);
}
.pixelglow canvas { width: 100%; height: 100%; display: block; }
body.landing .top { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(8px); }
main.wide { max-width: 1080px; gap: 88px; padding: 56px 20px 40px; }
main.wide h3 { margin: 0; }

.display { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 8.5vw, 64px); line-height: 1.03; letter-spacing: -.01em; text-wrap: balance; }
.display .lime, .lime { color: var(--lime); }
.section { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5.2vw, 44px); line-height: 1.05; text-wrap: balance; }
.lead { font-size: 16px; line-height: 25px; color: var(--muted); max-width: 54ch; }

.lhero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.lhero-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.lhero-copy .row { gap: 12px; margin-top: 4px; }

/* The account pass: apps dock into a lit rail. */
.pass {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}
.pass-head { display: flex; align-items: center; gap: 12px; padding-bottom: 4px; }
.pass-head .logo { width: 48px; height: 48px; border-radius: 12px; }
.pass-head .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pass-name { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 28px; overflow-wrap: anywhere; }
.rail { height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--lime), color-mix(in srgb, var(--lime) 20%, transparent)); }
.slot { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.slot .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.slot .tag { align-self: center; background: var(--surface); }
.slot.empty { background: none; border: 1px dashed var(--line); }
.ghost { display: grid !important; place-items: center; border: 1px dashed var(--muted) !important; background: none; color: var(--muted); font: 700 20px/1 var(--display); }

.lsection { display: flex; flex-direction: column; gap: 28px; }
.lhead { display: flex; flex-direction: column; gap: 10px; }

.appgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.appcard { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.appcard .sub { flex: 1; }
.appcard.soon { background: none; border-style: dashed; }
.applogo { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line); display: block; }
.apptitle { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 30px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px 24px; }
.stepitem { display: flex; flex-direction: column; gap: 14px; }
/* HUD cut-corner frame: top-right and bottom-left corners cut at 45 degrees. */
.stepbadge {
  width: 48px; height: 48px; display: grid; place-items: center; background: var(--lime); color: var(--on-accent);
  font: 700 22px/1 var(--display); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.guards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 28px 32px; }
.guard { display: flex; gap: 14px; align-items: flex-start; }
.guard .tight { min-width: 0; }

.closer {
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
}
.closer .row { gap: 12px; margin-top: 6px; }
.lfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  main.wide { gap: 64px; padding-top: 32px; }
  .lhero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
