/* Five product demonstrations, each in its own material language. */
.product-demo { position: relative; min-width: 0; width: 100%; margin: 0; }
.product-demo *, .product-demo *::before, .product-demo *::after { box-sizing: border-box; }
.product-demo button { cursor: pointer; font: 600 13px/1.35 var(--ui, system-ui); min-height: 44px; padding: 10px 14px; border: 1px solid currentColor; background: transparent; color: inherit; }
.product-demo button:focus-visible, .product-demo input:focus-visible { outline: 3px solid var(--pd-accent, currentColor); outline-offset: 4px; }
.pd-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.pd-controls[hidden] { display: none; }
.product-demo button:disabled { cursor: default; }
.pd-status { font: 13px/1.5 var(--ui, system-ui); min-height: 2.9em; margin: 14px 0 0; }
.pd-controls button[data-demo-play] { background: var(--pd-accent); color: var(--pd-button-ink); border-color: var(--pd-accent); }
.pd-controls button[data-demo-pause] { min-width: 76px; }
.pd-controls button[data-demo-pause]:disabled { border-style: dashed; }
.ps-verse-line { display: inline-block; max-width: 100%; vertical-align: top; }

/* BYF: a cover hinges away, leaving a quiet reading spread and a listening strip. */
.pd-byf { --pd-accent: #A84A0C; --pd-button-ink: #FFFAF1; color: #1E1A16; }
.pd-byf figcaption { font: 500 clamp(23px, 2.5vw, 30px)/1.25 var(--serif, Georgia); margin-bottom: 26px; text-align: left; }
.pd-book-stage { perspective: 1000px; padding: 20px 0; }
.pd-book-spread { position: relative; height: 290px; width: min(440px, 100%); margin: auto; transform-style: preserve-3d; }
.pd-book-left, .pd-book-right { position: absolute; top: 0; bottom: 0; width: 50%; padding: 24px 18px; background: #FFFAF1; border: 1px solid #C9A239; }
.pd-book-left { left: 0; border-radius: 12px 0 0 12px; }
.pd-book-right { right: 0; border-radius: 0 12px 12px 0; }
.pd-book-left > span, .pd-format { font: 700 11px/1.5 var(--ui); color: #A84A0C; letter-spacing: .04em; }
.pd-book-left p[lang] { font: 500 19px/1.8 var(--deva, serif); margin: 30px 0 16px; }
.pd-book-left p:last-child { font: 15px/1.6 var(--serif, Georgia); margin: 0; }
.pd-book-thought { font: 500 23px/1.5 var(--serif, Georgia); margin: 26px 0 18px; }
.pd-book-lines { display: grid; gap: 8px; }
.pd-book-lines i { display: block; height: 1px; background: #D8C5A5; }
.pd-book-lines i:last-child { width: 65%; }
.pd-book-cover { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; transform: rotateY(-175deg); transform-origin: 0 50%; backface-visibility: hidden; z-index: 2; }
.pd-book-cover img { display: block; width: 100%; height: 100%; object-fit: cover; border: 1px solid #A84A0C; border-radius: 0 12px 12px 0; }
.pd-listener { display: grid; grid-template-columns: 28px minmax(0, 1fr) 38px; align-items: center; gap: 12px; padding: 18px 0; border-block: 1px solid #D8C5A5; margin-top: 14px; }
.pd-listen-icon { width: 26px; height: 26px; color: #A84A0C; }
.pd-listener strong { display: block; font: 600 14px/1.4 var(--ui); }
.pd-listener span { display: block; font: 12px/1.5 var(--ui); color: #64533E; }
.pd-audio-track { height: 3px; background: #D8C5A5; margin-top: 12px; overflow: clip; }
.pd-audio-track i { display: block; height: 100%; background: #A84A0C; transform: scaleX(.38); transform-origin: left; }
.pd-audio-bars { display: flex; align-items: center; justify-content: space-between; height: 30px; }
.pd-audio-bars i { width: 3px; height: 24px; background: #A84A0C; }
.pd-audio-bars i:nth-child(2n) { height: 12px; }
.pd-format-controls { display: flex; gap: 0; }
.pd-format-controls button[aria-pressed=true] { background: #1E1A16; color: #FFFAF1; }

/* Radian: timed blocks travel into real arc geometry, not a page-progress clock. */
.pd-radian { --pd-accent: #C0C1FF; --pd-button-ink: #1C1D63; max-width: 1040px; margin: 48px auto 0; padding: 32px; border: 1px solid #36353E; border-radius: 24px; background: #131318; color: #E5E1E9; text-align: left; }
.pd-rd-heading h2 { font: 700 clamp(24px, 3vw, 36px)/1.15 var(--ui); letter-spacing: -.02em; margin: 0 0 8px; }
.pd-rd-heading p { margin: 0; font: 13px/1.5 var(--ui); color: #C7C5D0; }
.pd-day-builder { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 32px; margin-top: 24px; }
.pd-day-list { display: grid; gap: 12px; }
.pd-day-block { display: grid; gap: 4px; padding: 16px; border-radius: 16px; background: #262431; }
.pd-day-block span { font: 700 11px/1.3 var(--ui); letter-spacing: .08em; color: #C0C1FF; }
.pd-day-block strong { font: 600 18px/1.3 var(--ui); }
.pd-day-block time { font: 14px/1.5 var(--ui); color: #C7C5D0; }
.pd-tea { background: #1E2B24; }
.pd-tea span { color: #82C995; }
.pd-walk { background: #30271F; }
.pd-walk span { color: #F2B785; }
.pd-build-dial { display: block; width: min(100%, 370px); height: auto; margin: auto; color: #928F9B; overflow: visible; }
.pd-dial-hours text { fill: #E5E1E9; font: 14px var(--ui); }
.pd-dial-caption { fill: #C7C5D0; font: 9px var(--ui); letter-spacing: 1px; }
.pd-build-needle { transform-origin: 140px 140px; transform: rotate(275deg); }
.pd-radian .pd-status { color: #C7C5D0; }
.radian-page .rd-preset-pills { max-width: 100%; }
.radian-page main .rd-preset-btn { white-space: normal; }

/* RETROSPEED: a paper slip, physical keycaps and a real focused typing field. */
.rs-page :is(.rs-hero-card, .rs-section-card, .rs-game-card).v-reveal { opacity: 1; transform: none; transition: none; will-change: auto; }
.pd-retro { --pd-accent: #2D2319; --pd-button-ink: #FDF8EE; max-width: 800px; margin: 30px auto; border: 2px solid #2D2319; border-radius: 14px; background: #B9D2E8; color: #2D2319; padding: 20px; box-shadow: 5px 5px 0 #2D2319; text-align: left; }
.pd-type-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-bottom: 16px; }
.pd-type-title strong { font: 800 13px/1.4 var(--ui); letter-spacing: .06em; }
.pd-type-title > span { font: 12px/1.4 var(--ui); }
.pd-paper-run { padding: 20px 12px 12px; border-block: 2px solid #2D2319; overflow: clip; }
.pd-paper-slip { position: relative; background: #FDF8EE; border: 1px solid #2D2319; padding: 16px 18px 35px; min-height: 112px; }
.pd-paper-slip > span { font: 700 10px/1.4 var(--ui); letter-spacing: .12em; }
.pd-type-target { margin-top: 10px; font: 600 clamp(21px, 3vw, 34px)/1.4 ui-monospace, monospace; white-space: nowrap; }
.pd-type-target > span { color: #6B625A; }
.pd-type-target .is-correct { color: #244A37; background: #DCE8D5; }
.pd-type-target .is-wrong { color: #A02B24; background: #F4CEC3; text-decoration: underline; }
.pd-stamp { display: inline-block; position: absolute; right: 12px; bottom: 8px; border: 2px solid #244A37; padding: 2px 6px; color: #244A37; font: 800 13px/1 var(--ui); transform: rotate(-8deg); }
.pd-keyboard { display: flex; flex-wrap: wrap; gap: 7px; padding: 16px 0; }
.pd-key { display: grid; place-items: center; width: 35px; height: 35px; border: 1.5px solid #2D2319; border-radius: 6px; background: #FDF8EE; box-shadow: 0 4px 0 #2D2319; font: 700 13px/1 var(--ui); }
.pd-key-space { width: 72px; }
.pd-key.is-down { background: #F6C445; }
.pd-type-label { display: block; margin: 3px 0 7px; font: 600 14px/1.4 var(--ui); }
.pd-type-input { display: block; width: 100%; min-width: 0; min-height: 48px; border: 2px solid #2D2319; border-radius: 4px; padding: 8px 12px; background: #FDF8EE; color: #2D2319; font: 18px/1.4 ui-monospace, monospace; caret-color: #A02B24; }
.pd-type-results { display: flex; justify-content: space-between; gap: 8px; font: 13px/1.4 var(--ui); margin-top: 9px; }
.pd-retro .pd-status { margin-top: 10px; }

/* Krishna: the worry is held, its root is named, and one action gets its own space. */
.pd-krishna { --pd-accent: #0D3B3E; --pd-button-ink: #FFF9ED; color: #1F1A17; max-width: 480px; margin: auto; }
.pd-chat-note { font: 12px/1.5 var(--ui); color: #64533E; margin: 0 0 20px; }
.pd-chat-thread { display: grid; gap: 14px; }
.pd-chat-thread span { display: block; font: 700 11px/1.4 var(--ui); letter-spacing: .07em; margin-bottom: 8px; }
.pd-chat-thread p { font: 400 17px/1.5 Georgia, serif; margin: 0; }
.pd-worry { padding: 18px 20px; background: #E9DCC4; border: 1px solid #CDBB98; border-radius: 18px 18px 2px 18px; margin-left: 32px; }
.pd-worry p { font-style: italic; }
.pd-reply { padding: 22px; background: #F8F3E8; border: 1px solid #8AA8A5; border-radius: 18px 18px 18px 2px; margin-right: 18px; }
.pd-reply > span { color: #0D3B3E; }
.pd-reply p + p { margin-top: 12px; }
.pd-reply .pd-root { color: #0D3B3E; font-weight: 700; }
.pd-one-action { position: relative; background: #0D3B3E; color: #FFF9ED; padding: 20px 22px; margin-top: 6px; border-radius: 4px; overflow: clip; }
.pd-one-action p { font-size: 16px; }
.pd-one-action i { display: block; height: 2px; width: 45%; background: #E8A33D; margin-top: 18px; transform-origin: left; }

/* Margadarshak: primary geometry draws a branch into checks, leaving a backup. */
.margadarshak-page .md-hero .md-hero-visual { display: block; }
.pd-marga { --pd-accent: #1A1A1A; --pd-button-ink: #FFCC00; color: #1A1A1A; background: #F5F0E8; border: 3px solid #1A1A1A; padding: 24px; box-shadow: 8px 8px 0 #0055FF; }
.pd-marga h2 { margin: 0 0 22px; font: 800 clamp(27px, 3vw, 38px)/1.05 var(--ui); letter-spacing: -.03em; }
.pd-marga h2 em { font-style: normal; color: #B52D22; }
.pd-route-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-route-choices button { border: 2px solid #1A1A1A; font-weight: 800; background: #FFFDF7; min-height: 48px; }
.pd-route-choices button[aria-pressed=true] { background: #FFCC00; }
.pd-route-drawing { display: block; width: 100%; height: auto; margin: 14px 0 20px; overflow: visible; }
.pd-route-drawing text { font: 700 11px var(--ui); fill: #1A1A1A; }
.pd-route-arrival { transform-box: fill-box; transform-origin: center; }
.pd-route-result { background: #FFCC00; border: 2px solid #1A1A1A; padding: 16px; }
.pd-route-result > span { display: block; font: 700 11px/1.4 var(--ui); margin-bottom: 10px; }
.pd-route-result strong { display: block; font: 800 19px/1.25 var(--ui); }
.pd-route-result p { font: 14px/1.5 var(--ui); margin: 10px 0 0; }
.pd-backup-note { padding: 12px 0 0; margin: 0; font: 14px/1.5 var(--ui); }
.pd-full-route { display: inline-block; margin-top: 18px; font: 700 14px/1.5 var(--ui); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 768px) {
    .product-demo button { min-height: 48px; }
    .pd-byf { margin-top: 36px; }
    .pd-book-spread { height: 258px; }
    .pd-book-left, .pd-book-right { padding: 18px 12px; }
    .pd-book-left p[lang] { font-size: 16px; margin: 24px 0 18px; }
    .pd-book-thought { font-size: 18px; margin-top: 24px; }
    .pd-byf figcaption { font-size: 25px; margin-bottom: 16px; }
    .pd-listener { gap: 8px; }
    .pd-listener strong { font-size: 13px; }
    .pd-radian { margin-top: 36px; padding: 20px 16px; }
    .pd-day-builder { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .pd-day-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .pd-day-block { padding: 12px 8px; border-radius: 10px; }
    .pd-day-block strong { font-size: 13px; }
    .pd-day-block time { font-size: 11px; }
    .pd-build-dial { width: min(100%, 270px); }
    .pd-retro { padding: 16px 12px; margin: 24px 0; }
    .pd-type-title { align-items: start; }
    .pd-type-title > span { max-width: 100px; }
    .pd-paper-run { padding: 14px 0 10px; }
    .pd-paper-slip { padding: 12px 10px 35px; }
    .pd-keyboard { gap: 6px; }
    .pd-key { width: 30px; height: 32px; }
    .pd-key-space { width: 65px; }
    .pd-krishna { margin-top: 20px; }
    .pd-chat-thread p { font-size: 16px; }
    .pd-worry { margin-left: 20px; padding: 16px; }
    .pd-reply { margin-right: 0; padding: 18px; }
    .pd-one-action { padding: 18px; }
    .pd-marga { padding: 20px 16px; margin-top: 26px; }
    .pd-marga h2 { font-size: 28px; }
    .pd-route-choices { gap: 6px; }
    .pd-route-choices button { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .product-demo *, .product-demo *::before, .product-demo *::after { scroll-behavior: auto; }
}
