/*
 * Legal pages (KVKK, cookies, contracts; client 15 Oct 2026, 1.4.57): the
 * 14 pages written by the seed's jj_legal_save() (body.jj-yasal,
 * functions.php). page.html gives them no gutter (theme.json has no root
 * padding), so on phones the text ran from the screen's left edge, and the
 * H1 sat at the top of the page under the fixed header. Here they get the
 * site's own gutter (clamp(20px, 5vw, 80px), like .shop / .jj-commerce, the
 * landscape notch included), start under the header like the Satış page,
 * and the H1 is the site's display type (it carried a font left over from
 * Phase 2 that no longer exists, so it fell back to a serif).
 * Tokens (--jj-*) come from site-header.css.
 */

/* The gutter comes from the text column's width, never from padding on
   main or the full-width post-content box: those boxes run edge to edge and
   keep their padding on a landscape iPhone (safe-area rule, tools/
   qa_landscape.mjs). Each column child (H1, paragraphs, lists, tables) is
   at most the 720px reading width and at least the gutter (or the notch,
   whichever is wider) clear of both screen edges. */
body.jj-yasal {
	--jj-yasal-g: max( clamp( 20px, 5vw, 80px ), var( --jj-sl, 0px ), var( --jj-sr, 0px ) );
}
body.jj-yasal main.wp-block-group {
	padding-top: clamp( 96px, 14vh, 150px );
	padding-bottom: clamp( 64px, 10vh, 120px );
	margin-top: 0;
}
body.jj-yasal main.wp-block-group > .wp-block-post-title,
body.jj-yasal .wp-block-post-content > * {
	max-width: min( var( --wp--style--global--content-size, 720px ), calc( 100% - 2 * var( --jj-yasal-g ) ) );
	box-sizing: border-box;
}

body.jj-yasal main.wp-block-group > .wp-block-post-title {
	font-family: var( --jj-display ) !important;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .01em;
	font-size: clamp( 40px, 6vw, 80px );
	line-height: 1.05; /* wrapped Turkish uppercase: the İ dot stays clear of the line above */
	margin: 0 auto clamp( 24px, 4vh, 40px );
	overflow-wrap: break-word;
}

body.jj-yasal .wp-block-post-content { margin-top: 0; }

/* Tables (cookie list, data categories): inside the gutter. Cookie names
   may break after "_" (jj_legal_table, functions.php); anything still wider
   scrolls inside its own box, the page never does. */
body.jj-yasal .wp-block-post-content .wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
body.jj-yasal .wp-block-post-content .wp-block-table td,
body.jj-yasal .wp-block-post-content .wp-block-table th { overflow-wrap: break-word; }
@media ( max-width: 600px ) {
	body.jj-yasal .wp-block-post-content .wp-block-table { font-size: 15px; }
	body.jj-yasal .wp-block-post-content .wp-block-table td,
	body.jj-yasal .wp-block-post-content .wp-block-table th { padding: 8px 10px; }
}

/* Phones: a table of 3+ columns (.jj-tablo-kart, each cell with its
   column's name in data-label) shows each row as a card: the cells one
   under the other, each under its column's name. The header row stays for
   screen readers only. */
@media ( max-width: 559px ) {
	body.jj-yasal .wp-block-table.jj-tablo-kart { overflow: visible; }
	body.jj-yasal .wp-block-table.jj-tablo-kart table,
	body.jj-yasal .wp-block-table.jj-tablo-kart tbody,
	body.jj-yasal .wp-block-table.jj-tablo-kart tr,
	body.jj-yasal .wp-block-table.jj-tablo-kart td { display: block; width: auto; border: 0; }
	body.jj-yasal .wp-block-table.jj-tablo-kart thead {
		position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect( 0 0 0 0 ); white-space: nowrap;
	}
	body.jj-yasal .wp-block-table.jj-tablo-kart tr {
		border: 1px solid currentColor;
		margin: 0 0 12px;
	}
	body.jj-yasal .wp-block-table.jj-tablo-kart td { padding: 8px 12px; }
	body.jj-yasal .wp-block-table.jj-tablo-kart td + td { border-top: 1px solid rgba( 28, 17, 11, .18 ); }
	body.jj-yasal .wp-block-table.jj-tablo-kart td[data-label]::before {
		content: attr( data-label );
		display: block;
		font-weight: 700;
		font-size: 13px;
		letter-spacing: .02em;
		margin-bottom: 2px;
	}
}
