/* Vault presentation; shared controls and entry layout live in styles.css. */
body { --background: #16191e; --surface: #242930; --text: #f2f5f7; --muted: #adb7c3; --blue: #1688ff; background: var(--background); font-family: Arial, sans-serif; }
.catalogue h1, .catalogue h3, .detail-essentials dd { font-family: "Space Grotesk", system-ui, sans-serif; }
.catalogue .app-open-indicator { float: right; margin-left: 8px; color: #8dbbf1; opacity: 0; }
.catalogue .app:hover .app-open-indicator, .catalogue .app:focus-visible .app-open-indicator { opacity: 1; }

.catalogue .grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 18px;
}



.catalogue .app {
  display: flex;
  min-width: 0;
  flex-direction: column;
  height: 100%;
  border-radius: 11px;
  transition: border-color .15s, background-color .15s;
}

.catalogue .app:hover {
  background: #192534;
  transform: none;
}

.catalogue .app-art {
  height: 150px;
  flex: none;
  background: #19283a;
  border-bottom-color: #243347;
}

.catalogue .app-art img {
  object-fit: contain;
}

.catalogue .app-art img.icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.catalogue .app-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 15px 17px 14px;
}

.catalogue .app-body h3 {
  font-size: 18px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Keep the catalogue named for assistive technology without a visible header row. */
.catalogue #catalogue-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.catalogue .category-controls {
  margin-top: 0;
}

.catalogue .app-body p {
  display: block;
  margin: 6px 0 16px;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.catalogue .meta {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.4;
}

.catalogue .app:focus-visible {
  position: relative;
  z-index: 1;
  outline-width: 4px;
  outline-offset: 3px;
}

/* The landscape TV layout retains the complete card content and lets columns fill the width. */
@media (min-width: 801px) and (max-height: 720px),
       (min-width: 1600px) and (max-height: 900px) and (min-aspect-ratio: 2/1),
       (min-width: 801px) and (hover: none) and (pointer: coarse) and (min-aspect-ratio: 8/5) {
  .catalogue .category-controls {
    margin: 0 0 18px;
  }

  .catalogue .categories {
    margin: 0;
  }

  .catalogue .grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 18px;
  }

  .catalogue .app-art {
    height: 150px;
  }

  .catalogue .app-body {
    padding: 15px 17px 14px;
  }

  .catalogue .app-body h3 {
    font-size: 18px;
  }

}

@media (max-width: 600px) {
  .catalogue .category-controls {
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
  }

  .catalogue .categories {
    gap: 4px;
  }

  .catalogue .categories button {
    min-height: 42px;
    padding: 8px 11px;
    font-size: 13px;
  }

  .catalogue .category-controls #count {
    padding-top: 10px;
    font-size: 12px;
  }

  .catalogue .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .catalogue .app {
    min-height: 112px;
    flex-direction: row;
  }

  .catalogue .app-art {
    width: 88px;
    height: auto;
    min-height: 112px;
    align-self: stretch;
    border-right: 1px solid #243347;
    border-bottom: 0;
  }

  .catalogue .app-art img.icon {
    width: 58px;
    height: 58px;
  }

  .catalogue .app-body {
    padding: 12px 12px 11px;
  }

  .catalogue .app-body h3 {
    font-size: 16px;
    line-height: 1.35;
  }

  .catalogue .app-body p {
    margin: 4px 0 9px;
    font-size: 12px;
    line-height: 1.45;
  }

  .catalogue .meta {
    gap: 8px;
    font-size: 11px;
  }

}

/* Premium member catalogue: give the artwork its own frame and let app details breathe. */
.bar {
  background: linear-gradient(110deg, #202630 0%, #1a1e25 60%, #16191e 100%);
  box-shadow: inset 0 -1px #53667c30, 0 8px 25px #00000016;
}

.bar #private-label {
  color: #c1cbd7;
  letter-spacing: .02em;
}

.bar #leave {
  border: 1px solid #3b4654;
  border-radius: 7px;
  padding: 8px 14px;
  color: #e1e7ef;
  transition: border-color .16s, background-color .16s;
}

.bar #leave:hover {
  background: #252d37;
  border-color: #62758c;
}

.catalogue .category-controls {
  margin-bottom: 22px;
}

.catalogue .categories {
  gap: 5px;
}

.catalogue .categories button {
  position: relative;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background-color .16s, color .16s;
}

.catalogue .categories button:hover:not([aria-pressed="true"]) {
  background: #20252d;
  color: #e2e8f0;
}

.catalogue .categories button[aria-pressed="true"] {
  background: #29313b;
  border-color: #36414e;
  color: #f2f5f7;
}

.catalogue .categories button[aria-pressed="true"]::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 2px;
  background: var(--blue);
  content: "";
}

