/* =============================================================================
   Tribyo v2 — El directori públic de menús escolars (/menu-escolar)
   =============================================================================

   Un full a part i sencer: aquestes pàgines són la porta d'entrada des de
   Google i han de pintar-se de seguida, sense els 60 KB de tribyo.css ni el
   sanitize.css d'un CDN. Els colors, la lletra i el botó són els de la
   portada (.landing), perquè qui passi d'aquí a /new no noti el salt.

   Mòbil primer, en una columna. A partir de 60rem, la crida a Tribyo se'n va a
   una columna de la dreta i s'hi queda enganxada mentre es llegeix el menú; la
   barra de baix del mòbil desapareix. */

[hidden] { display: none !important; }

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

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

body {
	margin: 0;
	font-family: "Rethink Sans", system-ui, sans-serif;
	font-weight: 500;
	line-height: 1.5;
	color: #111;
	background-color: #fff;
}

a { color: #1a73e8; }

h1, h2, h3 { line-height: 1.2; }

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.brand {
	font-size: 1.5rem;
	font-weight: 800;
	color: #000;
	text-decoration: none;
}

.button {
	display: inline-block;
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	background-color: #1a73e8;
	padding: 0.85rem 1.4rem;
	border-radius: 0.75rem;
	text-decoration: none;
	text-align: center;
}

.button:hover { background-color: #1765cc; }

.button.secondary {
	color: #1a73e8;
	background-color: #f0f4fc;
}

.button.secondary:hover { background-color: #e3ecfb; }


/* La capçalera i el peu ------------------------------------------------------ */

.top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 72rem;
	margin: 0 auto;
	padding: 0.75rem 1rem;
}

.top-cta {
	font-weight: 700;
	text-decoration: none;
	padding: 0.5rem 0.75rem;
	border-radius: 0.6rem;
	background-color: #f0f4fc;
}

.bottom {
	max-width: 72rem;
	margin: 2rem auto 0;
	padding: 1.5rem 1rem 6rem;
	border-top: 1px solid #eee;
	font-size: 0.9rem;
	font-weight: 400;
	color: #555;
}

.bottom .brand { font-size: 1rem; }
.bottom a { color: inherit; }
.bottom .fine { font-size: 0.8rem; color: #777; }


/* La pàgina ------------------------------------------------------------------ */

.page {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1rem;
}

main { min-width: 0; }

main h1 {
	font-size: clamp(1.75rem, 7vw, 2.5rem);
	font-weight: 800;
	margin: 0.5rem 0 0.5rem;
}

main h2 {
	font-size: 1.3rem;
	font-weight: 800;
	margin: 2.25rem 0 0.75rem;
}

main p { font-weight: 400; }

.lead {
	font-size: 1.1rem;
	color: #333;
	max-width: 40rem;
}

.facts {
	margin: 0 0 1.25rem;
	color: #555;
	font-size: 0.95rem;
}

.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
	font-size: 0.85rem;
	color: #666;
}

.crumbs li + li::before {
	content: "›";
	margin-right: 0.25rem;
	color: #aaa;
}

.crumbs a { color: inherit; }


/* El menú d'avui: el que s'ha vingut a buscar. Gran i a dalt de tot. ---------- */

.today {
	margin: 0.5rem 0 1.5rem;
	padding: 1.25rem;
	border-radius: 1.25rem;
	background-color: #f0f4fc;
}

.today .eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: #1a73e8;
	text-transform: none;
}

.today .source,
.today .help {
	margin: 0.75rem 0 0;
	font-size: 0.85rem;
	color: #555;
}

.today.no-menu { background-color: #f6f6f4; }
.today.no-menu .eyebrow { color: #555; }

.dishes {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dishes li {
	padding: 0.2rem 0;
	font-weight: 400;
}

.dishes.big li {
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.3;
	padding: 0.3rem 0;
}

.closed {
	margin: 0;
	color: #888;
	font-style: italic;
	font-weight: 400;
}


/* Els propers dies ----------------------------------------------------------- */

.days {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

.days > li {
	padding: 0.85rem 1rem;
	border: 1px solid #e3e6ea;
	border-radius: 1rem;
}

.days h3 {
	margin: 0 0 0.25rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: #1a73e8;
}

@media (min-width: 40rem) {
	.days { grid-template-columns: 1fr 1fr; }
}


/* El mes sencer -------------------------------------------------------------- */

.month {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.month th,
.month td {
	padding: 0.5rem 0.25rem;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: top;
	font-weight: 400;
}

.month th {
	width: 3.5rem;
	font-weight: 700;
	white-space: nowrap;
}

.month tr.past { color: #999; }
.month tr.today { background-color: #f0f4fc; }


/* Les dietes i les preguntes, plegades ----------------------------------------- */

details {
	border-bottom: 1px solid #eee;
}

summary {
	padding: 0.85rem 0;
	font-weight: 700;
	cursor: pointer;
	list-style-position: outside;
}

details > p { margin-top: 0; }
details .days { margin-bottom: 1rem; }


/* L'escola ------------------------------------------------------------------- */

.school-info dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.4rem 1rem;
	margin: 0;
	font-size: 0.95rem;
}

.school-info dt { color: #666; font-weight: 500; }
.school-info dd { margin: 0; font-weight: 400; overflow-wrap: anywhere; }


/* Enllaços a altres escoles i municipis --------------------------------------- */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.chips a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.75rem;
	border: 1px solid #e3e6ea;
	border-radius: 2rem;
	color: #222;
	font-size: 0.9rem;
	text-decoration: none;
}

.chips a:hover { border-color: #1a73e8; }
.chips small { color: #888; }

.dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background-color: #1e8e3e;
}


/* Les llistes d'escoles i de municipis ------------------------------------------ */

.filter input,
.search input {
	width: 100%;
	font: inherit;
	font-size: 1.05rem;
	padding: 0.85rem 1rem;
	border: 1px solid #d5d9de;
	border-radius: 0.75rem;
	background-color: #fff;
}

.filter input:focus,
.search input:focus {
	outline: 2px solid #1a73e8;
	border-color: transparent;
}

.search { position: relative; margin: 1.25rem 0; }

.results {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0.25rem;
	border: 1px solid #e3e6ea;
	border-radius: 0.75rem;
	background: #fff;
}

.results a {
	display: flex;
	flex-direction: column;
	padding: 0.6rem 0.75rem;
	border-radius: 0.5rem;
	color: inherit;
	text-decoration: none;
}

.results a:hover { background-color: #f0f4fc; }
.results span { font-size: 0.85rem; color: #666; font-weight: 400; }

.school-list,
.muni-list {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

@media (min-width: 40rem) {
	.school-list,
	.muni-list { grid-template-columns: 1fr 1fr; }
}

.school-list a,
.muni-list a {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	height: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid #e3e6ea;
	border-radius: 1rem;
	color: inherit;
	text-decoration: none;
}

.school-list a:hover,
.muni-list a:hover { border-color: #1a73e8; }

.school-list .name,
.muni-list .name { font-weight: 700; }

.school-list .has-menu a { border-color: #cfe0fb; background-color: #fafcff; }

.school-list p { margin: 0; font-size: 0.92rem; }
.school-list .next .when { font-weight: 700; color: #1a73e8; }
.school-list .state.ok { color: #1e8e3e; font-weight: 700; }
.school-list .state.muted { color: #888; }
.school-list .addr,
.muni-list .count { font-size: 0.82rem; color: #777; font-weight: 400; }
.muni-list .count b { color: #1e8e3e; }


/* L'espai de Tribyo ---------------------------------------------------------- */

.pitch {
	margin: 2rem 0;
	padding: 1.5rem 1.25rem;
	border-radius: 1.25rem;
	background-color: #111;
	color: #fff;
}

.pitch h2 {
	margin: 0 0 0.75rem;
	font-size: 1.35rem;
	color: #fff;
}

.pitch p { font-weight: 400; color: #d8d8d8; }
.pitch a { color: #8ab4f8; }

.pitch .perks {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	display: grid;
	gap: 0.4rem;
	font-weight: 400;
	font-size: 0.95rem;
}

.pitch .cta { margin: 1.25rem 0 0.5rem; }
.pitch .button { width: 100%; }
.pitch .also { margin: 0; font-size: 0.88rem; }

/* El de la columna del costat només es veu a l'ordinador. */
.pitch-side { display: none; }

/* El mòbil de la portada, en petit. */
.phone {
	margin: 0 auto 1.25rem;
	max-width: 15rem;
	padding: 0.5rem;
	border-radius: 1.75rem;
	background-color: #000;
	box-shadow: 0 0 0 1px #333;
}

.phone .screen {
	border-radius: 1.35rem;
	background-color: #fff;
	color: #111;
	padding: 0.75rem;
	font-size: 0.72rem;
}

.phone .bar {
	font-weight: 800;
	font-size: 0.8rem;
	margin-bottom: 0.6rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.phone .days {
	display: grid;
	grid-template-columns: 1.6rem 1fr;
	gap: 0.5rem 0.5rem;
}

.phone .d {
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1.1;
}

.phone .d b { font-size: 0.6rem; color: #666; font-weight: 500; }
.phone .d span { font-weight: 800; }
.phone .d:first-child span {
	color: #fff;
	background: #1a73e8;
	border-radius: 50%;
	width: 1.4rem;
	height: 1.4rem;
	display: grid;
	place-items: center;
}

.phone ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.phone li { display: flex; gap: 0.35rem; align-items: flex-start; }
.phone li i { font-style: normal; }
.phone li.aside { color: #555; }

/* La barra de baix, al mòbil. */
.sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
	background-color: rgba(255, 255, 255, 0.97);
	border-top: 1px solid #e3e6ea;
	box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.06);
}

.sticky-cta span {
	flex: 1;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.25;
}

.sticky-cta .button {
	flex: none;
	padding: 0.65rem 1rem;
	font-size: 0.95rem;
}


/* L'ordinador ---------------------------------------------------------------- */

@media (min-width: 60rem) {
	.top { padding: 1rem 1.5rem; }
	.page { padding: 0 1.5rem; }

	.page.with-aside {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 21rem;
		gap: 3rem;
		align-items: start;
	}

	.pitch-side {
		display: block;
		position: sticky;
		top: 1rem;
		margin-top: 2.5rem;
	}

	/* Al costat ja hi és: el de dins del text i la barra de baix sobren. */
	.with-aside .pitch-inline,
	.sticky-cta { display: none; }

	.bottom { padding: 1.5rem; }

	.today { padding: 1.5rem 1.75rem; }
	.dishes.big li { font-size: 1.5rem; }
}
