:root{
  --paper:#f4f1e8;
  --paper-deep:#ebe5d7;
  --surface:#fffdf8;
  --surface-strong:#ffffff;

  --ink:#20241f;
  --muted:#697068;
  --line:#ddd8ca;

  --board:#244d3b;
  --board-2:#2f614a;
  --board-soft:#e7f0e9;
  --chalk:#f7f4e8;

  --wood:#9b6a3d;
  --wood-light:#d4ad7b;
  --wood-soft:#f3e8d7;

  --accent:#1f6a4d;
  --accent-hover:#174f3a;

  --ok:#287c4d;
  --ok-bg:#eaf5ed;
  --bad:#a33c35;
  --bad-bg:#faecea;

  --shadow:0 10px 30px rgba(53,47,36,.07);
}

*{box-sizing:border-box}
html{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--paper);
  scroll-behavior:smooth;
}
body{margin:0;background:var(--paper)}
button,input,select,textarea{font:inherit}
a{color:var(--accent)}
img{max-width:100%}

.site-shell{
  width:min(1180px,calc(100% - 32px));
  margin-inline:auto;
}

.site-header{
  position:relative;
  background:rgba(255,253,248,.96);
  border-bottom:1px solid var(--line);
}
.site-header__wood{
  height:5px;
  background:
    linear-gradient(90deg,
      #7d5432 0%,
      #b58151 18%,
      #8d6039 36%,
      #c29663 58%,
      #825834 78%,
      #ad7948 100%);
}
.site-header__inner{
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.site-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--board);
}
.site-brand__mark{
  width:34px;
  height:34px;
  border-radius:9px;
  display:grid;
  place-items:center;
  background:var(--board);
  color:var(--chalk);
  font-family:Georgia,"Times New Roman",serif;
  font-weight:800;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
.site-brand__text{
  font-size:21px;
  font-weight:900;
  letter-spacing:.05em;
}
.site-nav{
  display:flex;
  align-items:center;
  gap:8px;
}
.site-nav a{
  color:#4f574f;
  text-decoration:none;
  font-weight:700;
  padding:9px 12px;
  border-radius:9px;
}
.site-nav a:hover,
.site-nav a.active{
  background:var(--board-soft);
  color:var(--board);
}

.site-main{padding:42px 0 64px}

.site-footer{
  border-top:1px solid var(--line);
  background:#eee9df;
}
.site-footer__inner{
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  color:#73766f;
  font-size:13px;
}
.site-footer__inner span:first-child{
  font-weight:900;
  color:var(--board);
  letter-spacing:.05em;
}

.muted{color:var(--muted)}
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  padding:26px;
}

/* Buttons */
.site-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:44px;
  padding:0 18px;
  border:1px solid var(--accent);
  border-radius:10px;
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  font-weight:800;
  cursor:pointer;
  transition:transform .15s ease,background .15s ease,box-shadow .15s ease;
}
.site-btn:hover{
  background:var(--accent-hover);
  border-color:var(--accent-hover);
  box-shadow:0 8px 20px rgba(31,106,77,.16);
}
.site-btn:active{transform:translateY(1px)}
.site-btn--block{width:100%;justify-content:space-between}
.site-btn--large{min-height:52px;padding-inline:28px;font-size:16px}

/* NMT list */
.nmt-hero{
  position:relative;
  overflow:hidden;
  padding:30px 32px 31px;
  margin-bottom:18px;
  border-radius:18px;
  background:var(--board);
  color:var(--chalk);
  box-shadow:var(--shadow);
}
.nmt-hero::after{
  content:"";
  position:absolute;
  right:-55px;
  bottom:-75px;
  width:230px;
  height:230px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:50%;
  box-shadow:
    0 0 0 26px rgba(255,255,255,.025),
    0 0 0 52px rgba(255,255,255,.018);
}
.nmt-hero__eyebrow{
  margin-bottom:6px;
  color:#d8e5d9;
  font-size:13px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.nmt-hero h1{
  max-width:720px;
  margin:0 0 10px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(31px,4vw,44px);
  line-height:1.08;
}
.nmt-hero p{
  max-width:720px;
  margin:0;
  color:#e4ece5;
  line-height:1.55;
}

.nmt-list-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 18px;
}
.nmt-list-meta span{
  padding:7px 10px;
  border:1px solid #ddd3c3;
  border-radius:999px;
  background:rgba(255,253,248,.72);
  color:#68675f;
  font-size:13px;
  font-weight:700;
}

.nmt-test-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.nmt-test-card{
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:245px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  box-shadow:0 8px 22px rgba(65,56,42,.045);
}
.nmt-test-card::before{
  content:"";
  height:5px;
  display:block;
  background:linear-gradient(90deg,var(--wood),var(--wood-light),var(--wood));
}
.nmt-test-card__top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 20px 0;
}
.nmt-year{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:var(--board-soft);
  color:var(--board);
  font-size:12px;
  font-weight:900;
}
.nmt-status-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#5f9a75;
  box-shadow:0 0 0 4px #edf5ef;
}
.nmt-test-card__body{
  flex:1;
  padding:18px 20px 20px;
}
.nmt-test-card__number{
  margin-bottom:5px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:27px;
  font-weight:800;
  color:#26342c;
}
.nmt-test-card__subject{
  color:var(--muted);
  font-size:14px;
  font-weight:650;
}
.nmt-test-card__stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:24px;
}
.nmt-test-card__stats span{
  padding:10px;
  border-radius:10px;
  background:#f6f2e9;
  color:#66665f;
  font-size:12px;
}
.nmt-test-card__stats strong{
  display:block;
  margin-bottom:2px;
  color:var(--ink);
  font-size:16px;
}
.nmt-test-card>.site-btn{
  width:auto;
  margin:0 14px 14px;
  border-radius:11px;
  min-height:46px;
  padding-inline:16px;
  box-shadow:none;
}
.empty-state{
  grid-column:1/-1;
  padding:40px;
  text-align:center;
  border:1px dashed #c9c2b4;
  border-radius:16px;
  background:rgba(255,253,248,.55);
}

/* Test heading */
.test-hero{margin-bottom:22px}
.back-link{
  display:inline-flex;
  margin-bottom:12px;
  color:#647068;
  text-decoration:none;
  font-weight:750;
}
.back-link:hover{color:var(--board)}
.test-board{
  position:relative;
  overflow:hidden;
  padding:24px 28px 27px;
  border-radius:16px 16px 10px 10px;
  background:var(--board);
  color:var(--chalk);
  border-bottom:7px solid var(--wood);
  box-shadow:var(--shadow);
}
.test-board::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.08;
  background:
    linear-gradient(115deg,transparent 0 46%,rgba(255,255,255,.22) 47%,transparent 48%),
    linear-gradient(18deg,transparent 0 69%,rgba(255,255,255,.13) 70%,transparent 71%);
}
.test-board__meta{
  position:relative;
  display:flex;
  gap:8px;
  margin-bottom:9px;
}
.test-board__meta span{
  padding:5px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  color:#dce8df;
  font-size:12px;
  font-weight:800;
}
.test-board h1{
  position:relative;
  margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(32px,4vw,44px);
}
.test-board p{
  position:relative;
  margin:7px 0 0;
  color:#d9e5db;
}
.test-hint{
  margin:11px 4px 0;
  color:var(--muted);
  font-size:13px;
}

