/* Talk circle (engine/js/talk-circle.js): a see-through circle with one brief question in large type, its padding
   a share of its diameter (--talk-d), so its text stays well inside the circle. Its two rings
   pulse slowly, one swelling and one rippling outward, while the words stay still. A slight dark wash inside keeps
   the white words readable on any background. The ring's color and pace follow the voice widget: blue-teal and slow
   while waiting, mint while listening, violet while thinking, rose while Claude speaks.
   .talk-circle-area holds it, centered, unless the page positions the area (project/goals: fixed above its tabs). */
.talk-circle-area { display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
/* The circle's slot (talk-circle.js): the circle's full size, so the circle shrinks and moves inside it while what
   else is in the area, stacked below it, stays put. Hidden (talk-circle.js place) hides the circle only, keeping its
   size, so it can be sized to fit before it shows. */
.talk-circle-slot { flex: none; display: flex; align-items: center; justify-content: center; width: var(--talk-d, 400px); height: var(--talk-d, 400px); }
/* Moved right (--talk-shift) while sent to the right (talk-circle.js moveTo) or while the lower-left panel (#beanPanel) is
   open, else moved up (--talk-lift) above that panel, with its voice buttons hidden (talk-circle.js liftAbove).
   Moved to where a drag let it go by --talk-free-x and --talk-free-y. */
.talk-circle-area { translate: calc(var(--talk-shift, 0px) + var(--talk-free-x, 0px)) calc(var(--talk-free-y, 0px) - var(--talk-lift, 0px)); transition: translate 0.6s ease; }
.talk-circle-area.talk-circle-bean > .talk-circle-voices { display: none; }
.talk-circle-area[hidden] { display: flex; }
.talk-circle-area[hidden] > .talk-circle-slot { visibility: hidden; }
.talk-circle {
  --talk-ring: rgba(150, 215, 255, 0.75); --talk-glow: rgba(90, 170, 255, 0.35); --talk-pace: 6s;
  pointer-events: auto; position: relative; box-sizing: border-box; flex: none;
  width: var(--talk-d, 400px); height: var(--talk-d, 400px); padding: calc(var(--talk-d, 400px) * 0.16); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7em;
  font: inherit; color: #fff; text-align: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle, rgba(8, 14, 26, 0.42) 0%, rgba(8, 14, 26, 0.30) 55%, rgba(8, 14, 26, 0.12) 72%, rgba(255, 255, 255, 0.06) 100%);
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 0, 0, 0.45);
}
.talk-circle::before, .talk-circle::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--talk-ring);
  box-shadow: 0 0 40px 6px var(--talk-glow), inset 0 0 40px 4px var(--talk-glow);
  transition: border-color 1.2s ease, box-shadow 1.2s ease;
  animation: talk-circle-swell var(--talk-pace) ease-in-out infinite;
}
.talk-circle::after { box-shadow: 0 0 24px 2px var(--talk-glow); animation-name: talk-circle-ripple; animation-timing-function: ease-out; }
.talk-circle[data-state="listening"] { --talk-ring: rgba(140, 240, 200, 0.9); --talk-glow: rgba(70, 220, 160, 0.40); --talk-pace: 2.6s; }
.talk-circle[data-state="thinking"] { --talk-ring: rgba(195, 170, 255, 0.85); --talk-glow: rgba(150, 115, 255, 0.38); --talk-pace: 3.4s; }
.talk-circle[data-state="speaking"] { --talk-ring: rgba(255, 180, 205, 0.85); --talk-glow: rgba(255, 120, 170, 0.36); --talk-pace: 3s; }
.talk-circle:focus-visible { outline: 3px solid #fff; outline-offset: 8px; }
/* While the voice widget's large words show, the circle shrinks to 60% (talk-circle.js TALK_SMALL) and glides to a
   clear spot (setSmall: --talk-dx and --talk-dy move it from its place), with the next question in smaller words, up
   to five lines. */
.talk-circle { transition: width 0.9s ease, height 0.9s ease, transform 1.2s ease; }
.talk-circle.talk-circle-small {
  width: calc(var(--talk-d, 400px) * 0.6); height: calc(var(--talk-d, 400px) * 0.6); padding: calc(var(--talk-d, 400px) * 0.07);
  transform: translate(var(--talk-dx, 0px), var(--talk-dy, 0px));
}
.talk-circle-small .talk-circle-question {
  font-size: clamp(15px, calc(var(--talk-d, 400px) * 0.04), 18px); line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden;
}
.talk-circle-small .talk-circle-hint, .talk-circle-small .talk-circle-links { display: none; }
@keyframes talk-circle-swell { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.035); opacity: 1; } }
@keyframes talk-circle-ripple { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.16); opacity: 0; } }
.talk-circle-question { font-size: clamp(24px, calc(var(--talk-d, 400px) * 0.075), 34px); line-height: 1.22; font-weight: 600; letter-spacing: -0.005em; }
.talk-circle-hint { font-size: clamp(17px, calc(var(--talk-d, 400px) * 0.042), 20px); line-height: 1.3; color: rgba(255, 255, 255, 0.9); white-space: pre-line; }
/* Smaller than TALK_MIN, where a page's side box allows it (talk-circle.js centered), the circle shows just its question,
   in smaller words. */
