/* thotsplat.com — the APPS panel. Built on style.css's .panel chrome; only
   what differs from PROJECTS/ABOUT is here. See apps.js. */

/* the nav button: the same look as .navlink, under its own class because
   app.js wires every .navlink to the PROJECTS/ABOUT panel */
.appslink {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 2px;
  font: inherit;
  font-size: clamp(10px, 1.35vw, 13px);
  letter-spacing: 0.16em;
  color: var(--text);
  cursor: pointer;
  text-shadow: 0 0 14px rgba(0, 16, 26, 0.95);
  border-bottom: 1px solid transparent;
}
.appslink[hidden] { display: none; }
.appslink:hover,
.appslink:focus-visible,
.appslink[aria-expanded="true"] { color: var(--lime); border-bottom-color: var(--rule); }

/* lighter than PROJECTS, and no blur: the war keeps going behind the cards
   and should be seen to */
.apps-panel {
  background: rgba(0, 8, 14, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.apps-box {
  width: min(720px, 100%);
  max-height: min(84vh, 84dvh);
  /* body is touch-action:none so the canvas owns gestures; the box is its
     own scroll container and needs to scroll on a phone */
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.app-group + .app-group { margin-top: 18px; }
.app-group h3 {
  margin: 0 0 9px;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 64px;
  padding: 13px 14px;
  color: var(--text);
  text-decoration: none;
  background: rgba(139, 255, 74, 0.035);
  border: 1px solid rgba(139, 255, 74, 0.18);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.app-card:hover,
.app-card:focus-visible {
  border-color: var(--chassis);
  background: rgba(139, 255, 74, 0.08);
  outline: none;
}
.app-card:hover .app-name,
.app-card:focus-visible .app-name { color: var(--lime); }
.app-card:active { background: rgba(139, 255, 74, 0.14); }

.app-icon {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
  color: var(--lime);
  font-family: var(--mono), 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
}
img.app-icon { object-fit: contain; }

.app-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.app-name {
  font-size: 13px;
  letter-spacing: 0.13em;
  color: #fff;
}
.app-login {
  margin-left: 6px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
  border: 1px solid rgba(111, 141, 134, 0.5);
  padding: 1px 4px;
  vertical-align: 2px;
}
.app-desc {
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--muted);
}

@media (max-width: 620px) {
  .apps-panel { padding: 12px; }
  .apps-box { padding: 22px 16px 18px; max-height: min(88vh, 88dvh); }
  .app-grid { grid-template-columns: 1fr; gap: 8px; }
  .app-card { min-height: 56px; padding: 12px; }
}

/* THREE NAV ITEMS DO NOT FIT BESIDE THE MASTHEAD ON A PHONE. In a row, APPS
   ran 7px off a 390px screen and into the masthead at 360. Below 480px the
   nav stacks into a short right-aligned column in the empty sky under it. */
@media (max-width: 480px) {
  .nav { flex-direction: column; align-items: flex-end; gap: 2px; padding-top: 2px; }
  .nav .navlink, .nav .appslink { padding: 3px 2px; }
}
