* { margin: 0; padding: 0; box-sizing: border-box; }

/* Reserve the scrollbar gutter up front so the page width doesn't shrink
   after products render — that shift breaks the measured tab-row layout. */
html { scrollbar-gutter: stable; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center;
  background: #e8f4fc;
  color: #1a365d;
  text-align: center;
  /* Site-wide 3/4in gutter down both edges. CSS treats 1in as 96px, so this is
     72px a side on every page: home, product pages and blog alike. Narrowed to
     a thumb's width under 768px, where 144px of gutter would eat the content. */
  padding-left: 0.75in;
  padding-right: 0.75in;
}
@media (max-width: 768px) {
  body { padding-left: 12px; padding-right: 12px; }
}

a { color: inherit; }

.banner {
  width: 100%;
  max-width: 1000px;
  height: auto;
  display: block;
}

.content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 2rem 0.45rem;
  margin-top: 0;
  width: 100%;
  max-width: 1000px;
  position: relative;
}

.view-toggle {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-self: start;
}
.view-toggle button {
  background: transparent;
  border: 1px solid transparent;
  color: #7a9cbf;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.view-toggle button:hover {
  background: #dceaf5;
  color: #1a365d;
}
.view-toggle button.active {
  background: #1a365d;
  color: #fff;
  border-color: #1a365d;
}

.icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #b8d9f0;
  background: #fff;
  flex-shrink: 0;
  display: block;
}

.brought-by {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a365d;
}
.brought-text { white-space: nowrap; }
.brought-name { white-space: nowrap; font-weight: 700; }
@media (max-width: 768px) {
  .brought-by { gap: 0.5rem; font-size: 0.78rem; }
  .brought-text, .brought-name { white-space: normal; }
}

.btn {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: #1a365d;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s;
  white-space: nowrap;
}
.btn:hover {
  background: #2b4c7e;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26,54,93,0.3);
}

.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  background: #1a365d;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s;
  margin: 0.5rem 0;
}
.btn-primary:hover {
  background: #2b4c7e;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26,54,93,0.3);
}

/* ---- SEARCH ---- */
.search-wrapper {
  width: 100%;
  max-width: 1000px;
  padding: 0.3rem 1rem 0.6rem;
}

