/* The TAG Thinking Orb (2026-11-02): the engine's face across the site.
   Hero (idle), the scan overlay (thinking), the homepage divider between
   the software read and the human read, and the docked mini-Orb on the
   tool pages. Pure CSS + one canvas; no video or 3D library. In the
   Shortlist palette (bronze core on charcoal), not the cyan/purple mockup. */

.tsl-orb {
  --orb-size: 220px;
  --orb-glow: rgba(184, 146, 90, .5);
  --orb-cool: rgba(150, 182, 204, .55);
  --orb-speed: 1;
  position: relative;
  width: var(--orb-size);
  height: var(--orb-size);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.tsl-orb canvas { position: absolute; inset: -18%; width: 136%; height: 136%; pointer-events: none; z-index: 0; }
.tsl-orb-ring { position: absolute; border-radius: 50%; pointer-events: none; z-index: 1; }
.tsl-orb-ring.r1 { inset: 0; border: 1px dashed rgba(184, 146, 90, .38); animation: tslOrbSpin calc(28s / var(--orb-speed)) linear infinite; }
.tsl-orb-ring.r2 { inset: 9%; border: 1px solid rgba(150, 182, 204, .28); animation: tslOrbSpin calc(36s / var(--orb-speed)) linear infinite reverse; }
.tsl-orb-ring.r2 i { position: absolute; left: 50%; width: 7%; height: 7%; max-width: 10px; max-height: 10px; min-width: 4px; min-height: 4px; border-radius: 50%; transform: translate(-50%, -50%); }
.tsl-orb-ring.r2 i:first-child { top: 0; background: #E8C48A; box-shadow: 0 0 10px #E8C48A; }
.tsl-orb-ring.r2 i:last-child { top: 100%; background: #A9C6DA; box-shadow: 0 0 10px #A9C6DA; }
.tsl-orb-ring.r3 { left: -8%; right: -8%; top: 32%; bottom: 32%; border: 1px solid rgba(232, 196, 138, .34); transform: rotate(-24deg); box-shadow: 0 0 14px rgba(184, 146, 90, .15); }
.tsl-orb-sweep { position: absolute; inset: 4%; border-radius: 50%; border: 2px solid transparent; border-top-color: rgba(232, 196, 138, .9); opacity: 0; transition: opacity .4s; z-index: 1; pointer-events: none; animation: tslOrbSpin 1.6s linear infinite; }
.tsl-orb-core {
  position: relative; z-index: 2;
  width: 62%; height: 62%; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 28%, #FFF6E4 0%, #EBCB93 16%, #B8925A 40%, #6B5131 66%, #262A30 90%);
  box-shadow:
    inset 0 0 calc(var(--orb-size) * .12) rgba(255, 236, 200, .55),
    inset calc(var(--orb-size) * -.07) calc(var(--orb-size) * -.07) calc(var(--orb-size) * .16) rgba(28, 31, 35, .75),
    inset calc(var(--orb-size) * .03) calc(var(--orb-size) * .03) calc(var(--orb-size) * .1) var(--orb-cool),
    0 0 calc(var(--orb-size) * .22) var(--orb-glow),
    0 0 calc(var(--orb-size) * .45) rgba(184, 146, 90, .18);
  animation: tslOrbBreathe 5s ease-in-out infinite;
}
.tsl-orb-core::before { /* inner vortex */
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  border: 1px solid rgba(255, 240, 214, .28); border-left-color: transparent; border-bottom-color: transparent;
  animation: tslOrbSpin calc(14s / var(--orb-speed)) linear infinite;
}
.tsl-orb-shine { position: absolute; top: 9%; left: 17%; width: 34%; height: 20%; border-radius: 50%; background: rgba(255, 255, 255, .45); filter: blur(calc(var(--orb-size) * .02)); transform: rotate(-35deg); pointer-events: none; }
.tsl-orb-core b { position: relative; font-family: var(--display, Montserrat, sans-serif); font-weight: 800; font-size: calc(var(--orb-size) * .13); letter-spacing: -.02em; color: #fff; text-shadow: 0 0 calc(var(--orb-size) * .05) rgba(255, 220, 160, .9), 0 1px 2px rgba(0, 0, 0, .35); line-height: 1; }
.tsl-orb-core small { position: relative; margin-top: 4px; font-size: max(8px, calc(var(--orb-size) * .038)); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #FFF1D8; opacity: .85; }
.tsl-orb.no-label .tsl-orb-core b, .tsl-orb.no-label .tsl-orb-core small { display: none; }

/* States */
.tsl-orb[data-state=thinking] { --orb-speed: 3.2; --orb-glow: rgba(232, 196, 138, .7); }
.tsl-orb[data-state=thinking] .tsl-orb-core { animation-duration: 1.6s; }
.tsl-orb[data-state=thinking] .tsl-orb-sweep { opacity: 1; }
.tsl-orb[data-state=done] .tsl-orb-core { animation: tslOrbDeliver .9s ease-out 1, tslOrbBreathe 5s ease-in-out .9s infinite; }
.tsl-orb.is-hover { --orb-speed: 2; }

@keyframes tslOrbSpin { to { transform: rotate(360deg); } }
.tsl-orb-ring.r3 { animation: none; }
@keyframes tslOrbBreathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.04); filter: brightness(1.12); }
}
@keyframes tslOrbDeliver {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.14); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .tsl-orb *, .tsl-orb *::before { animation: none !important; }
  .tsl-orb[data-state=thinking] .tsl-orb-sweep { opacity: .6; }
}

/* ---------- Scan overlay ---------- */
.tsl-scan-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(17, 19, 22, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .35s ease;
  overflow-y: auto;
}
.tsl-scan-overlay.open { opacity: 1; }
.tsl-scan-overlay[hidden] { display: none; }
.tsl-scan-box {
  position: relative; width: 100%; max-width: 480px; margin: auto;
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
  background: linear-gradient(180deg, #23272D, #1A1D21);
  border: 1px solid rgba(184, 146, 90, .35); border-radius: 20px;
  padding: 28px 24px 22px; color: var(--white, #fff);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(184, 146, 90, .12);
}
.tsl-scan-box .eyebrow { color: var(--bronze, #B8925A); }
.tsl-scan-box h2 { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--white, #fff); }
.tsl-scan-now { font-size: 16px; color: var(--on-dark, #C9CCD1); min-height: 24px; }
.tsl-scan-bar { width: 100%; height: 6px; border-radius: 99px; background: #2E3238; overflow: hidden; }
.tsl-scan-bar i { display: block; height: 100%; width: 4%; border-radius: 99px; background: linear-gradient(90deg, #8A6A3C, #E8C48A); box-shadow: 0 0 10px rgba(232, 196, 138, .6); transition: width .8s ease; }
.tsl-scan-steps { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; font-size: 14px; }
.tsl-scan-steps li { display: flex; align-items: center; gap: 10px; color: var(--on-dark-2, #9096A0); }
.tsl-scan-steps li::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #4A4F57; box-sizing: border-box; }
.tsl-scan-steps li.now { color: var(--white, #fff); font-weight: 600; }
.tsl-scan-steps li.now::before { border-color: #E8C48A; border-top-color: transparent; animation: tslOrbSpin .9s linear infinite; }
.tsl-scan-steps li.done { color: var(--on-dark, #C9CCD1); }
.tsl-scan-steps li.done::before { border: none; background: var(--bronze, #B8925A) 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='%231C1F23' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.tsl-scan-foot { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--on-dark-2, #9096A0); border-top: 1px solid #2E3238; padding-top: 14px; }
.tsl-scan-foot { flex-wrap: wrap; }
.tsl-scan-foot > span:first-child { text-align: left; }
.tsl-scan-foot button { white-space: nowrap; font: inherit; font-size: 13px; font-weight: 700; background: none; border: 1px solid #3A3F46; color: var(--on-dark, #C9CCD1); border-radius: 8px; min-height: 36px; padding: 0 12px; cursor: pointer; }
.tsl-scan-foot button:hover { border-color: var(--bronze, #B8925A); color: var(--white, #fff); }
.tsl-scan-delivered { font-family: var(--display); font-size: 20px; font-weight: 800; color: #E8C48A; }
@media (prefers-reduced-motion: reduce) { .tsl-scan-overlay { transition: none; } .tsl-scan-steps li.now::before { animation: none; } }

/* ---------- Docked mini-Orb (tool pages) ---------- */
.tsl-dock { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.tsl-dock-btn { width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: #1C1F23; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tsl-dock-btn:focus-visible { outline: 3px solid rgba(184, 146, 90, .6); outline-offset: 3px; }
.tsl-dock-btn .tsl-orb { --orb-size: 52px; }
.tsl-dock-panel {
  width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow-y: auto;
  background: #fff; color: var(--ink, #1C1F23); border: 1px solid var(--line, #E4E4DF); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22); padding: 16px; display: flex; flex-direction: column; gap: 14px; font-size: 14px;
}
.tsl-dock-panel[hidden] { display: none; }
.tsl-dock-head { display: flex; align-items: center; gap: 10px; }
.tsl-dock-head strong { font-family: var(--display); font-size: 16px; display: block; }
.tsl-dock-status { font-size: 13px; color: var(--muted-2, #6B7079); }
.tsl-dock-status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good, #2F6B4F); margin-right: 6px; vertical-align: 1px; }
.tsl-dock[data-state=thinking] .tsl-dock-status::before { background: var(--bronze, #B8925A); animation: tslDockBlink 1s ease-in-out infinite; }
@keyframes tslDockBlink { 50% { opacity: .3; } }
.tsl-dock-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2, #6B7079); }
.tsl-dock-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tsl-dock-links a { display: flex; align-items: center; min-height: 44px; padding: 8px 10px; border-radius: 8px; background: var(--paper, #F4F4F2); text-decoration: none; font-weight: 700; font-size: 13px; color: var(--ink, #1C1F23); }
.tsl-dock-links a:hover { background: var(--bronze-tint, #EFE6D7); }
.tsl-dock-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tsl-dock-recent li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--paper, #F4F4F2); }
.tsl-dock-recent li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsl-dock-recent li b { font-family: var(--display); flex: none; }
.tsl-dock-empty { color: var(--muted-2, #6B7079); }
@media print { .tsl-dock, .tsl-scan-overlay { display: none !important; } }

/* ---------- 2026-11-11: the laptop that replaces the Orb ----------
   orb.js still mounts on .tsl-orb (pages size it with --orb-size), but now
   builds a silver laptop. Width = --orb-size; the screen text scales with it. */
.tsl-orb.tsl-lap { height: auto; flex-direction: column; isolation: auto; }
.tsl-lap .tl-lid { position: relative; width: 88%; padding: 3.2% 3.2% 2.6%; border-radius: calc(var(--orb-size) * .045) calc(var(--orb-size) * .045) 2px 2px;
  background: #0A0B0C; box-shadow: 0 0 0 max(1px, calc(var(--orb-size) * .008)) #B9BDC2, 0 calc(var(--orb-size) * .06) calc(var(--orb-size) * .14) rgba(0,0,0,.45); }
.tsl-lap .tl-screen { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px;
  background: radial-gradient(120% 90% at 50% 0%, #2E333A, #1A1D21); container-type: inline-size; transition: box-shadow .4s; }
.tsl-lap .tl-base { position: relative; width: 100%; height: calc(var(--orb-size) * .035); min-height: 3px; border-radius: 1px 1px 40% 40% / 1px 1px 100% 100%;
  background: linear-gradient(180deg, #ECEEF0, #B5B9BE 55%, #7E8288); box-shadow: 0 calc(var(--orb-size) * .03) calc(var(--orb-size) * .05) rgba(0,0,0,.45); }
.tsl-lap .tl-base::before { content: ""; position: absolute; top: 0; left: 50%; width: 16%; height: 45%; transform: translateX(-50%); border-radius: 0 0 6px 6px; background: #92969C; }
.tsl-lap .tl-art { position: relative; height: 42%; aspect-ratio: 3 / 4; }
.tsl-lap .tl-page { position: absolute; inset: 0; overflow: hidden; border-radius: 6%; background: #F4F2EE; display: flex; flex-direction: column; gap: 9%; padding: 14% 14%; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.tsl-lap .tl-page i { display: block; height: 7%; border-radius: 9px; background: #D6D1C8; }
.tsl-lap .tl-page i:first-child { width: 60%; height: 10%; background: #1C1F23; }
.tsl-lap .tl-page i:nth-child(3) { width: 80%; } .tsl-lap .tl-page i:nth-child(4) { width: 90%; } .tsl-lap .tl-page i:nth-child(5) { width: 55%; }
.tsl-lap .tl-beam { position: absolute; left: 0; right: 0; top: 0; height: 26%; opacity: 0; background: linear-gradient(180deg, rgba(184,146,90,0), rgba(184,146,90,.35) 80%, #B8925A); transform: translateY(-100%); }
.tsl-lap .tl-check { position: absolute; right: -22%; bottom: -12%; width: 52%; aspect-ratio: 1; border-radius: 50%; opacity: 0; transform: scale(.4);
  background: #2E7D4F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
  box-shadow: 0 0 0 2px #1A1D21; transition: opacity .35s, transform .35s cubic-bezier(.3,1.6,.5,1); }
.tsl-lap .tsl-orb-core { all: unset; display: flex; flex-direction: column; align-items: center; gap: 2cqw; text-align: center; }
.tsl-lap .tsl-orb-core::before { content: none; }
.tsl-lap .tsl-orb-core b { font-family: var(--display, Montserrat, sans-serif); font-weight: 800; font-size: 11cqw; line-height: 1; color: #fff; letter-spacing: -.01em; text-shadow: none; }
.tsl-lap .tsl-orb-core small { margin: 0; font-size: max(7px, 5.2cqw); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #E8C48A; opacity: 1; }
.tsl-lap[data-state=thinking] .tl-beam { opacity: 1; animation: tlBeam 1.6s ease-in-out infinite; }
.tsl-lap[data-state=thinking] .tl-page i:not(:first-child) { animation: tlLine 1.6s ease-in-out infinite; }
.tsl-lap[data-state=thinking] .tl-page i:nth-child(3) { animation-delay: .2s; } .tsl-lap[data-state=thinking] .tl-page i:nth-child(4) { animation-delay: .4s; } .tsl-lap[data-state=thinking] .tl-page i:nth-child(5) { animation-delay: .6s; }
.tsl-lap[data-state=done] .tl-check { opacity: 1; transform: none; }
.tsl-lap[data-state=done] .tl-screen, .tsl-lap.is-hover .tl-screen { box-shadow: inset 0 0 0 1px rgba(232,196,138,.45), inset 0 0 24px rgba(184,146,90,.25); }
.tsl-lap.no-label .tsl-orb-core { display: none; }
.tsl-lap.no-label .tl-art { height: 66%; }
@keyframes tlBeam { from { transform: translateY(-100%); } to { transform: translateY(400%); } }
@keyframes tlLine { 50% { background: #C9A56F; } }
.tsl-dock-btn .tsl-lap { --orb-size: 46px; }
@media (prefers-reduced-motion: reduce) { .tsl-lap[data-state=thinking] .tl-beam { opacity: .8; transform: translateY(150%); } }
