:root {
  --paper: #f2eee4;
  --ink: #0b0b0b;
  --pink: #ff2e88;
  --pink-hot: #ff5aa6;
  --pink-wash: #ffd7e8;
  --muted: #4b4740;
  --green: #00875a;
  --amber: #a86400;
  --rule: #0b0b0b;
  --display: 'Archivo Black', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --shadow: 8px 8px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
}

:root[data-theme="dark"] {
  --paper: #0b0b0b;
  --ink: #f4efe6;
  --pink: #ff4fa3;
  --pink-hot: #ff7dbf;
  --pink-wash: #2a0c1a;
  --muted: #b8b1a5;
  --green: #35d08a;
  --amber: #ffb347;
  --rule: #f4efe6;
  --shadow: 8px 8px 0 var(--pink);
  --shadow-sm: 4px 4px 0 var(--pink);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0b0b;
    --ink: #f4efe6;
    --pink: #ff4fa3;
    --pink-hot: #ff7dbf;
    --pink-wash: #2a0c1a;
    --muted: #b8b1a5;
    --green: #35d08a;
    --amber: #ffb347;
    --rule: #f4efe6;
    --shadow: 8px 8px 0 var(--pink);
    --shadow-sm: 4px 4px 0 var(--pink);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 11, 11, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 11, 11, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
}
:root[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(255, 79, 163, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 79, 163, 0.07) 1px, transparent 1px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before {
    background-image:
      linear-gradient(rgba(255, 79, 163, 0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 79, 163, 0.07) 1px, transparent 1px);
  }
}

::selection { background: var(--pink); color: #0b0b0b; }
a { color: inherit; }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--pink); z-index: 95; transform-origin: 0 50%; }

.cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; display: none; mix-blend-mode: difference; }
body.has-cursor .cursor { display: block; }
body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor .app { cursor: none; }
body.has-cursor input, body.has-cursor textarea { cursor: text; }

