:root {
  --bg-page: #f4f6fb;
  --bg-card: #ffffff;
  --bg-muted: #f9fafc;
  --text-primary: #1f2430;
  --text-muted: #616877;
  --brand: #a31919;
  --brand-dark: #7c0f0f;
  --border-soft: #e2e6f0;
  --border-strong: #c7cedd;
  --shadow-soft: 0 12px 32px rgba(14, 22, 37, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 64px;
}

.hamburger-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20;
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 120px auto 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-soft);
}

.page-header {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.page-intro h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 5vw, 2.6rem);
}

.subtitle {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-points li {
  background: var(--bg-muted);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta {
  border-left: 1px solid var(--border-soft);
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.tag {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(163, 25, 25, 0.1);
  color: var(--brand);
  font-weight: 600;
}

.meta-highlight {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-soft);
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.section-hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.input-box {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0 16px;
  background: var(--bg-muted);
}

.input-prefix {
  color: var(--text-muted);
  font-weight: 600;
}

.input-box input {
  border: none;
  background: transparent;
  width: 100%;
  padding: 18px 0;
  font-size: 1.2rem;
  font-weight: 600;
  outline: none;
}

.input-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(163, 25, 25, 0.12);
  background: #fff;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quick-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-inputs span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
  flex: 1;
  min-width: 140px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(163, 25, 25, 0.25);
}

.primary-btn:hover {
  background: var(--brand-dark);
}

.ghost-btn {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.primary-btn:active,
.ghost-btn:active {
  transform: translateY(1px);
}

.form-helper {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 45, 32, 0.4);
  background: rgba(217, 45, 32, 0.08);
  color: #9f1e16;
  font-weight: 600;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-value {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
}

.result-message {
  margin: 0;
  color: var(--text-muted);
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.summary-item {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid var(--border-soft);
}

.summary-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.summary-value {
  margin: 4px 0 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.insight-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.insight-list li {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-soft);
  padding: 14px 0;
  gap: 16px;
}

.insight-label {
  margin: 0;
  font-weight: 600;
}

.insight-note {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.insight-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tip-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.tip-card h3 {
  margin-top: 0;
}

.tip-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.mini-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Hamburger */
#menu__toggle {
  opacity: 0;
}

#menu__toggle:checked + .menu__btn > span {
  transform: rotate(45deg);
}

#menu__toggle:checked + .menu__btn > span::before {
  top: 0;
  transform: rotate(0deg);
}

#menu__toggle:checked + .menu__btn > span::after {
  top: 0;
  transform: rotate(90deg);
}

#menu__toggle:checked ~ .menu__box {
  right: 0 !important;
}

.menu__btn {
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 21;
}

.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #1f2430;
  transition-duration: 0.25s;
}

.menu__btn > span::before {
  content: '';
  top: -8px;
}

.menu__btn > span::after {
  content: '';
  top: 8px;
}

.menu__box {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100%;
  padding: 100px 0 40px;
  margin: 0;
  list-style: none;
  background-color: #ffffff;
  box-shadow: 0 20px 40px rgba(31, 36, 48, 0.25);
  transition-duration: 0.25s;
}

.menu__item {
  display: block;
  padding: 14px 28px;
  color: var(--text-primary) !important;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.menu__item:hover {
  background-color: var(--bg-muted);
}

@media (max-width: 960px) {
  .page-header {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    border-left: none;
    border-top: 1px solid var(--border-soft);
    padding: 16px 0 0;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 22px 20px;
    border-radius: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .chip-group {
    gap: 6px;
  }
}