@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --store-bg: #08111c;
  --store-panel: #0d1926;
  --store-line: #263a4c;
  --store-text: #edf4fb;
  --store-muted: #91a5b8;
  --store-blue: #3d95ff;
  --store-focus: #7bc2ff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  background: var(--store-bg);
}
body {
  margin: 0;
  background: var(--store-bg);
  color: var(--store-text);
  font: 15px/1.6 Inter, 'Segoe UI', Arial, sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--store-focus);
  outline-offset: 3px;
}

/* The library has its own product identity inside the wider ESC family. */
.site-header[data-project='ESC Software'] {
  background: #091522;
  border-bottom: 1px solid #223648;
}
.site-header[data-project='ESC Software'] .site-header__inner {
  width: min(1500px, calc(100% - 56px));
  min-height: 76px !important;
}
.site-header[data-project='ESC Software'] .site-brand {
  gap: 14px;
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.site-header[data-project='ESC Software'] .site-brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}
.site-header[data-project='ESC Software'] .site-brand small {
  display: block;
  margin-top: 1px;
  color: #7f98ad;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.site-header[data-project='ESC Software'] .site-header__label {
  color: #71879b;
  font-size: 11px;
}

.store-shell {
  width: 100%;
  min-height: 72vh;
}
.store-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100vh - 76px);
}
.store-sidebar {
  min-width: 0;
  padding: 34px 24px 64px;
  background: #0a1622;
  border-right: 1px solid #243747;
}
.store-sidebar details {
  position: sticky;
  top: 24px;
}
.store-sidebar summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  color: #d9e6f1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.store-sidebar summary::-webkit-details-marker {
  display: none;
}
.summary-chevron {
  width: 15px;
  margin-left: auto;
  transition: transform 0.18s ease;
}
details[open] .summary-chevron {
  transform: rotate(180deg);
}
.filter-intro {
  margin: 13px 0 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid #223546;
  color: #788fa3;
  font-size: 12px;
}
.filter-heading,
.filter-label {
  display: block;
  margin: 0 0 9px;
  color: #6f879b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.filter-label {
  margin-top: 30px;
}
.department-button,
.category-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #a9bac9;
  text-align: left;
  font-size: 12px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.department-button .ui-icon {
  width: 17px;
  height: 17px;
  color: #6f899f;
}
.department-button span,
.category-button span {
  min-width: 0;
  flex: 1;
}
.department-button small,
.category-button small {
  min-width: 23px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #142738;
  color: #7891a6;
  text-align: center;
  font-size: 10px;
}
.department-button:hover,
.category-button:hover {
  background: #102536;
  color: #eef6fd;
}
.department-button[aria-pressed='true'],
.category-button[aria-pressed='true'] {
  border-color: #28577e;
  background: #12304a;
  color: #fff;
}
.department-button[aria-pressed='true'] .ui-icon {
  color: #66b1ff;
}
.category-list {
  margin: 2px 0 7px 19px;
  padding-left: 11px;
  border-left: 1px solid #294053;
}
.category-button {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 4px;
  color: #8198ac;
  font-size: 11px;
}
.store-sidebar select,
.results-toolbar select {
  width: 100%;
  border: 1px solid #30475a;
  border-radius: 5px;
  background: #0e2131;
  color: #d4e1ec;
  padding: 9px 10px;
  font-size: 12px;
}
.reset-filters {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #70b7f0;
  font-size: 11px;
  font-weight: 700;
}

