/* Homepage – US Apple ID Sharing Theme */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: #333;
	background: #f5f7fa;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Header */
.site-header {
	background: #222;
	color: #fff;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 960px;
	margin: 0 auto;
	padding: 14px 20px;
	gap: 16px;
}

.site-brand {
	flex-shrink: 0;
}

.site-brand__link {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
}

.site-brand__logo,
.site-brand .custom-logo {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
}

.site-brand__title {
	font-size: 16px;
	font-weight: 600;
	white-space: nowrap;
}

.site-nav__list {
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	color: #fff;
	font-size: 14px;
	transition: opacity 0.2s;
}

.site-nav__list a:hover,
.site-nav__list a:focus {
	opacity: 0.75;
}

/* Main */
.home-main {
	max-width: 960px;
	margin: 0 auto;
	padding: 24px 20px 48px;
}

/* Cards */
.card-section {
	margin-bottom: 20px;
}

.card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	padding: 28px 24px 8px;
}

.card__title {
	margin: 0 0 24px;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
	color: #222;
	position: relative;
	padding-bottom: 12px;
}

.card__title::after {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	background: #1a73e8;
	margin: 10px auto 0;
	border-radius: 2px;
}

/* Account cards grid */
.account-section .card {
	padding-bottom: 24px;
}

.account-sync {
	margin: -8px 0 12px;
	font-size: 13px;
	color: #888;
	text-align: center;
	line-height: 1.6;
}

.account-purchase {
	margin: 0 0 20px;
	padding: 16px 20px;
	text-align: center;
	background: linear-gradient(160deg, #eef4ff 0%, #f8fbff 100%);
	border: 1px solid #d6e4ff;
	border-radius: 8px;
}

.account-purchase__desc {
	margin: 0 0 12px;
	font-size: 13px;
	color: #666;
	line-height: 1.6;
}

.account-purchase__btn {
	display: inline-block;
	padding: 10px 28px;
	background: #1a73e8;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	border-radius: 20px;
	transition: background 0.2s;
}

.account-purchase__btn:hover,
.account-purchase__btn:focus {
	background: #1558b0;
	color: #fff;
}

.account-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.account-card {
	background: #fff;
	border: 1px solid #e8eaed;
	border-radius: 8px;
	padding: 16px;
}

.account-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.account-card__region {
	font-size: 15px;
	font-weight: 700;
	color: #222;
}

.account-card__status {
	display: inline-block;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 500;
	border-radius: 4px;
	border: 1px solid transparent;
	white-space: nowrap;
}

.account-card__status--available {
	color: #28a745;
	background: #e8f5e9;
	border-color: #a5d6a7;
}

.account-card__status--unavailable {
	color: #dc3545;
	background: #fdecea;
	border-color: #f5c6cb;
}

.account-card__status--maintenance {
	color: #e09515;
	background: #fff8e6;
	border-color: #ffe082;
}

.account-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.account-row__label {
	flex-shrink: 0;
	width: 36px;
	font-size: 13px;
	color: #666;
}

.account-row__value {
	flex: 1;
	min-width: 0;
	padding: 8px 10px;
	background: #f5f7fa;
	border-radius: 4px;
	font-size: 13px;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.account-row__copy {
	flex-shrink: 0;
	padding: 6px 14px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	color: #333;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
	font-family: inherit;
	line-height: 1.4;
}

.account-row__copy:hover,
.account-row__copy:focus {
	background: #f5f7fa;
	border-color: #bbb;
}

.account-row__copy.is-copied {
	color: #28a745;
	border-color: #a5d6a7;
	background: #e8f5e9;
}

.account-card__foot {
	margin-top: 4px;
	font-size: 12px;
	color: #aaa;
}

/* Steps */
.steps-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.steps-grid__item {
	text-align: center;
	padding: 0 8px 16px;
}

.steps-grid__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: #1a73e8;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	border-radius: 50%;
	margin-bottom: 12px;
}

.steps-grid__title {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
	color: #222;
}

.steps-grid__desc {
	margin: 0;
	font-size: 12px;
	color: #999;
	line-height: 1.5;
}

/* Related content */
.related-section {
	margin-bottom: 0;
}

.related-section .card {
	padding-bottom: 24px;
}

.related-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	min-width: 0;
}

.related-card {
	min-width: 0;
	padding: 0;
}

.card .related-card {
	background: transparent;
	box-shadow: none;
	border-radius: 0;
}

.related-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 12px;
	border-bottom: 2px solid #1a73e8;
	margin-bottom: 4px;
}

.related-card__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #222;
}

.related-card__more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: #666;
	transition: color 0.2s;
}

.related-card__more:hover,
.related-card__more:focus {
	color: #1a73e8;
}

.related-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.related-list__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}

.related-list__item:last-child {
	border-bottom: none;
}

.related-list__link {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.2s;
}