/* Results */
.result-panel{
  position:sticky;
  top:12px;
  z-index:10;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:0 0 18px;
}
.result-card{
  min-height:92px;
  padding:16px 20px;
  border-radius:14px;
  color:#fff;
  box-shadow:0 8px 26px rgba(49,63,52,.14);
}
.result-card--raw{background:#355d49}
.result-card--rating{background:#7a5736}
.result-card>span{
  display:block;
  margin-bottom:3px;
  opacity:.82;
  font-size:12px;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.result-card strong{
  display:inline-flex;
  align-items:baseline;
  gap:4px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:34px;
  line-height:1;
}
.result-card strong small{font:700 17px/1 system-ui,sans-serif;opacity:.7}
.result-card>small{
  display:block;
  margin-top:4px;
  opacity:.76;
}
.rating-threshold-fail{
  font-family:inherit!important;
  font-size:18px!important;
}

/* Test sections */
.nmt-test-form{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.test-section-label{
  display:flex;
  align-items:center;
  gap:13px;
  margin:18px 0 2px;
  padding:11px 14px;
  border-radius:12px;
  background:var(--wood-soft);
  border:1px solid #e2cfb4;
}
.test-section-label>span{
  min-width:58px;
  color:#704b2b;
  font-family:Georgia,"Times New Roman",serif;
  font-size:21px;
  font-weight:800;
}
.test-section-label div{display:flex;flex-direction:column}
.test-section-label strong{color:#533b29}
.test-section-label small{margin-top:2px;color:#806f60}

/* Task card */
.nmt-task{
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface);
  box-shadow:0 6px 18px rgba(64,57,45,.035);
}
.nmt-task.is-correct{border-color:#9bc6a8}
.nmt-task.is-wrong{border-color:#d9aaa6}

.nmt-task__top{
  min-height:56px;
  padding:10px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  border-bottom:1px solid #e6e1d6;
  background:#faf7f0;
}
.nmt-task__title{
  display:flex;
  align-items:center;
  gap:10px;
}
.task-index{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:var(--board);
  color:var(--chalk);
  font-family:Georgia,"Times New Roman",serif;
  font-weight:800;
}
.nmt-task__title strong{font-size:15px}
.task-points{
  padding:6px 9px;
  border-radius:999px;
  background:#eee9de;
  color:#706c61;
  font-size:12px;
  font-weight:800;
}

.task-paper{
  padding:18px;
  background:#f8f5ee;
}
.task-image-button{
  display:block;
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  text-align:left;
  cursor:zoom-in;
}
.task-image{
  display:block;
  max-width:100%;
  height:auto;
  margin:0 auto;
  background:#fff;
  box-shadow:0 0 0 1px #dad5ca,0 4px 12px rgba(54,48,39,.05);
}

/* Answers */
.task-answer-ui{
  padding:16px 18px 18px;
  border-top:1px solid #eee9df;
}
.answer-label{
  margin-bottom:9px;
  color:#656c64;
  font-size:12px;
  font-weight:850;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.choice-row{
  display:grid;
  grid-template-columns:repeat(5,minmax(52px,1fr));
  gap:9px;
  max-width:520px;
}
.choice-chip{
  position:relative;
  min-height:48px;
  display:grid;
  place-items:center;
  border:1px solid #cfc8bb;
  border-radius:10px;
  background:#fff;
  color:#384038;
  cursor:pointer;
  font-family:Georgia,"Times New Roman",serif;
  font-size:19px;
  font-weight:800;
  transition:border-color .15s ease,background .15s ease,color .15s ease,transform .1s ease;
}
.choice-chip:hover{
  border-color:#8aa18f;
  background:#f1f6f2;
}
.choice-chip:active{transform:translateY(1px)}
.choice-chip input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.choice-chip:has(input:checked){
  border-color:var(--board);
  background:var(--board);
  color:#fff;
  box-shadow:0 0 0 3px rgba(36,77,59,.10);
}
.choice-chip input:focus-visible + span{
  outline:2px solid #6ea185;
  outline-offset:5px;
}

.matching-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.matching-grid label{
  min-width:130px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 9px;
  border:1px solid #d5cfc3;
  border-radius:10px;
  background:#fff;
}
.matching-grid__number{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:8px;
  background:var(--board-soft);
  color:var(--board);
  font-weight:900;
}
.matching-grid select{
  width:72px;
  min-height:36px;
  border:1px solid #c9c3b7;
  border-radius:8px;
  background:#fff;
  padding:5px 8px;
  font-weight:750;
}

.numeric-answer{
  display:flex;
  flex-direction:column;
  max-width:310px;
}
.numeric-answer input{
  min-height:48px;
  border:1px solid #c9c3b7;
  border-radius:10px;
  background:#fff;
  padding:9px 12px;
  font-size:17px;
  outline:none;
}
.numeric-answer input:focus{
  border-color:#6f9b82;
  box-shadow:0 0 0 3px rgba(47,97,74,.09);
}

/* Feedback */
.task-feedback{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px 18px;
  padding:13px 18px;
  border-top:1px solid #e9e4da;
  background:#f7f4ed;
  color:#4d544e;
  font-size:14px;
}
.nmt-task.is-correct .task-feedback{background:var(--ok-bg)}
.nmt-task.is-wrong .task-feedback{background:var(--bad-bg)}
.task-feedback__score{
  display:flex;
  align-items:center;
  gap:8px;
}
.task-feedback__score span{
  color:#6a716b;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}
.task-feedback__score strong{font-size:15px}
.correct-answer strong{color:var(--board)}
.task-feedback details{width:100%}
.task-feedback summary{
  width:max-content;
  cursor:pointer;
  color:var(--board);
  font-weight:800;
}
.solution-box{
  margin-top:9px;
  padding:12px;
  border-left:4px solid var(--wood);
  border-radius:6px;
  background:#fffdf8;
  line-height:1.6;
}

/* Submit */
.test-submit-bar{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:22px 0 8px;
}
.quiet-link{
  color:#71766f;
  text-decoration:none;
  font-size:13px;
}
.quiet-link:hover{color:var(--board)}

.test-alert{
  margin-bottom:16px;
  padding:12px 14px;
  border-radius:10px;
}
.test-alert--error{
  border:1px solid #ecc9c6;
  background:#fff0ef;
  color:#942f28;
}

/* Image zoom */
.image-zoom[hidden]{display:none}
.image-zoom{
  position:fixed;
  inset:0;
  z-index:999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:rgba(18,24,20,.92);
}
.image-zoom img{
  max-width:96vw;
  max-height:92vh;
  background:#fff;
  box-shadow:0 18px 60px rgba(0,0,0,.35);
}
.image-zoom__close{
  position:absolute;
  top:15px;
  right:18px;
  width:46px;
  height:46px;
  border:0;
  border-radius:50%;
  background:#fff;
  color:#223029;
  font-size:30px;
  line-height:1;
  cursor:pointer;
}

/* Responsive */
@media(max-width:980px){
  .nmt-test-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:720px){
  .site-shell{width:min(100% - 22px,1180px)}
  .site-header__inner{min-height:68px}
  .site-brand__text{font-size:18px}
  .site-nav a{padding:8px}
  .site-main{padding:24px 0 42px}

  .nmt-hero{padding:24px 22px}
  .nmt-test-grid{grid-template-columns:1fr}
  .nmt-test-card{min-height:auto}

  .test-board{padding:20px 18px}
  .result-panel{position:static;grid-template-columns:1fr}
  .result-card{min-height:78px}

  .task-paper{padding:10px}
  .task-answer-ui{padding:14px}
  .choice-row{grid-template-columns:repeat(5,1fr);gap:6px}
  .choice-chip{min-height:45px}
  .test-section-label{align-items:flex-start}

  .site-footer__inner{
    padding:18px 0;
    flex-direction:column;
    align-items:flex-start;
  }
}

@media(max-width:440px){
  .site-nav a:first-child{display:none}
  .site-brand__mark{width:31px;height:31px}
  .nmt-test-card__stats{grid-template-columns:1fr}
  .choice-chip{font-size:17px}
  .matching-grid{display:grid;grid-template-columns:1fr}
  .matching-grid label{width:100%}
}


/* Floating scroll-to-top button v1.0.1 */
.scroll-top{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:80;
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.16);
  border-radius:14px;
  background:var(--board);
  color:var(--chalk);
  box-shadow:0 10px 28px rgba(36,77,59,.22);
  cursor:pointer;
  font-size:24px;
  line-height:1;
  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  transition:opacity .18s ease,visibility .18s ease,transform .18s ease,background .18s ease;
}
.scroll-top.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.scroll-top:hover{background:var(--board-2)}
.scroll-top:focus-visible{
  outline:3px solid rgba(47,97,74,.24);
  outline-offset:3px;
}
@media(max-width:720px){
  .scroll-top{
    right:14px;
    bottom:14px;
    width:44px;
    height:44px;
    border-radius:12px;
  }
}


/* NMT cards v1.0.2 */
.nmt-test-card{
  padding-bottom:1px;
}
.nmt-test-card__stats span{
  min-width:0;
}
.nmt-test-card__stats span:last-child{
  background:#edf3ee;
  color:#4f6256;
}
.nmt-test-card__stats span:last-child strong{
  color:var(--board);
}
@media(max-width:1080px){
  .nmt-test-card__stats{
    grid-template-columns:1fr 1fr;
  }
  .nmt-test-card__stats span:last-child{
    grid-column:1/-1;
  }
}
@media(max-width:720px){
  .nmt-test-card__stats{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .nmt-test-card__stats span:last-child{
    grid-column:auto;
  }
}
@media(max-width:500px){
  .nmt-test-card__stats{
    grid-template-columns:1fr;
  }
}


/* NMT year navigation v1.2 */
.nmt-year-nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 14px;
}
.nmt-year-nav__item{
  min-width:126px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 13px;
  border:1px solid #d9d1c3;
  border-radius:12px;
  background:rgba(255,253,248,.78);
  color:#5c625b;
  text-decoration:none;
  box-shadow:0 4px 12px rgba(60,52,40,.035);
  transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease;
}
.nmt-year-nav__item strong{
  font-family:Georgia,"Times New Roman",serif;
  font-size:20px;
  color:var(--board);
}
.nmt-year-nav__item span{
  font-size:12px;
  font-weight:750;
  color:#7a7a71;
}
.nmt-year-nav__item:hover{
  border-color:#9db2a3;
  background:#f3f7f3;
}
.nmt-year-nav__item.active{
  border-color:var(--board);
  background:var(--board);
  color:#fff;
}
.nmt-year-nav__item.active strong,
.nmt-year-nav__item.active span{
  color:#fff;
}
@media(max-width:500px){
  .nmt-year-nav{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .nmt-year-nav__item{
    min-width:0;
  }
}


/* Mathematik typography v1.2.1
   Clean sans-serif typography for mathematical/educational UI. */

.nmt-hero h1,
.nmt-test-card__number,
.test-board h1,
.test-section-label>span,
.result-card strong,
.task-index,
.nmt-year-nav__item strong{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}

/* Card title: smaller and less decorative than the previous serif version. */
.nmt-test-card__number{
  font-size:23px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:-0.02em;
  color:#26342c;
}

/* Main NMT heading stays prominent but more technical/academic. */
.nmt-hero h1{
  font-size:clamp(30px,3.6vw,41px);
  line-height:1.1;
  font-weight:850;
  letter-spacing:-0.025em;
}

/* Test page title. */
.test-board h1{
  font-size:clamp(30px,3.6vw,40px);
  line-height:1.1;
  font-weight:850;
  letter-spacing:-0.025em;
}

/* Section ranges and score figures should be compact, not book-like. */
.test-section-label>span{
  font-size:19px;
  font-weight:850;
  letter-spacing:-0.01em;
}

.result-card strong{
  font-weight:850;
  letter-spacing:-0.02em;
}

.task-index{
  font-weight:850;
}

.nmt-year-nav__item strong{
  font-size:18px;
  font-weight:850;
}

/* Slightly cleaner supporting text. */
.nmt-test-card__subject{
  font-weight:700;
  letter-spacing:-0.01em;
}

.nmt-test-card__stats strong{
  font-size:15px;
  font-weight:800;
}

@media(max-width:720px){
  .nmt-test-card__number{
    font-size:22px;
  }
}


/* Multilingual public shell v1.3 */
.site-header__right{
  display:flex;
  align-items:center;
  gap:16px;
}
.language-switch{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:3px;
  border:1px solid #ddd6c9;
  border-radius:10px;
  background:#f6f2e9;
}
.language-switch a{
  min-width:34px;
  height:31px;
  display:grid;
  place-items:center;
  padding:0 7px;
  border-radius:7px;
  color:#6a6d66;
  text-decoration:none;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
}
.language-switch a:hover{
  background:#eaf1eb;
  color:var(--board);
}
.language-switch a.active{
  background:var(--board);
  color:#fff;
}

/* Home */
.home-hero,
.tools-hero{
  position:relative;
  overflow:hidden;
  padding:30px 32px;
  margin-bottom:18px;
  border-radius:18px;
  background:var(--board);
  color:var(--chalk);
  box-shadow:var(--shadow);
}
.home-hero h1,
.tools-hero h1{
  max-width:780px;
  margin:0 0 10px;
  font-size:clamp(30px,3.6vw,41px);
  line-height:1.1;
  font-weight:850;
  letter-spacing:-.025em;
}
.home-hero p,
.tools-hero p{
  max-width:760px;
  margin:0;
  color:#e4ece5;
  line-height:1.55;
}
.home-grid,
.tools-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.home-card,
.tool-card{
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface);
  padding:24px;
  box-shadow:0 7px 20px rgba(65,56,42,.04);
}
.home-card__mark,
.tool-card__icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  margin-bottom:18px;
  border-radius:12px;
  background:var(--board-soft);
  color:var(--board);
  font-weight:900;
}
.home-card h2,
.tool-card h2{
  margin:0 0 8px;
  font-size:23px;
  letter-spacing:-.02em;
}
.home-card p,
.tool-card p{
  min-height:48px;
  margin:0 0 20px;
  color:var(--muted);
  line-height:1.5;
}
.tool-card{
  display:flex;
  gap:18px;
  align-items:flex-start;
}
.tool-card__icon{
  flex:0 0 48px;
  margin:0;
  font-size:22px;
}
.tool-card__state{
  display:inline-flex;
  margin-bottom:7px;
  padding:5px 8px;
  border-radius:999px;
  background:#f1e6d7;
  color:#795331;
  font-size:11px;
  font-weight:850;
}
.tool-card--featured{
  border-color:#b9cabb;
  background:#fbfdfb;
}

@media(max-width:900px){
  .site-header__inner{
    align-items:flex-start;
    padding-top:14px;
    padding-bottom:14px;
  }
  .site-header__right{
    flex-direction:column-reverse;
    align-items:flex-end;
    gap:7px;
  }
}

@media(max-width:720px){
  .site-header__inner{
    align-items:center;
  }
  .site-header__right{
    flex-direction:row;
    align-items:center;
    gap:8px;
  }
  .site-nav{
    display:none;
  }
  .home-grid,
  .tools-grid{
    grid-template-columns:1fr;
  }
  .home-hero,
  .tools-hero{
    padding:24px 22px;
  }
}

@media(max-width:420px){
  .site-brand__text{
    font-size:16px;
  }
  .language-switch a{
    min-width:31px;
    padding-inline:5px;
  }
}


/* ===============================================================
   Mathematik Notebook v1.4
   Universal freehand scratchpad under a task
================================================================ */
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.notebook{
  border-top:1px solid #ece6da;
  background:#fcfaf5;
}

.notebook-toggle{
  width:100%;
  min-height:52px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 18px;
  border:0;
  background:transparent;
  color:var(--board);
  font-weight:800;
  cursor:pointer;
  text-align:left;
}
.notebook-toggle:hover{
  background:#f3f5ef;
}
.notebook-toggle__icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid #b9c8bc;
  border-radius:8px;
  background:#edf4ee;
  font-size:17px;
}
.notebook.is-open .notebook-toggle{
  border-bottom:1px solid #e7e1d5;
  background:#f6f7f2;
}

.notebook-panel{
  position:relative;
  border-top:0;
  background:#f8f5ee;
}

.notebook-toolbar{
  position:sticky;
  top:8px;
  z-index:8;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:0;
  padding:9px 12px;
  border-bottom:1px solid #ddd6c9;
  background:rgba(255,253,248,.96);
  box-shadow:0 5px 15px rgba(54,48,39,.045);
  backdrop-filter:blur(8px);
}

.notebook-toolgroup{
  display:flex;
  align-items:center;
  gap:5px;
}
.notebook-divider{
  width:1px;
  height:29px;
  margin:0 2px;
  background:#ddd6c9;
}

.notebook-tool,
.notebook-action,
.notebook-width,
.notebook-color{
  border:1px solid #d3ccbf;
  background:#fff;
  color:#4c554e;
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease,color .14s ease,transform .08s ease;
}
.notebook-tool:hover,
.notebook-action:hover:not(:disabled),
.notebook-width:hover,
.notebook-color:hover{
  border-color:#95ac9c;
  background:#f1f6f2;
  color:var(--board);
}
.notebook-tool:active,
.notebook-action:active:not(:disabled),
.notebook-width:active,
.notebook-color:active{
  transform:translateY(1px);
}

.notebook-tool{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
}
.notebook-tool.is-active{
  border-color:var(--board);
  background:var(--board);
  color:#fff;
}

.notebook-eraser-icon{
  width:14px;
  height:10px;
  display:inline-block;
  border:2px solid currentColor;
  border-radius:2px;
  transform:rotate(-34deg);
}

.notebook-width{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:8px;
}
.notebook-width.is-active{
  border-color:#668d75;
  background:#edf4ee;
  box-shadow:inset 0 0 0 1px #668d75;
}
.notebook-width-dot{
  width:max(4px,var(--stroke-size));
  height:max(4px,var(--stroke-size));
  display:block;
  border-radius:50%;
  background:#25322b;
}

.notebook-color{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  padding:0;
}
.notebook-color>span:not(.sr-only){
  width:18px;
  height:18px;
  display:block;
  border-radius:50%;
  background:var(--pen-color);
}
.notebook-color.is-active{
  border-color:#53675a;
  box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(36,77,59,.22);
}

.notebook-action{
  min-width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:8px;
  padding:0 9px;
  font-weight:800;
}
.notebook-action:disabled{
  opacity:.38;
  cursor:not-allowed;
}
.notebook-action--text{
  width:auto;
  display:inline-flex;
  gap:4px;
  font-size:12px;
  font-weight:750;
}

.notebook-sheet{
  position:relative;
  overflow:hidden;
  margin:14px;
  border:1px solid #cfd7d0;
  border-radius:10px;
  background-color:#fffefb;
  background-image:
    linear-gradient(rgba(78,139,174,.11) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,139,174,.11) 1px,transparent 1px),
    linear-gradient(rgba(78,139,174,.055) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,139,174,.055) 1px,transparent 1px);
  background-size:
    var(--grid-size,36px) var(--grid-size,36px),
    var(--grid-size,36px) var(--grid-size,36px),
    var(--grid-major,180px) var(--grid-major,180px),
    var(--grid-major,180px) var(--grid-major,180px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 4px 14px rgba(53,47,36,.035);
}

.notebook-canvas{
  display:block;
  width:100%;
  height:280px;
  cursor:crosshair;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}
.notebook-canvas.is-erasing{
  cursor:cell;
}

.notebook-help{
  padding:0 16px 13px;
  color:#84877f;
  font-size:11px;
  line-height:1.4;
}

@media(max-width:760px){
  .notebook-toolbar{
    top:4px;
    padding:8px;
    gap:6px;
  }
  .notebook-divider{
    display:none;
  }
  .notebook-actions{
    width:100%;
    padding-top:2px;
  }
  .notebook-sheet{
    margin:10px;
  }
  .notebook-action--text{
    flex:1 1 auto;
    justify-content:center;
  }
}

@media(max-width:480px){
  .notebook-tool span:last-child{
    display:none;
  }
  .notebook-tool{
    width:36px;
    padding:0;
    justify-content:center;
  }
  .notebook-width,
  .notebook-color{
    width:32px;
    height:32px;
  }
  .notebook-action--text{
    font-size:11px;
  }
}


/* Notebook grid scale v1.4.1 */
.notebook-tool-label{
  margin-right:2px;
  color:#6f756e;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}

.notebook-grid{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid #d3ccbf;
  border-radius:8px;
  background:#fff;
  color:#4c554e;
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .08s ease;
}
.notebook-grid:hover{
  border-color:#95ac9c;
  background:#f1f6f2;
}
.notebook-grid:active{
  transform:translateY(1px);
}
.notebook-grid.is-active{
  border-color:#668d75;
  background:#edf4ee;
  box-shadow:inset 0 0 0 1px #668d75;
}
.notebook-grid-preview{
  width:22px;
  height:22px;
  display:block;
  border-radius:3px;
  background-color:#fffefb;
  background-image:
    linear-gradient(rgba(78,139,174,.28) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,139,174,.28) 1px,transparent 1px);
  background-size:var(--preview-grid) var(--preview-grid);
  box-shadow:inset 0 0 0 1px rgba(78,139,174,.18);
}

@media(max-width:760px){
  .notebook-grids{
    order:4;
  }
  .notebook-tool-label{
    display:none;
  }
}


/* Solve flow v1.4.2: Condition -> Notebook -> Answer */
.notebook-condition{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 11px;
  border:1px solid #b9c8bc;
  border-radius:8px;
  background:#edf4ee;
  color:var(--board);
  font-size:12px;
  font-weight:850;
  cursor:zoom-in;
}
.notebook-condition:hover{
  border-color:#668d75;
  background:#e4efe6;
}
.notebook-condition__icon{
  font-size:17px;
  line-height:1;
}

/* The answer now comes after the working area and reads as the final step. */
.notebook + .task-answer-ui{
  border-top:1px solid #dfd8ca;
  background:#fffdf8;
  padding-top:18px;
}
.notebook.is-open + .task-answer-ui{
  box-shadow:inset 0 5px 12px rgba(59,51,39,.025);
}

@media(max-width:480px){
  .notebook-condition span:last-child{
    display:none;
  }
  .notebook-condition{
    width:36px;
    padding:0;
    justify-content:center;
  }
}


/* Notebook shapes v1.5 */
.notebook-shapes{
  flex-wrap:wrap;
}
.notebook-shape{
  width:36px;
  min-width:36px;
  padding:0;
  justify-content:center;
  font-size:16px;
  line-height:1;
}
.notebook-shape span[aria-hidden="true"]{
  transform:translateY(-.5px);
}

@media(max-width:760px){
  .notebook-shapes{
    order:3;
  }
}


/* ===============================================================
   Public NMT task design v1.6
   Same visual language as the compact admin task cards.
   Desktop: condition/work left + answer right.
   Mobile: condition -> notebook -> answer.
================================================================ */
.nmt-task{
  border-color:#ddd8ca;
  border-radius:15px;
  background:#fffdf8;
  box-shadow:0 7px 22px rgba(53,47,36,.045);
}
.nmt-task__top{
  min-height:48px;
  padding:9px 14px;
  border-bottom:1px solid #d7dfd8;
  background:#e6f0e8;
}
.nmt-task__title{
  flex-wrap:wrap;
  gap:8px;
}
.task-index{
  width:31px;
  height:31px;
  border-radius:8px;
  font-family:inherit;
  font-size:14px;
}
.nmt-task__title strong{
  color:var(--board);
  font-size:14px;
  font-weight:900;
}
.task-type-pill{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:2px 8px;
  border:1px solid #c7d8cb;
  border-radius:999px;
  background:#f8fbf8;
  color:#587061;
  font-size:10px;
  font-weight:850;
  line-height:1.15;
}
.task-points{
  border-radius:7px;
  background:var(--board);
  color:var(--chalk);
  font-size:11px;
}

.nmt-task__content{
  display:grid;
  grid-template-columns:minmax(0,1.75fr) minmax(300px,.72fr);
  min-width:0;
  background:#fffdf8;
}
.nmt-task__work{
  min-width:0;
  border-right:1px solid #e1dcd1;
}
.task-condition-block{
  padding:12px 13px 0;
}
.task-block-label{
  margin:0 0 8px;
  color:#687169;
  font-size:10px;
  font-weight:900;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.task-paper{
  padding:0;
  border:1px solid #e1dcd1;
  border-radius:9px;
  background:#fff;
  overflow:hidden;
}
.task-image{
  width:auto;
  max-width:100%;
  box-shadow:none;
}

/* Notebook becomes a clear work block directly under the problem. */
.nmt-task__work>.notebook{
  margin-top:12px;
  border-top:1px solid #e3ded3;
  background:#faf8f2;
}
.nmt-task__work>.notebook .notebook-toggle{
  min-height:46px;
  padding:8px 13px;
  background:#f7f8f3;
  color:var(--board);
}
.nmt-task__work>.notebook.is-open .notebook-toggle{
  border-bottom:1px solid #e1dcd1;
  background:#edf3ed;
}

/* Answer is an independent panel, like in admin. */
.task-answer-ui{
  align-self:start;
  margin:12px;
  padding:12px;
  border:1px solid #ddd7cb;
  border-radius:10px;
  background:#fffefb;
}
.nmt-task__work + .task-answer-ui{
  border-top:1px solid #ddd7cb;
}
.nmt-task__work + .task-answer-ui,
.notebook + .task-answer-ui{
  box-shadow:none;
}

.choice-row{
  grid-template-columns:repeat(5,minmax(42px,1fr));
  gap:6px;
  max-width:none;
}
.choice-chip{
  min-height:42px;
  border-radius:8px;
  font-family:inherit;
  font-size:16px;
}

.matching-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}
.matching-grid label{
  min-width:0;
  display:grid;
  grid-template-columns:28px minmax(50px,1fr);
  gap:5px;
  padding:0;
  border:0;
  background:transparent;
}
.matching-grid__number{
  width:28px;
  height:38px;
  border-radius:7px;
}
.matching-grid select{
  width:100%;
  min-width:0;
  min-height:38px;
  height:38px;
  padding:5px 6px;
  text-align-last:center;
}
.numeric-answer{max-width:220px}
.numeric-answer input{min-height:42px}

/* Feedback is a separate final strip across the whole task card. */
.task-feedback{
  border-top:1px solid #dfd9ce;
  background:#f8f6f0;
}

@media(max-width:960px){
  .nmt-task__content{grid-template-columns:1fr}
  .nmt-task__work{border-right:0}
  .task-answer-ui{
    margin:0;
    padding:14px;
    border:0;
    border-top:1px solid #dfd9ce;
    border-radius:0;
    background:#fffdf8;
  }
  .nmt-task__work>.notebook{margin-top:10px}
}

@media(max-width:520px){
  .nmt-task__top{padding:8px 10px}
  .task-condition-block{padding:9px 9px 0}
  .task-type-pill{max-width:175px}
  .choice-row{grid-template-columns:repeat(5,1fr);gap:5px}
  .choice-chip{min-height:40px;font-size:15px}
  .matching-grid{grid-template-columns:1fr}
  .matching-grid label{grid-template-columns:34px minmax(0,1fr)}
  .numeric-answer{max-width:none}
}


/* ===============================================================
   Public NMT task design v1.6.1
   Top row: condition + answer. Notebook: full width below.
================================================================ */
.nmt-task__content{
  display:block;
}

.nmt-task__toprow{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,330px);
  align-items:stretch;
  min-width:0;
  background:#fffdf8;
}

.nmt-task__toprow .task-condition-block{
  min-width:0;
  padding:12px 13px;
  border-right:1px solid #e1dcd1;
}

.nmt-task__toprow .task-answer-ui{
  align-self:stretch;
  margin:12px;
  min-height:0;
  border:1px solid #ddd7cb;
  border-radius:10px;
  background:#fffefb;
}

.nmt-task__notebook-row{
  width:100%;
  border-top:1px solid #dfd9ce;
  background:#faf8f2;
}

.nmt-task__notebook-row>.notebook{
  margin:0;
  border-top:0;
  background:#faf8f2;
}

.nmt-task__notebook-row>.notebook .notebook-toggle{
  min-height:46px;
  padding:8px 13px;
  background:#f1f5ef;
  color:var(--board);
}

.nmt-task__notebook-row>.notebook.is-open .notebook-toggle{
  border-bottom:1px solid #e1dcd1;
  background:#eaf1ea;
}

/* The notebook canvas now has access to the whole task width. */
.nmt-task__notebook-row .notebook-sheet{
  margin-left:14px;
  margin-right:14px;
}

/* Single-choice answer stays compact rather than stretching vertically. */
.nmt-task__toprow .choice-row{
  grid-template-columns:repeat(5,minmax(40px,1fr));
  max-width:none;
}

/* Matching remains compact inside the right answer card. */
.nmt-task__toprow .matching-grid{
  grid-template-columns:1fr;
  gap:7px;
}
.nmt-task__toprow .matching-grid label{
  grid-template-columns:32px minmax(70px,1fr);
}

@media(max-width:900px){
  .nmt-task__toprow{
    grid-template-columns:1fr;
  }
  .nmt-task__toprow .task-condition-block{
    border-right:0;
    border-bottom:1px solid #e1dcd1;
  }
  .nmt-task__toprow .task-answer-ui{
    margin:10px 12px 12px;
  }
}

@media(max-width:520px){
  .nmt-task__toprow .task-condition-block{
    padding:9px;
  }
  .nmt-task__toprow .task-answer-ui{
    margin:8px 9px 10px;
    padding:10px;
  }
  .nmt-task__notebook-row .notebook-sheet{
    margin-left:9px;
    margin-right:9px;
  }
}


/* Notebook selection + drag v1.5.2 */
.notebook-select-tool span[aria-hidden="true"]{
  font-size:18px;
  line-height:1;
  transform:translateY(-1px);
}
.notebook-canvas.is-selecting{
  cursor:default;
}
.notebook-canvas.is-selecting:active{
  cursor:grabbing;
}


/* Notebook global actions v1.5.3 */
.notebook-global-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:2px 0 4px;
  padding:8px 10px;
  border:1px solid #d9dfd9;
  border-radius:11px;
  background:#f1f5ef;
}
.notebook-global-actions__label{
  margin-right:4px;
  color:var(--board);
  font-size:12px;
  font-weight:900;
}
.notebook-global-action{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 10px;
  border:1px solid #d0d8d1;
  border-radius:8px;
  background:#fffefb;
  color:#46544b;
  font:750 11px/1.2 inherit;
  cursor:pointer;
}
.notebook-global-action:hover{
  border-color:#91aa99;
  background:#f8fbf8;
  color:var(--board);
}
.notebook-global-action--danger{
  margin-left:auto;
  border-color:#dec9c5;
  color:#8d443d;
}
.notebook-global-action--danger:hover{
  border-color:#cda9a4;
  background:#fff5f3;
  color:#923d35;
}

@media(max-width:620px){
  .notebook-global-actions__label{
    width:100%;
  }
  .notebook-global-action{
    flex:1 1 auto;
  }
  .notebook-global-action--danger{
    margin-left:0;
  }
}


/* Notebook global actions v1.5.5 — only full reset remains */
.notebook-global-actions--clear-only{
  justify-content:flex-end;
  min-height:0;
  padding:6px 8px;
}
.notebook-global-actions--clear-only .notebook-global-action--danger{
  margin-left:0;
}
@media(max-width:620px){
  .notebook-global-actions--clear-only .notebook-global-action{
    flex:0 0 auto;
  }
}


/* Test reset v1.5.6 — compact button, no full-width toolbar */
.test-clear-action{
  display:flex;
  justify-content:flex-end;
  margin:2px 0 14px;
  padding:0;
  border:0;
  background:transparent;
}

.test-clear-button{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 11px;
  border:1px solid #dec9c5;
  border-radius:8px;
  background:#fffefb;
  color:#8d443d;
  font:750 12px/1.2 inherit;
  cursor:pointer;
}

.test-clear-button:hover{
  border-color:#cda9a4;
  background:#fff5f3;
  color:#923d35;
}

@media(max-width:520px){
  .test-clear-action{
    margin-bottom:10px;
  }
}


/* Notebook shape editing v1.5.7 */
.notebook-object-action{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid #d3ccbf;
  border-radius:8px;
  background:#fff;
  color:#4b554e;
  font-size:16px;
  font-weight:850;
  cursor:pointer;
}
.notebook-object-action:hover:not(:disabled){
  border-color:#8fa795;
  background:#f1f6f2;
  color:var(--board);
}
.notebook-object-action--danger:hover:not(:disabled){
  border-color:#d3aaa5;
  background:#fff3f1;
  color:#9a4038;
}
.notebook-object-action:disabled{
  opacity:.32;
  cursor:default;
}

.notebook-canvas.is-selecting{
  cursor:grab;
}
.notebook-canvas.is-selecting.is-transforming{
  cursor:grabbing;
}


/* NMT condition code / MathJax v1.6.8 */
.task-paper--code{
  display:block;
  padding:18px 20px;
  overflow-x:auto;
}
.task-code-content{
  min-height:90px;
  color:#232724;
  font-size:16px;
  line-height:1.55;
}
.task-code-content p:first-child{margin-top:0}
.task-code-content p:last-child{margin-bottom:0}
.task-code-content table{
  width:auto;
  max-width:100%;
  margin:12px auto;
  border-collapse:collapse;
}
.task-code-content th,
.task-code-content td{
  min-width:64px;
  padding:7px 11px;
  border:1px solid #727975;
  text-align:center;
  vertical-align:middle;
}
.task-code-content ul,
.task-code-content ol{
  padding-left:24px;
}
.task-condition-block{
  scroll-margin-top:18px;
}


/* ==========================================================
   Mathematik brand + homepage auth v0.5.0
   ========================================================== */
.site-brand__logo{
  display:block;
  width:auto;
  height:46px;
  max-width:min(238px,42vw);
}

.home-hero--auth{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(290px,360px);
  align-items:center;
  gap:32px;
  padding:30px 32px;
}
.home-hero__content{
  min-width:0;
}
.home-auth{
  padding:18px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:14px;
  background:rgba(255,253,248,.98);
  color:var(--ink);
  box-shadow:0 12px 30px rgba(15,37,27,.16);
}
.home-auth__head{
  display:flex;
  align-items:center;
  gap:11px;
  margin-bottom:14px;
}
.home-auth__head img{
  flex:0 0 auto;
}
.home-auth__head strong,
.home-auth__head span{
  display:block;
}
.home-auth__head strong{
  color:var(--board);
  font-size:16px;
}
.home-auth__head span{
  margin-top:2px;
  color:#727971;
  font-size:12px;
}
.home-auth__form{
  display:grid;
  gap:10px;
}
.home-auth__form label{
  display:grid;
  gap:5px;
}
.home-auth__form label>span{
  color:#4d5a52;
  font-size:12px;
  font-weight:800;
}
.home-auth__form input{
  width:100%;
  min-height:40px;
  padding:8px 10px;
  border:1px solid #d8d3c8;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  outline:none;
}
.home-auth__form input:focus{
  border-color:#7f9f8b;
  box-shadow:0 0 0 3px rgba(36,77,59,.09);
}
.home-auth__submit{
  width:100%;
  min-height:42px;
  margin-top:2px;
}
.home-auth__alert{
  margin:0 0 10px;
  padding:8px 10px;
  border:1px solid #e5c4bf;
  border-radius:8px;
  background:#fff2f0;
  color:#8e3d36;
  font-size:12px;
  line-height:1.35;
}
.home-auth__user{
  display:grid;
  gap:3px;
  margin:2px 0 14px;
  padding:11px 12px;
  border-radius:9px;
  background:#f0f4ef;
}
.home-auth__user strong{
  color:var(--board);
}
.home-auth__user span{
  color:#798079;
  font-size:12px;
}
.home-auth__actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.home-auth__actions form{margin:0}
.home-auth__logout{
  min-height:42px;
  padding:0 14px;
  border:1px solid #d5d0c6;
  border-radius:9px;
  background:#fff;
  color:#59615b;
  font-weight:800;
  cursor:pointer;
}
.home-auth__logout:hover{
  border-color:#9aa99f;
  color:var(--board);
}

@media(max-width:860px){
  .home-hero--auth{
    grid-template-columns:1fr;
  }
  .home-auth{
    width:min(100%,430px);
  }
}

@media(max-width:520px){
  .site-brand__logo{
    height:38px;
    max-width:180px;
  }
  .home-hero--auth{
    padding:22px 18px;
    gap:22px;
  }
  .home-auth{
    padding:14px;
  }
}


/* ==========================================================
   Personal cabinet v0.5.1
   ========================================================== */
.home-auth__secondary{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border:1px solid #d5d0c6;
  border-radius:9px;
  background:#fff;
  color:#59615b;
  text-decoration:none;
  font-weight:800;
}
.home-auth__secondary:hover{
  border-color:#9aa99f;
  color:var(--board);
}

.cabinet-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:22px;
  padding:26px 28px;
  border-radius:14px;
  background:var(--board);
  color:#fff;
  box-shadow:inset 0 -6px 0 #b68150;
}
.cabinet-hero h1{
  margin:4px 0 7px;
  color:#fff;
}
.cabinet-hero p{
  margin:0;
  color:#dbe7df;
}
.cabinet-user-card{
  min-width:240px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:11px;
  background:rgba(255,255,255,.08);
}
.cabinet-user-card strong,
.cabinet-user-card span{display:block}
.cabinet-user-card span{
  margin-top:2px;
  color:#c9dbd0;
  font-size:12px;
}
.cabinet-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.cabinet-card{
  min-height:155px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
  padding:18px;
  border:1px solid #ded9cf;
  border-radius:12px;
  background:#fffefb;
  color:var(--ink);
  text-decoration:none;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.cabinet-card:hover{
  transform:translateY(-2px);
  border-color:#91a697;
  box-shadow:0 10px 24px rgba(38,68,52,.10);
}
.cabinet-card__mark{
  min-width:42px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 8px;
  border-radius:8px;
  background:#e8f0ea;
  color:var(--board);
  font-size:12px;
  font-weight:900;
}
.cabinet-card strong{
  color:var(--board);
  font-size:18px;
}
.cabinet-card small{
  color:#737a74;
  line-height:1.4;
}
.cabinet-footer-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:18px;
}
.cabinet-footer-actions form{margin:0}

@media(max-width:820px){
  .cabinet-hero{
    align-items:flex-start;
    flex-direction:column;
  }
  .cabinet-user-card{
    min-width:0;
    width:100%;
  }
  .cabinet-grid{
    grid-template-columns:1fr;
  }
}


/* Tuning Lab tool link v1.0 */
.tool-card--link{
  color:var(--ink);
  text-decoration:none;
  transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.tool-card--link:hover{
  transform:translateY(-2px);
  border-color:#8fa994;
  box-shadow:0 12px 26px rgba(48,70,56,.08);
}
.tool-card--link .site-btn{
  display:inline-flex;
}


/* ==========================================================
   NMT / ZNO formula reference v0.2
   ========================================================== */
.nmt-reference-entry{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:-14px 0 24px;
  padding:16px 18px;
  border:1px solid #d8d4c8;
  border-radius:12px;
  background:#fffdf8;
  box-shadow:var(--shadow);
}
.nmt-reference-entry__text strong{
  display:block;
  margin:2px 0 4px;
  color:var(--board);
  font-size:18px;
}
.nmt-reference-entry__text p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}
.nmt-reference-entry__eyebrow{
  color:#8a7257;
  font-size:10px;
  font-weight:900;
  letter-spacing:.10em;
  text-transform:uppercase;
}
.nmt-reference-entry__actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
.reference-entry-secondary,
.reference-back{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 12px;
  border:1px solid #d4d0c5;
  border-radius:9px;
  background:#fff;
  color:var(--board);
  text-decoration:none;
  font-size:12px;
  font-weight:850;
}
.reference-entry-secondary:hover,
.reference-back:hover{
  border-color:#98aa9c;
  background:#f1f6f2;
}

.reference-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:16px;
}
.reference-hero h1{
  margin:4px 0 6px;
  color:var(--board);
  font-size:clamp(30px,4vw,48px);
  line-height:1;
}
.reference-hero p{
  max-width:760px;
  margin:0;
  color:var(--muted);
  line-height:1.55;
}

.reference-mode-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}
.reference-mode-tabs>a{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:13px 15px;
  border:1px solid #d9d5ca;
  border-radius:11px;
  background:#fffdf8;
  color:var(--ink);
  text-decoration:none;
}
.reference-mode-tabs>a strong{
  color:var(--board);
  font-size:16px;
}
.reference-mode-tabs>a span{
  color:var(--muted);
  font-size:11px;
}
.reference-mode-tabs>a.active{
  border-color:var(--board);
  background:var(--board);
  color:#fff;
  box-shadow:0 8px 20px rgba(36,77,59,.12);
}
.reference-mode-tabs>a.active strong,
.reference-mode-tabs>a.active span{
  color:#fff;
}