.store-results,
.app-detail-column {
  min-width: 0;
  padding: 48px clamp(28px, 4vw, 68px) 80px;
}
.store-results {
  max-width: 1340px;
}
.store-intro {
  max-width: 1040px;
  padding-bottom: 37px;
}
.eyebrow {
  color: #66adf2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.store-intro h1 {
  margin: 10px 0 9px;
  color: #f4f8fc;
  font-size: clamp(34px, 4vw, 51px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.store-intro > p {
  max-width: 760px;
  color: #94a8ba;
  font-size: 14px;
}
.store-search {
  display: flex;
  max-width: 920px;
  align-items: center;
  gap: 12px;
  margin-top: 27px;
  padding: 7px 8px 7px 16px;
  border: 1px solid #385369;
  border-radius: 8px;
  background: #0d1d2b;
  box-shadow: 0 12px 35px rgb(0 0 0 / 16%);
}
.search-icon {
  width: 20px;
  height: 20px;
  color: #77a2c4;
}
.store-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f1f6fb;
  font-size: 13px;
}
.store-search input::placeholder {
  color: #688297;
}
.store-search button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 20px;
  border: 1px solid #5aa9ff;
  border-radius: 5px;
  background: #2e84df;
  color: white;
  font-size: 12px;
  font-weight: 700;
}
.store-search button:hover,
.primary-button:hover {
  background: #4297ef;
}
.search-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}
.search-hints::before {
  content: 'Popular:';
  align-self: center;
  color: #657e93;
  font-size: 10px;
}
.search-hints button {
  padding: 4px 9px;
  border: 1px solid #284157;
  border-radius: 4px;
  background: transparent;
  color: #86a8c3;
  font-size: 10px;
}
.search-hints button:hover {
  border-color: #447399;
  color: #dcefff;
}
.results-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-top: 25px;
  border-top: 1px solid #223748;
}
.results-toolbar h2 {
  color: #eaf2f9;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.results-toolbar p {
  margin-top: 3px;
  color: #71899e;
  font-size: 11px;
}
.results-toolbar label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #7890a4;
  font-size: 11px;
}
.results-toolbar select {
  width: auto;
  min-width: 145px;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 18px;
}
.software-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 255px;
  overflow: hidden;
  border: 1px solid #293f52;
  border-radius: 7px;
  background: #0e1c29;
  box-shadow: 0 10px 30px rgb(0 0 0 / 10%);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.software-card:hover {
  transform: translateY(-2px);
  border-color: #477497;
  background: #112231;
}
.software-art {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 26px;
  border-right: 1px solid #294257;
  background: linear-gradient(145deg, #18334a, #102536);
}
.software-art img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 14px 18px rgb(0 0 0 / 25%));
}
.software-card-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px;
}
.category-chip {
  display: inline-block;
  align-self: flex-start;
  color: #68afea;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.software-card h3 {
  margin-top: 6px;
  color: #f1f6fa;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.software-developer {
  margin-top: 4px;
  color: #86a3ba;
  font-size: 11px;
}
.software-summary {
  display: -webkit-box;
  margin-top: 13px;
  overflow: hidden;
  color: #a8b8c6;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.card-meta {
  display: flex;
  gap: 14px;
  margin-top: auto;
  padding-top: 17px;
  color: #718ca2;
  font-size: 10px;
}
.card-meta strong {
  color: #9ad2b7;
  font-weight: 700;
}
.card-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: #75b8f2;
  font-size: 11px;
  font-weight: 700;
}
.card-open .ui-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}
.software-card:hover .card-open .ui-icon {
  transform: translateX(3px);
}
.store-empty {
  padding: 40px;
  border: 1px dashed #37536a;
  border-radius: 7px;
  background: #0d1c29;
  color: #dae7f1;
  text-align: center;
}
.store-empty p {
  margin: 7px 0 18px;
  color: #829aaf;
}

