* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f7fa;
  color: #222;
  min-height: 100vh;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 60px 20px;
}

header {
  text-align: center;
  margin-bottom: 50px;
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  color: #1e3a5f;
}

.subtitle {
  font-size: 1.1rem;
  color: #555;
}

.cards {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 35px;
  width: 350px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.08);

  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card h2 {
  margin-bottom: 20px;
  color: #1e3a5f;
}

.card p {
  margin-bottom: 30px;
  line-height: 1.6;
  color: #444;
}

.button {
  display: block;
  width: 100%;

  padding: 14px;

  text-align: center;
  text-decoration: none;

  border: none;
  border-radius: 10px;

  background-color: #1e3a5f;
  color: white;

  font-size: 1rem;
  cursor: pointer;

  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: #274d7d;
}

label {
  display: block;
  margin-bottom: 8px;
  margin-top: 20px;
  font-weight: bold;
}

input {
  width: 100%;
  padding: 12px;

  border: 1px solid #ccc;
  border-radius: 8px;

  margin-bottom: 10px;

  font-size: 1rem;
}

.result-card {
  margin-top: 30px;
}

select {
  width: 100%;
  padding: 12px;

  border: 1px solid #ccc;
  border-radius: 8px;

  margin-bottom: 10px;

  font-size: 1rem;
  background-color: white;
}

.helper-text {
  font-size: 0.85rem;
  color: #666;
  margin-top: -4px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.placeholder-text {
  color: #666;
}

.result-total {
  background-color: #f0f5fb;
  border-left: 5px solid #1e3a5f;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.result-total .amount {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #1e3a5f;
  margin-top: 8px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e5e5;
}

.confidence-badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background-color: #eef3f8;
  color: #1e3a5f;
  font-weight: bold;
  margin-top: 10px;
}

.confidence-high {
  background-color: #e6f7ea;
  color: #187a34;
}

.confidence-moderate {
  background-color: #fff4d6;
  color: #9a6700;
}

.confidence-low {
  background-color: #ffe5e5;
  color: #b42318;
}

.notes-box {
  margin-top: 20px;
  padding: 16px;
  background-color: #fafafa;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

.error-message {
  padding: 16px;
  background-color: #fff4f4;
  border-left: 5px solid #b00020;
  border-radius: 10px;
  color: #700018;
}

/* Mobile improvements */
@media (max-width: 600px) {
  .container {
    width: 95%;
    padding: 30px 12px;
  }

  h1 {
    font-size: 2rem;
  }

  .card {
    width: 100%;
    padding: 24px;
  }

  .result-row {
    flex-direction: column;
    gap: 4px;
  }

  .result-total .amount {
    font-size: 1.6rem;
  }
}

.calculate-button {
  width: 100%;

  padding: 18px;

  margin-top: 25px;

  border: none;
  border-radius: 14px;

  background-color: #0f5cc0;

  color: white;

  font-size: 1.15rem;
  font-weight: bold;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;

  box-shadow: 0 6px 14px rgba(15, 92, 192, 0.25);
}

.calculate-button:hover {
  background-color: #0b4ea5;

  transform: translateY(-2px);

  box-shadow: 0 8px 18px rgba(15, 92, 192, 0.35);
}

.calculate-button:active {
  transform: translateY(0);
}

.back-link {
  display: inline-block;
  margin-bottom: 25px;

  color: #1e3a5f;
  font-weight: bold;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

footer {
  margin-top: 80px;
  padding-top: 30px;

  border-top: 1px solid #ddd;

  text-align: center;

  color: #666;

  font-size: 0.9rem;

  line-height: 1.8;
}

.footer-title {
  font-weight: bold;
  color: #1e3a5f;
}

.footer-copy {
  margin-top: 10px;
  color: #999;
}

.info-section {
  margin-top: 60px;
  text-align: center;
}

.info-section h2 {
  color: #1e3a5f;
  margin-bottom: 25px;
}

.info-grid {
  display: flex;
  gap: 25px;
  justify-content: center;
  flex-wrap: wrap;
}

.info-box {
  background-color: white;
  border-radius: 14px;
  padding: 25px;
  width: 350px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  text-align: left;
}

.info-box h3 {
  color: #1e3a5f;
  margin-bottom: 12px;
}

.info-box p {
  color: #555;
  line-height: 1.6;
}

.statement-help {
  margin-bottom: 30px;
}

.statement-help ul {
  margin-top: 10px;
  margin-bottom: 15px;
  padding-left: 20px;
}

.statement-help li {
  margin-bottom: 8px;
  color: #444;
}

.japanese-reading {
  color: #777;
  font-size: 0.9rem;
  font-style: italic;
}

.faq-section {
  margin-top: 70px;
}

.faq-section h2 {
  text-align: center;
  color: #1e3a5f;
  margin-bottom: 30px;
}

.faq-item {
  background-color: white;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.faq-item h3 {
  color: #1e3a5f;
  margin-bottom: 10px;
}

.faq-item p {
  color: #555;
  line-height: 1.6;
}

.education-section {
  margin-top: 70px;
}

.education-section h2 {
  text-align: center;
  color: #1e3a5f;
  margin-bottom: 30px;
}

.accordion-item {
  background-color: white;
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.accordion-button {
  width: 100%;
  padding: 22px;

  border: none;
  background-color: white;

  text-align: left;

  font-size: 1rem;
  font-weight: bold;

  color: #1e3a5f;

  cursor: pointer;

  transition: background-color 0.2s ease;
}

.accordion-button:hover {
  background-color: #f5f7fa;
}

.accordion-content {
  display: none;

  padding: 0 22px 22px 22px;

  color: #555;
  line-height: 1.7;
}

.accordion-item.active .accordion-content {
  display: block;
}

.optional-label {
  color: #888;
  font-size: 0.85rem;
  font-weight: normal;
}

.footer-links {
  margin-top: 14px;
}

.footer-links a {
  display: inline-block;
  margin: 0 12px;
  color: #1e3a5f;
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

.education-section ul {
  margin-top: 14px;
  padding-left: 24px;
}

.education-section li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.education-section .info-box {
  text-align: left;
  line-height: 1.7;
}

.education-section .info-box p {
  margin-bottom: 18px;
}

.education-section .info-box ul {
  margin: 18px 0;
  padding-left: 24px;
}

.education-section .info-box li {
  margin-bottom: 12px;
}

/* Long-form readable content boxes */

.reading-section {
  margin-top: 60px;
}

.reading-box {
  background-color: white;
  border-radius: 14px;
  padding: 32px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  text-align: left;
}

.reading-box p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 20px;
}

.reading-box ul {
  margin: 20px 0 24px 0;
  padding-left: 26px;
}

.reading-box li {
  color: #555;
  line-height: 1.7;
  margin-bottom: 12px;
}

.reading-box p:last-child,
.reading-box li:last-child {
  margin-bottom: 0;
}

.wide-info-box {
  width: 725px;
  max-width: 100%;
}

.wide-info-box p {
  line-height: 1.85;
  margin-bottom: 20px;
}

.wide-info-box ul {
  margin-top: 20px;
  margin-bottom: 24px;

  padding-left: 0;
  list-style-position: inside;
}

.wide-info-box li {
  line-height: 1.8;
  margin-bottom: 14px;
}