/* By State page: vintage railroad ticket cards. Active when the section has class "tix" (build flag TS_STATE_TICKETS, default on).
   Layout: each ticket is a 2-column grid [main | fixed-width stub]. The tear line is the stub's left border and the notches are
   mask cut-outs positioned from the RIGHT edge by exactly the stub width, so they always sit on the tear line no matter how much
   text the main section holds. Long text wraps inside the main column (minmax(0,1fr)) and never pushes the stub. */
.tix{--stock:#efe0b9;--tred:#7e241b;--stub:78px;--notch:10px;--inset:6px;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;align-items:stretch}
.tix .stbtn{position:relative;display:grid;grid-template-columns:minmax(0,1fr) var(--stub);align-items:stretch;height:100%;min-height:112px;padding:0;border:0;border-radius:6px;color:var(--navy);
 background-color:var(--stock);background-image:linear-gradient(90deg,transparent calc(100% - var(--stub)),rgba(126,36,27,.05) calc(100% - var(--stub)));
 -webkit-mask:radial-gradient(circle var(--notch) at right var(--stub) top 0,#0000 calc(100% - .5px),#000 100%) top/100% 51% no-repeat,radial-gradient(circle var(--notch) at right var(--stub) bottom 0,#0000 calc(100% - .5px),#000 100%) bottom/100% 51% no-repeat;
 mask:radial-gradient(circle var(--notch) at right var(--stub) top 0,#0000 calc(100% - .5px),#000 100%) top/100% 51% no-repeat,radial-gradient(circle var(--notch) at right var(--stub) bottom 0,#0000 calc(100% - .5px),#000 100%) bottom/100% 51% no-repeat;
 filter:drop-shadow(0 1px 0 #c9b582) drop-shadow(0 3px 5px rgba(20,33,61,.16));transition:transform .15s ease,background-color .15s ease}
.tix .stbtn:hover{transform:translateY(-2px);background-color:#f3e6c4}
/* main section: brass frame inset from the ticket edge, red stripe on the left */
.tix .st-main{grid-column:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px;margin:var(--inset) 0 var(--inset) var(--inset);padding:10px 8px 10px 12px;border:1px solid var(--brass);border-right:0;container-type:inline-size;border-left:4px solid var(--red);border-radius:3px 0 0 3px;overflow-wrap:break-word}
.tix .st-to{display:block;font-size:.66rem;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--tred)}
.tix .st-name{font-family:Georgia,"Times New Roman",serif;font-size:clamp(.95rem,.9rem + .25vw,1.08rem);font-size:clamp(.9rem,10cqi,1.08rem);font-weight:700;letter-spacing:.03em;text-transform:uppercase;line-height:1.2;color:var(--navy);overflow-wrap:anywhere;hyphens:auto}
.tix .stcount{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap} /* count shown visually in the stub; kept for screen readers */
.tix .stbtn small.sttypes{display:block;margin-top:4px;padding-top:5px;border-top:1px dotted var(--brass);font-size:.8rem;color:#2b3448;line-height:1.45}
/* name shrinks with the main column (container query units) so long one-word names like PENNSYLVANIA fit; overflow-wrap is only a last resort */
/* stub: fixed grid column; its left border IS the tear line (exactly var(--stub) from the right edge, where the notches are) */
.tix .st-stub{grid-column:2;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--stub);border-left:2px dashed var(--brass);text-align:center;color:var(--navy)}
.tix .st-stub::before{content:"";position:absolute;inset:var(--inset) var(--inset) var(--inset) var(--inset);border:1px solid var(--brass);border-radius:0 3px 3px 0;pointer-events:none}
.tix .st-stub b{font-family:Georgia,serif;font-size:1.9rem;line-height:1;color:var(--navy)}
.tix .st-admit{font-size:.62rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--tred)}
.tix .stbtn:focus-visible{outline:none}
.tix .stbtn:focus-visible .st-main{border-color:var(--navy);box-shadow:inset 0 0 0 2px var(--navy)}
.tix .stbtn:focus-visible .st-stub::before{border-color:var(--navy);box-shadow:inset 0 0 0 2px var(--navy)}
.tix .stbtn:focus-visible .st-name{text-decoration:underline;text-underline-offset:3px}
@media (max-width:420px){.tix{--stub:70px}}
@media (prefers-reduced-motion:reduce){.tix .stbtn{transition:none}.tix .stbtn:hover{transform:none}}
@media print{.tix .stbtn{-webkit-mask:none;mask:none;filter:none;transition:none;background:#fff;border:1px solid #000;break-inside:avoid}.tix .st-main,.tix .st-stub::before{border-color:#000}.tix .st-main{border-left:4px solid #000}.tix .st-stub{border-left:2px dashed #000}.tix .st-to,.tix .st-admit,.tix .st-name,.tix .stbtn small.sttypes,.tix .st-stub b{color:#000}}
