/*
Theme Name:   Y4DL
Theme URI:    https://www.y4dl.com/
Author:       Y4DL
Description:  Fast, focused theme for the Y4DL YouTube downloader. Pairs with the Y4DL Downloader plugin for the download tool, SEO, ads and one-click site setup.
Version:      1.0.8
Requires at least: 6.2
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  y4dl
*/

/* ---------------------------------------------------------------
   Tokens (brand colours come from the plugin as --y4-*)
---------------------------------------------------------------- */
:root {
	--ink: var(--y4-ink, #14162b);
	--primary: var(--y4-primary, #2b3ae8);
	--accent: var(--y4-accent, #ffc531);
	--paper: #f6f7fb;
	--white: #fff;
	--line: #dde0ee;
	--text: #1d2036;
	--muted: #5d6180;
	--on-dark: rgba(255, 255, 255, .92);
	--on-dark-muted: rgba(255, 255, 255, .64);
	--font: var(--y4-font, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--wrap: 1120px;
	--gutter: clamp(16px, 4vw, 32px);
	--r-lg: 18px;
	--r-md: 12px;
	--r-sm: 8px;
}

/* ---------------------------------------------------------------
   Base
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
	margin: 0;
	background: var(--white);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
.y4-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.y4-skip { position: absolute; inset-inline-start: 8px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--accent); color: var(--ink); font-weight: 700; border-radius: var(--r-sm); transform: translateY(-300%); }
.y4-skip:focus { transform: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Expanded display type: the one typographic voice of the site */
.y4-hero-title, .y4-page-title, .y4-section-title, .y4-logo-text, .y4-prose h2 {
	font-stretch: 125%;
	font-weight: 800;
	letter-spacing: -.025em;
}

/* ---------------------------------------------------------------
   Header
---------------------------------------------------------------- */
.y4-header { background: var(--ink); color: var(--on-dark); position: relative; z-index: 20; }
.y4-header-in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.y4-logo { flex: none; }
.y4-nav { min-width: 0; }
.y4-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.y4-logo:hover { text-decoration: none; }
.y4-logo-mark { display: inline-flex; }
.y4-logo-text { font-size: 21px; font-weight: 780; letter-spacing: -.02em; }
.custom-logo-link img { display: block; max-height: 44px; width: auto; }

.y4-nav-menu { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.y4-nav-menu a {
	position: relative; display: block; padding: 10px 12px; white-space: nowrap;
	color: var(--on-dark); font-size: 15px; font-weight: 550; text-decoration: none; border-radius: var(--r-sm);
}
.y4-nav-menu a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.y4-nav-menu a[aria-current="page"]::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--accent);
}
.y4-nav-toggle { display: none; }

/* header tools: install button + language picker */
.y4-header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.y4-install {
	display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 5px; border-radius: 99px;
	background: linear-gradient(135deg, #ffd65c, var(--accent)); color: var(--ink); text-decoration: none;
	font: 750 14px/1 var(--font); white-space: nowrap;
	box-shadow: 0 6px 18px -8px rgba(255, 197, 49, .8), inset 0 -2px 0 rgba(0, 0, 0, .08);
	transition: transform .12s, box-shadow .15s;
}
.y4-install:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(255, 197, 49, .9), inset 0 -2px 0 rgba(0, 0, 0, .08); }
.y4-install-ico {
	position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink);
}
.y4-install-ico::before {
	content: ""; position: absolute; inset: 0;
	background: no-repeat center / 15px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 20h14'/%3E%3C/svg%3E");
}
.y4-install-s { display: none; }
.y4-standalone .y4-install { display: none; }
.y4-lang { position: relative; }
.y4-lang summary {
	display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; cursor: pointer; list-style: none;
	color: var(--on-dark); font: 650 14px/1 var(--font); border: 1px solid rgba(255, 255, 255, .18);
}
.y4-lang summary::-webkit-details-marker { display: none; }
.y4-lang summary:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.y4-lang-globe {
	width: 16px; height: 16px;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9s-1.3 6.3-3.8 9c-2.5-2.7-3.8-5.7-3.8-9S9.5 5.7 12 3z'/%3E%3C/svg%3E");
}
.y4-lang ul {
	position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; min-width: 160px; margin: 0; padding: 6px; list-style: none;
	background: #fff; border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(10, 12, 40, .45);
}
.y4-lang a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.y4-lang a:hover { background: var(--paper); }
.y4-lang a[aria-current] { color: var(--primary); }
.y4-lang a[aria-current]::after { content: " ✓"; }

@media (max-width: 1080px) {
	.y4-nav-toggle {
		display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px;
		color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px;
		font: 600 15px/1 var(--font); cursor: pointer;
	}
	.y4-burger, .y4-burger::before, .y4-burger::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s; }
	.y4-burger::before, .y4-burger::after { content: ""; position: absolute; left: 0; }
	.y4-burger::before { top: -5px; }
	.y4-burger::after { top: 5px; }
	.y4-menu-open .y4-burger { background: transparent; }
	.y4-menu-open .y4-burger::before { transform: translateY(5px) rotate(45deg); }
	.y4-menu-open .y4-burger::after { transform: translateY(-5px) rotate(-45deg); }
	.y4-header-in { gap: 12px; }
	.y4-logo { margin-inline-end: auto; }
	.y4-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-top: 1px solid rgba(255, 255, 255, .1); padding: 8px var(--gutter) 20px; }
	.y4-menu-open .y4-nav { display: block; }
	.y4-nav-menu { flex-direction: column; align-items: stretch; }
	.y4-nav-menu a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 0; }
	.y4-nav-menu a[aria-current="page"]::after { left: auto; right: 4px; top: 50%; bottom: auto; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-50%); }
}

