/* Reset + base */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #1e293b;
  background: #ffffff;
}
a { color: #0f766e; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #134e4a; }
img { max-width: 100%; height: auto; }

/* Layout */
.container { max-width: 760px; margin: 0 auto; padding: 0 20px; }
main { padding: 32px 0 48px; }

/* Header */
header.site-header {
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.site-brand {
  font-weight: 700;
  font-size: 18px;
  color: #0f172a;
  text-decoration: none;
}
nav.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
nav.site-nav a {
  font-size: 14px;
  color: #334155;
  text-decoration: none;
  padding: 4px 0;
}
nav.site-nav a:hover { color: #0f766e; }

/* Typography */
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 20px; color: #0f172a; }
h2 { font-size: 22px; line-height: 1.3; margin: 36px 0 12px; color: #0f172a; }
h3 { font-size: 18px; line-height: 1.35; margin: 24px 0 8px; color: #0f172a; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}
th, td {
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th { background: #f8fafc; font-weight: 600; }
tbody tr:nth-child(even) { background: #fafbfc; }

/* Calculator card */
.calc-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  margin: 24px 0 32px;
}
.calc-card h2 { margin-top: 0; font-size: 20px; }
.calc-field { margin-bottom: 16px; }
.calc-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #334155;
}
.calc-field input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  min-height: 44px;
}
.calc-field input[type="number"]:focus {
  outline: 2px solid #0f766e;
  outline-offset: -1px;
  border-color: #0f766e;
}
.calc-help { font-size: 13px; color: #64748b; margin: 4px 0 0; }

#resultCard {
  margin-top: 20px;
  padding: 20px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
}
#resultCard.hidden { display: none; }
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #cbd5e1;
}
.result-row:last-of-type { border-bottom: none; }
.result-row.total {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 2px solid #0f766e;
  border-bottom: none;
}
.result-label { color: #475569; }
.result-value { font-weight: 600; font-variant-numeric: tabular-nums; }
#breakdownLine {
  font-size: 13px;
  color: #64748b;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ccfbf1;
}
#wageBaseWarning {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 13px;
  color: #78350f;
}
#wageBaseWarning.hidden { display: none; }

.btn-reset {
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 14px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}
.btn-reset:hover { background: #e2e8f0; }

/* Disclaimer + footer */
.disclaimer {
  margin: 32px 0 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border-left: 4px solid #94a3b8;
  font-size: 14px;
  color: #475569;
}
.last-updated { font-size: 13px; color: #94a3b8; margin-top: 8px; }

footer.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 24px 0 32px;
  margin-top: 48px;
  font-size: 14px;
  color: #64748b;
}
footer.site-footer a { color: #475569; margin-right: 16px; text-decoration: none; }
footer.site-footer a:hover { color: #0f766e; }
footer .footer-links { margin-bottom: 12px; }

/* Mobile */
@media (max-width: 600px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .calc-card { padding: 20px 16px; }
  .site-header .container { flex-direction: column; align-items: flex-start; }
}