.reference-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.reference-section-tabs{
  display:flex;
  gap:6px;
}
.reference-section-tabs>a{
  padding:9px 14px;
  border:1px solid #d9d5ca;
  border-radius:9px;
  background:#fff;
  color:#59615b;
  text-decoration:none;
  font-size:12px;
  font-weight:850;
}
.reference-section-tabs>a.active{
  border-color:#8ba392;
  background:var(--board-soft);
  color:var(--board);
}
.reference-search{
  min-width:min(360px,100%);
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 11px;
  border:1px solid #d8d3c8;
  border-radius:10px;
  background:#fff;
}
.reference-search span{
  color:#849087;
  font-size:20px;
}
.reference-search input{
  width:100%;
  min-height:40px;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
}

.reference-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:10px;
}
.reference-summary>div{
  padding:9px 11px;
  border:1px solid #e1ddd3;
  border-radius:9px;
  background:#f9f7f1;
}
.reference-summary span,
.reference-summary strong{
  display:block;
}
.reference-summary span{
  margin-bottom:2px;
  color:#8a8e89;
  font-size:9px;
  font-weight:850;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.reference-summary strong{
  color:#48554d;
  font-size:12px;
}

.reference-topic-nav{
  display:flex;
  gap:6px;
  overflow-x:auto;
  padding:2px 0 8px;
  scrollbar-width:thin;
}
.reference-topic-nav>a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
  padding:7px 10px;
  border:1px solid #ddd8cd;
  border-radius:999px;
  background:#fffdf8;
  color:#5f675f;
  text-decoration:none;
  font-size:11px;
  font-weight:800;
}
.reference-topic-nav>a span{
  min-width:18px;
  padding:1px 5px;
  border-radius:999px;
  background:#eeeae0;
  color:#7a7f79;
  text-align:center;
  font-size:9px;
}
.reference-topic-nav>a.active{
  border-color:var(--board);
  background:var(--board);
  color:#fff;
}
.reference-topic-nav>a.active span{
  background:rgba(255,255,255,.16);
  color:#fff;
}

.reference-note{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin:4px 0 16px;
  padding:9px 11px;
  border-left:3px solid var(--board);
  background:#eef4ef;
  color:#5c665f;
  font-size:11px;
}
.reference-note strong{
  flex:0 0 auto;
  color:var(--board);
}
.reference-note--zno{
  border-left-color:var(--wood);
  background:#f7efe4;
}
.reference-note--zno strong{
  color:#795331;
}

.formula-groups{
  display:grid;
  gap:16px;
}
.formula-group{
  scroll-margin-top:20px;
}
.formula-group__head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
  padding:0 2px;
}
.formula-group__head span{
  color:#8b8d87;
  font-size:9px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.formula-group__head h2{
  margin:2px 0 0;
  color:var(--board);
  font-size:17px;
}
.formula-group__head small{
  color:#989b96;
  font-weight:800;
}
.formula-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.formula-card{
  position:relative;
  min-height:116px;
  padding:11px 12px;
  border:1px solid #dfdbd1;
  border-radius:10px;
  background:#fffefb;
  box-shadow:0 4px 13px rgba(56,50,38,.035);
}
.formula-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.formula-card h3{
  margin:0;
  color:#525a54;
  font-size:11px;
  line-height:1.3;
}
.formula-card__nmt{
  flex:0 0 auto;
  padding:2px 5px;
  border-radius:5px;
  background:#dfece3;
  color:var(--board);
  font-size:8px;
  font-weight:900;
  letter-spacing:.04em;
}
.formula-card__math{
  min-height:54px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow-x:auto;
  padding:4px 0 2px;
  color:#151a16;
  font-size:14px;
}
.formula-card__math>div{
  min-width:max-content;
}
.formula-card__condition{
  padding-top:5px;
  border-top:1px solid #eeeae1;
  color:#838983;
  font-size:9px;
}
.formula-card__note{
  margin:5px 0 0;
  color:#777e78;
  font-size:9px;
  line-height:1.35;
}
.formula-card__meta{
  margin-top:6px;
  color:#a09b91;
  font-size:8px;
  font-weight:800;
  text-align:right;
}
.formula-card[hidden],
.formula-group[hidden]{
  display:none!important;
}

.reference-empty{
  margin:18px 0;
  padding:18px;
  border:1px dashed #cfc9bd;
  border-radius:10px;
  color:var(--muted);
  text-align:center;
}

.reference-table-card{
  margin-top:14px;
  border:1px solid #dcd7cc;
  border-radius:10px;
  background:#fffefb;
}
.reference-table-card summary{
  cursor:pointer;
  padding:11px 13px;
  color:var(--board);
  font-size:12px;
  font-weight:900;
}
.reference-table-scroll{
  overflow-x:auto;
  padding:0 10px 10px;
}
.reference-table{
  width:100%;
  min-width:720px;
  border-collapse:collapse;
  font-size:11px;
}
.reference-table th,
.reference-table td{
  padding:7px 8px;
  border:1px solid #e1ddd3;
  text-align:center;
}
.reference-table th{
  background:#f2f4ef;
  color:#4c5950;
}
.squares-grid{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:1px;
  padding:0 10px 10px;
  background:#ece8df;
}
.squares-grid span{
  padding:7px 5px;
  background:#fffefb;
  color:#555e57;
  font-size:10px;
  text-align:center;
}

@media(max-width:900px){
  .formula-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .squares-grid{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
}
@media(max-width:680px){
  .nmt-reference-entry,
  .reference-hero,
  .reference-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .nmt-reference-entry__actions{
    width:100%;
  }
  .nmt-reference-entry__actions>a{
    flex:1;
  }
  .reference-mode-tabs{
    grid-template-columns:1fr;
  }
  .reference-summary{
    grid-template-columns:1fr;
  }
  .reference-search{
    min-width:0;
    width:100%;
  }
  .formula-grid{
    grid-template-columns:1fr;
  }
  .squares-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}


/* ==========================================================
   Preparation hub + compact formula reference v0.3
   ========================================================== */
.nmt-hero--preparation{
  padding-top:26px;
  padding-bottom:26px;
}
.nmt-hero--preparation h1{
  font-size:clamp(36px,5vw,56px);
}
.nmt-hero--preparation p{
  max-width:820px;
  font-size:15px;
}

.prep-hub{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:6px 0 28px;
}
.prep-card{
  display:flex;
  min-height:174px;
  flex-direction:column;
  padding:16px 17px 14px;
  border:1px solid #dcd7cc;
  border-top:4px solid var(--wood);
  border-radius:12px;
  background:#fffdf8;
  color:var(--ink);
  text-decoration:none;
  box-shadow:0 8px 20px rgba(54,50,40,.045);
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease;
}
.prep-card:hover{
  transform:translateY(-2px);
  border-color:#9eaa9f;
  box-shadow:0 12px 26px rgba(45,61,50,.08);
}
.prep-card--tests{
  border-top-color:var(--board);
}
.prep-card__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:18px;
}
.prep-card__number{
  display:grid;
  width:30px;
  height:30px;
  place-items:center;
  border-radius:8px;
  background:#edf3ee;
  color:var(--board);
  font-size:10px;
  font-weight:950;
}
.prep-card__type{
  color:#8c887f;
  font-size:9px;
  font-weight:900;
  letter-spacing:.10em;
  text-transform:uppercase;
}
.prep-card h2{
  margin:0 0 5px;
  color:var(--board);
  font-size:20px;
  line-height:1.05;
}
.prep-card p{
  margin:0;
  color:#737a74;
  font-size:12px;
  line-height:1.45;
}
.prep-card__bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
  padding-top:14px;
  color:#8b8c86;
  font-size:10px;
  font-weight:800;
}
.prep-card__bottom strong{
  color:var(--board);
  font-size:18px;
}