.search-input {
  width: 100%;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1a365d;
  background: #fff;
  border: 2px solid #b8d9f0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: #7a9cbf; }
.search-input:focus {
  border-color: #1a365d;
  box-shadow: 0 0 0 3px rgba(26,54,93,0.12);
}

.no-results {
  display: none;
  font-style: italic;
  color: #7a9cbf;
  padding: 2rem 0;
}

/* ---- HOME LAYOUT: fixed sidebar + independently scrolling main pane ----
   Scoped to body.home so the edge-rendered /p/ product pages keep the
   original single-column page layout. */
body.home {
  flex-direction: column;
  align-items: stretch;
}

/* Header (banner + toggle/store row). It scrolls up and away with the
   page; only the sidebar below it stays pinned. */
.site-header .banner { max-width: 800px; }

.site-header {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Below the header: sticky sidebar on the left, cards on the right.
   The page scroll carries the header away; the sidebar then pins to the
   top of the screen and scrolls only inside itself. */
.body-row {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-start;
  border-top: 2px solid #b8d9f0;
}

.sidebar {
  flex: 0 0 240px;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  background: #f2f9ff;
  border-right: 2px solid #b8d9f0;
  text-align: left;
  padding: 0.6rem 0 1rem;
}

.sidebar-title {
  padding: 0.5rem 1rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a9cbf;
}

.cat-list { display: flex; flex-direction: column; }

.cat-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.28rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3a5a7c;
  text-decoration: none;
  /* Name and count stay on ONE line always; long names ellipsize. */
  white-space: nowrap;
}
.cat-item .cat-name { overflow: hidden; text-overflow: ellipsis; }
.cat-item .cat-count { color: #7a9cbf; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }
.cat-item:hover { background: rgba(184,217,240,0.35); color: #1a365d; }
.cat-item.active { background: #b8d9f0; color: #1a365d; }
.cat-item.active .cat-count { color: #1a365d; }

.main-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-cat { display: none; width: 100%; max-width: 1000px; padding: 0.4rem 1rem 0; }
.mobile-cat select {
  width: 100%;
  padding: 0.5rem 0.7rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1a365d;
  background: #fff;
  border: 2px solid #b8d9f0;
  border-radius: 8px;
}

/* ---- TAB CONTENT ---- */
.tab-content {
  width: 100%;
  max-width: 1000px;
  min-height: 200px;
  padding: 1.5rem 1rem;
  overflow: hidden;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a365d;
  margin-bottom: 1rem;
}

/* ---- PRODUCT CARDS ---- */
.products {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  text-align: left;
  width: 100%;
}

.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0.5rem;
  overflow: hidden;
}
.product-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.product-card img {
  width: 65px;
  height: 65px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: 0.5rem;
  border-radius: 6px;
}

/* ---- VIEW: GRID (default — small icons, 3 per row) ---- */
body[data-view="grid"] .product-card {
  width: calc(33.333% - 0.54rem);
  height: 100px;
}

/* ---- VIEW: LIST (one item per row, full width) ---- */
body[data-view="list"] .products {
  flex-direction: column;
  gap: 0.5rem;
}
body[data-view="list"] .product-card {
  width: 100%;
  height: 110px;
  padding: 0.6rem 0.8rem;
}
body[data-view="list"] .product-card img {
  width: 80px;
  height: 80px;
  margin-right: 0.9rem;
}
body[data-view="list"] .product-card .title {
  font-size: 0.95rem;
  -webkit-line-clamp: 2;
}
body[data-view="list"] .product-card .meta { font-size: 0.75rem; }
body[data-view="list"] .product-card .price { font-size: 1rem; }

/* ---- VIEW: LARGE (image-on-top tile, dynamically fits screen) ---- */
body[data-view="large"] .products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
}
body[data-view="large"] .product-card {
  width: 100%;
  height: auto;
  flex-direction: column;
  align-items: stretch;
  padding: 0.7rem;
  text-align: center;
}
body[data-view="large"] .product-card img {
  width: 100%;
  height: 150px;
  margin: 0 0 0.6rem;
  border-radius: 8px;
}
body[data-view="large"] .product-card .info {
  width: 100%;
  text-align: left;
}
body[data-view="large"] .product-card .title {
  font-size: 0.82rem;
  -webkit-line-clamp: 3;
  line-height: 1.3;
  min-height: 3.2em;
}
body[data-view="large"] .product-card .meta { font-size: 0.7rem; }
body[data-view="large"] .product-card .price { font-size: 0.95rem; }

.product-card .info {
  flex: 1;
  overflow: hidden;
}

.product-card .title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1a365d;
  margin-bottom: 0.2rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .meta {
  font-size: 0.65rem;
  color: #7a9cbf;
  margin-bottom: 0.1rem;
}

.product-card .price {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a365d;
}

.product-card .price.free {
  color: #28a745;
}

/* ---- BREADCRUMBS ---- */
.breadcrumbs {
  width: 100%;
  max-width: 1000px;
  padding: 0.6rem 1rem 0;
  font-size: 0.8rem;
  color: #7a9cbf;
  text-align: left;
}
.breadcrumbs a {
  color: #3a5a7c;
  text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }

/* ---- PRODUCT DETAIL ---- */
.product-detail {
  width: 100%;
  max-width: 1000px;
  padding: 1rem 1rem 2rem;
  text-align: left;
}

.product-hero {
  display: flex;
  gap: 1.5rem;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  align-items: flex-start;
}

.hero-img {
  width: 260px;
  max-width: 40%;
  max-height: 260px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f5fafe;
  align-self: flex-start;
}

.hero-info { flex: 1; }

.hero-info h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a365d;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.hero-info .meta {
  font-size: 0.9rem;
  color: #7a9cbf;
  margin-bottom: 0.5rem;
}

.hero-info .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a365d;
  margin-bottom: 1rem;
}
.hero-info .price.free { color: #28a745; }

.categories-tags {
  font-size: 0.85rem;
  color: #3a5a7c;
  margin-top: 1rem;
}
.categories-tags a {
  color: #1a365d;
  font-weight: 600;
  text-decoration: none;
  padding: 0.1rem 0.4rem;
  background: #dceaf5;
  border-radius: 4px;
  margin: 0 0.1rem;
  display: inline-block;
}
.categories-tags a:hover { background: #b8d9f0; }

/* ---- DESCRIPTION (inside hero, right of image) ---- */
.related h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a365d;
  margin-bottom: 1rem;
}

.hero-description {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #dceaf5;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #2b4c6a;
}
.hero-description p {
  margin-bottom: 0.75rem;
}
.hero-description p:last-child { margin-bottom: 0; }

.read-more-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a365d;
  background: #dceaf5;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.read-more-link:hover {
  background: #b8d9f0;
  transform: translateY(-1px);
}

/* ---- RELATED ---- */
.related {
  margin-top: 2rem;
}

footer {
  margin-top: auto;
  padding: 1.5rem;
  font-size: 0.8rem; color: #7a9cbf;
}

@media (max-width: 768px) {
  .banner { max-height: none; }
  .content { padding: 0.3rem 1rem; flex-wrap: wrap; }
  .icon { width: 50px; height: 50px; }
  .btn { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
  .view-toggle button { padding: 4px 6px; }
  .view-toggle button svg { width: 16px; height: 16px; }
  .sidebar { display: none; }
  .mobile-cat { display: block; }
  body[data-view="grid"] .product-card { width: 100%; height: 100px; }
  body[data-view="large"] .products { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  body[data-view="large"] .product-card img { height: 110px; }
  .product-card img { width: 45px; height: 45px; }
  .product-card .title { font-size: 0.78rem; }
  .product-card .meta { font-size: 0.65rem; }
  .product-card .price { font-size: 0.85rem; }
  body[data-view="list"] .product-card img { width: 60px; height: 60px; }
  body[data-view="list"] .product-card .title { font-size: 0.85rem; }
  .product-hero { flex-direction: column; align-items: center; text-align: center; }
  .hero-img { width: 80%; max-width: 100%; }
  .hero-info h1 { font-size: 1.25rem; }
}

/* ============================================================
   BLOG  (/blog, /blog/<slug>)
   Left-aligned reading column on the site's existing palette.
   ============================================================ */
body.blog { text-align: left; }
body.blog .banner,
body.blog .content { margin-left: auto; margin-right: auto; }

.blog-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.blog-head {
  padding-top: 1.75rem;
  margin-bottom: 1.75rem;
}
.blog-head h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}
.blog-head p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #4a6f95;
  max-width: 62ch;
}

/* ---- INDEX LIST ---- */
.post-list { display: flex; flex-direction: column; gap: 1rem; }

.post-card {
  display: block;
  background: #fff;
  border: 1px solid #cfe4f4;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.post-card:hover {
  border-color: #7fb4dc;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(26,54,93,0.08);
}
.post-card.is-scheduled { background: #f6fbff; border-style: dashed; }
.post-card-date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a9cbf;
  margin-bottom: 0.35rem;
}
.post-card h2 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.post-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #4a6f95;
  margin-bottom: 0.6rem;
}
.post-card-more { font-size: 0.8rem; font-weight: 700; color: #2b6cb0; }

.queue-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a9cbf;
  margin: 2rem 0 0.75rem;
}
.post-empty { font-size: 0.9rem; color: #4a6f95; }

/* ---- SINGLE POST ---- */
.post-scheduled {
  background: #fff6e0;
  border: 1px solid #e8c877;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #7a5a12;
  margin-bottom: 1.25rem;
}

body.blog .breadcrumbs { justify-content: flex-start; padding-left: 0; }

.post-head { margin-bottom: 1.5rem; }
.post-date {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a9cbf;
  margin-bottom: 0.5rem;
}
.post-head h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.post-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  background: #dceaf5;
  color: #1a365d;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* Byline. Only rendered when a post carries an author, and the portrait only when
   that author has one stored, so whether a face appears on the blog is a data
   decision in GRCC Admin rather than a code change. */
.post-byline { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.9rem; }
.post-face {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  flex: 0 0 auto; background: #dceaf5;
}
.post-face-init {
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #1a365d;
}
.post-by { font-size: 0.85rem; font-weight: 700; color: #1a365d; line-height: 1.35; }
.post-by em { display: block; font-style: normal; font-weight: 500; color: #7a9cbf; font-size: 0.78rem; }
.post-cover {
  width: 100%; height: auto; border-radius: 12px; margin-bottom: 1.25rem; display: block;
}
.post-body { font-size: 1rem; line-height: 1.7; color: #24405f; }
.post-body p { margin-bottom: 1.1rem; }
.post-body h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #cfe4f4;
  color: #1a365d;
}
.post-body ul { margin: 0 0 1.1rem 1.25rem; }
.post-body li { margin-bottom: 0.55rem; }
.post-body strong { color: #1a365d; }

.post-cta {
  background: #fff;
  border: 1px solid #cfe4f4;
  border-left: 4px solid #2b6cb0;
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin: 2rem 0 1.5rem;
}
.post-cta p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.9rem; }
.post-cta p:last-child { margin-bottom: 0; }

.post-links {
  background: #f2f9ff;
  border: 1px solid #cfe4f4;
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.post-links h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7a9cbf;
  margin-bottom: 0.6rem;
}
.post-links ul { margin: 0 0 0 1.1rem; }
.post-links li { margin-bottom: 0.4rem; font-size: 0.9rem; }
.post-links a { color: #2b6cb0; font-weight: 600; }
.post-links a:hover { text-decoration: underline; }

.post-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #cfe4f4;
}
.post-nav a {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2b6cb0;
  text-decoration: none;
  line-height: 1.4;
}
.post-nav a.next { text-align: right; }
.post-nav a span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7a9cbf;
  margin-bottom: 0.2rem;
}
.post-nav a:hover { text-decoration: underline; }

.post-back { margin-top: 1.75rem; }

body.blog footer { text-align: center; width: 100%; }

@media (max-width: 768px) {
  .blog-head h1 { font-size: 1.5rem; }
  .post-head h1 { font-size: 1.5rem; }
  .post-body { font-size: 0.95rem; }
  .post-nav { flex-direction: column; }
  .post-nav a.next { text-align: left; }
}

/* ============================================================
   SECTION BUTTONS  (row under the header, every page)
   Three equal buttons. The one for the section you are in stays
   filled navy; the other two sit lighter. The Teachers Pay Teachers
   button opens a new window and is never the selected one, because
   it leaves the site.
   ============================================================ */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.1rem 2rem 0.75rem;
  border-bottom: 2px solid #b8d9f0;
}
body.home .site-nav { border-bottom: none; }

/* Sized to their own label rather than stretched into equal thirds: three
   content-width buttons read as a control strip, where three full-width slabs
   read as a plain bar. The rule still spans the full 1000px, so the row keeps
   its underline on the blog and product pages. */
.nav-btn {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid #b8d9f0;
  background: linear-gradient(180deg, #f2f8fd 0%, #dceaf5 100%);
  color: #2b4c7e;
  box-shadow: 0 1px 2px rgba(26,54,93,0.06);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
}
.nav-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #cfe6f6 100%);
  border-color: #7fb4dc;
  color: #1a365d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26,54,93,0.18);
}

/* Selected: stays illuminated, and does not lift on hover. */
.nav-btn.active {
  background: linear-gradient(180deg, #274b7d 0%, #1a365d 100%);
  border-color: #1a365d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,54,93,0.28);
  cursor: default;
}
.nav-btn.active:hover {
  background: linear-gradient(180deg, #274b7d 0%, #1a365d 100%);
  border-color: #1a365d;
  color: #fff;
  transform: none;
  box-shadow: 0 2px 8px rgba(26,54,93,0.28);
}

/* Leading mark. The drawn icons stroke in currentColor so they invert with the
   button when it is the selected one; the store badge keeps its own colour
   because that button is never selected. */
.nav-ico {
  width: 20px;
  height: 20px;
  flex: none;
}
.nav-ico.tpt {
  width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #0e9f96;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
}

/* Sits one gap after the label, matching the icon-to-label gap on the left, so
   the button reads as one run of content rather than two clumps. */
.nav-btn .ext { font-size: 0.78em; opacity: 0.75; }

@media (max-width: 768px) {
  .site-nav { gap: 0.35rem; padding: 0.1rem 0.25rem 0.6rem; }
  /* One per row down here. "Teachers Pay Teachers Store" cannot share a line
     with another button on a phone, and letting the row wrap where it likes
     left one button stretched alone under two others. Stacking all three reads
     as a menu instead, and costs no more height than the ragged wrap did. */
  .nav-btn { flex: 1 1 100%; font-size: 0.8rem; padding: 0.55rem 0.9rem; gap: 0.5rem; }
  .nav-ico { width: 18px; height: 18px; }
  .nav-ico.tpt { width: 22px; font-size: 8.5px; }
}


/* ── Subscribe band ──────────────────────────────────────────────────────────
   Sits above the footer on every page. The button reveals the field IN PAGE:
   no browser popup, and no second window to lose. Once an address is accepted
   the field and the button both lock, so a double click cannot send twice.
   Palette and button shape are lifted straight from .nav-btn so the band reads
   as part of the same control system rather than a bolted-on widget. */
.subscribe {
  width: 100%;
  max-width: 1000px;
  margin: 2rem auto 0;
  padding: 1.1rem 1.25rem 1.25rem;
  border-top: 1px solid #b8d9f0;
}
.subscribe .sub-line {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2b4c7e;
  margin-bottom: 0.7rem;
}
.sub-open, .sub-go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 10px;
  border: 1px solid #b8d9f0;
  background: linear-gradient(180deg, #f2f8fd 0%, #dceaf5 100%);
  color: #2b4c7e;
  box-shadow: 0 1px 2px rgba(26,54,93,0.06);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
}
.sub-open:hover, .sub-go:hover {
  background: linear-gradient(180deg, #ffffff 0%, #cfe6f6 100%);
  border-color: #7fb4dc;
  color: #1a365d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26,54,93,0.18);
}
.sub-go {
  background: linear-gradient(180deg, #274b7d 0%, #1a365d 100%);
  border-color: #1a365d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,54,93,0.28);
}
.sub-go:hover { background: linear-gradient(180deg, #2f5a94 0%, #1a365d 100%); border-color: #1a365d; color: #fff; }
.sub-open[disabled], .sub-go[disabled] {
  opacity: 0.65; cursor: default; transform: none; box-shadow: none;
}

/* The panel. [hidden] alone loses to the display rule below it, so it has to
   be said with !important or the field would sit open from the first paint. */
.sub-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.sub-panel[hidden] { display: none !important; }
.sub-panel input[type="email"] {
  flex: 0 1 280px;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: #1a365d;
  background: #fff;
  border: 1px solid #b8d9f0;
  border-radius: 10px;
}
.sub-panel input[type="email"]:focus {
  outline: 2px solid #7fb4dc;
  outline-offset: 1px;
  border-color: #7fb4dc;
}
.sub-panel input[type="email"][disabled] { background: #eef5fb; color: #7a9cbf; }
/* The honeypot. Off-screen rather than display:none, because some bots skip
   anything that is not rendered at all. A person never reaches it: it is not
   in the tab order and it is announced to nobody. */
.sub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sub-msg { flex: 1 0 100%; font-size: 0.82rem; min-height: 1.1em; }
.sub-msg.ok { color: #1c6b3f; font-weight: 600; }
.sub-msg.bad { color: #a32020; }
.sub-fine { flex: 1 0 100%; font-size: 0.75rem; color: #7a9cbf; }
@media (max-width: 768px) {
  .subscribe { margin-top: 1.25rem; padding: 1rem 0.75rem; }
  .sub-panel input[type="email"] { flex: 1 1 100%; }
  .sub-open, .sub-go { width: 100%; justify-content: center; }
}
