:root {
  color-scheme: light;
  --bg: #f4f7ee;
  --bg-2: #eaf1df;
  --panel: #fffef8;
  --panel-2: #f8fbf2;
  --ink: #17231b;
  --muted: #647168;
  --line: #dce6d5;
  --line-strong: #bfd1b6;
  --grass: #4f9b50;
  --grass-dark: #2f6f3d;
  --leaf: #7dbb58;
  --dirt: #8a633c;
  --stone: #8d9690;
  --water: #377eb8;
  --copper: #bf7440;
  --red: #b9463c;
  --shadow: 0 18px 42px rgba(45, 67, 48, 0.14);
  --soft-shadow: 0 10px 24px rgba(45, 67, 48, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background:
    linear-gradient(180deg, rgba(125, 187, 88, 0.22), transparent 360px),
    linear-gradient(90deg, rgba(255, 254, 248, 0.82), rgba(244, 247, 238, 0.86)),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(47, 111, 61, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 111, 61, 0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 254, 248, 0.9);
  border-bottom: 1px solid rgba(191, 209, 182, 0.75);
  backdrop-filter: blur(18px);
}

.nav {
  max-width: 1180px;
  min-height: 74px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-block;
  background:
    linear-gradient(#78bd5e 0 38%, #8d663f 38% 72%, #6f4f35 72% 100%);
  border: 2px solid #213320;
  box-shadow: 5px 5px 0 #d9b36f;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.nav-links a {
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
  font-weight: 760;
  text-decoration: none;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--grass-dark);
  background: #edf5e7;
  border-color: var(--line);
}

.nav-toggle { display: none; }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 22px 64px;
}

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 42px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

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

.hero-art {
  min-height: 460px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(93, 167, 207, 0.34) 0 35%, rgba(255, 254, 248, 0.24) 35% 100%),
    linear-gradient(120deg, rgba(79, 155, 80, 0.16), rgba(191, 116, 64, 0.12));
  box-shadow: var(--shadow);
}

.hero-art::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36%;
  background:
    linear-gradient(#72b85a 0 22%, #8a633c 22% 62%, #6c4d35 62% 100%);
  border-top: 4px solid #3f7b40;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 35, 27, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 35, 27, 0.1) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.7;
}

.block {
  width: 112px;
  height: 112px;
  position: absolute;
  z-index: 1;
  border: 4px solid rgba(23, 35, 27, 0.88);
  box-shadow: 14px 14px 0 rgba(23, 35, 27, 0.14);
}

.grass {
  top: 72px;
  left: 72px;
  background: linear-gradient(#79be5f 0 36%, #8f673e 36% 72%, #6f4e34 72% 100%);
}

.stone {
  top: 188px;
  right: 96px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), transparent),
    var(--stone);
}

.redstone {
  bottom: 86px;
  left: 168px;
  background:
    linear-gradient(135deg, #59615b, #9b3c3c 56%, #d35b4d);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--grass-dark);
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(3rem, 5.35vw, 4.75rem);
}

h2 {
  margin: 0 0 10px;
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: 0;
}

p { color: var(--muted); }

.lead {
  max-width: 680px;
  font-size: 1.22rem;
}

.copy-box {
  max-width: 660px;
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--grass);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.copy-box span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.copy-box strong {
  font-size: clamp(1.08rem, 3vw, 1.36rem);
  overflow-wrap: anywhere;
}

.copy-button,
.button,
.nav-toggle {
  border: 0;
  border-radius: 8px;
  background: var(--grass-dark);
  color: white;
  padding: 10px 15px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 #1f4d2a;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.copy-button:hover,
.button:hover,
.nav-toggle:hover {
  background: var(--grass);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #1f4d2a;
}

.copy-button:active,
.button:active,
.nav-toggle:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1f4d2a;
}

.button.secondary {
  background: var(--water);
  box-shadow: 0 4px 0 #215a83;
}

.button.secondary:hover {
  background: #438fc8;
  box-shadow: 0 5px 0 #215a83;
}

.button.disabled {
  background: #9ba8a0;
  box-shadow: none;
  pointer-events: none;
}

.button.small {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  font-size: 0.95rem;
}

.page-title {
  max-width: 840px;
  margin: 38px 0 28px;
}

.page-title h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); }

.grid {
  display: grid;
  gap: 18px;
  margin: 24px 0;
}

.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card,
.notice,
.status-card,
.band,
.step {
  background: rgba(255, 254, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--soft-shadow);
}

.card {
  position: relative;
  overflow: hidden;
}

.card::before,
.step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--grass), var(--copper));
}

