/* SOC Guideline Value. Scoped to .socgv; fonts are inherited from the theme. */
.socgv {
	--socgv-accent: #1d4f91;
	--socgv-ink: #1c2733;
	--socgv-muted: #5b6676;
	--socgv-rule: #e2e6eb;
	--socgv-soft: #f5f7f9;
	--socgv-up: #1a7f4b;
	--socgv-down: #b42318;
	--socgv-radius: 10px;
	color: var(--socgv-ink);
	font-size: 16px;
	line-height: 1.5;
	max-width: 1080px;
	margin: 0 auto;
	font-variant-numeric: tabular-nums;
	container-type: inline-size;
	container-name: socgv;
}
.socgv *, .socgv *::before, .socgv *::after { box-sizing: border-box; }
.socgv :where(h2, h3, p) { margin: 0; }
.socgv button, .socgv input, .socgv select { font: inherit; color: inherit; }
.socgv :focus-visible { outline: 3px solid color-mix(in srgb, var(--socgv-accent) 55%, white); outline-offset: 2px; }
.socgv-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.socgv-muted { color: var(--socgv-muted); }
.socgv-num { text-align: right; }

/* Head */
.socgv-head { max-width: 46rem; margin-bottom: 1.5rem; }
.socgv-title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.015em; font-weight: 750; margin-bottom: .6rem; }
.socgv-intro { color: var(--socgv-muted); font-size: 1.05rem; }

/* Search */
.socgv-search { background: var(--socgv-soft); border: 1px solid var(--socgv-rule); border-radius: 14px; padding: 14px; }
.socgv-q { position: relative; display: block; }
.socgv-q svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--socgv-muted); pointer-events: none; }
.socgv .socgv-q input {
	width: 100%; height: 58px; margin: 0; padding: 0 18px 0 48px;
	font-size: 1.15rem; background: #fff; border: 2px solid var(--socgv-rule); border-radius: var(--socgv-radius);
	box-shadow: none; -webkit-appearance: none; appearance: none;
}
.socgv .socgv-q input:focus { border-color: var(--socgv-accent); outline: none; }
.socgv-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.socgv-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--socgv-muted); }
.socgv .socgv-filters select {
	width: 100%; height: 42px; margin: 0; padding: 0 32px 0 12px; font-size: .95rem; color: var(--socgv-ink);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6676' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
	border: 1px solid var(--socgv-rule); border-radius: 8px; -webkit-appearance: none; appearance: none;
}
.socgv .socgv-filters select:disabled { opacity: .55; }

.socgv-facts { margin: 1rem 2px 1.75rem; color: var(--socgv-muted); max-width: 52rem; }
.socgv-facts strong { color: var(--socgv-ink); }

