/* Tala, the voice agent on Perspective articles: watch / listen / read, the "Ask Tala" card, the area form.
   Lifted from /perspectives/rimba-raya-real-risk (Dec 2026). Used with /assets/tala/tala.js. */
/* three ways in: watch, listen, read */
.ways { margin: 2rem 0 2.4rem; max-width: 960px; }
.ways video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0d1f2d; border-radius: 4px; }
.ways-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.way { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); text-decoration: none; font: 500 0.95rem/1.3 Inter, sans-serif; cursor: pointer; text-align: left; }
.way small { display: block; color: var(--ink-mute); font-weight: 400; font-size: 0.8rem; }
.way svg { width: 22px; height: 22px; flex: none; color: #14402c; }
.way[aria-pressed="true"] { border-color: #14402c; background: #f3f6f2; }
.tala { margin-top: 12px; padding: 14px 16px; border-left: 3px solid #d4af37; background: #f7f5ec; }
.tala p { margin: 0 0 0.5rem; font: 400 0.9rem/1.5 Inter, sans-serif; }
.tala audio { width: 100%; }
@media (max-width: 640px) { .ways-row { grid-template-columns: 1fr; } }
.cta { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; margin: 2.8rem 0; border-radius: 18px; overflow: hidden; color: #fff;
       background: radial-gradient(120% 140% at 0% 0%, #1f5a40 0%, #14402c 45%, #0d1f2d 100%); box-shadow: 0 24px 60px -24px rgba(13, 31, 45, .55); }
.cta-copy { padding: 2rem 2rem 1.8rem; }
.prose .cta h2 { color: #fff; margin: 0.4rem 0 0.6rem; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.prose .cta p { color: #dfeae2; }
.prose .cta-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); font: 500 0.78rem/1.4 Inter, sans-serif; letter-spacing: .02em; color: #cfe0d5; }
.cta-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: #d4af37; box-shadow: 0 0 0 0 rgba(212,175,55,.7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(212,175,55,0); } 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); } }
.prose ul.cta-ticks { list-style: none; padding: 0; margin: 0.4rem 0 1.4rem; }
.prose ul.cta-ticks li { position: relative; padding-left: 1.6rem; margin: 0.35rem 0; color: #e8f0ea; font-size: 0.98rem; }
.cta-ticks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 1rem; height: 1rem; border-radius: 50%; background: #d4af37 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2312211a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/80% no-repeat; }
.prose .cta-btn { display: inline-flex; align-items: center; gap: 10px; padding: 0.85rem 1.4rem; border-radius: 999px; background: #d4af37; color: #12211a; font: 600 1rem/1 Inter, sans-serif; text-decoration: none; box-shadow: 0 8px 24px -8px rgba(212,175,55,.8); transition: transform .15s, box-shadow .15s; }
.prose .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(212,175,55,.95); }
.cta-btn svg { width: 18px; height: 18px; transition: transform .15s; }
.cta-btn:hover svg { transform: translateX(3px); }
.prose .cta-fine { margin: 0.9rem 0 0; font: 400 0.78rem/1.4 Inter, sans-serif; color: #9fbcac; }
.cta-map { position: relative; display: block; min-height: 260px; overflow: hidden; }
.cta-map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform .6s; }
.cta-map:hover img { transform: scale(1.07); }
.cta-map::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #14402c 0%, rgba(20,64,44,0) 35%); }
.cta-map .pin { position: absolute; z-index: 2; left: 46%; top: 52%; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid #d4af37; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: ping 2s infinite; }
.cta-tag { position: absolute; z-index: 2; left: calc(46% + 22px); top: calc(52% - 6px); padding: 4px 10px; border-radius: 999px; background: rgba(13,31,45,.85); color: #fff; font: 500 0.8rem/1.3 Inter, sans-serif; white-space: nowrap; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } .cta-map { order: -1; min-height: 190px; } .cta-map::before { background: linear-gradient(0deg, #14402c 0%, rgba(20,64,44,0) 45%); } .cta-copy { padding: 1.4rem 1.3rem 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .cta-kicker .dot, .cta-map .pin { animation: none; } }
.cta-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.prose button.cta-btn, .prose a.cta-btn { border: 0; cursor: pointer; }
.cta-btn svg { width: 20px; height: 20px; }
.prose .cta-ghost { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 999px; padding: 0.7rem 1.1rem; font: 500 0.92rem/1 Inter, sans-serif; cursor: pointer; text-decoration: none; }
.prose .cta-ghost:hover { border-color: #d4af37; color: #f3dd8e; }
.cta-map .orb { position: absolute; z-index: 2; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; border: 0; padding: 0; background: none; cursor: pointer; --lvl: 0; }
.cta-map .orb:disabled { cursor: default; }
.orb-core { position: absolute; inset: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #12211a;
            background: radial-gradient(circle at 35% 30%, #fff6cf 0%, #f0cf63 30%, #d4af37 60%, #9a7618 100%);
            box-shadow: 0 0 0 4px rgba(255,255,255,.85), 0 10px 40px rgba(212,175,55,.65); transform: scale(calc(1 + var(--lvl) * .22)); transition: transform .08s linear; }
.orb-core svg { width: 34px; height: 34px; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(243,221,142,.75); animation: ripple 2.4s ease-out infinite; }
.orb-ring.r2 { animation-delay: 1.2s; }
@keyframes ripple { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.orb[data-state=connecting] .orb-core { animation: breathe 1s ease-in-out infinite alternate; }
@keyframes breathe { to { filter: brightness(1.25); } }
.orb[data-state=speaking] .orb-core { background: radial-gradient(circle at 35% 30%, #e9fff4 0%, #7fe0b0 35%, #2f9e6b 70%, #14402c 100%); color: #fff; }
.orb[data-state=speaking] .orb-ring, .orb[data-state=listening] .orb-ring { animation-duration: 1.4s; }
.cta-map .cta-tag { left: 50%; top: calc(50% + 66px); transform: translateX(-50%); }
.tala-live { grid-column: 1 / -1; padding: 0 2.2rem 1.6rem; color: #e8efe9; }
.tala-log { list-style: none; margin: 0 0 0.8rem; padding: 0.9rem 1rem; max-height: 220px; overflow-y: auto; background: rgba(0,0,0,.22); border-radius: 12px; font: 400 0.95rem/1.5 Inter, sans-serif; }
.tala-log li { margin: 0 0 0.5rem; padding: 0; }
.tala-log li::before { display: none; }
.tala-log li b { color: #d4af37; font-weight: 600; margin-right: .4em; }
.tala-log li.u b { color: #9fd3b8; }
.tala-say { display: flex; gap: 8px; margin-bottom: 0.8rem; }
.tala-say input { flex: 1; min-width: 0; padding: 0.7rem 0.9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; font: 400 1rem Inter, sans-serif; }
.tala-say button { border: 0; border-radius: 999px; padding: 0 1.1rem; background: #d4af37; color: #12211a; font: 600 0.95rem Inter, sans-serif; cursor: pointer; }
.tala-bar { display: flex; gap: 10px; justify-content: flex-end; }
.tala-card { margin: 0 0 0.8rem; padding: 0.9rem 1rem 1rem; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(212,175,55,.45); animation: cardin .35s ease-out; }
@keyframes cardin { from { opacity: 0; transform: translateY(6px); } }
.tala-card .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tala-card h3 { margin: 0; font: 700 1.15rem/1.2 Inter, sans-serif; color: #fff; }
.tala-card .pv { font: 400 0.85rem Inter, sans-serif; color: #b9c9be; }
.tala-card .lvl { display: inline-block; margin: 0.55rem 0 0.6rem; padding: 3px 10px; border-radius: 999px; font: 600 0.8rem/1.4 Inter, sans-serif; color: #12211a; }
.tala-card .scale { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #2f9e6b, #b8c94a 40%, #e0a03a 70%, #c8452f); }
.tala-card .mk { position: absolute; top: -5px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 2px #12211a; }
.tala-card .ends { display: flex; justify-content: space-between; font: 400 0.75rem Inter, sans-serif; color: #b9c9be; margin-top: 4px; }
.tala-card p { margin: 0.55rem 0 0; font: 400 0.9rem/1.45 Inter, sans-serif; color: #e8efe9; }
.tala-card p.fine { font-size: 0.78rem; color: #b9c9be; }
[data-sec].tala-show { outline: 3px solid #d4af37; outline-offset: 6px; border-radius: 6px; transition: outline-color 1.2s; }
.tala-pill { position: fixed; z-index: 40; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 999px;
             background: #0d1f2d; color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.35); font: 500 0.9rem/1 Inter, sans-serif; max-width: calc(100% - 32px); }
.tala-pill .lv { width: 10px; height: 10px; border-radius: 50%; background: #7fe0b0; box-shadow: 0 0 0 0 rgba(127,224,176,.7); animation: ping 1.6s infinite; flex: none; }
.tala-pill button { border: 0; border-radius: 999px; padding: 7px 12px; font: 600 0.85rem/1 Inter, sans-serif; cursor: pointer; white-space: nowrap; }
.tala-pill .pb { background: #d4af37; color: #12211a; } .tala-pill .pe { background: rgba(255,255,255,.12); color: #fff; }
.tala-pill span.t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tala-pill[hidden], .tala-say[hidden], .tala-live [hidden], .cta-acts [hidden] { display: none !important; }
.tala-ref { font: 400 0.8rem/1.4 Inter, sans-serif; color: #a9bdb2; margin: 0 0 0.6rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) { .cta-map { min-height: 240px; } .tala-live { padding: 0 1.3rem 1.3rem; } .cta-map .orb { width: 96px; height: 96px; margin: -48px 0 0 -48px; } }
@media (prefers-reduced-motion: reduce) { .orb-ring, .orb-core { animation: none !important; } }


html.modal-on { overflow: hidden; overscroll-behavior-x: none; }
.lbox button:focus-visible, .ask button:focus-visible { outline: 2px solid #1B7837; outline-offset: 2px; }
.lbox .lb-x, .ask .ask-x { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.lb-x svg, .ask-x svg { width: 14px; height: 14px; }
dialog.ask { width: min(580px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 4px; overflow: auto;
             background: var(--paper); color: var(--ink); box-shadow: 0 24px 64px rgba(18, 33, 26, .3); }
dialog.ask::backdrop, dialog.lbox::backdrop { background: rgba(18, 33, 26, .55); }
.ask-in { position: relative; padding: 24px 24px 22px; }
.ask .ask-x { position: absolute; top: 12px; right: 12px; border: 1px solid var(--ink-mute); background: #fff; color: var(--ink); cursor: pointer; }
.prose .ask h2 { font-size: 1.45rem; margin: 0 48px 0.35rem 0; }
.prose .ask-sub { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.ask .form { margin-top: 1.1rem; gap: 0.9rem 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ask .form__msg { margin-top: 1.1rem; }
.prose .ask-note { margin: 0; font: 400 0.8rem/1.5 Inter, sans-serif; color: var(--ink-mute); }
@media (max-width: 520px) { .ask-in { padding: 20px 16px 18px; } }

/* pages with their own link colours (e.g. Days, not years) must not repaint the card's ghost links */
#talk a.cta-ghost { color: #fff; text-decoration: none; }
#talk a.cta-ghost:hover { color: #f3dd8e; }
