/* Promise & Prose: shared rules for the public storefront.
   Page layout lives in inline styles carried over from the approved mock-ups;
   this file holds the shared textures, link colours, focus styles and the
   small-screen adjustments. */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #f4f0e8 url(/assets/paper.webp) 0 0/520px auto repeat; overflow-wrap: break-word; }
a { color: #3e3c39; }
a:hover { color: #7f6a4c; }
.pp-paper { background: #e9e3d8 url(/assets/paper.webp) 0 0/520px auto repeat; }
.pp-pearl { background: #faf7f1 url(/assets/paper.webp) 0 0/520px auto repeat; }
[hidden] { display: none !important; }

/* Focus */
:focus-visible { outline: 2px solid #7f6a4c; outline-offset: 3px; }
.pp-dark :focus-visible { outline-color: #dcc9a8; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }

/* Screen-reader only, skip link, honeypot */
.pp-sr, .pp-hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.pp-skip { position: absolute; left: 12px; top: -80px; z-index: 10; background: #3e3c39; color: #ffffff; padding: 12px 18px; border-radius: 2px; font-family: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; }
.pp-skip:focus { top: 12px; color: #ffffff; }

/* Header: links and buttons are at least 40px tall */
.pp-nav a { display: inline-flex; align-items: center; min-height: 40px; }
.pp-nav a[aria-current="page"] { text-decoration: underline !important; text-decoration-color: #aa916c !important; text-underline-offset: 8px; }
.pp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; box-sizing: border-box; }
.pp-bar a { display: inline-flex; align-items: center; min-height: 40px; }
button.pp-btn:disabled { opacity: 0.6; cursor: default !important; }

/* Home: the five chapters */
.pp-step { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; gap: 18px; align-items: flex-start; padding: 18px 22px; border-radius: 2px; background: transparent; border: 1px solid #e3ddd2; }
.pp-step[aria-pressed="true"] { background: #f4f0e8; border: 1px solid #aa916c; box-shadow: 0 6px 16px rgba(60,64,72,0.08); }
.pp-screen { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }


/* Phones */
@media (max-width: 720px) {
  .pp-head > div { padding: 14px 20px !important; gap: 6px 12px !important; }
  .pp-head .pp-nav { order: 3; flex: 1 0 100%; justify-content: space-between; gap: 0 10px !important; font-size: 11px !important; letter-spacing: 0.1em !important; }
  .pp-foot a { display: block; padding: 9px 0; }
  .pp-foot > div > div:last-child { gap: 28px 40px !important; }
  /* small-caps text links and the Questions topic list: 40px tap targets */
  main a[style*="text-transform: uppercase"] { display: inline-flex; align-items: center; min-height: 40px; }
  nav[aria-label="Topics"] { gap: 0 !important; }
  nav[aria-label="Topics"] a { padding: 8px 0; }
}
@media (max-width: 520px) {
  /* Home: the three-across tiles keep whole words on a narrow screen */
  .pp-trio { gap: 10px !important; }
  .pp-trio span[style*="font-size: 21px"] { font-size: 17px !important; }
  .pp-trio span[style*="font-size: 14px"] { font-size: 13px !important; }
  .pp-trio .pp-paper span[style*="text-transform: uppercase"] { font-size: 9px !important; letter-spacing: 0.1em !important; text-align: center; }
  .pp-fam { gap: 8px !important; }
  .pp-fam > div { padding: 16px 10px !important; }
  .pp-fam p[style*="text-transform: uppercase"] { font-size: 10px !important; letter-spacing: 0.06em !important; }
  .pp-fam p[style*="font-size: 19px"] { font-size: 17px !important; }
}
@media (max-width: 380px) {
  .pp-head .pp-nav { letter-spacing: 0.06em !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
