/* Worksheet detail pages (/worksheets/<slug>/), layered on styles.css the way
   blog/blog.css is. The gallery at /worksheets/ keeps its own <style> block. */

.wsd-hero { padding: 36px 0 24px; }
.wsd-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-faint);
  margin-bottom: 28px;
}
.wsd-crumbs a { color: var(--text-dim); }
.wsd-crumbs a:hover { color: var(--amber-light); }
.wsd-crumbs [aria-current] { color: var(--text); }
.wsd-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}
.wsd-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wsd-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
}
.wsd-hero h1 {
  margin-top: 20px;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.wsd-for {
  margin: 14px 0 0;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 22px;
  color: var(--amber-light);
}
.wsd-hero .lede { margin-top: 18px; }
.wsd-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.wsd-actions .btn svg { width: 18px; height: 18px; margin-right: 8px; }
.wsd-meta { margin: 18px 0 0; font-size: 14px; color: var(--text-faint); }

.wsd-sheet { margin: 0; }
.wsd-sheet a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-elev);
  transform: rotate(1.2deg);
  transition: transform 0.3s ease;
}
.wsd-sheet a:hover { transform: rotate(0deg) translateY(-3px); }
.wsd-sheet img { width: 100%; height: auto; display: block; }
.wsd-sheet figcaption { margin-top: 16px; text-align: center; font-size: 13.5px; color: var(--text-faint); }

.wsd-body { padding: 40px 0 16px; }
.wsd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.wsd-block {
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.6);
}
.wsd-block-amber { background: linear-gradient(180deg, rgba(245, 158, 11, 0.07), rgba(17, 24, 39, 0.55)); }
.wsd-block h2 { font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.015em; margin: 10px 0 0; }
.wsd-block p { margin: 14px 0 0; color: var(--text-dim); font-size: 16px; line-height: 1.65; }
.wsd-block p a { color: var(--amber-light); text-decoration: underline; text-underline-offset: 3px; }
.wsd-list, .wsd-examples { margin: 16px 0 0; padding-left: 22px; color: var(--text-dim); font-size: 16px; line-height: 1.6; }
.wsd-list li, .wsd-examples li { margin-top: 8px; padding-left: 4px; }
.wsd-list li::marker { color: var(--amber); }
.wsd-examples li::marker { color: var(--amber); font-weight: 700; }
.wsd-types { font-size: 15px; }
.wsd-types strong { color: var(--text); font-weight: 600; }

.wsd-related { padding: 32px 0 64px; }
.wsd-related .section-head { margin-bottom: 28px; }
.wsd-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.wsd-related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(17, 24, 39, 0.6);
  overflow: hidden;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.wsd-related-card:hover { border-color: rgba(245, 158, 11, 0.4); transform: translateY(-2px); }
.wsd-related-thumb {
  display: block;
  position: relative;
  aspect-ratio: 8.5 / 6.5;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.wsd-related-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.wsd-related-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(11, 18, 32, 0.55));
  pointer-events: none;
}
.wsd-related-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 16px 18px; }
.wsd-related-body strong { font-size: 15px; line-height: 1.35; font-weight: 700; }
.wsd-related-meta { font-size: 13px; color: var(--text-faint); }
.wsd-related-all { margin: 28px 0 0; text-align: center; }

@media (max-width: 980px) {
  .wsd-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .wsd-sheet { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .wsd-grid, .wsd-related-grid { grid-template-columns: 1fr; }
  .wsd-block { padding: 22px 20px; }
}
@media (max-width: 640px) {
  .wsd-hero h1 { font-size: clamp(28px, 8vw, 38px); }
  .wsd-actions .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .wsd-sheet a, .wsd-related-card { transition: none; }
}
