:root { --bg:#fafafa; --card:#fff; --text:#111; --muted:#666; --border:#e6e6e6; --accent:#111; }
* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: var(--bg); color: var(--text); }
.wrap { max-width: 920px; margin: 0 auto; padding: 22px; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap: 12px; margin-bottom: 14px; }
.brand a { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -0.02em; }
.nav { display:flex; gap: 10px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-size: 14px; padding: 8px 10px; border-radius: 10px; }
.nav a:hover { background: #f0f0f0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 18px 0 8px; }
h3 { font-size: 16px; margin: 16px 0 6px; font-weight: 700; }
p, li { line-height: 1.55; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: block; font-size: 13px; margin-bottom: 6px; color: #333; font-weight: 600; }
.input-with-unit { display: flex; gap: 6px; }
.input-with-unit input { flex: 1; }
.input-with-unit select { padding: 10px 8px; border: 1px solid #d8d8d8; border-radius: 10px; font-size: 13px; background: #fff; cursor: pointer; min-width: 90px; flex-shrink: 0; }
.marker-info { font-size: 11px; color: #666; font-style: italic; line-height: 1.3; flex: 1; align-self: center; margin-left: 6px; }
input { width: 100%; padding: 10px 12px; border: 1px solid #d8d8d8; border-radius: 10px; font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s; }
input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); }
select { transition: border-color 0.2s, box-shadow 0.2s; }
select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display:flex; gap: 10px; align-items:center; flex-wrap: wrap; }
.age-display { margin-top: 12px; padding: 12px; background: #f0f8ff; border: 1px solid #b3d9ff; border-radius: 10px; font-size: 14px; color: #0066cc; }
button { padding: 10px 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; font-size: 15px; }
button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
button[type="submit"] { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 12px 24px; }
button.secondary { background:#eee; color:#111; }
button.secondary:hover { background:#e0e0e0; }
.out { margin-top: 14px; padding: 12px; background: #f5f7ff; border: 1px solid #dfe4ff; border-radius: 12px; animation: fadeInUp 0.5s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.err { margin-top: 14px; padding: 12px; background: #fff2f2; border: 1px solid #ffd6d6; border-radius: 12px; color: #c00; font-weight: 700; }
code { background: #f3f3f3; padding: 2px 6px; border-radius: 6px; }
.footer { margin-top: 16px; font-size: 12px; color: var(--muted); }
.adbox { margin: 14px 0; padding: 10px; border: 2px dashed #cfcfcf; border-radius: 12px; color: #777; font-size: 13px; background: #fafafa; text-align: center; min-height: 100px; display: flex; align-items: center; justify-content: center; }
.info-icon { display: inline-block; width: 16px; height: 16px; background: #4a90e2; color: #fff; border-radius: 50%; text-align: center; line-height: 16px; font-size: 11px; font-weight: bold; margin-left: 6px; cursor: pointer; position: relative; user-select: none; }
.info-icon:hover .tooltip { display: block; }
.info-icon.active .tooltip { display: block; }
.tooltip { display: none; position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 12px; white-space: nowrap; z-index: 1000; font-weight: normal; max-width: 250px; }
.tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #333; }
.age-comparison { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.age-comparison.younger { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.age-comparison.older { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* Hero Section */
.hero-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 40px 28px; border-radius: 16px; margin-bottom: 24px; text-align: center; box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3); }
.hero-title { font-size: 32px; font-weight: 800; margin: 0 0 12px 0; line-height: 1.2; }
.hero-subtitle { font-size: 17px; margin: 0 0 28px 0; opacity: 0.95; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.hero-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-number { display: block; font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.stat-label { display: block; font-size: 13px; opacity: 0.9; }
.hero-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge { background: rgba(255,255,255,0.2); padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; backdrop-filter: blur(10px); }

/* FAQ Section */
.faq-section { margin-top: 32px; }
.faq-item { border: 1px solid #e6e6e6; border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: #fafafa; }
.faq-question { padding: 14px 18px; font-weight: 600; cursor: pointer; user-select: none; position: relative; padding-right: 40px; font-size: 15px; }
.faq-question:hover { background: #f0f0f0; }
.faq-question::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 600; transition: transform 0.3s; }
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; background: white; }
.faq-item.active .faq-answer { max-height: 500px; padding: 14px 18px; border-top: 1px solid #e6e6e6; }
.faq-answer p { margin: 0; font-size: 14px; line-height: 1.6; color: #333; }
.faq-answer a { color: #4a90e2; text-decoration: underline; }

/* Enhanced Results Display */
.results-enhanced { margin-top: 14px; }
.gauge-container { text-align: center; margin: 20px 0; }
.gauge { width: 200px; height: 200px; margin: 0 auto 16px; position: relative; }
.gauge-circle { fill: none; stroke: #e6e6e6; stroke-width: 12; }
.gauge-progress { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray 1s ease; transform: rotate(-90deg); transform-origin: center; }
.gauge-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.gauge-number { font-size: 36px; font-weight: 800; color: #111; display: block; }
.gauge-label { font-size: 13px; color: #666; display: block; margin-top: 4px; }
.result-insight { background: #f5f7ff; border: 2px solid #dfe4ff; border-radius: 12px; padding: 18px; margin: 16px 0; }
.result-insight h3 { margin: 0 0 10px 0; font-size: 18px; color: #333; }
.result-insight p { margin: 0; font-size: 14px; line-height: 1.6; color: #555; }
.share-section { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid #e6e6e6; }
.share-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.share-btn { padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 6px; transition: transform 0.2s, opacity 0.2s; }
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.share-btn.twitter { background: #1da1f2; color: white; }
.share-btn.facebook { background: #4267b2; color: white; }
.share-btn.copy { background: #4a90e2; color: white; }
.recommendation-box { background: #fff9e6; border: 2px solid #ffd966; border-radius: 10px; padding: 16px; margin-top: 16px; }
.recommendation-box h4 { margin: 0 0 10px 0; font-size: 16px; color: #333; }
.recommendation-box ul { margin: 0; padding-left: 20px; }
.recommendation-box li { font-size: 14px; line-height: 1.8; color: #555; }

/* Info Callout */
.info-callout { display: flex; gap: 16px; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); border-radius: 12px; padding: 20px; margin: 20px 0; align-items: flex-start; }
.info-icon-large { font-size: 32px; line-height: 1; flex-shrink: 0; }

/* Understanding Results Section */
.understanding-section { margin: 40px 0; padding: 24px; background: #fafafa; border-radius: 14px; }
.result-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.result-guide-item { background: white; padding: 18px; border-radius: 10px; border-left: 4px solid #ccc; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.result-guide-icon { font-size: 28px; margin-bottom: 8px; }
.result-guide-item h3 { margin: 0 0 8px 0; font-size: 15px; color: #333; font-weight: 700; }
.result-guide-item p { margin: 0; font-size: 13px; line-height: 1.5; color: #666; }

/* Related Resources */
.related-resources { margin: 40px 0 24px 0; padding: 24px; background: #f9f9f9; border-radius: 14px; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.resource-card { background: white; padding: 20px; border-radius: 10px; text-decoration: none; color: inherit; display: block; border: 2px solid #e6e6e6; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.resource-card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); border-color: #4a90e2; }
.resource-icon { font-size: 36px; margin-bottom: 12px; }
.resource-card h4 { margin: 0 0 8px 0; font-size: 16px; color: #333; font-weight: 700; }
.resource-card p { margin: 0; font-size: 13px; line-height: 1.5; color: #666; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 15px; }
  .hero-stats { gap: 20px; }
  .stat-number { font-size: 20px; }
  .result-guide-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .info-callout { flex-direction: column; align-items: center; text-align: center; }
  .share-buttons { flex-direction: column; }
  .share-btn { width: 100%; justify-content: center; }
  .hero-section { padding: 28px 20px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav { width: 100%; justify-content: flex-start; }
  .wrap { padding: 16px; }
  table { font-size: 13px !important; }
  table td, table th { padding: 8px !important; display: block; width: 100% !important; }
  table th { background: #f5f5f5 !important; }
  table td { border-bottom: none !important; }
  table tr { display: block; margin-bottom: 16px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
  table td:first-child { background: #f9f9f9; font-weight: 600; }
  .tooltip { white-space: normal; max-width: 350px; font-size: 11px; line-height: 1.4; }
  .prep-boxes { grid-template-columns: 1fr !important; }
}

