/*
 * The /<lang>/info/ namespace: legal and company documents.
 * Enqueued on info routes only (includes/info-chrome.php). The chrome reuses
 * the blog's header/footer bar styles and the article's breadcrumb, hero and
 * contents sidebar from blog.css; this file adds the index hero and cards, the
 * document measure and the namespace's own pieces. List numbering is the
 * `legal-numbering` block style, registered in PHP.
 */

.info-page {
	--info-card-shadow: 0 1px 2px rgba(34, 34, 46, 0.04), 0 12px 32px rgba(34, 34, 46, 0.06);
	--info-hero-overlap: 96px;
	background: var(--surface);
}

/*
 * Core pads a group with a background by 2.375em on each side; the blog's
 * parts zero it inline, so the bars keep the blog's gutters here too.
 */
.info-header.support-header-bar,
.info-footer.support-footer-bar {
	padding-left: 0;
	padding-right: 0;
}

/* Header: the info-primary menu on the dark bar, in the blog header's rhythm. */
.info-header .info-header-nav {
	flex: 0 1 auto;
	height: var(--support-nav-height);
}

.info-header .info-header-nav .wp-block-navigation__container {
	gap: 0;
}

.info-header .info-header-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	height: var(--support-nav-height);
	padding: 0 16px;
	color: rgba(249, 251, 253, 0.78);
	text-decoration: none;
	white-space: nowrap;
	transition: color 120ms ease;
}

.info-header .info-header-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content:hover,
.info-header .info-header-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation-item__content:focus-visible,
.info-header .info-header-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .current-menu-item > .wp-block-navigation-item__content {
	color: #FFFFFF;
}

/* Footer: the estate footer; these three replace the blog's label-rewritten classes. */
.info-footer-tagline {
	max-width: 360px;
	margin: 20px 0 28px !important;
	color: var(--fg-on-dark-3);
	font-size: 14px;
	line-height: 1.6;
}

.info-footer .support-footer-badges {
	display: flex;
	gap: 10px;
}

.info-footer .support-footer-badges img {
	width: auto;
	height: 32px;
	border-radius: var(--radius-xs);
}

.info-footer .support-footer-payments {
	display: flex;
	gap: 10px;
	margin-top: 28px;
}

.info-footer .support-footer-appstores {
	display: flex;
	gap: 12px;
}

.info-footer .support-footer-appstores img {
	display: block;
	width: auto;
	height: 40px;
}

.info-footer-copyright {
	display: inline-flex;
	align-items: baseline;
	margin: 0;
	color: var(--fg-on-dark-3);
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
}

.info-footer-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	color: var(--fg-on-dark-3);
	font-size: 12px;
	line-height: 1.4;
}

.info-footer-meta a {
	display: inline-flex;
	align-items: center;
	color: var(--fg-on-dark-3);
	text-decoration: none;
	transition: color 120ms ease;
}

.info-footer-meta a:hover,
.info-footer-meta a:focus {
	color: #FFFFFF;
}

/* Index and section hero: the knowledge base hero's dark band and glow. */
.info-hero {
	position: relative;
	overflow: hidden;
	padding: 88px 0 calc(var(--info-hero-overlap) + 72px);
	background: var(--surface-dark-2);
	color: var(--fg-on-dark);
}

.info-hero::before,
.info-hero::after {
	content: "";
	position: absolute;
	z-index: 0;
	border-radius: 50%;
	pointer-events: none;
}

.info-hero::before {
	top: -160px;
	right: -120px;
	width: 520px;
	height: 520px;
	background: radial-gradient(closest-side, rgba(255, 203, 0, 0.09), rgba(255, 203, 0, 0) 70%);
}

.info-hero::after {
	bottom: -140px;
	left: -100px;
	width: 380px;
	height: 380px;
	background: radial-gradient(closest-side, rgba(255, 203, 0, 0.05), rgba(255, 203, 0, 0) 70%);
}

.info-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.info-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 28px;
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.08);
	color: var(--fg-on-dark);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

