/**
 * SpeakEasy Echo — The Thread page
 *
 * Everything is namespaced .tp-* (or scoped under .se-thread) so nothing
 * collides with the theme. Fonts, palette tokens and the grande cards
 * come from the theme's design.css; this file adds only the page layout.
 */

.se-thread {
	--tp-purple: #44427b;
	--tp-purple-deep: #36346a;
	--tp-line: rgba(0, 48, 87, .12);
	--tp-muted: #5a5a6a;
	overflow-x: clip;
}
/* The theme has no global border-box, so size this page's own boxes the way
   the layout assumes. Theme cards inside the carousels are left alone. */
.tp-hero-inner, .tp-section, .tp-panel, .tp-panel *, .tp-m-head, .tp-m-head *,
.tp-rail-btn, .tp-m-foot *, .tp-feedback, .tp-feedback * { box-sizing: border-box; }

.se-thread h2,
.se-thread h3 { font-family: 'Roboto Slab', Georgia, serif; color: var(--navy); letter-spacing: -.01em; }
.tp-eyebrow {
	font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
	color: var(--tp-purple); margin: 0 0 10px;
}

/* ── buttons ── */
.tp-btn {
	display: inline-flex; align-items: center; gap: 10px; font: 800 14px 'Open Sans', sans-serif;
	padding: 13px 20px; border-radius: 10px; text-decoration: none; border: 0; cursor: pointer;
}
.tp-btn:hover { filter: brightness(1.06); }
.tp-btn--gold { background: var(--gold); color: var(--navy); }
.tp-btn--ghost { background: rgba(255,255,255,.08); color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); }

/* ══ HERO ══ */
.tp-hero { background: var(--tp-purple); color: var(--white); overflow: hidden; }
.tp-hero-inner {
	max-width: 880px; margin: 0 auto; padding: 64px 24px 84px;
	display: flex; flex-direction: column; align-items: center; text-align: center;
}
.tp-hero .tp-eyebrow { color: var(--gold); margin-top: 28px; }
.tp-hero-title {
	font: 800 clamp(2.5rem, 6vw, 4.2rem)/1.05 'Roboto Slab', Georgia, serif; letter-spacing: -.015em;
	color: var(--white); margin: 6px 0 22px;
}
.tp-hero-title em { font-style: normal; color: var(--gold); }
.tp-hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.6; max-width: 620px; color: rgba(255,255,255,.9); margin: 0 auto 34px; }
.tp-hero-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tp-emblem-wrap { width: clamp(110px, 22vw, 170px); }
.tp-emblem { width: 100%; height: auto; display: block; overflow: visible; }
.tp-sw { fill: none; stroke-width: 46; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: tp-swoop 1s cubic-bezier(.65,0,.35,1) forwards; }
.tp-sw:nth-of-type(2) { animation-delay: .18s; }
.tp-sw:nth-of-type(3) { animation-delay: .36s; }
.tp-sw:nth-of-type(4) { animation-delay: .54s; }
.tp-dot { fill: #f6b300; transform-box: fill-box; transform-origin: center; transform: scale(0); animation: tp-dotpop .5s cubic-bezier(.34,1.56,.64,1) forwards; }
.tp-dot:nth-of-type(1) { animation-delay: .9s; }
.tp-dot:nth-of-type(2) { animation-delay: 1s; }
.tp-dot:nth-of-type(3) { animation-delay: 1.1s; }
.tp-dot:nth-of-type(4) { animation-delay: 1.2s; }
@keyframes tp-swoop { to { stroke-dashoffset: 0; } }
@keyframes tp-dotpop { to { transform: scale(1); } }

/* ══ SECTIONS ══ */
.tp-section { max-width: 1080px; margin: 0 auto; padding: 88px 24px 0; }
.tp-section-head { max-width: 700px; margin: 0 auto 34px; text-align: center; }
.tp-section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; line-height: 1.2; margin: 0 0 14px; }
.tp-section-head p { color: var(--tp-muted); margin: 0; font-size: 17px; line-height: 1.65; }

