/* Shared stylesheet for the consolidated Truth About Social Security app (app.html)
   and the tool modules it mounts. Design tokens match the standalone tools/*.html files
   so migrated tools need little to no visual rework. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Source+Sans+3:wght@300;400;500;600&display=swap');

:root {
  --navy: #0d2240; --gold: #c9a84c; --gold-light: #e8c97a;
  --cream: #f7f3ec; --cream-dark: #ede7da; --text: #1a1a2e;
  --muted: #6b6b7a; --white: #ffffff; --green: #2d6a4f;
  --green-light: #e8f5ee; --border: rgba(201,168,76,0.25);
  --red: #8b2020; --red-light: #fdf2f2;
  --orange: #b45309; --orange-light: #fef3c7;
  --blue: #1a3a6b; --blue-light: #e6f1fb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--navy); font-family: 'Source Sans 3', sans-serif; color: var(--text); min-height: 100vh; display: flex; flex-direction: column; align-items: center; }

/* ── App header ── */
.app-header { width: 100%; background: linear-gradient(135deg, #0a1a30 0%, #0d2240 60%, #142d52 100%); border-bottom: 1px solid var(--border); padding: 28px 24px; position: relative; overflow: hidden; }
.app-header::before { content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 700px; height: 200px; background: radial-gradient(ellipse, rgba(201,168,76,0.12) 0%, transparent 70%); pointer-events: none; }
.app-header-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; position: relative; }
.app-brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.app-brand-title { font-family: 'Playfair Display', serif; font-weight: 900; color: var(--cream); font-size: 19px; }
.app-brand-title span { color: var(--gold); }
.app-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Nav ── */
.app-nav-wrap { width: 100%; background: #0a1a30; border-bottom: 1px solid var(--border); overflow-x: auto; }
.app-nav { max-width: 1080px; margin: 0 auto; display: flex; gap: 4px; padding: 8px 20px; }
.app-nav-item { display: flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: rgba(247,243,236,0.65); background: none; border: none; cursor: pointer; font-family: 'Source Sans 3', sans-serif; transition: all 0.15s; }
.app-nav-item:hover { background: rgba(247,243,236,0.08); color: var(--cream); }
.app-nav-item.active { background: rgba(201,168,76,0.16); color: var(--gold-light); }
.app-nav-item .lock { font-size: 11px; opacity: 0.7; }

/* ── Buttons ── */
.btn-tool { display: flex; align-items: center; gap: 7px; padding: 9px 16px; background: rgba(247,243,236,0.07); border: 1px solid var(--border); border-radius: 8px; color: var(--cream); font-family: 'Source Sans 3', sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.2s; text-decoration: none; }
.btn-tool:hover { background: rgba(247,243,236,0.14); }
.btn-tool svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary { padding: 12px 22px; background: linear-gradient(135deg, var(--gold), var(--gold-light)); border: none; border-radius: 8px; font-family: 'Source Sans 3', sans-serif; font-size: 14px; font-weight: 700; color: var(--navy); cursor: pointer; }
.btn-primary:hover { transform: translateY(-1px); }

/* ── Main / cards ── */
.app-main { width: 100%; max-width: 860px; padding: 32px 20px 60px; display: flex; flex-direction: column; gap: 24px; }
.card { background: var(--cream); border-radius: 12px; border: 1px solid var(--cream-dark); padding: 24px 28px; }
.card h2 { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.card > p { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 16px; }

/* ── License gate ── */
.gate-card { background: var(--cream); border-radius: 12px; border: 1px solid var(--gold); padding: 30px 32px; text-align: center; }
.gate-card .gate-icon { font-size: 34px; margin-bottom: 12px; }
.gate-card h2 { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--navy); margin-bottom: 8px; }
.gate-card p { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 460px; margin: 0 auto 20px; }
.gate-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.gate-form input { flex: 1; min-width: 220px; padding: 12px 14px; border: 1.5px solid var(--cream-dark); border-radius: 8px; font-size: 14px; font-family: 'Source Sans 3', sans-serif; }
.gate-form input:focus { outline: none; border-color: var(--gold); }
.gate-msg { margin-top: 12px; font-size: 13px; font-weight: 600; }
.gate-msg.error { color: var(--red); }
.gate-msg.success { color: var(--green); }

/* ── Checklist module classes (also shared by future tools) ── */
.cl-toolbar { display: flex; justify-content: flex-end; gap: 10px; }
.progress-card { background: var(--cream); border-radius: 12px; border: 1px solid var(--cream-dark); padding: 22px 28px; display: flex; align-items: center; gap: 24px; }
.progress-label .big { font-family: 'Playfair Display', serif; font-size: 40px; font-weight: 900; color: var(--gold); line-height: 1; }
.progress-label .small { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.progress-bar-outer { flex: 1; height: 10px; background: var(--cream-dark); border-radius: 99px; overflow: hidden; }
.progress-bar-inner { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 99px; transition: width 0.5s cubic-bezier(0.34,1.56,0.64,1); width: 0%; }
.progress-status { flex-shrink: 0; font-size: 13px; color: var(--muted); text-align: right; min-width: 72px; }
.progress-status strong { color: var(--text); font-weight: 600; }

.section-card { background: var(--cream); border-radius: 12px; border: 1px solid var(--cream-dark); overflow: hidden; }
.section-header { display: flex; align-items: center; gap: 12px; padding: 15px 24px; border-bottom: 1px solid var(--cream-dark); background: rgba(13,34,64,0.04); }
.section-icon { width: 32px; height: 32px; background: var(--navy); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.section-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: var(--navy); flex: 1; }
.section-count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--cream-dark); padding: 3px 11px; border-radius: 99px; white-space: nowrap; }
.section-count.done { background: var(--green-light); color: var(--green); }

.checklist { display: flex; flex-direction: column; }
.item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 24px; border-bottom: 1px solid var(--cream-dark); cursor: pointer; background: var(--white); transition: background 0.15s; -webkit-user-select: none; user-select: none; }
.item:last-child { border-bottom: none; }
.item:hover { background: var(--cream); }
.item.checked { background: var(--green-light); }
.item.skipped { background: var(--red-light); opacity: 0.82; }

