@font-face {
  font-family: Asul;
  src: url("/fonts/asul-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #1a1715;
  --ink: #f2e9e0;
  --muted: #c7b7ab;
  --rule: #53453b;
  --control-border: #876e5e;
  --field: #241e1a;
  --placeholder: #bda99a;
  --accent: #f0ae8d;
  --control-hover: #382b23;
  --button: #e7a184;
  --button-hover: #f8b598;
  --button-ink: #281911;
  --error: #ffb5a3;
  --selection: #684534;
  --feature-paper: #241e1a;
  --feature-rule: #665245;
  --feature-text: #cebbb0;
  --display: Asul, "Trebuchet MS", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f2f0ed;
  --ink: #2e251f;
  --muted: #65554a;
  --rule: #cec0b1;
  --control-border: #9e8a7a;
  --field: #faf8f5;
  --placeholder: #756355;
  --accent: #8b3d2c;
  --control-hover: #eee6de;
  --button: #8b3d2c;
  --button-hover: #713023;
  --button-ink: #fff9f1;
  --error: #9a2b22;
  --selection: #eac4ab;
  --feature-paper: #ede5dc;
  --feature-rule: #c0ad9d;
  --feature-text: #65554a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, figure, dl, dd { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .24em; }
::selection { color: var(--ink); background: var(--selection); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1160px, calc(100% - 96px)); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 1;
  inset: 12px auto auto 12px;
  padding: 10px 14px;
  background: var(--paper);
  transform: translateY(-200%);
}
.skip:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--rule); }
.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 66px;
  gap: 16px;
}
.brand, .site-nav a, .footer-inner a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.brand {
  gap: 8px;
  font: 400 1.375rem / 1 var(--display);
  white-space: nowrap;
}
.brand img { display: block; }
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 32px);
  margin-inline-start: auto;
}
.site-nav a, .footer-inner a { font-size: .9375rem; color: var(--muted); }
.site-nav a { justify-content: center; min-width: 44px; }
.site-nav a:hover, .footer-inner a:hover { color: var(--accent); text-decoration: underline; }
.site-settings { display: flex; align-items: center; gap: 8px; }
.site-settings select {
  min-height: 42px;
  padding-inline: 9px;
  border: 1px solid var(--control-border);
  border-radius: 5px;
  color: var(--ink);
  background: var(--field);
  cursor: pointer;
  font-size: .875rem;
}
.site-settings select:hover { border-color: var(--accent); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.7fr);
  align-items: center;
  gap: clamp(38px, 6vw, 86px);
  padding-block: clamp(52px, 5.5vw, 78px);
}
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.018em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.875rem, 4.8vw, 4.125rem); line-height: 1; }
h1 span { color: var(--accent); }
h2 { font-size: clamp(1.875rem, 2.9vw, 2.625rem); line-height: 1.1; }
.intro { margin-top: 10px; color: var(--muted); font-size: 1.125rem; text-wrap: pretty; }

#license-form { margin-top: 29px; max-width: 380px; }
#license-form label { display: block; margin-bottom: 7px; font-size: .9375rem; font-weight: 650; }
.key-field {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--field);
}
.key-field input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 3px 0 7px;
  border: 0;
  border-radius: 5px;
  color: inherit;
  background: transparent;
  caret-color: var(--accent);
  font-family: Consolas, monospace;
}
.key-field input::placeholder { color: var(--placeholder); }
.key-field input:focus-visible { outline-offset: -2px; }
.key-field input::-ms-reveal { display: none; }
.reveal {
  flex: none;
  min-height: 44px;
  padding-inline: 10px;
  border: 0;
  border-radius: 4px;
  color: var(--accent);
  background: none;
  font-size: .875rem;
  font-weight: 600;
}
.reveal:hover { background: var(--control-hover); }
.reveal:focus-visible { outline-offset: -2px; }
.hint, .feedback { margin-top: 8px; color: var(--muted); font-size: .875rem; }
.feedback:empty { margin-top: 0; }
.feedback.error { color: var(--error); }
.download-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 16px;
  padding: 8px 19px;
  border: 0;
  border-radius: 6px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 650;
}
.download-button:hover:enabled { background: var(--button-hover); }
.download-button:disabled { cursor: wait; opacity: .65; }
.preview {
  overflow: clip;
  border: 1px solid #47392f;
  border-radius: 12px;
  background: #161413;
}
.preview img { display: block; width: 100%; height: auto; }

.features { background: var(--feature-paper); }
.features, .release { padding-block: clamp(38px, 5.4vw, 74px); scroll-margin-top: 20px; }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.7fr);
  align-items: start;
  gap: clamp(32px, 6vw, 86px);
}
.feature-menus { border-top: 1px solid var(--feature-rule); }
.feature-menu { border-bottom: 1px solid var(--feature-rule); }
.feature-menu summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 50px;
  padding: 10px 6px 10px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
}
.feature-menu summary::-webkit-details-marker { display: none; }
.feature-menu summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.feature-menu[open] summary::after { transform: translateY(2px) rotate(225deg); }
.feature-menu summary:hover, .feature-menu[open] summary { color: var(--accent); }
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px clamp(24px, 3vw, 42px);
  padding-block: 3px 22px;
}
.feature-list dt { font-size: .9375rem; font-weight: 650; }
.feature-list dd, .feature-vip-note { color: var(--feature-text); font-size: .9375rem; text-wrap: pretty; }
.feature-list dd { margin-top: 3px; }
.feature-vip-note { margin-bottom: 10px; }

.release-details { margin-top: 12px; }
.release-version { font-weight: 650; color: var(--accent); }
.release-file { margin-top: 3px; color: var(--muted); font-size: .875rem; }
.release-content { min-width: 0; color: var(--muted); }
#release-notes { max-width: 68ch; overflow-wrap: anywhere; }
#release-notes ul { margin: 0; padding-inline-start: 20px; }
#release-notes li + li { margin-top: 6px; }
#release-notes li::marker { color: var(--accent); }
#release-notes p + p, #release-notes p + ul, #release-notes ul + p { margin-top: 10px; }

.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { justify-content: flex-end; min-height: 58px; }

@media (max-width: 800px) {
  .wrap { width: calc(100% - 56px); }
  .hero-inner, .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hero-inner { padding-block: 43px 34px; }
}

@media (max-width: 680px) {
  .header-inner { flex-wrap: wrap; gap: 0 10px; padding-block: 8px 2px; }
  .site-settings { flex-basis: 100%; padding-bottom: 6px; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 58px; }
  .site-nav { gap: 13px; }
  .site-nav a { font-size: .875rem; }
  .site-settings select { min-height: 44px; padding-inline: 5px; }
  .hero-inner { padding-block: 35px 25px; }
  .feature-list { grid-template-columns: minmax(0, 1fr); }
}
