:root {
  --bg: #f4ead9;
  --bg-accent:
    radial-gradient(circle at 0% 0%, rgba(214, 110, 39, 0.18), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(27, 77, 57, 0.12), transparent 24%),
    linear-gradient(180deg, #f7efe1 0%, #efe2cc 100%);
  --card: rgba(255, 249, 240, 0.86);
  --card-strong: rgba(255, 246, 234, 0.96);
  --line: rgba(64, 47, 27, 0.12);
  --text: #241b12;
  --muted: #6c5a49;
  --accent: #c46031;
  --accent-deep: #7a3518;
  --accent-alt: #214838;
  --ok: #2f7858;
  --danger: #a8442b;
  --shadow: 0 22px 48px rgba(58, 42, 25, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font: "IBM Plex Sans", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-accent);
}

.page-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 36%),
    repeating-linear-gradient(90deg, transparent 0 120px, rgba(255, 255, 255, 0.08) 120px 121px);
  opacity: 0.45;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(247, 239, 225, 0.76);
  border-bottom: 1px solid rgba(64, 47, 27, 0.08);
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #214838 0%, #37654f 100%);
  color: #fff8f2;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav,
.site-nav form,
.hero-actions,
.button-stack,
.inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button {
  text-decoration: none;
  color: var(--text);
  font: inherit;
}

.layout {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 64px;
}

.status-banner,
.error-banner {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card-strong);
  box-shadow: var(--shadow);
}

.error-banner {
  color: var(--danger);
  background: rgba(168, 68, 43, 0.08);
  border-color: rgba(168, 68, 43, 0.14);
}

.hero,
.cabinet-grid,
.grid {
  display: grid;
  gap: 22px;
}

.hero {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  align-items: stretch;
}

.cabinet-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
}

.grid {
  margin-top: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.card,
.hero-copy,
.hero-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-copy,
.card {
  padding: 30px;
}

.hero-card {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.accent-card {
  background: linear-gradient(145deg, rgba(255, 249, 240, 0.98), rgba(243, 227, 206, 0.9));
}

.metric {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 246, 0.92);
}

.metric span,
.eyebrow,
.muted,
label span {
  color: var(--muted);
}

.metric strong,
.stats-list strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(33, 72, 56, 0.08);
  font-size: 0.92rem;
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(196, 96, 49, 0.14);
}

h1,
h2 {
  margin: 0 0 16px;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: 1.35rem;
}

.lead {
  font-size: 1.08rem;
  line-height: 1.72;
}

.primary-button,
.ghost-button,
.link-button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button,
button.primary-button {
  color: #fff8f2;
  text-decoration: none;
  background: linear-gradient(135deg, #d06d3b 0%, #b34d23 100%);
  box-shadow: 0 14px 28px rgba(179, 77, 35, 0.24);
}

.ghost-button,
.link-button,
button.ghost-button {
  color: var(--accent-alt);
  text-decoration: none;
  background: rgba(255, 251, 246, 0.78);
  border: 1px solid var(--line);
}

.link-button {
  padding-left: 0;
  background: transparent;
  border: none;
}

.primary-button:hover,
.ghost-button:hover,
.link-button:hover,
button:hover {
  transform: translateY(-1px);
}

.single-card {
  max-width: 760px;
  margin: 0 auto;
}

.stats-list {
  display: grid;
  gap: 14px;
}

.stats-list > div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.compact-list > div:last-child,
.stats-list > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.steps,
.timeline {
  margin: 0;
  padding-left: 20px;
  line-height: 1.75;
}

.timeline {
  list-style: none;
  padding-left: 0;
}

.timeline li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.timeline li:last-child {
  border-bottom: none;
}

.timeline li span {
  color: var(--muted);
  text-align: right;
}

.form-stack {
  display: grid;
  gap: 16px;
}

label,
.file-label {
  display: grid;
  gap: 8px;
}

input[type="text"],
input[type="number"],
input[type="file"] {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  background: rgba(255, 252, 247, 0.92);
  color: var(--text);
  font: inherit;
}

.config-textarea {
  width: 100%;
  min-height: 340px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 18px;
  background: rgba(255, 252, 247, 0.96);
  color: var(--text);
  font: 0.96rem/1.6 "IBM Plex Mono", "Courier New", monospace;
  white-space: pre;
}

.wide-button {
  width: 100%;
}

.instruction-card.card,
.card-details,
.callout {
  margin-top: 0;
}

.callout {
  padding: 18px;
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: rgba(255, 251, 246, 0.72);
}

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

.card-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-alt);
}

.login-widget {
  margin-top: 16px;
}

.qr-preview {
  width: min(100%, 320px);
  display: block;
  margin: 0 auto;
  border-radius: 20px;
  background: #fff;
  padding: 14px;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(33, 72, 56, 0.08);
}

@media (max-width: 980px) {
  .hero,
  .cabinet-grid,
  .grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .layout,
  .site-header__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy,
  .card {
    padding: 24px;
  }

  .button-stack,
  .hero-actions,
  .site-nav,
  .site-nav form {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button,
  .link-button,
  button {
    width: 100%;
  }

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

  .timeline li span {
    text-align: left;
  }
}