.related-list__link:hover,
.related-list__link:focus {
	color: #1a73e8;
}

.related-list__date {
	flex-shrink: 0;
	font-size: 12px;
	color: #bbb;
}

.related-list__empty {
	padding: 16px 0;
	font-size: 13px;
	color: #999;
}

/* Footer */
.site-footer {
	background: #222;
	color: #aaa;
	margin-top: 0;
}

.site-footer__inner {
	max-width: 960px;
	margin: 0 auto;
	padding: 20px;
	text-align: center;
}

.site-footer__copy {
	margin: 0;
	font-size: 13px;
}

/* Breadcrumbs (shared) */
.breadcrumbs-bar {
	background: #fff;
	border-bottom: 1px solid #eee;
}

.breadcrumbs-bar__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 12px 20px;
}

.breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: #999;
}

.breadcrumbs__item:not(:last-child)::after {
	content: "/";
	margin: 0 6px;
	color: #ccc;
}

.breadcrumbs__item a {
	color: #666;
	transition: color 0.2s;
}

.breadcrumbs__item a:hover,
.breadcrumbs__item a:focus {
	color: #1a73e8;
}

.breadcrumbs__item--current {
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 360px;
}

/* Shared two-column layout & sidebar */
.single-layout,
.archive-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 24px;
	max-width: 1100px;
	margin: 0 auto;
	padding: 24px 20px 48px;
	align-items: start;
}

.single-main,
.archive-main {
	min-width: 0;
}

.page-sidebar,
.single-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.sidebar-widget {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	padding: 20px;
}

.sidebar-widget__title {
	margin: 0 0 14px;
	padding-bottom: 10px;
	font-size: 16px;
	font-weight: 700;
	color: #222;
	border-bottom: 2px solid #1a73e8;
}

.sidebar-promo {
	text-align: center;
	padding: 8px 4px;
}

.sidebar-promo__icon {
	margin: 0 auto 12px;
	opacity: 0.85;
}

.sidebar-promo__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: #222;
}

.sidebar-promo__desc {
	margin: 0 0 16px;
	font-size: 13px;
	color: #888;
	line-height: 1.6;
}

.sidebar-promo__btn {
	display: inline-block;
	padding: 8px 24px;
	background: #1a73e8;
	color: #fff;
	font-size: 14px;
	border-radius: 20px;
	transition: background 0.2s;
}

.sidebar-promo__btn:hover,
.sidebar-promo__btn:focus {
	background: #1558b0;
	color: #fff;
}

.sidebar-widget--promo {
	background: linear-gradient(160deg, #eef4ff 0%, #fff 60%);
}

.hot-posts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hot-posts__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
}

.hot-posts__item:last-child {
	border-bottom: none;
}

.hot-posts__rank {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	font-size: 12px;
	font-weight: 600;
	color: #999;
	background: #f0f0f0;
	border-radius: 3px;
}

.hot-posts__rank--top1 {
	color: #fff;
	background: #e74c3c;
}

.hot-posts__rank--top2 {
	color: #fff;
	background: #f5a623;
}

.hot-posts__rank--top3 {
	color: #fff;
	background: #52c41a;
}

.hot-posts__link {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	color: #444;
	line-height: 1.5;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: color 0.2s;
}

.hot-posts__link:hover,
.hot-posts__link:focus {
	color: #1a73e8;
}

@media (max-width: 960px) {
	.single-layout,
	.archive-layout {
		grid-template-columns: 1fr;
	}

	.page-sidebar,
	.single-sidebar {
		order: 2;
	}
}

/* Responsive */
@media (max-width: 768px) {
	.site-header__inner {
		flex-wrap: wrap;
	}

	.site-nav {
		width: 100%;
	}

	.site-nav__list {
		justify-content: center;
		gap: 20px;
	}

	.steps-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.related-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.related-card + .related-card {
		padding-top: 20px;
		border-top: 1px solid #eee;
	}

	.related-list__item {
		flex-wrap: wrap;
		gap: 4px 12px;
	}

	.related-list__link {
		flex: 1 1 100%;
		white-space: normal;
		overflow: visible;
		text-overflow: unset;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.related-list__date {
		flex: 0 0 auto;
	}

	.account-grid {
		grid-template-columns: 1fr;
	}

	.account-card {
		min-width: 0;
	}

	.account-row {
		flex-wrap: wrap;
		align-items: center;
	}

	.account-row__value {
		flex: 1 1 100%;
		min-width: 0;
		white-space: normal;
		overflow: visible;
		text-overflow: unset;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.account-row__copy {
		padding: 6px 10px;
		font-size: 12px;
		margin-left: auto;
	}
}

@media (max-width: 480px) {
	.steps-grid {
		grid-template-columns: 1fr;
	}

	.site-nav__list {
		gap: 14px;
		font-size: 13px;
	}
}
