/* /toefl/magoosh-alternative. Follows the site theme (html[data-theme], .dark-mode). */
.tma-page {
    --tma-bg: #f7f5f0;
    --tma-card: #ffffff;
    --tma-ink: #1f2620;
    --tma-muted: #56625a;
    --tma-line: #dde4dc;
    --tma-accent: #2f5d45;
    --tma-accent-ink: #ffffff;
    --tma-soft: #e9f1ea;
    background: var(--tma-bg);
    color: var(--tma-ink);
    line-height: 1.7;
    overflow-wrap: anywhere;
}
html[data-theme=dark] .tma-page,
html.dark-mode .tma-page,
body.dark-mode .tma-page {
    --tma-bg: #151b17;
    --tma-card: #1d2520;
    --tma-ink: #edf2ed;
    --tma-muted: #b5c3b8;
    --tma-line: #35443a;
    --tma-accent: #9fd0ae;
    --tma-accent-ink: #13201a;
    --tma-soft: #22332a;
}
.tma-shell { margin: 0 auto; width: min(1120px, calc(100% - 32px)); }
.tma-page a { color: var(--tma-accent); text-underline-offset: 3px; }
.tma-page a:focus-visible, .tma-page summary:focus-visible, .tma-table-wrap:focus-visible {
    outline: 3px solid var(--tma-accent); outline-offset: 3px;
}

.tma-hero { border-bottom: 1px solid var(--tma-line); padding: 48px 0 40px; }
.tma-breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; font-size: 13px; color: var(--tma-muted); margin-bottom: 18px; }
.tma-breadcrumbs a { text-decoration: none; }
.tma-eyebrow, .tma-kicker, .tma-step-label {
    color: var(--tma-accent); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
}
.tma-hero h1 {
    font-size: clamp(34px, 5vw, 56px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700;
    margin: 12px 0 18px; max-width: 18ch;
}
.tma-lede { font-size: 1.15rem; max-width: 70ch; margin: 0; }
.tma-deck { display: block; font-weight: 650; margin-bottom: 6px; }
.tma-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 26px 0 18px; }
.tma-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; text-decoration: none; }
.tma-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.tma-page .tma-btn-primary {
    background: var(--tma-accent); color: var(--tma-accent-ink); border-radius: 10px; padding: 12px 18px;
}
.tma-page .tma-btn-primary:hover { filter: brightness(1.08); }
.tma-text-link { text-decoration: underline; }
.tma-byline { color: var(--tma-muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

.tma-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 48px; padding: 40px 0 24px; }
.tma-content { min-width: 0; }
.tma-toc { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.tma-toc strong { margin-bottom: 4px; }
.tma-toc a { text-decoration: none; color: var(--tma-muted); }
.tma-toc a:hover { color: var(--tma-accent); }

.tma-section { padding: 8px 0 36px; scroll-margin-top: 90px; }
.tma-section + .tma-section, .toefl-product-demo + .tma-section { border-top: 1px solid var(--tma-line); padding-top: 32px; }
.tma-section h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.25; letter-spacing: -.015em; font-weight: 650; margin: 8px 0 14px; }
.tma-section h3 { font-size: 1.08rem; line-height: 1.4; font-weight: 600; margin: 0; }
.tma-content :is(p, li, .tma-step, .tma-cta-actions) a:not(.tma-btn) { text-decoration: underline; text-decoration-thickness: 1px; }
.tma-section p { margin: 10px 0; }

.tma-cta {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 28px;
    background: var(--tma-soft); border: 1px solid var(--tma-line); border-radius: 14px; padding: 20px 22px; margin: 24px 0 4px;
}
.tma-cta > div:first-child { flex: 1 1 320px; }
.tma-cta strong { font-size: 1.1rem; }
.tma-cta p { margin: 6px 0 0; color: var(--tma-muted); }
.tma-cta-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tma-cta-link { font-size: .92rem; }

.tma-reasons { list-style: decimal; padding-left: 1.3rem; margin: 0; display: grid; gap: 16px; }
.tma-reasons li { padding-left: 4px; }
.tma-reasons strong { display: block; }
.tma-on-prepex { display: block; margin-top: 6px; padding: 10px 14px; background: var(--tma-card); border-left: 3px solid var(--tma-accent); border-radius: 0 8px 8px 0; }

.tma-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.tma-step { background: var(--tma-card); border: 1px solid var(--tma-line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.tma-step p { margin: 0; flex: 1; color: var(--tma-muted); }
.tma-step-lead { border-color: var(--tma-accent); box-shadow: inset 0 3px 0 var(--tma-accent); }

.tma-page .toefl-product-demo { margin: 8px 0 36px; }

.tma-table-wrap { overflow-x: auto; border: 1px solid var(--tma-line); border-radius: 12px; background: var(--tma-card); margin-top: 16px; }
.tma-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.tma-table caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: .85rem; color: var(--tma-muted); }
.tma-table th, .tma-table td { padding: 12px 14px; border-bottom: 1px solid var(--tma-line); text-align: left; vertical-align: top; }
.tma-table thead th { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tma-muted); }
.tma-table thead th:nth-child(2), .tma-table td:nth-child(2) { background: var(--tma-soft); }
.tma-table tbody th { width: 26%; font-weight: 650; }
.tma-note { font-size: .95rem; color: var(--tma-muted); }

.tma-faq details { border: 1px solid var(--tma-line); border-radius: 12px; background: var(--tma-card); padding: 4px 18px; margin: 10px 0; }
.tma-faq summary { cursor: pointer; list-style: none; padding: 12px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tma-faq summary::-webkit-details-marker { display: none; }
.tma-faq summary h3 { display: block; }
.tma-faq summary::after { content: '+' / ''; flex: none; color: var(--tma-accent); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.tma-faq details[open] summary::after { content: '–' / ''; }
.tma-answer { margin-top: 0; }
.tma-faq-link { margin-top: 0; padding-bottom: 8px; }

.tma-sources { padding-left: 1.2rem; list-style: disc; }
.tma-legal { font-size: .85rem; color: var(--tma-muted); }

.tma-related { border-top: 1px solid var(--tma-line); padding: 32px 0 56px; }
.tma-related h2 { font-size: 1.4rem; font-weight: 600; margin: 0 0 16px; }
.tma-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tma-page .tma-related-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--tma-ink); background: var(--tma-card); border: 1px solid var(--tma-line); border-radius: 12px; padding: 16px; }
.tma-related-card span { color: var(--tma-muted); font-size: .92rem; }
.tma-page .tma-related-card:hover { border-color: var(--tma-accent); }

@media (max-width: 1100px) {
    .tma-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .tma-toc { display: none; }
}
@media (max-width: 760px) {
    .tma-steps, .tma-related-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .tma-hero { padding: 28px 0 28px; }
    .tma-lede { font-size: 1.05rem; }
    .tma-byline-sep { display: none; }
    .tma-byline > span:last-child { flex-basis: 100%; }
    .tma-table caption { display: block; caption-side: top; padding: 12px 14px 0; }
    .tma-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .tma-table, .tma-table tbody, .tma-table tr, .tma-table th, .tma-table td { display: block; width: 100%; box-sizing: border-box; }
    .tma-table tr { border-bottom: 1px solid var(--tma-line); padding: 6px 0; }
    .tma-table tbody th { width: 100%; border: 0; padding-bottom: 4px; }
    .tma-table td { border: 0; padding-top: 4px; }
    .tma-table td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tma-muted); }
    .tma-table td:nth-child(2) { background: transparent; }
}
@media print {
    .tma-toc, .tma-actions, .tma-cta, .tma-related { display: none !important; }
}
