/* Handbook — TOC layout (static HTML, CSS-only “covers”) */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pa-hb-book-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.pa-hb {
  --hb-muted: rgba(255, 255, 255, 0.58);
  --hb-fg: rgba(255, 255, 255, 0.92);
  background: #000;
  color: var(--hb-fg);
  min-height: 100vh;
}

.pa-hb__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #000;
  background-image: radial-gradient(circle at 1px 1px, rgba(100, 100, 110, 0.28) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.35;
}

.pa-hb__shell {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.pa-hb__hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 2rem;
  text-align: center;
}

.pa-hb__kicker {
  margin: 0 0 0.5rem;
  font-size: clamp(0.875rem, 2vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 12%, #a8a8a8 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-top: 22vh;
}

.pa-hb__title {
  margin: 0;
  font-family: var(--font-display, ui-serif, Georgia, serif);
  font-size: clamp(3.5rem, 18vw, 10rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #f5f5f5, #9a9a9a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.15);
}

.pa-hb__title br {
  display: none;
}

@media (max-width: 639px) {
  .pa-hb__title br {
    display: inline;
  }
}

.pa-hb__lead {
  max-width: 28rem;
  margin: 1.25rem auto 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--hb-muted);
}

.pa-hb__search {
  display: flex;
  justify-content: center;
  margin: 1.75rem 0 0;
}

.pa-hb__search a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: min(16rem, 70vw);
  padding: 0.5rem 0.75rem 0.5rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pa-hb__search a:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.pa-hb__search kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  border-radius: 0.35rem;
  font-size: 0.65rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
}

.pa-hb__panels {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  margin-top: 2rem;
}

.pa-hb-panel {
  position: relative;
  border-radius: 0.75rem;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

.pa-hb-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  border-radius: calc(0.75rem - 1px);
  padding: 2rem 1.5rem 1.25rem;
  background:
    linear-gradient(90deg, transparent, transparent),
    radial-gradient(30% 36% at 0% 60%, rgba(255, 255, 255, 0.05), transparent 54%),
    linear-gradient(180deg, #111, rgba(0, 0, 0, 0.5));
}

@media (min-width: 768px) {
  .pa-hb-panel__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 3.5rem;
    padding: 2rem 2.5rem 1.5rem 3rem;
  }
}

.pa-hb-book-wrap {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  margin-top: -3rem;
}

@media (min-width: 768px) {
  .pa-hb-book-wrap {
    justify-content: flex-start;
    margin-top: -4rem;
    padding-left: 0.5rem;
  }
}

.pa-hb-book {
  position: relative;
  width: 214px;
  height: 314px;
  transform-style: preserve-3d;
  perspective: 1000px;
  transform: rotateY(28deg);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  box-shadow: 20px 20px 24px rgba(0, 0, 0, 0.35);
}

.pa-hb-panel:hover .pa-hb-book {
  transform: rotateY(0deg);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
}

.pa-hb-book__spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 100%;
  background: linear-gradient(180deg, #2a2a2a, #2a2a2a 50%, #000 100%);
  transform-origin: left center;
  transform: rotateY(90deg);
  box-shadow:
    inset -1px 0 4px rgba(0, 0, 0, 0.35),
    inset 1px 0 2px rgba(255, 255, 255, 0.08);
}

.pa-hb-book__face {
  position: absolute;
  inset: 0;
  border-radius: 1px;
  overflow: hidden;
}

