/* 2026-11-06: grouped menu (Learn mega menu, Compare dropdown, phone sheet) + full footer */
header.top.mm { clip-path: none; box-shadow: none; position: sticky; top: 0; gap: 16px 22px; }
@media (max-width: 820px) { header.top.mm { top: 0; flex-wrap: nowrap; padding-block: 12px; border-bottom: 1px solid var(--line); } }
.mm svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mm-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 15px; color: var(--muted); }
.mm-nav > a, .mm-btn { text-decoration: none; white-space: nowrap; padding: 8px 10px; border-radius: 8px; color: inherit; font: inherit; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.mm-nav > a:hover, .mm-btn:hover, .mm-btn[aria-expanded="true"] { color: var(--ink); background: #E9EDF1; }
.mm-nav > a[aria-current="page"], .mm-btn[data-current] { color: var(--ink); font-weight: 600; }
.mm-btn .chev { width: 15px; height: 15px; transition: transform .15s; }
.mm-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.mm-item { position: static; }
.mm-rel { position: relative; }
.mm-panel { display: none; position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(21,26,34,.14), 0 2px 6px rgba(21,26,34,.05); color: var(--ink); font-size: 15px; }
.mm-btn[aria-expanded="true"] + .mm-panel { display: block; }
.mm-learn { left: 0; right: 0; top: calc(100% - 6px); padding: 26px 28px 0; }
.mm-compare { right: 0; top: calc(100% + 8px); width: 300px; padding: 18px 18px 12px; }
.mm-cols { display: grid; grid-template-columns: 1fr 1.75fr .9fr; gap: 32px; }
.mm-gcols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.mm-gcols > div > div + div .mm-sub { margin-top: 12px; }
.mm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.mm h3 { font-size: 15px; font-weight: 600; letter-spacing: 0; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mm h3 a { text-decoration: none; } .mm h3 a:hover { text-decoration: underline; }
.mm-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; flex: none; }
.t-mint { background: #E3F4EC; color: #0B7A5A; } .t-blue { background: #E4ECF7; color: #2E4F86; } .t-lilac { background: #ECE8F6; color: #5A4A8C; } .t-sand { background: #F6EFDF; color: #87631E; } .t-grey { background: #EEF1F4; color: #3B4450; } .t-rose { background: #F8E9E6; color: #9A4A3C; }
.mm-lede { font-size: 13.5px; color: var(--muted); margin: -4px 0 8px; }
.mm ul, .mm ol { list-style: none; margin: 0; padding: 0; }
.mm-panel li a, .mm-sheet li a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); padding: 4px 0; line-height: 1.35; }
.mm-panel li a:hover { color: var(--ink); }
.mm li a[aria-current="page"], .ft li a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.mm-lessons .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--ink); flex: none; }
.mm-sub { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #8A93A0; margin: 10px 0 2px; }
.mm-col > .mm-sub:first-of-type { margin-top: 0; }
.mm-more { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.mm-more:hover { text-decoration: underline; }
.mm-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; border: 1px solid transparent; transition: border-color .15s; }
.mm-card b { display: block; font-weight: 600; line-height: 1.3; color: var(--ink); } .mm-card small { display: block; font-size: 13px; color: var(--muted); }
.c-quiz { background: #EEF8F3; border-color: #D3EBDF; } .c-books { background: #FBF6EC; border-color: #EFE3C9; } .c-family { background: #FCF1EF; border-color: #F1D9D4; }
.mm-card:hover { border-color: var(--ink); }
.mm-card .mm-ic { background: #fff; }
.mm-foot { display: flex; justify-content: space-between; gap: 12px; margin: 22px -28px 0; padding: 14px 28px; border-top: 1px solid var(--line); background: #F8FAFB; border-radius: 0 0 16px 16px; font-size: 14px; color: var(--muted); }
.mm-foot a { color: var(--ink); font-weight: 500; text-decoration: none; } .mm-foot a:hover { text-decoration: underline; }
.mm-compare li a { padding: 7px 0; } .mm-compare li:last-child a { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; color: var(--ink); font-weight: 500; }
.mm-menu, .mm-sheet, .mm-quiz-ph { display: none; }
.mm-nav > a.mm-quiz { display: inline-flex; align-items: center; gap: 7px; background: #E3F4EC; color: #0B7A5A; font-weight: 600; border-radius: 999px; padding: 7px 13px; margin-inline: 2px; }
.mm-nav > a.mm-quiz:hover, .mm-nav > a.mm-quiz[data-current] { background: #CFEBDD; color: #075F46; }
.mm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.mm-side { display: flex; flex-direction: column; gap: 12px; }
.mm-calc { left: calc(50% - 360px); width: 720px; top: calc(100% - 6px); padding: 24px 26px 0; }
.mm-calc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.mm-calc-head h3 { margin: 0; } .mm-calc-head .mm-lede { margin: 0; }
.mm-tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 22px; }
.mm-tgrid li a { display: block; padding: 8px 10px; margin-inline: -10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.mm-tgrid li a:hover { background: #F4F6F8; }
.mm-tgrid b { display: block; font-weight: 600; } .mm-tgrid small { display: block; font-size: 13.5px; color: var(--muted); }
.mm-calc .mm-foot { margin-inline: -26px; padding-inline: 26px; margin-top: 16px; }

@media (max-width: 1000px) { .mm-cols { grid-template-columns: 1fr 1.6fr; } .mm-side { grid-column: 1 / -1; flex-direction: row; } .mm-side .mm-card { flex: 1; } .mm-calc { left: 0; } .mm-nav { font-size: 14px; gap: 2px; } }
@media (max-width: 820px) {
  .mm-nav, header.top.mm > .support { display: none; }
  .mm-quiz-ph { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; background: #E3F4EC; color: #0B7A5A; font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 10px; padding: 8px 12px; }
  .mm-quiz-ph svg { width: 17px; height: 17px; }
  .mm-quiz-ph + .mm-menu { margin-left: 0; }
  .mm-menu { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px 8px 12px; cursor: pointer; }
  .mm-menu[aria-expanded="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
  .mm-menu[aria-expanded="true"] + .mm-sheet { display: block; }
  .mm-sheet { position: fixed; z-index: 40; left: 0; right: 0; top: 65px; bottom: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); padding: 16px 16px 40px; border-top: 1px solid var(--line); }
  .mm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .mm-tiles .mm-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; } .mm-tiles .mm-card b { font-size: 14.5px; }
  .mm-sheet details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin-bottom: 8px; }
  .mm-sheet summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 0; font-weight: 600; font-size: 16px; cursor: pointer; }
  .mm-sheet summary::-webkit-details-marker { display: none; }
  .mm-sheet summary small { font-weight: 400; font-size: 13.5px; color: var(--muted); }
  .mm-sheet summary .chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
  .mm-sheet details[open] summary .chev { transform: rotate(180deg); }
  .mm-sheet details > ul, .mm-sheet details > ol { padding-bottom: 8px; }
  .mm-sheet details > .mm-more { margin: 0 0 14px; }
  .mm-sheet li a { padding: 9px 0; font-size: 15.5px; color: var(--ink); border-top: 1px solid #EEF1F4; }
  .mm-sheet .mm-sub { margin: 10px 0 2px; }
  .mm-plain { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
  .mm-plain a { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; font-weight: 500; }
  .mm-ctas { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
  .mm-ctas .button { justify-content: center; }
}

/* Footer with every page */
footer.ft { display: block; border-top: 1px solid var(--line); padding-block: 44px 36px; margin-top: 40px; font-size: 14px; color: var(--muted); }
.ft-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 24px; }
.ft h2 { font-size: 13.5px; line-height: 1.3; font-weight: 600; color: var(--ink); margin: 0 0 10px; letter-spacing: 0; }
.ft h2 a { text-decoration: none; } .ft h2 a:hover { text-decoration: underline; }
.ft ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ft li a { text-decoration: none; color: var(--muted); line-height: 1.35; display: inline-block; }
.ft li a:hover { color: var(--ink); text-decoration: underline; }
.ft li.ft-sub a { padding-left: 12px; font-size: 13px; border-left: 1px solid var(--line); }
.ft-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.ft-bar .brand { font-size: 16px; gap: 8px; color: var(--ink); } .ft-bar .brand img { width: 24px; height: 24px; border-radius: 6px; }
.ft-bar-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ft-bar-links a { color: var(--muted); } .ft-bar-links a:hover { color: var(--ink); }
@media (max-width: 1000px) { .ft-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; } .ft-bar-links { margin-left: 0; } footer.ft { padding-top: 32px; } }
html.mm-lock{overflow:hidden}
header.top.mm::before { content: ""; position: absolute; inset: 0; background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax); z-index: -1; }
header.top.mm { isolation: isolate; }
@media (max-width: 820px) { header.top.mm { gap: 10px; } header.top.mm > .brand, .mm-quiz-ph, .mm-menu { flex: none; } }
@media (max-width: 380px) { .mm-menu span { display: none; } .mm-menu { padding: 8px 10px; } .mm-quiz-ph { padding: 8px 10px; } }
#calculators { scroll-margin-top: 90px; }
.mm-nav .mm-calcbtn { background: #ECE8F6; color: #5A4A8C; font-weight: 600; border-radius: 999px; padding: 7px 13px; }
.mm-nav .mm-calcbtn:hover, .mm-nav .mm-calcbtn[aria-expanded="true"], .mm-nav .mm-calcbtn[data-current] { background: #E0DAF1; color: #4A3B7A; }