/* ══ BUDGET WEAVE ══ */
.tp-panel { background: var(--white); border-radius: 24px; padding: 34px 36px 36px; box-shadow: 0 2px 14px rgba(0,48,87,.08); }
.tp-weave { --gap: 150px; position: relative; display: grid; grid-template-columns: minmax(0,1fr) var(--gap) minmax(0,1.05fr); row-gap: 18px; }
.tp-w-head { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tp-muted); }
.tp-w-head b { display: block; font: 800 22px/1.2 'Roboto Slab', serif; letter-spacing: -.01em; text-transform: none; color: var(--tp-purple); margin-top: 4px; }
.tp-w-head--r { grid-column: 3; }
.tp-w-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tp-w-left { grid-column: 1; }
.tp-w-right { grid-column: 3; justify-content: space-between; gap: 12px; }
.tp-threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

.tp-w-row,
.tp-w-mission {
	position: relative; display: flex; align-items: center; gap: 14px; width: 100%; border: 0;
	font: inherit; color: inherit; text-align: left; cursor: pointer;
	transition: opacity .3s, background .3s, box-shadow .3s;
}
.tp-w-row { background: var(--off-white); border-radius: 12px; padding: 10px 16px 10px 12px; min-height: 58px; }
.tp-w-num {
	flex-shrink: 0; width: 52px; height: 38px; border-radius: 9px; display: grid; place-items: center;
	background: var(--white); font: 800 15px 'Roboto Slab', serif; color: var(--navy); box-shadow: 0 1px 3px rgba(0,48,87,.1);
}
.tp-w-txt { min-width: 0; line-height: 1.3; }
.tp-w-txt b { display: block; font-size: 14.5px; color: var(--navy); }
.tp-w-txt small { display: block; font-size: 12.5px; color: var(--tp-muted); margin-top: 2px; }
.tp-w-port { position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--white); }
.tp-w-row .tp-w-port { right: -6px; }
.tp-w-mission { border-radius: 14px; padding: 12px 14px 12px 18px; background: color-mix(in srgb, var(--c) 9%, white); text-decoration: none; min-height: 66px; }
.tp-w-mission .tp-w-port { left: -6px; }
.tp-w-ico { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--white); font-size: 16px; }
.tp-w-mission b { display: block; font: 700 17px/1.2 'Roboto Slab', serif; color: var(--tp-purple); }
.tp-w-mission small { display: block; font-size: 12.5px; font-weight: 700; color: var(--tp-muted); margin-top: 3px; }
.tp-go { margin-left: auto; color: var(--c); font-size: 13px; opacity: 0; transition: opacity .3s, transform .3s; transform: translateY(-3px); }

/* threads: a white underlay under every strand makes crossings read as over/under */
.tp-t-under { fill: none; stroke: var(--white); stroke-width: 12; stroke-linecap: round; }
.tp-t-line { fill: none; stroke-width: 5; stroke-linecap: round; transition: opacity .3s, stroke-width .3s; }
.tp-t-under, .tp-t-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.tp-weave.is-drawn .tp-t-under,
.tp-weave.is-drawn .tp-t-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s cubic-bezier(.65,0,.35,1) var(--d,0s), opacity .3s, stroke-width .3s; }

