:root {
  --navy: #14233c;
  --navy-2: #1d3354;
  --steel: #41546f;
  --accent: #e8762d;
  --accent-dark: #c95f1b;
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #e3e7ed;
  --text: #232a33;
  --muted: #5d6b7c;
  --green: #1e7e44;
  --red: #b3392e;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.65; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* Header */
header { background: var(--navy); color: #fff; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { font-size: 1.25rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav a.navlink { color: #cfd8e4; text-decoration: none; margin-left: 22px; font-size: 0.95rem; }
.nav a.navlink:hover { color: #fff; }

/* Hero */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 56px 0 64px; }
.hero h1 { font-size: 2.3rem; line-height: 1.2; letter-spacing: -0.02em; max-width: 640px; }
.hero p { margin-top: 16px; font-size: 1.15rem; color: #c6d2e1; max-width: 600px; }
.hero .cta-row { margin-top: 28px; }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; padding: 13px 26px; border-radius: 8px; font-size: 1rem; }
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: transparent; border: 2px solid #5d7392; margin-left: 12px; }
.btn.secondary:hover { background: rgba(255,255,255,0.08); }

/* Sections */
main { padding: 48px 0 24px; }
section { margin-bottom: 56px; }
h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin-bottom: 18px; color: var(--navy); }
h3 { font-size: 1.2rem; margin: 28px 0 10px; color: var(--navy); }
p { margin-bottom: 14px; }
ul, ol { margin: 0 0 16px 24px; }
li { margin-bottom: 6px; }
a { color: var(--navy-2); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; text-decoration: none; color: var(--text); display: block; }
.card:hover { border-color: var(--steel); box-shadow: 0 2px 10px rgba(20,35,60,0.08); }
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.card .score { font-weight: 800; color: var(--navy); font-size: 1.4rem; }
.card .soon { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Top pick box */
.pick { background: var(--card); border: 2px solid var(--accent); border-radius: 12px; padding: 28px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.pick .badge { background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 4px; }
.pick h3 { margin: 10px 0 6px; font-size: 1.3rem; }
.pick p { margin: 0; color: var(--muted); max-width: 480px; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; background: var(--card); font-size: 0.95rem; }
th { background: var(--navy); color: #fff; text-align: left; padding: 11px 14px; font-weight: 600; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
tr:nth-child(even) td { background: #fbfcfd; }
.good { color: var(--green); font-weight: 700; }
.bad { color: var(--red); font-weight: 700; }

/* Review page elements */
.review-header { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px; margin-bottom: 32px; }
.rating-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.rating-big { font-size: 3rem; font-weight: 800; color: var(--navy); }
.rating-scale { color: var(--muted); }
.rating-bars { margin-top: 18px; }
.rbar { display: grid; grid-template-columns: 190px 1fr 44px; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 0.92rem; }
.rbar .track { background: var(--line); height: 9px; border-radius: 5px; overflow: hidden; }
.rbar .fill { background: var(--navy-2); height: 100%; border-radius: 5px; }
.rbar .num { font-weight: 700; text-align: right; }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
.proscons > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.proscons h4 { margin-bottom: 10px; font-size: 1rem; }
.proscons ul { margin-left: 18px; font-size: 0.94rem; }
.pros h4 { color: var(--green); }
.cons h4 { color: var(--red); }

.callout { background: #fff7ef; border: 1px solid #f3d4b5; border-left: 4px solid var(--accent); border-radius: 8px; padding: 20px 22px; margin: 26px 0; }
.callout h3 { margin-top: 0; }
.callout .btn { margin-top: 8px; }

.disclosure { background: #eef1f5; border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; color: var(--muted); margin-bottom: 28px; }

.verdict { background: var(--navy); color: #e7edf5; border-radius: 12px; padding: 28px; margin: 32px 0; }
.verdict h2 { color: #fff; }
.verdict a { color: #ffb27d; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; color: var(--navy); }
.faq details p { margin: 10px 0 0; }

/* Footer */
footer { background: var(--navy); color: #aebbcc; padding: 36px 0; font-size: 0.88rem; margin-top: 40px; }
footer a { color: #cfd8e4; }
footer .legal { margin-top: 14px; font-size: 0.8rem; color: #8295ab; }

.byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.7rem; }
  .proscons { grid-template-columns: 1fr; }
  .rbar { grid-template-columns: 130px 1fr 40px; }
  .nav a.navlink { margin-left: 14px; font-size: 0.85rem; }
}

/* Free tools */
.chk { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.chk:hover { background: var(--bg); }
.chk input { margin-top: 5px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; cursor: pointer; }

/* AI assistant widget */
#pra-fab { position: fixed; right: 20px; bottom: 20px; z-index: 999; background: var(--navy); color: #fff; border: none; border-radius: 30px; padding: 13px 20px; font-size: 0.95rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(20,35,60,0.35); }
#pra-fab:hover { background: var(--navy-2); }
#pra-panel { position: fixed; right: 20px; bottom: 20px; z-index: 1000; width: min(380px, calc(100vw - 40px)); height: min(560px, calc(100vh - 80px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(20,35,60,0.3); display: flex; flex-direction: column; overflow: hidden; }
#pra-head { background: var(--navy); color: #fff; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
#pra-close { background: none; border: none; color: #cfd8e4; font-size: 1.5rem; cursor: pointer; line-height: 1; }
#pra-body { flex: 1; overflow-y: auto; padding: 14px; font-size: 0.92rem; }
#pra-vinstep p { margin-bottom: 10px; }
#pra-vin { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
#pra-vinfb { font-size: 0.82rem; color: var(--muted); margin: 6px 0 10px; }
.pra-btn { background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.pra-btn:disabled { opacity: 0.45; cursor: default; }
.pra-link { display: block; background: none; border: none; color: var(--muted); text-decoration: underline; font-size: 0.82rem; margin-top: 10px; cursor: pointer; padding: 0; }
#pra-msgs { display: flex; flex-direction: column; gap: 10px; }
.pra-msg { max-width: 85%; padding: 9px 12px; border-radius: 10px; white-space: pre-wrap; }
.pra-msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 3px; }
.pra-msg.assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
#pra-form { display: flex; gap: 8px; padding: 10px 14px 4px; border-top: 1px solid var(--line); }
#pra-q { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
#pra-fine { font-size: 0.7rem; color: var(--muted); padding: 4px 14px 10px; }

/* calculator tools */
.tcal label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; }
.tcal input, .tcal select { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 0.95rem; background: #fff; }
.tcal .trow { margin-bottom: 14px; }
.tcal-table { width: 100%; border-collapse: collapse; }
.tcal-table th, .tcal-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.9rem; vertical-align: middle; }
.tcal-table th:first-child { width: 34%; }
.tcal-scroll { overflow-x: auto; }
.tool-result { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-top: 20px; }
.tool-result h3 { margin-bottom: 8px; }
.tool-result .win { color: var(--green); font-weight: 700; }
.tool-result .warn { color: var(--red); font-weight: 700; }
.grade-circle { width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; font-weight: 800; color: #fff; margin: 0 auto 12px; }
.tool-fine { font-size: 0.8rem; color: var(--muted); margin-top: 14px; }

/* free-tools tab switcher */
.tt-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 18px; padding-bottom: 0; }
.tt-tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 9px 12px; font-size: 0.92rem; font-weight: 600; color: var(--muted); cursor: pointer; margin-bottom: -2px; white-space: nowrap; }
.tt-tab:hover { color: var(--navy); }
.tt-tab.active { color: var(--navy); border-bottom-color: var(--accent); }
.tt-panel { display: none; }
.tt-panel.active { display: block; }

/* fix: the hidden attribute must beat the explicit display rules above */
#pra-panel[hidden], #pra-msgs[hidden], #pra-form[hidden], #pra-fab[hidden] { display: none !important; }
