/* PWI House Price History explorer — matches the PWI Modern Tabloid theme. */
.hpix {
	--hpix-navy: #0d1a2d;
	--hpix-ink: #0f172a;
	--hpix-text: #1f2937;
	--hpix-muted: #64748b;
	--hpix-line: #e5e7eb;
	--hpix-soft: #f3f5f8;
	--hpix-red: #e4151f;
	--hpix-up: #16a34a;
	--hpix-down: #e4151f;
	margin: 40px 0 24px;
	color: var(--hpix-text);
	scroll-margin-top: 80px;
}
.hpix .screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.hpix *, .hpix *::before, .hpix *::after { box-sizing: border-box; }
.hpix__head h2 {
	font-family: Anton, Oswald, Impact, "Arial Narrow", sans-serif;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: .01em;
	font-size: clamp(26px, 3.4vw, 36px);
	line-height: 1.1;
	color: var(--hpix-ink);
	margin: 0 0 8px;
}
.hpix__head p { margin: 0 0 18px; max-width: 760px; color: #475569; font-size: 15px; line-height: 1.55; }

.hpix__panel, .hpix__calc {
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
	padding: 20px;
}
.hpix__calc { margin-top: 20px; border-top: 4px solid var(--hpix-red); }

.hpix__controls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; margin-bottom: 18px; }
.hpix__field--areas { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hpix__field--areas .hpix__label { margin: 0 4px 0 0; }
.hpix__label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--hpix-muted);
	margin: 0 0 6px;
}
.hpix select, .hpix input[type="text"] {
	font: inherit;
	font-size: 14px;
	color: var(--hpix-text);
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	padding: 7px 10px;
	min-height: 38px;
	max-width: 100%;
}
.hpix select:focus, .hpix input:focus, .hpix button:focus-visible { outline: 2px solid var(--hpix-red); outline-offset: 1px; }
.hpix select:disabled { opacity: .5; }
.hpix__add { min-width: 220px; }