.card p:last-child,
.notice p:last-child,
.band p:last-child,
.step p:last-child { margin-bottom: 0; }

.band {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background:
    linear-gradient(90deg, rgba(79, 155, 80, 0.12), rgba(55, 126, 184, 0.08)),
    var(--panel);
}

.band .button {
  min-width: 190px;
  text-align: center;
  white-space: nowrap;
}

.notice {
  border-left: 6px solid var(--copper);
  background: #fff9ec;
}

.good { border-left: 6px solid var(--grass); }
.danger { border-left: 6px solid var(--red); }

.clean-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.clean-list li + li { margin-top: 8px; }

.steps {
  display: grid;
  gap: 16px;
  counter-reset: steps;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 18px;
}

.step span {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--water);
  box-shadow: 0 4px 0 #215a83;
  font-weight: 950;
}

.step h2,
.step p {
  grid-column: 2;
}

.step h2 {
  margin-bottom: 2px;
}

.step p {
  margin: 0;
}

.step-actions {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-end;
  align-self: center;
}

.step-actions .button {
  min-width: 168px;
  justify-content: center;
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading p { margin: 0; }

.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.mod-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  border-top: 0;
}

.mod-card h2 {
  font-size: 1.06rem;
  overflow-wrap: anywhere;
}

.mod-card .meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.mod-card .hint {
  margin-top: 12px;
  color: var(--muted);
}

.mod-card:hover {
  border-color: var(--grass);
  transform: translateY(-2px);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.mod-actions {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  justify-content: flex-start;
}

.status-card {
  max-width: 940px;
  background:
    linear-gradient(135deg, rgba(79, 155, 80, 0.1), rgba(55, 126, 184, 0.09)),
    var(--panel);
}

.status-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.status-head h2 { font-size: 1.8rem; }
.status-head p { margin: 0; }

.dot {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 50%;
  background: #9ba8a0;
  box-shadow: 0 0 0 8px rgba(155, 168, 160, 0.18);
}

.dot.online {
  background: #30a65a;
  box-shadow: 0 0 0 8px rgba(48, 166, 90, 0.16);
}

.dot.offline {
  background: var(--red);
  box-shadow: 0 0 0 8px rgba(185, 70, 60, 0.14);
}

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

.metrics div {
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: rgba(255, 254, 248, 0.82);
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.muted { color: var(--muted); }

.form-card {
  max-width: 780px;
  margin: 24px 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  color: var(--ink);
  font-weight: 850;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fffef8;
  color: var(--ink);
  font: inherit;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid rgba(79, 155, 80, 0.2);
  border-color: var(--grass);
}

.form-message {
  min-height: 1.6em;
  margin: 12px 0 0;
  font-weight: 750;
}

.form-message.success { color: var(--grass-dark); }
.form-message.error { color: var(--red); }

.admin-panel {
  max-width: 980px;
}

.applications-list {
  display: grid;
  gap: 16px;
}

.application-card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.application-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.application-head p {
  margin: 0;
}

.status-pill {
  height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  background: #eef1e9;
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.approved {
  background: #e0f1dc;
  color: var(--grass-dark);
}

.status-pill.rejected {
  background: #f8e3df;
  color: var(--red);
}

.application-card code {
  display: block;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf2;
  overflow-wrap: anywhere;
}

.application-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px 22px 42px;
  text-align: center;
}

@media (max-width: 940px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero h1 {
    white-space: normal;
  }

  .hero-art {
    min-height: 320px;
    order: -1;
  }

  .stone { right: 70px; }
}

@media (max-width: 820px) {
  .nav {
    align-items: flex-start;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .nav-toggle { display: inline-block; }

  .nav-links {
    display: none;
    width: 100%;
    justify-content: flex-start;
  }

  .nav.open { flex-wrap: wrap; }
  .nav.open .nav-links { display: flex; }

  h1 { font-size: clamp(2.35rem, 12vw, 4rem); }

  .copy-box,
  .grid.two,
  .grid.three,
  .metrics {
    grid-template-columns: 1fr;
  }

  .band {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .application-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .step {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .step-actions {
    grid-column: 2;
    grid-row: auto;
    flex-direction: row;
    justify-content: flex-start;
    margin-top: 12px;
  }
}

@media (max-width: 540px) {
  main { padding: 22px 16px 54px; }

  .hero-art { min-height: 260px; }

  .block {
    width: 86px;
    height: 86px;
  }

  .grass { top: 46px; left: 42px; }
  .stone { top: 120px; right: 42px; }
  .redstone { bottom: 52px; left: 108px; }

  .card,
  .notice,
  .status-card,
  .band,
  .step {
    padding: 18px;
  }
}