.info-hero__mark {
	color: var(--alt-yellow);
	font-family: var(--font-mono);
	font-weight: 700;
}

.info-hero .info-hero__title {
	max-width: 24ch;
	margin: 0;
	color: var(--fg-on-dark);
	font-family: var(--font-display);
	font-size: clamp(40px, 5.4vw, 64px);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.info-hero__lede,
.info-hero .wp-block-term-description {
	max-width: 640px;
	margin: 20px 0 0;
	color: var(--fg-on-dark-3);
	font-size: 19px;
	line-height: 1.6;
	text-wrap: balance;
}

.info-hero .wp-block-term-description p {
	margin: 0;
}

.info-hero--compact {
	padding-top: 56px;
}

.info-hero--compact .info-hero__inner {
	align-items: flex-start;
	text-align: left;
}

.info-hero--compact .info-hero__title {
	max-width: 22ch;
	font-size: clamp(36px, 4.4vw, 56px);
}

.info-hero .info-breadcrumbs {
	margin-bottom: 28px;
}

.info-hero .info-breadcrumbs a,
.info-hero .info-breadcrumbs .article-breadcrumb__current {
	color: var(--fg-on-dark-3);
}

.info-hero .info-breadcrumbs a:hover {
	color: var(--fg-on-dark);
}

.info-hero .info-breadcrumbs .article-breadcrumb__current {
	color: var(--fg-on-dark);
}

/* blog.css zeroes the top margin of every group in <main>; the overlap needs the override. */
body.wp-theme-blog-theme main.info-page > .info-page__body {
	position: relative;
	z-index: 1;
	margin-block-start: calc(var(--info-hero-overlap) * -1);
	padding-bottom: 96px;
}

/* Cards: one per section, the knowledge base category card's shape. */
.info-index--all {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: start;
}

.info-index--all > :only-child {
	grid-column: 1 / -1;
}

.info-index--all:has(> .info-card--tall) {
	grid-template-rows: auto 1fr;
}

/* On the index the questions card joins the grid: under the short sections,
   beside the tall one. */
.info-page--index .info-page__body:has(.info-card--tall) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: auto auto 1fr;
	gap: 24px;
	align-items: start;
}

.info-page--index .info-page__body:has(.info-card--tall) > .info-index--all {
	display: contents;
}

.info-page--index .info-page__body:has(.info-card--tall) .info-card--tall {
	grid-row: span 3;
}

.info-page--index .info-page__body:has(.info-card--tall) > .info-contact {
	grid-column: 2;
	flex-direction: column;
	align-items: stretch;
	gap: 24px;
	margin: 0;
	padding: 36px;
}

.info-page--index .info-page__body:has(.info-card--tall) > .info-contact .info-contact__copy {
	flex: 0 0 auto;
}

.info-card {
	box-sizing: border-box;
	padding: 36px 36px 20px;
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-xl);
	background: var(--surface);
	box-shadow: var(--info-card-shadow);
	transition: border-color 160ms ease;
}

.info-card:hover {
	border-color: var(--border-muted);
}

.info-card--tall {
	grid-row: span 2;
}

.info-card--plain {
	padding-top: 12px;
}

.info-card__head {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	gap: 16px;
	align-items: start;
	margin-bottom: 16px;
}

.info-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: var(--surface-dark-2);
	color: var(--alt-yellow);
}

.info-card__icon svg {
	width: 26px;
	height: 26px;
}

.info-card__titles {
	min-width: 0;
	padding-top: 4px;
}

.info-card__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.015em;
}

.info-card__title a {
	color: var(--alt-ink);
	text-decoration: none;
}

.info-card__title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--alt-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.info-card__desc {
	margin: 6px 0 0;
	color: var(--fg-secondary);
	font-size: 15px;
	line-height: 1.55;
}

.info-card__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 26px;
	margin-top: 6px;
	padding: 0 10px;
	border-radius: var(--radius-pill);
	background: var(--surface-muted);
	color: var(--fg-secondary);
	font-size: 13px;
	font-weight: 600;
}

