:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #dbe3ee;
  --accent: #0f4c81;
  --accent-soft: #eaf3fb;
  --shadow: 0 16px 40px rgba(15, 76, 129, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #f9fbfd 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero {
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.subtle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

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

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input, select {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.12);
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -2px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.primary {
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: var(--accent-soft);
  color: var(--accent);
}

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

.result {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fbfdff;
}

.result .label {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.result .value {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.result.wide {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #f8fcff 0%, #eef7ff 100%);
  border-color: #cfe1f2;
}

.status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  display: none;
}

.status.show {
  display: block;
}

.status.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.status.warn {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.notes {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 820px) {
  .grid,
  .results,
  .field-grid {
    grid-template-columns: 1fr;
  }
}