:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1d21;
  --muted: #5c6570;
  --accent: #0b6e4f;
  --accent-hover: #095a41;
  --border: #d8dee6;
  --warn-bg: #fff8e6;
  --warn-border: #e6c200;
  --radius: 10px;
  --font: system-ui, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #1c2128;
    --text: #e8eaed;
    --muted: #9aa3ad;
    --accent: #3dd6a0;
    --accent-hover: #2db87f;
    --border: #2d333b;
    --warn-bg: #2a2410;
    --warn-border: #8a7420;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header,
.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 650;
}

main {
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

label span.hint {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

input,
select {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.check-row {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.check-row input {
  width: 1.25rem;
  height: 1.25rem;
  min-height: unset;
}

#usd-kurs-wrap[hidden] {
  display: none;
}

#rucna-stopa-wrap[hidden] {
  display: none;
}

.results h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.results dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  margin: 0;
}

.results dt {
  color: var(--muted);
}

.results dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.results .total dd {
  font-size: 1.15rem;
  color: var(--accent);
}

.steps {
  margin-top: 1rem;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.steps li {
  margin-bottom: 0.25rem;
}

.home-cards {
  display: grid;
  gap: 0.75rem;
}

.home-cards a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.home-cards a:hover {
  border-color: var(--accent);
}

.home-cards .soon {
  opacity: 0.55;
  pointer-events: none;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tab {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.tab.active {
  border-color: var(--accent);
  font-weight: 600;
}

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#plan th,
#plan td {
  padding: 0.35rem 0.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#plan th:first-child,
#plan td:first-child {
  text-align: left;
}