/* RaiedTech public layout */
:root {
	--container: 1320px;
	--gutter: clamp(16px, 3vw, 44px);
	--radius: 6px;
	--radius-sm: 4px;
}

:root,
[data-scheme="dark"] {
	--bg: #141825;
	--bg-2: #191e2e;
	--surface: #21283a;
	--surface-2: #282f44;
	--card: #1b2131;
	--line: #343e54;
	--line-2: #4f5a72;
	--ink: #f5f4ef;
	--ink-2: #d8dce6;
	--muted: #a9b4cb;
	--rt-brand-surface: #aebdf8;
	--rt-brand-text: #171c30;
	--rt-display: #b7c6ff;
	--rt-highlight: #d9f275;
}

[data-scheme="light"] {
	--bg: #f7f7f2;
	--bg-2: #eceee7;
	--surface: #fff;
	--surface-2: #eef0f5;
	--card: #fff;
	--line: #d9ddd7;
	--line-2: #bdc5c0;
	--ink: #172033;
	--ink-2: #344055;
	--muted: #505d74;
	--accent-ink: #304b9a;
	--rt-brand-surface: #233775;
	--rt-brand-text: #fff;
	--rt-display: #283dc3;
	--rt-highlight: #d9f275;
}

/* Navigation */
.rt-header,
.rt-header.is-scrolled,
.rt-header::before {
	background: var(--surface);
	box-shadow: none;
}

.rt-brand__mark {
	display: none;
}

.rt-brand__text {
	font-size: clamp(16px, 2.4vw, 27px);
	letter-spacing: -.055em;
	gap: 4px;
}

.rt-brand__text i {
	color: var(--accent-ink);
}

.rt-header__actions .rt-icon-btn {
	border: 0;
	background: transparent;
}

.rt-ticker {
	background: var(--bg-2);
}

@media (min-width: 1201px) {
	.rt-header__inner {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-rows: 59px auto;
		gap: 0 24px;
		height: auto;
	}

	.rt-header__actions {
		grid-area: 1 / 2;
	}

	.rt-header__inner .rt-nav {
		position: static;
		transform: none;
		visibility: visible;
		grid-area: 2 / 1 / 3 / -1;
		border-block-start: 1px solid var(--line);
	}

	.rt-header .rt-nav__list {
		min-height: 44px;
		gap: 12px;
	}
}

/* Homepage */
.rt-home-intro {
	padding-block-start: clamp(20px, 4vw, 48px);
}

.rt-home-intro__heading {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(200px, .33fr);
	align-items: end;
	gap: clamp(16px, 5vw, 64px);
	padding-block: clamp(16px, 3vw, 44px) clamp(20px, 4vw, 48px);
}

.rt-home-intro__heading h1 {
	margin: 0;
	font-size: clamp(2rem, 8.25vw, 7rem);
	line-height: 1.06;
	font-weight: 700;
}

.rt-home-intro__heading h1 span {
	color: var(--rt-display);
}

.rt-home-intro__actions {
	display: grid;
	gap: 2px;
	border-block-start: 1px solid var(--line-2);
}

.rt-home-intro__actions > :is(a, button) {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 7px;
	padding: 12px 0;
	text-align: start;
	border: 0;
	border-block-end: 1px solid var(--line);
	border-radius: 0;
	background: transparent;
	color: var(--ink);
}

.rt-home-intro__actions > :is(a, button):hover {
	color: var(--rt-display);
}

.rt-feature {
	display: grid;
	grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
	background: var(--rt-brand-surface);
	color: var(--rt-brand-text);
	border-block-end: 6px solid var(--rt-highlight);
}

.rt-feature__text {
	display: grid;
	align-content: center;
	justify-items: start;
	gap: 14px;
	padding: clamp(22px, 4.5vw, 64px);
}

.rt-feature__category {
	padding: 2px 9px;
	background: var(--rt-highlight);
	color: #171c30;
	font-weight: 700;
}

.rt-feature h2 {
	font-size: clamp(1.7rem, 3.6vw, 3.55rem);
	line-height: 1.2;
	margin: 0;
}

.rt-feature p,
.rt-feature time {
	margin: 0;
	color: inherit;
}

.rt-feature__text a:hover {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .14em;
}

.rt-feature__text .rt-feature__category:hover {
	color: #171c30;
}

.rt-feature__image {
	display: block;
	position: relative;
	min-height: 340px;
	background: var(--surface-2);
	overflow: hidden;
}

