/* ===============================
   Base & Reset
================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f9f9f9;
  color: #333;
}

/* ===============================
   Layout
================================ */

.container {
  max-width: 520px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Reduce space between header and main content */
main.container {
  margin-top: 20px;
}

/* ===============================
   Header
================================ */

.site-header {
  background: transparent;
  border-bottom: none;
  margin: 0;
  padding: 8px 0;
}

.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-header img {
  height: 38px;
  width: auto;
}

.site-header .container {
  margin: 0 auto;
  padding: 0;
}

/* ===============================
   Typography
================================ */

h1 {
  text-align: center;
  font-size: 2rem;
  color: #1a73e8;
  margin-bottom: 10px;
}

h2 {
  color: #1a73e8;
  margin-top: 40px;
  margin-bottom: 15px;
}

h3 {
  color: #1a73e8;
  margin-top: 30px;
}

p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 10px 0;
}

.hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #777;
  text-align: center;
  font-style: italic;
}

.intro {
  text-align: center;
  margin-bottom: 30px;
  color: #555;
}

/* ===============================
   Jump Links (On this page)
================================ */

.jump-links {
  margin: 10px 0 20px;
}

.jump-links .hint {
  margin-top: 0;
  text-align: center;
}

.jump-links a {
  color: #1a73e8;
  text-decoration: none;
  font-style: normal; /* override .hint italics for links */
  font-weight: 600;
}

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

.jump-hint { margin-top: 10px; }

/* ===============================
   Forms & Inputs
================================ */

label {
  display: block;
  margin-bottom: 20px;
  font-weight: 600;
}

input[type="date"],
input[type="number"],
select {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: #1a73e8;
}

/* Optional: if you adopt a consistent “field wrapper” pattern */
.field {
  margin-bottom: 20px;
}

.field label {
  margin-bottom: 0;
}

.field input,
.field select {
  margin-top: 6px;
}

/* Optional: generic button style (safe even if you don't currently use buttons) */
button,
.btn-primary {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border-radius: 8px;
  border: 1px solid #1a73e8;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: #1a73e8;
  color: #fff;
}

button:hover,
.btn-primary:hover {
  background: #155ab6;
}

/* ===============================
   Results Box
================================ */

.result {
  margin-top: 5px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  font-size: 1.05rem;
}

.result p {
  margin: 8px 0;
}

/* ===============================
   Related Tools / Internal Links
================================ */

.related-tools {
  margin-top: 40px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.related-tools h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.related-tools ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-tools li {
  margin: 8px 0;
}

.related-tools a {
  text-decoration: none;
  color: #1a73e8;
  font-weight: 600;
}

.related-tools a:hover {
  text-decoration: underline;
}

/* ===============================
   Retirement Page Components
   (moved from /retirement-age-calculator inline styles)
================================ */

details {
  margin-top: 30px;
  background: #fff;
  border-radius: 10px;
  padding: 15px 18px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

details summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a73e8;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: "▶ ";
  display: inline-block;
  margin-right: 6px;
}

details[open] summary::before {
  content: "▼ ";
}

.retirement-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 0.95rem;
}

.retirement-table th,
.retirement-table td {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}

.retirement-table th {
  background: #f4f7fb;
  font-weight: 700;
}

.retirement-table tr:last-child td {
  border-bottom: none;
}

/* ===============================
   Footer
================================ */

.site-footer {
  background: transparent;
  border-top: none;
  margin-top: 40px;
}

.site-footer .container {
  text-align: center;
  padding: 10px 0;
}

.footer-links {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 6px;
  line-height: 1.5;
}

.footer-links a {
  color: #777;
  text-decoration: none;
}

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

.site-footer a {
  color: #777;
  text-decoration: none;
}

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

.footer-copy {
  font-size: 0.75rem;
  color: #999;
  margin: 0;
}

/* ===============================
   Mobile
================================ */

@media (max-width: 400px) {
  .container {
    margin: 25px auto;
    padding: 0 15px;
  }

  h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .site-header img {
    height: 32px;
  }
}

/* ===============================
   Birth-Year Tables
================================ */

.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  border: 1px solid #e0e0e0;
  padding: 8px 10px;
  text-align: left;
}

.data-table thead {
  background: #f4f6f8;
  font-weight: 600;
}

.data-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* Birth-year hero card (inside .result) */

#age-today {
  margin-top: 10px;
}

.birthyear-card {
  padding: 20px 24px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e6e8eb;
  border-left: 4px solid #1a73e8;  /* subtle brand accent */
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.05);
  margin: 8px 0;
}

.birthyear-card:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.07);
}

.birthyear-card__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.birthyear-card__meta {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.birthyear-card__context {
  font-size: 16px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

.birthyear-card__age {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.birthyear-card__age strong {
  white-space: nowrap;
}

.birthyear-nowrap {
  white-space: nowrap;
}

/* Birth-year inline control (milestones section) */
.birthyear-inline {
  display: inline-block;
  margin: 8px 0 4px;
}

.birthyear-inline select {
  margin-top: 6px;
  width: 100%;
  max-width: 320px;
}