/* Car Depreciation Calculator — slate / amber theme */

:root {
  --bg: #1c1e24;
  --bg-card: #282b34;
  --bg-elevated: #343842;
  --text: #eef0f4;
  --text-muted: #9aa0b0;
  --accent: #f0a84a;
  --accent-soft: rgba(240, 168, 74, 0.18);
  --accent-hover: #f5b866;
  --success: #f0c878;
  --success-soft: rgba(240, 168, 74, 0.15);
  --success-border: rgba(240, 168, 74, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --btn-text: #1c1e24;
  --header-bg: rgba(28, 30, 36, 0.88);
  --glow1: rgba(240, 168, 74, 0.12);
  --glow2: rgba(100, 140, 200, 0.06);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--glow1), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, var(--glow2), transparent);
}

.site-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lang-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
  outline: none;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}

.tagline {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.disclaimer {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field input[type="number"],
.field select {
  appearance: none;
  -moz-appearance: textfield;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field input[type="number"]:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239a9ab8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.9rem center;
  padding-inline-start: 2.2rem;
}

html[dir="rtl"] .field select {
  background-position: right 0.9rem center;
  padding-inline-start: 0.9rem;
  padding-inline-end: 2.2rem;
}

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.calc-btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: var(--btn-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.25rem;
}

.calc-btn:hover,
.calc-btn:focus-visible {
  background: var(--accent-hover);
  outline: none;
}

.calc-btn:active {
  transform: scale(0.98);
}

.result {
  margin-top: 1.35rem;
  padding: 1.15rem 1rem;
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  border-radius: 12px;
  text-align: center;
}

.result[hidden] {
  display: none;
}

.result-label {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-main {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--success);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.result-sub {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.result-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.size-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.size-key {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.size-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--success);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.chart h2,
.howto h2,
.tips h2,
.info h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.chart-note {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.howto ol,
.tips ul,
.info ul {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.howto li,
.tips li,
.info li {
  margin-bottom: 0.45rem;
}

.howto li:last-child,
.tips li:last-child,
.info li:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 1.25rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

.ad-slot {
  display: none;
}

@media (min-width: 480px) {
  .logo {
    font-size: 1.25rem;
  }

  .card {
    padding: 1.5rem 1.5rem;
  }

  .result-main {
    font-size: 2rem;
  }
}

@media (max-width: 360px) {
  .size-grid {
    grid-template-columns: 1fr;
  }
}

