/* ═══════════════════════════════════════════════════
   v1.34.0 — Tools and Homeschool tab layouts (inc/tab-layouts.php)
   Loaded on the landing tabs while either tab is on. Theme tokens only, so dark mode follows.
   ═══════════════════════════════════════════════════ */

/* ── Tools: one view, a section per set, a preview on every card ── */
.tools-sections { display: flex; flex-direction: column; gap: 44px; margin-top: 4px; }
.tools-section__head { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.tools-section__head::after { content: ''; flex: 1 1 auto; height: 1px; background: var(--border-subtle, #E5E7EB); }
.tools-section__title { margin: 0; font-size: 22px; font-weight: 800; color: var(--content-primary); white-space: nowrap; }
.tools-section__count { font-size: 14px; color: var(--content-tertiary); white-space: nowrap; }
.tools-grid {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 20px;
}
.tools-grid > li { margin: 0; padding: 0; min-width: 0; }
.tools-card {
	display: flex; flex-direction: column; height: 100%;
	border: 1px solid var(--border-subtle, #E5E7EB); border-radius: 14px; overflow: hidden;
	background: var(--bg-primary, #fff); color: var(--content-primary); text-decoration: none;
	box-shadow: 0 4px 6px rgb(26 35 49 / 6%), 0 2px 2px rgb(26 35 49 / 5%);
	transition: box-shadow .15s, transform .15s, border-color .15s;
}
.tools-card:hover {
	text-decoration: none; color: var(--content-primary); border-color: var(--border-brand, #1E7CB8);
	box-shadow: 0 10px 20px rgb(26 35 49 / 8%), 0 4px 6px rgb(26 35 49 / 6%); transform: translateY(-2px);
}
.tools-card:focus-visible { outline: 3px solid #50A9E2; outline-offset: 2px; }
.tools-card__preview { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #0B2F46; }
.tools-card__preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tools-card__preview--blank { display: flex; align-items: center; justify-content: center; background: #0B2F46; }
.tools-card__preview--blank span { font-size: 44px; font-weight: 900; letter-spacing: .02em; color: #7CBFE9; }
.tools-card--science .tools-card__preview--blank { background: #221A4A; }
.tools-card--science .tools-card__preview--blank span { color: #B9ADF0; }
.tools-card--teachers .tools-card__preview--blank { background: #06352B; }
.tools-card--teachers .tools-card__preview--blank span { color: #6EE7B7; }
.tools-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.tools-card__name { font-size: 17px; font-weight: 800; line-height: 1.3; }
.tools-card__blurb { font-size: 14px; line-height: 1.45; color: var(--content-secondary); }

/* ── Homeschool: "We homeschool in [state]" + a card per topic ── */
.hs-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 28px; text-align: center; }
.hs-pick__line {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
	font-size: 30px; font-weight: 900; line-height: 1.25; color: var(--content-primary);
}
.hs-pick__select {
	min-height: 52px; max-width: 100%; padding: 0 14px; border-radius: 12px; cursor: pointer;
	border: 2px solid var(--border-brand, #1E7CB8); background: var(--bg-brand-subtle, #EBF5FA);
	font-size: 26px; font-weight: 900; color: var(--content-link, #155884);
}
.hs-pick__select:focus-visible { outline: 3px solid #50A9E2; outline-offset: 2px; }
.hs-pick__note { margin: 0; font-size: 15px; color: var(--content-secondary); }

.hs-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; align-items: start; }
.hs-topic {
	min-width: 0; display: flex; flex-direction: column; padding: 22px 22px 14px; border-radius: 16px;
	border: 1px solid var(--border-subtle, #E5E7EB); background: var(--bg-primary, #fff);
	box-shadow: 0 4px 6px rgb(26 35 49 / 6%), 0 2px 2px rgb(26 35 49 / 5%);
}
.hs-topic:has(.hs-row[open]) { grid-column: 1 / -1; }
.hs-topic__title { margin: 0 0 12px; font-size: 21px; font-weight: 800; color: var(--content-primary); }
.hs-topic__sub {
	margin: 14px 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
	color: var(--content-tertiary);
}

.hs-localbox { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.hs-localbox__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hs-localbox__list li { margin: 0; padding: 0; }
.hs-localbox__list li[hidden] { display: none; }
.hs-pin {
	display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px;
	background: var(--bg-brand-subtle, #EBF5FA); color: var(--content-primary); text-decoration: none;
}
.hs-pin:hover { text-decoration: none; color: var(--content-primary); box-shadow: inset 0 0 0 2px var(--border-brand, #1E7CB8); }
.hs-pin__tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: var(--content-link, #155884); }
.hs-pin__title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.hs-localbox__empty {
	margin: 0; padding: 14px 16px; border: 2px dashed var(--border-primary, #D1D5DB); border-radius: 12px;
	font-size: 15px; line-height: 1.5; color: var(--content-secondary);
}
.hs-localbox__none { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-subtle, #F9F9FB); font-size: 15px; color: var(--content-secondary); }
.hs-localbox__empty[hidden], .hs-localbox__none[hidden], .hs-localbox__all[hidden] { display: none; }
.hs-localbox__all {
	align-self: flex-start; min-height: 36px; padding: 6px 12px; border-radius: 8px; cursor: pointer;
	border: 1px solid var(--border-primary, #D1D5DB); background: var(--bg-primary, #fff);
	font-size: 14px; font-weight: 700; color: var(--content-link, #1E7CB8);
}

.hs-links { list-style: none; margin: 0; padding: 0; }
.hs-links li { margin: 0; padding: 0; border-bottom: 1px solid var(--border-subtle, #E5E7EB); }
.hs-links li:last-child { border-bottom: 0; }
.hs-links a { display: block; padding: 11px 0; font-size: 15.5px; line-height: 1.45; }

.hs-row { border-bottom: 1px solid var(--border-subtle, #E5E7EB); }
.hs-row:last-child { border-bottom: 0; }
.hs-row > summary {
	list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 48px; padding: 6px 0; font-size: 16px; font-weight: 800; color: var(--content-primary);
}
.hs-row > summary::-webkit-details-marker { display: none; }
.hs-row > summary:focus-visible { outline: 3px solid #50A9E2; outline-offset: 2px; border-radius: 6px; }
.hs-row__count {
	display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px; border-radius: 999px;
	background: var(--bg-bold, #ECEDF1); font-size: 13px; font-weight: 700; color: var(--content-secondary);
}
.hs-row__count::after {
	content: ''; width: 7px; height: 7px; margin-top: -3px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.hs-row[open] > summary .hs-row__count::after { transform: rotate(225deg); margin-top: 3px; }
.hs-row__body { padding: 0 0 12px; }
.hs-level { border-top: 1px solid var(--border-subtle, #E5E7EB); }
.hs-level > summary { cursor: pointer; padding: 10px 0; font-size: 15px; font-weight: 700; color: var(--content-primary); }
.hs-level > summary span { font-weight: 400; color: var(--content-tertiary); }
.hs-list { margin: 0 0 8px; padding: 0 0 0 18px; columns: 3 260px; column-gap: 28px; }
.hs-list li { margin: 0 0 6px; break-inside: avoid; font-size: 15px; line-height: 1.45; }

@media (max-width: 781px) {
	.hs-pick__line { font-size: 24px; }
	.hs-pick__select { font-size: 22px; min-height: 48px; }
	.hs-topic { padding: 18px 16px 10px; }
	.tools-sections { gap: 36px; }
	.tools-section__title { font-size: 20px; }
	.tools-grid { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 12px; }
	.tools-card__body { padding: 12px 12px 14px; }
	.tools-card__name { font-size: 15px; }
	.tools-card__blurb { font-size: 13px; }
}

/* ── Dark mode ── */
html.dark-mode .tools-card { box-shadow: none; }
html.dark-mode .hs-topic { box-shadow: none; }
html.dark-mode .hs-pin { background: rgba(30, 124, 184, .18); }
html.dark-mode .hs-pick__select { background: rgba(30, 124, 184, .18); color: #A8D4F0; }
