/*
 * Same palette as the search page (bto-search.css). Selectors start with .ugp plus a
 * class so they outrank the theme's ".post_content h2/ol/th" decoration on these pages only.
 */
.ugp {
	--ugp-ink: #152033;
	--ugp-muted: #68758a;
	--ugp-line: #d9e1eb;
	--ugp-soft: #f4f7fb;
	--ugp-blue: #165dff;
	--ugp-blue-deep: #0e3fa9;
	--ugp-danger: #a83737;
	color: var(--ugp-ink);
	font-size: 15px;
	line-height: 1.8;
}

.ugp .ugp-card {
	margin: 0 0 20px;
	padding: 22px 24px;
	border: 1px solid var(--ugp-line);
	border-radius: 8px;
	background: #fff;
}

.ugp .ugp-card > :last-child {
	margin-bottom: 0;
}

.ugp .ugp-h {
	position: static;
	margin: 0 0 14px;
	padding: 0 0 0 12px;
	border: 0;
	border-left: 4px solid var(--ugp-blue);
	border-radius: 0;
	background: none;
	color: var(--ugp-ink);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
}

.ugp .ugp-h::before,
.ugp .ugp-h::after {
	content: none;
	display: none;
}

.ugp p {
	margin: 0 0 12px;
}

/* Summary */
.ugp .ugp-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin: 0 0 16px;
	padding: 0;
}

.ugp .ugp-stats > div {
	padding: 10px 12px;
	border-radius: 6px;
	background: var(--ugp-soft);
}

.ugp .ugp-stats dt {
	margin: 0;
	color: var(--ugp-muted);
	font-size: 12px;
	font-weight: 400;
}

.ugp .ugp-stats dd {
	margin: 0;
	color: var(--ugp-ink);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	font-variant-numeric: tabular-nums;
}

.ugp .ugp-stats dd small {
	margin-left: 2px;
	font-size: 12px;
	font-weight: 400;
}

.ugp .ugp-lead {
	font-size: 15px;
}

.ugp .ugp-note {
	color: var(--ugp-muted);
	font-size: 13px;
	line-height: 1.7;
}

.ugp .ugp-cta {
	margin: 16px 0 0;
	text-align: center;
}

.ugp .ugp-button {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 6px;
	background: var(--ugp-blue);
	color: #fff;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
}

.ugp .ugp-button:hover,
.ugp .ugp-button:focus-visible {
	background: var(--ugp-blue-deep);
	color: #fff;
}

/* Cheapest list */
.ugp .ugp-list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--ugp-line);
}

.ugp .ugp-item {
	display: grid;
	grid-template-columns: 7.5em 1fr auto;
	grid-template-areas:
		"price name link"
		"price spec link";
	gap: 2px 16px;
	align-items: center;
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid var(--ugp-line);
	list-style: none;
}

.ugp .ugp-item::before,
.ugp .ugp-item::marker {
	content: none;
}

