:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f7f0e9;
  background: #101112;
  font-synthesis: none;
  --muted: #bcb4ad;
  --surface: #19191b;
  --line: #3b3532;
  --accent: #ffb178;
  --ink: #21140d;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 76% 0%, #2a1d18, transparent 35rem);
}
.shell { width: min(100%, 1200px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 48px); }
.masthead { display: flex; align-items: center; gap: 12px; min-height: 78px; }
.project-mark {
  display: block;
  flex: none;
  border-radius: 50%;
}
.project-name { font-size: .875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.screen { padding-bottom: 56px; }
.page-title {
  display: grid;
  align-items: end;
  min-height: clamp(120px, 16vw, 205px);
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(ellipse at 100% 0%, #4b2c21, transparent 68%), #1b191a;
}
h1, h2, h3 { margin: 0; }
h1 {
  max-width: 100%;
  font-size: clamp(2.375rem, 7vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.058em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; letter-spacing: -.025em; }
h3 { font-size: 1.0625rem; font-weight: 650; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  min-width: 0;
  padding: clamp(16px, 2.3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(142deg, #221e1e, var(--surface) 65%);
}
.card-body { padding-bottom: 20px; }
.build-details, .build-note { margin: 9px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.build-details span { margin-inline: .35em; }
.revision {
  color: #ffd0af;
  font: 650 .875rem ui-monospace, Consolas, monospace;
}
.build-note { margin-top: 4px; overflow-wrap: anywhere; }

.download-button, .empty-download, button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.download-button, button { background: var(--accent); color: var(--ink); cursor: pointer; text-decoration: none; }
.download-button:hover, button:hover { background: #ffca9e; }
.empty-download { border-color: #594b44; color: var(--muted); }
.expiry { display: block; margin-top: 9px; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.build-setup { margin-top: 8px; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.build-setup summary { cursor: pointer; color: #ffd0af; padding-block: 7px; }
.build-setup ol { margin: 6px 0 0; padding-inline-start: 1.35em; overflow-wrap: anywhere; }
.build-setup li + li { margin-top: 6px; }

.access {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  margin-top: clamp(12px, 4.5vw, 64px);
  margin-bottom: 40px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.access .page-title {
  min-height: clamp(250px, 31vw, 390px);
  border: 0;
  border-radius: 17px 0 0 17px;
}
.access-card { display: grid; align-items: center; min-width: 0; padding: clamp(22px, 4vw, 48px); }
form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
label { font-size: 1rem; font-weight: 650; }
input {
  min-width: 0;
  min-height: 46px;
  border: 1px solid #746258;
  border-radius: 8px;
  padding: 10px 12px;
  background: #111112;
  color: inherit;
  font: inherit;
}
:focus-visible { outline: 2px solid #ffcfaa; outline-offset: 3px; }
.error { color: #ffb4a5; font-size: .9375rem; margin: 0; }
.password-entry { display: flex; gap: 8px; min-width: 0; }
.password-entry input { flex: 1; }
.password-toggle { background: #211d1b; border-color: #746258; color: #ffd0af; white-space: nowrap; }
.password-toggle:hover { background: #382921; }
.password-toggle[hidden] { display: none; }

@media (min-width: 781px) {
  .grid { row-gap: 0; }
  .card { grid-row: span 3; grid-template-rows: subgrid; }
  .card > .build-setup { grid-row: 3; }
}

@media (max-width: 780px) {
  .masthead { min-height: 65px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .card-body { padding-bottom: 14px; }
  .access { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .access .page-title { min-height: clamp(120px, 26vw, 185px); border-radius: 17px 17px 0 0; }
  .access-card form { width: min(100%, 420px); margin-inline: auto; }
}

@media (max-width: 540px) {
  .access-card { padding: 18px; }
  .password-toggle { padding-inline: 10px; }
}