.check-box { width: 24px; height: 24px; border: 2px solid var(--cream-dark); border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-top: 2px; transition: all 0.18s; background: var(--white); color: transparent; }
.item:hover .check-box { border-color: var(--gold); }
.item.checked .check-box { background: var(--green); border-color: var(--green); color: #fff; }
.item.skipped .check-box { background: #c9a0a0; border-color: #c9a0a0; color: #fff; font-size: 12px; }

.item-body { flex: 1; min-width: 0; }
.priority { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; margin-bottom: 5px; }
.priority.high { background: rgba(201,168,76,0.18); color: #7a5c0a; }
.priority.medium { background: rgba(13,34,64,0.08); color: var(--navy); }
.priority.low { background: var(--green-light); color: var(--green); }

.item-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.item.checked .item-title { text-decoration: line-through; color: var(--muted); }
.item-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }
.item-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; font-size: 12px; font-weight: 600; color: var(--navy); text-decoration: none; background: rgba(13,34,64,0.07); padding: 3px 10px; border-radius: 4px; transition: background 0.15s; }
.item-link:hover { background: rgba(13,34,64,0.13); }
.item-actions { flex-shrink: 0; margin-top: 2px; }
.btn-skip { font-size: 11px; font-weight: 600; letter-spacing: 0.3px; color: var(--muted); background: none; border: 1px solid var(--cream-dark); border-radius: 4px; padding: 4px 9px; cursor: pointer; white-space: nowrap; font-family: 'Source Sans 3', sans-serif; transition: all 0.15s; }
.btn-skip:hover { border-color: #c9a0a0; color: var(--red); background: var(--red-light); }
.item.skipped .btn-skip { border-color: #c9a0a0; color: var(--red); background: var(--red-light); }

.summary-card { background: var(--cream); border-radius: 12px; border: 1px solid var(--cream-dark); padding: 24px 28px; }
.summary-card h2 { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 480px) { .summary-grid { grid-template-columns: 1fr 1fr; } }
.stat-box { background: var(--white); border: 1px solid var(--cream-dark); border-radius: 8px; padding: 14px; text-align: center; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 900; line-height: 1; margin-bottom: 5px; }
.stat-num.gold { color: var(--gold); }
.stat-num.neutral { color: var(--muted); }
.stat-num.navy { color: var(--navy); }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.storage-note { font-size: 13px; color: var(--muted); line-height: 1.6; }

.complete-panel { display: none; background: var(--navy); border-radius: 12px; border: 1px solid var(--border); padding: 36px 28px; text-align: center; }
.complete-panel.visible { display: block; animation: fadeUp 0.5s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.complete-panel .trophy { font-size: 44px; margin-bottom: 14px; }
.complete-panel h2 { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 900; color: var(--gold); margin-bottom: 10px; }
.complete-panel p { font-size: 15px; color: rgba(247,243,236,0.65); max-width: 420px; margin: 0 auto; line-height: 1.65; font-weight: 300; }

.cl-confetti-wrap { position: fixed; inset: 0; pointer-events: none; z-index: 999; display: none; }
.cl-confetti-wrap.active { display: block; }
.confetti-piece { position: absolute; animation: confettiFall 1.8s ease-in forwards; }
@keyframes confettiFall { 0% { transform: translateY(-20px) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }

/* ── Placeholder / coming-soon panel for tools not yet migrated ── */
.stub-card { background: var(--cream); border-radius: 12px; border: 1px dashed var(--cream-dark); padding: 30px 28px; text-align: center; }
.stub-card p { font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 440px; margin: 0 auto 16px; }

.disclaimer-footer { max-width: 900px; margin: 40px auto 24px; padding: 16px 20px 0; text-align: center; font-size: 12px; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--border); }

@media print {
  .app-header, .app-nav-wrap, .cl-toolbar, .item-actions, .gate-card { display: none !important; }
  body { background: white; }
  .item.checked, .item.skipped { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
