:root {
  --bg-a: #f4efe4;
  --bg-b: #d2e7d6;
  --ink: #1f2629;
  --ink-soft: #4d5a5e;
  --panel: rgba(255, 255, 255, 0.78);
  --line: rgba(31, 38, 41, 0.16);
  --accent: #1c7f6a;
  --accent-strong: #0f5f4e;
  --warn: #b04242;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.8), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(28, 127, 106, 0.2), transparent 44%),
    linear-gradient(135deg, var(--bg-a), var(--bg-b));
}

.layout {
  width: min(1080px, 92vw);
  margin: 6vh auto;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

h1,
h2 {
  margin: 0 0 0.65rem;
}

h1 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.subtitle,
.note {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.subtitle {
  margin-bottom: 1rem;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
}

.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.84rem;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--accent);
  color: #fff;
}

.form {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-weight: 500;
}

.hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.45;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

input:focus,
select:focus {
  outline: 2px solid color-mix(in oklab, var(--accent) 70%, white);
  outline-offset: 2px;
  border-color: var(--accent);
}

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

.result-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0.1rem;
  border-bottom: 1px dashed var(--line);
}

.result-list strong {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.error {
  min-height: 1.2rem;
  margin: 0.75rem 0 0;
  color: var(--warn);
  font-size: 0.95rem;
}

.note {
  margin-top: 0.7rem;
  font-size: 0.9rem;
}

a {
  color: var(--accent-strong);
}

.pricing-panel {
  grid-column: 1 / -1;
}

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

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.pricing-table th,
.pricing-table td {
  text-align: left;
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.pricing-table th {
  color: var(--ink-soft);
  font-weight: 600;
}

.pricing-table tr.is-selected {
  background: rgba(28, 127, 106, 0.12);
}

@media (max-width: 640px) {
  .layout {
    margin: 1rem auto;
    grid-template-columns: 1fr;
  }
  .panel {
    border-radius: 14px;
    padding: 1rem;
  }
}
