:root {
  --ink: #32134f;
  --muted: #716477;
  --paper: #fffaf1;
  --white: #ffffff;
  --blue: #7651d8;
  --blue-dark: #5d38bc;
  --coral: #ef6f78;
  --lime: #d7f3e9;
  --peach: #ffe1e5;
  --yellow: #ffefb9;
  --lavender: #eadcff;
  --line: #decdea;
  --shadow: 0 18px 50px rgba(50, 19, 79, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; }
button, input, select { font: inherit; }
.skip-link { position: absolute; left: -999px; top: 1rem; }
.skip-link:focus { left: 1rem; z-index: 100; background: var(--white); padding: .7rem 1rem; border-radius: 10px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 250, 241, .94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(220, 227, 243, .8);
}
.main-site-banner { display: none; }
.nav {
  max-width: 1180px;
  margin: auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-logo { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 1.12rem; letter-spacing: -.02em; }
.brand-copy small { margin-top: .28rem; color: var(--blue); font-size: .68rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 700; }
.nav-links a:hover, .nav-links a:focus { color: var(--blue); }
.nav-cta { background: var(--blue); color: white !important; padding: .72rem 1rem; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 5px 0 var(--ink); }
.shell { max-width: 1180px; margin: auto; padding: 2.2rem 1.25rem 4rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 850; color: var(--blue); text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--lime); border: 3px solid var(--ink); border-radius: 50%; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -.035em; margin-top: 0; font-family: Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2.45rem, 7vw, 4.7rem); max-width: 850px; margin-bottom: 1rem; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; }
.intro { position: relative; overflow: hidden; display: block; padding: clamp(2rem, 6vw, 4.2rem); margin-bottom: 3.5rem; background: linear-gradient(135deg, #f3dcff 0%, #ffe0e8 58%, #e1f7ef 100%); border: 2px solid var(--ink); border-radius: 34px; }
.intro::after { content: ""; position: absolute; width: 250px; height: 250px; right: -55px; bottom: -90px; border-radius: 50%; background: rgba(255, 239, 185, .72); filter: blur(4px); }
.intro > div { position: relative; z-index: 1; max-width: 760px; }
.intro h1 em { display: block; color: var(--coral); font-weight: 400; }
.intro-copy { font-size: 1.16rem; color: var(--muted); max-width: 660px; margin: 0; }
.toolbar { display: grid; grid-template-columns: 1fr auto; gap: .8rem; margin: 1.4rem 0 1.2rem; }
.search-wrap { position: relative; }
.search-wrap span { position: absolute; left: 1rem; top: .8rem; color: var(--muted); }
.search { width: 100%; border: 2px solid var(--line); background: var(--white); padding: .85rem 1rem .85rem 2.75rem; border-radius: 15px; color: var(--ink); outline: none; }
.search:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(49, 95, 233, .12); }
.filter { border: 1px solid var(--line); background: var(--white); color: var(--muted); font-weight: 750; padding: .55rem .8rem; border-radius: 999px; cursor: pointer; }
.filter:hover, .filter:focus-visible { border-color: var(--blue); color: var(--ink); }
.filter.active { background: var(--blue); color: var(--white); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.browse-panel { background: var(--white); border: 2px solid var(--ink); border-radius: 28px; padding: 1.1rem; margin-bottom: 2rem; }
.browse-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem .3rem 1rem; }
.browse-heading h3, .results-heading h3 { margin: 0; }
.browse-heading p { margin: .3rem 0 0; color: var(--muted); }
.clear-filters { border: 0; background: transparent; color: var(--blue-dark); font-weight: 850; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.filter-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.filter-section { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); overflow: hidden; }
.filter-section[open] { background: #fcf8ff; border-color: #c9b4e2; }
.filter-section summary { cursor: pointer; list-style: none; padding: .9rem 1rem; font-weight: 850; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.filter-section summary::-webkit-details-marker { display: none; }
.filter-section summary::after { content: "+"; color: var(--blue); font-size: 1.2rem; }
.filter-section[open] summary::after { content: "–"; }
.filter-options { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1rem 1rem; }
.grade-options .filter { min-width: 48px; }
.active-filter-text { margin: 1rem .3rem 0; color: var(--muted); font-size: .9rem; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.results-heading span { color: var(--muted); font-weight: 700; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; }
.card { position: relative; display: flex; flex-direction: column; min-height: 310px; background: var(--lavender); border: 2px solid var(--ink); border-radius: 30px; padding: 1.5rem; box-shadow: 0 9px 0 var(--ink); transition: transform .2s ease; }
.card:nth-child(2) { background: var(--lime); }
.card:nth-child(3) { background: var(--peach); }
.card:hover { transform: translateY(-3px); }
.card.hidden { display: none; }
.card-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; font-size: 1.55rem; background: rgba(255,255,255,.78); margin-bottom: 1.2rem; border: 2px solid var(--ink); color: var(--blue); }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .7rem; }
.tag { background: rgba(255,255,255,.65); color: var(--ink); padding: .25rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 750; }
.card p { color: var(--muted); margin-top: 0; }
.card-link { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--blue); color: var(--white); text-decoration: none; font-weight: 850; padding: .78rem 1rem; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink); }
.card-link:hover, .card-link:focus { background: var(--blue-dark); }
.empty { display: none; text-align: center; background: var(--white); padding: 2rem; border-radius: var(--radius); border: 1px dashed var(--line); }
.empty.show { display: block; }
.trust { margin-top: 3.5rem; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 30px; padding: clamp(1.5rem, 5vw, 3rem); display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.trust p { color: var(--muted); }
.trust-list { display: grid; gap: .75rem; align-content: center; }
.trust-item { background: rgba(255,255,255,.72); padding: .85rem 1rem; border: 1px solid rgba(50,19,79,.25); border-radius: 999px; font-weight: 700; }
.footer { border-top: 1px solid var(--line); padding: 2rem 1.25rem; color: var(--muted); }
.footer-inner { max-width: 1180px; margin: auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.ad-preview { display: none; }
.mobile-tutoring { display: none; }

.page-head { padding: 2.5rem 0 1.5rem; max-width: 800px; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.page-head p { color: var(--muted); font-size: 1.1rem; }
.content-card { background: var(--white); border: 2px solid var(--ink); border-radius: 28px; padding: clamp(1.25rem, 4vw, 2.5rem); max-width: 860px; }
.content-card h2 { font-size: 1.55rem; margin-top: 2rem; }
.content-card h2:first-child { margin-top: 0; }
.booking-layout { display: grid; grid-template-columns: minmax(250px, .65fr) minmax(320px, 1.35fr); gap: 1.25rem; align-items: start; }
.booking-info { background: linear-gradient(145deg, var(--lavender), var(--peach)); border: 2px solid var(--ink); border-radius: 28px; padding: 1.5rem; }
.booking-info h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); margin-bottom: 1rem; }
.booking-info p { color: var(--muted); }
.booking-points { padding-left: 1.2rem; }
.booking-frame { background: var(--white); border: 2px solid var(--ink); border-radius: 28px; overflow: hidden; min-width: 0; }
.calendly-inline-widget { min-width: 320px; height: 760px; }
.booking-fallback { text-align: center; padding: 0 1rem 1.25rem; color: var(--muted); }
.booking-fallback a { color: var(--blue-dark); font-weight: 850; }
.resource-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.25rem 0 2rem; }
.btn { border: 0; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: .8rem 1rem; border-radius: 12px; font-weight: 850; }
.btn-primary { background: var(--blue); color: white; }
.btn-secondary { background: var(--white); border: 2px solid var(--ink); color: var(--ink); }
.worksheet { max-width: 8.5in; min-height: 11in; background: white; padding: .55in; margin: 1rem auto 3rem; border: 1px solid var(--line); box-shadow: var(--shadow); color: #111; }
.worksheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 3px solid #111; padding-bottom: .6rem; margin-bottom: 1rem; }
.worksheet-head h1 { font-size: 1.9rem; margin: 0; }
.worksheet-brand { font-size: .8rem; font-weight: 850; text-align: right; }
.student-line { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1rem 0 1.3rem; }
.line { border-bottom: 1px solid #111; min-height: 1.5rem; }
.question { margin: 1rem 0; page-break-inside: avoid; }
.answer-space { min-height: 2.8rem; border-bottom: 1px solid #adb5c4; background: repeating-linear-gradient(transparent, transparent 1.35rem, #e2e5eb 1.4rem); }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.choice { border: 1px solid #aaa; padding: .65rem; border-radius: 8px; }
.planner-grid { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid #444; }
.planner-cell { min-height: 7rem; border: 1px solid #777; padding: .4rem; }
.planner-cell strong { display: block; border-bottom: 1px solid #aaa; margin-bottom: .4rem; }

@media (max-width: 820px) {
  .intro, .trust { grid-template-columns: 1fr; }
  .booking-layout { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr 1fr; }
  .filter-sections { grid-template-columns: 1fr; }
  .quick-note { max-width: 430px; }
}
@media (max-width: 580px) {
  .nav { padding: .65rem .75rem; }
  .nav-links a:not(.nav-cta) { display: none; }
  .shell { padding-top: 1.2rem; }
  .intro { padding: 1.6rem; border-radius: 25px; }
  .toolbar { grid-template-columns: 1fr; }
  .browse-heading { align-items: flex-start; }
  .browse-heading p { max-width: 230px; }
  .resource-grid { grid-template-columns: 1fr; }
  .card { min-height: 280px; }
  .brand-logo { width: 46px; height: 46px; }
  .brand-copy strong { font-size: 1rem; }
  .brand-copy small { font-size: .6rem; }
  .nav-cta { padding: .58rem .7rem; font-size: .78rem; box-shadow: 0 4px 0 var(--ink); }
  .student-line, .choice-grid { grid-template-columns: 1fr; }
  .planner-grid { grid-template-columns: 1fr; }
  .planner-cell { min-height: 5rem; }
  body { padding-bottom: 66px; }
  .mobile-tutoring { display: flex; position: fixed; z-index: 30; left: .75rem; right: .75rem; bottom: .65rem; align-items: center; justify-content: center; background: var(--blue); color: white; border: 2px solid var(--ink); border-radius: 15px; padding: .8rem 1rem; text-decoration: none; font-weight: 850; box-shadow: 0 6px 20px rgba(50,19,79,.25); }
}

@media print {
  body { background: white; }
  .site-header, .page-head, .resource-actions, .footer, .no-print, .ad-preview, .mobile-tutoring { display: none !important; }
  main:has(.worksheet)::after { display: none !important; }
  .shell { max-width: none; padding: 0; }
  .worksheet { box-shadow: none; border: 0; margin: 0; min-height: auto; padding: .35in; }
  @page { size: letter; margin: .25in; }
}
