/* Packages on the catalog, the home page and member course pages (Tim, 20 Oct 2026: "Let's build it").
   The server links this file only on a page it draws a package on (server._with_package_assets).
   A package looks like a course card with a gold edge, never like an advert: shoppers skip anything styled as one
   (NN/g, banner blindness), and a promotion inside a product list reads as the end of the list (Baymard). */

/* ── the catalog's section, above the search box ─────────────────────────────────────────────── */
.pkg-section { padding: 32px 0 8px; }
.pkg-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.pkg-head h2 { margin: 0; }
.pkg-head p { margin: 0; color: var(--gray-600); font-size: 0.95rem; }
.pkg-individual { margin: 0 0 20px; font-size: 1.35rem; }

.pkg { display: grid; grid-template-columns: 132px minmax(0, 1fr) 250px; gap: 20px; margin-top: 18px;
  background: var(--white); border: 1.5px solid var(--gold); border-radius: var(--radius-md, 10px);
  padding: 18px; box-shadow: var(--shadow-sm); scroll-margin-top: 96px; }
.pkg:target { box-shadow: 0 0 0 3px var(--gold-light), var(--shadow-md); }
.pkg-art { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.pkg-art img { display: block; width: 100%; max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.pkg-art > div { grid-column: 1 / -1; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.pkg-main { min-width: 0; }
.pkg-eyebrow { margin: 0; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #92400e; }
.pkg-title { margin: 4px 0 0; font-size: 1.25rem; }
.pkg-desc { margin: 8px 0 0; color: var(--gray-600); font-size: 0.92rem; line-height: 1.55; }
.pkg-renewal { margin: 8px 0 0; font-size: 0.92rem; line-height: 1.55; color: var(--navy); font-weight: 600; }
.pkg-exempt { display: block; font-weight: 400; color: var(--gray-600); font-size: 0.82rem; }
.pkg-hours { display: inline-flex; flex-wrap: wrap; list-style: none; margin: 10px 8px 0 0; padding: 0;
  border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; font-size: 0.8rem; }
.pkg-hours li { padding: 5px 10px; border-right: 1px solid var(--gray-200); color: var(--gray-700, #2d3748); }
.pkg-hours li:last-child { border-right: 0; }
.pkg-hours .pkg-total { background: var(--blue-pale); color: var(--blue); font-weight: 700; }
.pkg-courses { margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.88rem; line-height: 1.5; }
.pkg-courses li { position: relative; padding-left: 20px; margin-top: 4px; color: var(--gray-600); }
.pkg-courses li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
.pkg-courses a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gray-300, #cbd5e0);
  text-underline-offset: 2px; }
.pkg-courses a:hover { text-decoration-color: currentColor; }
.pkg-notice { margin: 10px 0 0; padding: 8px 10px; background: #fffbeb; border-left: 3px solid #c9963b;
  border-radius: 4px; font-size: 0.8rem; line-height: 1.45; color: #78350f; }

.pkg-buy { display: flex; flex-direction: column; gap: 4px; min-width: 0; border-left: 1px solid var(--gray-200);
  padding-left: 18px; }
.pkg-was { margin: 0; font-size: 0.85rem; color: var(--gray-600); }
.pkg-was s { color: var(--gray-600); }
.pkg-price { margin: 0; font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.pkg-save { align-self: flex-start; margin: 2px 0 0; padding: 3px 10px; border-radius: 999px; background: #dcfce7;
  color: #14532d; font-weight: 700; font-size: 0.82rem; }
.pkg-add { margin-top: 10px; width: 100%; }
.pkg-msg { margin: 4px 0 0; font-size: 0.82rem; line-height: 1.5; }
.pkg-msg:empty { display: none; }
.pkg-owned { margin: 10px 0 0; font-size: 0.85rem; line-height: 1.5; color: #92400e; }
.pkg-details { margin-top: 8px; font-size: 0.85rem; }
.pkg-details summary { cursor: pointer; color: var(--blue); font-weight: 600; padding: 4px 0; }
.pkg-details summary:focus-visible, .pkg-courses a:focus-visible, .pkg-mini:focus-visible, .pkg-more:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; }
.pkg-table { overflow-x: auto; margin-top: 6px; }
.pkg-table table { border-collapse: collapse; width: 100%; font-size: 0.8rem; }
.pkg-table th, .pkg-table td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--gray-200);
  vertical-align: top; color: var(--gray-700, #2d3748); }
.pkg-table th { font-weight: 700; background: var(--gray-50); }
.pkg-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pkg-table .pkg-sum td { font-weight: 700; border-bottom: 0; }
.pkg-details[open] { grid-column: 1 / -1; }
.pkg-fine { margin: 6px 0 0; font-size: 0.78rem; color: var(--gray-600); line-height: 1.45; }

/* ── the home page's row ─────────────────────────────────────────────────────────────────────── */
.pkg-center { text-align: center; }
.pkg-lede { margin: 8px auto 0; max-width: 620px; color: var(--gray-600); }
.pkg-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px;
  margin-top: 32px; }
.pkg-mini { display: flex; flex-direction: column; gap: 4px; background: var(--white); border: 1.5px solid var(--gold);
  border-radius: var(--radius-md, 10px); padding: 20px; color: inherit; text-decoration: none;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.2s, transform 0.2s; }
.pkg-mini:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pkg-mini h3 { margin: 0; font-size: 1.15rem; }
.pkg-mini-what { margin: 2px 0 6px; color: var(--gray-600); font-size: 0.9rem; }
.pkg-mini-price { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.pkg-go { margin-top: 10px; color: var(--blue); font-weight: 600; font-size: 0.9rem; }

/* ── a member course's page, in the main column after "About This Course" ──────────────────── */
.pkg-offers { margin-top: 32px; border: 1.5px solid var(--gold); border-radius: var(--radius-md, 10px);
  background: var(--white); padding: 18px 22px; }
.pkg-offers > h2 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.pkg-offer { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 8px 22px; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--gray-200); }
.pkg-offer-main { min-width: 0; }
.pkg-offer-buy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pkg-offer h3 { margin: 0; font-size: 1.05rem; }
.pkg-offer-what { margin: 4px 0 0; font-size: 0.85rem; color: var(--gray-600); }
.pkg-offer .pkg-courses { font-size: 0.82rem; margin-top: 6px; }
.pkg-offer .pkg-renewal { font-size: 0.85rem; }
.pkg-offer-price { margin: 4px 0 0; font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.pkg-more { display: inline-block; margin-top: 8px; font-size: 0.82rem; color: var(--blue); font-weight: 600; }

@media (max-width: 860px) {
  .pkg, .pkg-offer { grid-template-columns: minmax(0, 1fr); }
  .pkg-art { grid-template-columns: repeat(4, 56px); }
  .pkg-art > div { width: 56px; }
  .pkg-buy { border-left: 0; padding-left: 0; border-top: 1px solid var(--gray-200); padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pkg-mini, .pkg-mini:hover { transition: none; transform: none; }
}