.catalogue .grid {
  gap: 26px 24px;
}

.catalogue .app {
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 10px;
  transition: background-color .16s;
}

.catalogue .app:hover {
  background: transparent;
  transform: none;
}

.catalogue .app-art {
  position: relative;
  height: auto;
  aspect-ratio: 1.72;
  overflow: hidden;
  border: 1px solid #ffffff12;
  border-radius: 9px;
  background: var(--art-background, #242930);
  box-shadow: inset 0 1px 0 #d6e8ff21, inset 0 -25px 35px #00000019, 0 9px 22px -14px #000b;
  transition: box-shadow .17s, border-color .17s;
}

.catalogue .app-art::after {
  position: absolute;
  inset: 0;
  border: 1px solid #b6cbe523;
  border-top-color: #dae9ff36;
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.catalogue .app-art img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.catalogue .app-art img.icon {
  width: 60%;
  height: 60%;
}

.catalogue .app:is(:hover, :focus-visible) .app-art {
  border-color: #559de482;
  box-shadow: inset 3px 0 0 #1688ff, inset 0 1px 0 #b8ddff57, 0 0 0 1px #559de482, 0 10px 25px -13px #000b;
}

.catalogue .app-body {
  padding: 14px 2px 8px;
}

.catalogue .app-body h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.025em;
}

.catalogue .app-body p {
  display: block;
  min-height: 39px;
  margin: 7px 0 0;
  color: #adb7c3;
  font-size: 13px;
  line-height: 1.5;
}

.catalogue .meta {
  margin-top: 13px;
  color: #aeb8c4;
  font-size: 12px;
}

.catalogue .meta .tag {
  color: #d5dfe9;
}

.catalogue .app:focus-visible {
  outline: 3px solid #78b9ff;
  outline-offset: 5px;
}

/* A focused detail page keeps the download action beside the art on wide screens. */
.details {
  max-width: 1320px;
  padding: 26px 30px 30px;
  background: linear-gradient(145deg, #20252d, #191d23 62%);
  border-color: #39414c;
  box-shadow: 0 18px 50px #0003;
}

.details .detail-heading {
  justify-content: flex-start;
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ffffff12;
}

.details #close-details {
  border: 0;
  background: transparent;
  color: #bdc8d4;
  font-size: 14px;
}

.details #close-details:hover {
  color: #fff;
}

.detail-content {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
}

.detail-art {
  display: grid;
  min-width: 0;
  min-height: 280px;
  aspect-ratio: 1.55;
  place-items: center;
  overflow: hidden;
  border: 1px solid #ffffff16;
  border-radius: 13px;
  background: var(--art-background, #242930);
  box-shadow: inset 0 1px 0 #d6e8ff21, inset 0 -35px 55px #00000020, 0 16px 34px -22px #000c;
}

.detail-banner {
  width: 88%;
  max-width: 100%;
  max-height: 330px;
  margin: 0;
  object-fit: contain;
}

.detail-summary {
  min-width: 0;
}

.detail-category {
  margin-bottom: 12px;
  color: #a8cfff;
  font-size: 13px;
  letter-spacing: .04em;
}

.details #app-title {
  margin: 0;
  text-align: left;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.details #description {
  max-width: 54ch;
  margin-top: 17px;
  color: #adb7c3;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.detail-essentials {
  display: flex;
  gap: clamp(24px, 4vw, 50px);
  margin: 24px 0 0;
}
.detail-summary .tested-devices { margin-top: 22px; }
.detail-technical-content .detail-facts { grid-column: 1 / -1; }
.detail-art .detail-banner.icon { max-width: 55%; max-height: 65%; }

.detail-essentials>div {
  min-width: 0;
}

.detail-essentials dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail-essentials dd {
  color: #f2f5f7;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 500;
  text-align: left;
  overflow-wrap: anywhere;
}

.detail-summary .detail-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 25px;
  padding: 0;
  border: 0;
}

.detail-summary .detail-actions>.small {
  flex: 1;
  margin: 0;
  line-height: 1.5;
}

.detail-summary .detail-actions #download {
  width: auto;
  min-width: 210px;
  min-height: 52px;
  flex: none;
}

.detail-summary .download-status {
  margin-top: 10px;
}

.detail-technical {
  margin-top: 28px;
  border-top: 1px solid #ffffff16;
  border-bottom: 1px solid #ffffff16;
}

.detail-technical>summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  color: #dce5ef;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  list-style: none;
}

.detail-technical>summary::-webkit-details-marker {
  display: none;
}

.detail-technical>summary::after {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 1.5px solid #aeb8c4;
  border-bottom: 1.5px solid #aeb8c4;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s;
}

