/*
Theme Name: Toán Tư Duy
Theme URI: https://toantuduy.org/
Author: Toán Tư Duy
Author URI: https://toantuduy.org/
Description: Theme WordPress thuần PHP cho nền tảng luyện Toán tư duy dành cho học sinh tiểu học. Giao diện nhanh, thân thiện, responsive và sẵn sàng tích hợp plugin bài tập tương tác.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: toan-tu-duy
Tags: education, blog, custom-logo, custom-menu, featured-images, full-width-template, translation-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--ttd-primary: #0a62c7;
	--ttd-primary-dark: #064c9e;
	--ttd-primary-soft: #eaf4ff;
	--ttd-accent: #f1b827;
	--ttd-accent-soft: #fff6d9;
	--ttd-ink: #17324d;
	--ttd-muted: #61768b;
	--ttd-border: #dce7f0;
	--ttd-surface: #ffffff;
	--ttd-bg: #f5f9fd;
	--ttd-success: #1f9d62;
	--ttd-danger: #d64e56;
	--ttd-shadow: 0 18px 52px rgba(21, 68, 119, 0.12);
	--ttd-radius: 22px;
	--ttd-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--ttd-bg);
	color: var(--ttd-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--ttd-primary); text-decoration: none; }
a:hover { color: var(--ttd-primary-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.screen-reader-text:focus {
	clip: auto;
	width: auto;
	height: auto;
	margin: 12px;
	padding: 10px 14px;
	z-index: 999999;
	background: #fff;
	border-radius: 8px;
	box-shadow: var(--ttd-shadow);
}
.skip-link { left: 0; top: 0; }

.ttd-container { width: min(calc(100% - 40px), var(--ttd-container)); margin-inline: auto; }
.ttd-main { min-height: 45vh; }
.ttd-section { padding: 76px 0; }
.ttd-section--white { background: #fff; }
.ttd-section--soft { background: var(--ttd-bg); }
.ttd-section--accent { background: linear-gradient(135deg, #0a62c7, #074c9e); color: #fff; }

.ttd-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--ttd-primary-soft);
	color: var(--ttd-primary-dark);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .02em;
	text-transform: uppercase;
}
.ttd-eyebrow--light { background: rgba(255,255,255,.16); color: #fff; }
.ttd-section-head { max-width: 690px; margin-bottom: 36px; }
.ttd-section-head h2 { margin: 12px 0 8px; font-size: clamp(28px, 3vw, 42px); line-height: 1.2; letter-spacing: -.03em; }
.ttd-section-head p { margin: 0; color: var(--ttd-muted); font-size: 18px; }
.ttd-section--accent .ttd-section-head p { color: rgba(255,255,255,.8); }

.ttd-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 46px;
	padding: 11px 18px;
	border: 1px solid transparent;
	border-radius: 12px;
	font-weight: 800;
	line-height: 1.2;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ttd-button:hover { transform: translateY(-2px); }
.ttd-button--primary { background: var(--ttd-primary); color: #fff; box-shadow: 0 10px 24px rgba(10,98,199,.24); }
.ttd-button--primary:hover { background: var(--ttd-primary-dark); color: #fff; }
.ttd-button--light { background: #fff; color: var(--ttd-primary-dark); box-shadow: 0 10px 24px rgba(0,0,0,.10); }
.ttd-button--light:hover { color: var(--ttd-primary-dark); }
.ttd-button--outline { border-color: var(--ttd-border); color: var(--ttd-ink); background: #fff; }
.ttd-button--outline:hover { border-color: var(--ttd-primary); color: var(--ttd-primary); }
.ttd-button--small { min-height: 38px; padding: 8px 12px; font-size: 14px; }

.site-header { position: sticky; top: 0; z-index: 999; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(220,231,240,.9); backdrop-filter: blur(10px); }
.site-header__inner { display: flex; align-items: center; min-height: 76px; gap: 26px; }
.site-branding { flex: 0 0 auto; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { display: block; width: auto; max-height: 54px; }
.site-title { color: var(--ttd-primary-dark); font-size: 23px; line-height: 1.15; font-weight: 900; letter-spacing: -.04em; }
.site-title:hover { color: var(--ttd-primary); }
.site-description { margin: 3px 0 0; color: var(--ttd-muted); font-size: 12px; font-weight: 700; }
.site-navigation { margin-left: auto; }
.primary-menu { display: flex; align-items: center; gap: 4px; padding: 0; margin: 0; list-style: none; }
.primary-menu li { position: relative; }
.primary-menu a { display: block; padding: 10px 12px; color: var(--ttd-ink); font-size: 15px; font-weight: 750; }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a { color: var(--ttd-primary); }
.primary-menu .sub-menu { position: absolute; top: calc(100% + 9px); left: 0; z-index: 20; width: 210px; padding: 8px; margin: 0; list-style: none; border: 1px solid var(--ttd-border); border-radius: 14px; background: #fff; box-shadow: var(--ttd-shadow); visibility: hidden; opacity: 0; transform: translateY(8px); transition: .15s ease; }
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { visibility: visible; opacity: 1; transform: translateY(0); }
.primary-menu .sub-menu a { padding: 9px 10px; border-radius: 8px; }
.primary-menu .sub-menu a:hover { background: var(--ttd-primary-soft); }
.header-cta { flex: 0 0 auto; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 43px; height: 43px; border: 1px solid var(--ttd-border); border-radius: 10px; background: #fff; color: var(--ttd-primary-dark); }
.nav-toggle svg { width: 22px; height: 22px; }

.ttd-hero { position: relative; overflow: hidden; padding: 72px 0 78px; background: linear-gradient(135deg, #edf7ff 0%, #f9fcff 48%, #fff6dc 100%); }
.ttd-hero::before, .ttd-hero::after { position: absolute; content: ""; border-radius: 999px; pointer-events: none; }
.ttd-hero::before { width: 340px; height: 340px; right: -130px; top: -125px; background: rgba(57,154,255,.13); }
.ttd-hero::after { width: 230px; height: 230px; left: -95px; bottom: -120px; background: rgba(241,184,39,.17); }
.ttd-hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.ttd-hero h1 { max-width: 640px; margin: 16px 0; font-size: clamp(38px, 5vw, 66px); line-height: 1.07; letter-spacing: -.055em; }
.ttd-hero h1 strong { color: var(--ttd-primary); }
.ttd-hero__lead { max-width: 610px; margin: 0; color: var(--ttd-muted); font-size: 19px; line-height: 1.7; }
.ttd-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ttd-hero__points { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 0; margin: 27px 0 0; list-style: none; color: var(--ttd-ink); font-size: 14px; font-weight: 750; }
.ttd-hero__points li { display: inline-flex; align-items: center; gap: 7px; }
.ttd-hero__points svg { width: 19px; height: 19px; fill: var(--ttd-success); }

.ttd-hero-board { position: relative; min-height: 435px; }
.ttd-hero-card { position: absolute; border: 1px solid rgba(255,255,255,.8); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: var(--ttd-shadow); }
.ttd-hero-card--main { top: 34px; right: 16px; width: min(100%, 395px); padding: 24px; }
.ttd-hero-card--mini { padding: 13px 15px; font-size: 14px; font-weight: 850; }
.ttd-hero-card--one { left: 0; top: 75px; color: #fff; background: var(--ttd-primary); transform: rotate(-6deg); }
.ttd-hero-card--two { right: 0; bottom: 27px; color: #815d00; background: var(--ttd-accent-soft); transform: rotate(5deg); }
.ttd-hero-card__label { margin: 0 0 15px; color: var(--ttd-primary); font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.ttd-hero-card__problem { display: grid; grid-template-columns: auto 1fr; gap: 12px 15px; align-items: center; padding: 14px 0; border-top: 1px dashed var(--ttd-border); }
.ttd-hero-card__problem:first-of-type { border-top: 0; }
.ttd-number-token { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--ttd-primary-soft); color: var(--ttd-primary-dark); font-size: 25px; font-weight: 900; }
.ttd-problem-text { margin: 0; color: var(--ttd-ink); font-size: 18px; font-weight: 900; line-height: 1.25; }
.ttd-problem-help { margin: 4px 0 0; color: var(--ttd-muted); font-size: 13px; }
.ttd-shape { display: inline-block; width: 25px; height: 25px; vertical-align: -5px; border: 3px solid #1989dd; border-radius: 5px; }
.ttd-shape--circle { border-color: #d4a000; border-radius: 50%; }
.ttd-shape--triangle { width: 0; height: 0; border: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 25px solid #eb6b4d; border-radius: 0; vertical-align: -4px; }

.ttd-class-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.ttd-class-card { display: block; padding: 22px 16px; border: 1px solid var(--ttd-border); border-radius: 18px; background: #fff; text-align: center; box-shadow: 0 5px 14px rgba(20,69,112,.04); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ttd-class-card:hover { transform: translateY(-5px); border-color: rgba(10,98,199,.32); box-shadow: var(--ttd-shadow); }
.ttd-class-card__badge { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px; background: var(--ttd-primary-soft); color: var(--ttd-primary-dark); font-size: 23px; font-weight: 900; }
.ttd-class-card__title { display: block; color: var(--ttd-ink); font-size: 18px; font-weight: 900; }
.ttd-class-card__desc { display: block; margin-top: 4px; color: var(--ttd-muted); font-size: 13px; line-height: 1.45; }

.ttd-skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ttd-skill-card { display: flex; flex-direction: column; min-height: 214px; padding: 22px; border: 1px solid var(--ttd-border); border-radius: 20px; background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.ttd-skill-card:hover { transform: translateY(-5px); box-shadow: var(--ttd-shadow); }
.ttd-skill-card__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--ttd-primary-soft); color: var(--ttd-primary); font-size: 24px; }
.ttd-skill-card:nth-child(2) .ttd-skill-card__icon, .ttd-skill-card:nth-child(6) .ttd-skill-card__icon { background: var(--ttd-accent-soft); color: #a67700; }
.ttd-skill-card:nth-child(3) .ttd-skill-card__icon, .ttd-skill-card:nth-child(7) .ttd-skill-card__icon { background: #eafaf2; color: #158453; }
.ttd-skill-card:nth-child(4) .ttd-skill-card__icon, .ttd-skill-card:nth-child(8) .ttd-skill-card__icon { background: #fff0ec; color: #d65c40; }
.ttd-skill-card h3 { margin: 17px 0 7px; font-size: 19px; line-height: 1.25; }
.ttd-skill-card p { margin: 0; color: var(--ttd-muted); font-size: 14px; line-height: 1.55; }
.ttd-skill-card__link { margin-top: auto; padding-top: 17px; color: var(--ttd-primary); font-size: 14px; font-weight: 850; }

.ttd-challenge { display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border-radius: 26px; background: linear-gradient(135deg, #0b64c8, #084f9e); box-shadow: var(--ttd-shadow); }
.ttd-challenge__content { padding: 44px; color: #fff; }
.ttd-challenge__content h2 { margin: 13px 0 10px; font-size: clamp(30px, 3vw, 44px); line-height: 1.14; letter-spacing: -.04em; }
.ttd-challenge__content p { max-width: 540px; margin: 0; color: rgba(255,255,255,.82); font-size: 17px; }
.ttd-challenge__meta { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0 27px; }
.ttd-challenge__meta span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.11); font-size: 13px; font-weight: 750; }
.ttd-challenge__visual { display: grid; place-items: center; padding: 30px; background: rgba(0,0,0,.08); }
.ttd-challenge-board { width: min(100%, 340px); padding: 26px; border: 1px solid rgba(255,255,255,.45); border-radius: 22px; background: #fff; color: var(--ttd-ink); box-shadow: 0 15px 30px rgba(0,0,0,.15); transform: rotate(3deg); }
.ttd-challenge-board__top { display: flex; justify-content: space-between; margin-bottom: 21px; color: var(--ttd-muted); font-size: 13px; font-weight: 800; }
.ttd-challenge-board__question { font-size: 24px; line-height: 1.5; font-weight: 900; }
.ttd-choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.ttd-choice-row span { display: grid; place-items: center; min-height: 43px; border: 1px solid var(--ttd-border); border-radius: 10px; font-weight: 900; }
.ttd-choice-row span:nth-child(2) { border-color: var(--ttd-primary); background: var(--ttd-primary-soft); color: var(--ttd-primary-dark); }

.ttd-parent-layout { display: grid; grid-template-columns: 1fr .95fr; gap: 52px; align-items: center; }
.ttd-parent-content h2 { margin: 12px 0; font-size: clamp(29px, 3vw, 43px); line-height: 1.18; letter-spacing: -.035em; }
.ttd-parent-content > p { color: var(--ttd-muted); font-size: 18px; }
.ttd-check-list { padding: 0; margin: 22px 0 28px; list-style: none; }
.ttd-check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; font-weight: 700; }
.ttd-check-list li::before { position: absolute; left: 0; top: 4px; content: "✓"; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #e8f8ef; color: var(--ttd-success); font-size: 12px; font-weight: 900; }
.ttd-parent-panel { padding: 26px; border-radius: 24px; background: #fff; box-shadow: var(--ttd-shadow); }
.ttd-parent-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--ttd-border); }
.ttd-parent-panel__head strong { font-size: 18px; }
.ttd-parent-panel__tag { padding: 5px 8px; border-radius: 999px; background: #eafaf2; color: var(--ttd-success); font-size: 12px; font-weight: 850; }
.ttd-progress-item { padding: 17px 0; border-bottom: 1px solid var(--ttd-border); }
.ttd-progress-item:last-child { padding-bottom: 0; border-bottom: 0; }
.ttd-progress-item__row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 14px; font-weight: 800; }
.ttd-progress { height: 10px; overflow: hidden; border-radius: 999px; background: #edf2f7; }
.ttd-progress span { display: block; height: 100%; border-radius: inherit; background: var(--ttd-primary); }
.ttd-progress-item:nth-child(3) .ttd-progress span { background: var(--ttd-accent); }
.ttd-progress-item:nth-child(4) .ttd-progress span { background: #35a56d; }

.ttd-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ttd-post-card { overflow: hidden; border: 1px solid var(--ttd-border); border-radius: 20px; background: #fff; box-shadow: 0 4px 14px rgba(20,69,112,.04); }
.ttd-post-card__thumbnail { display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--ttd-primary-soft), #f9fcff); }
.ttd-post-card__thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ttd-post-card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ttd-primary); font-size: 39px; font-weight: 900; }
.ttd-post-card__body { padding: 20px; }
.ttd-post-card__meta { margin: 0 0 8px; color: var(--ttd-primary); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.ttd-post-card h3 { margin: 0; font-size: 20px; line-height: 1.32; }
.ttd-post-card h3 a { color: var(--ttd-ink); }
.ttd-post-card h3 a:hover { color: var(--ttd-primary); }
.ttd-post-card__excerpt { margin: 10px 0 0; color: var(--ttd-muted); font-size: 14px; }

.ttd-page-hero { padding: 58px 0; background: linear-gradient(135deg, var(--ttd-primary-soft), #fff); }
.ttd-page-hero h1 { max-width: 800px; margin: 12px 0 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.12; letter-spacing: -.045em; }
.ttd-page-hero p { max-width: 760px; margin: 14px 0 0; color: var(--ttd-muted); font-size: 18px; }
.ttd-page-content { padding: 56px 0; }
.entry-content { max-width: 860px; margin: 0 auto; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.55em; line-height: 1.25; }
.entry-content h2 { font-size: 31px; }
.entry-content h3 { font-size: 24px; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.2em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote { margin: 1.6em 0; padding: 18px 22px; border-left: 4px solid var(--ttd-primary); border-radius: 0 12px 12px 0; background: var(--ttd-primary-soft); font-size: 19px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--ttd-border); text-align: left; }
.entry-content th { background: var(--ttd-primary-soft); }
.entry-content .wp-block-button__link { border-radius: 12px; background: var(--ttd-primary); font-weight: 800; }

.ttd-practice-intro { max-width: 860px; margin: 0 auto 34px; text-align: center; }
.ttd-practice-intro p { color: var(--ttd-muted); font-size: 18px; }
.ttd-practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-bottom: 42px; }
.ttd-practice-grid .ttd-skill-card { min-height: 190px; }
.ttd-practice-shortcode { padding: 28px; border: 1px solid var(--ttd-border); border-radius: 20px; background: #fff; box-shadow: 0 5px 15px rgba(20,69,112,.04); }

.ttd-archive { padding: 58px 0 78px; }
.ttd-archive__head { margin-bottom: 30px; }
.ttd-archive__head h1 { margin: 8px 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.04em; }
.ttd-archive__description { max-width: 680px; color: var(--ttd-muted); }
.ttd-pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.page-numbers { display: grid; place-items: center; min-width: 39px; height: 39px; padding: 0 10px; border: 1px solid var(--ttd-border); border-radius: 9px; background: #fff; color: var(--ttd-ink); font-weight: 800; }
.page-numbers.current { border-color: var(--ttd-primary); background: var(--ttd-primary); color: #fff; }

.ttd-single { padding: 58px 0 76px; }
.ttd-single__header { max-width: 860px; margin: 0 auto 30px; }
.ttd-single__meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--ttd-muted); font-size: 14px; font-weight: 700; }
.ttd-single__title { margin: 12px 0; font-size: clamp(35px, 4.2vw, 58px); line-height: 1.12; letter-spacing: -.05em; }
.ttd-single__excerpt { margin: 0; color: var(--ttd-muted); font-size: 19px; }
.ttd-featured-image { max-width: 960px; margin: 0 auto 34px; overflow: hidden; border-radius: 20px; }
.ttd-featured-image img { display: block; width: 100%; }
.ttd-post-navigation { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 860px; margin: 40px auto 0; }
.ttd-post-navigation a { display: block; min-height: 100%; padding: 16px; border: 1px solid var(--ttd-border); border-radius: 14px; background: #fff; color: var(--ttd-ink); font-weight: 800; }
.ttd-post-navigation a:hover { border-color: var(--ttd-primary); color: var(--ttd-primary); }

.comments-area { max-width: 860px; margin: 55px auto 0; padding-top: 30px; border-top: 1px solid var(--ttd-border); }
.comment-list { padding: 0; margin: 25px 0; list-style: none; }
.comment-body { padding: 16px; margin-bottom: 14px; border: 1px solid var(--ttd-border); border-radius: 14px; background: #fff; }
.comment-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.comment-author .avatar { border-radius: 50%; }
.comment-respond input, .comment-respond textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--ttd-border); border-radius: 10px; background: #fff; }
.comment-respond input:focus, .comment-respond textarea:focus { outline: 3px solid rgba(10,98,199,.14); border-color: var(--ttd-primary); }
.comment-respond .submit { width: auto; margin-top: 8px; border: 0; background: var(--ttd-primary); color: #fff; font-weight: 800; }

.error-404 { max-width: 730px; padding: 90px 0; margin: 0 auto; text-align: center; }
.error-404__code { margin: 0; color: var(--ttd-primary); font-size: clamp(90px, 15vw, 170px); line-height: 1; font-weight: 900; letter-spacing: -.08em; }
.error-404 h1 { margin: 12px 0; font-size: 34px; }
.error-404 p { color: var(--ttd-muted); }
.search-form { display: flex; gap: 8px; max-width: 560px; margin: 24px auto 0; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 45px; padding: 10px 13px; border: 1px solid var(--ttd-border); border-radius: 10px; }
.search-submit { border: 0; border-radius: 10px; background: var(--ttd-primary); color: #fff; padding: 0 16px; font-weight: 800; }

.site-footer { color: #dcecff; background: #082d58; }
.site-footer__main { display: grid; grid-template-columns: 1.2fr .75fr .75fr; gap: 42px; padding: 58px 0 36px; }
.site-footer__brand .site-title { color: #fff; }
.site-footer__brand .site-description, .site-footer__brand p { color: rgba(220,236,255,.72); }
.site-footer__brand p { max-width: 390px; margin: 13px 0 0; }
.site-footer h2 { margin: 0 0 12px; color: #fff; font-size: 16px; }
.site-footer ul { padding: 0; margin: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(220,236,255,.78); }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 15px; padding: 19px 0; border-top: 1px solid rgba(220,236,255,.14); color: rgba(220,236,255,.65); font-size: 13px; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 1000px) {
	.ttd-hero__grid, .ttd-parent-layout, .ttd-challenge { grid-template-columns: 1fr; }
	.ttd-hero-board { min-height: 360px; max-width: 570px; width: 100%; margin: 0 auto; }
	.ttd-challenge__visual { min-height: 310px; }
	.ttd-class-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
	.ttd-skill-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
	.site-footer__main { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (max-width: 780px) {
	.ttd-container { width: min(calc(100% - 28px), var(--ttd-container)); }
	.ttd-section { padding: 56px 0; }
	.site-header__inner { min-height: 66px; gap: 12px; }
	.site-title { font-size: 20px; }
	.site-description { display: none; }
	.nav-toggle { display: inline-flex; margin-left: auto; }
	.site-navigation { position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: none; padding: 13px 14px 18px; border-bottom: 1px solid var(--ttd-border); background: #fff; box-shadow: 0 14px 25px rgba(21,68,119,.09); }
	.site-navigation.is-open { display: block; }
	.primary-menu { display: block; }
	.primary-menu a { padding: 11px 5px; }
	.primary-menu .sub-menu { position: static; display: block; width: auto; padding: 0 0 0 13px; border: 0; border-left: 2px solid var(--ttd-primary-soft); border-radius: 0; box-shadow: none; visibility: visible; opacity: 1; transform: none; }
	.primary-menu .sub-menu a { padding: 8px; }
	.header-cta { display: none; }
	.ttd-hero { padding: 52px 0 58px; }
	.ttd-hero__grid { gap: 25px; }
	.ttd-hero__lead, .ttd-section-head p, .ttd-parent-content > p { font-size: 16px; }
	.ttd-hero-board { min-height: 335px; }
	.ttd-hero-card--main { position: relative; top: 16px; right: auto; margin-left: auto; }
	.ttd-class-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.ttd-skill-grid, .ttd-practice-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.ttd-post-grid { grid-template-columns: 1fr; }
	.site-footer__main { grid-template-columns: 1fr 1fr; gap: 28px; padding: 43px 0 28px; }
	.site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 510px) {
	.ttd-hero h1 { font-size: 38px; }
	.ttd-hero__actions { display: grid; grid-template-columns: 1fr; }
	.ttd-hero__actions .ttd-button { width: 100%; }
	.ttd-hero__points { display: grid; gap: 8px; }
	.ttd-hero-board { min-height: 315px; }
	.ttd-hero-card--main { width: calc(100% - 28px); padding: 18px; }
	.ttd-hero-card--one { left: 0; top: 36px; }
	.ttd-hero-card--two { right: 0; bottom: 0; }
	.ttd-problem-text { font-size: 16px; }
	.ttd-number-token { width: 45px; height: 45px; font-size: 21px; }
	.ttd-class-grid, .ttd-skill-grid, .ttd-practice-grid { grid-template-columns: 1fr; }
	.ttd-challenge__content { padding: 30px 23px; }
	.ttd-challenge__visual { padding: 23px; }
	.ttd-challenge-board { transform: none; }
	.ttd-parent-panel { padding: 20px; }
	.ttd-post-navigation { grid-template-columns: 1fr; }
	.site-footer__main { grid-template-columns: 1fr; }
	.site-footer__brand { grid-column: auto; }
	.site-footer__bottom { display: block; }
	.footer-menu { margin-top: 8px; }
	.search-form { display: block; }
	.search-submit { width: 100%; min-height: 45px; margin-top: 8px; }
}

@media print {
	.site-header, .site-footer, .ttd-hero__actions, .header-cta, .nav-toggle { display: none !important; }
	body { background: #fff; }
	.ttd-section, .ttd-page-content, .ttd-single { padding: 20px 0; }
}