/* Results */
.socgv-status { min-height: 1.5em; margin-bottom: .5rem; font-size: .95rem; color: var(--socgv-muted); }
.socgv-status strong { color: var(--socgv-ink); }
.socgv-results[aria-busy="true"] [data-socgv-rows] { opacity: .45; transition: opacity .15s; }
.socgv-table { border-top: 2px solid var(--socgv-ink); }
.socgv-tr {
	display: grid; grid-template-columns: minmax(0, 1fr) 118px 100px 76px minmax(150px, 210px); gap: 14px; align-items: center;
	padding: 12px 6px; border-bottom: 1px solid var(--socgv-rule);
}
.socgv-th { font-size: .78rem; font-weight: 650; color: var(--socgv-muted); padding-top: 10px; padding-bottom: 10px; line-height: 1.25; }
.socgv-th small { display: block; font-weight: 400; }
.socgv-row { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--socgv-rule); border-radius: 0; cursor: pointer; margin: 0; color: inherit; }
.socgv-row:hover { background: var(--socgv-soft); }
.socgv-street { font-weight: 600; display: block; line-height: 1.3; overflow-wrap: anywhere; }
.socgv-where { display: block; font-size: .85rem; color: var(--socgv-muted); margin-top: 2px; }
.socgv-val { font-size: 1.1rem; font-weight: 700; }
.socgv-prev { color: var(--socgv-muted); }
.socgv-chg { font-size: .9rem; font-weight: 600; }
.socgv-chg.is-up { color: var(--socgv-up); }
.socgv-chg.is-down { color: var(--socgv-down); }
.socgv-chg.is-flat { color: var(--socgv-muted); font-weight: 400; }
.socgv-class { font-size: .85rem; color: var(--socgv-muted); }
.socgv-cat { display: inline-block; font-size: .72rem; font-weight: 650; padding: 1px 7px; border-radius: 4px; margin-right: 6px; background: var(--socgv-soft); color: var(--socgv-ink); border: 1px solid var(--socgv-rule); }
.socgv-cat[data-cat="Commercial"] { background: #fff4e5; border-color: #f5d9ad; }
.socgv-cat[data-cat="Mixed"] { background: #f1ecfb; border-color: #dccff3; }
.socgv-cat[data-cat="Industrial"] { background: #eef2f6; border-color: #d3dbe4; }
.socgv-mark { background: color-mix(in srgb, var(--socgv-accent) 14%, white); color: inherit; padding: 0 1px; border-radius: 2px; }
.socgv-empty { padding: 28px 6px; border-bottom: 1px solid var(--socgv-rule); }
.socgv-empty strong { display: block; margin-bottom: 4px; }

.socgv-pager { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 18px 0 8px; flex-wrap: wrap; }
.socgv-pager button { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--socgv-rule); background: #fff; border-radius: 8px; cursor: pointer; margin: 0; }
.socgv-pager button[aria-current="page"] { background: var(--socgv-ink); border-color: var(--socgv-ink); color: #fff; }
.socgv-pager button:disabled { opacity: .4; cursor: default; }
.socgv-pager span { color: var(--socgv-muted); padding: 0 4px; }

/* SRO overview */
.socgv-overview { margin-top: 3.25rem; }
.socgv-overview h3, .socgv-faq h3 { font-size: 1.4rem; line-height: 1.2; font-weight: 720; margin-bottom: .35rem; }
.socgv-overview > .socgv-muted { margin-bottom: 1rem; }
.socgv-overview-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.socgv .socgv-overview-table { width: 100%; min-width: 720px; border-collapse: collapse; margin: 0; border: 0; font-size: .95rem; }
.socgv .socgv-overview-table :is(th, td) { padding: 10px 8px; border: 0; border-bottom: 1px solid var(--socgv-rule); text-align: left; vertical-align: middle; background: none; }
.socgv .socgv-overview-table thead th { font-size: .78rem; color: var(--socgv-muted); font-weight: 650; border-bottom: 2px solid var(--socgv-ink); }
.socgv .socgv-overview-table .socgv-num { text-align: right; white-space: nowrap; }
.socgv-link { background: none; border: 0; padding: 0; margin: 0; font-weight: 600; color: var(--socgv-accent); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--socgv-accent) 35%, transparent); text-underline-offset: 3px; }
.socgv-link:hover { text-decoration-color: currentColor; }
.socgv-range-cell { width: 34%; }
.socgv-range { position: relative; display: block; height: 8px; background: var(--socgv-soft); border-radius: 4px; margin-bottom: 4px; }
.socgv-range-bar { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--socgv-accent) 30%, white); border-radius: 4px; }
.socgv-range-mid { position: absolute; top: -3px; width: 3px; height: 14px; margin-left: -1px; background: var(--socgv-accent); border-radius: 2px; }
.socgv-range-text { font-size: .8rem; color: var(--socgv-muted); }
.socgv-top { font-size: .88rem; }
.socgv-top .socgv-muted { display: block; font-size: .8rem; }

/* FAQ */
.socgv-faq { margin-top: 3rem; max-width: 46rem; }
.socgv-faq h3 { margin-bottom: .75rem; }
.socgv-faq details { border-bottom: 1px solid var(--socgv-rule); }
.socgv-faq summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 600; list-style: none; position: relative; }
.socgv-faq summary::-webkit-details-marker { display: none; }
.socgv-faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.3rem; color: var(--socgv-muted); }
.socgv-faq details[open] summary::after { content: "−"; }
.socgv-faq details p { padding: 0 0 16px; color: var(--socgv-muted); max-width: 42rem; }

.socgv-source { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--socgv-rule); font-size: .88rem; max-width: 46rem; }
.socgv-source p + p { margin-top: .4rem; }
.socgv-source a { color: var(--socgv-accent); }

/* Drawer */
.socgv-drawer { position: fixed; inset: 0; z-index: 99999; }
.socgv-drawer[hidden] { display: none; }
.socgv-scrim { position: absolute; inset: 0; background: rgba(15, 23, 33, .45); }
.socgv-panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: #fff; overflow-y: auto;
	padding: 64px 28px 40px; box-shadow: -12px 0 40px rgba(15, 23, 33, .18); outline: none;
	animation: socgv-in .22s ease-out;
}
@keyframes socgv-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.socgv-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--socgv-soft); cursor: pointer; display: grid; place-items: center; margin: 0; padding: 0; }

