:root{
  /* Light theme */
  --bg: #f7f7f8;
  --surface: #ffffff;
  --border: #e7e7ea;
  --text: #111827;
  --muted: #6b7280;
  --brand-50:#eef2ff; --brand-100:#e0e7ff; --brand-200:#c7d2fe; --brand-400:#818cf8; --brand-500:#6366f1; --brand-600:#4f46e5; --brand-700:#4338ca;
  --success:#10b981; --warning:#f59e0b; --danger:#ef4444;
  --shadow-1: 0 30px 60px rgba(17,24,39,.03), 0 12px 24px rgba(17,24,39,.05), 0 4px 12px rgba(17,24,39,.06);
}
*{box-sizing:border-box}
html,body{height:100%; transition: background-color .2s, color .2s;}
body{margin:0;font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased; display: flex; flex-direction: column;}
main {flex-grow: 1;}
a{color:var(--brand-600);text-decoration:none}
a:hover{text-decoration:underline}
button{font-family:inherit}
.container{max-width:1200px;margin:0 auto;padding:24px}
.section{ padding: 48px 0; }
.section-title { font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 24px; }
.page-container { padding: 48px 24px; }

/* Header */
.header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.7);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--border)}
.header__inner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 20px; max-width: 1200px; margin: 0 auto;}
.brand{display:flex;align-items:center;gap:10px}
.brand__logo{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:radial-gradient(120% 120% at 20% 20%,var(--brand-200),var(--brand-600) 60%,var(--brand-700));color:#fff;box-shadow:0 6px 18px rgba(79,70,229,.32)}
.brand__name{font-weight:800;letter-spacing:-.5px; font-size: 20px;}
.nav{display:flex;gap:14px}
.nav a{padding:8px 10px;border-radius:10px;border:1px solid transparent; font-weight: 500;}
.nav a:hover{background:var(--brand-100);border-color:var(--brand-200)}
.actions{display:flex;gap:10px;align-items:center}
.btn{padding:9px 16px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text);font-weight:600;cursor:pointer;transition:all .2s ease; display: inline-flex; align-items: center; gap: 8px; justify-content: center;}
.btn:hover{transform:translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.05);}
.btn.primary{background:linear-gradient(135deg,var(--brand-600),var(--brand-500));color:#fff;border:none;box-shadow:0 10px 22px rgba(79,70,229,.22)}
.btn.secondary { background: var(--brand-50); color: var(--brand-600); }
.btn:disabled { background: #e7e7ea; color: var(--muted); cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:10px;border:1px solid var(--border);background:var(--surface); cursor: pointer; color: var(--text); font-size: 20px;}
.icon-btn:hover { background-color: var(--bg); }
.mobile-menu-btn{display:none}

/* Hero */
.surface{background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow-1)}
.hero{display:grid;grid-template-columns:1.15fr 1fr;gap:28px;padding:28px;margin:24px 0;align-items:center}
.hero-title{font-size:clamp(28px,4.6vw,44px);font-weight:800;line-height:1.2;margin:10px 0}
.gradient-text{background:linear-gradient(90deg,var(--brand-700),var(--brand-500),var(--brand-400));background-size:200% auto;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.hero-desc{color:var(--muted);margin:0 0 24px; font-size: 18px; line-height: 1.6;}
.hero-cta{display:flex;gap:10px;flex-wrap:wrap}
.hero__aside{display:grid;gap:12px;align-self:stretch}
.kpi{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-content:start;align-items:start;grid-auto-rows:minmax(min-content,auto)}
.kpi .item{display:flex;align-items:center;gap:12px;border:1px solid var(--border);border-radius:12px;padding:14px;background:var(--bg); font-weight: 500; align-self:stretch;}
.kpi .item i {font-size: 20px;}

/* Result demo (mix-blend-mode) */
.result-demo{margin-top:24px}
.text-wrap{position:relative;overflow:hidden;height:0;transition:height .3s ease-out}
.text-content{position:relative;line-height:1.7}
.text-reference{position:absolute;visibility:hidden;top:-9999px;left:0;width:100%}
.line-overlay{position:absolute;left:0;width:300%; background:linear-gradient(to right,rgba(0,0,0,1) 0%,rgba(0,0,0,1) 53%, rgb(22,12,167) 54%, rgb(40,109,220) 56%, rgb(133,223,241) 57%, rgb(254,255,243) 60%, #fff 62%, #fff 100%); mix-blend-mode:screen; transform:translateX(-60%); opacity:0; pointer-events:none}
.line-overlay.active{opacity:1;animation:horizontalSwipe 1.5s ease-out forwards}
@keyframes horizontalSwipe{0%{transform:translateX(-60%)}60%{transform:translateX(-24%)}100%{transform:translateX(0%)}}
.source{font-size:11px;font-weight:600;color:rgb(23,122,242);background:rgb(225,242,255);border-radius:3px;padding:1px 6px;margin-left:4px}

/* Feature tabs */
.tabs{margin:48px 0}
.tab-list{display:flex;gap:8px;flex-wrap:wrap; justify-content: center; margin-bottom: 24px;}
.tab{padding:10px 16px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--muted);font-weight:600;cursor:pointer; display: flex; align-items: center; gap: 8px;}
.tab.active{color:var(--brand-500);border-color:var(--brand-200);background:var(--brand-50)}
.tab-panels{margin-top:14px}
.panel{display:none}
.panel.active{display:block}
.panel-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:16px}
.panel-grid .col-4{grid-column:span 4}
.panel-card{border:1px solid var(--border);border-radius:12px;padding:20px;background:var(--surface);display:grid;gap:10px; height: 100%;}
.panel-card div:first-child {font-weight: 600;}
.panel-card .meta{color:var(--muted);font-size:14px}

/* All Features / Pricing Section */
.all-features-section { padding: 48px 0; }
.all-features-section-header { text-align: center; max-width: 600px; margin: 0 auto 32px; }
.all-features-section-header p { color: var(--muted); display: flex; align-items: center; justify-content: center; } /* Fix alignment */
.all-features-grid {display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}
.feature-card{border:1px solid var(--border);border-radius:12px;background:var(--surface);padding:24px; display:grid;gap:10px; text-align: center;}
.feature-card.popular { border-color: var(--brand-500); border-width: 2px; position: relative; overflow: visible;}
.feature-card .badge.primary-badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background-color: var(--brand-500); color: #fff; border-color: var(--brand-500);}
.feature-card .title{font-weight:700; font-size: 20px;}
.feature-card .meta{color:var(--muted);font-size:14px; min-height: 40px;}
.feature-card .btn {width: 100%; margin-top: 12px;}

/* Partner & Affiliate sections */
.partner-section { text-align: center; padding: 48px 24px; background: var(--brand-50); border-radius: 14px; }
.partner-section h2 { margin-top: 0; }
.partner-section p { color: var(--muted); max-width: 600px; margin: 0 auto 24px; }
.affiliate-section { padding: 48px 0; }
.affiliate-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 48px; filter: grayscale(100%); opacity: 0.6; }
.affiliate-logos img { max-height: 40px; }

/* Footer */
.footer{color:var(--muted);font-size:14px;text-align:center;margin-top:auto; padding: 24px; background: var(--surface); border-top: 1px solid var(--border);}
.footer-content { max-width: 600px; margin: 0 auto; }

/* Bottom Sheet (mobile) - Redesigned */
.sheet-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.4);opacity:0;pointer-events:none;transition:opacity .3s ease;z-index:70}
.sheet{position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top-left-radius:18px;border-top-right-radius:18px;box-shadow:0 -20px 40px rgba(0,0,0,.16);transition:transform .3s ease;transform:translateY(100%);z-index:80}
.sheet__inner{padding:10px 16px 24px;max-height:80vh;overflow:auto; display: flex; flex-direction: column; gap: 16px;}
.sheet__header { display: flex; justify-content: space-between; align-items: center; }
.sheet__title { font-size: 16px; font-weight: 600; margin: 0; }
.sheet__handle{display:grid;place-items:center;padding:10px; cursor: grab; position: absolute; top: 0; left: 50%; transform: translateX(-50%);}
.sheet__handle:before{content:"";width:48px;height:5px;border-radius:999px;background:#e5e7eb}
.sheet.open{transform:translateY(0)}
.sheet-backdrop.open{opacity:1;pointer-events:auto}
.sheet .menu, .sheet .menu-auth {display:flex; flex-direction: column; gap:10px}
.sheet .menu a, .sheet .menu button, .sheet .menu-auth a, .sheet .menu-auth button {display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--bg);text-align:left; font-size: 16px; font-weight: 500; width: 100%;}
.sheet .menu a:hover, .sheet .menu button:hover, .sheet .menu-auth a:hover, .sheet .menu-auth button:hover { background: var(--surface); }
.sheet hr { width: 100%; border: none; border-top: 1px solid var(--border); margin: 0; }
.sheet .user-info { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--brand-50); border-radius: 12px; }
.sheet .user-info i { font-size: 24px; color: var(--brand-600); }
.sheet .user-info-text { display: flex; flex-direction: column; }
.sheet .user-info-name { font-weight: 600; }
.sheet .user-info-email { font-size: 12px; color: var(--muted); }

.badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--brand-600);background:var(--brand-50);border:1px solid var(--brand-200);padding:4px 8px;border-radius:999px;font-weight:600}

/* User Menu Dropdown */
.user-menu { position: relative; }
.user-menu__button { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; background: var(--brand-50); border: 1px solid var(--brand-100); padding: 8px 12px; border-radius: 10px; }
.user-menu__dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-1); list-style: none; padding: 8px; margin: 0; min-width: 200px; z-index: 60; opacity: 0; transform: translateY(-10px); pointer-events: none; transition: all .2s ease; }
.user-menu__dropdown.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.user-menu__dropdown a, .user-menu__dropdown button { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 500; text-align: left; width: 100%; border: none; background: none; color: var(--text); }
.user-menu__dropdown a:hover, .user-menu__dropdown button:hover { background: var(--bg); }
.user-menu__dropdown .logout-btn { color: var(--danger); }
.user-menu__dropdown hr { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

/* Auth & About Pages */
.form-card { max-width: 420px; margin: 0 auto; padding: 28px; }
.form-card__title { text-align: center; font-size: 24px; font-weight: 700; margin: 0 0 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); font-size: 16px; background-color: var(--bg); color: var(--text); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--brand-500); outline: 2px solid var(--brand-200); }
.form-card .btn { width: 100%; margin-top: 8px; }
.form-card__footer { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.error-message { color: var(--danger); font-size: 14px; margin-top: 8px; text-align: center; }

/* Test List Page */
.test-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.test-card { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; transition: all .2s ease; }
.test-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.test-card__icon { font-size: 32px; color: var(--brand-600); }
.test-card__title { font-size: 20px; font-weight: 700; margin: 0; }
.test-card__desc { color: var(--muted); margin: 0 0 16px; flex-grow: 1; }
.test-card .btn { width: 100%; }

/* Ad Placeholder */
.ad-placeholder { border: 2px dashed var(--border); border-radius: 12px; background: var(--bg); padding: 20px; text-align: center; color: var(--muted); font-weight: 500; margin-top: 32px; }
.ad-placeholder::before { content: "Area Iklan"; }
.ad-placeholder--sidebar { min-height: 250px; }
.ad-placeholder--banner { min-height: 90px; }

/* Test Page (General) */
.test-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 60px; z-index: 40;}
.test-header__title { font-size: 18px; font-weight: 600; margin: 0; }
.test-header__timer { font-size: 18px; font-weight: 700; color: var(--brand-600); background: var(--brand-50); padding: 8px 12px; border-radius: 8px; }
.test-content { padding: 24px; max-width: 100%; margin: 0 auto; position: relative; }
.test-start-overlay { position: absolute; inset: 0; background:rgba(247, 247, 248, 0.8); backdrop-filter: blur(8px); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 10; border-radius: 14px; text-align: center; padding: 20px; }
.test-start-overlay.hidden { display: none; }
.test-start-overlay h2 { margin-top: 0; }
.test-controls { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }

