/* Pink House vision layer. Default look is unchanged until High contrast is on. */

.ph-listen-first {
  display: block;
  background: #000;
  color: #ffd700;
  border: 3px solid #ffd700;
  padding: 1rem 1.1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 0 0 1.2rem;
}
.ph-listen-first:hover,
.ph-listen-first:focus {
  background: #ffd700;
  color: #000;
}
.ph-listen-first span {
  display: block;
  font-weight: 400;
  margin-top: 0.35rem;
  font-size: 1.05rem;
}

.ph-skip {
  position: absolute;
  left: 0.75rem;
  top: -6rem;
  z-index: 10000;
  padding: 0.55rem 0.9rem;
  background: #000;
  color: #ffd700;
  font-weight: 700;
  text-decoration: none;
  border: 3px solid #ffd700;
}
.ph-skip:focus {
  top: 0.75rem;
}

.ph-narrator-off {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10001;
  background: #000;
  color: #ffd700;
  border: 3px solid #ffd700;
  padding: 0.55rem 0.75rem 0.6rem;
  max-width: 14rem;
  font-family: Georgia, serif;
  line-height: 1.3;
}
.ph-narrator-off p {
  margin: 0;
  color: #ffd700;
  font-size: 1rem;
  font-weight: 700;
}
.ph-narrator-off .ph-narrator-off-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.ph-narrator-off kbd {
  font: inherit;
  font-weight: 700;
  color: #000;
  background: #ffd700;
  padding: 0 0.22em;
}

body[data-slug] .nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ph-vision-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-left: auto;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.92rem;
  letter-spacing: normal;
  text-transform: none;
}