/* The street board: the one bold element. */
.socgv-board {
	position: relative; margin: 0 0 22px; padding: 18px 20px 16px; border-radius: 8px;
	background: var(--socgv-accent); color: #fff;
	box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9), inset 0 0 0 5px var(--socgv-accent);
}
.socgv-board::before, .socgv-board::after { content: ""; position: absolute; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .75); }
.socgv-board::before { left: 10px; }
.socgv-board::after { right: 10px; }
.socgv-board-street { font-size: 1.45rem; line-height: 1.2; font-weight: 750; letter-spacing: .005em; overflow-wrap: anywhere; }
.socgv-board-where { margin-top: 6px; font-size: .9rem; opacity: .85; }

.socgv-rate { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.socgv-rate-num { font-size: 2.6rem; line-height: 1; font-weight: 780; letter-spacing: -0.02em; }
.socgv-rate-unit { color: var(--socgv-muted); }
.socgv-rate-sub { margin-top: 6px; color: var(--socgv-muted); font-size: .92rem; }
.socgv-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--socgv-rule); font-size: .92rem; }
.socgv-dl dt { color: var(--socgv-muted); margin: 0; }
.socgv-dl dd { margin: 0; text-align: right; font-weight: 600; }

.socgv-calc { margin-top: 26px; padding: 18px; background: var(--socgv-soft); border-radius: var(--socgv-radius); }
.socgv-calc h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.socgv-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.socgv-calc label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--socgv-muted); }
.socgv .socgv-calc input { height: 44px; padding: 0 12px; margin: 0; border: 1px solid var(--socgv-rule); border-radius: 8px; background: #fff; font-size: 1rem; width: 100%; box-shadow: none; }
.socgv .socgv-calc input:focus { border-color: var(--socgv-accent); outline: none; }
.socgv-calc-out { margin-top: 14px; display: grid; gap: 6px; font-size: .95rem; }
.socgv-calc-out div { display: flex; justify-content: space-between; gap: 12px; }
.socgv-calc-out span:last-child { font-weight: 600; text-align: right; }
.socgv-calc-out .is-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--socgv-rule); font-size: 1.1rem; }
.socgv-calc-out .is-total span:last-child { font-weight: 780; }
.socgv-calc-note { margin-top: 10px; font-size: .8rem; color: var(--socgv-muted); }
.socgv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.socgv-btn { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--socgv-rule); background: #fff; cursor: pointer; text-decoration: none; color: var(--socgv-ink); font-size: .92rem; margin: 0; }
.socgv-btn-primary { background: var(--socgv-accent); color: #fff; border-color: var(--socgv-accent); }
.socgv-btn:hover { filter: brightness(.96); }

/* Layout follows the width the page builder gives the tool, not the screen. */
@container socgv (max-width: 860px) {
	.socgv-tr { grid-template-columns: minmax(0, 1fr) 112px 96px 72px; }
	.socgv-tr > .socgv-class { display: none; }
}
@container socgv (max-width: 680px) {
	.socgv-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.socgv-tr { grid-template-columns: minmax(0, 1fr) 104px 72px; }
	.socgv-tr > .socgv-prev { display: none; }
}
@container socgv (max-width: 480px) {
	.socgv-search { padding: 10px; border-radius: 12px; }
	.socgv .socgv-q input { height: 52px; font-size: 1rem; }
	.socgv-th { display: none; }
	.socgv-tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "street val" "street chg"; gap: 2px 12px; padding: 12px 2px; }
	.socgv-tr > :nth-child(1) { grid-area: street; }
	.socgv-tr > .socgv-val { grid-area: val; }
	.socgv-tr > .socgv-chg { grid-area: chg; text-align: right; font-size: .8rem; }
}
/* The drawer sits outside the flow, so it follows the screen. */
@media (max-width: 560px) {
	.socgv-panel { top: auto; width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 60px 18px 32px; animation-name: socgv-up; }
	.socgv-rate-num { font-size: 2.2rem; }
	.socgv-calc-grid { grid-template-columns: 1fr; }
}
@keyframes socgv-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.socgv-panel { animation: none; }
	.socgv-results[aria-busy="true"] [data-socgv-rows] { transition: none; }
}
