/* ============================================================
   NeuronTrainer design system
   System type, flat tiles, hairline rules, one accent.
   ============================================================ */
:root {
    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --bg-brand-tint: #eef1ff;
    --ink: #1d1d1f;
    --ink-soft: #424245;
    --ink-muted: #6e6e73;
    --border: #e8e8ed;
    --border-strong: #d2d2d7;
    --brand: #4f46e5;
    --brand-dark: #4338ca;
    --green: #059669;
    --green-tint: #e8f5ef;
    --amber: #b45309;
    --amber-tint: #faf3e8;
    --star: #f59e0b;
    --radius: 18px;
    --radius-sm: 12px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    font-size: 17px;
    letter-spacing: -0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--brand); color: #fff; }
img { max-width: 100%; }
a { color: var(--brand); }

h1, h2, h3, h4 { letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); font-weight: 700; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
.nt-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}
.nt-nav { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; height: 64px; display: flex; align-items: center; gap: 26px; }
.nt-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.025em; margin-right: 8px; }
.nt-logo img { width: 36px; height: 36px; border-radius: 8px; }
.nt-links { display: flex; align-items: center; gap: 24px; flex: 1; }
.nt-links a { color: var(--ink-soft); text-decoration: none; font-weight: 400; font-size: 0.82rem; transition: color 0.15s; white-space: nowrap; }
.nt-links a:hover, .nt-links a.active { color: var(--ink); }
.nt-more { position: relative; }
.nt-more > button { background: none; border: none; color: var(--ink-soft); font: inherit; font-weight: 400; font-size: 0.82rem; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 0; }
.nt-more > button:hover { color: var(--ink); }
.nt-more-menu { position: absolute; top: calc(100% + 14px); left: -14px; background: rgba(255,255,255,0.97); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.10); padding: 8px; min-width: 190px; display: none; flex-direction: column; }
.nt-more.open .nt-more-menu { display: flex; }
.nt-more-menu a { padding: 9px 12px; border-radius: 9px; font-size: 0.85rem; }
.nt-more-menu a:hover { background: var(--bg-soft); }
.nt-cta { background: var(--brand); color: #fff !important; padding: 6px 14px; border-radius: 980px; font-weight: 500 !important; font-size: 0.8rem !important; text-decoration: none; transition: background 0.15s; white-space: nowrap; }
.nt-cta:hover { background: var(--brand-dark); }
.nt-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.nt-burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 4.5px 0; border-radius: 2px; transition: 0.2s; }

