:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1e2428;
  --muted: #5b6670;
  --border: #d9d5cc;
  --accent: #0b5c6b;
  --accent-soft: #e0f1f3;
}

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

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f6f4ef 0%, #eef0f2 100%);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 6px 6px;
}

.skip-link:focus {
  left: 1rem;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.site-name {
  font-weight: 700;
  margin: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

.hero {
  padding: 2.5rem 0 1rem;
}

.page-hero {
  padding: 2.5rem 0 1.5rem;
}

h1 {
  font-size: clamp(1.9rem, 2.8vw, 2.5rem);
  margin-bottom: 0.5rem;
}

h2 {
  margin-top: 0;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 48rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 2rem;
  padding-bottom: 2rem;
}

.calculator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 12px 24px rgba(15, 20, 25, 0.08);
}

.calculator-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fdfdfb;
  font-size: 1rem;
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.results {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--accent-soft);
}

.result-label {
  font-weight: 600;
}

.result-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.sidebar {
  display: grid;
  gap: 1.5rem;
}

.ad-slot {
  border: 2px dashed var(--border);
  border-radius: 12px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  background: #f9f7f2;
  font-weight: 600;
}

.ad-slot-content {
  padding: 1.25rem;
  text-align: left;
}

.ad-slot-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--text);
}

.ad-slot ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-weight: 500;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.info-card--empty {
  min-height: 200px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.info-card ul {
  padding-left: 1.2rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.explain,
.content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #f1efea;
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
}

.footer-inner nav {
  display: flex;
  gap: 1rem;
}

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

  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .calculator-form {
    grid-template-columns: 1fr;
  }

  .result {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}
