/*
 * Thought.global — Living Ideas Constellation (V1)
 * Elegant, observatory-like styling. Self-contained; no external assets.
 */

:root {
	--sh-const-support: #3f6fb0;
	--sh-const-conflict: #b0433f;
	--sh-const-tension: #7a5aa6;
	--sh-const-convergence: #3f8f6a;
	--sh-const-center: #8a7a52;
	--sh-const-ink: #1d1a24;
	--sh-const-muted: #6b6475;
	--sh-const-height: 520px;
}

/* ---------- Stage ---------- */
.sh-constellation {
	position: relative;
	margin: 0 auto;
	border-radius: 20px;
	overflow: hidden;
	background:
		radial-gradient(75% 65% at 18% 8%, rgba(72,92,142,.24), transparent 70%),
		radial-gradient(70% 70% at 86% 18%, rgba(73,57,115,.18), transparent 72%),
		linear-gradient(155deg, #17233a 0%, #111b30 52%, #0d1729 100%);
	box-shadow: inset 0 0 80px rgba(3, 8, 20, .22), 0 24px 60px -40px rgba(20, 20, 40, .7);
	color: #eef0f7;
}
.sh-constellation__stage {
	position: relative;
	width: 100%;
	height: var(--sh-const-height);
	touch-action: none;
	cursor: grab;
}
.sh-constellation__stage:active { cursor: grabbing; }
/* Embedded graphs (home / debate mini) must not trap vertical page scroll on
   touch devices; the full-screen explore & orbit graphs get full pan/zoom. */
.sh-constellation--home .sh-constellation__stage,
.sh-constellation--debate .sh-constellation__stage { touch-action: pan-y; }
.sh-constellation__svg { display: block; width: 100%; height: 100%; }

/* faint star-field texture */
.sh-constellation::before {
	content: "";
	position: absolute; inset: 0;
	background-image:
		radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, .35), transparent),
		radial-gradient(1px 1px at 70% 60%, rgba(255, 255, 255, .25), transparent),
		radial-gradient(1px 1px at 40% 80%, rgba(255, 255, 255, .20), transparent),
		radial-gradient(1px 1px at 85% 20%, rgba(255, 255, 255, .18), transparent);
	opacity: .5;
	pointer-events: none;
}

