/*
 * Data Matrix Research - public styles.
 * Palette and type matched to datamatrix.co.ls:
 *   navy #051c2c, ink #0b2230, slate #4c5a66, accent #2251ff, link #1863dc,
 *   card #f1f3f5, border #dce0e4, ground #ffffff. Headings Playfair Display,
 *   body Inter. Presentation follows a clean pollster layout.
 */

.dm-dash {
	--dm-navy: #051c2c;
	--dm-ink: #0b2230;
	--dm-slate: #4c5a66;
	--dm-accent: #2251ff;
	--dm-link: #1863dc;
	--dm-card: #f1f3f5;
	--dm-border: #dce0e4;
	--dm-ground: #ffffff;
	color: var(--dm-ink);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	max-width: 1000px;
	margin: 0 auto;
	line-height: 1.55;
}

.dm-dash h1,
.dm-dash h2,
.dm-dash h3 {
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	color: var(--dm-navy);
	line-height: 1.2;
	font-weight: 700;
}

.dm-dash-head h1 { font-size: 2rem; margin: 0 0 .4rem; }
.dm-lede { color: var(--dm-slate); font-size: 1.02rem; max-width: 60ch; margin: 0 0 1.5rem; }

/* Animated data hero */
.dm-hero {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	align-items: center;
	gap: 24px;
	background: var(--dm-navy);
	color: #fff;
	border-radius: 12px;
	padding: 28px 32px;
	margin: 0 0 1.75rem;
	overflow: hidden;
}
.dm-hero-kicker { margin: 0 0 .35rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #8fb0ff; }
.dm-hero-title { font-family: "Playfair Display", Georgia, serif; color: #fff !important; font-size: 2rem; line-height: 1.1; margin: 0 0 .5rem; }
.dm-hero-sub { color: #c6d2de; font-size: 1rem; margin: 0; max-width: 46ch; }
.dm-hero-art { display: flex; justify-content: center; }
.dm-hero-art svg { width: 100%; max-width: 300px; height: auto; }

.dm-hero-bar { fill: #2251ff; transform: translateY(var(--h)) scaleY(0); transform-origin: bottom; transform-box: fill-box; animation: dmBarRise .9s cubic-bezier(.2,.7,.3,1) forwards; animation-delay: var(--d); opacity: .92; }
.dm-hero-bar:nth-child(even) { fill: #4f7bff; }
@keyframes dmBarRise { to { transform: translateY(0) scaleY(1); } }

.dm-hero-line { stroke: #ffffff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: dmLineDraw 1.4s ease .6s forwards; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
@keyframes dmLineDraw { to { stroke-dashoffset: 0; } }

.dm-tile { opacity: 0; transform: translateY(6px); animation: dmTileIn .5s ease forwards; }
.dm-tile:nth-child(1){animation-delay:.05s}.dm-tile:nth-child(2){animation-delay:.12s}.dm-tile:nth-child(3){animation-delay:.19s}.dm-tile:nth-child(4){animation-delay:.26s}.dm-tile:nth-child(5){animation-delay:.33s}.dm-tile:nth-child(6){animation-delay:.4s}
@keyframes dmTileIn { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) { .dm-hero { grid-template-columns: 1fr; } .dm-hero-art { order: -1; } }
@media (prefers-reduced-motion: reduce) {
	.dm-hero-bar { animation: none; transform: none; }
	.dm-hero-line { animation: none; stroke-dashoffset: 0; }
	.dm-tile { animation: none; opacity: 1; transform: none; }
}

/* Current-rates strip */
.dm-rates { margin: 1.25rem 0 2rem; }
.dm-rates-h { font-size: 1.15rem; margin: 0 0 .6rem; }
.dm-rates-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}
.dm-tile {
	background: var(--dm-navy);
	color: #fff;
	border-radius: 8px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.dm-tile-label { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: #aebecb; }
.dm-tile-value { font-size: 1.5rem; font-weight: 700; }
.dm-tile-value.dm-tile-name { font-size: 1.05rem; }
.dm-tile-stamp { font-size: .72rem; color: #aebecb; }

/* Group sections */
.dm-group { border-top: 3px solid var(--dm-accent); padding: 1.4rem 0 1.8rem; }
.dm-group h2 { font-size: 1.5rem; margin: 0 0 .5rem; }
.dm-explain p { margin: 0 0 .5rem; color: var(--dm-ink); max-width: 68ch; }
.dm-explain strong { color: var(--dm-navy); }
.dm-subh { font-size: 1rem; margin: 1.2rem 0 .4rem; color: var(--dm-slate); }

/* Latest reading block */
.dm-dash .reading {
	background: var(--dm-card);
	border-left: 4px solid var(--dm-accent);
	border-radius: 6px;
	padding: 14px 18px;
	margin: 1rem 0;
}
.dm-dash .reading dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 18px; margin: 0; }
.dm-dash .reading dt { font-size: .8rem; color: var(--dm-slate); }
.dm-dash .reading dd { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--dm-navy); }
.dm-dash .tag {
	font-family: Inter, sans-serif;
	font-style: normal;
	font-size: .62rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--dm-slate);
	background: #e5e9ee;
	padding: 1px 6px;
	border-radius: 3px;
	vertical-align: middle;
}

/* Figures + copyright caption */
.dm-fig { margin: 1rem 0 1.25rem; }
.dm-figcap {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 4px;
	font-size: .74rem;
	color: var(--dm-slate);
	border-top: 1px solid var(--dm-border);
	padding-top: 4px;
	margin-top: 6px;
}
.dm-figlabel { font-weight: 600; color: var(--dm-navy); }
.dm-figcopy { font-style: italic; }
.dm-empty { color: var(--dm-slate); font-style: italic; }

/* Charts */
.dm-chart-wrap { position: relative; width: 100%; overflow-x: auto; }
.dm-chart { width: 100% !important; height: 300px !important; }
.dm-chart-tall .dm-chart { height: 360px !important; }

/* Heatmap */
.dm-heat-scroll { overflow-x: auto; }
table.dm-heat { border-collapse: collapse; width: 100%; font-size: .82rem; }
table.dm-heat th { text-align: left; padding: 5px 8px; color: var(--dm-slate); font-weight: 600; white-space: nowrap; }
table.dm-heat thead th { text-align: center; }
table.dm-heat td { text-align: center; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.dm-heat-na { color: #b8c1cb; }
.dm-heat-legend { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--dm-slate); margin-top: 6px; }
.dm-heat-ramp { display: inline-block; width: 120px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgb(234,240,248), rgb(34,81,255)); }

/* Tables */
.dm-dash .table-scroll { overflow-x: auto; margin: .5rem 0 1rem; }
.dm-dash table.dm-annual,
.dm-dash .table-scroll table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.dm-dash .table-scroll th,
.dm-dash .table-scroll td { padding: 6px 10px; border-bottom: 1px solid var(--dm-border); text-align: left; }
.dm-dash .table-scroll td.num,
.dm-dash .table-scroll th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dm-dash thead th { color: var(--dm-slate); font-weight: 600; }

/* Release schedule */
.dm-sched { margin: 0 0 2rem; }
.dm-sched-table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.dm-sched-table th, .dm-sched-table td { padding: 8px 12px; border-bottom: 1px solid var(--dm-border); text-align: left; vertical-align: top; }
.dm-sched-table thead th { color: var(--dm-slate); font-weight: 600; }
.dm-sched-table tbody th { font-weight: 600; color: var(--dm-navy); }
.dm-sched-rel { display: inline-block; margin-left: 6px; font-size: .74rem; color: #fff; background: var(--dm-accent); border-radius: 10px; padding: 1px 8px; }

/* Next update line */
.dm-next { display: flex; align-items: center; gap: 8px; margin: .25rem 0 1rem; padding: 8px 12px; background: var(--dm-card); border-radius: 6px; font-size: .9rem; color: var(--dm-ink); }
.dm-next strong { color: var(--dm-navy); }
.dm-next-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dm-accent); flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(34,81,255,0.15); }

.dm-dash .source { color: var(--dm-slate); font-size: .82rem; margin: .6rem 0 0; }
.dm-dash-foot { text-align: center; color: var(--dm-slate); font-size: .74rem; font-style: italic; margin: 2rem 0 .5rem; border-top: 1px solid var(--dm-border); padding-top: .8rem; }

/* Request desk form */
.dm-request-form { max-width: 32rem; margin: 1rem 0; }
.dm-request-form label { font-weight: 600; }
.dm-request-form input[type="text"], .dm-request-form input[type="email"], .dm-request-form textarea {
	width: 100%; max-width: 32rem; padding: .4rem .5rem; border: 1px solid var(--dm-border, #d8d2c4); border-radius: 3px; background: #fff; color: #0b2230;
}
.dm-request-form input[size] { width: auto; }
.dm-request-form button {
	background: #2251ff; color: #fff; border: 0; padding: .5rem 1rem; border-radius: 4px; cursor: pointer; font: inherit;
}
.dm-request-form button:hover { background: #1863dc; }
