* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: #333;
}

main {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
  font-size: 32px;
  margin-bottom: 8px;
  text-align: center;
  color: #333;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  text-align: center;
  color: #888;
  font-size: 14px;
  margin-bottom: 28px;
}

.calculator {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

input[type="date"] {
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
}

input[type="date"]:focus {
  outline: none;
  border-color: #667eea;
}

button {
  padding: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  font-family: inherit;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

button:active {
  transform: translateY(0);
}

.result {
  margin-top: 16px;
  padding: 24px 20px;
  background: #f0f4ff;
  border-radius: 12px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: #667eea;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

.quick-links {
  margin-top: 28px;
}

.quick-links h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #666;
  font-weight: 600;
}

.buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.buttons-grid button {
  background: #f5f5f7;
  color: #333;
  font-size: 13px;
  padding: 12px 8px;
  font-weight: 500;
}

.buttons-grid button:hover {
  background: #e8e8ec;
  box-shadow: none;
  transform: none;
}

.faq {
  margin-top: 32px;
  border-top: 1px solid #eee;
  padding-top: 24px;
}

.faq h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #333;
}

details {
  margin-bottom: 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
}

details:last-child {
  border-bottom: none;
}

summary {
  font-weight: 600;
  color: #667eea;
  padding: 6px 0;
  list-style: none;
  position: relative;
  padding-left: 20px;
}

summary::before {
  content: "▸";
  position: absolute;
  left: 0;
  transition: transform 0.2s;
}

details[open] summary::before {
  transform: rotate(90deg);
}

summary::-webkit-details-marker {
  display: none;
}

details p {
  padding: 8px 0 4px 20px;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

footer {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: #aaa;
}

@media (max-width: 400px) {
  h1 { font-size: 26px; }
  .result { font-size: 22px; }
  .buttons-grid { grid-template-columns: 1fr; }
}