@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Open+Sans:wght@400;600&display=swap");

/* ==========================================================================
   ePetitions.pk — template stylesheet
   Brand carried over from the existing site: green #009966, coral #e55d51,
   Lato headings / Open Sans body. Rewritten as modern, dependency-free CSS.
   ========================================================================== */

:root {
	--green: #009966;
	--green-dark: #007a52;
	--green-soft: #e6f5ef;
	--coral: #e55d51;
	--coral-dark: #cf4b40;

	--ink: #1b1f23;
	--ink-2: #3d444b;
	--muted: #6b7280;
	--line: #e2e6ea;
	--line-soft: #eef1f4;
	--bg: #f6f7f9;
	--surface: #ffffff;

	--head: "Lato", "Helvetica Neue", Arial, sans-serif;
	--body: "Open Sans", "Helvetica Neue", Arial, sans-serif;

	--radius: 6px;
	--radius-lg: 10px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
	--shadow-lg: 0 10px 30px rgba(16, 24, 40, .09);
	--container: 1180px;
	--header-h: 58px;

	/*
	 * Density. The site is deliberately compact — a petition list should show
	 * several petitions at once, not one per screen. Change these four and the
	 * whole rhythm follows; they are used everywhere rather than repeated as
	 * literals.
	 */
	--space-section: 34px;   /* vertical padding of a page section */
	--space-tight: 20px;     /* the same, for a secondary section */
	--gap: 14px;             /* grid and flex gaps */
	--pad: 16px;             /* padding inside a card */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 15px;
	line-height: 1.5;
}

h1, h2, h3, h4, h5 { font-family: var(--head); color: var(--ink); margin: 0 0 .35em; line-height: 1.2; }
h1 { font-size: 1.95rem; font-weight: 900; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .7em; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0; }
small { font-size: .82rem; }

:focus-visible { outline: 3px solid rgba(0, 153, 102, .45); outline-offset: 2px; border-radius: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 18px; }
.visually-hidden {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 200;
	background: var(--green); color: #fff; padding: 10px 16px; border-radius: var(--radius);
	transition: top .15s ease;
}
.skip-link:focus { top: 12px; color: #fff; text-decoration: none; }

/* ------------------------------------------------------------------ header */

.site-header {
	position: sticky; top: 0; z-index: 60;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}
.site-header .container {
	display: flex; align-items: center; gap: 14px;
	min-height: var(--header-h);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 150px; }
.brand:hover { text-decoration: none; }

.header-search { flex: 1 1 auto; max-width: 420px; position: relative; }
.header-search input {
	width: 100%; height: 34px; padding: 0 36px 0 12px;
	border: 1px solid var(--line); border-radius: 100px; background: var(--bg);
	font-family: var(--body); font-size: .9rem; color: var(--ink);
}
.header-search input:focus { background: var(--surface); border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(0,153,102,.15); }
.header-search button {
	position: absolute; right: 3px; top: 3px; width: 28px; height: 28px;
	border: 0; border-radius: 50%; background: transparent; color: var(--muted);
	cursor: pointer; display: grid; place-items: center;
}
.header-search button:hover { color: var(--green); background: var(--green-soft); }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.main-nav a.nav-link {
	font-family: var(--head); font-weight: 700; font-size: .82rem; letter-spacing: .06em;
	text-transform: uppercase; color: var(--ink-2); padding: 7px 10px; border-radius: var(--radius);
}
.main-nav a.nav-link:hover { color: var(--green); background: var(--green-soft); text-decoration: none; }
.main-nav a.nav-link.is-active { color: var(--green); }

.nav-toggle {
	display: none; margin-left: auto; width: 38px; height: 38px;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--surface); cursor: pointer; color: var(--ink);
}

/* user menu */
.user-menu { position: relative; }
.user-menu > button {
	display: flex; align-items: center; gap: 8px; cursor: pointer;
	border: 1px solid var(--line); background: var(--surface); border-radius: 100px;
	padding: 4px 10px 4px 4px; font-family: var(--head); font-weight: 700; font-size: .82rem; color: var(--ink);
}
.user-menu > button:hover { border-color: var(--green); color: var(--green); }
.user-menu .avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; color: var(--green); font-size: .8rem; }
.user-menu .menu {
	position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.user-menu.open .menu { display: block; }
.user-menu .menu a {
	display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius);
	color: var(--ink-2); font-size: .9rem;
}
.user-menu .menu a:hover { background: var(--bg); color: var(--green); text-decoration: none; }
.user-menu .menu hr { margin: 6px 0; }

/* ------------------------------------------------------------------ buttons */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: var(--head); font-weight: 700; font-size: .86rem; letter-spacing: .06em;
	text-transform: uppercase; line-height: 1;
	padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent;
	background: var(--green); color: #fff; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
	text-align: center;
}
.btn:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); border-color: var(--muted); }
.btn-coral { background: var(--coral); }
.btn-coral:hover { background: var(--coral-dark); }
.btn-danger { background: transparent; color: var(--coral); border-color: var(--coral); }
.btn-danger:hover { background: var(--coral); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .74rem; }
.btn-lg { padding: 13px 24px; font-size: .9rem; }
.btn-block { display: flex; width: 100%; }

