/* Shared look for nigeria.countingtocalculus.org: navy masthead, cream page, gold and orange accents. */
:root {
  --bg: #F7F4EC; --panel: #FFFFFF; --ink: #0B2470; --ink-2: #44507A; --line: #E2DCCB;
  --gold: #F5B70A; --orange: #E8762B; --navy: #0B2470; --on-navy: #FFFFFF;
  --btn: #0B2470; --btn-ink: #FFFFFF;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0E1430; --panel: #161E44; --ink: #EEF1FA; --ink-2: #B4BDDA; --line: #2A3462;
  --navy: #0A1238; --btn: #F5B70A; --btn-ink: #0B2470; color-scheme: dark } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.5; margin: 0; }
a { color: inherit; }
.wrap { max-width: 1000px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mast { background: var(--navy); color: var(--on-navy); padding-block: 2.6rem 2.4rem; }
.kick { color: var(--gold); font-weight: 800; letter-spacing: .2em; font-size: .78rem; text-transform: uppercase; }
h1 { font-family: var(--display); font-weight: 900; font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.05; margin: .5rem 0 .8rem; text-wrap: balance; }
.lede { max-width: 62ch; font-size: 1.08rem; opacity: .92; margin: 0; }
main { padding-block: 2.2rem 3rem; display: flex; flex-direction: column; gap: 2.6rem; }
h2 { font-family: var(--display); font-weight: 900; font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0 0 .4rem; text-wrap: balance; }
.sub { color: var(--ink-2); margin: 0 0 1.2rem; max-width: 68ch; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.tile { display: flex; flex-direction: column; gap: .45rem; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-top: 6px solid var(--orange); border-radius: 14px; padding: 1.2rem; min-width: 0; }
.tile.gold { border-top-color: var(--gold); }
.tile.navy { border-top-color: var(--navy); }
.tile h3 { font-family: var(--display); font-weight: 900; font-size: 1.35rem; margin: 0; }
.tile p { margin: 0; color: var(--ink-2); }
.tile .go { margin-top: auto; font-weight: 800; }
.tile:hover { box-shadow: 0 6px 20px rgba(11,36,112,.12); }
.tile:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tw { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
th { background: #0B2470; color: #fff; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.ex td { background: rgba(245,183,10,.15); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; counter-reset: s; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 2.8rem .9rem .9rem; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: .9rem; top: .8rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--gold); color: #0B2470; font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.steps b { display: block; }
.form { display: grid; gap: .8rem; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.form label { display: grid; gap: .25rem; font-weight: 600; font-size: .92rem; }
.form input, .form textarea, .form select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; width: 100%; }
.form textarea { min-height: 5rem; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-weight: 500; }
.checks label { display: inline-flex; gap: .35rem; align-items: center; font-weight: 500; }
.checks input { width: auto; }
.btn { font: inherit; font-weight: 800; border: 0; border-radius: 10px; padding: .85rem 1.2rem; background: var(--btn); color: var(--btn-ink); cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn.alt { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.hint { color: var(--ink-2); font-size: .9rem; margin: 0; }
.sent { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 10px; padding: 1rem; display: grid; gap: .6rem; }
.sent pre { white-space: pre-wrap; word-break: break-word; background: var(--bg); border-radius: 8px; padding: .7rem; margin: 0; font-size: .84rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.contact { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 12px; padding: 1.1rem 1.2rem; }
.contact p { margin: .15rem 0; }
footer { background: var(--gold); color: #0B2470; text-align: center; font-weight: 800; letter-spacing: .06em; padding: 1.1rem; font-size: .85rem; }

.books { margin: 1.4rem 0 1.6rem; }
.books h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 1.35rem; margin: 0 0 .3rem; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.bk { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; min-width: 0; }
.bk-pair { position: relative; aspect-ratio: 4 / 4.3; }
.bk-pair svg { position: absolute; width: 74%; height: auto; border-radius: 4px; box-shadow: 0 4px 12px rgba(11,36,112,.22); }
.bk-back { right: 0; top: 0; }
.bk-front { left: 0; bottom: 0; }
.bk figcaption { display: grid; gap: .1rem; margin-top: .6rem; font-size: .86rem; color: var(--ink-2); }
.bk figcaption b { color: var(--ink); font-size: 1rem; }
.bk-ex { color: #B98700; font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