.pa-hb-book__face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.15) 100%
  );
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.pa-hb-book--company .pa-hb-book__face {
  background: linear-gradient(160deg, #1a3a52 0%, #0d1520 45%, #05080c 100%);
}

.pa-hb-book--people .pa-hb-book__face {
  background: linear-gradient(160deg, #3a1a42 0%, #1a0d22 50%, #08050c 100%);
}

.pa-hb-book--engineering .pa-hb-book__face {
  background: linear-gradient(160deg, #1a2d38 0%, #0e181f 50%, #050a0e 100%);
}

.pa-hb-book--design .pa-hb-book__face {
  background: linear-gradient(160deg, #2a2438 0%, #15101c 50%, #0a080e 100%);
}

.pa-hb-book--success .pa-hb-book__face {
  background: linear-gradient(160deg, #1a3834 0%, #0d1a18 50%, #050c0b 100%);
}

.pa-hb-book--resources .pa-hb-book__face {
  background: linear-gradient(160deg, #38321a 0%, #1c180d 50%, #0c0b05 100%);
}

.pa-hb-book--ai-guide .pa-hb-book__face {
  background: linear-gradient(160deg, #2a3d1a 0%, #141f0e 50%, #080c05 100%);
}

.pa-hb-book__label {
  position: absolute;
  bottom: 1.25rem;
  left: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.pa-hb-panel__body {
  flex: 1;
  min-width: 0;
  margin-top: -0.5rem;
}

@media (min-width: 768px) {
  .pa-hb-panel__body {
    margin-top: 0;
  }
}

.pa-hb-panel__h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display, ui-serif, Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: -0.02em;
}

.pa-hb-panel__ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 1rem;
  line-height: 1.65;
}

@media (min-width: 1024px) {
  .pa-hb-panel__ul {
    grid-template-columns: 1fr 1fr;
  }
}

.pa-hb-panel__ul a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.pa-hb-panel__ul a:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

/* ─── Light theme (data-pa-theme=day); body/.pa-hb__bg/.pa-hb__kicker/.pa-hb__title in landing.css ─── */
html[data-pa-theme="day"] .pa-hb__search a {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  backdrop-filter: blur(12px);
}

html[data-pa-theme="day"] .pa-hb__search a:hover {
  border-color: rgba(9, 9, 11, 0.16);
  background: #fff;
  color: var(--fg);
}

html[data-pa-theme="day"] .pa-hb__search kbd {
  background: rgba(9, 9, 11, 0.06);
  color: var(--muted);
}

html[data-pa-theme="day"] .pa-hb-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0));
}

html[data-pa-theme="day"] .pa-hb-panel__inner {
  background:
    linear-gradient(90deg, transparent, transparent),
    radial-gradient(30% 36% at 0% 60%, rgba(37, 99, 235, 0.07), transparent 54%),
    linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

html[data-pa-theme="day"] .pa-hb-book {
  box-shadow: 16px 18px 28px rgba(15, 23, 42, 0.12);
}

html[data-pa-theme="day"] .pa-hb-panel:hover .pa-hb-book {
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
}

html[data-pa-theme="day"] .pa-hb-book__spine {
  background: linear-gradient(180deg, #f1f5f9, #e2e8f0 52%, #cbd5e1 100%);
  box-shadow:
    inset -1px 0 3px rgba(15, 23, 42, 0.1),
    inset 1px 0 2px rgba(255, 255, 255, 0.9);
}

html[data-pa-theme="day"] .pa-hb-book__face::after {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.65) 0%,
    transparent 44%,
    rgba(15, 23, 42, 0.07) 100%
  );
  mix-blend-mode: normal;
}

html[data-pa-theme="day"] .pa-hb-book--company .pa-hb-book__face {
  background: linear-gradient(160deg, #f0f9ff 0%, #bae6fd 38%, #38bdf8 72%, #0284c7 100%);
}

html[data-pa-theme="day"] .pa-hb-book--people .pa-hb-book__face {
  background: linear-gradient(160deg, #faf5ff 0%, #e9d5ff 40%, #c084fc 70%, #7c3aed 100%);
}

html[data-pa-theme="day"] .pa-hb-book--engineering .pa-hb-book__face {
  background: linear-gradient(160deg, #ecfeff 0%, #a5f3fc 38%, #22d3ee 72%, #0e7490 100%);
}

html[data-pa-theme="day"] .pa-hb-book--design .pa-hb-book__face {
  background: linear-gradient(160deg, #f5f3ff 0%, #ddd6fe 40%, #a78bfa 72%, #5b21b6 100%);
}

html[data-pa-theme="day"] .pa-hb-book--success .pa-hb-book__face {
  background: linear-gradient(160deg, #ecfdf5 0%, #a7f3d0 38%, #34d399 72%, #047857 100%);
}

html[data-pa-theme="day"] .pa-hb-book--resources .pa-hb-book__face {
  background: linear-gradient(160deg, #fffbeb 0%, #fde68a 40%, #fbbf24 72%, #b45309 100%);
}

html[data-pa-theme="day"] .pa-hb-book--ai-guide .pa-hb-book__face {
  background: linear-gradient(160deg, #f7fee7 0%, #d9f99d 38%, #84cc16 72%, #3f6212 100%);
}

html[data-pa-theme="day"] .pa-hb-book__label {
  color: rgba(15, 23, 42, 0.62);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

html[data-pa-theme="day"] .pa-hb-panel__h2 {
  color: var(--hb-fg);
}

html[data-pa-theme="day"] .pa-hb-panel__ul a {
  color: var(--muted);
  text-decoration-color: rgba(9, 9, 11, 0.22);
}

html[data-pa-theme="day"] .pa-hb-panel__ul a:hover {
  color: var(--pa-brand-deep);
  text-decoration-color: rgba(var(--pa-brand-rgb), 0.38);
}