.rt-feature__image > :is(img, .rt-cover) {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
}

.rt-main .rt-cover {
	background: repeating-linear-gradient(135deg, var(--bg-2) 0 18px, var(--surface-2) 18px 19px);
}

.rt-main .rt-cover :is(.rt-cover__orb, .rt-cover__grid) {
	display: none;
}

.rt-main .rt-cover__label {
	color: var(--ink-2);
}

.rt-home-links {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-block-end: 1px solid var(--line-2);
	margin-block: 18px 34px;
}

.rt-home-links a {
	display: flex;
	align-items: center;
	justify-content: start;
	gap: 10px;
	padding: 15px clamp(8px, 2.4vw, 30px);
	font-weight: 700;
	text-align: center;
}

.rt-home-links a svg {
	color: var(--rt-display);
	flex: none;
}

.rt-home-links a:hover {
	background: var(--surface-2);
	color: var(--rt-display);
}

.rt-home-links a + a {
	border-inline-start: 1px solid var(--line);
}

.rt-home-brief {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: clamp(20px, 4vw, 50px);
}

.rt-home-brief__stories {
	display: grid;
	align-content: start;
}

.rt-home-brief__popular {
	padding: 16px 24px;
	background: var(--bg-2);
	border-block-start: 3px solid var(--accent-ink);
}

.rt-home-brief__popular h2 {
	font-size: 1.15rem;
	margin: 0;
}

.rt-home-brief__popular ol {
	margin-block: 8px 0;
	padding-inline-start: 1.35em;
}

.rt-home-brief__popular li {
	border-block-start: 1px solid var(--line);
	padding-block: 9px;
}

.rt-main .rt-section__head {
	border-block-start: 1px solid var(--line-2);
	padding-block: 13px 0;
}

.rt-main .rt-card:is(.rt-card--grid, .rt-card--row) {
	background: transparent;
	border: 0;
	border-block-end: 1px solid var(--line);
	border-radius: 0;
	box-shadow: none;
	transform: none;
}

.rt-main .rt-card--grid .rt-card__body {
	padding-inline: 0;
}

.rt-card--grid .rt-card__title {
	font-size: clamp(1.13rem, 2vw, 1.4rem);
	line-height: 1.4;
}

.rt-ai-hub-cards .rt-ai-hub-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
}

.rt-ai-hub-card__arrow {
	color: var(--accent-ink);
}

/* Reading, archives and tools */
.rt-article__head {
	max-width: 980px;
	padding-block-start: clamp(24px, 5vw, 62px);
}

.rt-article__title {
	font-size: clamp(1.95rem, 5vw, 4.25rem);
	letter-spacing: -.035em;
	line-height: 1.18;
}

.rt-article__byline {
	margin-block-start: 24px;
}

.rt-article__main {
	font-size: 1.1rem;
	line-height: 1.85;
}

.rt-main .rt-page-head {
	background: var(--bg-2);
	border-block-end: 1px solid var(--line-2);
	margin-block-end: 22px;
	padding-block: clamp(26px, 5vw, 64px);
}

.rt-main .rt-page-head::before,
.rt-main .rt-page-head::after {
	content: none;
}

.rt-main .rt-page-head h1 {
	font-size: clamp(2rem, 5vw, 3.85rem);
	line-height: 1.2;
}

.rt-main .rt-article__byline {
	border-block-start: 3px solid var(--rt-display);
}

.rt-dir-toolbar {
	background: var(--surface);
	border-block: 1px solid var(--line);
}

.rt-dir-hero .rt-dir-stats {
	border-block: 1px solid var(--line);
	border-radius: 0;
}

.rt-tools-grid > * {
	border-radius: var(--radius);
	box-shadow: none;
}

.rt-footer {
	border-block-start: 4px solid var(--accent-ink);
	background: var(--surface);
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--accent-ink);
	outline-offset: 3px;
}

.rt-feature :focus-visible {
	outline-color: currentColor;
}

@media (max-width: 740px) {
	.rt-home-intro__heading {
		grid-template-columns: minmax(0, 1fr);
	}

	.rt-home-intro__actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.rt-feature,
	.rt-home-brief {
		grid-template-columns: minmax(0, 1fr);
	}

	.rt-feature__image {
		grid-row: 1;
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.rt-feature__text {
		gap: 9px;
	}

	.rt-home-links a {
		flex-direction: column;
		justify-content: center;
		font-size: .88rem;
	}
}
