:root{
  --ink:#1B2A4A;
  --ink-soft:#2c3e63;
  --paper:#FBF9F4;
  --paper-line:#e3ddc9;
  --slate:#5B6B7F;
  --graphite:#2D3436;
  --amber:#F4A340;
  --exam-red:#C4453D;
  --success:#3F7D5C;
  --card:#ffffff;
  --border:#E4E1D6;
  --radius:10px;
  --shadow: 0 1px 2px rgba(27,42,74,.04), 0 8px 24px rgba(27,42,74,.06);
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:'Inter',sans-serif;
  background:var(--paper);
  color:var(--graphite);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,.serif{font-family:'Source Serif 4',serif;}
.mono{font-family:'IBM Plex Mono',monospace;}
a{color:inherit;}
button{font-family:inherit; cursor:pointer;}
.view{display:none;}
.view.active{display:block;}

/* ---------- NAV ---------- */
.nav{
  position:sticky; top:0; z-index:50;
  background:rgba(251,249,244,.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  max-width:1180px; margin:0 auto; padding:14px 24px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand{display:flex; align-items:center; gap:10px; font-weight:700; font-size:19px; letter-spacing:.2px;}
.brand-mark{
  width:30px; height:30px; border-radius:8px; background:var(--ink);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.brand-mark svg{width:16px; height:16px;}
.nav-links{display:flex; gap:6px; align-items:center;}
.nav-links button{
  background:none; border:none; padding:9px 14px; border-radius:7px;
  font-size:14.5px; font-weight:500; color:var(--slate);
}
.nav-links button.active, .nav-links button:hover{background:var(--ink); color:#fff;}
.nav-cta{
  background:var(--amber) !important; color:var(--ink) !important; font-weight:700 !important;
}
.nav-cta:hover{background:#e2952e !important; color:var(--ink) !important;}
.burger{display:none; background:none; border:1px solid var(--border); border-radius:7px; padding:8px 10px;}

/* ---------- HERO ---------- */
.hero{max-width:1180px; margin:0 auto; padding:76px 24px 60px; display:grid; grid-template-columns:1.1fr .9fr; gap:56px; align-items:center;}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px; font-family:'IBM Plex Mono',monospace;
  font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink);
  background:#eef1f7; border:1px solid #dfe4ee; padding:5px 12px; border-radius:100px; margin-bottom:22px;
}
.eyebrow::before{content:""; width:6px; height:6px; border-radius:50%; background:var(--success); display:inline-block;}
.hero h1{font-size:47px; line-height:1.1; margin:0 0 20px; color:var(--ink); font-weight:700;}
.hero h1 em{font-style:italic; color:var(--amber);}
.hero p{font-size:17.5px; line-height:1.65; color:var(--slate); max-width:520px; margin:0 0 30px;}
.hero-actions{display:flex; gap:12px; flex-wrap:wrap;}
.btn{
  display:inline-flex; align-items:center; gap:8px; padding:13px 24px; border-radius:8px;
  font-weight:600; font-size:15px; border:1px solid transparent; text-decoration:none;
}
.btn-primary{background:var(--ink); color:#fff;}
.btn-primary:hover{background:var(--ink-soft);}
.btn-ghost{background:transparent; border-color:var(--border); color:var(--ink);}
.btn-ghost:hover{border-color:var(--ink);}

.hero-card{
  background:var(--card); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow);
  padding:22px; position:relative;
}
.hero-card-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; padding-bottom:14px; border-bottom:1px dashed var(--border);}
.hero-tag{font-family:'IBM Plex Mono'; font-size:11px; background:#eef1f7; padding:4px 8px; border-radius:5px; color:var(--ink); font-weight:600;}
.hero-timer{font-family:'IBM Plex Mono'; font-weight:600; color:var(--exam-red); font-size:15px;}
.hero-card p.q{font-size:14.5px; line-height:1.6; color:var(--graphite); margin:0 0 16px;}
.hero-lines{background:
  repeating-linear-gradient(var(--card), var(--card) 27px, var(--paper-line) 28px);
  border:1px solid var(--border); border-radius:8px; padding:14px 16px; min-height:120px; font-size:13.5px; color:#8b95a5; font-family:'Source Serif 4', serif;}
.hero-foot{display:flex; justify-content:space-between; margin-top:12px; font-family:'IBM Plex Mono'; font-size:12px; color:var(--slate);}

.stats{max-width:1180px; margin:0 auto; padding:0 24px 70px; display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
.stat{border-top:3px solid var(--ink); padding-top:14px;}
.stat b{display:block; font-family:'Source Serif 4'; font-size:32px; color:var(--ink);}
.stat span{font-size:13.5px; color:var(--slate);}

.section{max-width:1180px; margin:0 auto; padding:70px 24px;}
.section-head{max-width:640px; margin:0 auto 46px; text-align:center;}
.section-head .kicker{font-family:'IBM Plex Mono'; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--amber); font-weight:600;}
.section-head h2{font-size:32px; margin:10px 0 12px; color:var(--ink);}
.section-head p{color:var(--slate); font-size:16px; line-height:1.6;}

.grid3{display:grid; grid-template-columns:repeat(3,1fr); gap:22px;}
.feat{background:var(--card); border:1px solid var(--border); border-radius:12px; padding:26px; box-shadow:var(--shadow);}
.feat .num{font-family:'IBM Plex Mono'; color:var(--amber); font-weight:600; font-size:13px; margin-bottom:10px; display:block;}
.feat h3{font-size:18px; margin:0 0 8px; color:var(--ink);}
.feat p{font-size:14.5px; color:var(--slate); line-height:1.6; margin:0;}

.band{background:var(--ink); color:#fff;}
.band .section-head h2, .band .section-head .kicker{color:#fff;}
.band .section-head .kicker{color:var(--amber);}
.band .section-head p{color:#c3cbdd;}
.steps{display:grid; grid-template-columns:repeat(4,1fr); gap:0; position:relative;}
.step{padding:0 18px; border-left:1px solid rgba(255,255,255,.15);}
.step:first-child{border-left:none;}
.step .n{font-family:'Source Serif 4'; font-size:38px; color:var(--amber); margin-bottom:10px;}
.step h4{margin:0 0 8px; font-size:16px;}
.step p{margin:0; font-size:13.5px; color:#c3cbdd; line-height:1.55;}

footer{border-top:1px solid var(--border); padding:40px 24px; margin-top:20px;}
.footer-inner{max-width:1180px; margin:0 auto; display:flex; justify-content:space-between; flex-wrap:wrap; gap:20px; font-size:13.5px; color:var(--slate);}

/* ---------- DASHBOARD ---------- */
.dash-head{max-width:1180px; margin:0 auto; padding:44px 24px 0;}
.dash-head h1{font-size:32px; color:var(--ink); margin:0 0 8px;}
.dash-head p{color:var(--slate); margin:0 0 26px; font-size:15.5px;}
.filters{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:30px;}
.filters button{padding:9px 16px; border-radius:100px; border:1px solid var(--border); background:var(--card); font-size:13.5px; font-weight:600; color:var(--slate);}
.filters button.active{background:var(--ink); color:#fff; border-color:var(--ink);}
.own-q-banner{
  background:linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%); color:#fff;
  border-radius:12px; padding:26px 28px; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap;
}
.own-q-tag{font-family:'IBM Plex Mono'; font-size:11px; letter-spacing:.06em; text-transform:uppercase; background:rgba(255,255,255,.14); padding:4px 10px; border-radius:100px; display:inline-block; margin-bottom:10px; color:var(--amber); font-weight:600;}
.own-q-banner h3{margin:0 0 8px; font-size:19px; font-family:'Source Serif 4', serif;}
.own-q-banner p{margin:0; font-size:14px; color:#c3cbdd; max-width:520px; line-height:1.55;}
.own-q-banner .btn-primary{background:var(--amber); color:var(--ink); flex-shrink:0;}
.own-q-banner .btn-primary:hover{background:#e2952e;}
.qgrid{max-width:1180px; margin:0 auto; padding:0 24px 80px; display:grid; grid-template-columns:repeat(2,1fr); gap:18px;}
.qcard{background:var(--card); border:1px solid var(--border); border-radius:12px; padding:22px; box-shadow:var(--shadow); display:flex; flex-direction:column;}
.qcard-top{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:12px; gap:10px;}
.badge{font-family:'IBM Plex Mono'; font-size:11px; font-weight:600; padding:4px 9px; border-radius:6px; white-space:nowrap;}
.badge.t1{background:#eaf2ee; color:var(--success);}
.badge.t2{background:#f5eae8; color:var(--exam-red);}
.badge.type{background:#eef1f7; color:var(--ink); margin-left:6px;}
.qcard h3{font-size:15.5px; line-height:1.5; margin:0 0 14px; color:var(--graphite); font-weight:600; flex-grow:1;}
.qcard-foot{display:flex; justify-content:space-between; align-items:center; border-top:1px dashed var(--border); padding-top:14px;}
.qcard-foot span{font-family:'IBM Plex Mono'; font-size:12px; color:var(--slate);}
.qcard-foot button{background:var(--ink); color:#fff; border:none; padding:8px 15px; border-radius:7px; font-size:13px; font-weight:600;}
.qcard-foot button:hover{background:var(--ink-soft);}

/* ---------- TEST INTERFACE ---------- */
.test-wrap{max-width:1180px; margin:0 auto; padding:20px 24px 60px;}
.test-bar{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px;
  background:var(--ink); color:#fff; border-radius:12px; padding:16px 22px; margin-bottom:22px;
}
.test-bar-left{display:flex; align-items:center; gap:14px;}
.test-bar-left .badge{background:rgba(255,255,255,.12); color:#fff;}
.test-bar-left h4{margin:0; font-size:15px; font-weight:600;}
.timer-box{display:flex; align-items:center; gap:10px;}
.timer-display{font-family:'IBM Plex Mono'; font-size:26px; font-weight:600; letter-spacing:1px;}
.timer-display.warn{color:var(--amber);}
.timer-display.danger{color:#ff8a80; animation:pulse 1s infinite;}
@keyframes pulse{0%,100%{opacity:1;}50%{opacity:.45;}}
.timer-btn{background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25); color:#fff; padding:7px 13px; border-radius:7px; font-size:13px; font-weight:600;}
.timer-btn:hover{background:rgba(255,255,255,.22);}

.test-grid{display:grid; grid-template-columns:1fr 1fr; gap:22px; align-items:start;}
.panel{background:var(--card); border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow); overflow:hidden;}
.panel-head{padding:14px 20px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center;}
.panel-head span.label{font-family:'IBM Plex Mono'; font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--slate); font-weight:600;}
.q-body{padding:22px;}
.q-body p{font-size:15.5px; line-height:1.75; color:var(--graphite); margin:0 0 14px;}
.chart-placeholder{background:var(--paper); border:1px dashed var(--border); border-radius:8px; padding:22px; text-align:center; color:var(--slate); font-size:13px; margin-top:10px;}
.chart-placeholder svg{max-width:100%; height:auto;}

.editor-wrap{position:relative;}
textarea#editor{
  width:100%; min-height:520px; border:none; outline:none; resize:vertical;
  padding:24px; font-family:'Source Serif 4', serif; font-size:16.5px; line-height:1.9; color:var(--graphite);
  background:repeating-linear-gradient(var(--card), var(--card) 33px, var(--paper-line) 34px);
  background-attachment:local;
}
textarea#editor::placeholder{color:#a8b0bd; font-style:italic;}
.editor-foot{display:flex; justify-content:space-between; align-items:center; padding:12px 20px; border-top:1px solid var(--border); background:var(--paper);}
.wordcount{font-family:'IBM Plex Mono'; font-size:13px; color:var(--slate);}
.wordcount b{color:var(--ink); font-size:15px;}
.wordcount.low{color:var(--exam-red);}
.wordcount.low b{color:var(--exam-red);}
.editor-actions{display:flex; gap:8px;}
.editor-actions button{padding:9px 16px; border-radius:7px; font-size:13.5px; font-weight:600; border:1px solid var(--border); background:#fff; color:var(--ink);}
.editor-actions button.primary{background:var(--success); color:#fff; border-color:var(--success);}
.editor-actions button.primary:hover{opacity:.9;}
.no-autocorrect-note{font-size:11.5px; color:var(--slate); padding:8px 20px 0;}

/* ---------- RESULT ---------- */
.result-wrap{max-width:760px; margin:0 auto; padding:70px 24px 90px; text-align:center;}
.result-check{width:64px; height:64px; border-radius:50%; background:#eaf2ee; display:flex; align-items:center; justify-content:center; margin:0 auto 22px;}
.result-wrap h1{font-size:30px; color:var(--ink); margin:0 0 10px;}
.result-wrap>p{color:var(--slate); font-size:15.5px; margin:0 0 34px;}
.result-stats{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:34px;}
.rstat{background:var(--card); border:1px solid var(--border); border-radius:10px; padding:18px;}
.rstat b{display:block; font-family:'Source Serif 4'; font-size:24px; color:var(--ink);}
.rstat span{font-size:12.5px; color:var(--slate); font-family:'IBM Plex Mono';}
.result-actions{display:flex; gap:12px; justify-content:center; flex-wrap:wrap;}

/* ---------- ABOUT / CONTACT ---------- */
.simple-page{max-width:820px; margin:0 auto; padding:70px 24px 90px;}
.simple-page h1{font-size:34px; color:var(--ink); margin-bottom:8px;}
.simple-page .lede{color:var(--slate); font-size:16.5px; line-height:1.7; margin-bottom:36px;}
.simple-page h3{color:var(--ink); font-size:19px; margin:34px 0 10px;}
.simple-page p{color:var(--graphite); font-size:15.5px; line-height:1.75;}
.value-grid{display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:20px;}
.value{border-left:3px solid var(--amber); padding:4px 0 4px 16px;}
.value h4{margin:0 0 6px; color:var(--ink); font-size:15.5px;}
.value p{margin:0; font-size:14px; color:var(--slate);}
.form-row{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px;}
.form-field{display:flex; flex-direction:column; gap:6px;}
.form-field.full{grid-column:1/-1;}
label{font-size:13px; font-weight:600; color:var(--ink);}
input, select, textarea.contact-ta{
  border:1px solid var(--border); border-radius:8px; padding:11px 13px; font-family:'Inter'; font-size:14.5px; background:var(--card); color:var(--graphite);
}
textarea.contact-ta{min-height:130px; resize:vertical; font-family:'Inter';}
.contact-submit{margin-top:6px; background:var(--ink); color:#fff; border:none; padding:13px 26px; border-radius:8px; font-weight:600; font-size:14.5px;}

/* ---------- RESPONSIVE ---------- */
@media (max-width:900px){
  .hero{grid-template-columns:1fr; padding-top:40px;}
  .stats{grid-template-columns:repeat(2,1fr);}
  .grid3{grid-template-columns:1fr;}
  .steps{grid-template-columns:1fr 1fr; row-gap:26px;}
  .step{border-left:none; border-top:1px solid rgba(255,255,255,.15); padding-top:18px;}
  .step:first-child{border-top:none;}
  .qgrid{grid-template-columns:1fr;}
  .test-grid{grid-template-columns:1fr;}
  .value-grid{grid-template-columns:1fr;}
  .form-row{grid-template-columns:1fr;}
}
@media (max-width:640px){
  .nav-links{display:none; position:absolute; top:58px; left:0; right:0; background:var(--paper); flex-direction:column; padding:12px; border-bottom:1px solid var(--border);}
  .nav-links.open{display:flex;}
  .burger{display:block;}
  .hero h1{font-size:32px;}
  .hero p{font-size:15.5px;}
  .section-head h2{font-size:26px;}
  textarea#editor{min-height:340px; font-size:15.5px;}
  .timer-display{font-size:21px;}
  .result-stats{grid-template-columns:1fr;}
}
