:root {
  --black: #0c0c0c;
  --panel: #151412;
  --panel-raised: #1c1a17;
  --text: #efe9da;
  --muted: #b7b1a3;
  --gold: #c5a75b;
  --gold-bright: #dcc27c;
  --line: rgba(197, 167, 91, 0.35);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--text);
  font: 17px/1.7 var(--serif);
}
main { flex: 1; width: 100%; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; background: var(--gold); color: var(--black); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 16px; top: 16px; }

.label, .site-header nav a, .btn, .text-link, .filters button, .sidebar-block h2, .site-footer, .search label, .big-caption, .stats dt, .specs-table dt {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.label { color: var(--gold); }

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 32px; padding: 18px var(--gutter); border-bottom: 1px solid var(--line);
}
.brand { color: var(--gold); font-size: 18px; letter-spacing: 0.18em; text-decoration: none; text-transform: uppercase; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.site-header nav a:hover { color: var(--text); }
.site-header nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 24px var(--gutter); border-top: 1px solid var(--line); color: var(--muted);
}
.site-footer a { text-transform: none; letter-spacing: 0.04em; font-size: 13px; }

.btn {
  display: inline-block; padding: 13px 26px; border: 1px solid var(--gold); color: var(--gold);
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--gold); color: var(--black); }
.text-link { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.text-link:hover { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }

/* Home */
.hero {
  min-height: min(82vh, 760px); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 64px var(--gutter); border-bottom: 1px solid var(--line);
}
.hero-name { color: var(--gold); font-size: 15px; letter-spacing: 0.32em; text-transform: uppercase; }
.rule { width: 72px; border-top: 1px solid var(--gold); margin: 26px 0; }
.hero h1 { font-size: clamp(42px, 8vw, 92px); line-height: 1.04; max-width: 11em; }
.hero-intro { color: var(--muted); font-size: 19px; margin: 24px 0 34px; }

.section { padding: 64px var(--gutter); }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 26px; }
.section-head h2 { font-size: 32px; }

/* Product cards */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.product {
  display: flex; flex-direction: column; align-items: flex-start; padding: 24px;
  background: var(--panel); border: 1px solid var(--line); transition: border-color 0.15s;
}
.product:hover { border-color: var(--gold); }
.icon { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.2; margin-bottom: 18px; }
.product h3 { font-size: 22px; margin: 6px 0 10px; }
.product h3 a { text-decoration: none; }
.product h3 a:hover { color: var(--gold-bright); }
.summary { color: var(--muted); font-size: 16px; line-height: 1.5; flex: 1; }
.specs { color: var(--muted); font: 13px/1.5 var(--sans); margin: 16px 0; }

/* Downloads: sidebar and catalog */
.catalog-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 40px 28px; }
.big-number { color: var(--gold); font-size: 96px; line-height: 1; margin-top: 26px; }
.big-caption { color: var(--text); margin-top: 8px; }
.sidebar-block { margin-top: 42px; }
.sidebar-block h2 { color: var(--gold); padding-bottom: 10px; }
.sidebar-block ul { list-style: none; margin: 0; padding: 0; }
.sidebar-block li { border-top: 1px solid var(--line); }
.sidebar-block li a { display: block; padding: 11px 0; text-decoration: none; font-size: 16px; line-height: 1.35; }
.sidebar-block li a:hover { color: var(--gold-bright); }
.filters { display: flex; flex-direction: column; }
.filters button {
  background: none; border: 0; border-top: 1px solid var(--line); color: var(--muted);
  padding: 12px 0; text-align: left; cursor: pointer;
}
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { color: var(--gold); }
.filters button[aria-pressed="true"]::after { content: " \2014"; }

.catalog { padding: 40px var(--gutter) 64px; min-width: 0; }
.catalog-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.catalog-head h1 { font-size: clamp(34px, 4vw, 50px); margin-top: 8px; }
.search { flex: 0 1 300px; }
.search label { display: block; color: var(--muted); margin-bottom: 7px; }
.search input {
  width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 0; padding: 11px 13px; font: 16px var(--sans);
}
.search input::placeholder { color: #8d887c; }
.result-count { color: var(--muted); font: 13px/1.5 var(--sans); min-height: 20px; margin: 22px 0 14px; }
.empty { color: var(--muted); padding: 30px 0; }

/* Blog */
.blog-hero { padding: 64px var(--gutter) 36px; }
.blog-hero h1 { font-size: clamp(36px, 6vw, 68px); max-width: 15em; margin: 14px 0 28px; }
.stats { display: flex; flex-wrap: wrap; gap: 20px 64px; margin: 48px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.stats div { display: flex; align-items: baseline; gap: 10px; }
.stats dd { margin: 0; color: var(--gold); font-size: 34px; line-height: 1; }
.stats dt { color: var(--muted); }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.post-card { padding: 26px; background: var(--panel); border: 1px solid var(--line); }
.post-card:hover { border-color: var(--gold); }
.post-card h3 { font-size: 24px; margin: 12px 0; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--gold-bright); }
.post-card p:last-child { color: var(--muted); font-size: 16px; line-height: 1.5; }

/* Single pages */
.narrow { width: min(760px, 100%); margin: 0 auto; padding: 56px var(--gutter) 72px; }
.narrow h1 { font-size: clamp(36px, 6vw, 58px); margin: 12px 0 18px; }
.narrow.center { text-align: center; padding-top: 110px; padding-bottom: 130px; }
.narrow.center .lede { margin-bottom: 30px; }
.back { display: inline-block; margin-bottom: 38px; }
.lede { color: var(--muted); font-size: 20px; line-height: 1.5; }
.project-image { display: block; width: 100%; height: auto; margin-top: 30px; border: 1px solid var(--line); }
.specs-table { margin: 32px 0; border-top: 1px solid var(--line); }
.specs-table div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs-table dt { color: var(--muted); }
.specs-table dd { margin: 0; text-align: right; }
.prose { margin-top: 36px; }
.prose p + p { margin-top: 18px; }
.prose + .btn { margin-top: 34px; }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px var(--gutter); }
  .big-number { font-size: 68px; margin-top: 14px; }
  .sidebar-block { margin-top: 26px; }
  .filters { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .filters button { border: 1px solid var(--line); padding: 9px 13px; min-height: 40px; }
  .filters button[aria-pressed="true"] { border-color: var(--gold); }
  .filters button[aria-pressed="true"]::after { content: none; }
  .search { flex: 1 1 100%; }
  .catalog { padding-top: 30px; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .site-header nav { gap: 2px 16px; }
  .site-header nav a { padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