.ugp .ugp-item__price {
	grid-area: price;
	font-size: 17px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ugp .ugp-item__sale {
	display: block;
	color: var(--ugp-danger);
	font-size: 11px;
	font-weight: 700;
}

.ugp .ugp-item__name {
	grid-area: name;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.ugp .ugp-item__name small {
	display: block;
	color: var(--ugp-muted);
	font-size: 12px;
	font-weight: 400;
}

.ugp .ugp-item__spec {
	grid-area: spec;
	color: var(--ugp-muted);
	font-size: 12.5px;
	line-height: 1.5;
}

.ugp .ugp-item__link {
	grid-area: link;
	padding: 6px 12px;
	border: 1px solid var(--ugp-blue);
	border-radius: 6px;
	color: var(--ugp-blue);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
}

.ugp .ugp-item__link:hover,
.ugp .ugp-item__link:focus-visible {
	background: var(--ugp-blue);
	color: #fff;
}

/* Tables */
.ugp .ugp-table {
	overflow-x: auto;
	margin: 0;
}

.ugp .ugp-table table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.ugp .ugp-table th,
.ugp .ugp-table td {
	padding: 9px 12px;
	border: 0;
	border-bottom: 1px solid var(--ugp-line);
	background: none;
	color: var(--ugp-ink);
	text-align: left;
}

.ugp .ugp-table th {
	background: var(--ugp-soft);
	color: var(--ugp-muted);
	font-size: 12px;
	font-weight: 700;
}

.ugp .ugp-table td:not(:first-child),
.ugp .ugp-table th:not(:first-child) {
	text-align: right;
	white-space: nowrap;
}

.ugp .ugp-table a {
	color: var(--ugp-blue);
	text-decoration: none;
}

.ugp .ugp-table a:hover {
	text-decoration: underline;
}

/* 「毎日更新」 under a maker's price-check date on the search page. */
.ugp .ugp-table .ugp-daily {
	display: block;
	color: var(--ugp-muted);
	font-size: 11px;
	line-height: 1.3;
}

/* Links to the other GPU pages. Also used on the search page, outside .ugp. */
ul.ugp-index,
.post_content ul.ugp-index {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(13em, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ugp-index li {
	margin: 0;
	padding: 0;
}

.ugp-index li::before {
	content: none;
}

.ugp-index a {
	display: block;
	padding: 10px 14px;
	border: 1px solid var(--ugp-line, #d9e1eb);
	border-radius: 6px;
	background: #fff;
	color: var(--ugp-ink, #152033);
	line-height: 1.5;
	text-decoration: none;
}

.ugp-index a:hover,
.ugp-index a:focus-visible {
	border-color: var(--ugp-blue, #165dff);
}

.ugp-index small {
	display: block;
	color: var(--ugp-muted, #68758a);
	font-size: .82em;
}

.ugp .ugp-index-group {
	margin: 14px 0 6px;
	font-weight: 700;
}

.ugp .ugp-h + .ugp-index-group {
	margin-top: 0;
}

/* The theme breaks table text anywhere, which splits model names like 9800X3|D on phones. */
.ugp .ugp-table td:first-child {
	word-break: normal;
}

/* 15 CPUs in one column would run far too long on a phone. */
@media (max-width: 600px) {
	.ugp .ugp-index-group + ul.ugp-index {
		grid-template-columns: 1fr 1fr;
	}
}

/* Search-page overview: the two tables sit side by side on wide screens instead of stretching across 1392px. */
.ugp.ugp-overview {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 20px;
	align-items: start;
}

.ugp.ugp-overview > .ugp-summary,
.ugp.ugp-overview > .ugp-wide {
	grid-column: 1 / -1;
}

@media (max-width: 900px) {
	.ugp.ugp-overview {
		grid-template-columns: 1fr;
	}
}

/* Articles about the GPU, on the GPU page */
.ugp .ugp-posts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ugp .ugp-posts li {
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid var(--ugp-line);
	list-style: none;
}

.ugp .ugp-posts li::before {
	content: none;
}

.ugp .ugp-posts a {
	color: var(--ugp-ink);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.ugp .ugp-posts a:hover {
	color: var(--ugp-blue);
}

/* Box at the end of articles that name a GPU */
.ugp-related {
	margin: 2.5em 0 0;
	padding: 20px 22px;
	border: 1px solid #d9e1eb;
	border-radius: 8px;
	background: #f4f7fb;
	color: #152033;
}

.post_content .ugp-related p {
	margin: 0 0 10px;
}

.post_content .ugp-related .ugp-related__title {
	padding-left: 10px;
	border-left: 4px solid #165dff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
}

.post_content .ugp-related .ugp-related__lead {
	color: #68758a;
	font-size: 13px;
}

.post_content .ugp-related .ugp-related__more {
	margin: 12px 0 0;
	text-align: right;
	font-size: 14px;
}

.ugp-related__more a {
	color: #165dff;
	font-weight: 700;
}

/* One-line box before the article's second h2 */
.ugp-inline {
	margin: 1.8em 0;
	padding: 10px 14px;
	border-left: 4px solid #165dff;
	border-radius: 4px;
	background: #f4f7fb;
	color: #152033;
	font-size: 14px;
	line-height: 1.8;
}

.ugp-inline__text {
	margin-right: .8em;
	font-weight: 700;
}

.ugp-inline a {
	margin-right: .8em;
	color: #165dff;
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.ugp-related {
		padding: 16px;
	}

	.ugp .ugp-card {
		padding: 16px;
	}

	.ugp .ugp-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.ugp .ugp-stats dd {
		font-size: 19px;
	}

	.ugp .ugp-item {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"name name"
			"spec spec"
			"price link";
		gap: 4px 12px;
	}
}