.ph-vision-bar button,
.ph-vision-bar a {
  font: inherit;
  font-weight: 700;
  color: var(--ink, #111);
  background: var(--surface, #fffcf8);
  border: 2px solid var(--ink, #111);
  padding: 0.28rem 0.65rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}

.ph-vision-bar button[aria-pressed="true"] {
  background: #000;
  color: #ffd700;
  border-color: #ffd700;
}

.ph-master-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 2px solid #111;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}
.ph-master-sm img {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: contain;
}
.ph-master-sm.is-on {
  border-color: #e2187a;
  box-shadow: 0 0 0 3px #e2187a;
}

.plate {
  margin: 1.5rem 0 2rem;
}
.plate-group {
  margin: 1.75rem 0 0;
  padding-top: 1.1rem;
  border-top: 2px solid #000;
}
.plate-group h2 {
  margin: 0 0 0.65rem;
  border: 0;
  padding: 0;
}
.plate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid #cfc6b8;
}
.plate-row p {
  margin: 0.25rem 0 0;
  font-size: 1.15rem;
}
.plate-row strong {
  display: block;
  font-size: 1.25rem;
}
.plate-switch {
  min-width: 8.5rem;
  text-align: right;
}
a.plate-off,
.plate-switch button,
.plate-switch a.plate-off {
  font: inherit;
  font-weight: 700;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.plate-switch button[aria-pressed="true"] {
  background: #e2187a;
  color: #fff;
  border-color: #b0125f;
}
.plate-switch button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.plate-keys {
  background: #000;
  color: #ffd700;
  border: 2px solid #ffd700;
  padding: 0.4rem 0.55rem;
  font-weight: 700;
  display: inline-block;
}
.plate-keys kbd {
  font: inherit;
  font-weight: 700;
  color: #000;
  background: #ffd700;
  padding: 0 0.2em;
}

.ph-vision-hint {
  font-size: 0.78rem;
  color: var(--quiet, #5a5a5a);
}

.ph-listen {
  margin: 0.6rem 0 1rem;
}

.ph-listen audio {
  display: block;
  width: min(100%, 28rem);
  margin-top: 0.4rem;
}

.ph-listen audio[hidden] {
  display: none;
}

:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

html {
  overflow-x: clip;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* High-contrast theme — opt in only */
html[data-ph-theme="high-contrast"] {
  --ink: #ffd700;
  --muted: #ffffff;
  --quiet: #ffffff;
  --paper: #000000;
  --surface: #000000;
  --line: #ffd700;
  --pink: #ffd700;
  --pink-deep: #ffd700;
  --rule: #ffd700;
  --accent: #ffd700;
  --slate: #ffffff;
  color-scheme: dark;
}

html[data-ph-theme="high-contrast"] body {
  background: #000 !important;
  background-image: none !important;
  color: #fff !important;
}

html[data-ph-theme="high-contrast"] a {
  color: #ffd700;
}

html[data-ph-theme="high-contrast"] .site-header,
html[data-ph-theme="high-contrast"] .site-nav,
html[data-ph-theme="high-contrast"] .card,
html[data-ph-theme="high-contrast"] .not-ai-feature,
html[data-ph-theme="high-contrast"] .buy-box,
html[data-ph-theme="high-contrast"] .book-toc,
html[data-ph-theme="high-contrast"] .export-toolbar,
html[data-ph-theme="high-contrast"] .masthead,
html[data-ph-theme="high-contrast"] .search-bar,
html[data-ph-theme="high-contrast"] .piece,
html[data-ph-theme="high-contrast"] footer,
html[data-ph-theme="high-contrast"] .hero,
html[data-ph-theme="high-contrast"] .article-wrap,
html[data-ph-theme="high-contrast"] .nav,
html[data-ph-theme="high-contrast"] .ph-vision-box,
html[data-ph-theme="high-contrast"] .ph-sight-widget,
html[data-ph-theme="high-contrast"] .ph-startup,
html[data-ph-theme="high-contrast"] .ph-sight-zone,
html[data-ph-theme="high-contrast"] .plate-row,
html[data-ph-theme="high-contrast"] .page-guide {
  background: #000 !important;
  color: #fff !important;
  border-color: #ffd700 !important;
}

html[data-ph-theme="high-contrast"] h1,
html[data-ph-theme="high-contrast"] h2,
html[data-ph-theme="high-contrast"] h3,
html[data-ph-theme="high-contrast"] h4,
html[data-ph-theme="high-contrast"] .logo-name,
html[data-ph-theme="high-contrast"] .masthead-name {
  color: #ffd700 !important;
}

html[data-ph-theme="high-contrast"] .not-ai-flag,
html[data-ph-theme="high-contrast"] .not-ai-kicker,
html[data-ph-theme="high-contrast"] .ph-vision-kicker,
html[data-ph-theme="high-contrast"] .guide-kicker,
html[data-ph-theme="high-contrast"] .guide-title,
html[data-ph-theme="high-contrast"] .guide-label,
html[data-ph-theme="high-contrast"] .ph-sight-why {
  color: #ffd700 !important;
  border-color: #ffd700 !important;
}

html[data-ph-theme="high-contrast"] button,
html[data-ph-theme="high-contrast"] input,
html[data-ph-theme="high-contrast"] .export-toolbar button,
html[data-ph-theme="high-contrast"] .export-toolbar a {
  background: #000 !important;
  color: #ffd700 !important;
  border-color: #ffd700 !important;
}

html[data-ph-theme="high-contrast"] table,
html[data-ph-theme="high-contrast"] th,
html[data-ph-theme="high-contrast"] td,
html[data-ph-theme="high-contrast"] .note,
html[data-ph-theme="high-contrast"] kbd,
html[data-ph-theme="high-contrast"] .guide-toc,
html[data-ph-theme="high-contrast"] .guide-coach,
html[data-ph-theme="high-contrast"] .start-doors a,
html[data-ph-theme="high-contrast"] .start-check li,
html[data-ph-theme="high-contrast"] .ph-listen-first,
html[data-ph-theme="high-contrast"] .guide-doors a,
html[data-ph-theme="high-contrast"] pre.guide-snippet {
  background: #000 !important;
  color: #fff !important;
  border-color: #ffd700 !important;
}

html[data-ph-theme="high-contrast"] .cards,
html[data-ph-theme="high-contrast"] .card {
  border-color: #ffd700 !important;
}

.guide-page .guide-read {
  font: inherit;
  font-weight: 700;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  margin: 0 0 0.85rem;
}
.guide-page .guide-read[aria-pressed="true"] {
  background: #000;
  color: #ffd700;
  border-color: #ffd700;
}
.guide-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 1.2rem 0 1.6rem;
}
.guide-doors a:first-child {
  grid-column: 1 / -1;
  background: #000;
  color: #ffd700;
  border-color: #ffd700;
}
.guide-doors a {
  display: block;
  color: #000;
  background: #fff;
  border: 3px solid #000;
  padding: 1rem 1.1rem;
  text-decoration: none;
  font-weight: 700;
}
.guide-doors a span {
  display: block;
  font-weight: 400;
  margin-top: 0.35rem;
}
.guide-toc {
  background: #fff;
  border: 2px solid #000;
  padding: 1rem 1.1rem 1.1rem;
  margin: 1.2rem 0 1.6rem;
}
.guide-toc ol {
  margin: 0.4rem 0 0;
  padding-left: 1.3em;
}
.guide-toc li {
  margin: 0.35rem 0;
}
.guide-stop {
  background: #000;
  color: #ffd700;
  border: 3px solid #ffd700;
  padding: 1.1rem 1.15rem;
  margin: 1.2rem 0 1.6rem;
}
.guide-stop h2,
.guide-stop p,
.guide-stop li,
.guide-stop strong {
  color: #ffd700;
}
.guide-stop kbd {
  font: inherit;
  font-weight: 700;
  color: #000;
  background: #ffd700;
  border: 0;
  padding: 0 0.22em;
}
.guide-coach {
  background: #fff8e7;
  border: 2px solid #000;
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.4rem;
}
.guide-coach p:first-child {
  margin-top: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.92em;
}
.guide-keys-card {
  background: #000;
  color: #ffd700;
  border: 3px solid #ffd700;
  padding: 1.1rem 1.15rem;
  margin: 1.4rem 0;
}
.guide-keys-card h2,
.guide-keys-card p,
.guide-keys-card li {
  color: #ffd700;
  border: 0;
}
.guide-keys-card kbd {
  font: inherit;
  font-weight: 700;
  color: #000;
  background: #ffd700;
  border: 0;
  padding: 0 0.22em;
}
.guide-tech {
  font-size: 1rem;
  margin-top: 1rem;
}
@media print {
  .ph-skip,
  .ph-vision-bar,
  .guide-read,
  .plate-switch button,
  .print-hide {
    display: none !important;
  }
  .guide-coach {
    break-inside: avoid;
  }
  a[href]::after {
    content: none !important;
  }
}
@media (max-width: 40rem) {
  .ph-vision-bar {
    width: 100%;
    margin: 0.75rem 0 0;
  }
  body {
    max-width: 100%;
  }
  .guide-doors {
    grid-template-columns: 1fr;
  }
  .guide-doors a:first-child {
    grid-column: auto;
  }
}