/* follow one thread */
.tp-weave.is-focus .tp-w-row:not(.is-on),
.tp-weave.is-focus .tp-w-mission:not(.is-on) { opacity: .32; }
.tp-weave.is-focus .tp-t-line:not(.is-on) { opacity: .12; }
.tp-weave.is-focus .tp-t-line.is-on { stroke-width: 7; }
.tp-w-row.is-on { background: color-mix(in srgb, var(--c) 12%, white); box-shadow: inset 0 0 0 2px var(--c); }
.tp-w-mission.is-on { box-shadow: inset 0 0 0 2px var(--c); }
.tp-w-mission.is-on .tp-go { opacity: 1; transform: none; }
.tp-w-row:focus-visible, .tp-w-mission:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.tp-w-hint { margin: 22px 0 0; font-size: 14px; color: var(--tp-muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.tp-w-hint i { color: #e79a00; }
.tp-weave-foot { margin-top: 26px; padding-top: 24px; border-top: 2px dashed var(--tp-line); }
.tp-pull { font: 700 clamp(20px, 2.4vw, 26px)/1.35 'Roboto Slab', serif; color: var(--tp-purple); margin: 0 auto; max-width: 640px; text-align: center; }
.tp-pull::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--gold); margin: 0 auto 12px; }

@media (max-width: 900px) {
	.tp-weave { --gap: 70px; }
	.tp-w-txt small { display: none; }
}
@media (max-width: 640px) {
	.tp-panel { padding: 22px 14px 24px; border-radius: 18px; }
	.tp-weave { --gap: 38px; row-gap: 14px; }
	.tp-w-head b { font-size: 17px; }
	.tp-w-head { font-size: 10.5px; letter-spacing: .1em; }
	.tp-w-row { flex-direction: column; align-items: flex-start; gap: 6px; padding: 9px 12px 10px 10px; min-height: 0; }
	.tp-w-num { width: auto; height: auto; padding: 2px 9px; font-size: 13px; }
	.tp-w-txt b { font-size: 13px; }
	.tp-w-mission { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 10px 10px 14px; }
	.tp-w-ico { width: 30px; height: 30px; font-size: 13px; }
	.tp-w-mission b { font-size: 15px; }
	.tp-w-mission small { font-size: 11.5px; }
	.tp-go { display: none; }
}

/* ══ MISSIONS + STORY CAROUSELS ══ */
.tp-mission { scroll-margin-top: 24px; }
.tp-mission + .tp-mission { margin-top: 64px; }
.tp-m-head { text-align: center; max-width: 720px; margin: 0 auto 26px; }
.tp-m-ico { color: var(--c); font-size: 24px; margin-bottom: 4px; }
.tp-m-name { font: 800 clamp(28px, 4vw, 40px)/1.15 'Roboto Slab', serif; color: var(--navy); margin: 0; }
.tp-m-swoop { display: block; width: min(300px, 70%); height: 26px; margin: 6px auto 10px; overflow: visible; }
.tp-m-swoop path { fill: none; stroke: var(--c); stroke-width: 10; stroke-linecap: round; }
.tp-mission.is-flash .tp-m-swoop path { stroke-dasharray: 1; animation: tp-redraw 1s cubic-bezier(.65,0,.35,1); }
@keyframes tp-redraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.tp-m-tagline { color: var(--tp-purple); font-weight: 700; margin: 0 0 2px; font-size: 17px; line-height: 1.45; }
.tp-m-covers { color: var(--tp-muted); margin: 0; font-size: 15px; }
.tp-ledger { display: inline-flex; flex-wrap: wrap; justify-content: center; margin-top: 16px; border: 1.5px solid var(--tp-line); border-radius: 12px; overflow: hidden; background: var(--white); }
.tp-ledger span { padding: 8px 16px; font-size: 13.5px; color: var(--tp-muted); }
.tp-ledger span + span { border-left: 1.5px solid var(--tp-line); }
.tp-ledger b { color: var(--navy); }

.tp-rail-wrap { position: relative; }
.tp-rail {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
	padding: 4px 4px 20px; margin: -4px -4px 0; scroll-padding-inline: 4px; overscroll-behavior-x: contain;
}
.tp-rail::-webkit-scrollbar { display: none; }
.tp-rail > * { scroll-snap-align: start; min-width: 0; }
.tp-rail-btn {
	position: absolute; z-index: 3; top: calc(var(--imgh, 160px) / 2 + 4px); transform: translateY(-50%);
	width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--white); color: var(--navy);
	cursor: pointer; font-size: 16px; box-shadow: 0 4px 14px rgba(0,30,57,.22); transition: opacity .25s, background .2s, color .2s;
}
.tp-rail-btn.tp-prev { left: -20px; }
.tp-rail-btn.tp-next { right: -20px; }
.tp-rail-btn:hover:not(:disabled) { background: var(--navy); color: var(--white); }
.tp-rail-btn:disabled { opacity: 0; pointer-events: none; }

.tp-m-foot { text-align: center; margin-top: 6px; }
.tp-all {
	display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--tp-purple); text-decoration: none;
	padding: 11px 20px; border-radius: 24px; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); transition: background .2s;
}
.tp-all:hover { background: color-mix(in srgb, var(--c) 10%, white); }
.tp-all i { color: var(--c); }