/* Kraeplin Test */
.kraeplin-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 40px; gap: 10px; max-height: 65vh; overflow-x: auto; overflow-y: hidden; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); opacity: 0; transition: opacity .3s; }
.kraeplin-grid.visible { opacity: 1; }
.kraeplin-grid__col { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; }
.kraeplin-grid__number { font-size: 18px; font-weight: 500; height: 28px; display: flex; align-items: center; justify-content: center; }
.kraeplin-grid__answer { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; text-align: center; font-size: 16px; font-weight: 600; -moz-appearance: textfield; background-color: var(--bg); color: var(--text); padding: 0; }
.kraeplin-grid__answer::-webkit-outer-spin-button, .kraeplin-grid__answer::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kraeplin-grid__answer:focus { outline: 2px solid var(--brand-500); border-color: var(--brand-500); background-color: var(--surface); }

/* Logic Test */
.logic-test-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; max-width: 600px; margin: 0 auto; text-align: center; opacity: 0; transition: opacity .3s; }
.logic-test-container.visible { opacity: 1; }
.logic-test__progress { color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.logic-test__question { font-size: 28px; font-weight: 700; letter-spacing: 2px; margin: 0 0 24px; }
.logic-test__answer-input { font-size: 24px; text-align: center; padding: 12px; border-radius: 8px; border: 1px solid var(--border); width: 100px; margin: 0 auto 24px; display: block; background-color: var(--bg); color: var(--text); }
.logic-test__answer-input:focus { border-color: var(--brand-500); outline: 2px solid var(--brand-200); }

/* Modal & Test Settings */
.modal-wrapper { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.modal-wrapper.open { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 91; }
.modal { position: relative; z-index: 92; background: var(--surface); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); width: 90%; max-width: 500px; transform: scale(0.95); transition: transform .3s ease; }
.modal-wrapper.open .modal { transform: scale(1); }
.modal__header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal__title { font-size: 18px; font-weight: 600; margin: 0; }
.modal__close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); padding: 0; line-height: 1;}
.modal__body { padding: 20px; line-height: 1.6; }
.modal__body ul { padding-left: 20px; margin: 10px 0; }
.modal__footer { padding: 12px 20px; border-top: 1px solid var(--border); text-align: right; }
.settings-group { display: none; }
.settings-group.active { display: block; }
.settings-group .form-group label { display: block; font-weight: 600; }
.settings-options { display: flex; gap: 10px; margin-top: 8px; }
.settings-options label { flex-grow: 1; }
.settings-options input[type="radio"] { display: none; }
.settings-options .option-label { display: block; padding: 10px; border: 1px solid var(--border); border-radius: 8px; text-align: center; cursor: pointer; transition: all .2s; }
.settings-options input[type="radio"]:checked + .option-label { background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-600); font-weight: 600; }

