/* The tangram front page (local only). White page, seven pieces, the companies beside them. */
.tg-body { background: #fff; color: var(--ink); }
.tg-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px var(--pad, 24px); }
.tg-mark { font: 600 18px/1 var(--f-sans); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.tg-nav { display: flex; gap: clamp(18px, 2.6vw, 36px); }
.tg-nav a { font: 500 13px/1 var(--f-sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding-block: 6px; }
.tg-nav a:hover, .tg-mark:hover { color: var(--ink-2); }
.tg-mark { white-space: nowrap; }
@media (max-width: 440px) { .tg-head { gap: 12px; } .tg-nav { gap: 14px; } .tg-nav a { font-size: 12px; letter-spacing: 0.12em; } } /* three links and the name on one line on a phone */
.tg-head { flex-wrap: wrap; row-gap: 10px; } /* on the narrowest phones the links drop under the name instead of pushing the page wide */

.tg { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr); grid-template-areas: "intro stage" "side stage"; grid-template-rows: auto 1fr;
  column-gap: clamp(24px, 4vw, 72px); row-gap: clamp(16px, 3vh, 32px); padding: 0 var(--pad, 24px) 40px; max-width: 1440px; margin-inline: auto; min-height: calc(100svh - 72px); }
.tg-intro { grid-area: intro; padding-top: clamp(4px, 3vh, 36px); }
.tg-kick { margin: 0 0 14px; font: 500 11.5px/1.5 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.tg-t { margin: 0; max-width: 15ch; font: 700 clamp(30px, 3.2vw, 50px)/0.98 var(--f-display); letter-spacing: -0.045em; text-wrap: balance; }

.tg-stage { grid-area: stage; position: relative; height: clamp(420px, calc(100svh - 112px), 860px); min-width: 0; align-self: start;
  box-sizing: border-box; padding-bottom: 52px; transition: padding-top 0.7s cubic-bezier(.2,.7,.2,1); } /* the room under the shape is the buttons' own */
.tg-svg { display: block; width: 100%; height: 100%; overflow: visible; touch-action: none; user-select: none; -webkit-user-select: none; }
.tg-pc { cursor: grab; }
.tg-pc polygon { stroke: #fff; stroke-width: 0.045; stroke-linejoin: round; }
.tg-pc.is-held { cursor: grabbing; }

.tg-pc polygon { transition: fill 0.7s cubic-bezier(.4,0,.2,1), opacity 0.3s ease; }
.tg-svg.has-hover .tg-pc:not(.is-hover) polygon { opacity: 0.7; }

.tg-tip { position: absolute; left: 0; top: 0; z-index: 3; max-width: 270px; padding: 10px 13px 11px; background: var(--ink); color: #fff; border-radius: 10px;
  font-size: 13.5px; line-height: 1.42; pointer-events: none; box-shadow: 0 14px 30px -14px rgba(11, 11, 13, 0.5); }
.tg-tip b { display: block; margin-bottom: 4px; font: 500 10.5px/1.4 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--tip-fill, var(--fill, #fff)); }
.tg-tip { opacity: 0; visibility: hidden; transition: opacity 0.22s ease, visibility 0s linear 0.22s; will-change: transform; }
.tg-tip.is-on { opacity: 1; visibility: visible; transition: opacity 0.18s ease, visibility 0s; }
.tg-lb { font-family: var(--f-mono); font-weight: 500; letter-spacing: 0.04em; pointer-events: none; transition: fill 0.7s ease, fill-opacity 0.7s ease; }
.tg-pc:focus { outline: none; }

/* Oolka's case list: each case drawn as its piece of the shape, with its headline result, in the company's colour */
.tg-pick { position: fixed; left: 0; top: 0; z-index: 30; width: 330px; padding: 8px; background: #fff; border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(11, 11, 13, 0.07), 0 1px 2px rgba(11, 11, 13, 0.05), 0 28px 56px -28px rgba(11, 11, 13, 0.42); animation: tg-pop 0.3s cubic-bezier(.2,.8,.2,1) both; }
.tg-pick p { margin: 6px 10px 8px; font: 500 11px/1.4 var(--f-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.tg-pick ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tg-pick li { animation: tg-in 0.4s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 45ms + 60ms); }
.tg-pick a { display: grid; grid-template-columns: 30px 1fr 18px; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; transition: background 0.2s ease; }
.tg-pk-ico { width: 30px; height: 30px; overflow: visible; transition: transform 0.35s cubic-bezier(.2,.8,.2,1); }
.tg-pick a span { display: grid; gap: 2px; min-width: 0; }
.tg-pick b { font: 600 18px/1.15 var(--f-display); letter-spacing: -0.02em; }
.tg-pick small { font: 400 13px/1.35 var(--f-sans); color: var(--ink-2); }
.tg-pick i { font-style: normal; font-size: 16px; color: var(--ink-2); transition: transform 0.25s ease, color 0.25s ease; }
.tg-pick a:hover, .tg-pick a:focus-visible { background: color-mix(in srgb, var(--fill) 13%, #fff); outline: none; }
.tg-pick a:hover .tg-pk-ico, .tg-pick a:focus-visible .tg-pk-ico { transform: rotate(-8deg) scale(1.12); }
.tg-pick a:hover i, .tg-pick a:focus-visible i { transform: translateX(3px); color: var(--ink); }

.tg-side { grid-area: side; align-self: start; min-width: 0; }
.tg-cos { list-style: none; margin: 0 0 clamp(18px, 3vh, 30px); padding: 0; border-top: 1px solid var(--rule); }
.tg-co { all: unset; box-sizing: border-box; display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 8px 0; border-bottom: 1px solid var(--rule); cursor: pointer;
  font: 600 clamp(20px, 1.9vw, 28px)/1.1 var(--f-display); letter-spacing: -0.03em; color: var(--ink-2); transition: color 0.25s ease; position: relative; }
.tg-co sup { flex: none; width: 2.4em; font: 500 11px/1 var(--f-mono); letter-spacing: 0.1em; color: var(--ink-2); }
.tg-mini { flex: none; margin-left: auto; align-self: center; width: 34px; height: 34px; opacity: 0.85; transition: opacity 0.3s ease, transform 0.45s cubic-bezier(.2,.8,.2,1); }
.tg-mini polygon { stroke: #fff; stroke-width: 0.12; stroke-linejoin: round; }
.tg-co:hover, .tg-co[aria-pressed="true"] { color: var(--ink); }
.tg-co:hover .tg-mini { opacity: 1; transform: scale(1.08); }
.tg-co[aria-pressed="true"] .tg-mini { opacity: 1; transform: scale(1.14) rotate(-4deg); }
.tg-co:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }

.tg-cap[hidden] { display: none; }
.tg-cap { animation: tg-in 0.6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes tg-in { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } }
.tg-role { margin: 0 0 8px; font: 500 11.5px/1.5 var(--f-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--acc, var(--ink-2)); }
.tg-name { margin: 0 0 10px; font: 700 clamp(26px, 2.6vw, 38px)/1.02 var(--f-display); letter-spacing: -0.035em; }
.tg-line { margin: 0 0 10px; max-width: 42ch; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.5; }
.tg-as { margin: 0 0 16px; max-width: 42ch; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tg-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; }
.tg-links a { font: 600 15px/1.3 var(--f-sans); color: var(--ink); text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 2px; text-underline-offset: 5px; white-space: nowrap; }
.tg-links a::after { content: " →"; }
.tg-links a:hover { color: var(--acc); }

@media (max-width: 860px) {
  .tg { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "stage" "side"; grid-template-rows: auto; row-gap: 16px; padding-bottom: 40px; }
  .tg-t { font-size: clamp(30px, 8.6vw, 44px); }
  .tg-stage { height: min(56svh, 420px); }
  .tg-cos { display: flex; gap: 8px; overflow-x: auto; border: 0; margin-bottom: 18px; padding-bottom: 4px; scrollbar-width: none; }
  .tg-cos::-webkit-scrollbar { display: none; }
  .tg-co { width: auto; white-space: nowrap; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 999px; font-size: 16px; gap: 8px; }
  .tg-mini { width: 22px; height: 22px; margin-left: 2px; }
  .tg-co[aria-pressed="true"] { background: var(--fill); border-color: var(--fill); color: var(--on-fill, var(--ink)); }
  .tg-co[aria-pressed="true"] .tg-next { color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
  .tg-co sup { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tg-cap { animation: none; } .tg-pc polygon, .tg-lb { transition: none; } }

/* ---- what didn't work, what I did next ------------------------------------------------------------------------ */
.tg-fail, .tg-fix { display: none; }
.tg-cap[data-mode="broken"] .tg-now, .tg-cap[data-mode="fixed"] .tg-now { display: none; }
.tg-cap[data-mode="broken"] .tg-fail, .tg-cap[data-mode="fixed"] .tg-fix { display: block; animation: tg-in 0.6s cubic-bezier(.2,.7,.2,1) both; }
.tg-lab { margin: 0 0 6px; font: 500 11px/1.4 var(--f-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--acc, var(--ink-2)); }
.tg-story { margin: 0 0 16px; max-width: 44ch; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.5; }
.tg-fix .tg-story:last-child { margin-bottom: 18px; }
.tg-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.tg-acts .tg-links { flex-basis: 100%; }
.tg-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 var(--f-sans); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.tg-btn:hover { background: var(--ink); color: #fff; }
.tg-btn:active { transform: scale(0.97); }
.tg-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tg-btn.is-solid { background: var(--fill); color: var(--on-fill, var(--ink)); box-shadow: none; }
.tg-btn.is-solid:hover { background: var(--ink); color: #fff; }
.tg-stage[data-co="wispr"] .tg-btn.is-solid:hover, .tg-stage[data-co="next"] .tg-btn.is-solid:hover { background: color-mix(in srgb, var(--fill) 78%, #fff); }
.tg-btn[data-act="fix"] { display: none; }
.tg-cap[data-mode="broken"] .tg-btn[data-act="fix"] { display: inline-flex; }
.tg-cap[data-mode="broken"] .tg-btn[data-act="break"] { display: none; }
.tg-btn[data-act="break"]::before { content: ""; width: 9px; height: 9px; border: 1.5px solid currentColor; transform: rotate(45deg) translateY(-1px); border-radius: 1px; }
.tg-btn[data-act="fix"]::after { content: "→"; }

/* ---- numbers you can check ------------------------------------------------------------------------------------ */
.tg-num { position: relative; white-space: nowrap; font-weight: 600; text-decoration: underline dotted; text-decoration-color: var(--acc); text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: help; outline: none; }
.tg-num::after { content: attr(data-src); position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 5; width: max-content; max-width: 280px; padding: 9px 12px; white-space: normal;
  background: var(--ink); color: #fff; border-radius: 9px; font: 400 13px/1.42 var(--f-sans); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; }
.tg-num:hover::after, .tg-num:focus-visible::after { opacity: 1; transform: none; }
.tg-num:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); border-radius: 3px; }

/* ---- the date during the opening, the voice pill, the toast --------------------------------------------------- */
.tg-year { position: absolute; left: 0; top: 4px; margin: 0; z-index: 2; font: 700 clamp(22px, 2.2vw, 34px)/1 var(--f-display); letter-spacing: -0.03em; color: var(--ink);
  opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.5s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.tg-year.is-on { opacity: 1; transform: none; }
.tg-voice { position: absolute; left: 50%; bottom: 10px; z-index: 4; display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(92%, 520px); padding: 11px 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; line-height: 1.3; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity 0.2s ease, transform 0.3s cubic-bezier(.2,.7,.2,1); }
.tg-voice.is-on { opacity: 1; transform: translate(-50%, 0); }
.tg-voice i, .tg-chip i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--fill, #ff5a1f); }
.tg-voice.is-on i { animation: tg-pulse 1s ease-in-out infinite; }
@keyframes tg-pulse { 50% { transform: scale(1.6); opacity: 0.55; } }
.tg-toast { position: absolute; left: 50%; bottom: 14px; z-index: 3; margin: 0; width: max-content; max-width: 92%; padding: 8px 14px; border-radius: 999px; background: var(--fill, var(--ink)); color: var(--on-fill, #fff);
  font: 600 13px/1 var(--f-sans); opacity: 0; transform: translate(-50%, 8px); transition: opacity 0.25s ease, transform 0.3s ease; pointer-events: none; }
.tg-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tg-co.is-seen sup { color: var(--acc); }

/* ---- footer ---------------------------------------------------------------------------------------------------- */
.tg-foot { display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center; max-width: 1440px; margin: 0 auto; padding: 22px var(--pad, 24px) 30px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.tg-reach { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.tg-reach a { color: var(--ink); font-weight: 500; }
.tg-email { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; gap: 10px; color: var(--ink); font-weight: 600; }
.tg-email span { display: inline-block; min-width: 4.6em; text-align: center; box-sizing: border-box; font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); padding: 4px 7px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--rule); transition: background 0.2s ease; }
.tg-email:hover span, .tg-email:focus-visible span { background: var(--ink); color: #fff; box-shadow: none; }
.tg-email:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 3px; }
.tg-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tg-chip { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); font: 500 12.5px/1 var(--f-sans); color: var(--ink); transition: background 0.2s ease; }
.tg-chip:hover { background: #f3f1ed; }
.tg-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tg-chip[aria-pressed="true"], .tg-chip.is-on { background: var(--ink); color: #fff; box-shadow: none; }
.tg-chip[hidden] { display: none; }
.tg-chip.is-on i { animation: tg-pulse 1s ease-in-out infinite; }
.tg-made { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--ink-2); }
.tg-keys { position: fixed; right: clamp(16px, 2.8vw, 40px); bottom: clamp(16px, 2.8vw, 40px); z-index: 20; width: 280px; padding: 18px 20px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px rgba(11,11,13,.08), 0 24px 50px -20px rgba(11,11,13,.4); }
.tg-keys[hidden] { display: none; }
.tg-keys .tg-lab { color: var(--ink-2); }
.tg-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; margin: 6px 0 0; font-size: 14px; }
.tg-keys dt { font: 500 11.5px/1.6 var(--f-mono); padding: 0 7px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--rule); justify-self: start; }
.tg-keys dd { margin: 0; }
.tg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) {
  .tg-foot { grid-template-columns: 1fr; }
  .tg-tools { justify-content: flex-start; }
  .tg-keys { left: 16px; right: 16px; width: auto; }
  .tg-year { font-size: 22px; }
}

/* ---- printed, the page becomes a one-page summary of the work ------------------------------------------------- */
@media print {
  @page { margin: 14mm; }
  .tg-head nav, .tg-stage, .tg-cos, .tg-tools, .tg-acts, .tg-keys, .tg-cap[data-cap="start"], .tg-as { display: none !important; }
  .tg { display: block; min-height: 0; padding: 0; }
  .tg-t { font-size: 26pt; max-width: none; margin-bottom: 10pt; }
  .tg-cap, .tg-cap[hidden] { display: block !important; break-inside: avoid; margin: 0 0 10pt; padding-top: 8pt; border-top: 0.5pt solid #ccc; animation: none; }
  .tg-cap .tg-now, .tg-cap .tg-fail, .tg-cap .tg-fix { display: block !important; }
  .tg-name { font-size: 15pt; margin-bottom: 3pt; }
  .tg-line, .tg-story { font-size: 10pt; margin-bottom: 4pt; max-width: none; }
  .tg-lab { font-size: 7pt; margin-bottom: 1pt; }
  .tg-num { text-decoration: none; }
  .tg-num::after { content: none; }
  .tg-foot { border: 0; padding: 8pt 0 0; }
  .tg-email span, .tg-clock { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tg-side .tg-cap[data-cap="start"] { display: none !important; }
}

/* the one action on the stage: make it fall, then put it back */
.tg-stagebar { position: absolute; right: 0; bottom: 6px; z-index: 3; display: flex; gap: 10px; transition: opacity 0.3s ease, visibility 0s; }
.tg-stage[data-co="start"] .tg-stagebar, .tg-stage:not([data-co]) .tg-stagebar { opacity: 0; pointer-events: none; }
.tg-stage[data-mode="broken"] .tg-btn[data-act="fix"] { display: inline-flex; }
.tg-stage[data-mode="broken"] .tg-btn[data-act="break"] { display: none; }
.tg-stagebar .tg-btn { background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tg-stagebar .tg-btn.is-solid { background: var(--fill); color: var(--on-fill, var(--ink)); }
.tg-stagebar .tg-btn:hover { background: var(--ink); color: #fff; }
.tg-stage[data-mode="broken"] .tg-voice, .tg-stage .tg-voice.is-on ~ .tg-stagebar { opacity: 0; }
@media (max-width: 860px) { .tg-stagebar { right: auto; left: 50%; transform: translateX(-50%); bottom: 0; } }

/* the tools behind the work, folded until asked for */
.tg-built { margin: -4px 0 16px; max-width: 46ch; }
.tg-built summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1.3 var(--f-sans); color: var(--ink); }
.tg-built summary::-webkit-details-marker { display: none; }
.tg-built summary::before { content: "+"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--fill); color: var(--on-fill, var(--ink)); font: 600 13px/1 var(--f-sans); transition: transform 0.25s ease; }
.tg-built[open] summary::before { transform: rotate(45deg); }
.tg-built summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
.tg-built ul { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--fill); display: grid; gap: 9px; font-size: 14.5px; line-height: 1.48; color: var(--ink); }
.tg-built[open] ul { animation: tg-in 0.45s cubic-bezier(.2,.7,.2,1) both; }
.tg-built b { font-weight: 600; }
@media print { .tg-built ul { display: grid !important; } .tg-built::details-content { content-visibility: visible; display: block; } .tg-built summary::before { display: none; } }

/* a link straight to a company paints it at once */
.tg-svg.is-instant .tg-pc polygon, .tg-svg.is-instant .tg-lb { transition: none !important; }
/* the nudge: shown once a visit, gone the moment a piece is picked up */
.tg-hint { position: absolute; left: 0; bottom: 8px; z-index: 3; margin: 0; display: flex; align-items: center; gap: 9px; padding: 9px 14px 9px 11px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 0 1px rgba(11,11,13,.1), 0 10px 26px -14px rgba(11,11,13,.45); font: 500 13.5px/1.2 var(--f-sans); color: var(--ink);
  opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.tg-hint.is-on { opacity: 1; transform: none; }
.tg-hint svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tg-hint.is-on svg { animation: tg-drift 1.6s ease-in-out infinite; }
@keyframes tg-drift { 25% { transform: translate(2px, -1px); } 75% { transform: translate(-2px, 1px); } }
@media (max-width: 860px) { .tg-hint { left: 50%; bottom: auto; top: 0; width: max-content; max-width: calc(100% - 24px); transform: translate(-50%, -6px); } .tg-hint.is-on { transform: translate(-50%, 0); } }

/* ---- the story on the stage (wide screens): written into the space the fallen shape leaves ------------------- */
.tg-storybox { position: absolute; left: 0; top: 4%; z-index: 3; width: min(30em, 92%); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.55s cubic-bezier(.2,.7,.2,1), visibility 0s linear 0.4s; }
.tg-storybox.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.4s ease, transform 0.55s cubic-bezier(.2,.7,.2,1), visibility 0s; }
.tg-storybox[data-kind="fix"] { width: 43%; }
.tg-storybox .tg-lab { color: var(--acc); margin-bottom: 10px; }
.tg-st-text { margin: 0 0 20px; font: 600 clamp(22px, 2vw, 31px)/1.2 var(--f-display); letter-spacing: -0.02em; color: var(--ink); text-wrap: pretty; }
.tg-storybox[data-kind="fix"] .tg-st-text { font-size: clamp(19px, 1.55vw, 24px); }
.tg-st-text.is-small, .tg-storybox[data-kind="fix"] .tg-st-text.is-small { font: 400 clamp(15px, 1.1vw, 17.5px)/1.5 var(--f-sans); letter-spacing: 0; color: var(--ink-2); }
.tg-st-text span { display: inline-block; }
.tg-storybox.is-on .tg-st-text span { animation: tg-word 0.5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 32ms + var(--d, 0ms)); }
@keyframes tg-word { from { opacity: 0; transform: translateY(6px); filter: blur(4px); } }
.tg-st-acts { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.tg-storybox[data-kind="fix"] .tg-btn[data-act="fix"] { display: none; }
.tg-storybox[data-kind="fail"] .tg-st-back { display: none; }
.tg-storybox .tg-btn[data-act="fix"] { display: inline-flex; }
.tg-st-back { all: unset; cursor: pointer; font: 600 14px/1.3 var(--f-sans); color: var(--ink); text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.tg-st-back::before { content: "← "; }
.tg-st-back:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.tg-svg { transform-origin: 100% 100%; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.tg-svg.is-aside { transform: scale(0.56); }
@media (min-width: 861px) {
  /* the stage tells the story, so the column beside it keeps the company's summary instead of repeating it */
  .tg-stage.has-story .tg-stagebar { opacity: 0; pointer-events: none; }
  .tg-cap[data-mode="broken"] .tg-fail, .tg-cap[data-mode="fixed"] .tg-fix { display: none; }
  .tg-cap[data-mode="broken"] .tg-now, .tg-cap[data-mode="fixed"] .tg-now { display: block; }
}
@media (max-width: 860px) { .tg-storybox { display: none; } }
@media (prefers-reduced-motion: reduce) { .tg-storybox.is-on .tg-st-text span { animation: none; } .tg-svg { transition: none; } }
.tg-lb { transition: fill 0.7s ease, fill-opacity 0.7s ease, opacity 0.4s ease; }
.tg-svg.is-aside .tg-lb { opacity: 0; } /* the small rebuilt shape is a picture, its words would be too small to read */
@keyframes tg-pop { from { opacity: 0; transform: translateY(-4px) scale(0.97); } }
@media (max-width: 860px), (hover: none) { .tg-pick { left: 16px !important; right: 16px; top: auto !important; bottom: 16px; width: auto; max-width: 480px; margin: 0 auto; } }

/* ---- build it yourself ---------------------------------------------------------------------------------------- */
.tg-ghost polygon { fill: #efece6; stroke: #fff; stroke-width: 0.05; stroke-linejoin: round; transition: fill 0.35s ease; }
.tg-ghost polygon.is-filled { fill: #f6f4f0; }
.tg-ghost polygon.is-hint { animation: tg-hintglow 1.3s ease-in-out 2; }
@keyframes tg-hintglow { 50% { fill: color-mix(in srgb, var(--fill, #ff5a1f) 40%, #fff); } }
.tg-hud { position: absolute; left: 0; top: 0; z-index: 3; display: grid; gap: 6px; max-width: 16em; animation: tg-in 0.5s cubic-bezier(.2,.7,.2,1) both; }
.tg-hud[hidden], .tg-done[hidden] { display: none; }
.tg-hud-t { margin: 0; display: flex; align-items: baseline; gap: 14px; font: 600 clamp(18px, 1.6vw, 24px)/1.1 var(--f-display); letter-spacing: -0.02em; }
.tg-hud-t { flex-wrap: wrap; row-gap: 10px; }
.tg-pips { display: flex; flex-basis: 100%; gap: 5px; }
.tg-pips i { width: 11px; height: 11px; border-radius: 3px; background: #cfc9bf; transition: background 0.3s ease; }
.tg-pips i.is-in { animation: tg-pip 0.42s cubic-bezier(.2,.8,.2,1); }
@keyframes tg-pip { 40% { transform: scale(1.35); } }
.tg-hud-n { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.tg-hud-acts { display: flex; gap: 18px; margin-top: 2px; }
.tg-hud .tg-st-back::before { content: none; }
.tg-done { position: absolute; left: 0; right: 0; top: auto; bottom: 2%; margin: 0 auto; z-index: 4; max-width: 24em; padding: 22px 24px 20px; background: rgba(255, 255, 255, 0.94); border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(11, 11, 13, 0.07), 0 30px 60px -30px rgba(11, 11, 13, 0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.45s ease, transform 0.55s cubic-bezier(.2,.8,.2,1); }
.tg-done.is-on { opacity: 1; transform: none; }
.tg-done .tg-lab { color: var(--acc, var(--ink-2)); }
.tg-done-t { margin: 0 0 6px; font: 700 clamp(24px, 2.2vw, 34px)/1.08 var(--f-display); letter-spacing: -0.035em; }
.tg-done-s { margin: 0 0 18px; font-size: 17px; line-height: 1.45; color: var(--ink-2); }
.tg-stage[data-mode="puzzle"] .tg-stagebar, .tg-stage[data-done] .tg-stagebar { opacity: 0; pointer-events: none; }
/* hidden buttons also leave the Tab order, once their fade is done */
.tg-stage[data-co="start"] .tg-stagebar, .tg-stage:not([data-co]) .tg-stagebar, .tg-stage .tg-voice.is-on ~ .tg-stagebar,
.tg-stage.has-story .tg-stagebar, .tg-stage[data-mode="puzzle"] .tg-stagebar, .tg-stage[data-done] .tg-stagebar { visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
.tg-stage[data-co="wispr"] .tg-btn[data-act="break"], .tg-stage[data-co="next"] .tg-btn[data-act="break"] { display: none; }
.tg-btn[data-act="puzzle"]::before { content: ""; width: 10px; height: 10px; background: currentColor; clip-path: polygon(0 100%, 100% 100%, 0 0); }

/* ---- the next shape in the list --------------------------------------------------------------------------------- */
.tg-next { margin-left: 10px; align-self: center; padding: 3px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); font: 500 10.5px/1.3 var(--f-sans); font-style: normal;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.tg-say { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tg-say a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---- the voice: a level meter in the pill, and my own recordings when they exist --------------------------------- */
.tg-meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.tg-meter b { width: 3px; height: 14px; border-radius: 2px; background: #fff; transform: scaleY(0.2); transform-origin: 50% 100%; transition: transform 0.06s linear; }
.tg-hear { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; margin: -4px 0 16px; padding: 9px 14px 9px 12px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--ink); font: 600 14px/1 var(--f-sans); color: var(--ink); }
.tg-hear i { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.tg-hear.is-on { background: var(--ink); color: #fff; }
.tg-hear.is-on i { width: 8px; height: 10px; border: 0; background: linear-gradient(90deg, currentColor 0 3px, transparent 3px 5px, currentColor 5px); }
.tg-hear:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tg-email.is-flash span { background: var(--ink); color: #fff; box-shadow: none; }
@media (max-width: 860px) {
  /* on a phone the puzzle's clock rides in a small bar at the bottom of the screen, off the board */
  .tg-hud { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; max-width: none; padding: 12px 16px; background: #fff; border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(11, 11, 13, 0.08), 0 18px 40px -18px rgba(11, 11, 13, 0.45); grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
  .tg-hud-t { font-size: 16px; }
  .tg-pips i { width: 10px; height: 10px; }
  .tg-hud-n { grid-column: 1; font-size: 12.5px; }
  .tg-hud-acts { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; gap: 8px; margin: 0; }
  /* on a phone the finish card sits in the emptied tray, under the shape the visitor just built */
  .tg-done { left: 0; right: 0; top: auto; bottom: 0; margin: 0 auto; max-width: none; }
  .tg-stagebar { gap: 8px; }
  .tg-stagebar .tg-btn { padding: 9px 12px; font-size: 13px; }
}
.tg-stagebar .tg-btn { white-space: nowrap; }

/* the shadow layer under the pieces (drawn and moved by the script) */
.tg-shadows polygon { fill: #0b0b0d; pointer-events: none; }
.tg-svg.is-aside .tg-shadows { opacity: 0.6; }
.tg-stage:has(.tg-voice.is-on) .tg-hint { opacity: 0; } /* the voice pill takes the floor while it listens */

/* the main area takes focus from the skip link; it needs no ring of its own */
.tg:focus { outline: none; }
/* the level meter shows only while listening; at rest its bars read as stray dots */
.tg-voice:not(.is-listening) .tg-meter { display: none; }
/* no single word left alone on a line in the page's sentences */
.tg-line, .tg-as, .tg-story, .tg-st-text, .tg-tip span, .tg-done-s, .tg-hud-n, .tg-say, .tg-role, .tg-pick small, .tg-made { text-wrap: pretty; }
/* with the tray beside the outline, the finish card waits in the emptied tray on the right */
@media (min-width: 861px) { .tg-stage[data-tray="side"] .tg-done { left: auto; right: 0; top: 0; bottom: auto; margin: 0; max-width: 18em; } }
/* on a phone the puzzle gets a taller board while it runs (its bar sits at the foot of the screen, so the buttons'
   room isn't needed), which keeps the pieces and their labels at a readable size */
@media (max-width: 860px) {
  .tg-stage { transition: height 0.7s cubic-bezier(.2,.7,.2,1), padding 0.7s cubic-bezier(.2,.7,.2,1); }
  .tg-stage[data-mode="puzzle"], .tg-stage[data-done] { height: min(calc(100svh - 190px), 640px); padding-bottom: 0; } /* clear of the puzzle bar */
}
/* a phone held sideways: the pieces wait beside the outline, the board takes the height the puzzle bar leaves,
   and the finish card waits in the emptied tray on the right */
@media (max-width: 860px) and (orientation: landscape) and (max-height: 520px) {
  .tg-stage[data-mode="puzzle"], .tg-stage[data-done] { height: calc(100svh - 118px); }
  .tg-stage[data-tray="side"] .tg-done { left: auto; right: 0; top: 0; bottom: auto; margin: 0; max-width: 18em; padding: 16px 18px; }
}
/* the finish card fits the emptied tray at any laptop width, so it never covers the shape just built; its two
   actions stay whole, one under the other when the card is narrow */
.tg-done .tg-st-acts { flex-wrap: wrap; row-gap: 12px; }
.tg-done .tg-btn, .tg-done .tg-st-back { white-space: nowrap; }
@media (min-width: 861px) { .tg-stage[data-tray="side"] .tg-done { max-width: min(18em, calc(41.5% + 20px)); } }
@media (min-width: 861px) and (max-width: 1100px) {
  .tg-stage[data-tray="side"] .tg-done { padding: 16px 18px; }
  .tg-stage[data-tray="side"] .tg-done-t { font-size: 21px; }
  .tg-stage[data-tray="side"] .tg-done-s { font-size: 15px; margin-bottom: 14px; }
  .tg-stage[data-tray="side"] .tg-done .tg-btn { padding: 9px 13px; font-size: 14px; }
}
/* the front page's proof line: the biggest results, under the title */
.tg-proof { margin: 14px 0 0; max-width: 36em; font-size: 14px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.tg-proof b { color: var(--ink); font-weight: 600; }
/* on the narrowest phones the email and its Copy tag share one line at a slightly smaller size, so the page never scrolls sideways */
@media (max-width: 360px) { .tg-email { font-size: 14px; gap: 6px; } .tg-email span { min-width: 0; padding: 4px 5px; letter-spacing: 0.1em; } }
/* pieces fly in from off-screen during the opening: on a phone that must never scroll the page sideways */
@media (max-width: 860px) { .tg { overflow-x: clip; } }