.detail-technical[open]>summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.detail-technical>summary:focus-visible {
  outline: 3px solid #78b9ff;
  outline-offset: 3px;
}

.detail-technical-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
  padding: 4px 0 22px;
}

.detail-technical .tested-devices h3 {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

.detail-facts dl {
  width: 100%;
  max-width: none;
  margin: 0;
  grid-template-columns: minmax(100px, max-content) minmax(0, 1fr);
  column-gap: 18px;
}

.detail-facts dd {
  text-align: right;
}

.version-release-notes {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid #ffffff12;
  border-radius: 9px;
  background: #ffffff04;
}

.version-release-notes h3 {
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 600;
}

.version-release-notes p {
  max-height: 220px;
  overflow: auto;
  color: #adb7c3;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (min-width: 801px) and (max-height: 720px),
       (min-width: 1600px) and (max-height: 900px) and (min-aspect-ratio: 2/1),
       (min-width: 801px) and (hover: none) and (pointer: coarse) and (min-aspect-ratio: 8/5) {
  .catalogue .grid {
    gap: 18px 20px;
  }

  .catalogue .app-art {
    aspect-ratio: 1.8;
  }

  .catalogue .app-body {
    padding-top: 10px;
  }

  .catalogue .app-body p {
    min-height: 0;
    max-height: 2.8em;
    overflow: hidden;
  }

  .details {
    padding: 16px 20px 20px;
  }

  .details .detail-heading {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .detail-content {
    gap: 24px;
  }

  .detail-art {
    min-height: 0;
    max-height: 220px;
  }

  .detail-banner {
    max-height: 190px;
  }

  .details #description {
    margin-top: 11px;
    font-size: 14px;
    line-height: 1.5;
  }

  .detail-essentials {
    margin-top: 14px;
  }

  .detail-essentials dd {
    font-size: 17px;
  }

  .detail-summary .detail-actions {
    margin-top: 15px;
  }

  .detail-summary .detail-actions #download {
    min-height: 48px;
  }

  .detail-technical {
    margin-top: 18px;
  }
}

@media (max-width: 800px) {
  .catalogue .grid {
    gap: 24px 18px;
  }

  .detail-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .detail-art {
    min-height: 0;
    aspect-ratio: 2.2;
  }

  .detail-banner {
    max-height: 250px;
  }

  .details #app-title {
    font-size: clamp(32px, 7vw, 44px);
  }

  .detail-summary .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-summary .detail-actions #download {
    width: 100%;
  }

  .detail-technical-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .catalogue .category-controls {
    margin-bottom: 15px;
  }

  .catalogue .categories {
    gap: 2px;
  }

  .catalogue .categories button {
    padding: 8px 10px;
    font-size: 12px;
  }

  .catalogue .grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .catalogue .app {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #ffffff12;
  }

  .catalogue .app-art {
    width: 84px;
    height: 84px;
    min-height: 0;
    aspect-ratio: 1;
    flex: none;
    border-radius: 8px;
  }

  .catalogue .app-art img,
  .catalogue .app-art img.icon {
    width: 82%;
    height: 82%;
  }

  .catalogue .app-body {
    min-height: 0;
    padding: 0;
  }

  .catalogue .app-body h3 {
    font-size: 17px;
  }

  .catalogue .app-body p {
    min-height: 0;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
  }

  .catalogue .meta {
    justify-content: flex-start;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
  }

  .details {
    padding: 18px;
  }

  .details .detail-heading {
    margin-bottom: 17px;
    padding-bottom: 12px;
  }

  .detail-art {
    aspect-ratio: 1.7;
    border-radius: 9px;
  }

  .details #description {
    margin-top: 12px;
    font-size: 14px;
  }

  .detail-essentials {
    gap: 30px;
    margin-top: 18px;
  }

  .detail-essentials dd {
    font-size: 18px;
  }

  .detail-technical {
    margin-top: 22px;
  }
}

@media (max-width: 360px) {
  .catalogue .app-art {
    width: 72px;
    height: 72px;
  }

  .catalogue .app {
    gap: 12px;
  }

  .detail-essentials {
    gap: 20px;
  }

  .details #app-title {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalogue .categories button,
  .catalogue .app,
  .catalogue .app-art,
  .detail-technical>summary::after {
    transition: none;
  }
}

/* Short landscape browsers use one screen for both information views. The
   header/footer take their natural space; the detail grid fills what remains. */