.talk-circle-compact .talk-circle-question { font-size: max(13px, calc(var(--talk-d, 400px) * 0.1)); line-height: 1.15; }
.talk-circle-compact :is(.talk-circle-hint, .talk-circle-links) { display: none; }
/* Balanced lines, so neither leaves a word alone on its last line. */
.talk-circle-question, .talk-circle-hint { text-wrap: balance; }
.talk-circle-hint:empty, .talk-circle-links:empty { display: none; }
/* Voice choices below the circle, shown by its Agents button (talk-circle.js toggleVoices, showVoices): toggles, several can be on. */
.talk-circle-voices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: min(560px, calc(100vw - 32px)); margin-top: 22px; pointer-events: auto; }
.talk-circle-voices[hidden] { display: none; }
.talk-circle-area[hidden] > .talk-circle-voices { visibility: hidden; }
.talk-circle-voice { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px;
  background: rgba(10, 12, 20, 0.35); color: #fff; font: inherit; font-size: 15px; line-height: 1.3; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.talk-circle-voice small { font-size: 12px; opacity: 0.75; }
.talk-circle-voice:hover { background: rgba(255, 255, 255, 0.16); }
/* In light mode (body without .dark), a darker hover instead */
body:not(.dark) .talk-circle-voice:hover { background: rgba(10, 12, 20, 0.6); }
/* A voice that's on: a bright ring on the same dark background, 2px wide without changing the button's size. */
.talk-circle-voice[aria-pressed="true"] { border-color: rgba(150, 215, 255, 0.95); box-shadow: inset 0 0 0 1px rgba(150, 215, 255, 0.95), 0 0 10px rgba(90, 170, 255, 0.45); }
.talk-circle-voice:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.talk-circle-voice.failed { opacity: 0.55; text-decoration: line-through; }
/* Round 34px buttons: the + at the row's end that shows the rest of the voices, and then the − that goes back to one
   line (talk-circle.js renderVoices), and the circle's Agents and ⓘ (.talk-circle-tools). */
.talk-circle-voice.talk-circle-more { align-self: center; align-items: center; justify-content: center; box-sizing: border-box; width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.talk-circle-voice.talk-circle-more svg { display: block; }
.talk-circle-voice.talk-circle-info[aria-expanded="true"] { border-color: rgba(150, 215, 255, 0.95); box-shadow: inset 0 0 0 1px rgba(150, 215, 255, 0.95), 0 0 10px rgba(90, 170, 255, 0.45); }
/* While page tabs are open over the left 2/3 of #fullscreen (localsite/js/page-tabs.js), the area is fixed in the space
   at their right (talk-circle.js placeSide), over a page's own placing of it. */
.talk-circle-area.talk-circle-side { position: fixed !important; right: auto !important; bottom: auto !important; left: var(--talk-left) !important; top: var(--talk-top) !important;
  width: var(--talk-w) !important; height: var(--talk-h) !important; padding: 0 !important; z-index: 102; }
/* Links to the page where Claude can answer, below the hint when the voice widget isn't loaded (talk-circle.js showLinks). */
.talk-circle-links { margin-top: -0.3em; font-size: 16px; line-height: 1.4; color: rgba(255, 255, 255, 0.85); text-wrap: balance; }
.talk-circle-links a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.talk-circle-links a:hover, .talk-circle-links a:focus-visible { color: rgba(170, 225, 255, 1); }
/* .talk-circle-hide: what fades away while a conversation from the circle is on (talk-circle.js setTalking), such as
   project/care's title, and comes back once it ends. */
.talk-circle-hide { transition: opacity 0.8s ease, visibility 0.8s; }
html.talk-circle-talking .talk-circle-hide { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .talk-circle-area { transition: none; }
  .talk-circle-hide { transition: none; }
  .talk-circle { transition: none; }
  .talk-circle::before, .talk-circle::after { animation: none; }
  .talk-circle::after { display: none; }
}
/* While music plays (talk-circle.js showMusic): the song's title and artist, raised a little, with round arrows in a
   fixed place near the circle's bottom that step through the songs, and the clip's source between them (an Apple
   Music link beside a preview, as Apple's terms ask). They hide while the circle is small. */
.talk-circle-slot { position: relative; }
.talk-circle[data-music] { padding-bottom: calc(var(--talk-d, 400px) * 0.26); }
/* The song's image (talk-circle.js showMusic: --talk-img), darkened so the white words stay readable. */
.talk-circle[data-image] {
  background: radial-gradient(circle, rgba(8, 14, 26, 0.55) 0%, rgba(8, 14, 26, 0.42) 60%, rgba(8, 14, 26, 0.3) 100%),
    var(--talk-img) center 30% / cover no-repeat;
}
.talk-circle-arrows {
  position: absolute; left: 50%; bottom: calc(var(--talk-d, 400px) * 0.08); translate: -50% 0;
  width: min(220px, calc(var(--talk-d, 400px) * 0.6)); display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 6px;
  pointer-events: auto;
}
.talk-circle-arrows[hidden], .talk-circle-small ~ .talk-circle-arrows { display: none; }
.talk-circle-arrow {
  display: grid; place-items: center; box-sizing: border-box; width: 40px; height: 40px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.45); background: rgba(10, 12, 20, 0.4); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.talk-circle-arrow:hover { background: rgba(255, 255, 255, 0.18); }
.talk-circle-arrow:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.talk-circle-source { min-width: 0; text-align: center; font-size: 12px; line-height: 1.1; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.talk-circle-source a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.talk-circle-source a:hover, .talk-circle-source a:focus-visible { text-decoration: underline; }
.talk-circle-source .talk-circle-badge {
  display: inline-flex; flex-direction: column; padding: 3px 9px; border-radius: 6px; border: 1px solid #a6a6a6; background: #000; color: #fff;
  font-weight: 600; font-size: 12px; text-shadow: none;
}
.talk-circle-source .talk-circle-badge small { font-size: 8px; font-weight: 400; }
.talk-circle-source .talk-circle-badge:hover { text-decoration: none; }

/* The Locations tab's Location Impacts buttons (talk-circle.js locationsPanel), in the page tabs' colors (localsite/css/page-tabs.css).
   Impact Map is a toggle, shown pressed while the map fills #fullscreen. */
.talk-impacts-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--pt-muted); }
.talk-impacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.talk-impacts button {
  font: inherit; font-size: 14px; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  color: var(--pt-ink); background: transparent; border: 1px solid var(--pt-grid);
}
.talk-impacts button:hover { border-color: var(--pt-accent); }
.talk-impacts button:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.talk-impacts button[aria-pressed="true"] { background: var(--pt-accent); border-color: var(--pt-accent); color: #fff; }

/* Moving the circle (talk-circle.js moveTo): it and its talk icon follow a swipe, so the page doesn't scroll or select
   text under them. The swipe icon, near the circle's bottom (.talk-circle-tools), is a round group of four
   quadrant buttons, each with an arrowhead to its corner, which sends the circle there as a talk icon. A swipe that
   starts on it moves the circle as one on the circle does. */
.talk-circle-movable .talk-circle, .talk-circle-dock { touch-action: none; -webkit-user-select: none; user-select: none; }
/* The row of tools near the circle's bottom (talk-circle.js syncTools): the 46px swipe icon centered, its bottom 10px
   above the circle's bottom edge, with Agents (which shows and hides the voice buttons below the circle) 15px to its left
   and the ⓘ for the commands 15px to its right. Those two rise with the circle's curve (talk-circle.js liftTools:
   --talk-tools-lift), so they're as far from its edge. The row spans the circle, letting taps between its buttons
   through to the circle. Keep the sizes and gap in step with liftTools. */
.talk-circle-tools {
  position: absolute; left: 0; right: 0; bottom: 9px; /* 10px from the outside of the circle's 1px border */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 15px;
  pointer-events: none;
}
.talk-circle-tools > * { pointer-events: auto; }
.talk-circle-tools[hidden], .talk-circle-tools > [hidden] { display: none; }
.talk-circle-small .talk-circle-tools, .talk-circle-compact .talk-circle-tools { display: none; }
.talk-circle-tools > :is(.talk-circle-agents, .talk-circle-info) { align-self: end; translate: 0 calc(-1 * var(--talk-tools-lift, 0px)); }
.talk-circle-tools > .talk-circle-agents { grid-column: 1; justify-self: end; }
.talk-circle-tools > .talk-circle-info { grid-column: 3; justify-self: start; }
.talk-circle-voice.talk-circle-agents[aria-expanded="true"] { border-color: rgba(150, 215, 255, 0.95); box-shadow: inset 0 0 0 1px rgba(150, 215, 255, 0.95), 0 0 10px rgba(90, 170, 255, 0.45); }
.talk-circle-swipe {
  grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; box-sizing: border-box; overflow: hidden;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(10, 12, 20, 0.35);
}
/* The quadrants' inner edges draw the cross between them. */
.talk-circle-quad {
  display: grid; place-items: center; min-width: 0; padding: 0; border: 0 solid rgba(255, 255, 255, 0.4);
  cursor: pointer; color: #fff; background: none;
}
.talk-circle-quad:nth-child(odd) { border-right-width: 1px; }
.talk-circle-quad:nth-child(-n+2) { border-bottom-width: 1px; }
.talk-circle-quad svg { display: block; width: 18px; height: 18px; }
.talk-circle-quad:hover { background: rgba(255, 255, 255, 0.22); }
.talk-circle-quad:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
/* A 16px ringed circle where the cross's lines meet, so they end at its edge. Its dark fill hides where they cross. It's
   a handle for swiping the circle: a hand over it, closing while pressed. A tap on it does nothing (talk-circle.js). */
.talk-circle-swipe { position: relative; }
.talk-circle-swipe::after {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; box-sizing: border-box; width: 16px; height: 16px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5); background: #1a2130; cursor: grab;
}
.talk-circle-swipe:active::after { cursor: grabbing; }
/* While the swipe icon drags it (talk-circle.js draggable), the circle follows the pointer, over what's beside it. */
.talk-circle.talk-circle-dragging { position: relative; z-index: 102; cursor: grabbing; }
/* The talk icon: the circle sent to a corner of #fullscreen, 52px at the upper left. In the lower corners it's 44px, so
   inside its glow it looks as large as the 40px icons beside it: localsite's bean (#beanToggle) at the lower left, in its
   place with the bean moving right of it (base.css), and the voice widget's buttons at the lower right, in its row before
   its ⚙ (voice-chat.js slot "talk"), where its margins keep the row's height. Each is centered on the icons beside it.
   Its ring takes the circle's colors. A tap brings the circle back. */
.talk-circle-dock {
  --talk-ring: rgba(150, 215, 255, 0.8); --talk-glow: rgba(90, 170, 255, 0.4);
  position: absolute; z-index: 101; box-sizing: border-box; width: 52px; height: 52px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  border: 2px solid var(--talk-ring); box-shadow: 0 0 14px 2px var(--talk-glow), inset 0 0 10px 1px var(--talk-glow);
  background: rgba(8, 14, 26, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color 1.2s ease, box-shadow 1.2s ease;
}
.talk-circle-dock[hidden] { display: none; }
.talk-circle-dock[data-state="listening"] { --talk-ring: rgba(140, 240, 200, 0.9); --talk-glow: rgba(70, 220, 160, 0.45); }
.talk-circle-dock[data-state="thinking"] { --talk-ring: rgba(195, 170, 255, 0.85); --talk-glow: rgba(150, 115, 255, 0.4); }
.talk-circle-dock[data-state="speaking"] { --talk-ring: rgba(255, 180, 205, 0.85); --talk-glow: rgba(255, 120, 170, 0.4); }
.talk-circle-dock:hover { background: rgba(40, 60, 90, 0.6); }
.talk-circle-dock:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.talk-circle-dock[data-pos="upper-left"] { top: 12px; left: 12px; }
/* In the upper right, left of localsite's control stack (32px circles, 20px in and 22px down, base.css), centered on its first. */
.talk-circle-dock[data-pos="upper-right"] { top: 12px; right: 64px; }
/* In a #fullscreen fixed behind the header (.fullscreen-fixed, localsite/css/base.css: project/goals, project/care), below it. */
#fullscreen.fullscreen-fixed > .talk-circle-dock:is([data-pos="upper-left"], [data-pos="upper-right"]) { top: calc(var(--header-h, var(--headerbar-offset, 0px)) + 12px); }
.talk-circle-dock[data-pos="lower-left"] { bottom: 10px; left: 10px; width: 44px; height: 44px; }
/* The agents (the voices turned on) under the talk icon in the upper left, each a circle its size with the name below
   (talk-circle.js placeAgents sets the column's top, left and width from the icon). The one speaking is highlighted. */
.talk-circle-agents-col { position: absolute; z-index: 101; display: flex; flex-direction: column; align-items: center; gap: 13px; pointer-events: none; }
/* "Talk" under the talk icon, first in the column. Its space stays while the icon is away, so the agents don't move. */
.talk-circle-dock-name { font-size: 12px; line-height: 1.2; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); visibility: hidden; }
.talk-circle-dock-shown > .talk-circle-dock-name { visibility: visible; }
.talk-circle-agents-col[hidden] { display: none; }
.talk-circle-agent { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.talk-circle-agent-dot {
  --talk-ring: rgba(150, 215, 255, 0.55); --talk-glow: rgba(90, 170, 255, 0.25);
  box-sizing: border-box; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 20px; font-weight: 600; color: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--talk-ring); box-shadow: 0 0 10px 1px var(--talk-glow), inset 0 0 8px 1px var(--talk-glow);
  background: rgba(8, 14, 26, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}
.talk-circle-agent-name { max-width: 84px; font-size: 12px; line-height: 1.2; text-align: center; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); overflow-wrap: anywhere; }
.talk-circle-agent.speaking .talk-circle-agent-dot {
  --talk-ring: rgba(255, 180, 205, 0.95); --talk-glow: rgba(255, 120, 170, 0.55);
  color: #fff; box-shadow: 0 0 18px 4px var(--talk-glow), inset 0 0 12px 2px var(--talk-glow);
}
.talk-circle-agent.speaking .talk-circle-agent-name { font-weight: 600; }
.talk-circle-dock[data-pos="lower-right"] { bottom: 10px; right: 10px; width: 44px; height: 44px; }
/* Over the Earth map, above its date and time bar at the lower left */
#fullscreen.earthShown > .talk-circle-dock[data-pos="lower-left"] { bottom: 64px; }
.talk-circle-dock[slot="talk"] { position: static; width: 44px; height: 44px; margin: -2px 0; }
.talk-circle-dock[slot="talk"] svg { width: 20px; height: 20px; }
