/* "What the SATs test" (sats.html) and "What the GCSE covers" (gcse.html). Built by server/mac/build-syllabus.js.
   Uses the tokens in site.css (WORLD.md): white cards with a 4px subject-coloured top edge, navy line icons, pillar colours. */

.syl { scroll-margin-top: 16px; }
.path-sec + .syl, .syl.sec-tight { padding-top: 40px; }
.syl .facts { margin-top: 36px; }
.syl-head { max-width: 760px; }
.syl-head h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.1; }
.syl-head > p { margin-top: 12px; color: var(--ink-2); font-size: 1.05rem; max-width: 64ch; }
.syl-pl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: .92rem; }
.syl-pl > span:first-child { margin-right: 4px; }

/* tabs */
.syl-tabs { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; margin-top: 36px; padding: 6px; background: #e8e5dd; border-radius: 14px; scroll-margin-top: 16px; }
.syl-tabs[hidden] { display: none; }
.syl-tab { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); text-align: left; cursor: pointer;
  transition: background-color .2s, box-shadow .2s, color .2s; }
.syl-tab .sdot { margin-top: 0; background: var(--c); }
.syl-tl { display: flex; flex-direction: column; min-width: 0; }
.syl-tl strong { font: 700 1.02rem/1.25 var(--display); color: inherit; }
.syl-tl small { font-size: .8rem; line-height: 1.3; color: var(--ink-2); }
.syl-tab:hover { background: rgba(255, 255, 255, .55); color: var(--navy); }
.syl-tab[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(20, 40, 72, .06), 0 6px 16px rgba(20, 40, 72, .1); }
.syl-tab[aria-selected="true"] strong { color: var(--navy); }
.syl-tab:focus-visible { outline-offset: -2px; }

/* panels: all visible without JS (each with its own heading); one at a time once the tabs are on */
.syl-panel { margin-top: 36px; scroll-margin-top: 16px; }
.syl-panel[hidden] { display: none; }
.syl-panel + .syl-panel { margin-top: 72px; }
.syl.is-tabs .syl-panel { margin-top: 28px; }
.syl.is-tabs .syl-ph { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.syl-ph { font-size: 1.6rem; line-height: 1.15; margin-bottom: 18px; }
.syl-panel:focus-visible { outline-offset: 8px; }

/* the papers strip */
.syl-papers { display: flex; flex-wrap: wrap; gap: 10px; }
.syl-papers li { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; background: #fff; border: 1px solid var(--edge); border-radius: 12px; }
.syl-papers .icon { color: var(--c, var(--navy)); width: 20px; height: 20px; }
.syl-papers span { display: flex; flex-direction: column; }
.syl-papers strong { font-weight: 600; font-size: .92rem; color: var(--ink); line-height: 1.3; }
.syl-papers small { font-size: .84rem; color: var(--muted); line-height: 1.35; }

/* area cards */
.syl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 22px; align-items: start; }
.syl-card { display: flex; flex-direction: column; min-width: 0; padding: 20px 20px 14px; background: #fff; border: 1px solid var(--edge); border-top: 4px solid var(--c, var(--navy)); border-radius: 14px; box-shadow: var(--shadow-card); }
.syl-card.is-extra { background: #fbfaf7; border-top-color: #cfd6e2; box-shadow: none; border-style: dashed; border-top-style: solid; }
.syl-top { display: flex; align-items: flex-start; gap: 12px; }
.syl-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--c, var(--navy)); background: #eef1f6; background: color-mix(in srgb, var(--c, #1f3a68) 10%, #fff); }
.syl-card.is-extra .syl-ic { color: var(--ink-2); background: #eef0f4; }
.syl-top h4 { font-size: 1.08rem; line-height: 1.25; padding-top: 2px; color: var(--navy); overflow-wrap: anywhere; }
.syl-code { display: inline-block; margin-right: 2px; padding: 1px 7px; border-radius: 6px; background: #e9eef7; color: var(--navy); font: 700 .78rem/1.5 var(--body); vertical-align: 2px; }
.syl-what { margin-top: 10px; color: var(--ink-2); font-size: .93rem; line-height: 1.5; }
.syl-nums { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.syl-n { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 500; line-height: 1.35; }
.syl-n b { font-weight: 700; font-size: .9rem; }
.syl-n-l { color: #1f3a68; background: #e9eef7; }
.syl-n-t { color: #8a5a1f; background: #f6eedf; }
.syl-n-h { color: #46546a; background: #eef0f4; }
.syl-note { margin-top: 12px; font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.syl-note strong { color: var(--ink); font-weight: 600; }

/* topic links into the app */
.syl-links { margin-top: 10px; border-top: 1px solid #efede7; }
.syl-links li + li { border-top: 1px solid #f3f1ec; }
.syl-links a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t a" "m a"; align-items: center; column-gap: 10px; min-height: 48px; padding: 7px 2px; text-decoration: none; color: var(--navy); }
.syl-tt { grid-area: t; font-weight: 600; font-size: .93rem; line-height: 1.3; overflow-wrap: anywhere; }
.syl-links small { grid-area: m; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.syl-links .icon { grid-area: a; width: 18px; height: 18px; color: var(--navy); opacity: .55; transition: transform .3s var(--ease), opacity .2s; }
.syl-links a:hover .syl-tt { text-decoration: underline; text-decoration-color: rgba(31, 58, 104, .4); }
.syl-links a:hover .icon { opacity: 1; transform: translateX(3px); }
.syl-more { border-top: 1px solid #f3f1ec; }
.syl-more summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 2px; cursor: pointer; list-style: none; font-weight: 600; font-size: .88rem; color: var(--navy); }
.syl-more summary::-webkit-details-marker { display: none; }
.syl-more summary::before { content: ''; width: 7px; height: 7px; margin: 0 4px 2px 3px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease); }
.syl-more[open] summary::before { transform: rotate(225deg); margin-bottom: -3px; }
.syl-more .syl-links { margin-top: 0; }

.syl-group { margin-top: 30px; font-size: 1.15rem; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.syl-group::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.syl-group + .syl-grid { margin-top: 14px; }
.syl-papers + .syl-group { margin-top: 26px; }
.syl-foot { margin-top: 18px; font-size: .9rem; color: var(--ink-2); max-width: 80ch; }
.syl-src { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--edge); font-size: .85rem; color: var(--muted); max-width: 90ch; }

@media (max-width: 1080px) { .syl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .syl-tabs { margin-top: 28px; }
  .syl-tab { padding: 10px 12px; gap: 10px; }
}
@media (max-width: 760px) {
  .syl-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .syl-tabs.n3 > .syl-tab:last-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .syl-grid { grid-template-columns: 1fr; }
  .syl-papers li { flex: 1 1 auto; }
  .syl-tl small { display: none; }
  .syl-tab { min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .syl-tab, .syl-links .icon, .syl-more summary::before { transition: none; } }
