:root {
  color-scheme: light;
  --bg: #ebfff7;
  --paper: rgba(248, 255, 252, 0.92);
  --ink: #062a1d;
  --muted: #45695c;
  --line: rgba(6, 79, 53, 0.14);
  --accent: #00f18e;
  --accent-strong: #00bd6f;
  --accent-deep: #006a45;
  --surface: #f8fffc;
  --shadow: 0 22px 60px rgba(0, 97, 61, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 241, 142, 0.3), transparent 28%),
    radial-gradient(circle at top right, rgba(0, 106, 69, 0.12), transparent 22%),
    linear-gradient(180deg, #f4fff9 0%, #dcfff0 100%);
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  margin-bottom: 24px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 18px 20px;
  border: 1px solid rgba(6, 79, 53, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(0, 241, 142, 0.12), rgba(248, 255, 252, 0.94)),
    var(--paper);
  box-shadow: var(--shadow);
}

.stat-label,
.stat-note {
  display: block;
}

.stat-label {
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.intro,
.status,
.notes li {
  color: var(--muted);
}

.intro {
  max-width: 760px;
  margin: 14px 0 0;
  line-height: 1.65;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 22px;
}

.label,
.section-head {
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
}

.paste-zone,
.code-output,
.preview {
  width: 100%;
  min-height: 240px;
  border: 1px solid rgba(6, 79, 53, 0.18);
  border-radius: 18px;
  background: var(--surface);
}

.paste-zone {
  padding: 18px;
  outline: none;
  line-height: 1.6;
  overflow: auto;
}

.paste-zone:focus {
  border-color: rgba(0, 189, 111, 0.7);
  box-shadow: 0 0 0 4px rgba(0, 241, 142, 0.16);
}

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

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #043222;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(0, 189, 111, 0.18);
  cursor: pointer;
  transition:
    transform 140ms ease,
    background 140ms ease,
    opacity 140ms ease;
}

button:hover {
  background: linear-gradient(135deg, #14f7a0, #00c877);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.status {
  margin: 14px 0 0;
  min-height: 24px;
}

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

.preview,
.code-output {
  padding: 16px;
  overflow: auto;
}

.preview.empty {
  display: grid;
  place-items: center;
}

.preview table {
  border-collapse: collapse;
  width: 100%;
}

.preview th,
.preview td {
  border: 1px solid rgba(0, 106, 69, 0.28);
  padding: 8px 10px;
  vertical-align: top;
}

.code-output {
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.notes {
  margin-top: 20px;
}

.notes ol {
  margin: 14px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.credit-panel {
  margin-top: 20px;
  background:
    linear-gradient(135deg, rgba(0, 241, 142, 0.12), rgba(255, 255, 255, 0.9)),
    #f6fff9;
}

.credit-kicker {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.credit-panel h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  line-height: 1.25;
}

.credit-body {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.credit-body a {
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.credit-body a:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .page {
    width: min(100% - 20px, 1180px);
    padding-top: 24px;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

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

  .panel {
    padding: 18px;
  }
}
