/* Public website pages (Home, Classroom Polls, Chemistry Tools, tool pages). Builds on style.css. */

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* header + main navigation */
.site-top { flex-wrap: wrap; row-gap: 6px; }
.site-top .logo { text-decoration: none; color: inherit; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; margin-left: 12px; }
.site-nav a { padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { background: var(--bg); }
.site-nav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.site-nav a:focus-visible, .site-footer a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (max-width: 640px) {
  .site-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; flex-wrap: nowrap; }
  .site-nav a { flex: none; font-size: 0.9rem; padding: 6px 11px; }
}
/* During a live poll a student's phone shows only the poll: no menu, no footer. */
body:has(#join.hidden) .site-nav, body:has(#join.hidden) .site-footer { display: none; }

.breadcrumb { color: var(--muted); margin: 0 2px 10px; }
.breadcrumb a { text-decoration: none; }

/* home */
.home-grid { display: grid; gap: 20px; align-items: start; padding-top: 28px; padding-bottom: 8px; }
@media (min-width: 860px) { .home-grid { grid-template-columns: 1.15fr 0.85fr; gap: 32px; } }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em; margin: 0 0 6px; }
.home-intro h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.15; margin-bottom: 12px; }
.lead { font-size: 1.08rem; color: var(--muted); margin: 0 0 16px; }
.pillars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pillars li { display: flex; gap: 10px; align-items: flex-start; }
.pillars li > span:first-child { font-size: 1.25rem; line-height: 1.3; }
.join-card h2 { font-size: 1.4rem; }
.home-more { padding-top: 0; }
.instructor-teaser p { margin: 0 0 14px; }
/* Arriving from a QR code: skip the introduction. */
.joining .home-intro, .joining .home-more, .joining .site-footer { display: none; }
.joining .home-grid { grid-template-columns: 1fr; max-width: 460px; }

/* page header block */
.page-head { padding-top: 28px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 8px; }

/* classroom polls page */
.two-up { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .two-up { grid-template-columns: 1fr 1fr; } }
.code-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.code-form input { flex: 1 1 160px; max-width: 220px; font-size: 1.3rem; letter-spacing: 0.15em; text-align: center; }
.feature-list { padding-left: 20px; margin: 0 0 12px; }
.feature-list li { margin-bottom: 6px; }
.steps-flow { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px; margin: 0; }
@media (min-width: 760px) { .steps-flow { grid-template-columns: repeat(4, 1fr); } }
.steps-flow li { counter-increment: s; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.steps-flow li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 800; margin-bottom: 8px; }

/* chemistry tools page */
.tool-cats { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .tool-cats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tool-cats { grid-template-columns: 1fr 1fr 1fr; } }
.tool-cat { margin-bottom: 0; scroll-margin-top: 16px; }
.tool-cat h2 { font-size: 1.15rem; display: flex; gap: 8px; align-items: center; }
.tool-items { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.tool-items a, .tool-items .soon { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); text-decoration: none; color: var(--text); font-weight: 600; }
.tool-items a:hover { border-color: var(--brand); }
.tool-items a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.tool-items .soon { color: var(--muted); font-weight: 500; }
.badge { font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge.live { background: #dff3e6; color: #11592f; }
.badge.soon-b { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { .badge.live { background: #173a26; color: #a6f0c4; } }
.four-parts { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 12px 0 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .four-parts { grid-template-columns: repeat(4, 1fr); } }
.four-parts li { padding: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.four-parts strong { display: block; }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 24px; }
.site-footer .wrap { padding-top: 18px; padding-bottom: 24px; }
.site-footer p { margin: 0 0 6px; }
.site-footer strong span { color: var(--brand); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tool-items .tool-meta { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); margin-top: 2px; }

/* Plain Ctrl+P (not the Print buttons, which use #printSheet): print the page's content only,
   black on white even in dark mode, without the site header, menu and footer. */
@media print {
  body:not(.printing) .skip-link,
  body:not(.printing) .site-top,
  body:not(.printing) .site-footer { display: none !important; }
  body:not(.printing), body:not(.printing) * { color: #000 !important; background: transparent !important; box-shadow: none !important; }
  body:not(.printing) .card { border: 1px solid #bbb !important; }
  body:not(.printing) a { text-decoration: underline; }
  body:not(.printing) h1, body:not(.printing) h2, body:not(.printing) h3, body:not(.printing) h4 { break-after: avoid; }
  body:not(.printing) li, body:not(.printing) tr { break-inside: avoid; }
}

/* Short guides (/guides/) */
.guide-article { line-height: 1.65; }
.guide-article h1 { margin-top: 0; }
.guide-article h2 { font-size: 1.3rem; margin: 1.6em 0 .4em; }
.guide-article h3 { font-size: 1.05rem; margin: 1.1em 0 .2em; }
.guide-article p, .guide-article li { max-width: 72ch; }
.guide-article li { margin: .35em 0; }
.guide-article .byline { color: var(--muted); margin-top: -4px; }
.guide-article .answer { font-size: 1.08rem; padding: 12px 14px; border-left: 4px solid var(--brand); background: var(--bg); border-radius: 8px; }
.guide-article .faq p { margin-top: 0; }
.guide-article .try-it a { font-weight: 600; }
.guide-table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .95rem; }
.guide-table th, .guide-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.guide-table thead th { border-bottom: 2px solid var(--border); }
.guide-article .table-wrap { overflow-x: auto; }
.guide-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.guide-list a { font-weight: 600; }
.guide-list span { display: block; margin-top: 2px; }