/* ---------------------------------------------------------------
   Dark bands: hero and page heads. Their bottom edge is a strip of
   film – the site's one decorative motif.
---------------------------------------------------------------- */
.y4-on-dark { position: relative; background: var(--ink); color: var(--on-dark); }
.y4-on-dark::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
	background:
		radial-gradient(circle at 50% 50%, var(--paper) 0 3px, transparent 3.5px) 0 50% / 22px 18px repeat-x;
	opacity: .14;
}
.y4-hero { padding: 36px 0 92px; }
.y4-hero-title {
	max-width: 15ch; margin: 8px 0 18px;
	color: #fff; font-size: clamp(40px, 6.6vw, 80px); line-height: .98;
}
.y4-hero-lead { max-width: 54ch; margin: 0 0 32px; color: var(--on-dark-muted); font-size: clamp(17px, 1.7vw, 20px); line-height: 1.55; }
.y4-hero .ytc-deck { --hole: rgba(255, 255, 255, .55); background-color: #23264a; }

.y4-pagehead { padding: 40px 0 64px; }
.y4-page-title { max-width: 22ch; margin: 6px 0 12px; color: #fff; font-size: clamp(32px, 4.8vw, 56px); line-height: 1.04; }
.y4-page-lead { max-width: 60ch; margin: 0; color: var(--on-dark-muted); font-size: 18px; }

.y4-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.y4-crumbs li { color: var(--on-dark-muted); }
.y4-crumbs li + li::before { content: "/"; margin: 0 10px; opacity: .5; }
.y4-crumbs a { color: var(--on-dark-muted); text-decoration: none; }
.y4-crumbs a:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------------
   Sections
---------------------------------------------------------------- */
.y4-section-title { margin: 0 0 28px; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.08; }

.y4-steps { padding: 72px 0 24px; background: var(--white); }
.y4-steps-list { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.y4-steps-list li { counter-increment: step; padding: 24px 28px 8px 0; }
.y4-steps-list li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.y4-steps-list li::before {
	content: counter(step);
	display: block; margin-bottom: 14px;
	color: var(--primary); font-size: 52px; line-height: 1; font-weight: 800; font-stretch: 125%;
}
.y4-steps-list h3 { margin: 0 0 6px; font-size: 19px; font-weight: 720; }
.y4-steps-list p { margin: 0; color: var(--muted); font-size: 16px; }
.y4-tip { padding: 24px 0 40px; background: var(--white); }
.y4-tip-card {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 28px; align-items: center;
	padding: 28px 32px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line);
}
.y4-tip-text h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 750; }
.y4-tip-text p { margin: 0; color: var(--muted); font-size: 16px; }
.y4-tip-demo { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font: 600 15px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.y4-tip-url { max-width: 100%; padding: 10px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y4-tip-url.is-new { color: var(--ink); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(43, 58, 232, .12); }
.y4-tip-url mark { background: var(--accent, #ffc531); color: var(--ink); padding: 1px 3px; border-radius: 4px; }
.y4-tip-arrow { padding-left: 18px; color: var(--primary); font-weight: 800; }
@media (max-width: 760px) {
	.y4-tip-card { grid-template-columns: 1fr; padding: 22px 20px; gap: 18px; }
	.y4-tip-demo { font-size: 13px; }
}
@media (max-width: 760px) {
	.y4-steps-list { grid-template-columns: 1fr; }
	.y4-steps-list li, .y4-steps-list li + li { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
	.y4-steps-list li::before { grid-row: span 2; font-size: 40px; margin: 0; }
}

/* ---------------------------------------------------------------
   Long-form content
---------------------------------------------------------------- */
.y4-article { padding: 56px 0 72px; background: var(--white); }
.y4-prose { max-width: 720px; }
.y4-prose > *:first-child { margin-top: 0; }
.y4-prose h2 { margin: 2.2em 0 .6em; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; }
.y4-prose h3 { margin: 1.8em 0 .5em; font-size: 20px; font-weight: 720; }
.y4-prose p, .y4-prose li { color: #2b2e48; }
.y4-prose strong { color: var(--ink); }
.y4-prose ul, .y4-prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.y4-prose ul { list-style: none; padding-left: 0; }
.y4-prose ul > li { position: relative; padding-left: 22px; margin-bottom: .5em; }
.y4-prose ul > li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--primary); }
.y4-prose ol > li { margin-bottom: .5em; padding-left: 4px; }
.y4-prose ol > li::marker { color: var(--primary); font-weight: 750; }
.y4-prose figure { margin: 1.6em 0; }
.y4-prose .wp-block-table { overflow-x: auto; }
.y4-prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.y4-prose th { text-align: left; padding: 10px 14px 10px 0; border-bottom: 2px solid var(--ink); color: var(--ink); font-weight: 700; }
.y4-prose td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.y4-prose em { color: var(--muted); }
.y4-prose pre { margin: 1.4em 0; padding: 16px 18px; overflow-x: auto; border-radius: var(--r-md, 12px); background: #0f1024; color: #e8e9ff; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.y4-prose code { padding: 1px 6px; border-radius: 5px; background: var(--paper, #f3f4fb); font-size: .92em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.y4-prose pre code { padding: 0; background: none; font-size: inherit; }
.y4-featured { margin: 0 0 32px; }
.y4-featured img { border-radius: var(--r-lg); display: block; }

/* ---------------------------------------------------------------
   FAQ
---------------------------------------------------------------- */
.y4-faq { padding: 72px 0; background: var(--paper); }
.y4-faq-list { max-width: 820px; border-top: 2px solid var(--ink); }
.y4-qa { border-bottom: 1px solid var(--line); }
.y4-qa summary {
	position: relative; display: block; padding: 20px 48px 20px 0;
	color: var(--ink); font-size: 18px; font-weight: 680; cursor: pointer; list-style: none;
}
.y4-qa summary::-webkit-details-marker { display: none; }
.y4-qa summary::before, .y4-qa summary::after {
	content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 2.5px; border-radius: 2px; background: var(--primary); transition: transform .2s;
}
.y4-qa summary::after { transform: rotate(90deg); }
.y4-qa[open] summary::after { transform: rotate(0); }
.y4-qa summary:hover { color: var(--primary); }
.y4-qa-a { padding: 0 48px 18px 0; color: #2b2e48; }
.y4-qa-a p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------
   Guides list
---------------------------------------------------------------- */
.y4-guides { padding: 72px 0; background: var(--white); }
.y4-faq + .y4-guides { padding-top: 64px; }
.y4-article + .y4-guides { padding-top: 0; }
.y4-guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.y4-guide-list li { border-bottom: 1px solid var(--line); }
.y4-guide-list a { display: block; padding: 18px 0; text-decoration: none; }
.y4-guide-t { display: block; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.3; }
.y4-guide-d { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.y4-guide-list a:hover .y4-guide-t { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .y4-guide-list { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------
   Inline tool sections (guides, posts)
---------------------------------------------------------------- */
.y4-try { padding: 64px 0; background: var(--paper); }
.y4-try .y4-section-title { margin-bottom: 8px; }
.y4-try-lead { margin: 0 0 24px; color: var(--muted); }
.y4-missing { padding: 16px; border: 2px dashed var(--line); border-radius: var(--r-md); color: var(--muted); }

/* ---------------------------------------------------------------
   Blog listing
---------------------------------------------------------------- */
.y4-listing { padding-top: 48px; padding-bottom: 72px; }
.y4-post-list { max-width: 780px; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.y4-post-item { padding: 26px 0; border-bottom: 1px solid var(--line); }
.y4-post-date { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.y4-post-title { font-size: 24px; font-weight: 750; font-stretch: 112%; letter-spacing: -.015em; margin: 0 0 8px; }
.y4-post-title a { color: var(--ink); text-decoration: none; }
.y4-post-title a:hover { color: var(--primary); text-decoration: underline; }
.y4-post-excerpt { margin: 0; color: #2b2e48; }
.y4-empty-state { max-width: 560px; padding: 32px 0; color: var(--muted); }
.navigation.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-links .page-numbers { display: inline-flex; align-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; justify-content: center; }
.nav-links .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------------------------------------------------------------
   Footer
---------------------------------------------------------------- */
.y4-footer { background: var(--ink); color: var(--on-dark-muted); padding: 64px 0 28px; font-size: 15px; }
.y4-foot-top { display: grid; grid-template-columns: minmax(220px, 1fr) 2.6fr; gap: 48px; padding-bottom: 40px; }
.y4-foot-brand p { margin: 16px 0 0; max-width: 32ch; }
.y4-foot-mail { color: #fff; font-weight: 600; }
.y4-foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.y4-foot-title { margin: 6px 0 12px; color: #fff; font-size: 15px; font-weight: 700; }
.y4-foot-menu { margin: 0; padding: 0; list-style: none; }
.y4-foot-menu li { margin: 0 0 8px; }
.y4-foot-menu a { color: var(--on-dark-muted); text-decoration: none; }
.y4-foot-menu a:hover { color: #fff; text-decoration: underline; }
.y4-foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
.y4-foot-bottom p { margin: 0; }
@media (max-width: 900px) {
	.y4-foot-top { grid-template-columns: 1fr; gap: 32px; }
	.y4-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
}

/* ---------------------------------------------------------------
   Ads and plugin bits
---------------------------------------------------------------- */
.y4-ad { margin: 24px auto; padding: 0 var(--gutter); text-align: center; overflow: hidden; }
.y4-ad--header { margin: 12px auto; }
.y4-ad--below_tool { margin: 28px auto 0; }
.y4-prose .y4-ad { padding: 0; margin: 28px 0; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------
   Right-to-left pages (Arabic)
---------------------------------------------------------------- */
[dir="rtl"] body, [dir="rtl"] .ytc, [dir="rtl"] button, [dir="rtl"] input {
	font-family: var(--font), "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", sans-serif;
}
[dir="rtl"] .y4-hero-title, [dir="rtl"] .y4-page-title, [dir="rtl"] .y4-section-title, [dir="rtl"] .y4-prose h2, [dir="rtl"] .y4-tip-text h2 {
	letter-spacing: 0; font-stretch: 100%; line-height: 1.3;
}
[dir="rtl"] .ytc-group, [dir="rtl"] .ytc-sublabel, [dir="rtl"] .ytc-preview-k, [dir="rtl"] .ytc-recent-k { letter-spacing: 0; }
[dir="rtl"] .y4-steps-list li { padding: 24px 0 8px 28px; }
[dir="rtl"] .y4-steps-list li + li { padding-left: 28px; padding-right: 28px; border-left: 0; border-right: 1px solid var(--line); }
[dir="rtl"] .y4-prose ul > li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .y4-prose ul > li::before { left: auto; right: 2px; }
[dir="rtl"] .y4-prose ol { padding-left: 0; padding-right: 1.3em; }
[dir="rtl"] .y4-prose th { text-align: right; padding: 10px 0 10px 14px; }
[dir="rtl"] .y4-prose td { padding: 12px 0 12px 14px; }
[dir="rtl"] .y4-qa summary { padding: 20px 0 20px 48px; }
[dir="rtl"] .y4-qa summary::before, [dir="rtl"] .y4-qa summary::after { right: auto; left: 8px; }
[dir="rtl"] .y4-qa-a { padding: 0 0 18px 48px; }
[dir="rtl"] .y4-tip-arrow { padding-left: 0; padding-right: 18px; }
@media (max-width: 760px) {
	[dir="rtl"] .y4-steps-list li, [dir="rtl"] .y4-steps-list li + li { padding: 20px 0; border-right: 0; }
}
@media (max-width: 1080px) {
	[dir="rtl"] .y4-nav-menu a[aria-current="page"]::after { right: auto; left: 4px; }
}

/* Phone header: compact controls (kept last so it wins over the base rules) */
@media (max-width: 560px) {
	.y4-header-tools { gap: 6px; }
	.y4-logo-text { font-size: 18px; }
	.y4-logo-mark svg { width: 30px; height: 30px; }
	.y4-install { padding: 0 12px 0 5px; gap: 6px; }
	.y4-install-t { display: none; }
	.y4-install-s { display: inline; }
	.y4-lang summary { padding: 0 8px; }
	.y4-nav-toggle { padding: 0 11px; }
	.y4-nav-toggle-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 430px) {
	.y4-header-in { gap: 8px; }
	.y4-header-tools { gap: 5px; }
	.y4-logo { gap: 7px; }
	.y4-logo-text { font-size: 16px; }
	.y4-lang summary { width: 38px; height: 38px; padding: 0; justify-content: center; }
	.y4-lang-code { display: none; }
	.y4-nav-toggle { width: 40px; padding: 0; justify-content: center; }
	.y4-install { padding: 0 10px 0 4px; font-size: 13px; }
}
@media (max-width: 380px) {
	.y4-install { width: 38px; padding: 0; justify-content: center; }
	.y4-install-s { display: none; }
}

/* RTL: English-only links (company, legal) and mixed-script lines read in their own direction */
[dir="rtl"] .y4-foot-menu a, [dir="rtl"] .y4-guide-t, [dir="rtl"] .y4-guide-d, [dir="rtl"] .y4-crumbs li { unicode-bidi: plaintext; }
[dir="rtl"] .y4-foot-bottom p { unicode-bidi: plaintext; }