.hpix__chips { display: contents; }
.hpix__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--hpix-soft);
	border: 1px solid var(--hpix-line);
	border-radius: 999px;
	padding: 5px 6px 5px 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--hpix-ink);
}
.hpix__chip i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); display: inline-block; }
.hpix__chip button {
	border: 0;
	background: transparent;
	color: var(--hpix-muted);
	font-size: 18px;
	line-height: 1;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
}
.hpix__chip button:hover { background: #e2e8f0; color: var(--hpix-ink); }

.hpix__seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #cbd5e1; border-radius: 4px; overflow: hidden; }
.hpix__seg button {
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	background: #fff;
	color: var(--hpix-text);
	border: 0;
	border-right: 1px solid #cbd5e1;
	padding: 8px 12px;
	cursor: pointer;
	min-height: 38px;
}
.hpix__seg button:last-child { border-right: 0; }
.hpix__seg button:hover { background: var(--hpix-soft); }
.hpix__seg button[aria-pressed="true"] { background: var(--hpix-navy); color: #fff; }
.hpix__fromto { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--hpix-muted); }
.hpix__fromto label { display: inline-flex; gap: 6px; align-items: center; }
.hpix__fromto select { min-height: 32px; padding: 4px 8px; }

.hpix__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.hpix__stat { background: var(--hpix-navy); color: #fff; border-radius: 6px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hpix__statl { font-size: 12px; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hpix__statv { font-family: Oswald, "Arial Narrow", sans-serif; font-size: 24px; font-weight: 600; line-height: 1.2; }
.hpix__stats2 { font-size: 12px; color: #94a3b8; }
.hpix__stat .up { color: #22c55e; }
.hpix__stat .down { color: #f87171; }
.hpix__empty { grid-column: 1 / -1; margin: 0; color: var(--hpix-muted); }

.hpix__chart { position: relative; height: 400px; }
.hpix__loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--hpix-muted); font-size: 14px; text-align: center; padding: 20px; background: #fff; }
.hpix__loading[hidden] { display: none; }
.hpix__note { font-size: 13px; color: var(--hpix-muted); margin: 10px 0 0; }

.hpix__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hpix__btn {
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	background: #fff;
	color: var(--hpix-ink);
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	padding: 8px 14px;
	cursor: pointer;
	min-height: 38px;
}
.hpix__btn:hover { border-color: var(--hpix-ink); }
.hpix__table { margin-top: 14px; }
.hpix__tscroll { max-height: 420px; overflow: auto; border: 1px solid var(--hpix-line); border-radius: 4px; }
.hpix table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.hpix table.data caption { text-align: left; font-weight: 700; font-size: 15px; padding: 12px; }
.hpix table.data th, .hpix table.data td { padding: 8px 12px; border-bottom: 1px solid var(--hpix-line); text-align: right; white-space: nowrap; }
.hpix table.data th:first-child { text-align: left; }
.hpix table.data thead th { position: sticky; top: 0; background: #fff; font-size: 12px; text-transform: uppercase; color: var(--hpix-muted); letter-spacing: .03em; }
.hpix .up { color: var(--hpix-up); }
.hpix .down { color: var(--hpix-down); }

.hpix__calc h3 { font-family: Oswald, "Arial Narrow", sans-serif; font-size: 22px; margin: 0 0 6px; color: var(--hpix-ink); }
.hpix__calc > p { margin: 0 0 14px; color: #475569; font-size: 15px; }
.hpix__calcform { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr; gap: 12px; }
.hpix__calcform label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--hpix-muted); }
.hpix__calcform select, .hpix__calcform input { width: 100%; text-transform: none; letter-spacing: 0; font-weight: 400; }
.hpix__calcout { margin-top: 16px; font-size: 15px; line-height: 1.55; }
.hpix__calcout p { margin: 6px 0 0; }
.hpix__calcval { display: inline-flex; flex-direction: column; background: var(--hpix-navy); color: #fff; border-radius: 6px; padding: 12px 16px; }
.hpix__calcval span { font-size: 12px; color: #cbd5e1; }
.hpix__calcval strong { font-family: Oswald, "Arial Narrow", sans-serif; font-size: 30px; font-weight: 600; line-height: 1.15; }
.hpix__small { font-size: 12px; color: var(--hpix-muted); margin: 10px 0 0; }

.hpix__long { margin-top: 20px; overflow-x: auto; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.hpix__fact { font-size: 15px; margin: 12px 0 0; color: #334155; }
.hpix .market__src { margin-top: 12px; }

.hpix__field--index { grid-column: 1 / -1; }
.hpix__seg--index button[aria-pressed="true"] { background: var(--hpix-red); color: #fff; }
.hpix__field--areas.is-off { opacity: .45; pointer-events: none; }
.hpix__seg button:disabled { opacity: .4; cursor: not-allowed; }
.hpix__btn:disabled { opacity: .45; cursor: not-allowed; }
.hpix__modehint { margin: -6px 0 14px; padding: 10px 12px; background: #fff7ed; border-left: 3px solid #d97706; font-size: 13px; color: #7c2d12; border-radius: 0 4px 4px 0; }
.hpix__modehint[hidden] { display: none; }
.hpix__stat a { color: #cbd5e1; text-decoration: underline; }
.hpix__stat--lloyds { box-shadow: inset 0 4px 0 #11803a; }
.hpix__stat--nationwide { box-shadow: inset 0 4px 0 #1d4ed8; }

.hpix__compare { margin-bottom: 36px; }
.hpix__idx { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hpix__idx--2 { grid-template-columns: repeat(2, 1fr); }
.hpix__idx--1 { grid-template-columns: 1fr; max-width: 420px; }
.hpix__idxcard { background: var(--hpix-navy); color: #fff; border-radius: 6px; padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; }
.hpix__idxcard:nth-child(1) { box-shadow: inset 0 4px 0 var(--hpix-red); }
.hpix__idxcard:nth-child(2) { box-shadow: inset 0 4px 0 #11803a; }
.hpix__idxcard:nth-child(3) { box-shadow: inset 0 4px 0 #1d4ed8; }
.hpix__idxname { font-family: Oswald, "Arial Narrow", sans-serif; font-size: 18px; font-weight: 600; }
.hpix__idxsub { font-size: 12px; color: #94a3b8; }
.hpix__idxval { font-family: Oswald, "Arial Narrow", sans-serif; font-size: 32px; font-weight: 600; line-height: 1.15; margin-top: 6px; }
.hpix__idxchg { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.hpix__idxchg .up { color: #22c55e; }
.hpix__idxchg .down { color: #f87171; }
.hpix__idxchg .chg:not(.up):not(.down) { color: #cbd5e1; }
.hpix__idxnote { font-size: 12px; color: #cbd5e1; margin-top: 6px; }
.hpix__idxsrc { font-size: 12px; color: #94a3b8; text-decoration: underline; margin-top: 2px; }
.hpix__idxsrc:hover { color: #fff; }
.hpix__diff { margin-top: 14px; overflow-x: auto; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.hpix .hpix__diff table.data td, .hpix .hpix__diff table.data th { white-space: normal; text-align: left; vertical-align: top; min-width: 150px; line-height: 1.45; }
.hpix .hpix__diff table.data tbody th { color: var(--hpix-ink); font-weight: 700; min-width: 130px; }

@media (max-width: 820px) {
	.hpix__idx, .hpix__idx--2 { grid-template-columns: 1fr; }
	.hpix__controls { grid-template-columns: 1fr; }
	.hpix__calcform { grid-template-columns: 1fr 1fr; }
	.hpix__chart { height: 320px; }
}
@media (max-width: 520px) {
	.hpix__panel, .hpix__calc { padding: 14px; }
	.hpix__calcform { grid-template-columns: 1fr; }
	.hpix__seg button { padding: 8px 9px; font-size: 12px; }
	.hpix__add { min-width: 0; width: 100%; }
	.hpix__chart { height: 280px; }
	.hpix__statv { font-size: 20px; }
}