/* ---------- Nodes & edges ---------- */
.sh-const-node { cursor: pointer; transition: opacity .25s ease; }
.sh-const-node-link { cursor: pointer; outline: none; }
.sh-const-node-link:focus .sh-const-node__dot { stroke: #fff; stroke-width: 2.5; }
.sh-const-node__hit { pointer-events: all; }
.sh-const-node-link { cursor: pointer; text-decoration: none; }
.sh-const-node-link:focus { outline: none; }
.sh-const-node:focus { outline: none; }
.sh-const-node:focus .sh-const-node__dot,
.sh-const-node.is-active .sh-const-node__dot {
	stroke: #fff; stroke-width: 2.5;
}
.sh-const-node__dot { transition: r .3s ease, stroke .2s ease; }
.sh-const-node__dot { stroke: rgba(255,255,255,.38); stroke-width: 1.15; paint-order: stroke; }
.sh-const-node__halo { transition: opacity .3s ease; }
.sh-const-node__label {
	fill: #f0f3ff;
	font: 500 12px/1.2 Georgia, "Times New Roman", serif;
	paint-order: stroke;
	stroke: rgba(7, 13, 27, .92);
	stroke-width: 3px;
	pointer-events: none;
	opacity: .92;
}
.sh-constellation--home .sh-const-node__label,
.sh-constellation--debate .sh-const-node__label { opacity: .7; }
.sh-const-node.is-center .sh-const-node__label { font-size: 15px; fill: #fff; opacity: 1; }
.sh-const-node.is-dim { opacity: .22; }
.sh-const-node.is-active .sh-const-node__label { opacity: 1; fill: #fff; }

.sh-const-edge { transition: stroke-opacity .25s ease, stroke-width .25s ease; }
.sh-const-edge { stroke-linecap: round; }
.sh-const-edge.is-active { stroke-opacity: .9 !important; stroke-width: 2.4px; }
.sh-const-edge.is-dim { stroke-opacity: .05 !important; }
.sh-const-edge.is-recent { stroke-dasharray: 4 5; animation: sh-const-flow 3.2s linear infinite; }

@keyframes sh-const-flow { to { stroke-dashoffset: -18; } }
@keyframes sh-const-pulse { 0%, 100% { opacity: .3; } 50% { opacity: .75; } }
@keyframes sh-const-twinkle { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }

/* Nodes read as stars: a luminous gradient core (set in JS) plus a soft flare
   on hover/focus/selection. Scale is around the circle's own centre (0,0 in
   node-local space), so it needs no transform-origin. */
.sh-const-node__dot { transition: r .3s ease, stroke .2s ease, transform .25s cubic-bezier(.2,.7,.2,1); }
.sh-const-node:hover .sh-const-node__dot,
.sh-const-node-link:hover .sh-const-node__dot,
.sh-const-node:focus .sh-const-node__dot,
.sh-const-node-link:focus .sh-const-node__dot,
.sh-const-node.is-active .sh-const-node__dot { transform: scale(1.12); stroke: #fff; stroke-width: 2.4; }
.sh-const-node:hover .sh-const-node__halo,
.sh-const-node-link:hover .sh-const-node__halo,
.sh-const-node.is-active .sh-const-node__halo { opacity: 1; }
/* Only the focal node twinkles — a whole field pulsing would be noise. */
@media (prefers-reduced-motion: no-preference) {
	.sh-const-node.is-center .sh-const-node__halo { animation: sh-const-twinkle 4.6s ease-in-out infinite; }
}

/* ---------- Colour key ---------- */
.sh-constellation__legend {
	position: absolute; z-index: 4; left: 16px; bottom: 14px;
	display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 10px 14px;
	list-style: none; border-radius: 12px;
	background: rgba(12, 14, 24, .58); border: 1px solid rgba(255, 255, 255, .1);
	backdrop-filter: blur(4px); pointer-events: none;
}
.sh-constellation.is-empty .sh-constellation__legend { display: none; }
.sh-constellation__legend-item {
	display: inline-flex; align-items: center; gap: 7px;
	color: #c7cadd; font: 500 11px/1.2 Georgia, "Times New Roman", serif;
}
.sh-constellation__legend-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 6px rgba(0,0,0,.4); }
.sh-constellation__legend-item--conflict .sh-constellation__legend-dot { background: var(--sh-const-conflict); }
.sh-constellation__legend-item--tension .sh-constellation__legend-dot { background: var(--sh-const-tension); }
.sh-constellation__legend-item--support .sh-constellation__legend-dot { background: var(--sh-const-support); }
.sh-constellation__legend-item--convergence .sh-constellation__legend-dot { background: var(--sh-const-convergence); }
@media (max-width: 600px) {
	.sh-constellation__legend { left: 10px; right: 10px; bottom: 10px; gap: 4px 12px; padding: 8px 12px; justify-content: center; }
	.sh-constellation__legend-item { font-size: 10px; }
}

/* ---------- Loading ---------- */
.sh-constellation__loading {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.sh-constellation__loading span {
	width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .5);
	animation: sh-const-pulse 1.2s ease-in-out infinite;
}
.sh-constellation__loading span:nth-child(2) { animation-delay: .2s; }
.sh-constellation__loading span:nth-child(3) { animation-delay: .4s; }
.sh-constellation.is-loading .sh-constellation__svg { opacity: .35; transition: opacity .2s; }

/* ---------- Empty state ---------- */
.sh-constellation__empty {
	position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
	align-items: center; justify-content: center; text-align: center; gap: 8px;
	padding: 30px; color: #cfd2e6;
}
.sh-constellation__empty[hidden] { display: none; }
.sh-constellation.is-empty .sh-constellation__svg { display: none; }
.sh-constellation.is-empty .sh-constellation__loading { display: none; }
.sh-constellation__empty-title { font: 500 20px/1.2 Georgia, serif; margin: 0; color: #fff; }
.sh-constellation__empty-text { max-width: 460px; margin: 0; font-size: 14px; line-height: 1.6; color: #a9adc4; }

/* ---------- Tooltip ---------- */
.sh-constellation__tip {
	position: fixed; z-index: 100000; transform: none;
	min-width: 160px; max-width: 260px; padding: 12px 14px;
	background: rgba(18, 19, 30, .96); border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 12px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8);
	pointer-events: none; color: #f3f4fb;
}
.sh-constellation__tip strong { display: block; font: 600 15px/1.25 Georgia, serif; }
.sh-constellation__tip-state { display: inline-block; margin-top: 4px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.sh-constellation__tip-state--support { background: rgba(63, 111, 176, .3); color: #b8ccec; }
.sh-constellation__tip-state--conflict { background: rgba(176, 67, 63, .3); color: #edb9b7; }
.sh-constellation__tip-state--tension { background: rgba(122, 90, 166, .3); color: #cfbce6; }
.sh-constellation__tip-state--convergence { background: rgba(63, 143, 106, .3); color: #b3ddc8; }
.sh-constellation__tip dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 8px 0 4px; font-size: 12px; }
.sh-constellation__tip dt { color: #a9adc4; }
.sh-constellation__tip dd { margin: 0; text-align: right; }
.sh-constellation__tip em { display: block; margin-top: 6px; font-size: 11px; color: #9ea2bd; font-style: normal; }

/* ---------- Filters ---------- */
.sh-constellation__filters {
	position: relative; z-index: 4; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
	padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08);
	background: rgba(12, 13, 22, .55);
}
.sh-constellation__filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-constellation__chip {
	appearance: none; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #d4d7e6;
	font: 500 12px/1 Georgia, serif; letter-spacing: .02em; padding: 8px 13px; border-radius: 999px; cursor: pointer;
	transition: background .2s, border-color .2s, color .2s;
}
.sh-constellation__chip:hover { border-color: rgba(255, 255, 255, .4); }
.sh-constellation__chip[aria-pressed="true"] { background: #eef0f7; color: #16131d; border-color: #eef0f7; }
.sh-constellation .sh-constellation__chip[aria-pressed="true"] {
	background: #f7f4ff !important;
	color: #11182a !important;
	border-color: #fff !important;
	box-shadow: 0 0 0 2px rgba(154, 177, 232, .45), 0 7px 18px rgba(3, 8, 20, .28) !important;
	font-weight: 700;
}
.sh-constellation .sh-constellation__chip[aria-pressed="true"]::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 7px;
	border-radius: 50%;
	background: var(--sh-const-convergence);
	vertical-align: 1px;
}
.sh-constellation__field { margin-left: auto; }
.sh-constellation__field select {
	background: rgba(255, 255, 255, .06); color: #eef0f7; border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px; padding: 8px 30px 8px 14px; font: 500 12px/1 Georgia, serif; cursor: pointer;
}
.sh-constellation__field select option { color: #16131d; }

/* ---------- Side panel ---------- */
.sh-constellation__panel {
	position: absolute; top: 0; right: 0; z-index: 8; width: min(380px, 88%); height: 100%;
	background: rgba(15, 16, 26, .98); border-left: 1px solid rgba(255, 255, 255, .12);
	transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .7, .2, 1);
	overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.sh-constellation__panel.is-open { transform: translateX(0); }
.sh-constellation__panel-close {
	position: sticky; top: 0; float: right; margin: 10px; width: 38px; height: 38px; border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .3); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.sh-constellation__panel-body { padding: 18px 22px 34px; }
.sh-constellation__panel-body h3 { font: 600 25px/1.15 Georgia, serif; margin: 8px 0 4px; color: #fff; }
.sh-constellation__panel-state { display: inline-block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.sh-constellation__panel-state--support { background: rgba(63, 111, 176, .28); }
.sh-constellation__panel-state--conflict { background: rgba(176, 67, 63, .28); }
.sh-constellation__panel-state--tension { background: rgba(122, 90, 166, .28); }
.sh-constellation__panel-state--convergence { background: rgba(63, 143, 106, .28); }
.sh-constellation__panel-lead { font: 400 15px/1.55 Georgia, serif; color: #dcdef0; margin: 14px 0; }
.sh-constellation__panel-desc { font-size: 13px; line-height: 1.6; color: #a9adc4; }
.sh-constellation__panel-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.sh-constellation__panel-meta span { font-size: 11px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #c7cadd; }
.sh-constellation__panel-section { margin-top: 18px; }
.sh-constellation__panel-section h4 { font: 600 11px/1 Georgia, serif; letter-spacing: .12em; text-transform: uppercase; color: #8f93ad; margin: 0 0 8px; }
.sh-constellation__panel-section ul { list-style: none; margin: 0; padding: 0; }
.sh-constellation__panel-section li { padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 13.5px; line-height: 1.4; }
.sh-constellation__panel-section li span { color: #8b8fa8; font-size: 11px; }
.sh-constellation__panel-section a { color: #cdd6ee; text-decoration: none; }
.sh-constellation__panel-section a:hover { text-decoration: underline; }
.sh-constellation__panel-link { display: inline-block; margin-top: 18px; color: #fff; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .5); }
.sh-constellation__panel-loading { padding: 20px 0; color: #9ea2bd; }

/* ---------- No-JS + screen-reader fallback ---------- */
.sh-constellation__fallback { list-style: none; margin: 0; padding: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.sh-constellation__fallback li a, .sh-constellation__fallback li { color: #dfe2f2; }

/* ---------- Section chrome (home / debate / thinker) ---------- */
.sh-constellation-home, .sh-changed-today, .sh-debate-impact, .sh-orbit { margin: 46px auto; max-width: 1180px; padding: 0 20px; }
.sh-constellation-home__head, .sh-changed-today header, .sh-debate-impact header, .sh-orbit header { text-align: center; max-width: 720px; margin: 0 auto 22px; }
.sh-constellation-home__head span, .sh-changed-today header span, .sh-debate-impact header span, .sh-orbit header span,
.sh-thought-explore-hero span {
	display: inline-block; font: 600 11px/1 Georgia, serif; letter-spacing: .16em; text-transform: uppercase; color: #8a7a52; margin-bottom: 10px;
}
.sh-constellation-home__head h2, .sh-changed-today header h2, .sh-debate-impact header h2, .sh-orbit header h2,
.sh-thought-explore-hero h1 { font: 400 clamp(28px, 4vw, 42px)/1.08 Georgia, serif; color: var(--sh-const-ink); margin: 0 0 12px; }
.sh-constellation-home__head p, .sh-debate-impact header p, .sh-orbit header p, .sh-thought-explore-hero p {
	color: var(--sh-const-muted); font-size: 16px; line-height: 1.6; margin: 0 auto;
}
.sh-constellation-home__cta { display: inline-block; margin-top: 14px; color: var(--sh-const-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Explore full-screen ---------- */
.sh-thought-explore { max-width: 1280px; margin: 0 auto; padding: 40px 20px 80px; }
.sh-thought-explore-hero { text-align: center; max-width: 760px; margin: 10px auto 26px; }

/* ---------- /ideas/ directory ---------- */
.sh-ideas-directory { margin-top: 44px; background: #fcfbf8; border: 1px solid #e4e1da; border-radius: 16px; padding: 26px; }
.sh-ideas-directory > header span,
.sh-idea-section > header span,
.sh-idea-hero > div > span { display: inline-block; font: 700 10px/1.2 Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #7a6d5a; }
.sh-ideas-directory > header h2,
.sh-idea-section > header h2 { margin: 8px 0 8px; font: 500 clamp(25px, 3vw, 36px)/1.1 Georgia, serif; color: #1f2738; }
.sh-ideas-directory > header p { margin: 0 0 16px; color: #5f6170; }
.sh-ideas-directory__filters { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; margin-bottom: 16px; }
.sh-ideas-directory__filters label { display: grid; gap: 5px; }
.sh-ideas-directory__filters span { font: 700 11px/1 Arial, sans-serif; color: #52515d; }
.sh-ideas-directory__filters input,
.sh-ideas-directory__filters select { height: 40px; border: 1px solid #cdc9c0; border-radius: 8px; padding: 8px 11px; background: #fff; color: #1e2432; }
.sh-ideas-directory__filters button { height: 40px; border: 1px solid #1b2438; border-radius: 999px; background: #1b2438; color: #fff; padding: 0 16px; font: 700 12px Arial, sans-serif; cursor: pointer; }
.sh-ideas-directory__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 12px; }
.sh-ideas-directory__card { border: 1px solid #ddd9cf; border-radius: 12px; background: #fff; padding: 14px; }
.sh-ideas-directory__card h3 { margin: 0 0 7px; font-size: 21px; }
.sh-ideas-directory__card h3 a { text-decoration: none; color: #172139; }
.sh-ideas-directory__card p { margin: 0; color: #5d6071; line-height: 1.55; font-size: 14px; }
.sh-ideas-directory__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sh-ideas-directory__meta span { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; background: #f2f1ee; color: #3c3f4a; font: 700 10px/1 Arial, sans-serif; }
.sh-ideas-directory__empty { margin: 12px 0 0; color: #5e6270; }
.sh-ideas-directory__pagination { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.sh-ideas-directory__pagination a { text-decoration: none; min-width: 34px; text-align: center; padding: 8px 10px; border-radius: 8px; border: 1px solid #ccc8be; color: #232737; background: #fff; }
.sh-ideas-directory__pagination a[aria-current="page"] { border-color: #1f2738; background: #1f2738; color: #fff; }

/* ---------- /idea/{slug}/ ---------- */
.sh-thought-idea { max-width: 1140px; margin: 0 auto; padding: 26px 20px 80px; background: #fbfaf7; }
.sh-idea-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; padding: 24px; border: 1px solid #dad6cc; border-radius: 14px; background: #fff; }
.sh-idea-hero h1 { margin: 8px 0 10px; font: 500 clamp(34px, 5vw, 58px)/.98 Georgia, serif; color: #171f34; }
.sh-idea-hero p { margin: 0; max-width: 760px; font-size: 17px; line-height: 1.6; color: #4f5465; }
.sh-idea-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sh-idea-hero__meta span { padding: 6px 10px; border-radius: 999px; background: #f0eeea; font: 700 10px/1 Arial, sans-serif; color: #2d3242; }
.sh-idea-section { margin-top: 26px; padding: 22px; border-radius: 14px; border: 1px solid #dfdbd0; background: #fff; }
.sh-idea-thinkers { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 12px; }
.sh-idea-thinkers article { border: 1px solid #e5e1d8; border-radius: 10px; background: #fdfdfc; overflow: hidden; }
.sh-idea-thinkers a { display: block; text-decoration: none; color: #182139; padding: 11px; }
.sh-idea-thinkers img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.sh-idea-thinkers h3 { margin: 9px 0 3px; font-size: 18px; }
.sh-idea-thinkers p { margin: 0; font-size: 12px; color: #5a6071; }
.sh-idea-thinkers small { display: inline-block; margin-top: 6px; padding: 3px 7px; border-radius: 999px; background: #ecedf5; color: #2e3852; font: 700 10px/1 Arial, sans-serif; }
.sh-idea-debates,
.sh-idea-reading { display: grid; gap: 10px; }
.sh-idea-debates article,
.sh-idea-reading article { padding: 12px; border: 1px solid #e2ded4; border-radius: 10px; background: #fcfcfb; }
.sh-idea-debates h3,
.sh-idea-reading h3 { margin: 0 0 4px; font-size: 20px; }
.sh-idea-debates h3 a,
.sh-idea-reading h3 a { text-decoration: none; color: #172139; }
.sh-idea-debates p,
.sh-idea-reading p { margin: 0; color: #5a6070; font-size: 14px; line-height: 1.5; }
.sh-idea-debates__pagination { margin-top: 12px; display: flex; gap: 7px; flex-wrap: wrap; }
.sh-idea-debates__pagination a { text-decoration: none; min-width: 34px; text-align: center; padding: 8px 10px; border-radius: 8px; border: 1px solid #ccc8be; color: #232737; background: #fff; }
.sh-idea-debates__pagination a[aria-current="page"] { border-color: #1f2738; background: #1f2738; color: #fff; }
.sh-idea-relationships { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sh-idea-relationships h3 { margin: 0 0 8px; font-size: 20px; }
.sh-idea-relationships ul,
.sh-idea-questions,
.sh-idea-timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sh-idea-relationships li,
.sh-idea-questions li,
.sh-idea-timeline li { border: 1px solid #e3dfd6; border-radius: 10px; background: #fcfcfb; padding: 10px; }
.sh-idea-relationships li a { font-weight: 600; color: #172139; text-decoration: none; }
.sh-idea-relationships li small,
.sh-idea-timeline time { display: block; margin-top: 4px; color: #5a6070; font-size: 12px; }
.sh-idea-timeline p { margin: 3px 0 0; font-size: 14px; color: #26314b; }
.sh-idea-timeline a { margin-top: 4px; display: inline-block; color: #2e4d76; text-decoration: none; font-size: 13px; }
.sh-idea-section--constellation { background: linear-gradient(160deg, #111d32 0%, #0e1829 100%); border-color: #202a3d; color: #f2f4ff; }
.sh-idea-section--constellation > header span,
.sh-idea-section--constellation > header h2 { color: #f1f4ff; }
.sh-idea-nav { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.sh-idea-nav a { text-decoration: none; padding: 10px 13px; border: 1px solid #cbc6bb; border-radius: 999px; color: #1f2738; background: #fff; }

/* ---------- What Changed Today ---------- */
.sh-changed-today__feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); grid-auto-rows: 1fr; }
.sh-changed-today__item { position: relative; display: flex; min-width: 0; }
.sh-changed-today__item a {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	width: 100%; height: 100%; box-sizing: border-box;
	padding: 16px 18px 16px 22px; border-radius: 14px; text-decoration: none; color: var(--sh-const-ink);
	background: #faf9fc; border: 1px solid #ece8f1; transition: transform .18s ease, box-shadow .18s ease;
}
.sh-changed-today__item a:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(30, 26, 40, .6); }
.sh-changed-today__mark { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 6px; height: 60%; border-radius: 999px; background: var(--sh-const-tension); }
.sh-changed-today__item--conflict .sh-changed-today__mark { background: var(--sh-const-conflict); }
.sh-changed-today__item--convergence .sh-changed-today__mark { background: var(--sh-const-convergence); }
.sh-changed-today__item--question .sh-changed-today__mark { background: var(--sh-const-center); }
.sh-changed-today__item--meeting .sh-changed-today__mark { background: var(--sh-const-support); }
.sh-changed-today__text { font-size: 15px; line-height: 1.45; }
.sh-changed-today__item time { flex: none; color: var(--sh-const-muted); font-size: 12px; }
.sh-changed-today__empty { text-align: center; color: var(--sh-const-muted); }

/* ---------- Debate impact ---------- */
.sh-debate-impact__body { display: grid; gap: 24px; grid-template-columns: 1.1fr .9fr; align-items: start; }
.sh-debate-impact__lists { display: grid; gap: 16px; }
.sh-debate-impact__block h3 { font: 600 12px/1 Georgia, serif; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px; color: var(--sh-const-muted); }
.sh-debate-impact__block ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sh-debate-impact__block li { padding: 6px 12px; border-radius: 999px; font-size: 13px; background: #f1eef6; color: var(--sh-const-ink); }
.sh-debate-impact__block--strengthened li { background: rgba(63, 111, 176, .12); }
.sh-debate-impact__block--challenged li { background: rgba(176, 67, 63, .12); }
.sh-debate-impact__block--revised li { background: rgba(122, 90, 166, .12); }
.sh-debate-impact__block--converged li { background: rgba(63, 143, 106, .12); }
.sh-debate-impact__block--question li { background: #f4efe4; font-style: italic; }

/* ---------- Orbit questions ---------- */
.sh-orbit__questions { max-width: 760px; margin: 22px auto 0; }
.sh-orbit__questions h3 { font: 600 12px/1 Georgia, serif; letter-spacing: .1em; text-transform: uppercase; color: var(--sh-const-muted); text-align: center; }
.sh-orbit__questions ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sh-orbit__questions li { padding: 12px 16px; border-radius: 12px; background: #f7f5fa; font: 400 15px/1.5 Georgia, serif; color: var(--sh-const-ink); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
	.sh-debate-impact__body { grid-template-columns: 1fr; }
	.sh-ideas-directory__filters { grid-template-columns: 1fr; }
	.sh-idea-hero { grid-template-columns: 1fr; }
	.sh-idea-relationships { grid-template-columns: 1fr; }
	.sh-constellation__filters { padding: 12px; }
	.sh-constellation__field { margin-left: 0; width: 100%; }
	.sh-constellation__field select { width: 100%; }
	:root { --sh-const-height: 460px; }
	.sh-constellation__panel { width: 100%; }
}

/* ---------- Dark theme host support ---------- */
@media (prefers-color-scheme: dark) {
	.sh-changed-today__item a { background: #17161f; border-color: #26232f; color: #ecebf3; }
	.sh-debate-impact__block li { background: #211f2a; color: #ecebf3; }
	.sh-orbit__questions li { background: #1a1922; color: #ecebf3; }
	.sh-constellation-home__head h2, .sh-changed-today header h2, .sh-debate-impact header h2, .sh-orbit header h2, .sh-thought-explore-hero h1 { color: #f2f1f8; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.sh-const-edge.is-recent { animation: none; stroke-dasharray: none; }
	.sh-constellation__loading span { animation: none; }
	.sh-constellation__panel { transition: none; }
	.sh-changed-today__item a { transition: none; }
}

/* ---------- High-contrast ---------- */
@media (prefers-contrast: more) {
	.sh-const-node__label { stroke-width: 4px; opacity: 1; }
	.sh-const-edge { stroke-opacity: .8 !important; }
	.sh-constellation__chip { border-color: #fff; }
}

/* ---------- Editorial idea dossier structure ---------- */
.thought-idea-single { max-width: 1180px; margin-inline: auto; }
.thought-idea-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: clamp(32px, 7vw, 92px); align-items: end; padding: clamp(48px, 8vw, 104px) 0 clamp(42px, 7vw, 84px); border-bottom: 1px solid #ded8e3; }
.thought-idea-hero-copy > span, .thought-idea-chapter > header > span { display: block; margin-bottom: 10px; color: #806d47; font: 700 11px/1.2 Georgia, serif; letter-spacing: .14em; text-transform: uppercase; }
.thought-idea-hero h1 { max-width: 850px; margin: 0; color: var(--sh-const-ink); font: 400 clamp(44px, 7vw, 84px)/.98 Georgia, serif; letter-spacing: -.035em; }
.thought-idea-hero-deck { max-width: 760px; margin: 26px 0 0; color: #4f4858; font: 400 clamp(19px, 2vw, 25px)/1.5 Georgia, serif; }
.thought-idea-association { margin: 18px 0 0; color: var(--sh-const-muted); }
.thought-idea-back { display: inline-block; margin-top: 28px; color: var(--sh-const-ink); text-decoration: none; border-bottom: 1px solid currentColor; }
.thought-idea-fact-rail { display: grid; gap: 0; margin: 0; border-top: 1px solid #d9d3df; }
.thought-idea-fact-rail div { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid #e8e3eb; }
.thought-idea-fact-rail dt { color: #746b79; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.thought-idea-fact-rail dd { margin: 0; color: var(--sh-const-ink); font-weight: 650; }
.thought-idea-chapter { margin: 0; padding: clamp(54px, 8vw, 96px) 0; border: 0; border-bottom: 1px solid #e3dee6; background: transparent; box-shadow: none; }
.thought-idea-chapter > header { max-width: 760px; margin-bottom: 30px; }
.thought-idea-chapter > header h2 { margin: 0; color: var(--sh-const-ink); font: 400 clamp(32px, 4vw, 50px)/1.08 Georgia, serif; }
.thought-idea-prose { max-width: 760px; color: #494250; font: 400 19px/1.75 Georgia, serif; }
.thought-idea-people, .thought-idea-relationships { background: linear-gradient(90deg, rgba(246,243,249,.72), transparent); }
.thought-idea-relationship-group li a { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; color: var(--sh-const-ink); text-decoration: none; border-bottom: 1px solid #ddd7e1; }
.thought-idea-relationship-group li span { color: var(--sh-const-muted); text-align: right; }
.thought-idea-discovery { margin-top: 40px; padding: 30px 0 70px; border-top: 1px solid #ded8e3; }
.thought-idea-discovery strong { width: 100%; }

/* Stable hooks for the final editorial debate treatment. */
.thought-debate-round-index { margin: 38px auto; padding: 18px 22px; border-block: 1px solid #ddd7e1; }
.thought-debate-round-index ol { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 10px 0 0; padding: 0; list-style: none; }
.thought-debate-round-index a { color: var(--sh-const-ink); text-underline-offset: 4px; }
.thought-debate-round > header h2 { margin: 5px 0 24px; font: 400 clamp(28px, 4vw, 42px)/1.1 Georgia, serif; }
.thought-debate-message.is-summary { border-inline-start: 4px solid var(--sh-const-center); }

@media (max-width: 760px) {
	.thought-idea-hero { grid-template-columns: 1fr; align-items: start; }
	.thought-idea-fact-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.thought-idea-fact-rail div { display: block; padding-right: 12px; }
	.thought-idea-fact-rail dd { margin-top: 5px; }
	.thought-idea-relationship-group li a { display: block; }
	.thought-idea-relationship-group li span { display: block; margin-top: 5px; text-align: left; }
}

/* =====================================================================
 * Editorial refinement pass — idea dossier, relationships, constellation
 * UI, filter clarity and the ideas directory. Extends the base rules
 * above; reuses the --sh-const-* palette. No new colour system.
 * ===================================================================== */

/* ---- Idea hero: single composed opening spread -------------------- */
.thought-idea-single .sh-thought-breadcrumbs {
	padding-top: 24px;
	font-size: 13px;
	overflow-wrap: anywhere;
}
.thought-idea-hero h1 { overflow-wrap: break-word; text-wrap: balance; }
.thought-idea-hero-copy { min-width: 0; }
.thought-idea-association strong { color: var(--sh-const-ink); font-weight: 650; }
.thought-idea-back { font: 700 12px/1 Georgia, serif; letter-spacing: .04em; border-bottom-color: rgba(29,26,36,.35); }
.thought-idea-back:hover { border-bottom-color: currentColor; }

/* Fact rail: an editorial ledger, not a stats panel. */
.thought-idea-fact-rail { align-self: end; }
.thought-idea-fact-rail div { align-items: baseline; gap: 20px; padding: 14px 0; }
.thought-idea-fact-rail div:last-child { border-bottom: 0; }
.thought-idea-fact-rail dt { color: #8a8290; font: 700 10px/1.3 Georgia, serif; letter-spacing: .1em; }
.thought-idea-fact-rail dd { font: 400 16px/1.35 Georgia, serif; font-weight: 600; overflow-wrap: anywhere; }

/* ---- Chapters: restrained variation, not identical boxes --------- */
.thought-idea-chapter > header > span { position: relative; padding-bottom: 9px; }
.thought-idea-chapter > header > span::after {
	content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 2px; background: #c3a86a;
}
.thought-idea-chapter:last-of-type { border-bottom: 0; }
/* Interpretation reads as the lead essay; give it more air + a drop cap. */
.thought-idea-overview .thought-idea-prose > p:first-child::first-letter {
	float: left; margin: 6px 10px 0 0; color: var(--sh-const-ink);
	font: 400 62px/.72 Georgia, serif;
}
/* People & relationships already carry a soft wash; deepen it for contrast.
   Kept as a full-width background so chapter content stays left-aligned with
   its neighbours (no inline padding/margin shift, no overflow risk). */
.thought-idea-people, .thought-idea-relationships {
	background: linear-gradient(92deg, rgba(244,240,248,.92), rgba(244,240,248,0) 80%);
}

/* ---- Relationships: subtle semantic distinction (not dashboard) --- */
.sh-idea-relationships { gap: 22px; }
.thought-idea-relationship-group h3 {
	display: flex; align-items: center; gap: 9px;
	color: var(--sh-const-ink); font: 400 22px/1.1 Georgia, serif;
}
.thought-idea-relationship-group h3::before {
	content: ""; width: 10px; height: 10px; border-radius: 3px; flex: none;
}
.thought-idea-relationship-group--conflicts h3::before {
	background: #cd8683;
	background: color-mix(in srgb, var(--sh-const-conflict) 62%, #ffffff);
	transform: rotate(45deg);
}
.thought-idea-relationship-group--convergences h3::before {
	background: #85bba1;
	background: color-mix(in srgb, var(--sh-const-convergence) 62%, #ffffff);
	border-radius: 50%;
}
.thought-idea-relationship-group--conflicts { border-left: 2px solid #e2cdcd; border-left-color: color-mix(in srgb, var(--sh-const-conflict) 28%, #e6dfe8); padding-left: 18px; }
.thought-idea-relationship-group--convergences { border-left: 2px solid #cddcd4; border-left-color: color-mix(in srgb, var(--sh-const-convergence) 30%, #e0e6e2); padding-left: 18px; }
.thought-idea-relationship-group li a { align-items: baseline; }
.thought-idea-relationship-group li a strong { font: 400 17px/1.3 Georgia, serif; }
.thought-idea-relationship-group li a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.thought-idea-relationship-group li span { flex: none; max-width: 42%; font-size: 13px; }

/* ---- Inner content lists polish ---------------------------------- */
.sh-idea-debates article, .sh-idea-reading article { transition: border-color .18s ease, transform .18s ease; }
.sh-idea-debates article:hover, .sh-idea-reading article:hover { border-color: #c9c2d0; transform: translateY(-2px); }
.sh-idea-timeline { position: relative; }
.sh-idea-timeline li { border-left: 2px solid #d8d1de; }
.sh-idea-questions li { font: 400 17px/1.5 Georgia, serif; color: #3a3444; }

/* Neighbourhood chapter: frame the dark graph as evidence, contained. */
.thought-idea-neighbourhood .sh-constellation { border: 1px solid rgba(255,255,255,.06); }

/* Continue exploring — navigation cards, not pills */
.thought-idea-discovery { display: block; }
.thought-idea-discovery > strong { display: block; width: 100%; margin-bottom: 16px; color: var(--sh-const-muted); font: 700 11px/1.2 Georgia, serif; letter-spacing: .12em; text-transform: uppercase; }
.thought-idea-discovery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.thought-idea-discovery-card {
	display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px 12px;
	padding: 20px 22px; border: 1px solid #ddd7e1; border-radius: 14px; background: #fff;
	text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.thought-idea-discovery-card span { grid-column: 1; color: #8a7350; font: 700 10px/1.2 Georgia, serif; letter-spacing: .1em; text-transform: uppercase; }
.thought-idea-discovery-card strong { grid-column: 1; color: var(--sh-const-ink); font: 400 20px/1.15 Georgia, serif; }
.thought-idea-discovery-card em { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--sh-const-muted); font-style: normal; font-size: 20px; transition: transform .2s ease; }
.thought-idea-discovery-card:hover { transform: translateY(-3px); border-color: #b3abbb; box-shadow: 0 16px 34px -24px rgba(30,26,40,.5); }
.thought-idea-discovery-card:hover em { transform: translateX(4px); }
.thought-idea-discovery-card--prev:hover em { transform: translateX(-4px); }
.thought-idea-discovery-card--all { background: linear-gradient(150deg, #1c2740, #141d31); border-color: #1c2740; }
.thought-idea-discovery-card--all span { color: #b9c2dc; }
.thought-idea-discovery-card--all strong,
.thought-idea-discovery-card--all em { color: #fff; }
@media (prefers-reduced-motion: reduce) {
	.thought-idea-discovery-card, .thought-idea-discovery-card em { transition: none; }
	.thought-idea-discovery-card:hover { transform: none; }
}

/* ---- Focus-visible (colour-independent) -------------------------- */
.thought-idea-single a:focus-visible,
.sh-ideas-directory a:focus-visible,
.sh-ideas-directory input:focus-visible,
.sh-ideas-directory select:focus-visible,
.sh-ideas-directory button:focus-visible {
	outline: 2px solid #6a5a86; outline-offset: 3px; border-radius: 4px;
}

/* ---- Constellation UI states ------------------------------------- */
.sh-constellation__empty-title { font-size: 22px; }
.sh-constellation__loading::after {
	content: "Mapping the neighbourhood…"; position: absolute; bottom: 26px; left: 0; right: 0;
	text-align: center; color: #9ea2bd; font: 500 12px/1 Georgia, serif; letter-spacing: .04em;
}
.sh-constellation__tip { transition: opacity .12s ease; max-width: min(260px, calc(100vw - 24px)); }
.sh-constellation__panel { box-shadow: -24px 0 60px -30px rgba(0,0,0,.7); }
.sh-constellation__panel-close:focus-visible,
.sh-constellation__panel-link:focus-visible { outline: 2px solid #9ab1e8; outline-offset: 3px; border-radius: 6px; }

/* Filter chips: make the deselectable state legible ----------------- */
.sh-constellation__chip:focus-visible { outline: 2px solid #9ab1e8; outline-offset: 2px; }
.sh-constellation .sh-constellation__chip[aria-pressed="true"]::after {
	content: "×"; margin-left: 8px; font-weight: 700; color: #5b5470; opacity: .7;
}
.sh-constellation .sh-constellation__chip[aria-pressed="true"]:hover::after { opacity: 1; }
.sh-constellation__field { display: inline-flex; align-items: center; gap: 8px; }
.sh-constellation__field-label { color: #b7bad0; font: 700 10px/1 Georgia, serif; letter-spacing: .1em; text-transform: uppercase; }
.sh-constellation__field select:focus-visible { outline: 2px solid #9ab1e8; outline-offset: 2px; }
.sh-constellation__filter-hint {
	flex-basis: 100%; margin: 2px 0 0; color: #9195af;
	font: 400 11.5px/1.4 Georgia, serif;
}

/* ---- Explore hero + ideas directory ------------------------------ */
.sh-thought-explore-hero p { color: var(--sh-const-muted); font: 400 clamp(16px,1.6vw,19px)/1.6 Georgia, serif; }
.sh-ideas-directory { box-shadow: 0 18px 50px -40px rgba(20,20,40,.5); }
.sh-ideas-directory__filters { align-items: end; }
.sh-ideas-directory__filters label { min-width: 0; }
.sh-ideas-directory__filters input,
.sh-ideas-directory__filters select { min-height: 44px; transition: border-color .18s ease, box-shadow .18s ease; }
.sh-ideas-directory__search > div { position: relative; }
.sh-ideas-directory__search input { width: 100%; padding-right: 42px; }
.sh-ideas-directory__search > div > span { position: absolute; right: 14px; top: 50%; color: #71697b; font: 400 22px/1 Georgia, serif; transform: translateY(-50%); pointer-events: none; }
.sh-ideas-directory__filters input:focus,
.sh-ideas-directory__filters select:focus { border-color: #6a5a86; box-shadow: 0 0 0 3px rgba(106,90,134,.16); outline: none; }
.sh-ideas-directory__filters button { min-height: 44px; transition: background .18s ease, transform .1s ease; }
.sh-ideas-directory__filters button:hover { background: #2a3550; }
.sh-ideas-directory__filters button:active { transform: translateY(1px); }
.sh-ideas-directory__grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); min-height: 220px; }
.sh-ideas-directory__summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; margin: -4px 0 14px; border-bottom: 1px solid #e5e0d7; }
.sh-ideas-directory__summary p { margin: 0; color: #76717c; font: 400 12px/1.4 Georgia, serif; }
.sh-ideas-directory__summary strong { color: var(--sh-const-ink); font-size: 15px; }
.sh-ideas-directory__summary a { color: #514766; font: 700 11px/1 Georgia, serif; text-underline-offset: 3px; }
.sh-ideas-directory__card { display: flex; flex-direction: column; min-width: 0; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.sh-ideas-directory__thinkers { display: flex; align-items: center; min-height: 58px; margin: -2px 0 14px; }
.sh-ideas-directory__thinkers a { position: relative; display: block; flex: none; width: 48px; height: 56px; margin-right: -9px; border: 3px solid #fff; border-radius: 10px; overflow: hidden; background: #e9e5df; box-shadow: 0 3px 10px rgba(27,24,34,.12); }
.sh-ideas-directory__thinkers a:hover { z-index: 2; transform: translateY(-2px); }
.sh-ideas-directory__thinkers img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.72); }
.sh-ideas-directory__thinkers > span { min-width: 0; margin-left: 18px; color: #817a86; font: italic 11px/1.35 Georgia, serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-ideas-directory__card:hover { border-color: #c6bfae; box-shadow: 0 14px 30px -22px rgba(30,26,40,.55); transform: translateY(-3px); }
.sh-ideas-directory__card h3 { font: 400 22px/1.12 Georgia, serif; }
.sh-ideas-directory__card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sh-ideas-directory__pagination { align-items: center; justify-content: center; margin-top: 26px; padding-top: 20px; border-top: 1px solid #e5e0d7; }
.sh-ideas-directory__pagination .page-numbers { min-width: 40px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 11px; border: 1px solid #ccc8be; border-radius: 8px; background: #fff; color: #232737; text-decoration: none; transition: border-color .18s ease, background .18s ease; }
.sh-ideas-directory__pagination .page-numbers.current { border-color: #1f2738; background: #1f2738; color: #fff; }
.sh-ideas-directory__pagination .page-numbers:hover { border-color: #1f2738; }
.sh-ideas-directory__pagination .prev, .sh-ideas-directory__pagination .next { padding-inline: 16px; font: 700 11px/1 Georgia, serif; }
.sh-ideas-directory__pagination .dots { border-color: transparent; background: transparent; }

/* ---- Additional responsive tiers --------------------------------- */
@media (max-width: 1024px) {
	.thought-idea-hero { gap: clamp(28px, 5vw, 56px); }
	.sh-ideas-directory__filters { grid-template-columns: 1fr 1fr; }
	.sh-ideas-directory__filters label:first-child { grid-column: 1 / -1; }
	.sh-ideas-directory__filters button { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
	.thought-idea-relationship-group li span { max-width: none; }
	.sh-ideas-directory { padding: 20px 16px; }
	.sh-ideas-directory__filters { grid-template-columns: 1fr; }
	.sh-ideas-directory__summary { align-items: flex-start; }
	.sh-ideas-directory__pagination .prev span, .sh-ideas-directory__pagination .next span { display: none; }
	.sh-constellation__field { margin-left: 0; width: 100%; }
	.sh-constellation__field select { flex: 1; }
}

@media (max-width: 400px) {
	.thought-idea-fact-rail { grid-template-columns: 1fr; }
	.thought-idea-overview .thought-idea-prose > p:first-child::first-letter { font-size: 48px; }
}

/* ---- Reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.sh-idea-debates article, .sh-idea-reading article,
	.sh-ideas-directory__card, .sh-ideas-directory__filters button,
	.sh-idea-nav a { transition: none; }
	.sh-ideas-directory__card:hover, .sh-idea-debates article:hover,
	.sh-idea-reading article:hover { transform: none; }
}