/* ------------------------------------------------------------------ banner */

.banner {
	position: relative;
	/*
	 * WebP with a JPEG fallback. The plain url() below is what a browser
	 * without image-set() takes; everything current takes the WebP, which is
	 * 29 KB against 245 KB — the single biggest download on the page, on
	 * connections that are mostly mobile.
	 */
	background: #10202a url("../img/banner.jpg") center / cover no-repeat;
	background-image: image-set(
		url("../img/banner.webp") type("image/webp"),
		url("../img/banner.jpg") type("image/jpeg"));
	color: #fff;
}
.banner::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(8, 22, 30, .78) 0%, rgba(8, 22, 30, .45) 60%, rgba(8, 22, 30, .25) 100%);
}
.banner .container { position: relative; z-index: 1; padding-top: 52px; padding-bottom: 52px; }
.banner h1 {
	color: #fff; font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 300;
	letter-spacing: .04em; text-transform: uppercase; margin-bottom: .25em;
}
.banner h1 strong { font-weight: 900; }
.banner h1 .line-2 { display: block; font-weight: 900; }
.banner p.lead { max-width: 560px; color: rgba(255,255,255,.9); font-size: 1rem; margin-bottom: 1.1em; }
.banner .btn { min-width: 230px; }

.banner-sub {
	background: #10202a url("../img/banner-sub-page.jpg") center / cover no-repeat;
	background-image: image-set(
		url("../img/banner-sub-page.webp") type("image/webp"),
		url("../img/banner-sub-page.jpg") type("image/jpeg"));
	color: #fff; position: relative;
}
.banner-sub::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(8, 22, 30, .82) 0%, rgba(8, 22, 30, .55) 100%);
}
.banner-sub .container { position: relative; z-index: 1; padding-top: 26px; padding-bottom: 26px; }
.banner-sub h1 { color: #fff; margin-bottom: .2em; }
.banner-sub p { color: rgba(255,255,255,.88); margin: 0; }

/* Base breadcrumbs sit on a light background; the banner variant inverts them. */
.breadcrumbs { font-size: .8rem; color: var(--muted); margin-bottom: .5em; }
.breadcrumbs a { color: var(--ink-2); }
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs span { margin: 0 6px; }
.banner-sub .breadcrumbs, .banner .breadcrumbs { color: rgba(255,255,255,.7); }
.banner-sub .breadcrumbs a, .banner .breadcrumbs a { color: rgba(255,255,255,.9); }
.banner-sub .breadcrumbs a:hover, .banner .breadcrumbs a:hover { color: #fff; }

/* ------------------------------------------------------------------ layout */

.section { padding: var(--space-section) 0; }
.section-tight { padding: var(--space-tight) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.section-head a { font-family: var(--head); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }

.card {
	background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.card-pad { padding: var(--pad); }
.card-head { padding: 11px var(--pad); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h3 { margin: 0; font-size: .98rem; }
.card-body { padding: var(--pad); }

/* ------------------------------------------------------- petition card */

.petition-card { display: flex; flex-direction: column; overflow: hidden; }
.petition-card .thumb { aspect-ratio: 32 / 9; background: var(--line-soft) center / cover no-repeat; }
.petition-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.petition-card .cat {
	font-family: var(--head); font-weight: 700; font-size: .66rem; text-transform: uppercase;
	letter-spacing: .1em; color: var(--green); margin-bottom: 5px;
}
.petition-card h3 { font-size: 1rem; margin-bottom: 6px; }
.petition-card h3 a { color: var(--ink); }
.petition-card h3 a:hover { color: var(--green); text-decoration: none; }
.petition-card .excerpt { color: var(--muted); font-size: .86rem; margin-bottom: 10px; }
.petition-card .meta { margin-top: auto; }

.petition-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--gap); padding: var(--pad); align-items: center; }
.petition-row .thumb { aspect-ratio: 16 / 10; border-radius: var(--radius); background: var(--line-soft) center / cover no-repeat; }
.petition-row h3 { margin-bottom: 6px; }

/* Category thumbnails. Deliberate flat art rather than repeated stock photos —
   the real photo, where a petition has one, appears on the petition page. */
.thumb[class*="thumb-"] { position: relative; overflow: hidden; }
.thumb[class*="thumb-"]::after {
	content: ""; position: absolute; inset: 0;
	background-image:
		repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 14px, transparent 14px 28px);
}
.thumb[class*="thumb-"] .glyph {
	position: absolute; right: -8px; bottom: -14px; z-index: 1;
	color: rgba(255, 255, 255, .22);
}
.thumb[class*="thumb-"] .glyph svg { width: 96px; height: 96px; stroke-width: 1.2; }
.thumb.thumb-transport { background: linear-gradient(135deg, #12503c, #0f8f61); }
.thumb.thumb-education { background: linear-gradient(135deg, #1c3f63, #2d78ad); }
.thumb.thumb-environment { background: linear-gradient(135deg, #14513f, #3a9a5c); }
.thumb.thumb-health { background: linear-gradient(135deg, #5a2434, #a8465a); }
.thumb.thumb-local { background: linear-gradient(135deg, #4a3612, #a07526); }
.thumb.thumb-rights { background: linear-gradient(135deg, #3a2a5e, #6d54a8); }
.thumb.thumb-employment { background: linear-gradient(135deg, #14454f, #2a8a99); }
.thumb.thumb-consumer { background: linear-gradient(135deg, #5c3116, #b06a32); }


.stats { display: flex; align-items: baseline; justify-content: space-between; font-size: .85rem; margin-bottom: 6px; }
.stats .count { font-family: var(--head); font-weight: 900; color: var(--ink); font-size: 1.05rem; }
.stats .count span { font-weight: 400; font-family: var(--body); font-size: .82rem; color: var(--muted); }
.stats .target { color: var(--muted); }

.progress { height: 8px; border-radius: 100px; background: var(--line-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 100px; background: var(--green); }
.progress.is-hot > span { background: var(--coral); }

.meta-line { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .78rem; margin-top: 8px; }
.meta-line .sep { color: var(--line); }

.badge {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px;
	font-family: var(--head); font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
}
.badge-green { background: var(--green-soft); color: var(--green-dark); }
.badge-grey { background: var(--line-soft); color: var(--ink-2); }
.badge-coral { background: #fdeceb; color: var(--coral-dark); }
.badge-amber { background: #fdf3e2; color: #a86a12; }

/* --------------------------------------------------------- how it works */

.step { text-align: center; padding: 18px 14px; }
.step .icon { width: 70px; height: 70px; margin: 0 auto 10px; }
.step .icon img { width: 100%; }
.step h3 {
	font-size: .95rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px;
}
.step p { color: var(--muted); font-size: .9rem; margin: 0; }

.cta-strip { background: var(--green); color: #fff; text-align: center; padding: 30px 0; }
.cta-strip h2 { color: #fff; }
.cta-strip p { color: rgba(255,255,255,.9); max-width: 620px; margin: 0 auto 1.1em; }
.cta-strip .btn { background: #fff; color: var(--green); }
.cta-strip .btn:hover { background: rgba(255,255,255,.88); color: var(--green-dark); }

/* --------------------------------------------------------------- forms */

.field { margin-bottom: 12px; }
.field > label, .field-label {
	display: block; font-family: var(--head); font-weight: 700; font-size: .82rem;
	color: var(--ink); margin-bottom: 4px;
}
.field .hint { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; }
.field .req { color: var(--coral); }

.input, .select, .textarea {
	width: 100%; padding: 9px 12px; font-family: var(--body); font-size: .93rem; color: var(--ink);
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.input:focus, .select:focus, .textarea:focus {
	outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,153,102,.15);
}
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input-error { border-color: var(--coral); }
.error-text { color: var(--coral-dark); font-size: .82rem; margin-top: 6px; }

.check { display: flex; gap: 9px; align-items: flex-start; font-size: .9rem; margin-bottom: 7px; }
.check input { margin-top: 3px; accent-color: var(--green); width: 16px; height: 16px; }

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }

.alert { padding: 10px 13px; border-radius: var(--radius); font-size: .88rem; margin-bottom: 12px; border: 1px solid; }
.alert-info { background: #eef5fb; border-color: #cfe2f2; color: #245a80; }
.alert-success { background: var(--green-soft); border-color: #b8e3d1; color: var(--green-dark); }
.alert-warn { background: #fdf6e7; border-color: #f2e0b6; color: #8a6512; }
.alert-error { background: #fdeceb; border-color: #f6ccc8; color: var(--coral-dark); }

.captcha-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha-img {
	width: 160px; height: 46px; border: 1px solid var(--line); border-radius: var(--radius);
	background: repeating-linear-gradient(45deg, #f4f6f8, #f4f6f8 6px, #eceff2 6px, #eceff2 12px);
	display: grid; place-items: center;
	font-family: var(--head); font-weight: 900; font-size: 1.3rem; letter-spacing: .3em; color: var(--ink-2);
	font-style: italic;
}

/* --------------------------------------------------------------- wizard */

.wizard-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.wizard-steps li { list-style: none; text-align: center; }
.wizard-steps .num {
	width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 50%;
	display: grid; place-items: center; font-family: var(--head); font-weight: 900;
	background: var(--surface); border: 2px solid var(--line); color: var(--muted);
}
.wizard-steps .label { font-family: var(--head); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.wizard-steps li.is-done .num { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.wizard-steps li.is-done .label { color: var(--green); }
.wizard-steps li.is-current .num { background: var(--green); border-color: var(--green); color: #fff; }
.wizard-steps li.is-current .label { color: var(--ink); }

.wizard-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }

.review-box { border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfc; padding: 14px; margin-bottom: 10px; }
.review-box h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.review-box p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- petition page */

.petition-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 20px 0; }
.petition-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.petition-hero .author { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
/* Byline and petition details share a row where there is width for it. The
   two were separate blocks, so they always stacked even on a wide screen. */
@media (min-width: 861px) {
	.petition-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
	.petition-byline .author { margin-bottom: 0; }
	.petition-byline .meta-line { margin-top: 0; }
	.petition-byline .author::after {
		content: "\00b7"; color: var(--line); margin-left: 14px;
	}
}

.sign-panel { position: sticky; top: calc(var(--header-h) + 20px); }
.sign-panel .big { font-family: var(--head); font-weight: 900; font-size: 2.1rem; line-height: 1; }
.sign-panel .big span { font-size: .95rem; font-weight: 400; font-family: var(--body); color: var(--muted); display: block; margin-top: 4px; }

.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
	width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
	background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
}
.share-btn:hover { background: var(--green); border-color: var(--green); color: #fff; text-decoration: none; }
.share-btn[data-share-native], .share-btn[data-share-copy] { cursor: pointer; font: inherit; }
.share-note { margin-top: 8px; }
/* --- endorsement confirmed: share row of labelled buttons ---------------- */
.share-row .btn { gap: 7px; }
/* --- endorsement submitted: replaces the button where it stood ----------- */
.endorse-pending {
	background: color-mix(in srgb, var(--green) 8%, var(--surface));
	border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
	border-radius: var(--radius); padding: 14px; text-align: center; color: var(--ink);
}
.endorse-pending strong { display: block; font-size: 1.02rem; margin-bottom: 3px; }
.endorse-pending p { font-size: .9rem; color: var(--ink-2); }
.endorse-pending .ico { color: var(--green); margin-bottom: 4px; }
/* The discussion sits below both columns, so on a phone the endorse panel
   follows the petition text instead of the comment board doing so. */
.petition-discussion { margin-top: var(--space-tight); }
@media (min-width: 861px) {
	.petition-discussion { max-width: calc(100% - 342px); }
}

.prose { font-size: 1rem; color: var(--ink-2); }
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.6em; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: .4em; }

.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.attachment {
	display: flex; align-items: center; gap: 10px; padding: 9px 12px;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 7px;
}
.attachment .name { font-weight: 600; font-size: .9rem; }
.attachment .size { color: var(--muted); font-size: .8rem; }

/* -------------------------------------------------------------- comments */

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.comment-list li:last-child { border-bottom: 0; }
.comment-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; font-family: var(--head); font-weight: 900; color: var(--green); }
.comment-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.comment-head .name { font-family: var(--head); font-weight: 700; }
.comment-head .time { color: var(--muted); font-size: .8rem; }
.comment-body { color: var(--ink-2); font-size: .94rem; }
.comment-actions { margin-top: 6px; display: flex; gap: 14px; font-size: .8rem; }

/* ------------------------------------------------------------ tabs, table */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a {
	padding: 12px 16px; font-family: var(--head); font-weight: 700; font-size: .84rem;
	text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
	border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.is-active { color: var(--green); border-bottom-color: var(--green); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
	text-align: left; font-family: var(--head); font-weight: 700; font-size: .74rem;
	text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
	padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr:hover { background: #fbfcfd; }
table.data td.actions { white-space: nowrap; text-align: right; }
table.data .strong { font-weight: 600; color: var(--ink); }

.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span {
	min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
	font-family: var(--head); font-weight: 700; font-size: .85rem; color: var(--ink-2);
}
.pagination a:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.pagination .is-current { background: var(--green); border-color: var(--green); color: #fff; }
.pagination .is-disabled { color: var(--line); }

.empty-state { text-align: center; padding: 32px 18px; color: var(--muted); }
.empty-state .icon { font-size: 2.6rem; margin-bottom: 12px; opacity: .5; }
.empty-state h3 { color: var(--ink); }

/* ------------------------------------------------------------- filters */

.filter-bar {
	display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: 10px 12px; margin-bottom: 14px;
}
.filter-bar .grow { flex: 1 1 220px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
	/* Sized to the text: just enough padding to clear the pill's border. */
	padding: 3px 13px; border-radius: 100px; border: 1px solid var(--line); background: var(--surface);
	font-size: .84rem; line-height: 1.6; color: var(--ink-2);
}
.chip:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------------------------------------------------------------- modal */

.modal-backdrop {
	position: fixed; inset: 0; background: rgba(15, 23, 30, .55); backdrop-filter: blur(3px);
	display: none; align-items: center; justify-content: center; padding: 20px; z-index: 120;
}
.modal-backdrop.open { display: flex; }
.modal {
	background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
	width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; position: relative;
}
.modal-close {
	position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border: 0;
	background: transparent; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; border-radius: var(--radius);
}
.modal-close:hover { background: var(--bg); color: var(--ink); }
.modal-body { padding: 22px 20px 20px; }
.modal .tabs { margin-bottom: 22px; }

/* --------------------------------------------------------------- footer */

.site-footer { background: #14181c; color: #9aa3ac; padding: 28px 0 18px; margin-top: 0; }
.site-footer h4 {
	color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 14px;
}
.site-footer a { color: #b9c1c9; font-size: .9rem; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 5px; }
/* Five link columns now, which is too many to sit beside the brand at any
   sensible width, so the brand takes a full row above them. Spanning to -1
   keeps that true at every breakpoint without a per-query override. */
.footer-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.footer-brand { grid-column: 1 / -1; max-width: 560px; }
.footer-brand img { width: 150px; margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; max-width: 300px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
	width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08);
	display: grid; place-items: center; color: #cfd6dd;
}
.footer-social a:hover { background: var(--green); color: #fff; }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.1); margin-top: 20px; padding-top: 14px;
	display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem;
}

/* ------------------------------------------------------------ admin shell */

.admin-body { background: #eef1f4; }
.admin-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: #101b22; color: #b6c0c8; padding: 20px 14px; }
.admin-side .brand { padding: 0 8px 22px; }
.admin-side .brand img { width: 140px; }
.admin-side .side-label {
	font-family: var(--head); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
	color: #5f6d78; padding: 16px 10px 8px;
}
.admin-side nav a {
	display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius);
	color: #b6c0c8; font-size: .9rem;
}
.admin-side nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.admin-side nav a.is-active { background: var(--green); color: #fff; }
.admin-side nav a .count { margin-left: auto; font-size: .74rem; background: rgba(255,255,255,.12); padding: 2px 8px; border-radius: 100px; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-top {
	background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px;
	display: flex; align-items: center; gap: 16px;
}
.admin-top h1 { font-size: 1.25rem; margin: 0; }
.admin-top .spacer { margin-left: auto; }
.admin-content { padding: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: 13px 15px; box-shadow: var(--shadow);
}
.stat .label { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.stat .value { font-family: var(--head); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.stat .delta { font-size: .8rem; color: var(--green); margin-top: 6px; }
.stat .delta.down { color: var(--coral); }

/* --------------------------------------------------------------- utility */

.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 11px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 22px; }
.mt-2 { margin-top: 11px; } .mt-3 { margin-top: 16px; }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-green { color: var(--green); }
.text-sm { font-size: .85rem; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 7px; } .gap-2 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }

/* ---------------------------------------------------------- responsive */

/* --- content pages: issue hubs and guides --------------------------------- */
.prose .lead { font-size: 1.06rem; color: var(--ink); margin-bottom: 1.2em; }
.card-title { font-family: var(--head); font-size: 1.02rem; line-height: 1.35; margin: 0; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.link-list li:first-child { padding-top: 0; }
.link-list span { display: block; margin-top: 2px; }
.petition-image { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; }
/* --- wizard review summary ----------------------------------------------- */
.review-summary { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); margin-bottom: 14px; background: var(--bg); }
.review-summary dl { margin: 0 0 10px; }
.review-summary dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.review-summary dl > div:last-of-type { border-bottom: 0; }
.review-summary dt { font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.review-summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-summary dd.is-empty { color: var(--muted); }
@media (max-width: 560px) {
	.review-summary dl > div { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 1024px) {
	.layout-sidebar { grid-template-columns: 1fr; }
	.sign-panel { position: static; }
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
	.admin-shell { grid-template-columns: 1fr; }
	.admin-side { display: none; }
}

@media (max-width: 860px) {
	.nav-toggle { display: grid; place-items: center; }
	.header-search { display: none; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--surface); border-bottom: 1px solid var(--line);
		flex-direction: column; align-items: stretch; padding: 12px; gap: 4px;
		box-shadow: var(--shadow-lg);
	}
	.site-header.nav-open .main-nav { display: flex; }
	.site-header .container { position: relative; }
	.main-nav a.nav-link { padding: 12px; font-size: .9rem; }
	.user-menu > button { width: 100%; justify-content: flex-start; }
	.user-menu .menu { position: static; box-shadow: none; margin-top: 6px; }
	.grid-3, .grid-2 { grid-template-columns: 1fr; }
	.petition-row { grid-template-columns: 1fr; }
	/* full-width thumb would otherwise dominate the card on a phone */
	.petition-row .thumb { aspect-ratio: 16 / 5; }
	.wizard-steps { grid-template-columns: repeat(2, 1fr); gap: 16px 8px; }
	.form-row { grid-template-columns: 1fr; }
	.banner .container { padding-top: 60px; padding-bottom: 60px; }
	.section { padding: 40px 0; }
}

@media (max-width: 560px) {
	.grid-4 { grid-template-columns: 1fr; }
	.stat-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
	.banner .btn { width: 100%; }
}

@media print {
	.site-header, .site-footer, .sign-panel, .nav-toggle { display: none; }
	body { background: #fff; }
}

/* ==========================================================================
   Language switching (Google Translate)
   ========================================================================== */

.lang-switch {
	display: inline-flex;
	border: 1px solid var(--line);
	border-radius: 100px;
	overflow: hidden;
	background: var(--surface);
	flex: 0 0 auto;
}
.lang-option {
	appearance: none;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 6px 11px;
	font-family: var(--head);
	font-weight: 700;
	font-size: .78rem;
	color: var(--muted);
	line-height: 1.4;
}
.lang-option:hover { color: var(--green); background: var(--green-soft); }
.lang-option.is-active { background: var(--green); color: #fff; }
/* Urdu renders far too small at the Latin size. */
.lang-option[lang="ur"] { font-size: 1rem; font-family: var(--urdu-body); }

/* Google's own chrome: the dropdown, the top banner and the tooltip balloon.
   The banner is the important one — it pushes the whole document down by
   ~40px and leaves a gap under a sticky header. */
/* The banner frame and tooltip are removed outright. */
iframe.skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-tooltip {
	display: none !important;
}

/* The gadget itself stays in the document — its <select> is what performs the
   translation — but is moved out of sight. `display: none` would stop it
   working. */
#google_translate_element {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	/* Clipped in place rather than pushed off to a negative offset: in a
	   right-to-left page the scroll origin flips and an element parked at
	   left:-9999px adds ~9800px of horizontal scroll to every page. */
	top: 0;
	left: 0;
}
body { top: 0 !important; position: static !important; }

/* Google marks translated words with a highlight; it fights the design. */
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ---------------------------------------------------------- Urdu / RTL */

:root {
	/*
	 * One family for the whole page, headlines included — the approach BBC
	 * Urdu takes with its own BBC Reith Qalam. Reith Qalam is proprietary to
	 * the BBC, so this is Noto Sans Arabic: the closest freely licensed match
	 * for its low-contrast, modern Naskh texture, and the most legible of the
	 * options at small sizes on a phone.
	 *
	 * Both tokens exist so a future change is a one-line edit; today they
	 * deliberately point at the same face.
	 */
	--urdu-display: "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
	--urdu-body: "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}

html.is-rtl body,
html[dir="rtl"] body {
	direction: rtl;
	text-align: right;
	font-family: var(--urdu-body);
	/* Arabic-script text needs a little more room than Latin, but nowhere near
	   what Nastaliq demanded. */
	line-height: 1.8;
}

html.is-rtl h1, html.is-rtl h2, html.is-rtl h3, html.is-rtl h4, html.is-rtl h5,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4, html[dir="rtl"] h5 {
	font-family: var(--urdu-display);
	font-weight: 700;
	line-height: 1.55;
	letter-spacing: 0;
}

/* The Latin display face is a heavy 900; Arabic script at that weight smears
   at heading sizes, so 700 is the top. */
html.is-rtl h1, html[dir="rtl"] h1 { font-weight: 700; }

/* Controls and dense UI: Naskh, and a touch larger, since Arabic-script
   glyphs read smaller than Latin at the same nominal size. */
html.is-rtl .btn, html.is-rtl .input, html.is-rtl .select, html.is-rtl .textarea,
html.is-rtl .nav-link, html.is-rtl table.data, html.is-rtl .badge, html.is-rtl .chip,
html[dir="rtl"] .btn, html[dir="rtl"] .input, html[dir="rtl"] .select, html[dir="rtl"] .textarea,
html[dir="rtl"] .nav-link, html[dir="rtl"] table.data, html[dir="rtl"] .badge, html[dir="rtl"] .chip {
	font-family: var(--urdu-body);
	letter-spacing: 0;
}
html.is-rtl .btn, html[dir="rtl"] .btn { font-size: .95rem; text-transform: none; }
html.is-rtl .nav-link, html[dir="rtl"] .nav-link { font-size: .95rem; text-transform: none; }
html.is-rtl .banner h1, html[dir="rtl"] .banner h1 { text-transform: none; }

/* Anything that is an identifier, a URL or a number stays left-to-right. */
html.is-rtl .notranslate,
html.is-rtl .comment-avatar,
html.is-rtl .stats .count,
html.is-rtl .stat .value,
html.is-rtl code,
html[dir="rtl"] .notranslate,
html[dir="rtl"] .comment-avatar,
html[dir="rtl"] .stats .count,
html[dir="rtl"] .stat .value,
html[dir="rtl"] code {
	direction: ltr;
	unicode-bidi: isolate;
	font-family: var(--body);
}

/*
 * Navigation does not mirror.
 *
 * Only the reading content flips for Urdu. The logo stays on the left and the
 * menu keeps one order in both languages, so someone switching language does
 * not have to hunt for the control they were about to press. The text inside
 * each item is still Urdu and still shapes right-to-left within its own box —
 * it is the running order of the chrome that is pinned, not the script.
 */
html.is-rtl .site-header,
html[dir="rtl"] .site-header,
html.is-rtl .site-header .container,
html[dir="rtl"] .site-header .container,
html.is-rtl .main-nav,
html[dir="rtl"] .main-nav {
	direction: ltr;
	text-align: left;
}

/* Footer link columns are navigation too, so they hold their order. Each
   column's own text goes back to right-to-left. */
html.is-rtl .footer-grid,
html[dir="rtl"] .footer-grid { direction: ltr; }
html.is-rtl .footer-grid > div,
html[dir="rtl"] .footer-grid > div { direction: rtl; text-align: right; }
html.is-rtl .footer-bottom,
html[dir="rtl"] .footer-bottom { direction: rtl; }

html.is-rtl .prose ul, html.is-rtl .prose ol,
html[dir="rtl"] .prose ul, html[dir="rtl"] .prose ol {
	padding-left: 0;
	padding-right: 1.3em;
}

html.is-rtl .comment-list li,
html[dir="rtl"] .comment-list li { grid-template-columns: minmax(0, 1fr) 44px; }
html.is-rtl .comment-list li > :first-child,
html[dir="rtl"] .comment-list li > :first-child { order: 2; }

html.is-rtl .banner .container,
html[dir="rtl"] .banner .container { text-align: right; }

html.is-rtl table.data th, html.is-rtl table.data td,
html[dir="rtl"] table.data th, html[dir="rtl"] table.data td { text-align: right; }
html.is-rtl table.data td.actions,
html[dir="rtl"] table.data td.actions { text-align: left; }

html.is-rtl .admin-side,
html[dir="rtl"] .admin-side { order: 2; }

/* The progress bar always fills from the start of the reading direction. */
html.is-rtl .progress > span,
html[dir="rtl"] .progress > span { float: right; }

/* ---------------------------------------------------- header, revised flow */

/* Two groups: navigation on the left of the bar, actions on the right, so the
   eye goes logo -> where to browse -> what to do. */
.main-nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-actions { display: flex; align-items: center; gap: 9px; }
.nav-actions .header-search { width: 200px; flex: 0 0 auto; }
.nav-cta { white-space: nowrap; }
.menu-logout {
	display: flex; align-items: center; gap: 10px; width: 100%;
	padding: 9px 12px; border: 0; background: none; cursor: pointer;
	font-family: var(--body); font-size: .9rem; color: var(--ink-2); border-radius: var(--radius);
}
.menu-logout:hover { background: var(--bg); color: var(--green); }

@media (max-width: 1100px) {
	.nav-actions .header-search { width: 170px; }
	.main-nav { gap: 14px; }
}

@media (max-width: 860px) {
	.main-nav { gap: 10px; }
	.nav-links, .nav-actions { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
	.nav-actions .header-search { width: 100%; display: block; }
	.lang-switch { align-self: flex-start; }
}

/* ------------------------------------------------------ get started page */

.steps-inline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps-inline li {
	display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px;
	padding: 10px 0; align-items: start;
}
.steps-inline li::before {
	counter-increment: step; content: counter(step);
	width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
	background: var(--green); color: #fff;
	font-family: var(--head); font-weight: 900; font-size: .82rem;
}


/* ==========================================================================
   Mobile
   --------------------------------------------------------------------------
   Nearly all traffic is Android phones, so this section is the one that
   matters. It comes last deliberately: it must win over the desktop rules
   above it.
   ========================================================================== */

/* Exactly one language control is shown at any width. The mobile copy lives in
   the header bar itself, just before the menu button, so a reader can switch
   to Urdu without opening the menu first. */
.lang-switch-mobile { display: none; }
.lang-switch-desktop { display: block; }

@media (max-width: 860px) {
	.lang-switch-mobile { display: block; margin-left: auto; }
	.lang-switch-desktop { display: none; }

	/* The collapsed menu. Without re-stating display:none here the desktop
	   flex rule above would leave it permanently open. */
	.main-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
		margin: 0;
		padding: 12px;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow-lg);
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
	}
	.site-header.nav-open .main-nav { display: flex; }

	.nav-links,
	.nav-actions { flex-direction: column; align-items: stretch; gap: 6px; width: 100%; }
	.nav-actions { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
	.nav-actions .header-search { width: 100%; }
	.main-nav a.nav-link { padding: 13px 12px; font-size: .95rem; }
	.nav-cta { padding: 15px 22px; }
	.user-menu > button { width: 100%; justify-content: flex-start; padding: 11px 12px; }

	.brand img { width: 158px; }
	.site-header .container { gap: 10px; }

	/* 44px is the smallest comfortable target on a phone. */
	.nav-toggle { width: 46px; height: 46px; }
	.lang-option { padding: 11px 14px; }
}

@media (max-width: 640px) {
	:root {
		--header-h: 54px;
		/* Tighter still on a phone, where every pixel of whitespace costs a
		   line of the petition someone came to read. */
		--space-section: 22px;
		--space-tight: 14px;
		--gap: 10px;
		--pad: 13px;
	}

	/* 16px stops Android and iOS zooming the page in when a field is focused. */
	.input, .select, .textarea, .header-search input { font-size: 16px; }
	.textarea { min-height: 110px; }

	.container { padding: 0 14px; }

	.banner .container { padding-top: 30px; padding-bottom: 30px; }
	.banner h1 { font-size: clamp(1.75rem, 8.5vw, 2.2rem); }
	.banner p.lead { font-size: .93rem; margin-bottom: .9em; }
	.banner-sub .container { padding-top: 16px; padding-bottom: 16px; }

	h1 { font-size: 1.45rem; }
	h2 { font-size: 1.18rem; }
	h3 { font-size: 1rem; }

	/* A full-width 16:9 block pushed the actual petition below the fold. */
	.petition-card .thumb { aspect-ratio: 32 / 7; }
	.petition-card .thumb .glyph svg { width: 40px; height: 40px; }
	.petition-row { padding: var(--pad); gap: var(--gap); }

	/* Padding here is a tap-target floor, not decoration: 44px is the smallest
	   comfortable target on a phone, so these stay put however compact the
	   rest of the page gets. */
	.btn { padding: 13px 18px; }
	.btn-sm { padding: 11px 14px; }
	.btn-lg { padding: 14px 22px; font-size: .88rem; }
	/* Side-by-side buttons on a narrow screen end up unreadably cramped. */
	.wizard-actions { flex-direction: column-reverse; gap: 10px; }
	.wizard-actions .btn { width: 100%; }

	.filter-bar { padding: 10px; gap: 8px; }
	.filter-bar > div, .filter-bar .btn { width: 100%; flex: 1 1 100%; }

	.wizard-steps { grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 14px; }
	.wizard-steps .num { width: 34px; height: 34px; margin-bottom: 5px; font-size: .82rem; }
	.wizard-steps .label { font-size: .6rem; letter-spacing: .02em; }

	.comment-list li { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 10px 0; }
	.comment-avatar { width: 36px; height: 36px; font-size: .8rem; }

	.stat { padding: 11px 13px; }
	.stat .value { font-size: 1.45rem; }

	.pagination a, .pagination span { min-width: 44px; height: 44px; }

	.tabs a { padding: 12px; font-size: .78rem; }
	.share-btn { width: 46px; height: 46px; }

	/* Filter chips were 38px tall — under the comfortable minimum for a thumb. */
	.chip { padding: 5px 14px; }
	.header-search input { height: 46px; }
	.header-search button { width: 38px; height: 38px; top: 4px; }
	.check input { width: 20px; height: 20px; }

	.layout-sidebar { gap: 16px; }
	.footer-grid { gap: 16px; }
	.site-footer { padding: 22px 0 14px; }

	/* Footer links are a column of tap targets. The height comes from padding
	   on the link itself rather than margin on the item, so the target grows
	   without the list spreading out. */
	.site-footer li { margin-bottom: 0; }
	.site-footer li a { display: inline-block; padding: 7px 0; }
}

/* -------------------------------------------------- sticky action on a phone */

/* The signature panel is the point of the page. On a phone it scrolls far out
   of reach, so the action follows the reader instead. */
.mobile-action-bar { display: none; }

@media (max-width: 860px) {
	.mobile-action-bar {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 70;
		background: var(--surface);
		border-top: 1px solid var(--line);
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		box-shadow: 0 -4px 16px rgba(16, 24, 40, .08);
	}
	.mobile-action-bar .meta {
		display: flex;
		justify-content: space-between;
		font-size: .78rem;
		color: var(--muted);
		margin-bottom: 6px;
	}
	.mobile-action-bar .progress { margin-bottom: 10px; }

	/* Email and button side by side; the button keeps its width so the field
	   takes whatever is left rather than the two fighting over it. */
	.mobile-action-bar .endorse-inline { display: flex; gap: 8px; align-items: stretch; }
	.mobile-action-bar .endorse-inline .input { flex: 1 1 auto; min-width: 0; margin: 0; }
	.mobile-action-bar .endorse-inline .btn { flex: 0 0 auto; }
	.mobile-action-bar .error-text { display: block; margin-top: 6px; }
	/* Room for the bar so it never covers the last of the page. */
	body.has-action-bar { padding-bottom: 128px; }
}

@media print {
	.mobile-action-bar { display: none; }
}

/* ------------------------------------------------- hand-written Urdu copy */

/* Exactly one of the two is shown. See the `bilingual` Blade component: the
   English is what Google translates for every other language; the Urdu is a
   written translation for the few lines that carry the brand. */
.t-ur { display: none; }
html.is-rtl .t-en,
html[dir="rtl"] .t-en { display: none; }
html.is-rtl .t-ur,
html[dir="rtl"] .t-ur { display: inline; }

/* ==========================================================================
   Advertising
   ========================================================================== */

.ad-slot {
	margin: var(--gap) 0;
	padding: 6px;
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius);
	/* Reserve height so the page does not jump when the ad fills in. */
	min-height: 108px;
	overflow: hidden;
}
.ad-label {
	display: block;
	font-family: var(--head);
	font-size: .62rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 4px;
}
.ad-slot .adsbygoogle { display: block; width: 100%; }

/* The fixed sign bar sits over the foot of the page on a phone. Without this
   the last ad ends up underneath it, which is both an accidental-click risk
   and against AdSense's placement rules. */
@media (max-width: 860px) {
	body.has-action-bar .ad-slot-bottom { margin-bottom: 84px; }
}

@media print {
	.ad-slot { display: none; }
}

/* ------------------------------------------- mobile language pill, refined */

@media (max-width: 860px) {
	/*
	 * Both the pill and the menu button carried `margin-left: auto`, so the
	 * free space in the bar was split between them and the pill drifted into
	 * the middle. Only the pill claims the space now; the button follows it
	 * immediately.
	 */
	.lang-switch-mobile { margin-left: auto; margin-right: -2px; }
	.nav-toggle { margin-left: 0; }

	/* A third shorter than the default control. Height is set explicitly so
	   the Urdu label, which has a taller line box than the Latin one, cannot
	   push it back out. */
	.lang-switch-mobile .lang-switch { height: 32px; }
	.lang-switch-mobile .lang-option {
		display: flex;
		align-items: center;
		height: 100%;
		padding: 0 11px;
		font-size: .72rem;
		line-height: 1;
	}
	.lang-switch-mobile .lang-option[lang="ur"] { font-size: .88rem; }
}