.tv-details {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}
.tv-details .preview-note { display: none; }
.tv-details .vault, .tv-details .vault>main { min-height: 0; }
.tv-details .bar { height: 52px; min-height: 52px; padding: 4px 28px; }
.tv-details .brand { width: 128px; height: 40px; }
.tv-details .brand img { width: 120px; height: 40px; }
.tv-details .bar #leave { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.tv-details footer { height: 28px; min-height: 28px; padding: 5px 28px; font-size: 11px; }
.tv-details .catalogue {
  display: flex;
  min-height: 0;
  padding: 10px 28px;
}
.tv-details .details {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 6px 28px;
  padding: 12px 20px;
}
.tv-details .detail-content, .tv-details .detail-summary { display: contents; }
.tv-details .details .detail-heading {
  grid-area: 1 / 1;
  align-self: start;
  margin: 0;
  padding: 0;
  border: 0;
}
.tv-details .details #close-details { min-height: 44px; padding: 8px; }
.tv-details .detail-title { grid-area: 1 / 2; }
.tv-details .detail-category { margin: 0 0 3px; font-size: 12px; line-height: 1.4; }
.tv-details .details #app-title { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; }
.tv-details .detail-art {
  grid-area: 2 / 1 / 4 / 2;
  align-self: stretch;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}
.tv-details .details .detail-banner {
  width: 88%;
  height: 88%;
  max-height: 100%;
  margin: 0;
  object-position: center;
}
.detail-tabs { display: flex; gap: 6px; border-bottom: 1px solid #ffffff16; }
.detail-tabs button {
  min-height: 40px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 5px 5px 0 0;
  background: transparent;
  color: #adb7c3;
  font-size: 14px;
}
.detail-tabs button[aria-selected="true"] { border-bottom-color: #1688ff; background: #29313b; color: #f2f5f7; }
.tv-details .detail-tabs { grid-area: 2 / 2; }
.tv-details #detail-overview-panel, .tv-details #detail-technical-panel {
  grid-area: 3 / 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.tv-details [role="tabpanel"]:focus-visible { outline: 2px solid #78b9ff; outline-offset: 2px; }
.tv-details #detail-overview-panel { display: flex; flex-direction: column; gap: 8px; }
.tv-details .detail-description { display: flex; flex: 1; min-height: 0; flex-direction: column; align-items: flex-start; }
.tv-details .details #description {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.45;
}
.tv-details #detail-read-description, .tv-details #detail-read-notes {
  align-self: flex-start;
  flex: none;
  min-height: 32px;
  padding: 4px 6px;
  font-size: 13px;
}
.tv-details .detail-essentials { flex: none; gap: 30px; margin: 0; }
.tv-details .detail-essentials dt { margin-bottom: 1px; font-size: 12px; }
.tv-details .detail-essentials dd { font-size: 17px; line-height: 1.3; }
.tv-details .detail-summary .tested-devices { display: flex; flex: none; align-items: center; flex-wrap: wrap; gap: 5px 8px; margin: 0; }
.tv-details .tested-devices h3 { margin: 0; font-size: 13px; }
.tv-details .tested-device-list { gap: 6px; }
.tv-details .tested-device-badge { padding: 3px 7px; font-size: 12px; line-height: 1.4; }
.tv-details .detail-technical { margin: 0; border: 0; }
.tv-details .detail-technical>summary { display: none; }
.tv-details .detail-technical-content { display: block; padding: 0; }
.tv-details .details #facts { width: 100%; max-width: none; margin: 0; column-gap: 14px; row-gap: 5px; font-size: 13px; line-height: 1.4; }
.tv-details .detail-facts dd:last-of-type { max-width: none; }
.tv-details .detail-summary .detail-actions {
  grid-area: 4 / 1 / 5 / 3;
  min-width: 0;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid #ffffff16;
}
.tv-details .detail-summary .detail-actions>.small { font-size: 13px; }
.tv-details .detail-summary .detail-actions #download { min-height: 48px; }
.tv-details .detail-summary .download-status { grid-area: 5 / 1 / 6 / 3; margin: 0; font-size: 12px; }

/* Full text is available separately so lengthy release notes never grow the TV card. */
#detail-reading {
  width: min(900px, calc(100% - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 22px 26px;
  border: 1px solid #536176;
  border-radius: 13px;
  background: #20252d;
  color: #f2f5f7;
  box-shadow: 0 20px 70px #0008;
}
#detail-reading[open] { display: flex; flex-direction: column; gap: 16px; }
#detail-reading::backdrop { background: #080c12d9; }
.detail-reading-heading { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 24px; }
.detail-reading-heading h2 { font-size: 24px; overflow-wrap: anywhere; }
#detail-reading-close { flex: none; min-height: 44px; padding: 8px 14px; }
#detail-reading-text { min-height: 0; margin: 0; overflow: auto; overscroll-behavior: contain; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.6; }
#detail-reading-text:focus-visible { outline: 2px solid #78b9ff; outline-offset: 4px; }