.nmt-tests-section{
  scroll-margin-top:16px;
}
.nmt-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:22px;
  margin:0 0 10px;
}
.nmt-section-head span{
  color:#987657;
  font-size:9px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.nmt-section-head h2{
  margin:2px 0 0;
  color:var(--board);
  font-size:24px;
}
.nmt-section-head p{
  margin:0 0 2px;
  color:var(--muted);
  font-size:11px;
}

/* Formula cards: less empty card area, larger readable text. */
.formula-grid{
  grid-template-columns:repeat(auto-fill,minmax(255px,1fr));
  align-items:start;
  gap:7px;
}
.formula-card{
  min-height:0;
  padding:10px 11px 9px;
  border-radius:9px;
}
.formula-card h3{
  font-size:13px;
  line-height:1.28;
}
.formula-card__nmt{
  padding:3px 6px;
  font-size:9px;
}
.formula-card__math{
  min-height:0;
  padding:7px 0 5px;
  font-size:18px;
  line-height:1.15;
}
.formula-card__math mjx-container[display="true"]{
  margin:.28em 0!important;
}
.formula-card__condition{
  padding-top:6px;
  font-size:11px;
  line-height:1.3;
}
.formula-card__note{
  margin-top:6px;
  font-size:11px;
  line-height:1.4;
}
.formula-card__meta{
  margin-top:5px;
  font-size:9px;
}
.formula-group{
  margin-bottom:2px;
}
.formula-group__head{
  margin-bottom:6px;
}
.formula-group__head span{
  font-size:10px;
}
.formula-group__head h2{
  font-size:19px;
}
.formula-group__head small{
  font-size:10px;
}
.reference-summary span{
  font-size:10px;
}
.reference-summary strong{
  font-size:13px;
}
.reference-topic-nav>a{
  font-size:12px;
}
.reference-topic-nav>a span{
  font-size:10px;
}
.reference-note{
  font-size:12px;
}
.reference-table-card summary{
  font-size:13px;
}
.reference-table{
  font-size:12px;
}
.squares-grid span{
  font-size:11px;
}

@media(max-width:980px){
  .prep-hub{
    grid-template-columns:1fr;
  }
  .prep-card{
    min-height:0;
  }
}
@media(max-width:680px){
  .nmt-section-head{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }
  .formula-grid{
    grid-template-columns:1fr;
  }
  .formula-card__math{
    font-size:17px;
  }
}


/* ==========================================================
   Formula reference cleanup v0.4
   One card = one formula group.
   ========================================================== */

/* Old grid/card geometry is intentionally overridden. */
.formula-groups{
  display:grid;
  gap:14px;
}

.formula-section-card{
  margin:0;
  overflow:hidden;
  border:1px solid #dcd7cc;
  border-radius:12px;
  background:#fffefb;
  box-shadow:0 6px 18px rgba(58,50,38,.045);
}

.formula-section-card .formula-group__head{
  margin:0;
  padding:13px 16px 11px;
  border-bottom:1px solid #e5e0d6;
  background:#f8f6f0;
}
.formula-section-card .formula-group__head span{
  font-size:10px;
}
.formula-section-card .formula-group__head h2{
  margin-top:2px;
  font-size:20px;
}
.formula-section-card .formula-group__head small{
  color:#9a9d97;
  font-size:11px;
}

.formula-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.formula-row{
  min-width:0;
  padding:13px 16px 12px;
  border-bottom:1px solid #ece8df;
}
.formula-row:nth-child(odd){
  border-right:1px solid #ece8df;
}
.formula-row:nth-last-child(-n+2){
  border-bottom:0;
}
.formula-row--wide{
  grid-column:1/-1;
  border-right:0!important;
}
.formula-row--wide + .formula-row:nth-child(even){
  border-right:1px solid #ece8df;
}

.formula-row__title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.formula-row h3{
  margin:0;
  color:#586159;
  font-size:13px;
  line-height:1.3;
}
.formula-row__nmt{
  flex:0 0 auto;
  padding:3px 6px;
  border-radius:5px;
  background:#dfece3;
  color:var(--board);
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}

.formula-row__math{
  min-width:0;
  padding:6px 0 4px;
  color:#171b18;
  font-size:18px;
  line-height:1.15;
}
.formula-row__math>div{
  min-width:0;
}
.formula-row__math mjx-container[display="true"]{
  max-width:100%;
  margin:.24em 0!important;
  overflow:visible!important;
}
.formula-row--wide .formula-row__math{
  font-size:19px;
}
.formula-row--wide .formula-row__math mjx-container[display="true"]{
  text-align:left!important;
}

.formula-row__condition{
  margin-top:2px;
  padding-top:6px;
  border-top:1px solid #eeeae2;
  color:#858b85;
  font-size:11px;
  line-height:1.35;
}
.formula-row__note{
  margin:6px 0 0;
  color:#767e77;
  font-size:11px;
  line-height:1.4;
}
.formula-row__meta{
  margin-top:5px;
  color:#aaa49a;
  font-size:9px;
  font-weight:800;
  text-align:right;
}

/* Search hides rows without bringing the old card geometry back. */
.formula-row[hidden],
.formula-group[hidden]{
  display:none!important;
}

/* Larger reference tables. */
.reference-table-card{
  margin-top:16px;
}
.reference-table-card summary{
  padding:13px 15px;
  font-size:15px;
}
.reference-table-scroll{
  padding:0 12px 12px;
}
.reference-table{
  min-width:800px;
  font-size:15px;
}
.reference-table th,
.reference-table td{
  padding:10px 12px;
}
.reference-table th{
  font-size:14px;
}
.reference-table mjx-container{
  font-size:108%!important;
}

/* Squares: fewer columns = readable values. */
.squares-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:1px;
  padding:0 12px 12px;
}
.squares-grid span{
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px 7px;
  font-size:14px;
}
.squares-grid b{
  font-size:14px;
}

@media(max-width:820px){
  .formula-list{
    grid-template-columns:1fr;
  }
  .formula-row,
  .formula-row:nth-child(odd),
  .formula-row--wide + .formula-row:nth-child(even){
    grid-column:1;
    border-right:0!important;
    border-bottom:1px solid #ece8df;
  }
  .formula-row:last-child{
    border-bottom:0;
  }
  .formula-row--wide .formula-row__math{
    font-size:18px;
  }
  .squares-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

@media(max-width:560px){
  .formula-section-card .formula-group__head{
    padding:11px 12px 9px;
  }
  .formula-row{
    padding:11px 12px;
  }
  .formula-row__math,
  .formula-row--wide .formula-row__math{
    font-size:17px;
  }
  .reference-table{
    font-size:14px;
  }
  .squares-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .squares-grid span{
    font-size:13px;
  }
}


/* ==========================================================
   Formula reference sheet v0.5
   One section card, compact rows — no empty mini-cards.
   ========================================================== */

.formula-section-card{
  overflow:hidden;
}

/* One continuous sheet instead of 2-column cells. */
.formula-list{
  display:block;
}

.formula-row,
.formula-row:nth-child(odd),
.formula-row--wide,
.formula-row--wide + .formula-row:nth-child(even){
  display:grid;
  grid-template-columns:minmax(190px,24%) minmax(330px,1fr) minmax(180px,24%);
  align-items:center;
  gap:18px;
  min-width:0;
  padding:12px 16px;
  border-right:0!important;
  border-bottom:1px solid #e9e5dc;
  background:transparent;
}

.formula-row:last-child{
  border-bottom:0;
}

/* Titles are now proper navigation labels, not tiny captions. */
.formula-row__title{
  align-self:start;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
  padding-top:2px;
}
.formula-row h3{
  margin:0;
  color:#48564d;
  font-size:15px;
  font-weight:850;
  line-height:1.28;
}

/* Formula gets the largest part of the row. */
.formula-row__math,
.formula-row--wide .formula-row__math{
  min-width:0;
  padding:0;
  color:#141916;
  font-size:20px;
  line-height:1.12;
}
.formula-row__math>div{
  min-width:0;
}
.formula-row__math mjx-container[display="true"],
.formula-row--wide .formula-row__math mjx-container[display="true"]{
  max-width:100%;
  margin:.18em 0!important;
  overflow:visible!important;
  text-align:center!important;
}

/* Multiple equations are kept compactly one under another. */
.formula-row__math>div + div{
  margin-top:1px;
}

/* Conditions live in their own right column. */
.formula-row__info{
  align-self:stretch;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  padding-left:14px;
  border-left:1px solid #eeeae2;
}
.formula-row__condition{
  margin:0;
  padding:0;
  border:0;
  color:#68736b;
  font-size:13px;
  line-height:1.4;
}
.formula-row__info-label{
  display:block;
  margin-bottom:2px;
  color:#99978f;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.formula-row__note{
  margin:4px 0 0;
  color:#737b74;
  font-size:12px;
  line-height:1.4;
}
.formula-row__meta{
  margin-top:5px;
  color:#a19c92;
  font-size:10px;
  font-weight:800;
  text-align:left;
}

/* If a formula has no info, keep the row visually balanced,
   but do not create a visible empty white "card". */
.formula-row__info:empty{
  border-left:0;
  padding-left:0;
}

/* More readable group heading. */
.formula-section-card .formula-group__head{
  padding:14px 16px 12px;
}
.formula-section-card .formula-group__head span{
  font-size:11px;
}
.formula-section-card .formula-group__head h2{
  font-size:23px;
  line-height:1.12;
}
.formula-section-card .formula-group__head small{
  font-size:12px;
}

/* Wider content usage on large displays. */
.reference-hero,
.reference-mode-tabs,
.reference-toolbar,
.reference-summary,
.reference-topic-nav,
.reference-note,
.formula-groups,
.reference-table-card{
  max-width:none;
}

/* Tables: larger and easier to scan. */
.reference-table-card summary{
  font-size:16px;
}
.reference-table{
  font-size:16px;
}
.reference-table th,
.reference-table td{
  padding:11px 13px;
}
.reference-table th{
  font-size:15px;
}
.squares-grid{
  grid-template-columns:repeat(5,minmax(120px,1fr));
}
.squares-grid span,
.squares-grid b{
  font-size:15px;
}

/* Tablet: title above formula, condition below. */
@media(max-width:980px){
  .formula-row,
  .formula-row:nth-child(odd),
  .formula-row--wide,
  .formula-row--wide + .formula-row:nth-child(even){
    grid-template-columns:minmax(170px,30%) minmax(0,1fr);
    gap:10px 16px;
  }
  .formula-row__info{
    grid-column:1/-1;
    padding:6px 0 0;
    border-left:0;
    border-top:1px solid #f0ece4;
  }
}

/* Mobile: clean vertical formula sheet. */
@media(max-width:650px){
  .formula-row,
  .formula-row:nth-child(odd),
  .formula-row--wide,
  .formula-row--wide + .formula-row:nth-child(even){
    display:block;
    padding:12px 13px;
  }
  .formula-row__title{
    margin-bottom:5px;
  }
  .formula-row h3{
    font-size:14px;
  }
  .formula-row__math,
  .formula-row--wide .formula-row__math{
    font-size:18px;
  }
  .formula-row__math mjx-container[display="true"],
  .formula-row--wide .formula-row__math mjx-container[display="true"]{
    text-align:left!important;
  }
  .formula-row__info{
    margin-top:5px;
    padding-top:6px;
  }
  .squares-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* ==========================================================
   Formula reference navigation v0.6
   ========================================================== */

/* Old toolbar/summary/topic scroller are no longer used. */
.reference-toolbar,
.reference-summary,
.reference-topic-nav{
  display:none!important;
}

.reference-controls{
  margin:12px 0 16px;
}

.reference-primary-switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:10px;
}

.reference-primary-switch>a{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-height:72px;
  justify-content:center;
  padding:13px 16px;
  border:1px solid #d8d3c8;
  border-radius:11px;
  background:#fffdf8;
  color:#5b625d;
  text-decoration:none;
  transition:border-color .14s ease, background .14s ease, transform .14s ease;
}

.reference-primary-switch>a:hover{
  transform:translateY(-1px);
  border-color:#91a295;
}

.reference-primary-switch>a span{
  color:var(--board);
  font-size:20px;
  font-weight:900;
  line-height:1.05;
}

.reference-primary-switch>a small{
  color:#858982;
  font-size:11px;
  line-height:1.25;
}

.reference-primary-switch>a.active{
  border-color:var(--board);
  background:var(--board);
}

.reference-primary-switch>a.active span,
.reference-primary-switch>a.active small{
  color:#fff;
}

.reference-search-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.reference-current{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  color:#7f837d;
  font-size:11px;
}

.reference-current strong{
  color:#4d5d52;
  font-size:12px;
}

.reference-search{
  min-width:min(380px,100%);
}

.reference-topic-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:7px;
}

.reference-topic-grid>a{
  display:flex;
  align-items:center;
  min-height:38px;
  padding:8px 10px;
  border:1px solid #ded9cf;
  border-radius:9px;
  background:#fffdf8;
  color:#59615b;
  text-decoration:none;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
}

.reference-topic-grid>a:hover{
  border-color:#98a79c;
  background:#f5f8f5;
}

.reference-topic-grid>a.active{
  border-color:var(--board);
  background:var(--board);
  color:#fff;
}

/* Group heading count removed; keep clean right edge. */
.formula-section-card .formula-group__head{
  justify-content:flex-start;
}

/* Slightly tighter status note under topics. */
.reference-note{
  margin-top:10px;
}

@media(max-width:760px){
  .reference-primary-switch{
    grid-template-columns:1fr;
  }

  .reference-search-row{
    align-items:stretch;
    flex-direction:column;
  }

  .reference-search{
    width:100%;
    min-width:0;
  }

  .reference-topic-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:480px){
  .reference-topic-grid{
    grid-template-columns:1fr;
  }

  .reference-primary-switch>a span{
    font-size:18px;
  }
}


/* ==========================================================
   Mathematik material palette v0.7
   Graphite + walnut + parchment; green stays as brand accent.
   ========================================================== */

:root{
  --graphite:#303638;
  --graphite-2:#3a4243;
  --graphite-soft:#e8e9e6;

  --walnut:#745747;
  --walnut-2:#8a6753;
  --copper:#c78355;
  --parchment:#f2ede3;
  --parchment-2:#e8e0d3;

  --depth-shadow:0 10px 24px rgba(42,38,32,.08),0 2px 5px rgba(42,38,32,.05);
  --depth-shadow-hover:0 14px 30px rgba(42,38,32,.11),0 3px 7px rgba(42,38,32,.06);
}

/* The light site remains light, but no longer completely flat. */
html,
body{
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.72), transparent 34%),
    linear-gradient(180deg,#f6f3eb 0%,#f1ede4 100%);
}

.site-header{
  background:rgba(255,253,248,.94);
  box-shadow:0 4px 16px rgba(45,41,34,.045);
  backdrop-filter:blur(8px);
}

