.product-page {background:var(--paper);color:var(--white);min-height:82vh;padding:clamp(7.8rem,9vw,9rem) 0 clamp(4rem,7vw,7rem)}
.product-wrap {width:min(1320px,calc(100% - clamp(2rem,8vw,8rem)));margin-inline:auto;min-width:0}
.product-head {display:flex;align-items:end;justify-content:space-between;gap:1.25rem;margin-bottom:2rem}
.product-head h1,.feature-title {font-size:clamp(3.05rem,5.1vw,5rem);letter-spacing:-.037em;line-height:.99}
.product-head p {color:var(--subtle);margin-top:.65rem;max-width:54ch}
.product-head .actions {justify-content:flex-end}
.product-kicker,.instrument-label {font:400 .72rem/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase}
.product-kicker {display:flex;align-items:center;gap:.52rem;color:var(--subtle);margin-bottom:.75rem}
.instrument-label {color:var(--muted)}
.product-kicker .icon,.instrument-label .icon {width:16px;height:16px}
.product-panel {background:var(--surface);color:var(--white);border:1px solid var(--line);border-radius:var(--r3)}
.paper-panel {background:var(--surface);border:1px solid var(--line);border-radius:var(--r3)}
.product-field {border:1px solid var(--line);border-radius:8px;background:var(--studio);color:var(--white);padding:.67rem .8rem;min-width:0;width:100%}
.field-label {display:grid;gap:.45rem;font-size:.87rem;font-weight:550;margin-top:1rem}
.product-sheet {width:min(510px,calc(100% - 2rem));overflow:auto}
.product-sheet>header {display:flex;align-items:flex-start;gap:1rem;justify-content:space-between;margin-bottom:1rem}
.product-sheet>header h2 {margin:0;font-size:clamp(1.8rem,4vw,2.55rem)}
.product-sheet .close-button {flex:none;display:grid;place-items:center}
.product-sheet .notify-form {display:grid;justify-content:stretch}
.product-sheet .form-error {color:#ffbfaa;margin-top:.45rem}
.share-card {width:100%;border-radius:10px;margin-bottom:1rem;background:var(--studio);aspect-ratio:1200/630}
#wallet-options {display:flex;flex-wrap:wrap;gap:.5rem}
.product-sheet textarea {resize:vertical;font:400 .92rem/1.7 var(--mono);min-height:170px}
.small-button,.icon-button,.tool-button {border:1px solid var(--line);border-radius:8px;color:var(--white);background:var(--surface);display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:36px;padding:.38rem .8rem;font-size:.8rem}
.small-button:hover,.icon-button:hover,.tool-button:hover {background:var(--lift);border-color:#69697c}
.icon-button {width:36px;padding:0}
.small-button .icon,.icon-button .icon,.tool-button .icon {width:16px;height:16px}
.pill-switch {display:inline-flex;flex-wrap:wrap;align-items:center;gap:2px;padding:3px;border-radius:9px;background:#17171b;border:1px solid var(--line)}
.pill-switch button {border-radius:6px;padding:.38rem .66rem;font-size:.79rem;color:var(--muted);min-height:30px}
.pill-switch button[aria-pressed=true] {background:var(--lift);color:var(--white)}
.pill-switch button:hover:not([aria-pressed=true]) {color:var(--white);background:var(--lift)}
.paper-action {background:var(--ink);color:var(--white)}
.paper-action:hover {background:#32323c}
.product-empty {text-align:center;padding:clamp(2.2rem,6vw,5rem) 1.2rem}
.product-empty .empty-symbol {display:grid;place-items:center;border-radius:18px;background:var(--lift);border:1px solid var(--line);width:62px;height:62px;margin:0 auto 1.3rem}
.product-empty .empty-symbol .icon {width:28px;height:28px}
.product-empty h2 {font-size:clamp(1.7rem,3vw,2.5rem)}
.product-empty p {color:var(--subtle);max-width:47ch;margin:.8rem auto 1.3rem}
@media(max-width:650px) {
 .product-page {padding-top:7rem}
 .product-head {align-items:flex-start;flex-direction:column;margin-bottom:1.35rem;gap:1rem}
 .product-head .actions {justify-content:flex-start;gap:.5rem}
 .product-head .button {padding:.6rem 1rem;min-height:44px}
}
.circuit-scroll {overflow:auto;overscroll-behavior-x:contain;scrollbar-color:#5f5f71 #19191e;min-width:0;max-width:100%;background:#1b1b20;color:var(--white)}
.wire-grid {--row:54px;--cell:65px;display:grid;grid-template-columns:44px repeat(var(--cols),minmax(var(--cell),1fr));width:100%;min-width:calc(44px + var(--cell)*var(--cols));padding-bottom:14px;font-family:var(--mono);background-image:radial-gradient(#4e4e5d66 .75px,transparent .9px);background-size:10px 10px}
.time-tick,.grid-origin {text-align:center;padding:8px 0;font:400 .66rem var(--mono);color:#a4a4b6;background:#1f1f25;border-bottom:1px solid #383843}
.grid-origin {color:#a6a7c0}
.wire-name {height:var(--row);display:flex;align-items:center;justify-content:center;color:#d0d0df;font-size:1rem}
.wire-name sub {align-self:center;font-size:.72rem;margin-top:7px}
.wire-cell {position:relative;display:grid;place-items:center;height:var(--row);padding:0;border-radius:0;background:transparent;border-right:1px dashed #3b3b4a66;min-width:0;isolation:auto;touch-action:pan-x pan-y}
.wire-cell::before {content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:#696979}
button.wire-cell:hover,button.wire-cell:focus-visible,.wire-cell.snap {background:#9a99fd15}
.wire-cell.snap {box-shadow:inset 0 0 0 2px var(--accent)}
.wire-cell.occupied {touch-action:none}
.gate-face,.control-dot,.target-dot {position:relative;z-index:1}
.gate-face {display:grid;align-content:center;justify-items:center;width:35px;height:35px;border-radius:7px;background:#dadae8;color:#16161b;border:1px solid #eeeef6;font:500 1.13rem/1 var(--mono);box-shadow:0 2px 5px #0003}
.gate-H {background:var(--accent);border-color:#c6c5fe}
.gate-M {background:#2d2d39;border-color:#757691;color:#e0e0ee}
.gate-RZ {font-size:.87rem;background:#bfc0d9}
.gate-RZ small {font-size:.58rem;margin-top:2px}
.coupler {height:calc(var(--span)*var(--row));position:absolute;top:50%;left:calc(50% - 1px);width:2px;background:#b1b2d5;z-index:1;pointer-events:none}
.control-dot {width:13px;height:13px;border-radius:100%;background:#c6c7e0}
.target-dot {width:27px;height:27px;border-radius:100%;border:2px solid #c6c7e0;background:#22222d}
.target-dot:before,.target-dot:after {content:"";position:absolute;top:50%;left:50%;width:15px;height:2px;transform:translate(-50%,-50%);background:#c6c7e0}
.target-dot:after {transform:translate(-50%,-50%) rotate(90deg)}
.selected :is(.gate-face,.control-dot,.target-dot) {outline:2px solid var(--accent);outline-offset:4px}
.hist-frame {display:flex;gap:.8rem;min-width:0}
.hist-scale {height:104px;display:flex;flex-direction:column;justify-content:space-between;font:.67rem var(--mono);color:var(--subtle);text-align:right}
.hist-window {flex:1;overflow-x:auto;min-width:0}
.hist-bars {display:grid;grid-template-columns:repeat(var(--bins),1fr);min-width:calc(56px * var(--bins));text-align:center}
.hist-col {min-width:0;font-family:var(--mono);display:grid}
.hist-track {height:104px;display:flex;align-items:end;justify-content:center;background:repeating-linear-gradient(to top,var(--lift) 0 1px,transparent 1px 50%);border-top:1px solid var(--line)}
.hist-bar {background:#535599;border-radius:4px 4px 0 0;width:65%;max-width:118px;transform-origin:bottom}
.hist-col:nth-child(even) .hist-bar {background:#40416d}
.hist-col b {margin:.5rem 0 .15rem;font-size:.9rem}
.hist-col>span,.hist-more {font:.72rem var(--mono);color:var(--subtle)}
.hist-more {margin-top:.66rem}
.hist-animated .hist-bar {animation:hist-grow 280ms var(--ease) both}
@keyframes hist-grow {from {transform:scaleY(0)} to {transform:scaleY(1)}}

.share-card {height:auto}
.grid-origin,.wire-name {position:sticky;left:0;z-index:3;background-color:#22222b;border-right:1px solid #3f4054}
.wire-grid .time-tick,.grid-origin {position:sticky;top:0;z-index:2}
.wire-grid .grid-origin {z-index:4}
.hist-col.hist-winner .hist-bar {background:var(--accent);border:1px solid #56589f;border-bottom:0}
.hist-summary {margin-top:1rem;font:.78rem/1.55 var(--mono);color:var(--subtle)}
.hist-summary strong {font-weight:500;color:var(--white)}
@media(prefers-reduced-motion:reduce) {.hist-animated .hist-bar {animation:none}}

.product-sheet input.product-field {min-height:44px}

.sol-equivalent {display:block;min-height:1.5em;font:400 .75rem/1.5 var(--mono);color:var(--subtle)}
dialog.signin {margin:auto;border:1px solid #535362;border-radius:22px;color:var(--white);background:var(--surface);padding:0;width:min(430px,calc(100vw - 28px));max-height:calc(100dvh - 40px);box-shadow:0 26px 100px #0006;overflow:auto}
.signin::backdrop {background:#101014b8;backdrop-filter:blur(6px)}
.signin-card {position:relative;padding:clamp(21px,4vw,32px)}
.signin-x {position:absolute;right:12px;top:12px}
.signin-head>img {display:block;margin-bottom:18px}
.signin-head h2 {font:540 clamp(2rem,5vw,2.65rem)/1.06 var(--heading);letter-spacing:-.045em}
.signin-head p,.signin-sent {color:var(--muted);line-height:1.5;margin:.6rem 0 1.4rem}
.signin-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.signin-wallet {position:relative;display:grid;justify-items:start;padding:14px;gap:10px;border:1px solid #4a4a57;border-radius:12px;background:var(--lift);color:var(--white);text-align:left}
.signin-wallet:hover,.signin-step>button:has(img):hover {background:#363642;border-color:var(--accent)}
.signin-wallet:active {transform:translateY(1px)}
.signin-logo {width:36px;height:36px;display:grid;place-items:center}
.signin-wname {font-weight:600;overflow-wrap:anywhere}
.signin-tag {position:absolute;top:15px;right:11px;color:var(--muted);font:.7rem/1.5 var(--mono)}
.signin-tag.is-on {color:var(--accent)}
.signin-foot,.signin-hint,.signin-status {color:var(--muted);font-size:.82rem;line-height:1.5}
.signin-foot {margin:20px 0 0;padding-top:10px;border-top:1px solid var(--line)}
.signin-foot a,.signin-resend,.signin-back {display:inline-flex;align-items:center;min-height:44px;color:var(--white);text-decoration:underline;text-underline-offset:4px}
.signin-step>button:has(img) {width:100%;display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid #575763;border-radius:12px;min-height:48px;background:var(--lift)}
.signin-field,.signin-codeform {display:flex;gap:7px;margin:10px 0}
.signin-field input,.signin-codeform input {min-width:0;flex:1}
.signin-go {flex:none}
.signin-or {display:flex;align-items:center;gap:10px;margin:16px 0;color:var(--muted);font-size:.8rem}
.signin-or::before,.signin-or::after {content:"";height:1px;background:var(--line);flex:1}
.signin-back {gap:8px}
.signin-code {font-family:var(--mono);letter-spacing:.18em}
.signin-sent {overflow-wrap:anywhere}
.signin-status:not(:empty) {margin-top:12px}
.signin-status.is-error {color:#ffc0b3}
.signin-spin {display:none}
.is-loading .signin-spin {display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:signin-turn .8s linear infinite}
@keyframes signin-turn {to {transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.is-loading .signin-spin{animation:none}}

.econ-block .task-share {display:block;color:var(--subtle);font:400 .73rem/1.5 var(--mono)}
@media(max-width:560px) {
  .econ-block table {table-layout:fixed}
  .econ-block table :is(td,th) {padding:9px 5px;font-size:.75rem;white-space:normal}
  .econ-block table td {font-variant-numeric:tabular-nums;white-space:nowrap}
  .econ-block table th:first-child {width:27%}
}
@media(max-width:560px){
  .econ-block:last-child table th:first-child {width:22%}
  .econ-block:last-child table thead th:nth-child(2) {width:22%}
  .econ-block:last-child table thead th:nth-child(3) {width:26%}
  .econ-block:last-child table :is(th,td) {padding-inline:3px}
}