@media (max-width: 900px) {
	.tp-rail { grid-auto-columns: calc((100% - 24px) / 2); }
	.tp-rail-btn.tp-prev { left: -12px; }
	.tp-rail-btn.tp-next { right: -12px; }
}
@media (max-width: 640px) {
	.tp-rail-btn { display: none; }
	/* full-bleed swipe row: each card snaps to the center with a peek on both sides */
	.tp-rail { grid-auto-columns: 80vw; gap: 14px; margin: -4px -16px 0; padding: 4px 10vw 20px; scroll-padding-inline: 10vw; }
	.tp-rail > * { scroll-snap-align: center; }
	.tp-ledger { flex-direction: column; }
	.tp-ledger span + span { border-left: 0; border-top: 1.5px solid var(--tp-line); }
}

/* ══ FEEDBACK ══ */
#tp-feedback { padding-bottom: 90px; }
.tp-feedback { background: var(--tp-purple); color: var(--white); border-radius: 24px; padding: 38px 40px 36px; max-width: 780px; margin: 0 auto; }
.tp-feedback .tp-section-head { margin-bottom: 24px; }
.tp-feedback h2 { color: var(--white); font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.tp-feedback .tp-eyebrow { color: var(--gold); }
.tp-feedback .tp-section-head p { color: rgba(255,255,255,.82); font-size: 15px; }
#tp-form { text-align: center; }
.tp-q { margin: 0 0 22px; border: 0; padding: 0; text-align: center; min-width: 0; }
.tp-q legend { margin: 0 auto 4px; }
.tp-q legend,
.tp-qlabel { font: 700 16.5px 'Roboto Slab', serif; color: var(--white); margin: 0 0 4px; display: block; padding: 0; }
.tp-hint { font-size: 13px; color: rgba(255,255,255,.72); margin: 0 0 10px; }
.tp-q > .tp-chips:first-of-type,
.tp-q > textarea { margin-top: 8px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tp-chip { position: relative; }
.tp-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.tp-chip span {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 20px; font-weight: 700; font-size: 13px;
	background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.24); transition: background .2s, color .2s;
}
.tp-chip input:checked + span { background: var(--gold); color: var(--tp-purple-deep); box-shadow: none; }
.tp-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.tp-hearts { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 8px; }
.tp-hearts .tp-chip { display: flex; }
.tp-hearts .tp-chip span { width: 100%; height: 100%; border-radius: 12px; padding: 10px 12px; justify-content: center; line-height: 1.3; }
.tp-hearts .tp-chip i { color: var(--gold); width: 18px; text-align: center; }
.tp-hearts .tp-chip input:checked + span i { color: var(--tp-purple-deep); }
@media (max-width: 700px) { .tp-hearts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .tp-hearts { grid-template-columns: 1fr; } }
.tp-feedback textarea,
.tp-feedback input[type=text],
.tp-feedback input[type=email] {
	width: 100%; font: 14px/1.5 'Open Sans', sans-serif; color: var(--text-main); background: var(--white);
	border: 0; border-radius: 10px; padding: 11px 14px; text-align: left; box-sizing: border-box;
}
.tp-feedback textarea { min-height: 76px; resize: vertical; }
.tp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .tp-two { grid-template-columns: 1fr; } }
.tp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tp-error { background: rgba(192,57,43,.18); color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin: 0 0 16px; }
#tp-submit[disabled] { opacity: .6; cursor: progress; }
.tp-thanks { text-align: center; padding: 30px 0 10px; }
.tp-thanks i { font-size: 40px; color: var(--gold); margin-bottom: 14px; }
.tp-thanks h3 { color: var(--white); font-size: 28px; margin: 0 0 10px; }
.tp-thanks p { color: rgba(255,255,255,.82); max-width: 460px; margin: 0 auto; }

@media (max-width: 700px) {
	.tp-section { padding: 64px 16px 0; }
	.tp-hero-inner { padding: 48px 16px 64px; }
	.tp-feedback { padding: 28px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.se-thread *, .se-thread *::before { transition: none !important; animation: none !important; }
	.tp-sw, .tp-t-under, .tp-t-line { stroke-dashoffset: 0; }
	.tp-dot { transform: none; }
	.tp-rail { scroll-behavior: auto; }
}