/* Verbal Test */
.verbal-test-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; max-width: 700px; margin: 0 auto; opacity: 0; transition: opacity .3s; }
.verbal-test-container.visible { opacity: 1; }
.verbal-test__progress { color: var(--muted); font-weight: 600; margin-bottom: 16px; text-align: center; }
.verbal-test__question-text { font-size: 20px; font-weight: 500; line-height: 1.6; margin: 0 0 24px; text-align: left; }
.verbal-test__choices { display: grid; grid-template-columns: 1fr; gap: 12px; }
.choice-btn { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); cursor: pointer; text-align: left; width: 100%; transition: all .2s ease; font-size: 16px; color: var(--text); }
.choice-btn:hover { background: var(--brand-50); border-color: var(--brand-200); }
.choice-btn.selected { background: var(--brand-500); color: #fff; border-color: var(--brand-600); }
.choice-btn__key { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; font-weight: 600; flex-shrink: 0; }
.choice-btn.selected .choice-btn__key { background: #fff; color: var(--brand-600); border-color: #fff; }

/* Wartegg Test */
.wartegg-test-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; opacity: 0; transition: opacity .3s; }
.wartegg-test-container.visible { opacity: 1; }
.wartegg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wartegg-box { border: 2px solid var(--border); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.wartegg-box__stimulus-container { position: relative; width: 100%; padding-top: 75%; /* 4:3 Aspect Ratio */ border: 1px dashed #ccc; border-radius: 4px; display: flex; justify-content: center; align-items: center; }
.wartegg-box__stimulus { position: absolute; }
.wartegg-box textarea { width: 100%; min-height: 60px; border: 1px solid var(--border); border-radius: 6px; padding: 8px; font-family: inherit; font-size: 14px; resize: vertical; background: var(--bg); color: var(--text); }
.wartegg-box textarea:focus { border-color: var(--brand-500); outline: 2px solid var(--brand-200); }
/* Specific stimulus styles */
.stimulus-1 { width: 6px; height: 6px; background: var(--text); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%);}
.stimulus-2 { width: 15px; height: 2px; background: var(--text); border-radius: 1px; transform: rotate(-45deg); top: 35%; left: 30%; }
.stimulus-3 { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.stimulus-3 span { width: 2px; height: 10px; background: var(--text); }
.stimulus-4 { width: 12px; height: 12px; background: var(--text); top: 30%; right: 30%; }
.stimulus-5 { width: 25px; height: 2px; background: var(--text); top: 70%; left: 30%; transform: rotate(45deg); }
.stimulus-5::before { content: ''; position: absolute; width: 25px; height: 2px; background: var(--text); left: 0; transform: rotate(90deg) translate(-12px, -12px); }
.stimulus-6 { width: 20px; height: 2px; background: var(--text); top: 35%; left: 50%; transform: translateX(-50%); }
.stimulus-6::before { content: ''; position: absolute; width: 2px; height: 20px; background: var(--text); top: 10px; left: 50%; transform: translateX(-50%); }
.stimulus-7 { width: 30px; height: 15px; border-radius: 50% / 100%; border-bottom: 2px solid var(--text); border-bottom-left-radius: 0; border-bottom-right-radius: 0; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(180deg); }
.stimulus-8 { width: 40px; height: 20px; border-radius: 50%; border-top: 2px solid var(--text); top: 30%; left: 50%; transform: translateX(-50%); }

/* Draw a Person/Tree Test */
.dap-test-container, .tree-test-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; max-width: 800px; margin: 0 auto; opacity: 0; transition: opacity .3s; }
.dap-test-container.visible, .tree-test-container.visible { opacity: 1; }
.dap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* SJT Test */
.sjt-test-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; max-width: 800px; margin: 0 auto; opacity: 0; transition: opacity .3s; }
.sjt-test-container.visible { opacity: 1; }
.sjt-progress { color: var(--muted); font-weight: 600; margin-bottom: 16px; text-align: center; }
.sjt-scenario { font-size: 18px; font-weight: 500; line-height: 1.6; margin: 0 0 24px; padding: 16px; background: var(--bg); border-radius: 8px; }
.sjt-options-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.sjt-option-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.sjt-option-text { flex-grow: 1; }
.sjt-option-actions { display: flex; gap: 8px; flex-shrink: 0; }
.sjt-action-btn { font-size: 12px; padding: 6px 10px; border-radius: 6px; }
.sjt-action-btn.selected-most { background-color: var(--success); color: #fff; border-color: var(--success); }
.sjt-action-btn.selected-least { background-color: var(--danger); color: #fff; border-color: var(--danger); }
.sjt-action-btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

/* Spatial Test */
.spatial-test-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; max-width: 900px; margin: 0 auto; opacity: 0; transition: opacity .3s; }
.spatial-test-container.visible { opacity: 1; }
.spatial-test__question-container { text-align: center; margin-bottom: 24px; }
.spatial-test__question-container h3 { margin: 0 0 12px; }
.spatial-test-question { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; max-width: 200px; margin: 0 auto; }
.spatial-test__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spatial-choice { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 12px; }
.spatial-svg-wrapper { width: 100%; max-width: 150px; }

/* EPPS Test */
.epps-test-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; max-width: 800px; margin: 0 auto; opacity: 0; transition: opacity .3s; }
.epps-test-container.visible { opacity: 1; }
.epps-test__progress { color: var(--muted); font-weight: 600; margin-bottom: 16px; text-align: center; }
.epps-test__instructions { text-align: center; color: var(--muted); margin-bottom: 24px; }
.epps-test__choices { display: grid; grid-template-columns: 1fr; gap: 16px; }
.epps-choice-btn { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 2px solid var(--border); border-radius: 12px; background: var(--bg); cursor: pointer; text-align: left; width: 100%; transition: all .2s ease; font-size: 16px; color: var(--text); height: 100%;}
.epps-choice-btn:hover { border-color: var(--brand-400); transform: translateY(-2px); }
.epps-choice-btn__header { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; color: var(--brand-600); }

/* Results Page */
.results-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: flex-start; }
.results-main { display: flex; flex-direction: column; gap: 24px; }
.results-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;}
.results-summary, .results-details, .results-history, .detailed-analysis-container { padding: 24px; }
.results-summary h2, .results-details h2, .results-history h2, .detailed-analysis-container h2 { margin: 0 0 16px; }
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.score-item { background: var(--bg); padding: 16px; border-radius: 12px; }
.score-item__label { font-size: 14px; color: var(--muted); margin: 0 0 4px; }
.score-item__value { font-size: 24px; font-weight: 700; }
.results-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 88px; }
.results-prompt { padding: 24px; text-align: center; }
.results-prompt i { font-size: 32px; color: var(--brand-600); margin-bottom: 8px; }
.results-prompt h3 { margin: 0 0 8px; }
.results-prompt p { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.history-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--bg); border-radius: 8px; }
.history-item__info { display: flex; flex-direction: column; }
.history-item__test-name { font-weight: 600; }
.history-item__date { font-size: 12px; color: var(--muted); }
.history-item__score { font-size: 16px; font-weight: 700; }
.detailed-analysis-container .chart-wrapper { height: 300px; }