.nt-mobile-menu { display: none; border-top: 1px solid var(--border); background: #fff; padding: 10px 22px 18px; }
.nt-mobile-menu a { display: block; padding: 12px 4px; color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; border-bottom: 1px solid var(--bg-soft); }
.nt-mobile-menu a:last-child { border-bottom: none; }
.nt-header.menu-open .nt-mobile-menu { display: block; }

@media (max-width: 960px) {
    .nt-links { display: none; }
    .nt-burger { display: block; }
    .nt-nav .nt-cta { display: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 980px; font-weight: 500; font-size: 0.95rem; letter-spacing: -0.01em; text-decoration: none; cursor: pointer; border: none; font-family: var(--font); transition: all 0.15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--bg-soft); color: var(--ink); }
.btn-secondary:hover { background: #eaeaef; }
.section-soft .btn-secondary, .section-tint .btn-secondary { background: #e8e8ed; }
.section-soft .btn-secondary:hover, .section-tint .btn-secondary:hover { background: #dfdfe5; }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section.container-narrow, .section.container { padding-left: 22px; padding-right: 22px; }
.section-soft { background: var(--bg-soft); }
.section-tint { background: var(--bg-soft); }
.eyebrow { display: block; color: var(--ink-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 14px; }
.section-title { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 700; margin-bottom: 16px; }
.section-sub { color: var(--ink-muted); font-size: 1.15rem; max-width: 620px; margin-bottom: 48px; line-height: 1.5; }
.center { text-align: center; }
.center .section-sub, .center .eyebrow { margin-left: auto; margin-right: auto; }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--bg-soft); border-radius: var(--radius); padding: 30px 28px; transition: transform 0.25s ease; }
.section-soft .card, .section-tint .card { background: #fff; }
.card h3 { font-size: 1.22rem; margin-bottom: 10px; letter-spacing: -0.02em; }
.card p { color: var(--ink-muted); font-size: 0.95rem; line-height: 1.55; }
.card-icon { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.section .card .card-icon { background: #fff; }
section:not(.section-soft):not(.section-tint) .card .card-icon { background: var(--bg-brand-tint); }
.card-icon svg { width: 20px; height: 20px; }
.guide-mark { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 11px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.05em; margin-bottom: 20px; }

/* ---------- App cards (auto-fetched) ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.app-card { background: var(--bg-soft); border-radius: var(--radius); padding: 24px; transition: transform 0.25s ease; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.section-soft .app-card { background: #fff; }
.app-card:hover { transform: scale(1.012); }
.app-card-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.app-card-top img { width: 58px; height: 58px; border-radius: 13px; }
.app-card-name { font-weight: 600; font-size: 1.02rem; line-height: 1.25; letter-spacing: -0.015em; }
.app-card-cat { font-size: 0.78rem; color: var(--ink-muted); margin-top: 3px; }
.app-card-rating { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; margin-bottom: 12px; }
.app-card-rating .stars { color: var(--star); letter-spacing: 1px; font-size: 0.82rem; }
.app-card-rating .score { font-weight: 600; }
.app-card-rating .count { color: var(--ink-muted); }
.badge-new { background: var(--green-tint); color: var(--green); font-size: 0.7rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; letter-spacing: 0.02em; }
.app-card-desc { color: var(--ink-muted); font-size: 0.88rem; line-height: 1.5; flex: 1; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.app-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-card-price { font-weight: 600; color: var(--ink-muted); font-size: 0.82rem; }
.app-store-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; padding: 7px 14px; border-radius: 980px; font-size: 0.8rem; font-weight: 500; text-decoration: none; transition: opacity 0.15s; }
.app-card:hover .app-store-btn { background: var(--brand); }

/* Live badge / pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 980px; font-size: 0.78rem; font-weight: 500; white-space: nowrap; letter-spacing: -0.005em; }
.pill-live { background: var(--green-tint); color: var(--green); }
.pill-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.pill-soon { background: var(--bg-soft); color: var(--ink-muted); }
.rm-item .pill-soon { background: var(--bg-soft); }
.pill-brand { background: var(--bg-brand-tint); color: var(--brand); }

/* ---------- Filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg-soft); border: none; color: var(--ink-soft); padding: 8px 16px; border-radius: 980px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.15s; font-family: var(--font); }
.chip:hover { background: #eaeaef; color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; }

/* ---------- Search ---------- */
.search-box { position: relative; max-width: 420px; }
.search-box input { width: 100%; padding: 12px 16px 12px 42px; border: none; border-radius: 12px; font-size: 0.95rem; font-family: var(--font); color: var(--ink); background: var(--bg-soft); transition: box-shadow 0.15s; }
.search-box input:focus { outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25); }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); }

/* ---------- Stats ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 760px) { .stats-row { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; } }
.stat { padding: 10px; text-align: center; }
.stat-num { font-size: 2.9rem; font-weight: 700; color: var(--brand); letter-spacing: -0.035em; line-height: 1.05; }
.stat-label { color: var(--ink-muted); font-size: 0.9rem; margin-top: 8px; }

/* ---------- Reviews ---------- */
.review-card { background: var(--bg-soft); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.section-soft .review-card { background: #fff; }
.review-stars { color: var(--star); font-size: 0.9rem; letter-spacing: 2px; margin-bottom: 12px; }
.review-title { font-weight: 600; margin-bottom: 8px; font-size: 1.02rem; letter-spacing: -0.015em; }
.review-body { color: var(--ink-soft); font-size: 0.93rem; flex: 1; line-height: 1.55; }
.review-meta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.78rem; color: var(--ink-muted); }
.review-app { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--ink-soft); }
.review-app img { width: 18px; height: 18px; border-radius: 4px; }

/* ---------- Quiz widget ---------- */
.quiz-widget { background: #fff; border-radius: 22px; padding: 36px; max-width: 680px; margin: 0 auto; text-align: left; }
section:not(.section-soft) .quiz-widget { background: var(--bg-soft); }
.quiz-tag { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.quiz-q { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; margin-bottom: 22px; }
.quiz-choices { display: flex; flex-direction: column; gap: 9px; }
.quiz-choice { text-align: left; background: var(--bg-soft); border: 1px solid transparent; border-radius: 12px; padding: 14px 18px; font-size: 0.95rem; font-family: var(--font); color: var(--ink); cursor: pointer; transition: all 0.15s; }
.quiz-choice:hover:not(:disabled) { border-color: var(--brand); }
.quiz-choice.correct { background: var(--green-tint) !important; border-color: var(--green); color: var(--green); font-weight: 600; }
.quiz-choice.wrong { background: #fdf0ef !important; border-color: #d2504a; color: #c0392b; }
.quiz-explain { display: none; margin-top: 22px; background: var(--bg-brand-tint); border-radius: 12px; padding: 16px 20px; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.55; }
.quiz-explain strong { color: var(--brand); }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.quiz-dots { display: flex; gap: 7px; }
.quiz-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: 0.2s; }
.quiz-dot.on { background: var(--ink); }

/* ---------- Quiz results modal ---------- */
.nt-modal-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(29, 29, 31, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 22px; }
.nt-modal { background: #fff; border-radius: 24px; padding: 44px 36px 36px; max-width: 420px; width: 100%; text-align: center; position: relative; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2); animation: nt-modal-pop 0.25s ease; }
@keyframes nt-modal-pop { from { transform: translateY(14px) scale(0.97); } }
.nt-modal-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--bg-soft); color: var(--ink-muted); font-size: 1rem; cursor: pointer; line-height: 1; }
.nt-modal-close:hover { background: #eaeaef; color: var(--ink); }
.nt-modal-ring { width: 108px; height: 108px; margin: 0 auto 16px; position: relative; }
.nt-modal-ring svg { width: 100%; height: 100%; display: block; }
.nt-modal-ring .ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nt-modal-ring .ring-text strong { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.nt-modal-ring .ring-text span { font-size: 0.72rem; font-weight: 500; color: var(--ink-muted); margin-top: 3px; }
.nt-modal-label { color: var(--ink-muted); font-size: 0.85rem; margin-bottom: 18px; }
.nt-modal h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.nt-modal p { color: var(--ink-muted); font-size: 0.95rem; line-height: 1.55; margin-bottom: 26px; }
.nt-modal .btn { width: 100%; }
.nt-modal .btn + .btn { margin-top: 10px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); background: transparent; }
.faq-item summary { padding: 22px 4px; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.015em; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--ink-muted); font-weight: 300; transition: transform 0.2s; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 4px 22px; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.6; max-width: 680px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--bg-soft); padding: 6px; }
.section-soft .table-wrap { background: #fff; }
table.nt-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.nt-table th { text-align: left; padding: 16px 20px; color: var(--ink); font-size: 0.85rem; font-weight: 600; border-bottom: 1px solid var(--border); }
.nt-table td { padding: 15px 20px; border-bottom: 1px solid var(--border); color: var(--ink-soft); }
.nt-table tr:last-child td { border-bottom: none; }
.nt-table .yes { color: var(--green); font-weight: 600; }
.nt-table .no { color: var(--ink-muted); }
.nt-table .hl { background: rgba(79, 70, 229, 0.05); }

/* ---------- Marquee dock ---------- */
.dock-wrap { overflow: hidden; position: relative; max-width: 620px; margin: 0 auto; padding: 10px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.dock { display: flex; gap: 26px; width: max-content; animation: dock-scroll var(--dock-dur, 40s) linear infinite; }
.dock:hover { animation-play-state: paused; }
.dock a { display: block; transition: transform 0.2s; }
.dock a:hover { transform: translateY(-4px); }
.dock img { width: 62px; height: 62px; border-radius: 14px; display: block; }
@keyframes dock-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */
.hero { padding: 110px 0 70px; background: #fff; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 24px; }
.hero .grad { color: var(--brand); }
.hero-sub { font-size: 1.3rem; color: var(--ink-muted); max-width: 600px; margin: 0 auto 36px; line-height: 1.45; letter-spacing: -0.015em; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding: 90px 0 60px; background: #fff; }
.page-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.4rem); font-weight: 700; margin-bottom: 18px; letter-spacing: -0.028em; line-height: 1.08; }
.page-hero p { color: var(--ink-muted); font-size: 1.2rem; max-width: 680px; line-height: 1.5; letter-spacing: -0.015em; }

/* ---------- Steps ---------- */
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.95rem; margin-bottom: 20px; }

/* ---------- Prose (guides, legal) ---------- */
.prose h2 { font-size: 1.7rem; margin: 52px 0 16px; letter-spacing: -0.022em; }
.prose h3 { font-size: 1.2rem; margin: 32px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.65; }
.prose ul, .prose ol { padding-left: 22px; margin: 14px 0; }
.prose li { margin-bottom: 10px; }
.prose .table-wrap { margin: 22px 0; }
.prose code { background: var(--bg-soft); border-radius: 6px; padding: 2px 7px; font-size: 0.88em; }
.callout { background: var(--bg-soft); border-radius: 14px; padding: 20px 24px; margin: 24px 0; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.6; }
.callout strong { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--bg-soft); border-radius: 26px; padding: 72px 40px; text-align: center; }
.cta-band h2 { color: var(--ink); font-size: clamp(1.8rem, 3.8vw, 2.6rem); margin-bottom: 14px; letter-spacing: -0.025em; }
.cta-band p { color: var(--ink-muted); max-width: 540px; margin: 0 auto 32px; font-size: 1.1rem; line-height: 1.5; }
.cta-band .btn-primary { background: var(--brand); color: #fff; }
.cta-band .btn-primary:hover { background: var(--brand-dark); }

/* ---------- Footer ---------- */
.nt-footer { background: var(--bg-soft); color: var(--ink-muted); margin-top: 100px; border-top: 1px solid var(--border); }
.nt-footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 44px 22px 24px; }
.nt-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
@media (max-width: 960px) { .nt-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .nt-footer-grid { grid-template-columns: 1fr; } }
.nt-footer h4 { color: var(--ink); font-size: 0.78rem; font-weight: 600; margin-bottom: 12px; letter-spacing: 0; }
.nt-footer a { color: var(--ink-muted); text-decoration: none; display: block; padding: 3px 0; font-size: 0.78rem; transition: color 0.15s; }
.nt-footer a:hover { color: var(--ink); }
.nt-footer-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 0.95rem; margin-bottom: 12px; }
.nt-footer-brand img { width: 24px; height: 24px; border-radius: 6px; }
.nt-footer-desc { font-size: 0.78rem; max-width: 280px; line-height: 1.6; }
.nt-footer-bottom { border-top: 1px solid var(--border); padding-top: 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.75rem; color: var(--ink-muted); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .dock { animation: none; }
}

/* ---------- Utility ---------- */
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 36px; } .mt-4 { margin-top: 56px; }
.mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 36px; }
.muted { color: var(--ink-muted); }
.small { font-size: 0.85rem; }
.loading-note { text-align: center; color: var(--ink-muted); padding: 40px 0; font-size: 0.95rem; }
.skeleton { background: linear-gradient(90deg, var(--bg-soft) 25%, #ececf1 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--radius); }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
