:root {
  --paper: #f1f0df;
  --paper-strong: #f9f8e9;
  --ink: #18251b;
  --muted: #5e6b5f;
  --line: #a8b69d;
  --green: #235d37;
  --green-dark: #153f28;
  --lime: #a6c65b;
  --danger: #9f342d;
  font-family:
    Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #d8ddc8;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(21, 63, 40, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 63, 40, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 15% 10%, #eef0d4 0, transparent 34%),
    #d8ddc8;
  background-size: 24px 24px, 24px 24px, auto, auto;
}

button,
textarea,
input {
  font: inherit;
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 36px;
}

.masthead {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 30px;
  align-items: center;
  margin-bottom: 30px;
}

.cartridge-mark {
  display: grid;
  place-content: center;
  width: 112px;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 14px 14px 24px 14px;
  background: var(--green);
  color: var(--paper-strong);
  box-shadow: 8px 8px 0 var(--ink);
  text-align: center;
}

.cartridge-mark span {
  font: 800 38px/0.9 ui-monospace, monospace;
  letter-spacing: -4px;
}

.cartridge-mark small {
  margin-top: 8px;
  font: 700 14px/1 ui-monospace, monospace;
  letter-spacing: 5px;
}

.eyebrow,
.step {
  margin: 0 0 7px;
  color: var(--green);
  font: 800 12px/1.2 ui-monospace, monospace;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 10px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.panel {
  padding: clamp(22px, 5vw, 44px);
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 10px 10px 0 rgba(24, 37, 27, 0.2);
}

.panel-heading {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

h2 {
  margin-bottom: 0;
  font-size: 29px;
}

.status-pill {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: var(--paper-strong);
  font-size: 12px;
  white-space: nowrap;
}

.status-pill.online {
  color: var(--green-dark);
  border-color: var(--green);
  background: #dce8bd;
}

label[for="license"] {
  display: block;
  margin-bottom: 9px;
  font-weight: 700;
}

textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 150px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: var(--paper-strong);
  font: 14px/1.65 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(35, 93, 55, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

#license-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.file-button,
button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.file-button {
  background: transparent;
}

button {
  margin-left: auto;
  color: white;
  background: var(--green);
  box-shadow: 4px 4px 0 var(--ink);
}

button:hover {
  background: var(--green-dark);
}

button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.message {
  min-height: 25px;
  margin: 15px 0 -10px;
  color: var(--green);
  font-weight: 700;
}

.message.error {
  color: var(--danger);
}

.guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 30px 0;
}

.guide article {
  position: relative;
  min-height: 165px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(249, 248, 233, 0.68);
}

.guide article > span {
  position: absolute;
  right: 13px;
  top: 5px;
  color: rgba(35, 93, 55, 0.12);
  font: 900 64px/1 ui-monospace, monospace;
}

.guide h3 {
  position: relative;
  margin-bottom: 9px;
}

.guide p {
  position: relative;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.release {
  margin: 30px 0;
  padding: 26px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: rgba(249, 248, 233, 0.76);
}

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

.release-version {
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--paper-strong);
  background: var(--green);
  font: 800 14px/1 ui-monospace, monospace;
}

.release-meta {
  margin: 10px 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.release-notes,
.release details ul {
  margin: 0;
  padding-left: 22px;
  line-height: 1.75;
}

.release details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.release summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 800;
}

.release details article {
  margin-top: 15px;
}

.release details h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.probe {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  margin: 30px 0;
  padding: 26px;
  border: 2px dashed var(--green);
  border-radius: 14px;
  background: rgba(220, 232, 189, 0.66);
}

.probe h2 {
  margin-bottom: 8px;
}

.probe p {
  max-width: 620px;
  margin-bottom: 5px;
  color: var(--muted);
  line-height: 1.65;
}

.probe .probe-warning {
  color: #78372d;
  font-weight: 800;
}

.download-button {
  display: grid;
  min-width: 210px;
  min-height: 72px;
  place-content: center;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  color: white;
  background: var(--green);
  box-shadow: 5px 5px 0 var(--ink);
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}

.download-button small {
  margin-top: 5px;
  color: #dce8bd;
  font-size: 11px;
  font-weight: 600;
}

footer {
  padding-top: 18px;
  border-top: 1px solid rgba(24, 37, 27, 0.25);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

footer p {
  margin-bottom: 3px;
}

footer a {
  color: var(--green-dark);
  font-weight: 800;
}

@media (max-width: 700px) {
  .shell {
    padding-top: 36px;
  }

  .masthead {
    grid-template-columns: 76px 1fr;
    gap: 20px;
  }

  .cartridge-mark {
    width: 76px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .cartridge-mark span {
    font-size: 28px;
  }

  .cartridge-mark small {
    font-size: 10px;
  }

  .guide {
    grid-template-columns: 1fr;
  }

  .probe {
    grid-template-columns: 1fr;
  }

  .download-button {
    width: 100%;
  }

  button {
    width: 100%;
    margin-left: 0;
  }
}