/* Document rows. */
.info-docs {
	margin: 0;
	padding: 0;
	list-style: none;
}

.info-doc + .info-doc {
	border-top: 1px solid var(--border-hairline);
}

.info-doc__link {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr) 20px;
	gap: 14px;
	align-items: center;
	padding: 16px 4px;
	color: var(--alt-ink);
	text-decoration: none;
}

.info-doc__icon {
	display: inline-flex;
	color: var(--fg-tertiary);
	transition: color 120ms ease;
}

.info-doc__icon svg {
	width: 22px;
	height: 22px;
}

.info-doc__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.info-doc__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.info-doc__meta {
	color: var(--fg-tertiary);
	font-size: 13px;
	line-height: 1.45;
}

.info-doc__dot {
	margin: 0 6px;
}

.info-doc__language {
	color: var(--fg-secondary);
	font-weight: 500;
}

.info-doc__arrow {
	display: inline-flex;
	color: var(--fg-tertiary);
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity 140ms ease, transform 140ms ease, color 140ms ease;
}

.info-doc__arrow svg {
	width: 20px;
	height: 20px;
}

.info-doc__link:hover .info-doc__title,
.info-doc__link:focus-visible .info-doc__title {
	text-decoration: underline;
	text-decoration-color: var(--alt-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.info-doc__link:hover .info-doc__icon,
.info-doc__link:focus-visible .info-doc__icon {
	color: var(--alt-ink);
}

.info-doc__link:hover .info-doc__arrow,
.info-doc__link:focus-visible .info-doc__arrow {
	color: var(--alt-ink);
	opacity: 1;
	transform: none;
}

.info-index__empty {
	padding: 48px 36px;
	border-radius: var(--radius-xl);
	background: var(--surface);
	box-shadow: var(--info-card-shadow);
	color: var(--fg-secondary);
}

/* Related documents under a document: compact tiles. */
.info-index--related {
	margin-top: 96px;
	padding-top: 48px;
	border-top: 1px solid var(--border-hairline);
}

.info-related__title {
	margin: 0 0 24px;
	font-family: var(--font-display);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.info-docs--grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.info-docs--grid .info-doc + .info-doc {
	border-top: 0;
}

.info-docs--grid .info-doc__link {
	height: 100%;
	box-sizing: border-box;
	padding: 20px;
	border: 1px solid var(--border-hairline);
	border-radius: var(--radius-lg);
	background: var(--surface-card);
	transition: border-color 140ms ease, background-color 140ms ease;
}

.info-docs--grid .info-doc__link:hover {
	border-color: var(--border-muted);
	background: var(--surface);
}

/* Questions band: the knowledge base's "talk to a human" card. */
.info-contact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px 48px;
	margin-top: 64px;
	padding: 40px 48px;
	border-radius: var(--radius-xl);
	background: var(--surface-secondary);
}

.info-contact__copy {
	flex: 1 1 360px;
	min-width: 0;
}

.info-contact__eyebrow {
	margin: 0 0 10px;
	color: var(--fg-secondary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.3;
	text-transform: uppercase;
}

.info-contact .info-contact__title {
	margin: 0;
	font-family: var(--font-display);
	font-size: 30px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.info-contact__text {
	margin: 10px 0 0;
	color: var(--fg-secondary);
	font-size: 16px;
	line-height: 1.55;
}

.info-contact__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.info-contact__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: var(--radius-pill);
	background: var(--alt-yellow);
	color: var(--alt-ink);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 120ms ease, border-color 120ms ease;
}

.info-contact__button:hover {
	background: var(--alt-yellow-hover);
}

.info-contact__button--ghost {
	border: 1px solid var(--border-muted);
	background: var(--surface);
	font-weight: 600;
}

.info-contact__button--ghost:hover {
	border-color: var(--alt-ink);
	background: var(--surface);
}

/* Document: the blog article's hero and contents sidebar, a legal reading measure. */
.info-document {
	padding-bottom: 96px;
}

.info-document__header {
	padding-bottom: 40px;
}

.info-document__header .info-document__title {
	max-width: 24ch;
	font-size: clamp(34px, 4.4vw, 56px);
}

.info-document__meta-row {
	gap: 16px 32px;
	padding-top: 24px;
	border-top: 1px solid var(--border-hairline);
}

.info-document-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	color: var(--fg-secondary);
	font-size: 14px;
	line-height: 1.5;
}

.info-document-meta p {
	margin: 0;
}

.info-document-meta a {
	color: var(--alt-ink);
	font-weight: 500;
	text-decoration: none;
}

.info-document-meta a:hover {
	text-decoration: underline;
	text-decoration-color: var(--alt-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.info-document-meta__label {
	margin-right: 6px;
	color: var(--fg-tertiary);
}

.info-document-meta__languages {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
}

.info-document-meta__languages ul {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.info-document-meta__languages a[aria-current="page"] {
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: var(--alt-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.info-print {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid var(--border-muted);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--alt-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 120ms ease;
}

.info-print[hidden] {
	display: none;
}

.info-print:hover,
.info-print:focus-visible {
	border-color: var(--alt-ink);
}

.info-document__grid {
	grid-template-columns: 240px minmax(0, 760px);
	gap: 72px;
}

.info-document__grid:not(:has(.info-toc)) {
	grid-template-columns: minmax(0, 760px);
	justify-content: center;
}

.info-document__text {
	min-width: 0;
}

.info-toc.article-sidebar {
	max-height: calc(100vh - var(--support-nav-height) - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

.info-toc__details > summary {
	list-style: none;
}

.info-toc__details > summary::-webkit-details-marker {
	display: none;
}

.info-toc__count {
	display: none;
}

.info-fallback-notice {
	margin: 0 0 40px;
	padding: 16px 20px;
	border-left: 4px solid var(--alt-yellow);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: #FFF9DF;
	font-size: 15px;
	line-height: 1.55;
}

.info-fallback-notice p {
	margin: 0;
}

.info-fallback-notice p + p {
	margin-top: 4px;
}

/* Legal text. Headings keep their authored ids for deep links (ERP, e-mail). */
.info-document__body {
	color: var(--alt-ink);
	font-size: 16px;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

.info-document__body > :first-child {
	margin-top: 0;
}

.info-document__body p,
.info-document__body ul,
.info-document__body ol {
	margin: 0 0 16px;
}

.info-document__body a {
	color: var(--alt-ink);
	text-decoration: underline;
	text-decoration-color: var(--alt-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.info-document__body h2,
.info-document__body h3,
.info-document__body h4 {
	scroll-margin-top: calc(var(--support-nav-height, 64px) + 24px);
	color: var(--alt-ink);
	font-family: var(--font-display);
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.info-document__body h2 {
	margin: 56px 0 20px;
	font-size: 26px;
	font-weight: 600;
}

.info-document__body h3 {
	margin: 36px 0 12px;
	font-size: 20px;
	font-weight: 600;
}

.info-document__body ol.is-style-legal-numbering li::before,
.info-document__body ol.is-style-legal-numbering li > :is(h2, h3, h4):first-child::before {
	color: var(--fg-secondary);
	font-variant-numeric: tabular-nums;
}

.info-document__body ol.is-style-legal-numbering li > :is(h2, h3, h4):first-child::before {
	margin-right: 0.15em;
}

.info-document__body table {
	width: 100%;
	margin: 0 0 24px;
	border-collapse: collapse;
	font-size: 15px;
}

.info-document__body th,
.info-document__body td {
	padding: 10px 14px;
	border: 1px solid var(--border-muted);
	vertical-align: top;
	text-align: left;
}

.info-document__body th {
	background: var(--surface-muted);
	font-weight: 600;
}

.info-document__body .wp-block-table {
	margin: 0 0 24px;
	overflow-x: auto;
}

.info-page__after .info-contact {
	margin-top: 48px;
}

@media (max-width: 1023px) {
	.info-document__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.info-toc.article-sidebar {
		position: static;
		max-height: none;
		margin-bottom: 32px;
		overflow: visible;
	}

	.info-toc__details {
		border: 1px solid var(--border-hairline);
		border-radius: var(--radius-lg);
		background: var(--surface-card);
	}

	.info-toc__details > summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin: 0;
		padding: 16px 20px;
		cursor: pointer;
	}

	.info-toc__details > summary::after {
		content: "";
		width: 8px;
		height: 8px;
		margin-left: auto;
		border-right: 1.5px solid currentColor;
		border-bottom: 1.5px solid currentColor;
		transform: translateY(-2px) rotate(45deg);
		transition: transform 160ms ease;
	}

	.info-toc__details[open] > summary::after {
		transform: translateY(2px) rotate(-135deg);
	}

	.info-toc__count {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 24px;
		height: 22px;
		padding: 0 8px;
		border-radius: var(--radius-pill);
		background: var(--surface-muted);
		color: var(--fg-secondary);
		font-size: 12px;
		letter-spacing: 0;
	}

	.info-toc__details .article-toc {
		margin: 0 20px 16px;
	}
}

@media (max-width: 980px) {
	.info-header .info-header-nav {
		order: 3;
		height: auto;
		margin-left: 8px;
	}

	.info-index--all {
		grid-template-columns: minmax(0, 1fr);
	}

	.info-card--tall {
		grid-row: auto;
	}

	.info-page--index .info-page__body:has(.info-card--tall) {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
	}

	.info-page--index .info-page__body:has(.info-card--tall) .info-card--tall {
		grid-row: auto;
	}

	.info-page--index .info-page__body:has(.info-card--tall) > .info-contact {
		grid-column: auto;
		margin-top: 40px;
	}
}

@media (max-width: 759px) {
	.info-page {
		--info-hero-overlap: 56px;
	}

	.info-hero {
		padding: 56px 0 calc(var(--info-hero-overlap) + 48px);
	}

	.info-hero__lede,
	.info-hero .wp-block-term-description {
		font-size: 17px;
	}

	.info-hero--compact {
		padding-top: 36px;
	}

	body.wp-theme-blog-theme main.info-page > .info-page__body {
		padding-bottom: 32px;
	}

	.info-card {
		padding: 24px 20px 8px;
		border-radius: var(--radius-lg);
	}

	.info-card--plain {
		padding-top: 4px;
	}

	.info-card__head {
		grid-template-columns: 48px minmax(0, 1fr) auto;
		gap: 14px;
	}

	.info-card__icon {
		width: 48px;
		height: 48px;
		border-radius: 14px;
	}

	.info-card__title {
		font-size: 21px;
	}

	.info-doc__link {
		grid-template-columns: 22px minmax(0, 1fr);
		gap: 12px;
	}

	.info-doc__arrow {
		display: none;
	}

	.info-contact {
		padding: 28px 24px;
		border-radius: var(--radius-lg);
	}

	.info-contact .info-contact__title {
		font-size: 24px;
	}

	.info-contact__actions,
	.info-contact__button {
		width: 100%;
	}

	.info-contact__button {
		justify-content: center;
	}

	.info-document__body h2 {
		margin-top: 44px;
		font-size: 22px;
	}

	.info-index--related {
		margin-top: 64px;
	}

	.info-footer-meta {
		flex-wrap: wrap;
		gap: 10px;
	}

	.info-footer-copyright {
		white-space: normal;
	}
}

@media print {
	.info-header,
	.info-footer,
	.info-toc,
	.info-print,
	.info-page__after,
	.info-breadcrumbs,
	.wpconsent-banner-holder {
		display: none !important;
	}

	.wp-site-blocks > header.wp-block-template-part {
		position: static !important;
	}

	.info-document {
		padding: 0;
	}

	.info-document__header {
		padding: 0 0 16px;
	}

	.info-document__grid {
		display: block;
	}

	.info-document__body {
		font-size: 11pt;
		line-height: 1.5;
	}

	.info-document__body h2 {
		margin-top: 24px;
		font-size: 15pt;
		break-after: avoid;
	}

	.info-document__body a {
		text-decoration: none;
	}
}
