/* ==========================================================
   Hearth Learning — State Homeschool Hub
   Loaded after blog.css on /homeschool/ pages (built by build-hub.js).
   Guide bodies reuse .blog-post typography.
   ========================================================== */

.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;
}

.hub-crumbs {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--hearth-rich-brown);
}

.hub-crumbs a {
  color: var(--hearth-deep-teal);
}

.hub-guide h1,
.hub-index h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin: 0 0 0.75rem;
}

.hub-verified {
  font-size: 0.9rem;
  color: var(--hearth-rich-brown);
  opacity: 0.85;
  margin: 0 0 1.5rem;
}

.hub-verified a {
  color: var(--hearth-deep-teal);
}

/* "The short answer" box */
.hub-short {
  background: #fff;
  border: 1.5px solid var(--hearth-amber);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

/* Overview / Testing tabs */
.hub-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--hearth-border);
}

.hub-tabs a {
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--hearth-rich-brown);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.hub-tabs a[aria-current='page'] {
  color: var(--hearth-deep-navy);
  border-bottom-color: var(--hearth-amber);
}

/* At-a-glance table */
.hub-glance {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 2rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hearth-border);
  font-size: 0.97rem;
}

.hub-glance caption {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--hearth-deep-navy);
  padding: 0 0 0.6rem;
}

.hub-glance th,
.hub-glance td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--hearth-border);
  line-height: 1.5;
}

.hub-glance tr:first-child th,
.hub-glance tr:first-child td {
  border-top: 0;
}

.hub-glance th {
  width: 34%;
  font-weight: 600;
  color: var(--hearth-deep-navy);
  background: rgba(232, 168, 56, 0.06);
}

.hub-glance a,
.hub-sources a,
.hub-changes a,
.hub-disclaimer a,
.hub-back a {
  color: var(--hearth-deep-teal);
}

/* Tables inside the guide body (e.g. test comparisons) */
.blog-post table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.75rem;
  font-size: 0.95rem;
  background: #fff;
}

.blog-post th,
.blog-post td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--hearth-border);
  line-height: 1.5;
}

.blog-post th {
  background: rgba(232, 168, 56, 0.08);
  color: var(--hearth-deep-navy);
}

/* Call to action */
.hub-cta {
  margin: 2.5rem 0;
  padding: 1.5rem 1.6rem;
  background: var(--hearth-warm-white, #fff8f0);
  border: 1.5px solid var(--hearth-amber);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(232, 168, 56, 0.12);
}

.hub-cta h2 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

.hub-cta p {
  margin: 0 0 1rem;
}

.hub-cta-btn {
  display: inline-block;
  background: #b85c2f;
  color: #fff !important;
  text-decoration: none !important;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.4rem;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.hub-cta-btn:hover {
  filter: brightness(1.08);
}

.hub-cta-fine {
  font-size: 0.88rem;
  margin: 0.75rem 0 0 !important;
  opacity: 0.85;
}

.hub-sources h2,
.hub-changes h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hearth-border);
}

.hub-sources ul,
.hub-changes ul {
  padding-left: 1.2rem;
  margin: 0;
  font-size: 0.95rem;
}

.hub-sources li,
.hub-changes li {
  margin: 0.35rem 0;
}

.hub-changes li span {
  font-weight: 600;
  margin-right: 0.35rem;
}

.hub-disclaimer {
  margin: 2rem 0 0.5rem;
  font-size: 0.92rem;
  color: var(--hearth-rich-brown);
}

.hub-back {
  font-size: 0.95rem;
}

/* ===== Hub index ===== */

.hub-lead {
  font-size: 1.1rem;
  margin: 0 0 2rem;
}

.hub-picker {
  background: #fff;
  border: 1.5px solid var(--hearth-amber);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin: 0 0 2.5rem;
}

.hub-picker h2,
.hub-available h2,
.hub-how h2 {
  font-size: 1.3rem;
  margin: 0 0 0.9rem;
}

.hub-picker-row,
#state-request {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hub-picker select,
#state-request input[type='email'] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid #d9c9b3;
  border-radius: 10px;
  background: #fff;
  color: var(--hearth-deep-navy);
}

.hub-pending {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--hearth-border);
}

.hub-pending p {
  margin: 0 0 0.8rem;
}

.hub-done {
  font-weight: 600;
  color: #3f7a49;
}

.hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.hub-card {
  display: block;
  padding: 1.2rem 1.3rem;
  background: #fff;
  border: 1px solid var(--hearth-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--hearth-rich-brown);
  transition:
    border-color 0.15s,
    transform 0.15s;
}

.hub-card:hover {
  border-color: var(--hearth-amber);
  transform: translateY(-2px);
}

.hub-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.hub-card p {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hub-card-meta {
  font-size: 0.85rem;
  opacity: 0.8;
}

.hub-available,
.hub-how {
  margin-bottom: 2.5rem;
}

@media (max-width: 600px) {
  .hub-glance th {
    width: 40%;
  }
  .hub-picker-row .hub-cta-btn,
  #state-request .hub-cta-btn {
    width: 100%;
  }
}

.hub-cta-fine a {
  color: var(--hearth-deep-teal);
}

/* Up-front "not the law itself" note under the checked date */
.hub-note {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--hearth-rich-brown);
  background: rgba(45, 106, 106, 0.06);
  border-left: 3px solid var(--hearth-deep-teal);
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  margin: -0.75rem 0 1.5rem;
}

.hub-note a,
.hub-how a {
  color: var(--hearth-deep-teal);
}

.hub-disclaimer h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hearth-border);
}