/* Software details */
.app-page .store-sidebar h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #223747;
  color: #dce7f0;
  font-size: 13px;
}
.app-detail-column {
  max-width: 1220px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7fb9e9;
  font-size: 11px;
  font-weight: 700;
}
.back-link .ui-icon {
  width: 15px;
  height: 15px;
}
.app-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-top: 22px;
  padding: 30px 0 36px;
  border-bottom: 1px solid #284052;
}
.app-icon {
  width: 150px;
  height: 150px;
  object-fit: contain;
  padding: 8px;
  border: 1px solid #33516a;
  border-radius: 25px;
  background: #142b3d;
}
.app-hero h1 {
  margin: 6px 0 10px;
  color: #f4f8fc;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.055em;
}
.developer-byline {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 13px;
}
.developer-byline img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid #38566e;
  border-radius: 50%;
}
.developer-byline a,
.developer-byline strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8bc8f6;
  font-size: 12px;
  font-weight: 700;
}
.developer-byline .ui-icon {
  width: 13px;
  height: 13px;
}
.developer-byline span {
  display: block;
  margin-top: 2px;
  color: #728da4;
  font-size: 10px;
}
.app-subtitle {
  margin-top: 14px;
  color: #849bad;
  font-size: 12px;
}
.app-actions {
  display: flex;
  min-width: 190px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  color: #758ea3;
  text-align: center;
  font-size: 10px;
}
.app-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  padding-top: 35px;
}
.app-section {
  padding: 0 0 29px;
  margin-bottom: 29px;
  border-bottom: 1px solid #243a4c;
}
.app-section h2,
.app-facts h2 {
  margin-bottom: 12px;
  color: #e9f1f8;
  font-size: 17px;
}
.app-section p,
.app-section ul {
  color: #a0b2c1;
  font-size: 13px;
  line-height: 1.85;
}
.app-section ul {
  margin: 0;
  padding-left: 20px;
}
.app-section li + li {
  margin-top: 5px;
}
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.screenshots img {
  border: 1px solid #304a60;
  border-radius: 6px;
}
.app-facts {
  align-self: start;
  padding: 22px;
  border: 1px solid #2c4559;
  border-radius: 6px;
  background: #0d1e2c;
}
.app-facts dl {
  margin: 0;
}
.app-facts dt {
  margin-top: 15px;
  color: #70899f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.app-facts dt:first-child {
  margin-top: 0;
}
.app-facts dd {
  margin: 3px 0 0;
  color: #ccd9e4;
  font-size: 11px;
}
html[lang='en'] .site-footer {
  direction: ltr;
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
}

@media (max-width: 1050px) {
  .store-layout {
    grid-template-columns: 245px minmax(0, 1fr);
  }
  .store-sidebar {
    padding-inline: 18px;
  }
  .store-results,
  .app-detail-column {
    padding-inline: 28px;
  }
  .software-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .app-hero {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .app-icon {
    width: 110px;
    height: 110px;
  }
  .app-actions {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }
  .app-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header[data-project='ESC Software'] .site-header__inner {
    width: calc(100% - 30px);
    min-height: 68px !important;
    padding: 10px 0;
  }
  .site-header[data-project='ESC Software'] .site-brand img {
    width: 40px;
    height: 40px;
  }
  .store-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .store-sidebar {
    padding: 17px 16px;
    border-right: 0;
    border-bottom: 1px solid #263b4c;
  }
  .store-sidebar details {
    position: static;
  }
  .store-results,
  .app-detail-column {
    padding: 30px 16px 55px;
  }
  .store-intro {
    padding-bottom: 28px;
  }
  .store-intro h1 {
    font-size: 35px;
  }
  .store-search {
    gap: 8px;
    padding-left: 12px;
  }
  .store-search input {
    font-size: 12px;
  }
  .store-search button {
    min-height: 38px;
    padding-inline: 13px;
  }
  .store-search button .ui-icon {
    display: none;
  }
  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .results-toolbar label,
  .results-toolbar select {
    width: 100%;
  }
  .software-grid {
    grid-template-columns: 1fr;
  }
  .software-card {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 220px;
  }
  .software-art {
    padding: 15px;
  }
  .software-art img {
    width: 84px;
    height: 84px;
    border-radius: 16px;
  }
  .software-card-info {
    padding: 18px 15px;
  }
  .software-card h3 {
    font-size: 23px;
  }
  .software-summary {
    font-size: 11px;
    -webkit-line-clamp: 3;
  }
  #detailNavigation {
    display: none;
  }
  .app-hero {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
    padding: 22px 0 28px;
  }
  .app-icon {
    width: 78px;
    height: 78px;
    border-radius: 17px;
  }
  .app-hero h1 {
    font-size: 34px;
  }
  .developer-byline img {
    width: 34px;
    height: 34px;
  }
  .app-actions {
    grid-column: 1 / -1;
    align-items: stretch;
  }
  .app-columns {
    gap: 24px;
    padding-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