.site-header__wood{
  height:5px;
  background:
    linear-gradient(90deg,
      #664a3b 0%,
      #8c6650 18%,
      #b27a50 38%,
      #7b5946 56%,
      #c08a5d 76%,
      #694b3c 100%);
}

.site-nav a{
  transition:background .14s ease,color .14s ease,box-shadow .14s ease;
}
.site-nav a:hover{
  background:#eee8df;
  color:var(--graphite);
}
.site-nav a.active{
  background:#e7dfd4;
  color:var(--graphite);
  box-shadow:inset 0 0 0 1px rgba(116,87,71,.12);
}

/* Generic light surfaces get a subtle physical layer. */
.card,
.panel,
.nmt-reference-entry,
.reference-mode-tabs>a,
.reference-primary-switch>a,
.reference-topic-grid>a,
.reference-search,
.reference-table-card,
.formula-section-card,
.nmt-test-card,
.prep-card{
  border-color:#d9d2c6;
  box-shadow:var(--depth-shadow);
}

/* Keep green as the brand, not the whole interface. */
.site-brand,
.site-brand__text{
  color:var(--board);
}

/* Primary buttons: graphite with warm accent instead of another green slab. */
.site-btn,
.btn-primary{
  background:linear-gradient(180deg,var(--graphite-2),var(--graphite));
  border-color:#272d2e;
  color:#f5eddd;
  box-shadow:0 5px 12px rgba(38,42,43,.16),inset 0 1px 0 rgba(255,255,255,.08);
}
.site-btn:hover,
.btn-primary:hover{
  background:linear-gradient(180deg,#41494a,#343a3b);
  color:#fff7e7;
}

/* Preparation hero picks up the tool-module palette. */
.nmt-hero{
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(135deg,#353c3d 0%,#2f3536 68%,#3d3935 100%);
  border:1px solid #282e2f;
  border-bottom:4px solid var(--walnut-2);
  box-shadow:0 14px 30px rgba(37,39,38,.14),inset 0 1px 0 rgba(255,255,255,.06);
}
.nmt-hero::after{
  content:"";
  position:absolute;
  inset:auto -80px -110px auto;
  width:260px;
  height:260px;
  border-radius:50%;
  border:32px solid rgba(199,131,85,.06);
  box-shadow:0 0 0 26px rgba(255,255,255,.018);
  pointer-events:none;
}
.nmt-hero h1,
.nmt-hero__eyebrow{
  color:#f5eedf;
}
.nmt-hero p{
  color:#d7d0c3;
}

/* Three preparation directions: warmer and more dimensional. */
.prep-card{
  border-top-color:var(--walnut);
  background:
    linear-gradient(180deg,rgba(255,255,255,.64),rgba(255,253,248,.98));
}
.prep-card--tests{
  border-top-color:var(--graphite);
}
.prep-card:hover{
  border-color:#bcae9d;
  box-shadow:var(--depth-shadow-hover);
}
.prep-card__number{
  background:#ebe4da;
  color:var(--walnut);
}
.prep-card h2{
  color:var(--graphite);
}
.prep-card__bottom strong{
  color:var(--copper);
}

/* Reference hierarchy: graphite is selected, green only marks NMT status. */
.reference-mode-tabs>a,
.reference-primary-switch>a{
  background:
    linear-gradient(180deg,#fffefa 0%,#faf7f0 100%);
}
.reference-mode-tabs>a strong,
.reference-primary-switch>a span{
  color:var(--graphite);
}

.reference-mode-tabs>a.active,
.reference-primary-switch>a.active{
  border-color:#2b3132;
  background:
    linear-gradient(180deg,var(--graphite-2),var(--graphite));
  box-shadow:0 9px 18px rgba(40,43,43,.15),inset 0 1px 0 rgba(255,255,255,.07);
}
.reference-mode-tabs>a.active strong,
.reference-mode-tabs>a.active span,
.reference-primary-switch>a.active span,
.reference-primary-switch>a.active small{
  color:#f4ecdc;
}

/* Topic buttons are warm neutrals; active one is walnut, not green. */
.reference-topic-grid>a{
  background:linear-gradient(180deg,#fffefa,#faf7f0);
  color:#555a57;
}
.reference-topic-grid>a:hover{
  border-color:#b6aa9b;
  background:#f1ebe2;
}
.reference-topic-grid>a.active{
  border-color:#654b3e;
  background:linear-gradient(180deg,#80604e,#6f5243);
  color:#fff6e7;
  box-shadow:0 5px 12px rgba(77,58,47,.13);
}

/* Search is slightly inset so it reads as a control. */
.reference-search{
  background:#fbfaf6;
  box-shadow:
    inset 0 1px 2px rgba(54,47,39,.055),
    0 3px 9px rgba(54,47,39,.035);
}

/* Formula blocks: one physical sheet with warm top edge. */
.formula-section-card{
  position:relative;
  border-color:#d7d0c4;
  background:#fffefa;
  box-shadow:0 10px 24px rgba(51,45,37,.075),0 2px 4px rgba(51,45,37,.035);
}
.formula-section-card::before{
  content:"";
  position:absolute;
  z-index:2;
  inset:0 0 auto;
  height:3px;
  background:linear-gradient(90deg,var(--walnut),var(--copper),var(--walnut-2));
}
.formula-section-card .formula-group__head{
  background:
    linear-gradient(180deg,#f5f0e7 0%,#f9f6ef 100%);
  border-bottom-color:#ddd5c9;
}
.formula-section-card .formula-group__head span{
  color:#8b7768;
}
.formula-section-card .formula-group__head h2{
  color:var(--graphite);
}
.formula-row{
  background:rgba(255,255,255,.34);
}
.formula-row:nth-child(even){
  background:rgba(242,237,227,.23);
}
.formula-row h3{
  color:#46504b;
}
.formula-row__nmt{
  background:#e4eee7;
  color:var(--board);
  box-shadow:inset 0 0 0 1px rgba(36,77,59,.08);
}

/* Informational strips move from green wash to parchment/walnut. */
.reference-note{
  border-left-color:var(--walnut);
  background:#eee7dc;
  color:#69645e;
}
.reference-note strong{
  color:#654c3e;
}
.reference-note--zno{
  border-left-color:var(--copper);
  background:#f1e6d9;
}
.reference-note--zno strong{
  color:#6e4c36;
}

/* Year/test surfaces get warm graphite accents, avoiding green saturation. */
.nmt-year-nav__item{
  background:linear-gradient(180deg,#fffefa,#faf7f0);
  box-shadow:0 4px 10px rgba(48,42,34,.045);
}
.nmt-year-nav__item.active{
  border-color:#33393a;
  background:linear-gradient(180deg,#3b4344,#303637);
  color:#f4eddf;
  box-shadow:0 7px 16px rgba(44,47,47,.13);
}
.nmt-year-nav__item.active strong,
.nmt-year-nav__item.active span{
  color:#f4eddf;
}

.nmt-test-card{
  background:linear-gradient(180deg,#fffefa 0%,#fbf8f1 100%);
  border-top-color:var(--walnut);
}
.nmt-test-card:hover{
  box-shadow:var(--depth-shadow-hover);
}

/* Small accents retain the signature green. */
.nmt-status-dot,
.formula-row__nmt,
.site-brand__mark{
  /* intentionally green: identity/status only */
}

/* Footer gets a gentle material separation. */
.site-footer{
  background:linear-gradient(180deg,#e9e2d7,#e3dbce);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45);
}

@media(max-width:680px){
  .nmt-hero{
    border-bottom-width:3px;
  }
}


/* ==========================================================
   NMT / ZNO homepage card v0.8
   ========================================================== */

.home-card--study{
  position:relative;
}

.home-card__mark--wide{
  width:auto;
  min-width:88px;
  height:42px;
  display:inline-flex;
  padding:0 12px;
  border-radius:10px;
  background:linear-gradient(180deg,#ebe5da,#e3dbcf);
  color:var(--graphite,#303638);
  box-shadow:inset 0 0 0 1px rgba(116,87,71,.08);
  font-size:11px;
  letter-spacing:.04em;
}

.home-card__tags{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:-7px 0 18px;
}

.home-card__tags span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 9px;
  border:1px solid #d9d2c7;
  border-radius:999px;
  background:#f4efe7;
  color:#625e58;
  font-size:10px;
  font-weight:800;
  line-height:1.15;
}

.home-card__tags span:nth-child(2){
  background:#edf1ed;
  color:var(--board);
}

.home-card__tags span:nth-child(3){
  background:#eee5dc;
  color:#735544;
}

.home-card__tags span:nth-child(4){
  background:#ececeb;
  color:var(--graphite,#303638);
}

@media(max-width:720px){
  .home-card__tags{
    margin-top:-5px;
  }
}


/* ==========================================================
   ZNO topic bank shell v0.10
   ========================================================== */

.prep-hub--four{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.prep-hub--four .prep-card{
  min-height:190px;
}
.prep-card--topics{
  border-top-color:var(--copper,#c78355);
}

.topic-bank-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:8px 0 16px;
  padding:24px 26px;
  border:1px solid #2c3233;
  border-bottom:4px solid var(--walnut-2,#8a6753);
  border-radius:14px;
  background:linear-gradient(135deg,#363d3e 0%,#303637 70%,#403b37 100%);
  box-shadow:0 14px 30px rgba(37,39,38,.13);
}
.topic-bank-hero h1{
  margin:3px 0 7px;
  color:#f5eedf;
  font-size:clamp(34px,5vw,54px);
  line-height:1;
}
.topic-bank-hero p{
  max-width:850px;
  margin:0;
  color:#d8d1c5;
  font-size:14px;
  line-height:1.5;
}
.topic-bank-hero .nmt-hero__eyebrow{
  color:#d0b093;
}
.topic-bank-hero .reference-back{
  background:#f6f1e8;
  border-color:#d6cdbf;
  color:#39403f;
  box-shadow:0 5px 12px rgba(0,0,0,.08);
}

.topic-bank-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:10px;
}
.topic-bank-summary>div{
  padding:11px 13px;
  border:1px solid #dbd4c8;
  border-radius:10px;
  background:linear-gradient(180deg,#fffefa,#faf7f0);
  box-shadow:0 5px 13px rgba(48,42,34,.045);
}
.topic-bank-summary strong,
.topic-bank-summary span{
  display:block;
}
.topic-bank-summary strong{
  color:#343b3a;
  font-size:18px;
}
.topic-bank-summary span{
  margin-top:2px;
  color:#89877f;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.topic-bank-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0 10px;
}
.topic-bank-sections{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}
.topic-bank-sections a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:40px;
  padding:8px 13px;
  border:1px solid #d9d2c6;
  border-radius:9px;
  background:#fffdf8;
  color:#555d58;
  text-decoration:none;
  font-size:12px;
  font-weight:850;
  box-shadow:0 4px 10px rgba(48,42,34,.04);
}
.topic-bank-sections a span{
  padding:1px 5px;
  border-radius:999px;
  background:#ece7df;
  color:#88847b;
  font-size:9px;
}
.topic-bank-sections a.active{
  border-color:#6b5041;
  background:linear-gradient(180deg,#80604e,#6f5243);
  color:#fff7e9;
}
.topic-bank-sections a.active span{
  background:rgba(255,255,255,.14);
  color:#fff7e9;
}
.topic-bank-search{
  min-width:min(360px,100%);
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 11px;
  border:1px solid #d9d2c6;
  border-radius:10px;
  background:#fbfaf6;
  box-shadow:inset 0 1px 2px rgba(54,47,39,.05),0 3px 9px rgba(54,47,39,.035);
}
.topic-bank-search input{
  width:100%;
  min-height:40px;
  border:0;
  outline:0;
  background:transparent;
}
.topic-bank-search>span{
  color:#858b86;
  font-size:18px;
}

.topic-bank-note{
  display:flex;
  gap:8px;
  align-items:baseline;
  margin:0 0 14px;
  padding:9px 11px;
  border-left:3px solid var(--copper,#c78355);
  background:#eee7dc;
  color:#6b6861;
  font-size:11px;
}
.topic-bank-note strong{
  color:#6e4f3c;
  flex:0 0 auto;
}

.topic-bank-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.topic-bank-item{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 24px;
  align-items:center;
  gap:10px;
  min-height:76px;
  padding:10px 12px;
  border:1px solid #dcd5c9;
  border-radius:11px;
  background:linear-gradient(180deg,#fffefa,#faf7f0);
  color:#424947;
  text-decoration:none;
  box-shadow:0 5px 14px rgba(48,42,34,.045);
  transition:transform .13s ease,border-color .13s ease,box-shadow .13s ease;
}
.topic-bank-item:hover{
  transform:translateY(-1px);
  border-color:#b8aa9a;
  box-shadow:0 9px 19px rgba(48,42,34,.075);
}
.topic-bank-item__no{
  display:grid;
  width:40px;
  height:40px;
  place-items:center;
  border-radius:9px;
  background:#e9e2d8;
  color:#775946;
  font-size:11px;
  font-weight:950;
}
.topic-bank-item__body{
  min-width:0;
}
.topic-bank-item__body strong{
  display:block;
  color:#3f4844;
  font-size:13px;
  line-height:1.25;
}
.topic-bank-item__body small{
  display:block;
  margin-top:4px;
  color:#96938b;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.topic-bank-item__arrow{
  color:var(--copper,#c78355);
  font-size:18px;
  text-align:right;
}

.topic-shell-head{
  margin:6px 0 12px;
}
.topic-shell-breadcrumbs{
  display:flex;
  gap:7px;
  align-items:center;
  margin-bottom:12px;
  color:#969087;
  font-size:10px;
}
.topic-shell-breadcrumbs a{
  color:#596760;
  text-decoration:none;
}
.topic-shell-title{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:19px 21px;
  border:1px solid #2c3233;
  border-bottom:4px solid var(--walnut-2,#8a6753);
  border-radius:13px;
  background:linear-gradient(135deg,#363d3e,#303637 72%,#3d3935);
  box-shadow:0 12px 26px rgba(37,39,38,.12);
}
.topic-shell-title__no{
  display:grid;
  width:48px;
  height:48px;
  flex:0 0 auto;
  place-items:center;
  border:1px solid rgba(255,255,255,.09);
  border-radius:10px;
  background:rgba(255,255,255,.06);
  color:#e9c9aa;
  font-size:13px;
  font-weight:950;
}
.topic-shell-title h1{
  margin:3px 0 0;
  color:#f5eedf;
  font-size:clamp(24px,4vw,38px);
  line-height:1.08;
}

.topic-shell-nav{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:8px;
  align-items:center;
  margin:10px 0;
}
.topic-shell-nav a{
  color:#59625d;
  text-decoration:none;
  font-size:11px;
  font-weight:800;
}
.topic-shell-nav__next{
  text-align:right;
}
.topic-shell-nav__all{
  padding:7px 10px;
  border:1px solid #dcd5ca;
  border-radius:8px;
  background:#fffdf8;
}

.topic-workspace-shell{
  overflow:hidden;
  border:1px solid #d8d1c5;
  border-radius:12px;
  background:#fffefa;
  box-shadow:0 10px 24px rgba(51,45,37,.07);
}
.topic-workspace-shell__bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid #e3ddd2;
  background:linear-gradient(180deg,#f5f0e7,#f9f6ef);
}
.topic-workspace-shell__bar>div:first-child span,
.topic-workspace-shell__bar>div:first-child strong{
  display:block;
}
.topic-workspace-shell__bar>div:first-child span{
  color:#907c6b;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.topic-workspace-shell__bar>div:first-child strong{
  margin-top:2px;
  color:#333b39;
  font-size:16px;
}
.topic-workspace-shell__filters{
  display:flex;
  gap:6px;
}
.topic-workspace-shell__filters span{
  padding:6px 9px;
  border:1px solid #ddd6ca;
  border-radius:999px;
  color:#8b877f;
  font-size:9px;
  font-weight:850;
}
.topic-workspace-shell__filters span.active{
  background:#725545;
  border-color:#654a3d;
  color:#fff7e9;
}

.topic-workspace-empty{
  padding:44px 20px 48px;
  text-align:center;
}
.topic-workspace-empty__mark{
  width:60px;
  height:60px;
  display:grid;
  place-items:center;
  margin:0 auto 12px;
  border-radius:14px;
  background:#e9e1d6;
  color:#795a48;
  font-family:Georgia,serif;
  font-size:26px;
  box-shadow:inset 0 0 0 1px rgba(116,87,71,.08);
}
.topic-workspace-empty h2{
  margin:0 0 6px;
  color:#353d3a;
  font-size:22px;
}
.topic-workspace-empty p{
  max-width:670px;
  margin:0 auto;
  color:#777b76;
  font-size:12px;
  line-height:1.5;
}
.topic-workspace-plan{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:6px;
  margin-top:17px;
}
.topic-workspace-plan span{
  padding:5px 8px;
  border:1px solid #dcd5ca;
  border-radius:999px;
  background:#f6f1e9;
  color:#6f6d67;
  font-size:9px;
  font-weight:800;
}

@media(max-width:1100px){
  .prep-hub--four{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .topic-bank-hero,
  .topic-bank-controls{
    align-items:stretch;
    flex-direction:column;
  }
  .topic-bank-summary{
    grid-template-columns:1fr;
  }
  .topic-bank-list{
    grid-template-columns:1fr;
  }
  .topic-bank-search{
    width:100%;
    min-width:0;
  }
}
@media(max-width:560px){
  .prep-hub--four{
    grid-template-columns:1fr;
  }
  .topic-shell-title{
    padding:15px;
  }
  .topic-shell-title__no{
    width:42px;
    height:42px;
  }
  .topic-shell-nav a span{
    display:none;
  }
  .topic-workspace-shell__bar{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* ==========================================================
   Topic 1 — first ten converted tasks v0.11
   ========================================================== */

.topic-conversion-progress{
  display:flex;
  align-items:baseline;
  gap:6px;
  padding:6px 9px;
  border:1px solid #ddd5c9;
  border-radius:8px;
  background:#fffdf8;
}
.topic-conversion-progress span{
  color:#755846;
  font-size:13px;
  font-weight:950;
}
.topic-conversion-progress small{
  color:#918d85;
  font-size:9px;
  font-weight:800;
}

.topic-task-list{
  display:grid;
  gap:10px;
  padding:12px;
}

.topic-task-card{
  overflow:hidden;
  border:1px solid #dcd5ca;
  border-radius:11px;
  background:#fffefa;
  box-shadow:0 5px 14px rgba(48,42,34,.045);
}

.topic-task-card__head{
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 12px;
  border-bottom:1px solid #e8e2d8;
  background:linear-gradient(180deg,#f6f1e8,#faf7f0);
}
.topic-task-card__no{
  display:grid;
  width:34px;
  height:34px;
  flex:0 0 auto;
  place-items:center;
  border-radius:8px;
  background:#e7dfd3;
  color:#765846;
  font-size:11px;
  font-weight:950;
}
.topic-task-card__head span,
.topic-task-card__head strong{
  display:block;
}
.topic-task-card__head span{
  color:#9a8d81;
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.topic-task-card__head strong{
  margin-top:1px;
  color:#4c5550;
  font-size:11px;
}

.topic-task-card__prompt{
  padding:15px 16px 12px;
  color:#242a27;
  font-size:15px;
  line-height:1.55;
}
.topic-task-card__prompt mjx-container{
  font-size:112%!important;
}

.topic-answer-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  padding:0 12px 12px;
}
.topic-answer-option{
  position:relative;
  display:flex;
  min-height:54px;
  align-items:center;
  gap:8px;
  padding:8px 9px;
  border:1px solid #ddd6ca;
  border-radius:9px;
  background:#fbf9f4;
  cursor:pointer;
  transition:border-color .12s ease,background .12s ease,transform .12s ease;
}
.topic-answer-option:hover{
  transform:translateY(-1px);
  border-color:#b9aa9a;
}
.topic-answer-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.topic-answer-option:has(input:checked){
  border-color:#765846;
  background:#efe6dc;
  box-shadow:inset 0 0 0 1px rgba(118,88,70,.08);
}
.topic-answer-option__letter{
  display:grid;
  width:25px;
  height:25px;
  flex:0 0 auto;
  place-items:center;
  border-radius:6px;
  background:#ebe4da;
  color:#715542;
  font-size:10px;
  font-weight:950;
}
.topic-answer-option__value{
  min-width:0;
  color:#353c39;
  font-size:13px;
  line-height:1.25;
}
.topic-answer-option__value mjx-container{
  margin:0!important;
}

.topic-numeric-answer{
  padding:0 12px 12px;
}
.topic-numeric-answer label{
  display:flex;
  max-width:300px;
  flex-direction:column;
  gap:5px;
}
.topic-numeric-answer label>span{
  color:#7e807a;
  font-size:10px;
  font-weight:850;
}
.topic-numeric-answer input{
  min-height:42px;
  padding:7px 10px;
  border:1px solid #d8d1c6;
  border-radius:9px;
  background:#fbfaf6;
  color:#2f3633;
  font-size:17px;
  outline:none;
}
.topic-numeric-answer input:focus{
  border-color:#8b6c58;
  box-shadow:0 0 0 3px rgba(139,108,88,.08);
}

.topic-matching{
  padding:0 12px 12px;
}
.topic-matching__right{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  margin-bottom:8px;
}
.topic-matching__right>span{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:7px 8px;
  border:1px solid #ddd6ca;
  border-radius:8px;
  background:#f7f3ec;
}
.topic-matching__right b{
  color:#755744;
  font-size:10px;
}
.topic-matching__right mjx-container{
  margin:0!important;
}
.topic-matching__rows{
  display:grid;
  gap:5px;
}
.topic-matching__rows label{
  display:grid;
  grid-template-columns:minmax(0,1fr) 72px;
  align-items:center;
  gap:8px;
  padding:7px 9px;
  border:1px solid #e3ddd3;
  border-radius:8px;
  background:#fffdf8;
}
.topic-matching__statement{
  color:#434b47;
  font-size:12px;
}
.topic-matching__rows select{
  min-height:34px;
  border:1px solid #d6cec2;
  border-radius:7px;
  background:#fbfaf6;
  color:#453e38;
  font-weight:900;
  text-align:center;
}

.topic-task-card__actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:10px 12px 11px;
  border-top:1px solid #ebe5db;
  background:#faf7f1;
}
.topic-check-btn{
  min-height:34px;
  padding:0 12px;
  font-size:10px;
}
.topic-task-result{
  min-width:80px;
  color:#85847e;
  font-size:10px;
  font-weight:900;
}
.topic-task-result.is-correct{
  color:#2e6a4d;
}
.topic-task-result.is-incorrect{
  color:#9a5939;
}

.topic-solution{
  margin-left:auto;
  min-width:min(520px,100%);
}
.topic-solution summary{
  cursor:pointer;
  color:#675a50;
  font-size:10px;
  font-weight:900;
  text-align:right;
}
.topic-solution__body{
  margin-top:8px;
  padding:10px 11px;
  border-left:3px solid #b67b54;
  background:#eee7dc;
  color:#4f5551;
  font-size:12px;
  line-height:1.55;
}
.topic-solution__body mjx-container{
  font-size:106%!important;
}

@media(max-width:980px){
  .topic-answer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .topic-matching__right{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:620px){
  .topic-task-card__prompt{
    padding:13px 12px 10px;
    font-size:14px;
  }
  .topic-answer-grid{
    grid-template-columns:1fr;
    padding-left:10px;
    padding-right:10px;
  }
  .topic-matching{
    padding-left:10px;
    padding-right:10px;
  }
  .topic-matching__right{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .topic-matching__rows label{
    grid-template-columns:1fr 62px;
  }
  .topic-solution{
    width:100%;
    margin-left:0;
  }
  .topic-solution summary{
    text-align:left;
  }
}


.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.notebook{
  border-top:1px solid #ece6da;
  background:#fcfaf5;
}

.notebook-toggle{
  width:100%;
  min-height:52px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 18px;
  border:0;
  background:transparent;
  color:var(--board);
  font-weight:800;
  cursor:pointer;
  text-align:left;
}
.notebook-toggle:hover{
  background:#f3f5ef;
}
.notebook-toggle__icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid #b9c8bc;
  border-radius:8px;
  background:#edf4ee;
  font-size:17px;
}
.notebook.is-open .notebook-toggle{
  border-bottom:1px solid #e7e1d5;
  background:#f6f7f2;
}

.notebook-panel{
  position:relative;
  border-top:0;
  background:#f8f5ee;
}

.notebook-toolbar{
  position:sticky;
  top:8px;
  z-index:8;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:0;
  padding:9px 12px;
  border-bottom:1px solid #ddd6c9;
  background:rgba(255,253,248,.96);
  box-shadow:0 5px 15px rgba(54,48,39,.045);
  backdrop-filter:blur(8px);
}

.notebook-toolgroup{
  display:flex;
  align-items:center;
  gap:5px;
}
.notebook-divider{
  width:1px;
  height:29px;
  margin:0 2px;
  background:#ddd6c9;
}

.notebook-tool,
.notebook-action,
.notebook-width,
.notebook-color{
  border:1px solid #d3ccbf;
  background:#fff;
  color:#4c554e;
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease,color .14s ease,transform .08s ease;
}
.notebook-tool:hover,
.notebook-action:hover:not(:disabled),
.notebook-width:hover,
.notebook-color:hover{
  border-color:#95ac9c;
  background:#f1f6f2;
  color:var(--board);
}
.notebook-tool:active,
.notebook-action:active:not(:disabled),
.notebook-width:active,
.notebook-color:active{
  transform:translateY(1px);
}

.notebook-tool{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
}
.notebook-tool.is-active{
  border-color:var(--board);
  background:var(--board);
  color:#fff;
}

.notebook-eraser-icon{
  width:14px;
  height:10px;
  display:inline-block;
  border:2px solid currentColor;
  border-radius:2px;
  transform:rotate(-34deg);
}

.notebook-width{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:8px;
}
.notebook-width.is-active{
  border-color:#668d75;
  background:#edf4ee;
  box-shadow:inset 0 0 0 1px #668d75;
}
.notebook-width-dot{
  width:max(4px,var(--stroke-size));
  height:max(4px,var(--stroke-size));
  display:block;
  border-radius:50%;
  background:#25322b;
}

.notebook-color{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  padding:0;
}
.notebook-color>span:not(.sr-only){
  width:18px;
  height:18px;
  display:block;
  border-radius:50%;
  background:var(--pen-color);
}
.notebook-color.is-active{
  border-color:#53675a;
  box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(36,77,59,.22);
}

.notebook-action{
  min-width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:8px;
  padding:0 9px;
  font-weight:800;
}
.notebook-action:disabled{
  opacity:.38;
  cursor:not-allowed;
}
.notebook-action--text{
  width:auto;
  display:inline-flex;
  gap:4px;
  font-size:12px;
  font-weight:750;
}

.notebook-sheet{
  position:relative;
  overflow:hidden;
  margin:14px;
  border:1px solid #cfd7d0;
  border-radius:10px;
  background-color:#fffefb;
  background-image:
    linear-gradient(rgba(78,139,174,.11) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,139,174,.11) 1px,transparent 1px),
    linear-gradient(rgba(78,139,174,.055) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,139,174,.055) 1px,transparent 1px);
  background-size:
    var(--grid-size,36px) var(--grid-size,36px),
    var(--grid-size,36px) var(--grid-size,36px),
    var(--grid-major,180px) var(--grid-major,180px),
    var(--grid-major,180px) var(--grid-major,180px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 4px 14px rgba(53,47,36,.035);
}

.notebook-canvas{
  display:block;
  width:100%;
  height:280px;
  cursor:crosshair;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}
.notebook-canvas.is-erasing{
  cursor:cell;
}

.notebook-help{
  padding:0 16px 13px;
  color:#84877f;
  font-size:11px;
  line-height:1.4;
}

@media(max-width:760px){
  .notebook-toolbar{
    top:4px;
    padding:8px;
    gap:6px;
  }
  .notebook-divider{
    display:none;
  }
  .notebook-actions{
    width:100%;
    padding-top:2px;
  }
  .notebook-sheet{
    margin:10px;
  }
  .notebook-action--text{
    flex:1 1 auto;
    justify-content:center;
  }
}

@media(max-width:480px){
  .notebook-tool span:last-child{
    display:none;
  }
  .notebook-tool{
    width:36px;
    padding:0;
    justify-content:center;
  }
  .notebook-width,
  .notebook-color{
    width:32px;
    height:32px;
  }
  .notebook-action--text{
    font-size:11px;
  }
}


/* Notebook grid scale v1.4.1 */
.notebook-tool-label{
  margin-right:2px;
  color:#6f756e;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}

.notebook-grid{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid #d3ccbf;
  border-radius:8px;
  background:#fff;
  color:#4c554e;
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .08s ease;
}
.notebook-grid:hover{
  border-color:#95ac9c;
  background:#f1f6f2;
}
.notebook-grid:active{
  transform:translateY(1px);
}
.notebook-grid.is-active{
  border-color:#668d75;
  background:#edf4ee;
  box-shadow:inset 0 0 0 1px #668d75;
}
.notebook-grid-preview{
  width:22px;
  height:22px;
  display:block;
  border-radius:3px;
  background-color:#fffefb;
  background-image:
    linear-gradient(rgba(78,139,174,.28) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,139,174,.28) 1px,transparent 1px);
  background-size:var(--preview-grid) var(--preview-grid);
  box-shadow:inset 0 0 0 1px rgba(78,139,174,.18);
}

@media(max-width:760px){
  .notebook-grids{
    order:4;
  }
  .notebook-tool-label{
    display:none;
  }
}


/* Solve flow v1.4.2: Condition -> Notebook -> Answer */
.notebook-condition{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 11px;
  border:1px solid #b9c8bc;
  border-radius:8px;
  background:#edf4ee;
  color:var(--board);
  font-size:12px;
  font-weight:850;
  cursor:zoom-in;
}
.notebook-condition:hover{
  border-color:#668d75;
  background:#e4efe6;
}
.notebook-condition__icon{
  font-size:17px;
  line-height:1;
}

/* The answer now comes after the working area and reads as the final step. */
.notebook + .task-answer-ui{
  border-top:1px solid #dfd8ca;
  background:#fffdf8;
  padding-top:18px;
}
.notebook.is-open + .task-answer-ui{
  box-shadow:inset 0 5px 12px rgba(59,51,39,.025);
}

@media(max-width:480px){
  .notebook-condition span:last-child{
    display:none;
  }
  .notebook-condition{
    width:36px;
    padding:0;
    justify-content:center;
  }
}


/* Notebook shapes v1.5 */
.notebook-shapes{
  flex-wrap:wrap;
}
.notebook-shape{
  width:36px;
  min-width:36px;
  padding:0;
  justify-content:center;
  font-size:16px;
  line-height:1;
}
.notebook-shape span[aria-hidden="true"]{
  transform:translateY(-.5px);
}

@media(max-width:760px){
  .notebook-shapes{
    order:3;
  }
}



/* Notebook selection + drag v1.5.2 */
.notebook-select-tool span[aria-hidden="true"]{
  font-size:18px;
  line-height:1;
  transform:translateY(-1px);
}
.notebook-canvas.is-selecting{
  cursor:default;
}
.notebook-canvas.is-selecting:active{
  cursor:grabbing;
}


/* Notebook global actions v1.5.3 */
.notebook-global-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:2px 0 4px;
  padding:8px 10px;
  border:1px solid #d9dfd9;
  border-radius:11px;
  background:#f1f5ef;
}
.notebook-global-actions__label{
  margin-right:4px;
  color:var(--board);
  font-size:12px;
  font-weight:900;
}
.notebook-global-action{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 10px;
  border:1px solid #d0d8d1;
  border-radius:8px;
  background:#fffefb;
  color:#46544b;
  font:750 11px/1.2 inherit;
  cursor:pointer;
}
.notebook-global-action:hover{
  border-color:#91aa99;
  background:#f8fbf8;
  color:var(--board);
}
.notebook-global-action--danger{
  margin-left:auto;
  border-color:#dec9c5;
  color:#8d443d;
}
.notebook-global-action--danger:hover{
  border-color:#cda9a4;
  background:#fff5f3;
  color:#923d35;
}

@media(max-width:620px){
  .notebook-global-actions__label{
    width:100%;
  }
  .notebook-global-action{
    flex:1 1 auto;
  }
  .notebook-global-action--danger{
    margin-left:0;
  }
}


/* Notebook global actions v1.5.5 — only full reset remains */
.notebook-global-actions--clear-only{
  justify-content:flex-end;
  min-height:0;
  padding:6px 8px;
}
.notebook-global-actions--clear-only .notebook-global-action--danger{
  margin-left:0;
}
@media(max-width:620px){
  .notebook-global-actions--clear-only .notebook-global-action{
    flex:0 0 auto;
  }
}


/* Test reset v1.5.6 — compact button, no full-width toolbar */
.test-clear-action{
  display:flex;
  justify-content:flex-end;
  margin:2px 0 14px;
  padding:0;
  border:0;
  background:transparent;
}

.test-clear-button{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 11px;
  border:1px solid #dec9c5;
  border-radius:8px;
  background:#fffefb;
  color:#8d443d;
  font:750 12px/1.2 inherit;
  cursor:pointer;
}

.test-clear-button:hover{
  border-color:#cda9a4;
  background:#fff5f3;
  color:#923d35;
}

@media(max-width:520px){
  .test-clear-action{
    margin-bottom:10px;
  }
}


/* Notebook shape editing v1.5.7 */
.notebook-object-action{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid #d3ccbf;
  border-radius:8px;
  background:#fff;
  color:#4b554e;
  font-size:16px;
  font-weight:850;
  cursor:pointer;
}
.notebook-object-action:hover:not(:disabled){
  border-color:#8fa795;
  background:#f1f6f2;
  color:var(--board);
}
.notebook-object-action--danger:hover:not(:disabled){
  border-color:#d3aaa5;
  background:#fff3f1;
  color:#9a4038;
}
.notebook-object-action:disabled{
  opacity:.32;
  cursor:default;
}

.notebook-canvas.is-selecting{
  cursor:grab;
}
.notebook-canvas.is-selecting.is-transforming{
  cursor:grabbing;
}

/* ==========================================================
   Topic bank readability + notebook integration v0.12
   ========================================================== */

/* Main task text was too small on desktop. */
.topic-task-card__prompt{
  padding:18px 18px 15px;
  font-size:18px;
  line-height:1.62;
}
.topic-task-card__prompt mjx-container{
  font-size:122%!important;
}

.topic-task-card__head{
  padding:11px 14px;
}
.topic-task-card__no{
  width:38px;
  height:38px;
  font-size:12px;
}
.topic-task-card__head span{
  font-size:9px;
}
.topic-task-card__head strong{
  font-size:13px;
}

.topic-answer-grid{
  gap:8px;
  padding:0 14px 15px;
}
.topic-answer-option{
  min-height:62px;
  padding:10px 11px;
}
.topic-answer-option__letter{
  width:29px;
  height:29px;
  font-size:11px;
}
.topic-answer-option__value{
  font-size:16px;
  line-height:1.3;
}
.topic-answer-option__value mjx-container{
  font-size:112%!important;
}

.topic-numeric-answer{
  padding:0 14px 15px;
}
.topic-numeric-answer label>span{
  font-size:12px;
}
.topic-numeric-answer input{
  min-height:48px;
  font-size:19px;
}

.topic-matching{
  padding:0 14px 15px;
}
.topic-matching__right>span{
  min-height:52px;
  padding:9px 10px;
  font-size:15px;
}
.topic-matching__right b{
  font-size:12px;
}
.topic-matching__statement{
  font-size:15px;
  line-height:1.45;
}
.topic-matching__rows label{
  min-height:48px;
  padding:9px 11px;
}
.topic-matching__rows select{
  min-height:38px;
  font-size:14px;
}

.topic-task-card__actions{
  padding:12px 14px;
}
.topic-check-btn{
  min-height:40px;
  padding:0 15px;
  font-size:12px;
}
.topic-task-result{
  font-size:12px;
}
.topic-solution summary{
  font-size:12px;
}
.topic-solution__body{
  margin-top:9px;
  padding:12px 13px;
  font-size:15px;
  line-height:1.65;
}
.topic-solution__body mjx-container{
  font-size:112%!important;
}

/* Notebook sits as the full-width final row of each task card. */
.topic-task-card__notebook{
  border-top:1px solid #e4ddd1;
}
.topic-task-card__notebook .notebook{
  border-top:0;
  background:#fbf8f2;
}
.topic-task-card__notebook .notebook-toggle{
  min-height:50px;
  padding:10px 14px;
  color:#4a524e;
  font-size:13px;
}
.topic-task-card__notebook .notebook-toggle__icon{
  border-color:#c9b8aa;
  background:#eee5da;
  color:#765846;
}
.topic-task-card__notebook .notebook.is-open .notebook-toggle{
  background:#f3eee6;
}
.topic-task-card__notebook .notebook-tool.is-active{
  border-color:#343b3a;
  background:#343b3a;
}
.topic-task-card__notebook .notebook-toolbar{
  top:6px;
}
.topic-task-card__notebook .notebook-sheet{
  min-height:280px;
}

/* Keep the cards readable without making them oversized on phones. */
@media(max-width:620px){
  .topic-task-card__prompt{
    padding:14px 12px 11px;
    font-size:16px;
  }
  .topic-answer-option__value{
    font-size:15px;
  }
  .topic-solution__body{
    font-size:14px;
  }
}


/* ==========================================================
   Unified reference card v0.13
   One reference section -> two internal modes.
   ========================================================== */

.prep-hub--three{
  display:grid;
  grid-template-columns:1.35fr 1fr 1fr;
  gap:10px;
}

.prep-hub--three .prep-card{
  min-height:205px;
}

.prep-card--reference{
  display:flex;
  flex-direction:column;
  border-top-color:var(--walnut,#745747);
  background:
    linear-gradient(180deg,rgba(255,255,255,.72),rgba(255,253,248,.98));
}

.reference-mode-mini{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin-top:auto;
  padding-top:14px;
}

.reference-mode-mini>a{
  display:grid;
  grid-template-columns:minmax(0,1fr) 18px;
  grid-template-areas:
    "title arrow"
    "hint arrow";
  gap:2px 7px;
  min-height:60px;
  align-items:center;
  padding:9px 10px;
  border:1px solid #d9d1c4;
  border-radius:9px;
  background:#f7f2ea;
  color:#4d5551;
  text-decoration:none;
  transition:
    transform .12s ease,
    border-color .12s ease,
    background .12s ease,
    box-shadow .12s ease;
}

.reference-mode-mini>a:hover{
  transform:translateY(-1px);
  border-color:#bca997;
  background:#f1e8dd;
  box-shadow:0 5px 12px rgba(52,45,38,.06);
}

.reference-mode-mini strong{
  grid-area:title;
  color:#39413e;
  font-size:12px;
  line-height:1.2;
}

.reference-mode-mini span{
  grid-area:hint;
  color:#85837c;
  font-size:9px;
  line-height:1.25;
}

.reference-mode-mini b{
  grid-area:arrow;
  color:var(--copper,#c78355);
  font-size:15px;
  font-weight:900;
  text-align:right;
}

.reference-mode-mini>a:first-child{
  border-left:3px solid var(--board,#244d3b);
}

.reference-mode-mini>a:last-child{
  border-left:3px solid var(--walnut-2,#8a6753);
}

@media(max-width:1100px){
  .prep-hub--three{
    grid-template-columns:1fr 1fr;
  }

  .prep-card--reference{
    grid-column:1 / -1;
  }
}

@media(max-width:700px){
  .prep-hub--three{
    grid-template-columns:1fr;
  }

  .prep-card--reference{
    grid-column:auto;
  }

  .reference-mode-mini{
    grid-template-columns:1fr;
  }
}

/* ==========================================================
   Topic task cards — contrast refresh v0.16
   Keeps the topic bank visually distinct from the NMT tests,
   but gives each task a stronger header and clearer hierarchy.
   ========================================================== */

.topic-task-card{
  --topic-accent:#2e6049;
  --topic-accent-deep:#234c3b;
  --topic-accent-soft:#e8f1eb;
  --topic-accent-line:#c7dacd;
  border-color:var(--topic-accent-line);
  box-shadow:0 7px 18px rgba(48,42,34,.055);
}

.topic-task-card[data-task-type="single"]{
  --topic-accent:#2e6049;
  --topic-accent-deep:#234c3b;
  --topic-accent-soft:#e6f1e9;
  --topic-accent-line:#c5d9cb;
}

.topic-task-card[data-task-type="matching"]{
  --topic-accent:#3f6f8a;
  --topic-accent-deep:#315c74;
  --topic-accent-soft:#e8f1f6;
  --topic-accent-line:#c8dbe5;
}

.topic-task-card[data-task-type="numeric"]{
  --topic-accent:#a66a3f;
  --topic-accent-deep:#875333;
  --topic-accent-soft:#f6ede4;
  --topic-accent-line:#e6d1bd;
}

.topic-task-card__head{
  min-height:60px;
  gap:11px;
  padding:9px 14px;
  border-bottom-color:var(--topic-accent-line);
  background:
    linear-gradient(90deg,var(--topic-accent-soft) 0%,#fbf9f4 74%);
}

.topic-task-card__no{
  width:42px;
  height:42px;
  border-radius:10px;
  background:var(--topic-accent-deep);
  color:#fffdf7;
  font-family:Georgia,"Times New Roman",serif;
  font-size:16px;
  font-weight:900;
  box-shadow:0 2px 5px rgba(35,76,59,.16);
}

.topic-task-card__head>div:last-child{
  display:flex;
  min-width:0;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.topic-task-card__head span{
  color:var(--topic-accent-deep);
  font-size:9px;
  letter-spacing:.09em;
}

.topic-task-card__head strong{
  display:inline-flex;
  min-height:26px;
  align-items:center;
  margin-top:0;
  padding:4px 9px;
  border:1px solid var(--topic-accent-line);
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:var(--topic-accent-deep);
  font-size:11px;
  font-weight:900;
}

.topic-task-card__prompt{
  padding-top:17px;
}

.topic-task-card .topic-answer-option:hover{
  border-color:var(--topic-accent);
  background:#fff;
}

.topic-task-card .topic-answer-option:has(input:checked){
  border-color:var(--topic-accent-deep);
  background:var(--topic-accent-soft);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--topic-accent) 12%,transparent);
}

.topic-task-card .topic-answer-option:has(input:checked) .topic-answer-option__letter{
  background:var(--topic-accent-deep);
  color:#fff;
}

.topic-task-card .topic-numeric-answer input:focus,
.topic-task-card .topic-matching__rows select:focus{
  border-color:var(--topic-accent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--topic-accent) 11%,transparent);
  outline:none;
}

.topic-task-card .topic-matching__right b{
  color:var(--topic-accent-deep);
}

.topic-task-card .topic-solution__body{
  border-left-color:var(--topic-accent);
}

@media(max-width:620px){
  .topic-task-card__head{
    min-height:54px;
    padding:8px 11px;
  }
  .topic-task-card__no{
    width:38px;
    height:38px;
    font-size:15px;
  }
  .topic-task-card__head strong{
    min-height:24px;
    padding:3px 8px;
    font-size:10px;
  }
}

/* ==========================================================
   Topic task cards — unified NMT style v0.17
   One calm green hierarchy, light controls, no dark CTA blocks.
   ========================================================== */

.topic-task-card,
.topic-task-card[data-task-type="single"],
.topic-task-card[data-task-type="matching"],
.topic-task-card[data-task-type="numeric"]{
  --topic-accent:#2f684e;
  --topic-accent-deep:#24543f;
  --topic-accent-soft:#e8f1ea;
  --topic-accent-line:#c9d9cd;
}

.topic-task-card{
  border-color:#d5dfd7;
  border-radius:12px;
  background:#fffdf9;
  box-shadow:0 4px 12px rgba(39,58,47,.045);
}

.topic-task-card__head{
  min-height:52px;
  gap:9px;
  padding:8px 12px;
  border-bottom:1px solid #cbdccf;
  background:#e5efe7;
}

.topic-task-card__no{
  width:34px;
  height:34px;
  border-radius:8px;
  background:#24543f;
  color:#fff;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:14px;
  font-weight:850;
  box-shadow:none;
}

.topic-task-card__head>div:last-child{
  display:flex;
  min-width:0;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.topic-task-card__head span{
  color:#285b44;
  font-size:11px;
  font-weight:850;
  letter-spacing:0;
  text-transform:none;
}

.topic-task-card__head strong{
  display:inline-flex;
  min-height:24px;
  align-items:center;
  margin:0;
  padding:3px 8px;
  border:1px solid #c5d8ca;
  border-radius:999px;
  background:#f8fbf8;
  color:#496355;
  font-size:9px;
  font-weight:800;
}

.topic-task-card__prompt{
  padding:16px 16px 13px;
  background:#fffdf9;
}

.topic-answer-option{
  border-color:#ddd8cf;
  background:#fff;
  box-shadow:none;
}

.topic-task-card .topic-answer-option:hover{
  transform:none;
  border-color:#a9bcae;
  background:#f8fbf8;
}

.topic-task-card .topic-answer-option:has(input:checked){
  border-color:#7fa18a;
  background:#edf5ef;
  box-shadow:inset 0 0 0 1px rgba(47,104,78,.05);
}

.topic-answer-option__letter{
  background:#f0ede7;
  color:#625b51;
}

.topic-task-card .topic-answer-option:has(input:checked) .topic-answer-option__letter{
  background:#dbe9de;
  color:#24543f;
}

.topic-matching__right>span,
.topic-matching__rows label,
.topic-numeric-answer input{
  background:#fff;
}

.topic-task-card__actions{
  padding:10px 12px 11px;
  border-top-color:#e2e6e1;
  background:#fafcf9;
}

/* Per-task check: quiet outline control instead of dark primary button. */
.topic-task-card__actions .site-btn.topic-check-btn{
  min-height:34px;
  padding:0 13px;
  border:1px solid #9fb6a5;
  border-radius:8px;
  background:#fff;
  color:#285b44;
  box-shadow:none;
  font-size:10px;
  font-weight:850;
}

.topic-task-card__actions .site-btn.topic-check-btn:hover{
  border-color:#789b83;
  background:#eef5f0;
  color:#214b38;
  box-shadow:none;
}

.topic-task-card__actions .site-btn.topic-check-btn:focus-visible{
  outline:2px solid rgba(47,104,78,.22);
  outline-offset:2px;
}

.topic-solution summary{
  color:#486153;
}

.topic-solution__body{
  border-left-color:#9ab4a1;
  background:#f7f5ef;
}

/* One global clear button for the topic page: intentionally neutral. */
[data-clear-topic-answers].site-btn{
  min-height:38px;
  padding:0 15px;
  border:1px solid #c9c3b8;
  border-radius:9px;
  background:#fffdf9;
  color:#68645d;
  box-shadow:none;
}

[data-clear-topic-answers].site-btn:hover{
  border-color:#aeb8af;
  background:#f4f7f4;
  color:#3f5648;
  box-shadow:none;
}

@media(max-width:620px){
  .topic-task-card__head{
    min-height:50px;
    padding:8px 10px;
  }
  .topic-task-card__no{
    width:32px;
    height:32px;
    font-size:13px;
  }
  .topic-task-card__head strong{
    min-height:22px;
    padding:2px 7px;
    font-size:9px;
  }
}

/* ==========================================================
   UI refresh v0.21
   - Topic list softened and de-monotonized
   - NMT test cards made lighter
   - Topic tasks segmented by 10
   ========================================================== */

.topic-bank-summary{
  gap:12px;
  margin-bottom:14px;
}

.topic-bank-summary>div{
  padding:14px 16px;
  border-radius:14px;
  border-color:#d9e3db;
  background:linear-gradient(180deg,#fffefa 0%,#fbfaf5 100%);
  box-shadow:0 6px 16px rgba(39,58,47,.045);
}

.topic-bank-controls{
  margin:14px 0 12px;
}

.topic-bank-sections{
  gap:10px;
}

.topic-bank-sections a{
  min-height:42px;
  padding:8px 15px;
  border-radius:12px;
  border-color:#d8e1da;
  background:#fffdf9;
  color:#4d5d55;
  box-shadow:none;
}

.topic-bank-sections a span{
  background:#eef3ef;
  color:#607066;
  font-size:10px;
}

.topic-bank-sections a.active{
  border-color:#8faf99;
  background:linear-gradient(180deg,#8a6a57 0%,#785a49 100%);
  color:#fff9f1;
}

.topic-bank-search{
  min-height:46px;
  border-radius:13px;
  border-color:#d8e1da;
  background:#fffdf9;
  box-shadow:none;
}

.topic-bank-note{
  margin:4px 0 18px;
  padding:12px 14px;
  border-left:4px solid #c78b61;
  border-radius:0 12px 12px 0;
  background:#f4efe5;
  font-size:12px;
}

.topic-bank-list{
  gap:12px;
}

.topic-bank-item{
  position:relative;
  grid-template-columns:52px minmax(0,1fr) 40px;
  min-height:82px;
  gap:14px;
  padding:14px 16px;
  border:1px solid #d7e2db;
  border-radius:16px;
  background:linear-gradient(180deg,#fffefa 0%,#fcfbf7 100%);
  box-shadow:0 6px 18px rgba(39,58,47,.045);
}

.topic-bank-item::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  border-radius:16px 0 0 16px;
  background:linear-gradient(180deg,#9ab8a4 0%,#6d977e 100%);
  opacity:.9;
}

.topic-bank-item[data-topic-section="geometry"]::before{
  background:linear-gradient(180deg,#c7cfdb 0%,#91a2ba 100%);
}

.topic-bank-item:hover{
  transform:translateY(-2px);
  border-color:#b8c8be;
  box-shadow:0 10px 24px rgba(39,58,47,.08);
}

.topic-bank-item__no{
  width:44px;
  height:44px;
  border-radius:12px;
  background:#edf5ef;
  color:#275740;
  font-size:13px;
  font-weight:900;
}

.topic-bank-item[data-topic-section="geometry"] .topic-bank-item__no{
  background:#eef3f8;
  color:#4f677d;
}

.topic-bank-item__body strong{
  font-size:16px;
  line-height:1.3;
}

.topic-bank-item__body small{
  margin-top:6px;
  font-size:10px;
  letter-spacing:.08em;
}

.topic-bank-item__arrow{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border:1px solid #dde6df;
  border-radius:999px;
  background:#fff;
  color:#7d8c82;
  font-size:18px;
  text-align:center;
  transition:transform .15s ease, border-color .15s ease, color .15s ease, background .15s ease;
}

.topic-bank-item:hover .topic-bank-item__arrow{
  transform:translateX(2px);
  border-color:#b8c8be;
  color:#2b5b45;
  background:#f3f8f4;
}

.nmt-test-grid{
  gap:20px;
}

.nmt-test-card{
  min-height:258px;
  border-color:#d9e3db;
  border-radius:18px;
  background:linear-gradient(180deg,#fffefa 0%,#fcfbf7 100%);
  box-shadow:0 8px 22px rgba(39,58,47,.055);
}

.nmt-test-card::before{
  height:4px;
}

.nmt-test-card__top{
  padding:18px 20px 0;
}

.nmt-test-card__body{
  padding:18px 20px 16px;
}

.nmt-year{
  min-height:30px;
  padding:0 12px;
  background:#edf5ef;
  color:#275740;
  font-size:13px;
}

.nmt-status-dot{
  width:9px;
  height:9px;
  box-shadow:0 0 0 5px #eef5ef;
}

.nmt-test-card__number{
  font-size:29px;
}

.nmt-test-card__stats{
  gap:10px;
  margin-top:22px;
}

.nmt-test-card__stats span{
  padding:12px 12px 11px;
  border:1px solid #edf0ea;
  border-radius:12px;
  background:#f8f5ee;
  color:#66665f;
}

.nmt-test-card__stats span:last-child{
  background:#edf5ef;
  border-color:#d7e2db;
}

.nmt-test-card>.site-btn,
.nmt-test-card__cta.site-btn{
  width:auto;
  margin:0 18px 18px;
  min-height:48px;
  padding-inline:18px;
  border:1px solid #c9d8cd;
  border-radius:12px;
  background:#fff;
  color:#2c5a45;
  box-shadow:none;
  justify-content:space-between;
}

.nmt-test-card>.site-btn:hover,
.nmt-test-card__cta.site-btn:hover{
  border-color:#aabdaf;
  background:#eef5f0;
  color:#244c3b;
  box-shadow:none;
}

.topic-segment-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:16px 0 18px;
}

.topic-segment-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 16px;
  border:1px solid #d5dfd7;
  border-radius:999px;
  background:#fffdf9;
  color:#5f655f;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  transition:background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.topic-segment-tab:hover{
  border-color:#aebdae;
  background:#f5f9f6;
  color:#345d49;
}

.topic-segment-tab.is-active{
  border-color:#89a793;
  background:#e8f1ea;
  color:#285842;
}

@media(max-width:860px){
  .topic-bank-list{
    grid-template-columns:1fr;
  }
}

@media(max-width:640px){
  .topic-bank-summary{
    grid-template-columns:1fr;
  }

  .topic-bank-item{
    grid-template-columns:48px minmax(0,1fr) 36px;
    padding:12px 14px;
  }

  .topic-bank-item__body strong{
    font-size:15px;
  }

  .topic-segment-tabs{
    gap:8px;
  }

  .topic-segment-tab{
    min-height:38px;
    padding:0 14px;
    font-size:12px;
  }
}

/* ==========================================================
   Notebook v1.5.8 — planimetry shapes + clearer grid
   ========================================================== */

.notebook-sheet{
  background-image:
    linear-gradient(rgba(78,139,174,.145) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,139,174,.145) 1px,transparent 1px),
    linear-gradient(rgba(78,139,174,.075) 1px,transparent 1px),
    linear-gradient(90deg,rgba(78,139,174,.075) 1px,transparent 1px);
}

.notebook-shape[data-tool="right-triangle"] span[aria-hidden="true"],
.notebook-shape[data-tool="parallelogram"] span[aria-hidden="true"],
.notebook-shape[data-tool="rhombus"] span[aria-hidden="true"]{
  font-size:18px;
}

/* Topic bank: tasks with two numeric answers */
.topic-numeric-answer--multi{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,300px));
  gap:12px;
}
@media (max-width:640px){
  .topic-numeric-answer--multi{grid-template-columns:1fr;}
}


/* ==========================================================
   Topic navigation cleanup v0.33
   ========================================================== */
.topic-shell-nav__all{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 18px;
  border:1px solid #a9bfae;
  border-radius:11px;
  background:#eef5f0;
  color:#285842 !important;
  font-size:12px !important;
  font-weight:900 !important;
  box-shadow:0 3px 10px rgba(39,88,66,.06);
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.topic-shell-nav__all:hover{
  border-color:#89a793;
  background:#e5f0e8;
  box-shadow:0 5px 14px rgba(39,88,66,.09);
  transform:translateY(-1px);
}
.topic-workspace-shell__bar{
  justify-content:flex-start;
}
.topic-segment-tabs--bottom{
  margin:22px 16px 6px;
  padding-top:16px;
  border-top:1px solid #e5e9e5;
}
.topic-segment-tabs--bottom + .test-submit-bar{
  margin-top:6px;
}
@media(max-width:640px){
  .topic-shell-nav__all{
    min-height:40px;
    padding:0 14px;
    font-size:11px !important;
  }
  .topic-segment-tabs--bottom{
    margin:18px 12px 4px;
  }
}

/* ==========================================================
   Topic matching tasks — clearer visual separation v0.36
   Separates the A–D answer bank from the 1–4 matching rows.
   Applies to every matching task in the thematic bank.
   ========================================================== */
.topic-task-card[data-task-type="matching"] .topic-task-card__prompt{
  padding-bottom:17px;
}

.topic-task-card[data-task-type="matching"] .topic-matching{
  padding-top:1px;
}

.topic-task-card[data-task-type="matching"] .topic-matching__right{
  gap:8px;
  margin:0 0 16px;
  padding:10px;
  border:1px solid #d8e3da;
  border-radius:11px;
  background:#f2f7f3;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}

.topic-task-card[data-task-type="matching"] .topic-matching__right>span{
  min-height:54px;
  padding:9px 10px;
  border-color:#d7ddd7;
  background:#fff;
  box-shadow:0 1px 2px rgba(39,58,47,.025);
}

.topic-task-card[data-task-type="matching"] .topic-matching__right b{
  color:#285b44;
}

.topic-task-card[data-task-type="matching"] .topic-matching__rows{
  gap:8px;
  padding-top:1px;
}

.topic-task-card[data-task-type="matching"] .topic-matching__rows label{
  min-height:52px;
  padding:10px 11px;
  border-color:#dedbd4;
  background:#fffdf9;
}

.topic-task-card[data-task-type="matching"] .topic-matching__statement b{
  color:#285b44;
}

@media(max-width:700px){
  .topic-task-card[data-task-type="matching"] .topic-matching__right{
    padding:8px;
    margin-bottom:13px;
  }
}


/* ==========================================================
   Matching answer letters — badge emphasis v0.37
   Makes A/Б/В/Г/Д in the matching answer bank visually distinct.
   ========================================================== */
.topic-task-card[data-task-type="matching"] .topic-matching__right>span{
  display:flex;
  align-items:center;
  gap:10px;
}

.topic-task-card[data-task-type="matching"] .topic-matching__right b{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-width:32px;
  height:32px;
  padding:0 8px;
  border:1px solid #ddd8cf;
  border-radius:10px;
  background:#f4efe7;
  color:#5f584e;
  font-size:14px;
  font-weight:800;
  line-height:1;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}

.topic-task-card[data-task-type="matching"] .topic-matching__right mjx-container{
  display:inline-block;
  vertical-align:middle;
}


/* ==========================================================
   Answer letter badges — unified system style v0.38
   Makes matching-task A–Д markers use the same size/style as
   the standard single-choice answer letters.
   ========================================================== */
.topic-task-card[data-task-type="matching"] .topic-matching__right b{
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  min-width:25px;
  flex:0 0 auto;
  padding:0;
  border:0;
  border-radius:6px;
  background:#ebe4da;
  color:#715542;
  font-size:10px;
  font-weight:950;
  line-height:1;
  box-shadow:none;
}


/* ==========================================================
   NMT test navigation — unified hierarchy v0.48
   ========================================================== */
.test-breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  margin:0 0 12px;
  color:#7b817c;
  font-size:13px;
  font-weight:700;
}
.test-breadcrumbs a{
  color:#315f4c;
  text-decoration:none;
}
.test-breadcrumbs a:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}
.test-breadcrumbs strong{
  color:#38463f;
  font-weight:800;
}
.test-breadcrumbs>span{
  color:#a6aaa6;
  font-weight:500;
}

.test-board__meta a{
  position:relative;
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  color:#dce8df;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  text-decoration:none;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.test-board__meta a:hover,
.test-board__meta a:focus-visible{
  border-color:rgba(255,255,255,.42);
  background:rgba(255,255,255,.10);
  color:#fff;
  outline:none;
}


/* ==========================================================
   NMT tests page hero v0.49
   Gives /nmt/tests the same full section header language as
   the rest of the public site.
   ========================================================== */
.nmt-hero--tests{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  margin-bottom:18px;
  padding:27px 30px 28px;
}
.nmt-tests-hero__content{
  position:relative;
  z-index:1;
  min-width:0;
}
.nmt-hero--tests h1{
  margin-bottom:8px;
  font-size:clamp(34px,4.4vw,50px);
}
.nmt-hero--tests p{
  max-width:760px;
  font-size:14px;
}
.nmt-hero-back{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
  min-height:40px;
  padding:9px 13px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:10px;
  background:rgba(255,255,255,.07);
  color:#f4edde;
  text-decoration:none;
  font-size:13px;
  font-weight:800;
  transition:background .15s ease,border-color .15s ease;
}
.nmt-hero-back:hover{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.30);
}
@media(max-width:700px){
  .nmt-hero--tests{
    align-items:flex-start;
    flex-direction:column;
    gap:18px;
    padding:23px 21px 24px;
  }
}


/* ==========================================================
   NMT task image sharpness v0.50
   Keep source images at their natural aspect ratio and ask
   Chromium/WebKit to use its contrast-optimized scaler for
   text-heavy scans. Avoid rounded overflow clipping on the
   image wrapper because it can push the bitmap into a softer
   composited layer on some browsers.
   ========================================================== */
.nmt-task .task-paper{
  overflow:visible;
}

.nmt-task .task-image-button{
  width:100%;
  overflow:visible;
}

.nmt-task .task-image{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  margin:0 auto;
  border-radius:8px;
  image-rendering:-webkit-optimize-contrast;
}

/* ==========================================================
   Formula reference header + filter hierarchy v0.54
   The page header now follows the standard NMT hero language.
   Mode/section choices read as filters, not navigation cards.
   ========================================================== */
.reference-hero{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  margin-bottom:16px;
  padding:27px 30px 28px;
  border:1px solid #282e2f;
  border-bottom:4px solid var(--walnut-2);
  border-radius:16px;
  background:linear-gradient(135deg,#353c3d 0%,#2f3536 68%,#3d3935 100%);
  box-shadow:0 14px 30px rgba(37,39,38,.14),inset 0 1px 0 rgba(255,255,255,.06);
}
.reference-hero::after{
  content:"";
  position:absolute;
  inset:auto -80px -110px auto;
  width:260px;
  height:260px;
  border-radius:50%;
  border:32px solid rgba(199,131,85,.06);
  box-shadow:0 0 0 26px rgba(255,255,255,.018);
  pointer-events:none;
}
.reference-hero>*{
  position:relative;
  z-index:1;
}
.reference-hero h1{
  margin:4px 0 8px;
  color:#f5eedf;
  font-size:clamp(34px,4.4vw,50px);
  line-height:1.03;
}
.reference-hero p{
  max-width:760px;
  margin:0;
  color:#d7d0c3;
  font-size:14px;
  line-height:1.5;
}
.reference-hero .reference-back{
  flex:0 0 auto;
  min-height:40px;
  padding:9px 13px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:10px;
  background:rgba(255,255,255,.07);
  color:#f4edde;
  box-shadow:none;
}
.reference-hero .reference-back:hover{
  border-color:rgba(255,255,255,.30);
  background:rgba(255,255,255,.12);
  color:#fff;
}

/* One light control surface makes it obvious that everything
   below the hero changes the current reference view. */
.reference-controls{
  margin:0 0 16px;
  padding:11px 12px 12px;
  border:1px solid #ddd6ca;
  border-radius:14px;
  background:linear-gradient(180deg,#faf7f1 0%,#f7f3eb 100%);
  box-shadow:0 5px 14px rgba(54,47,39,.05);
}

/* Compact segmented filters instead of large destination cards. */
.reference-primary-switch,
.reference-mode-tabs{
  display:flex;
  flex-wrap:wrap;
  grid-template-columns:none;
  gap:6px;
  margin:0;
}
.reference-primary-switch{
  padding-bottom:9px;
}
.reference-mode-tabs{
  padding-top:9px;
  border-top:1px solid #e2dbd0;
}

.reference-primary-switch>a,
.reference-mode-tabs>a{
  display:flex;
  flex:0 1 auto;
  flex-direction:column;
  justify-content:center;
  gap:1px;
  width:auto;
  min-width:150px;
  min-height:43px;
  padding:7px 12px;
  border:1px solid #d8d1c6;
  border-radius:9px;
  background:#fffdf9;
  color:#555d58;
  box-shadow:none;
  transform:none;
}
.reference-primary-switch>a:hover,
.reference-mode-tabs>a:hover{
  transform:none;
  border-color:#b7aa9a;
  background:#f2ece3;
}

.reference-primary-switch>a span,
.reference-mode-tabs>a strong{
  color:#37403d;
  font-size:14px;
  font-weight:900;
  line-height:1.15;
}
.reference-primary-switch>a small,
.reference-mode-tabs>a span{
  color:#858982;
  font-size:10px;
  line-height:1.2;
}

/* Mode filter: graphite selection. */
.reference-primary-switch>a.active{
  border-color:#2b3132;
  background:linear-gradient(180deg,#3a4243,#303638);
  box-shadow:0 4px 9px rgba(40,43,43,.12);
}
.reference-primary-switch>a.active span,
.reference-primary-switch>a.active small{
  color:#f4ecdc;
}

/* Subject filter: warm selection, deliberately different from mode. */
.reference-mode-tabs>a.active{
  border-color:#654b3e;
  background:linear-gradient(180deg,#80604e,#6f5243);
  box-shadow:0 4px 9px rgba(77,58,47,.11);
}
.reference-mode-tabs>a.active strong,
.reference-mode-tabs>a.active span{
  color:#fff6e7;
}

/* Keep the current state/search line visually subordinate. */
.reference-search-row{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid #e2dbd0;
}
.reference-topic-grid{
  margin-top:1px;
}

@media(max-width:760px){
  .reference-hero{
    align-items:flex-start;
    flex-direction:column;
    gap:18px;
    padding:23px 21px 24px;
  }
  .reference-primary-switch,
  .reference-mode-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .reference-primary-switch>a,
  .reference-mode-tabs>a{
    min-width:0;
    width:100%;
  }
}

@media(max-width:480px){
  .reference-primary-switch,
  .reference-mode-tabs{
    grid-template-columns:1fr;
  }
}


/* ==========================================================
   Formula reference filters — unified control strip v0.55
   The two mode choices and two section choices form one
   visual control panel. Search/topic filters stay below it.
   ========================================================== */
.reference-primary-switch{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  width:calc(50% - 7px);
  margin:0;
  padding:11px 6px 0 12px;
}

.reference-controls{
  position:relative;
  z-index:1;
  margin:-55px 0 16px;
  padding:11px 12px 12px;
  border:1px solid #ddd6ca;
  border-radius:14px;
  background:linear-gradient(180deg,#faf7f1 0%,#f7f3eb 100%);
  box-shadow:0 5px 14px rgba(54,47,39,.05);
}

.reference-mode-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  width:calc(50% - 7px);
  margin:0 0 12px auto;
  padding:0 0 0 12px;
  border-top:0;
  border-left:1px solid #dfd7cb;
}

.reference-primary-switch>a,
.reference-mode-tabs>a{
  width:100%;
  min-width:0;
  min-height:45px;
  padding:7px 11px;
  border-radius:9px;
}

.reference-search-row{
  margin-top:0;
  padding-top:12px;
  border-top:1px solid #e2dbd0;
}

/* Medium screens: keep one panel, but put the two filter pairs
   on separate rows so labels never become cramped. */
@media(max-width:820px){
  .reference-primary-switch{
    width:100%;
    padding:11px 12px 0;
  }

  .reference-controls{
    margin-top:-56px;
    padding-top:66px;
  }

  .reference-mode-tabs{
    width:100%;
    margin:0 0 10px;
    padding:0;
    border-left:0;
  }
}

@media(max-width:480px){
  .reference-primary-switch,
  .reference-mode-tabs{
    grid-template-columns:1fr 1fr;
  }

  .reference-primary-switch>a,
  .reference-mode-tabs>a{
    min-height:48px;
    padding:8px 9px;
  }
}

/* ==========================================================
   Formula reference — aligned filter row v0.56
   Left: Algebra / Geometry. Right: NMT / Full ZNO.
   Both read as filters inside the same control surface.
   ========================================================== */
@media(min-width:821px){
  .reference-primary-switch{
    position:relative;
    z-index:3;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    width:calc(50% - 19px);
    margin:0 12px -56px auto;
    padding:11px 0 0;
  }

  .reference-controls{
    position:relative;
    z-index:1;
    margin:0 0 16px;
    padding:11px 12px 12px;
  }

  .reference-mode-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    width:calc(50% - 7px);
    min-height:45px;
    margin:0 0 12px;
    padding:0 12px 0 0;
    border-top:0;
    border-left:0;
    border-right:1px solid #dfd7cb;
  }
}

/* On smaller screens keep both pairs inside one visual panel,
   but stack them so the labels remain readable. */
@media(max-width:820px){
  .reference-primary-switch{
    position:relative;
    z-index:3;
    width:calc(100% - 24px);
    margin:0 12px -56px;
    padding:11px 0 0;
  }

  .reference-controls{
    margin:0 0 16px;
    padding:66px 12px 12px;
  }

  .reference-mode-tabs{
    width:100%;
    margin:0 0 10px;
    padding:0;
    border:0;
  }
}

/* The mode strip was implementation/exam-filter commentary,
   not learner-facing content. The hero description is enough. */
.reference-note{
  display:none !important;
}

/* Stage 21: unified public learning-template cards */
.prep-hub--templates { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.prep-hub--templates .prep-card { position:relative; min-height:205px; padding:22px 22px 20px; background:#fffdf9; border:1px solid #dbd8d1; border-top:5px solid var(--template-accent); border-radius:15px; display:flex; flex-direction:column; color:var(--ink); text-decoration:none; }
.prep-hub--templates .prep-card--reference { --template-accent:#946e56; }
.prep-hub--templates .prep-card--topics { --template-accent:#28735b; }
.prep-hub--templates .prep-card--tests { --template-accent:#3f6e91; }
.prep-hub--templates .prep-card__type { font-size:11px; font-weight:800; letter-spacing:.07em; color:var(--template-accent); margin-bottom:24px; }
.prep-hub--templates .prep-card h2 { margin:0 0 10px; font-size:23px; line-height:1.2; }
.prep-hub--templates .prep-card p { font-size:14px; line-height:1.5; margin:0; }
.prep-hub--templates .prep-card__arrow { margin-top:auto; padding-top:16px; align-self:flex-end; font-size:23px; line-height:1; font-weight:700; color:var(--template-accent); }
.prep-hub--templates .prep-card:hover,.prep-hub--templates .prep-card:focus-visible { border-color:var(--template-accent); box-shadow:0 13px 30px rgba(38,55,48,.14); transform:translateY(-2px); }
.prep-hub--templates .prep-card:focus-visible { outline:3px solid var(--template-accent); outline-offset:3px; }
@media(max-width:720px) { .prep-hub--templates {grid-template-columns:1fr;} .prep-hub--templates .prep-card {min-height:150px;} }

/* Stage 22: consistent public breadcrumbs */
.site-breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:18px 0 14px;font-size:13px;line-height:1.5;color:#65726b}
.site-breadcrumbs a{color:#315b4c;text-decoration:none}
.site-breadcrumbs a:hover{text-decoration:underline}
.site-breadcrumbs__sep{color:#9fa8a2}
.site-breadcrumbs [aria-current="page"]{font-weight:650;color:#333b38}

/* Stage 23: compact, independent reference filter groups */
.formula-compact-filters{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0 0 14px;padding:0;border:0}
.formula-compact-filters__group{display:inline-flex;align-items:center;gap:3px;padding:4px;border:1px solid #e0d9cf;border-radius:11px;background:#f5f1eb;max-width:100%}
.formula-compact-filters__group a{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:0;min-height:33px;padding:6px 14px;border:0;border-radius:8px;background:transparent;color:#515d56;text-decoration:none;font-size:13px;font-weight:750;line-height:1.3;box-shadow:none;transform:none;white-space:nowrap}
.formula-compact-filters__group a:hover{background:#eae3da;color:#264a3b}
.formula-compact-filters__group a.active{background:#2a5846;color:#fff;box-shadow:0 1px 4px #263b301c}
.formula-compact-filters__group a.active:hover{background:#234d3c;color:#fff}
.formula-compact-filters__group a:focus-visible{outline:2px solid #548976;outline-offset:2px}
.formula-compact-filters__divider{height:27px;width:1px;background:#ddd5cb}
@media(max-width:600px){.formula-compact-filters{gap:8px}.formula-compact-filters__divider{display:none}.formula-compact-filters__group a{padding:6px 10px;font-size:12px}}

/* Stage 23: consistent, gentle breadcrumbs */
.site-breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin:16px 0 15px;font-size:12px;line-height:1.5;color:#627269}
.site-breadcrumbs a{display:inline-flex;align-items:center;max-width:100%;padding:5px 9px;border:1px solid #e7e4dc;background:#f8f7f3;border-radius:8px;color:#426254;text-decoration:none;font-weight:550;transition:background .15s,border-color .15s}
.site-breadcrumbs a:hover{background:#eef3ed;border-color:#cbdcd1;text-decoration:none}
.site-breadcrumbs a:focus-visible{outline:2px solid #447b60;outline-offset:2px}
.site-breadcrumbs__sep{padding:0 2px;color:#9baa9f;font-size:15px}
.site-breadcrumbs [aria-current="page"]{display:inline-flex;align-items:center;max-width:100%;padding:5px 9px;border-radius:8px;background:#edf2ed;color:#284e3d;font-weight:700;overflow-wrap:anywhere}
/* This older test-specific navigation duplicates the global breadcrumb trail. */
.test-hero > .test-breadcrumbs{display:none}

/* Stage 24 — lighter learning headers; no changes to content controls. */
:root { --learning-cream:#fffcf7; --learning-bg:#f5f1ea; --learning-border:#ded8cd; --learning-ink:#294c3f; }
.nmt-hero--preparation, .nmt-hero--tests, .reference-hero, .topic-bank-hero, .topic-shell-head {
  background:linear-gradient(110deg,#fffcf7 0%,#f4efe6 100%);
  border:1px solid var(--learning-border);
  border-left:4px solid #a8c7b4;
  border-bottom:1px solid var(--learning-border);
  color:#2c3833;
  box-shadow:0 7px 22px rgba(55,49,40,.055);
  border-radius:15px;
}
.nmt-hero--preparation, .nmt-hero--tests, .reference-hero, .topic-bank-hero {padding:23px 27px;}
.nmt-hero--preparation h1,.nmt-hero--tests h1,.reference-hero h1,.topic-bank-hero h1,.topic-shell-head h1 {
  color:#2a5040; font-size:clamp(29px,3.4vw,43px); line-height:1.15; letter-spacing:-.018em;
}
.nmt-hero--preparation p,.nmt-hero--tests p,.reference-hero p,.topic-bank-hero p {color:#667168;}
.nmt-hero--preparation .nmt-hero__eyebrow,.nmt-hero--tests .nmt-hero__eyebrow,.reference-hero .nmt-hero__eyebrow,.topic-bank-hero .nmt-hero__eyebrow,.topic-shell-head .nmt-hero__eyebrow {color:#8a6b56;}
.reference-hero::after {display:none;}
.reference-hero {border-left-color:#98725e;}
.topic-bank-hero,.topic-shell-head {border-left-color:#4b8971;}
.nmt-hero--tests {border-left-color:#6e8984;}
.topic-shell-head {padding:18px 24px; margin-bottom:15px;}
.topic-shell-title__no {background:#e6eee7!important;color:#2a5946!important;border-color:#d0ddcf!important;box-shadow:none!important;}
/* Home: the card itself is the link; no secondary heavy buttons. */
.home-grid--quiet .home-card--link{position:relative;display:flex;flex-direction:column;min-height:215px;padding:27px 28px 24px;text-decoration:none;color:#293b32;border:1px solid #dedbd1;border-radius:16px;background:#fffdf8;box-shadow:0 8px 21px rgba(51,47,40,.055);transition:border-color .15s, box-shadow .15s,transform .15s;}
.home-grid--quiet .home-card--link:hover{transform:translateY(-2px);border-color:#9fbba9;box-shadow:0 12px 26px rgba(51,47,40,.095);}
.home-grid--quiet .home-card--link:focus-visible{outline:3px solid #77a48a;outline-offset:3px;}
.home-grid--quiet .home-card__eyebrow{font-size:11px;letter-spacing:.075em;font-weight:800;color:#648473;margin:0 0 20px;}
.home-grid--quiet .home-card--study .home-card__eyebrow{color:#8d705f;}
.home-grid--quiet .home-card h2{margin:0 0 9px;color:#273d32;font-size:24px;}
.home-grid--quiet .home-card p{min-height:0;margin:0 36px 0 0;color:#68716b;font-size:14px;}
.home-grid--quiet .home-card__direction{font-size:22px;line-height:1;color:#39785e;margin-top:auto;align-self:flex-end;}
@media(max-width:680px){.nmt-hero--preparation,.nmt-hero--tests,.reference-hero,.topic-bank-hero{padding:18px}.topic-shell-head{padding:15px}.home-grid--quiet .home-card--link{min-height:158px;padding:22px;}}


/* Stage 25 — visual discipline, based on the installed Stage 24 stylesheet.
   Deliberately scoped to public UI: no admin editor, form mechanics or JSON changes. */
:root{
  --learning-green:#285443;
  --learning-green-deep:#244d3c;
  --learning-warm-line:#dcd7cd;
}
/* Full section headers: one green visual language, readable cream text. */
.nmt-hero--preparation,
.nmt-hero--tests,
.reference-hero,
.topic-bank-hero{
  background:linear-gradient(115deg,#285443 0%,#244a3a 100%);
  border:1px solid #295140;
  border-bottom:3px solid #9b7861;
  border-left:1px solid #295140;
  border-radius:9px;
  color:#fff9ee;
  box-shadow:0 4px 14px rgba(32,57,45,.08);
}
.nmt-hero--preparation h1,.nmt-hero--tests h1,
.reference-hero h1,.topic-bank-hero h1{
  color:#fff9ee;
  font-size:clamp(29px,3.4vw,42px);
  font-weight:700;
  line-height:1.15;
}
.nmt-hero--preparation p,.nmt-hero--tests p,
.reference-hero p,.topic-bank-hero p{color:#e2ece3;}
.nmt-hero--preparation .nmt-hero__eyebrow,
.nmt-hero--tests .nmt-hero__eyebrow,
.reference-hero .nmt-hero__eyebrow,
.topic-bank-hero .nmt-hero__eyebrow{color:#e0c2a7;font-weight:650;}
/* Compact topic header: don't put dark-on-dark letters inside an extra frame. */
.topic-shell-head{
  background:transparent;
  padding:0;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.topic-shell-title{
  padding:15px 18px;
  align-items:center;
  background:linear-gradient(110deg,#285443,#244a3a);
  border:1px solid #295140;
  border-bottom:3px solid #9b7861;
  border-radius:8px;
  box-shadow:0 4px 13px rgba(32,57,45,.07);
}
.topic-shell-title h1,
.topic-shell-head .topic-shell-title h1{
  color:#fff9ee;
  font-size:clamp(24px,2.8vw,34px);
  font-weight:700;
  line-height:1.2;
}
.topic-shell-title__no{
  width:40px;height:40px;
  background:#e4eee7!important;
  border:1px solid #c5dbca!important;
  border-radius:6px;
  color:#244d3c!important;
  font-weight:650;
}
/* Navigation hierarchy: crisp, modest labels and less rounded chrome. */
.site-breadcrumbs a,.site-breadcrumbs [aria-current="page"]{
  border-radius:5px;
  font-weight:500;
}
.site-breadcrumbs [aria-current="page"]{font-weight:600;}
.formula-compact-filters__group{border-radius:7px;}
.formula-compact-filters__group a{
  font-size:13px;
  font-weight:550;
  border-radius:5px;
}
.formula-compact-filters__group a.active{font-weight:600;}
/* The formula reference has its own brown identity for category choices. */
.reference-tabs a,.reference-topic-tabs a{
  border-radius:6px;
}
/* Light entry cards: no exaggerated type or shadows. */
.home-grid--quiet .home-card--link,
.prep-hub--templates .prep-card{
  border-radius:9px;
  box-shadow:0 3px 10px rgba(51,47,40,.045);
}
.home-grid--quiet .home-card h2,
.prep-hub--templates .prep-card h2{font-size:21px;font-weight:650;}
.home-grid--quiet .home-card__eyebrow,
.prep-hub--templates .prep-card__type{font-weight:650;}
.home-grid--quiet .home-card--link:hover,
.prep-hub--templates .prep-card:hover{
  transform:none;
  box-shadow:0 5px 13px rgba(51,47,40,.07);
}
/* Public question matrix only: keep the compact layout and readable numerals. */
.topic-task-matrix button,
.topic-task-grid button{font-weight:600;}
@media(max-width:680px){
  .topic-shell-title{padding:13px 14px;}
  .topic-shell-title__no{width:35px;height:35px;}
}


/* Stage 25.1: lightweight test list, clickable whole cards. */
.nmt-list-meta--plain{display:flex;flex-wrap:wrap;gap:5px 18px;margin-block:10px 18px;color:#697168;font-size:13px}
.nmt-list-meta--plain span{display:inline!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:inherit!important;font-size:inherit!important;font-weight:400!important}
.nmt-list-meta--plain span+span::before{content:"·";display:inline-block;margin-right:17px;color:#a59b8f}
.nmt-year-nav__item{min-height:36px!important;padding:7px 12px!important;border-radius:6px!important;box-shadow:none!important}
.nmt-year-nav__item.active{background:#285443!important;border-color:#285443!important;box-shadow:none!important}
.nmt-year-nav__item strong{font-size:14px!important;font-weight:600!important}
.nmt-year-nav__item span{font-size:12px!important;font-weight:400!important}
.nmt-test-card--link{display:flex;flex-direction:column;position:relative;color:inherit;text-decoration:none!important;min-height:204px!important;border-radius:8px!important;overflow:hidden;transition:border-color .15s ease,background-color .15s ease,transform .15s ease}
.nmt-test-card--link:hover{color:inherit;border-color:#aebfb3;background:#fffefa;transform:translateY(-1px)}
.nmt-test-card--link:focus-visible{outline:2px solid #29634b;outline-offset:3px}
.nmt-test-card--link .nmt-test-card__body{padding-bottom:9px!important}
.nmt-test-card--link .nmt-test-card__number{font-size:24px!important;font-weight:650!important}
.nmt-test-card--link .nmt-test-card__stats{display:flex;flex-wrap:wrap;gap:6px 15px;margin-top:15px!important}
.nmt-test-card--link .nmt-test-card__stats span{display:inline!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;border-radius:0!important;color:#67716a!important;font-size:12px!important;line-height:1.5!important}
.nmt-test-card--link .nmt-test-card__stats span strong{display:inline;margin-right:3px;font-size:13px;font-weight:600;color:#234c3b}
.nmt-test-card__go{display:block;align-self:flex-end;margin:auto 20px 15px;color:#285443;font-size:20px;line-height:1}
@media(max-width:600px){.nmt-list-meta--plain{gap:5px 10px}.nmt-list-meta--plain span+span::before{margin-right:9px}}