/* Leaderboard Page */
.leaderboard-tabs { border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.leaderboard-tab { padding: 10px 16px; border: none; background: none; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; }
.leaderboard-tab.active { color: var(--brand-600); }
.leaderboard-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--brand-600); }
.leaderboard-panel { display: none; }
.leaderboard-panel.active { display: block; }
.leaderboard-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; max-width: 800px; margin: 0 auto; }
.leaderboard-item { display: flex; align-items: center; justify-content: space-between; background: var(--surface); padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); transition: all .2s; }
.leaderboard-item.current-user { border-color: var(--brand-500); background: var(--brand-50); }
.leaderboard-item__main { display: flex; align-items: center; gap: 16px; }
.leaderboard-item .rank { font-weight: 700; font-size: 16px; color: var(--muted); width: 24px; text-align: center; }
.leaderboard-item .rank-1, .leaderboard-item .rank-2, .leaderboard-item .rank-3 { font-size: 24px; }
.leaderboard-item .rank-1 { color: #FFD700; }
.leaderboard-item .rank-2 { color: #C0C0C0; }
.leaderboard-item .rank-3 { color: #CD7F32; }
.leaderboard-item .name { font-weight: 600; }
.leaderboard-item .score { font-weight: 700; font-size: 18px; color: var(--brand-600); }
.leaderboard-item.empty { justify-content: center; color: var(--muted); padding: 32px; }

/* Dashboard & Profile Pages */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.stat-card { padding: 24px; }
.stat-card__label { color: var(--muted); margin: 0 0 4px; }
.stat-card__value { font-size: 32px; font-weight: 700; }
.profile-card { max-width: 600px; margin: 0 auto; padding: 32px; }
.profile-card h2 { margin-top: 0; }
.profile-info-grid { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 12px 24px; }
.profile-info-grid dt { font-weight: 600; color: var(--muted); }
.dashboard-chart-container { padding: 24px; margin-top: 24px; }
.dashboard-chart-container h2 { margin-top: 0; margin-bottom: 16px; }

/* Blog Pages */
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.blog-list-item { display: flex; flex-direction: column; text-decoration: none; color: var(--text); transition: all .2s ease; }
.blog-list-item:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.blog-list-item__content { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.blog-list-item__title { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.blog-list-item__meta { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.blog-list-item__desc { color: var(--muted); margin: 0 0 16px; flex-grow: 1; }
.blog-list-item__readmore { color: var(--brand-600); font-weight: 600; text-decoration: none; }
.article-container { max-width: 720px; margin: 0 auto; }
.article-header { text-align: center; margin-bottom: 32px; }
.article-header__title { font-size: 36px; line-height: 1.2; margin: 0 0 12px; }
.article-header__meta { color: var(--muted); }
.article-content { line-height: 1.8; font-size: 17px; }
.article-content h2 { font-size: 24px; margin-top: 40px; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote { border-left: 4px solid var(--brand-200); margin: 24px 0; padding: 12px 24px; background: var(--bg); font-style: italic; }

/* History Page */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; top: 0; left: 12px; height: 100%; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 32px; padding-left: 40px; }
.timeline-item::before { content: ''; position: absolute; top: 6px; left: 4px; height: 18px; width: 18px; background: var(--brand-200); border: 3px solid var(--surface); border-radius: 50%; z-index: 1; }
.timeline-item__header { margin-bottom: 8px; }
.timeline-item__date { font-weight: 600; color: var(--muted); }
.timeline-item__content { padding: 16px; }

/* Responsive */
@media (max-width: 960px){
  .nav{display:none}
  .actions { display: none; } /* Hide desktop actions */
  .mobile-menu-btn{display:inline-grid}
  .hero{grid-template-columns:1fr; text-align: center;}
  .hero-cta { justify-content: center; }
  .kpi { grid-template-columns: 1fr; }
  .result-demo { margin: 24px auto 0; }
  .all-features-grid{grid-template-columns:1fr}
  .panel-grid .col-4{grid-column:span 12}
  .results-layout { grid-template-columns: 1fr; }
  .results-sidebar { position: static; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .wartegg-grid { grid-template-columns: 1fr 1fr; }
  .dap-grid { grid-template-columns: 1fr; }
  .spatial-test__choices { grid-template-columns: 1fr; }
  @media(min-width: 768px) {
    .epps-test__choices { grid-template-columns: 1fr 1fr; }
  }
}
@media (max-width: 600px) {
  .wartegg-grid { grid-template-columns: 1fr; }
  .sjt-option-item { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce){
  .line-overlay.active{animation:none;opacity:1;transform:none}
  .modal, .sheet, .user-menu__dropdown {transition:none}
}