/* Public product page. Uses the tokens and fonts of theme.css. */
body.public { background: var(--paper); font-size: 16px; }
.public h1, .public h2, .public h3 { font-family: var(--display); }

/* ---- top bar ---- */
.pub-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem; padding: .7rem var(--gutter); background: rgba(243, 245, 248, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.pub-brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.pub-brand:hover { color: var(--ink); text-decoration: none; }
.pub-brand .brand-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pub-brand .bmark { width: 25px; height: 25px; }
.pub-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.pub-nav a { color: var(--ink-2); font-weight: 600; text-decoration: none; font-size: .95rem; }
.pub-nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 3px; }
@media (max-width: 860px) { .pub-nav { display: none; } .pub-signin { margin-left: auto; } }

/* ---- hero: ruled exercise-book paper with a margin ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--gutter) clamp(2.5rem, 5vw, 4.5rem) calc(var(--gutter) + 28px); position: relative;
  background-image: linear-gradient(to bottom, transparent 31px, rgba(43, 61, 160, .07) 31px, rgba(43, 61, 160, .07) 32px); background-size: 100% 32px; }
.hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--gutter); width: 2px; background: var(--margin); opacity: .45; }
.hero h1 { font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; max-width: 14ch; margin-bottom: 1.25rem; }
.hero-sub { font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); color: var(--ink-2); max-width: 56ch; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 2rem; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; color: var(--ink-2); }
.hero-facts strong { font-family: var(--display); color: var(--ink); }
@media (max-width: 991.98px) { .hero { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .hero { padding-left: calc(var(--gutter) + 14px); } .hero::before { left: calc(var(--gutter) - 4px); } .hero-cta .btn { flex: 1 1 100%; } }

/* ---- the live demo: a slice of the student exam screen ---- */
.demo { margin: 0; }
.demo-screen { background: var(--surface); border: 1px solid #C9D0DD; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(21, 32, 74, .45), 0 0 0 6px rgba(255, 255, 255, .7); }
.demo-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--ink); color: #fff; padding: .7rem 1rem; }
.demo-title { font-weight: 600; font-size: .9rem; }
.demo-timer { font-family: var(--display); font-weight: 800; background: #fff; color: var(--ink); border-radius: 8px; padding: .15rem .6rem; font-variant-numeric: tabular-nums; }
.demo-body { display: grid; grid-template-columns: minmax(0, 1fr) 150px; }
.demo-q { padding: 1.1rem 1.2rem 1rem; border-right: 1px solid var(--rule); }
.demo-qno { font-family: var(--display); font-weight: 700; margin-bottom: .4rem; }
.demo-text { font-size: 1.02rem; line-height: 1.55; min-height: 4.8em; }
.demo-opts { display: grid; gap: .45rem; }
.demo-opts button { display: flex; align-items: center; gap: .7rem; text-align: left; width: 100%; padding: .55rem .75rem; border: 1px solid var(--rule); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; }
.demo-opts button:hover { border-color: var(--ink); }
.demo-opts button span { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #9AA2BB; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; flex-shrink: 0; }
.demo-opts button[aria-checked="true"] { border-color: var(--ink); background: var(--tint); }
.demo-opts button[aria-checked="true"] span { background: var(--ink); border-color: var(--ink); color: #fff; }
.demo-opts.reveal button.right { border-color: var(--ok); background: var(--ok-50); }
.demo-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .9rem; }
.demo-pal { list-style: none; margin: 0; padding: 1rem .8rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; align-content: start; background: #FAFBFC; }
.demo-pal li { height: 32px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; border-radius: 6px; border: 1px solid #C9CFDB; background: #EEF0F4; color: var(--ink-2); }
.demo-pal li.na { background: var(--bad); border-color: var(--bad); color: #fff; clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); }
.demo-pal li.ans { background: var(--ok); border-color: var(--ok); color: #fff; clip-path: polygon(50% 0, 100% 28%, 100% 100%, 0 100%, 0 28%); }
.demo-pal li.rev { background: var(--review); border-color: var(--review); color: #fff; border-radius: 50%; width: 32px; justify-self: center; }
.demo-pal li.now { outline: 3px solid var(--marigold); outline-offset: 1px; }
.demo figcaption { color: var(--muted); font-size: .9rem; margin-top: .85rem; }
@media (max-width: 575.98px) { .demo-body { grid-template-columns: 1fr; } .demo-q { border-right: 0; border-bottom: 1px solid var(--rule); } .demo-pal { grid-template-columns: repeat(6, 1fr); } }

/* ---- bands ---- */
.band { padding: clamp(2.75rem, 6vw, 5rem) var(--gutter) clamp(2.75rem, 6vw, 5rem) calc(var(--gutter) + 28px); border-top: 1px solid var(--rule); }
.band-white { background: var(--surface); }
.band-head { max-width: 62ch; margin-bottom: 2rem; }
.band-head h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: .75rem; }
.band-head p { color: var(--ink-2); font-size: 1.05rem; }
@media (max-width: 575.98px) { .band { padding-left: var(--gutter); } }

.pattern-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 860px) { .pattern-grid { grid-template-columns: 1fr; } }
.pattern-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 1.4rem 1.5rem; }
.pattern-card header h3 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.pattern-card header p { color: var(--muted); margin: .1rem 0 1rem; }
.timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 1rem 0 .75rem; font-size: .82rem; font-weight: 700; }
.timeline .seg { background: var(--ink); color: #fff; padding: .55rem .7rem; border-radius: 8px 0 0 8px; }
.timeline .seg-2 { background: var(--tint); color: var(--ink); border-radius: 0 8px 8px 0; border: 1px solid var(--rule); }
.pattern-note { color: var(--ink-2); font-size: .93rem; margin: 0; }
.source-note { color: var(--muted); font-size: .88rem; max-width: 90ch; margin-top: 1.5rem; }

.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.roles article { padding: 1.4rem 1.5rem 0 0; }
.roles article + article { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.roles h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: .8rem; }
.roles ul { padding-left: 1.1rem; margin: 0; color: var(--ink-2); }
.roles li { margin-bottom: .55rem; }
.roles li::marker { color: var(--marigold); }
@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } .roles article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); margin-top: 1.2rem; } }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.steps li { counter-increment: s; position: relative; padding-top: 3.2rem; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; color: var(--ink); background: var(--surface); }
.steps li:first-child::before { background: var(--marigold); border-color: var(--marigold); }
.steps li::after { content: ""; position: absolute; top: 1.15rem; left: 2.6rem; right: -1rem; height: 2px; background: var(--rule); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.08rem; font-weight: 700; }
.steps p { color: var(--ink-2); font-size: .97rem; }
@media (max-width: 991.98px) { .steps { grid-template-columns: 1fr 1fr; } .steps li::after { display: none; } }
@media (max-width: 575.98px) { .steps { grid-template-columns: 1fr; } }

.band-ink { background: var(--ink); color: #fff; border-top: 0; }
.band-ink h2 { color: #fff; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; }
.enq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 991.98px) { .enq-wrap { grid-template-columns: 1fr; } }
.enq-copy p { color: rgba(255, 255, 255, .82); font-size: 1.08rem; }
.contact { margin-top: 1.5rem; display: grid; gap: .8rem; }
.contact dt { color: rgba(255, 255, 255, .65); font-weight: 600; font-size: .85rem; }
.contact dd { margin: 0; font-size: 1.1rem; font-weight: 700; }
.contact a { color: #fff; }
.enq-form { background: var(--surface); color: var(--ink); border-radius: 14px; padding: clamp(1.1rem, 3vw, 1.8rem); }
.enq-form .opt { color: var(--muted); font-weight: 400; font-size: .82rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pub-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding: 1.75rem var(--gutter); border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; }
.pub-foot > div { display: flex; flex-direction: column; gap: .25rem; max-width: 70ch; }
.pub-foot strong { color: var(--ink); font-family: var(--display); }
.pub-foot nav { display: flex; gap: 1.25rem; align-items: center; }
.pub-foot a { color: var(--ink-2); }