.cursor-dot, .cursor-ring { position: absolute; transform: translate(-50%, -50%); }
.cursor-dot { width: 8px; height: 8px; background: #fff; }
.cursor-ring {
  width: 30px; height: 30px;
  border: 2px solid #fff;
  transition: width 0.18s var(--ease), height 0.18s var(--ease), background 0.18s var(--ease);
}
.cursor.is-hover .cursor-ring { width: 52px; height: 52px; background: rgba(255, 255, 255, 0.18); }
.cursor.is-down .cursor-ring { width: 18px; height: 18px; }

.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  padding: 0 28px; height: 68px;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 13px; letter-spacing: 0.01em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
.mark {
  width: 16px; height: 16px; background: var(--pink);
  border: 3px solid var(--ink);
  transition: transform 0.18s var(--ease);
}
.brand:hover .mark { transform: translate(-2px, -2px); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search { position: relative; width: 190px; margin-right: 4px; }
.search input {
  width: 100%; height: 38px; padding: 0 26px 0 10px;
  border: 3px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  outline: none; -webkit-appearance: none; appearance: none;
  transition: background 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { background: var(--pink); color: #0b0b0b; box-shadow: 4px 4px 0 var(--ink); }
.search input:focus::placeholder { color: rgba(11, 11, 11, 0.55); }
.search kbd {
  position: absolute; right: 7px; top: 10px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--ink);
  pointer-events: none;
}
.search input:focus + kbd { color: #0b0b0b; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s var(--ease), box-shadow 0.1s var(--ease), background 0.1s var(--ease), color 0.1s var(--ease);
}
.icon-btn:hover { background: var(--pink); color: #0b0b0b; }
.icon-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.icon-btn svg { display: block; }
#theme-toggle .icon-light, #theme-toggle .icon-dark { display: none; }
:root[data-theme="light"] #theme-toggle .icon-auto { display: none; }
:root[data-theme="light"] #theme-toggle .icon-light { display: block; }
:root[data-theme="dark"] #theme-toggle .icon-auto { display: none; }
:root[data-theme="dark"] #theme-toggle .icon-dark { display: block; }

.auth { display: flex; align-items: center; gap: 12px; margin-left: 4px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.auth-link {
  padding: 2px 0; border: 0; background: transparent; color: var(--ink);
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
  border-bottom: 3px solid transparent; transition: border-color 0.1s var(--ease), color 0.1s var(--ease);
}
.auth-link:hover { border-bottom-color: var(--pink); }
.who { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.live { width: 9px; height: 9px; background: var(--pink); border: 2px solid var(--ink); display: inline-block; }

main { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 28px; }

.hero { position: relative; padding-top: 70px; }

.kicker {
  display: inline-block; margin: 0 0 26px;
  padding: 4px 10px; background: var(--pink); color: #0b0b0b;
  border: 3px solid var(--ink); box-shadow: var(--shadow-sm);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.kicker .sep { opacity: 0.55; padding: 0 4px; }

.display {
  margin: 0;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3rem, 10.8vw, 8.8rem);
  line-height: 0.82;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.display .line { display: block; overflow: hidden; padding-bottom: 0.03em; }
.display .line-inner { display: block; transform: translateY(112%); animation: line-rise 0.7s steps(6, end) forwards; }
.display .line:nth-child(1) .line-inner { animation-delay: 0.05s; }
.display .line:nth-child(2) .line-inner { animation-delay: 0.16s; }
.display .line:nth-child(3) .line-inner { animation-delay: 0.27s; }
.display em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 3px var(--pink);
  text-shadow: 6px 6px 0 var(--ink);
}
@keyframes line-rise { to { transform: translateY(0); } }

.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px; align-items: end;
  margin-top: 34px;
}
.lede { margin: 0; max-width: 44ch; color: var(--muted); font-size: 14px; line-height: 1.55; }

.stats { display: flex; gap: 12px; }
.stat {
  min-width: 104px; padding: 10px 12px;
  border: 3px solid var(--ink); background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.stat-n { display: block; font-family: var(--display); font-size: 30px; line-height: 1; color: var(--ink); }
.stat:first-child .stat-n { color: var(--pink); }
.stat-l { display: block; margin-top: 6px; font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.stamp {
  position: absolute; right: 8px; top: 96px;
  width: 122px; height: 122px;
  display: grid; place-items: center;
  border: 3px solid var(--ink); background: var(--pink); color: #0b0b0b;
  font-family: var(--display); font-size: 15px; line-height: 1.1; text-align: center;
  text-transform: uppercase; transform: rotate(8deg);
  box-shadow: 6px 6px 0 var(--ink);
}
.stamp span { display: block; }

.ticker {
  position: relative; z-index: 1;
  margin-top: 54px;
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  background: var(--ink); color: var(--pink); overflow: hidden;
}
.ticker-track {
  display: flex; width: max-content;
  animation: ticker 22s linear infinite;
}
.ticker-track span {
  display: block; padding: 9px 0;
  font-family: var(--display); font-size: 19px; letter-spacing: 0.02em; text-transform: uppercase;
  white-space: nowrap;
}
.ticker-track span::after { content: " ✳ "; color: var(--paper); padding: 0 18px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

.group { margin-top: 62px; }

.group-head {
  display: flex; align-items: center; gap: 14px;
  height: 44px; padding: 0 12px;
  background: var(--ink); color: var(--paper);
  border: 3px solid var(--ink);
}
.num { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--pink); }
.group-head h2 {
  margin: 0; font-family: var(--display); font-size: 12px; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.rule { flex: 1; height: 2px; background: color-mix(in srgb, var(--paper) 30%, transparent); }
.n { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--pink); }

.apps {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 20px;
}

.app {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 0; padding: 15px;
  border: 3px solid var(--ink); background: var(--paper);
  box-shadow: var(--shadow);
  text-decoration: none; color: inherit;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.3s steps(4, end), transform 0.3s steps(4, end), box-shadow 0.12s var(--ease), background 0.12s var(--ease);
  transition-delay: calc(var(--i, 0) * 25ms);
}
.app.in { opacity: 1; transform: translateY(0); }
.app:hover {
  transform: translate(-2px, -2px);
  box-shadow: 12px 12px 0 var(--pink);
  background: var(--paper);
}
.app:active { transform: translate(5px, 5px); box-shadow: 2px 2px 0 var(--ink); }

.tile-icon {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: var(--tile, #3d3a6b);
  border: 3px solid var(--ink);
  color: #f8f4ea;
  transition: transform 0.12s var(--ease);
  will-change: transform;
}
.app:hover .tile-icon { transform: translate(calc(var(--mx, 0) * 1px), calc(var(--my, 0) * 1px)); }

.tile-name {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-size: 12.5px; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.005em;
}
.arrow { display: none; }

.tile-desc {
  margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.tile-meta {
  margin-top: 10px; display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.dot { width: 8px; height: 8px; border: 2px solid var(--ink); background: transparent; display: inline-block; }
.dot.ok { background: var(--pink); }
.dot.off { background: var(--rule); }

.app:focus-visible { outline: none; box-shadow: 12px 12px 0 var(--pink); }
.app:focus-visible .tile-icon { outline: 3px solid var(--pink); outline-offset: 2px; }

body.view-list .apps { display: block; margin-top: 18px; }
body.view-list .app {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "icon name meta" "icon desc meta";
  align-items: center; gap: 0 16px;
  padding: 12px 14px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  opacity: 1; transform: none;
}
body.view-list .tile-icon { grid-area: icon; width: 44px; height: 44px; border-width: 2px; }
body.view-list .tile-name { grid-area: name; margin: 0; font-size: 13px; }
body.view-list .tile-desc { grid-area: desc; margin: 3px 0 0; max-width: none; -webkit-line-clamp: 1; }
body.view-list .tile-meta { grid-area: meta; margin: 0; }
body.view-list .app:hover { background: var(--pink); color: #0b0b0b; box-shadow: var(--shadow-sm); transform: none; }
body.view-list .app:hover .tile-desc, body.view-list .app:hover .tile-meta { color: rgba(11, 11, 11, 0.75); }
body.view-list .app:hover .dot { border-color: #0b0b0b; }
body.view-list .app:hover .tile-icon { transform: none; }

.locked {
  display: flex; align-items: center; gap: 18px;
  margin-top: 20px; padding: 18px;
  border: 3px dashed var(--ink);
  background: var(--pink-wash);
  box-shadow: var(--shadow-sm);
}
.locked-bars { display: flex; flex-direction: column; gap: 5px; width: 64px; flex: 0 0 auto; }
.locked-bars i { display: block; height: 8px; background: var(--pink); border: 2px solid var(--ink); }
.locked-bars i:nth-child(2) { width: 76%; }
.locked-bars i:nth-child(3) { width: 52%; }
.locked-copy { display: flex; flex-direction: column; gap: 2px; }
.locked-copy strong { font-family: var(--display); font-size: 12px; text-transform: uppercase; }
.locked-copy span { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.locked .btn { margin-left: auto; }

.rows { margin-top: 16px; }
.tool {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center; gap: 14px;
  padding: 13px 12px; margin-bottom: -3px;
  border: 3px solid var(--ink); background: var(--paper);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s steps(4, end), transform 0.3s steps(4, end), background 0.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 25ms);
}
.tool.in { opacity: 1; transform: none; }
.tool:hover { background: var(--pink); color: #0b0b0b; }
.tool:hover .tool-desc, .tool:hover .tool-where { color: rgba(11, 11, 11, 0.72); }
.tool-glyph {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 3px solid var(--ink); background: var(--ink); color: var(--pink);
}
.tool:hover .tool-glyph { background: #0b0b0b; }
.tool-name { font-family: var(--display); font-size: 12px; text-transform: uppercase; letter-spacing: 0.01em; }
.tool-desc { margin-top: 2px; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.tool-where { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.empty { margin: 50px 0 0; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.btn {
  height: 40px; padding: 0 16px;
  border: 3px solid var(--ink); border-radius: 0;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  transition: transform 0.1s var(--ease), box-shadow 0.1s var(--ease), background 0.1s var(--ease), color 0.1s var(--ease);
  white-space: nowrap;
}
.btn.solid { background: var(--pink); color: #0b0b0b; box-shadow: var(--shadow-sm); }
.btn.solid:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn.solid:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.text { background: transparent; color: var(--muted); border-color: transparent; }
.btn.text:hover { color: var(--ink); border-color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: progress; }

footer {
  position: relative; z-index: 1;
  margin-top: 90px;
  border-top: 3px solid var(--ink);
  background: var(--ink); color: var(--paper);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.footer-left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sep { color: var(--pink); }
.to-top { text-decoration: none; color: var(--pink); }
.to-top:hover { color: var(--paper); }

dialog {
  width: min(420px, calc(100vw - 24px));
  padding: 0; border: 4px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  box-shadow: 14px 14px 0 var(--pink);
}
dialog::backdrop { background: rgba(11, 11, 11, 0.6); }
dialog form { padding: 22px; }
.d-head { display: flex; align-items: flex-start; justify-content: space-between; }
.d-kicker { margin: 0; padding: 3px 8px; background: var(--pink); color: #0b0b0b; border: 2px solid var(--ink); font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.d-head h2, dialog h2 {
  margin: 12px 0 0; font-family: var(--display); font-size: 34px; font-weight: 400;
  line-height: 0.95; text-transform: uppercase; letter-spacing: -0.01em;
}
.d-sub { margin: 8px 0 22px; font-size: 12.5px; color: var(--muted); }
.close {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer;
}
.close:hover { background: var(--pink); }
.field { display: block; }
.field span { display: block; margin-bottom: 5px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input {
  width: 100%; height: 44px; padding: 0 10px;
  border: 3px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 14px; outline: none;
  transition: background 0.1s var(--ease), color 0.1s var(--ease);
}
.field input:focus { background: var(--pink); color: #0b0b0b; }
.error { margin: 14px 0 0; padding: 9px 10px; border: 3px solid #b3261e; background: var(--paper); color: #b3261e; font-family: var(--mono); font-size: 11px; }
.d-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.4s steps(4, end), transform 0.4s steps(4, end); }
[data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .stamp { display: none; }
}

@media (max-width: 820px) {
  .top { padding: 10px 16px; height: auto; min-height: 64px; flex-wrap: wrap; gap: 10px; }
  .top-actions { width: 100%; margin-left: 0; }
  .search { flex: 1; width: auto; margin-right: 0; }
  main { padding: 0 16px; }
  .hero { padding-top: 44px; }
  .display { font-size: clamp(2.6rem, 14vw, 4.6rem); }
  .display em { -webkit-text-stroke-width: 2px; text-shadow: 3px 3px 0 var(--ink); }
  .hero-foot { grid-template-columns: 1fr; gap: 24px; }
  .stats { flex-wrap: wrap; }
  .stat { min-width: 92px; }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .app { padding: 12px; box-shadow: 5px 5px 0 var(--ink); }
  .app:hover { box-shadow: 6px 6px 0 var(--pink); }
  .tile-icon { width: 52px; height: 52px; border-width: 2px; }
  .tile-name { font-size: 11px; }
  .tile-desc { font-size: 11px; }
  .group { margin-top: 48px; }
  .locked { flex-wrap: wrap; }
  .locked .btn { margin-left: 0; width: 100%; }
  .tool { grid-template-columns: 38px minmax(0, 1fr); }
  .tool-where { display: none; }
  .footer-inner { padding: 14px 16px; flex-direction: column; align-items: flex-start; }
  body.view-list .app { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "icon name" "icon desc"; }
  body.view-list .tile-meta { display: none; }
}

@media (pointer: coarse) {
  body.has-cursor .cursor { display: none; }
  body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor .app { cursor: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .display .line-inner { transform: none; }
  [data-reveal], .app, .tool { opacity: 1 !important; transform: none !important; }
  .ticker-track { animation: none; }
  body.has-cursor .cursor { display: none; }
}
