:root {
  --ink: #122018;
  --ink-soft: #3a4a40;
  --paper: #f3efe6;
  --paper-2: #e8e2d4;
  --panel: rgba(255, 252, 246, 0.88);
  --line: rgba(18, 32, 24, 0.12);
  --accent: #c45c26;
  --accent-deep: #8f3d12;
  --teal: #1f6f5b;
  --teal-soft: #d7ebe4;
  --warn: #9a3412;
  --ok: #166534;
  --fail: #991b1b;
  --shadow: 0 18px 50px rgba(18, 32, 24, 0.08);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(31, 111, 91, 0.18), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(196, 92, 38, 0.16), transparent 36%),
    linear-gradient(160deg, #f7f3ea 0%, #ebe4d5 48%, #e2ecE7 100%);
  background-attachment: fixed;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(18, 32, 24, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 32, 24, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-deep);
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  animation: rise 0.55s ease both;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand strong {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 252, 246, 0.9);
  border-color: var(--line);
  transform: translateY(-1px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--teal-soft);
  color: var(--teal);
}

.badge.mock {
  background: #fde7d8;
  color: var(--accent-deep);
}

.badge.live {
  background: #dcfce7;
  color: var(--ok);
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  animation: rise 0.65s ease both;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  padding: 1.25rem 1.35rem;
}

.panel h1,
.panel h2,
.panel h3 {
  font-family: var(--font-display);
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
}

.panel h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.15;
}

.lede {
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 0 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.05rem;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: #f8f4eb;
  box-shadow: 0 10px 24px rgba(18, 32, 24, 0.18);
}

.btn-primary:hover {
  background: #1d3228;
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff7f0;
}

.btn-accent:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.stat-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}

.stat-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-list strong {
  font-family: var(--font-display);
}

.messages {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  animation: rise 0.4s ease both;
}

.messages li {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.messages .success {
  border-color: rgba(22, 101, 52, 0.25);
  background: #ecfdf3;
  color: var(--ok);
}

.messages .error {
  border-color: rgba(153, 27, 27, 0.25);
  background: #fef2f2;
  color: var(--fail);
}

.messages .warning,
.messages .info {
  border-color: rgba(154, 52, 18, 0.2);
  background: #fff7ed;
  color: var(--warn);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffcf7;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 111, 91, 0.35);
  border-color: var(--teal);
}

.helptext {
  font-weight: 400;
  font-size: 0.8rem;
  color: #66756c;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.checkbox input {
  width: auto;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #66756c;
}

.status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #eef2ef;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.ok {
  background: #dcfce7;
  color: var(--ok);
}

.status.fail {
  background: #fee2e2;
  color: var(--fail);
}

.status.warn {
  background: #ffedd5;
  color: var(--warn);
}

.empty {
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  text-align: center;
}

.flow-steps {
  display: grid;
  gap: 0.85rem;
  counter-reset: step;
}

.flow-steps article {
  position: relative;
  padding-left: 2.6rem;
}

.flow-steps article::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #f8f4eb;
  font-weight: 700;
  font-size: 0.85rem;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  background: #1b2a22;
  color: #e7f2eb;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.footer-note {
  margin-top: 2rem;
  color: #66756c;
  font-size: 0.85rem;
  text-align: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .hero,
  .grid-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .nav {
    justify-content: flex-start;
  }
}
