:root {
  --green: #0ea32b;
  --green-dark: #0a7d20;
  --green-deep: #064f14;
  --green-light: #d4f5db;
  --text: #0d1f12;
  --muted: #587060;
  --line: #dde8df;
  --bg: #f4f7f5;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--green-dark);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.brand {
  font-weight: 800;
  color: var(--green-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-right .lang-toggle,
.topbar-right .lang-switch {
  order: 1;
}

.topbar-right .nav-links {
  order: 2;
}

.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green-light);
}

.lang-switch,
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none !important;
  outline: none;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  border-radius: 50px;
  padding: 4px 10px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: all 0.2s;
}

.lang-btn.active {
  background: #ffffff;
  color: var(--green-dark);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.lang-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(14, 163, 43, 0.22);
}

.container {
  max-width: 1000px;
  margin: 18px auto 44px;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

p, li {
  font-size: 15px;
}

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

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  background: #e8f7eb;
  color: #0a6e1d;
  font-size: 12px;
  font-weight: 700;
}

.notice {
  border-left: 4px solid var(--green);
  background: #f2fbf4;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px;
  font-size: 14px;
  vertical-align: top;
}

th {
  text-align: left;
  background: #f5fbf6;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c9dbce;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
}

textarea {
  resize: vertical;
}

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

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn.alt {
  background: #eef8f0;
  color: var(--green-deep);
}

.result {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #9ac7a2;
  border-radius: 10px;
  background: #f5fcf6;
}

.result pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

footer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 20px 12px 30px;
}

@media (max-width: 760px) {
  .topbar-inner {
    align-items: flex-start;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

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