:root {
  color-scheme: dark;
  --bg: #071012;
  --panel: rgba(23, 29, 33, 0.88);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --line: rgba(226, 238, 230, 0.16);
  --line-strong: rgba(226, 238, 230, 0.32);
  --text: #f5f4ed;
  --muted: #b8c1ba;
  --faint: #87938c;
  --green: #59d7c7;
  --green-dark: #257f8f;
  --gold: #f0b94d;
  --gold-dark: #9a6720;
  --blue: #5d89d8;
  --accent: #59d7c7;
  --download-start: #59d7c7;
  --download-middle: #2aa6a7;
  --download-end: #257f8f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 0%, rgba(89, 215, 199, 0.14), transparent 24rem),
    radial-gradient(circle at 86% 12%, rgba(93, 137, 216, 0.13), transparent 22rem),
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 92px 92px, 92px 92px, auto;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
h1, h2, h3, p { margin: 0; }

.shell {
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.detail-shell { width: min(100% - 40px, 1520px); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 900;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand span {
  font-size: 1rem;
  line-height: 1;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-head {
  display: grid;
  gap: 12px;
  max-width: 820px;
  padding: 42px 0 28px;
}

.page-head h1,
.product-summary h1 {
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-head p:not(.eyebrow),
.description-text,
.tool-copy span,
.guide-content,
.changelog-list,
footer {
  color: var(--muted);
  line-height: 1.6;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.tool-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)), var(--panel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 24px 70px rgba(0,0,0,0.28);
  transition: border-color 160ms ease, transform 160ms ease;
}

.tool-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.tool-card.is-placeholder { opacity: 0.86; }

.thumb {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
}

.thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: #090b0c;
}

.tool-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 68px 24px 24px;
}

.tool-copy strong {
  font-size: 1.6rem;
  line-height: 1.08;
}

.arrow {
  position: absolute;
  right: 22px;
  bottom: 22px;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.detail-page { padding: 30px 0 0; }

.back-link {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 850;
}

.back-link:hover { color: var(--text); }

.product-detail,
.changelog-panel,
.product-image,
.thumb-column span,
.buy-box {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 24px 70px rgba(0,0,0,0.26);
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: start;
  gap: 28px;
  padding: 28px;
  border-radius: 22px;
}

.product-main-column { min-width: 0; }

.product-gallery {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}

.thumb-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(456px, 64vh);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.thumb-column span {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 12px;
  opacity: 0.74;
}

.thumb-column span.selected {
  opacity: 1;
  border-color: color-mix(in srgb, var(--accent), white 42%);
}

.thumb-column img,
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
}

.product-image img { padding: 16px; }

.tool-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(20, 26, 38, 0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 18px 44px rgba(0,0,0,0.28);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
}

.tool-page-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-weight: 850;
  background: rgba(20, 26, 38, 0.3);
}

.tool-page-tabs a:hover {
  border-color: var(--line-strong);
  background: rgba(255,255,255,0.075);
}

.product-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.product-title-block h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1.04;
}

.tool-byline {
  color: var(--muted);
  font-weight: 800;
}

.product-copy-block {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.description-text { max-width: 72ch; }

.buy-box {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding: 18px;
  border-radius: 14px;
}

.buy-box > div:not(.download-button-stack) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.meta-label { color: var(--faint); }

.download-button-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
  gap: 10px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #041311;
  font-size: 1.04rem;
  font-weight: 950;
  background: linear-gradient(135deg, var(--download-start), var(--download-middle) 52%, var(--download-end));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 14px 30px rgba(37, 127, 143, 0.22);
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.primary-button.disabled {
  cursor: not-allowed;
  opacity: 0.66;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  transform: none;
}

.changelog-panel {
  padding: 28px;
  border-radius: 22px;
  scroll-margin-top: 24px;
}

.tool-bottom-panel + .tool-bottom-panel { margin-top: 18px; }

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin-top: 6px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.guide-content {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin-top: 22px;
}

.guide-content p { max-width: 82ch; }
.guide-content strong { color: #f4f1f3; font-weight: 900; }
.guide-content h3 { margin-top: 8px; color: var(--text); }
.guide-content ol,
.guide-content ul,
.changelog-list ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 24px;
}

.changelog-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.changelog-list article {
  display: grid;
  grid-template-columns: minmax(150px, 0.26fr) 1fr;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
}

.changelog-list article > div {
  display: grid;
  align-content: start;
  gap: 4px;
}

.changelog-list strong { color: var(--text); }
.changelog-list time { color: var(--faint); font-size: 0.88rem; }

code {
  padding: 0.08rem 0.32rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  color: #f6f4ef;
  background: rgba(0,0,0,0.22);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .tool-grid,
  .product-detail { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; }
}

@media (max-width: 680px) {
  .shell,
  .detail-shell { width: min(100% - 24px, 1180px); padding-top: 18px; }
  .detail-page { padding-top: 18px; }
  .product-detail { padding: 16px; }
  .product-gallery { grid-template-columns: 1fr; }
  .thumb-column { flex-direction: row; max-height: none; overflow-x: auto; padding: 0 0 4px; }
  .thumb-column span { width: 78px; flex: 0 0 78px; }
  .tool-copy, .changelog-panel, .buy-box { padding: 20px; }
  .thumb { min-height: 180px; padding: 12px; }
  .tool-page-tabs { padding: 10px; gap: 8px; }
  .tool-page-tabs a { flex: 1 1 auto; justify-content: center; }
  .download-button-stack, .primary-button { width: 100%; }
  .buy-box > div:not(.download-button-stack) { align-items: flex-start; flex-direction: column; gap: 2px; }
  .changelog-list article { grid-template-columns: 1fr; }
  footer { display: grid; }
}

.section-block {
  margin-top: 28px;
}

.compact-heading {
  margin-bottom: -2px;
}

.resource-section {
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.resource-section .section-heading p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.resource-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.026)), rgba(15, 21, 24, 0.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 18px 48px rgba(0,0,0,0.22);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.resource-card:hover {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(89,215,199,0.12), rgba(255,255,255,0.032)), rgba(15, 21, 24, 0.9);
  transform: translateY(-1px);
}

.resource-card.featured {
  border-color: rgba(89, 215, 199, 0.42);
}

.resource-type {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid rgba(89, 215, 199, 0.35);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.resource-card strong {
  font-size: 1.08rem;
  line-height: 1.16;
}

.resource-card span:not(.resource-type) {
  color: var(--muted);
  line-height: 1.45;
}

.resource-card em {
  align-self: end;
  margin-top: 4px;
  color: var(--text);
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .resource-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { min-height: 0; }
}