.hub-disclaimer p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

/* ===== Hub map (built by build-hub-map.js, popover in js/hub-map.js) ===== */

.hm-sub {
  margin: -0.4rem 0 1rem;
  font-size: 0.95rem;
}

.hm-stage {
  position: relative;
  background: #fff;
  border: 1px solid var(--hearth-border);
  border-radius: 14px;
  padding: 1rem;
}

.hm-geo,
.hm-tiles {
  display: block;
  width: 100%;
  height: auto;
}

.hm-tiles {
  display: none;
}

@media (max-width: 600px) {
  .hm-geo {
    display: none;
  }
  .hm-tiles {
    display: block;
  }
  .hm-stage {
    padding: 0.6rem;
  }
}

.hm-st {
  outline: none;
}

.hm-st path,
.hm-st rect,
.hm-st .hm-dc {
  fill: #efe6d8;
  stroke: #fff;
  stroke-width: 1;
  transition: fill 0.15s;
}

.hm-st rect {
  stroke-width: 3;
}

.hm-st.is-ready path,
.hm-st.is-ready .hm-dc {
  fill: #cfe3dc;
  cursor: pointer;
}

.hm-st.is-active path,
.hm-st.is-active .hm-dc,
.hm-st:not(.is-ready).is-active rect {
  fill: #e4d8c5;
}

.hm-st.is-ready.is-active path,
.hm-st.is-ready:focus-visible path {
  fill: #9fc8bb;
}

.hm-st:focus-visible path,
.hm-st:focus-visible rect {
  stroke: var(--hearth-deep-navy);
  stroke-width: 2.5;
}

/* Pins */
.hm-pins {
  pointer-events: none;
}

.hm-pin circle {
  fill: var(--hearth-deep-teal);
  stroke: #fff;
  stroke-width: 2;
  transition: fill 0.15s;
}

.hm-pin path {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hm-pin.is-active circle {
  fill: #b85c2f;
}

/* Tiles */
.hm-st text {
  font: 700 19px var(--font-body);
  fill: #a8957f;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.hm-st.is-ready rect {
  fill: var(--hearth-deep-teal);
  cursor: pointer;
}

.hm-st.is-ready text {
  fill: #fff;
  font-weight: 700;
}

.hm-st.is-ready.is-active rect {
  fill: #b85c2f;
}

.hm-tick {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Popover */
.hm-pop {
  position: absolute;
  z-index: 5;
  width: min(300px, calc(100% - 8px));
  background: #fff;
  border: 1.5px solid var(--hearth-amber);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(27, 42, 74, 0.16);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.hm-pop[hidden] {
  display: none;
}

.hm-pop p {
  margin: 0 0 0.5rem;
}

.hm-pop-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--hearth-deep-navy);
  margin-bottom: 0.25rem !important;
}

.hm-pop-meta {
  font-size: 0.8rem;
  opacity: 0.8;
}

.hm-pop-btn {
  display: inline-block;
  background: #b85c2f;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
}

.hm-pop-soon {
  border-color: #d9c9b3;
}

.hm-pop-link {
  font: inherit;
  font-weight: 600;
  color: var(--hearth-deep-teal);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

/* Legend and text list */
.hm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  margin: 0.7rem 0 0;
}

.hm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hm-sw {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #efe6d8;
  border: 1px solid rgba(74, 55, 40, 0.2);
  display: inline-block;
}

.hm-sw-ready {
  background: var(--hearth-deep-teal);
  border-radius: 50%;
  border-color: var(--hearth-deep-teal);
}

.hm-list-title {
  font-size: 1.05rem;
  margin: 1.4rem 0 0.5rem;
}

.hm-list {
  columns: 3 160px;
  padding-left: 1.1rem;
  margin: 0;
  font-size: 0.97rem;
}

.hm-list li {
  margin: 0 0 0.35rem;
  break-inside: avoid;
}

.hm-list a {
  color: var(--hearth-deep-teal);
}

.hm-list-tag {
  font-size: 0.8rem;
  opacity: 0.75;
}

@media (max-width: 600px) {
  .hm-pop {
    position: static;
    width: auto;
    margin-top: 0.6rem;
    box-shadow: none;
  }
}

/* "Try the facts check" callout on test guides and state testing pages */
.fc-callout {
  margin: 2rem 0;
  padding: 1.1rem 1.3rem;
  border-left: 4px solid var(--hearth-amber);
  background: var(--hearth-warm-white);
  border-radius: 0 12px 12px 0;
}
.fc-callout p {
  margin: 0 0 0.6rem;
}
.fc-callout p:last-child {
  margin: 0;
}

/* State checklist pack sign-up (checklistSignup in build-hub.js) */
.cl-signup {
  margin: 1.75rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--hearth-warm-white, #fff8f0);
  border: 1.5px solid var(--hearth-amber);
  border-radius: 14px;
}
.cl-signup h2 {
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}
.cl-signup p {
  margin: 0 0 0.75rem;
}
.cl-signup label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.cl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cl-row input {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--hearth-border);
  border-radius: 10px;
  background: #fff;
  color: inherit;
}
.cl-row .hub-cta-btn {
  border: 0;
  cursor: pointer;
}
.cl-row .hub-cta-btn:disabled {
  opacity: 0.7;
  cursor: default;
}
.cl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.cl-fine {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 0.6rem 0 0 !important;
}
.cl-status {
  color: #b3261e;
  margin: 0.4rem 0 0 !important;
  min-height: 1em;
}
.cl-done {
  font-weight: 600;
}
