/* Policies product page (/policy-management) — the page's own mock-ups. Shared layout
   is static/css/product.css (ADR-0088). Classes pl-. */
.pl-l { display: block; height: 5px; border-radius: 3px; background: #e6e2d8; margin: 7px 0; width: 92%; }
.pl-l.s { width: 58%; } .pl-l.m { width: 76%; }

/* 1 — the book */
.pl-book { position: relative; display: flex; width: 280px; height: 200px; perspective: 900px; filter: drop-shadow(0 18px 26px rgba(16, 24, 40, .18)); }
.pl-page { position: relative; flex: 1; background: #fffdf7; padding: 16px 14px; font-size: .72rem; color: #3b3427; }
.pl-page.left { border-radius: 8px 0 0 8px; box-shadow: inset -14px 0 18px -14px rgba(0, 0, 0, .25); }
.pl-page.right { border-radius: 0 8px 8px 0; box-shadow: inset 14px 0 18px -14px rgba(0, 0, 0, .2); }
.pl-page small { display: block; font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: #a08c5b; }
.pl-page b { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; margin: 2px 0 6px; }
.pl-page em { position: absolute; bottom: 8px; font-style: normal; font-size: .6rem; color: #a0957d; }
.pl-page.left em { left: 14px; } .pl-page.right em { right: 14px; }
.pl-turn { position: absolute; right: 0; top: 0; width: 50%; height: 100%; transform-origin: left center; background: linear-gradient(90deg, #f6f1e3, #fffdf7);
  border-radius: 0 8px 8px 0; backface-visibility: hidden; opacity: 0; }
.pp-card.in .pl-turn { animation: plTurn 3.6s 1s ease-in-out infinite; }
@keyframes plTurn { 0% { transform: rotateY(0); opacity: 1; } 45% { transform: rotateY(-180deg); opacity: 1; } 46%, 100% { opacity: 0; transform: rotateY(-180deg); } }

/* 2 — AI draft */
.pl-draft { width: 270px; background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 12px 30px rgba(16, 24, 40, .1); font-size: .78rem; }
.pl-draft-in { display: flex; flex-direction: column; gap: 4px; }
.pl-draft-in small { font-size: .64rem; font-weight: 600; color: #6b7487; }
.pl-draft-in span { padding: 7px 10px; border: 1px solid #e3e7ee; border-radius: 8px; background: #fafbfd; }
.pl-btn { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0; padding: 7px 12px; border-radius: 8px; background: linear-gradient(135deg, #7c3aed, #5b5bd6); color: #fff;
  font-weight: 600; font-size: .72rem; }
.pl-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pl-sections span { display: flex; align-items: center; gap: 6px; font-size: .68rem; padding: 6px 8px; border-radius: 7px; background: #f3effd; color: #4c1d95;
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; transition-delay: calc(var(--i) * 220ms + .6s); }
.pl-sections i { font-size: .56rem; color: #7c3aed; }
.pp-card.in .pl-sections span { opacity: 1; transform: none; }

/* 3 — improve chips */
.pl-improve { width: 280px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pl-improve span { padding: 10px 14px; border-radius: 999px; background: #fff; box-shadow: 0 6px 16px rgba(16, 24, 40, .08); font-size: .78rem; font-weight: 600; color: #4b5568;
  opacity: 0; transform: scale(.85); transition: opacity .35s, transform .35s cubic-bezier(.2, 1.5, .4, 1); transition-delay: calc(var(--i) * 90ms + .3s); }
.pp-card.in .pl-improve span { opacity: 1; transform: none; }
.pl-improve span.on { background: linear-gradient(135deg, #7c3aed, #5b5bd6); color: #fff; box-shadow: 0 10px 24px rgba(124, 58, 237, .35); }
.pp-card.in .pl-improve span.on { animation: plGlow 2.2s 1.2s ease-in-out infinite; }
@keyframes plGlow { 50% { box-shadow: 0 10px 30px rgba(124, 58, 237, .6); transform: scale(1.05); } }

/* 4 — suggestions */
.pl-suggest { width: 270px; background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(16, 24, 40, .1); font-size: .78rem; }
.pl-suggest-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #eef0f4; font-weight: 600; color: #92600a; }
.pl-suggest-head i { color: #f59e0b; --fa-primary-color: #f59e0b; --fa-secondary-color: #fbbf24; }
.pl-suggest-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid #f5f6f9;
  opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s; transition-delay: calc(var(--i) * 140ms + .3s); }
.pl-suggest-row:last-child { border-bottom: 0; }
.pl-suggest-row b { font-size: .64rem; color: #7c3aed; background: #f3effd; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.pp-card.in .pl-suggest-row { opacity: 1; transform: none; }

/* 5 — acknowledgement bars */
.pl-acks { width: 270px; background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 12px 30px rgba(16, 24, 40, .1); display: grid; gap: 12px; font-size: .76rem; }
.pl-ack-top { display: flex; justify-content: space-between; margin-bottom: 5px; }
.pl-ack-top span { color: #8a93a4; font-variant-numeric: tabular-nums; }
.pl-bar { height: 8px; border-radius: 4px; background: #eef1f6; overflow: hidden; }
.pl-bar span { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #16a34a, #0d9488); transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i, 0) * 150ms + .3s); }
.pp-card.in .pl-bar span, .pp-scene.on .pl-bar span { width: var(--p); }
.pl-remind { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid #d8dce5; font-size: .7rem; font-weight: 600; color: #4b5568; }

/* 6 — contents */
.pl-toc { width: 250px; background: #fffdf7; border-radius: 6px; padding: 16px; box-shadow: 0 14px 30px rgba(16, 24, 40, .12); font-size: .74rem; color: #3b3427; }
.pl-toc-title { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; margin-bottom: 4px; }
.pl-toc-cat { display: block; margin-top: 8px; font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a08c5b; }
.pl-toc-row { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; }
.pl-toc-row i { flex: 1; border-bottom: 1.5px dotted #cfc6b0; transform: translateY(-3px); }

/* ---- walkthrough ---- */
.pl-brief { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-size: .72rem; font-weight: 600; color: #6b7487; }
.pl-brief span { font-size: .84rem; font-weight: 500; color: #1d2433; border: 1px solid #e3e7ee; border-radius: 9px; padding: 10px 12px; background: #fafbfd; line-height: 1.45; }
.pp-scene .pp-fake-btn i { margin-right: 4px; }
.pl-editor { font-size: .84rem; line-height: 1.55; }
.pl-ed-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.pl-ed-tabs span { padding: 6px 12px; border-radius: 8px; font-size: .74rem; color: #6b7487; background: #f1f3f8; }
.pl-ed-tabs span.on { background: #1d2433; color: #fff; }
.pl-editor h4 { margin: 10px 0 4px; font-size: .9rem; font-family: Georgia, "Times New Roman", serif; }
.pl-editor p { margin: 0; color: #3c4557; }
.pl-editor p b { background: #fff3c4; padding: 0 3px; border-radius: 3px; }
.pp-scene.on .pl-editor h4, .pp-scene.on .pl-editor p { animation: ppRow .45s both; }
.pp-scene.on .pl-editor p:nth-of-type(1) { animation-delay: .15s; } .pp-scene.on .pl-editor h4:nth-of-type(2) { animation-delay: .4s; } .pp-scene.on .pl-editor p:nth-of-type(2) { animation-delay: .55s; }
.pl-note { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 8px 10px; border-radius: 8px; background: #fff7e6; color: #92600a; font-size: .74rem; }
.pl-switch-row { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e3e7ee; border-radius: 12px; }
.pl-switch { flex: none; position: relative; width: 38px; height: 22px; border-radius: 999px; background: #cbd2df; transition: background .3s .4s; }
.pl-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .3s .4s; }
.pp-scene.on .pl-switch.on { background: #16a34a; } .pp-scene.on .pl-switch.on::after { left: 19px; }
.pl-status { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #8a93a4; }
.pl-pill { padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.pl-pill.draft { background: #f1f3f8; color: #6b7487; }
.pl-pill.pub { background: #dcfce7; color: #15803d; }
.pp-scene.on .pl-pill.pub { animation: esDropIn .5s 1s both cubic-bezier(.2, 1.4, .4, 1); }
@keyframes esDropIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.pp-scene.on .pl-publish .pp-sent { animation: ppRow .5s 1.4s both; }
.pl-tracker { display: grid; gap: 8px; }
.pl-ack.big { margin-bottom: 6px; font-size: .86rem; }
.pl-ack.big .pl-bar { height: 10px; }
.pl-person { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f2f3f7; font-size: .82rem; }
.pl-person .pp-av { width: 28px; height: 28px; font-size: .62rem; }
.pl-st { margin-left: auto; font-size: .7rem; font-weight: 600; color: #92600a; background: #fff7e6; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pl-st.ok { color: #15803d; background: #dcfce7; }
.pp-scene.on .pl-person { animation: ppRow .4s both; animation-delay: calc(var(--i) * 120ms + .2s); }
.pl-tracker .pp-fake-btn { justify-self: start; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .pl-turn { animation: none !important; }
  .pl-sections span, .pl-improve span, .pl-suggest-row { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pl-bar span { width: var(--p); transition: none; }
}
