/* codelpa.org: typographic, light and airy. Twenty Seventeen's identity
   (Libre Franklin, the Gran Canaria photo, letter-spaced uppercase labels)
   reworked as an editorial page. No JavaScript. */
:root {
	--paper: #fbfaf7;
	--paper-2: #f4f1ea;
	--ink: #1f2328;
	--text: #3a3e45;
	--muted: #757a82;
	--line: #e6e1d7;
	--accent: #2f5d86;
	--accent-soft: #e8eef4;
	--bar-h: 4rem;
	--wrap: 76rem;
	--gutter: clamp(1.25rem, 5vw, 4rem);
	--space: clamp(4.5rem, 11vw, 9rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 1.5rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font: 400 1.0625rem/1.75 "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-feature-settings: "kern", "liga";
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: .25em; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--paper); padding: .5rem 1rem; }
.skip-link:focus { left: .5rem; }

/* Small label used throughout */
.label { margin: 0; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.label .n { color: var(--accent); margin-right: .75em; font-variant-numeric: tabular-nums; }

/* Menu bar */
.bar { position: sticky; top: 0; z-index: 50; height: var(--bar-h); background: rgba(251, 250, 247, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.bar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bar .wrap::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; border-bottom: 1px solid var(--line); }
.bar { position: sticky; }
.bar .wrap { position: relative; }
.brand { color: var(--ink); text-decoration: none; font-size: .8125rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; }
.brand span { color: var(--accent); font-weight: 400; letter-spacing: .1em; }
.menu { display: flex; gap: clamp(1rem, 3vw, 2.25rem); margin: 0; padding: 0; list-style: none; }
.menu a { position: relative; display: block; padding: .5rem 0; color: var(--muted); font-size: .8125rem; font-weight: 500; letter-spacing: .08em; text-decoration: none; }
.menu a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: .25rem; height: 1px; background: currentColor; transition: right .25s ease; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--ink); }
.menu a:hover::after, .menu a[aria-current="page"]::after { right: 0; }

/* Home header: tall, title set large beside the photo */
.masthead { min-height: calc(100vh - var(--bar-h)); min-height: calc(100svh - var(--bar-h)); display: grid; }
.masthead .wrap { width: 100%; display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; padding-top: clamp(3rem, 8vh, 6rem); padding-bottom: clamp(3rem, 8vh, 6rem); }
@media (min-width: 62em) { .masthead .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.display { margin: 1.75rem 0 0; color: var(--ink); font-size: clamp(2.25rem, 6.4vw, 4.75rem); font-weight: 300; line-height: 1.02; letter-spacing: -.025em; }
.display b { display: block; font-weight: 800; letter-spacing: -.035em; }
.display .soft { display: block; color: var(--muted); }
.display .soft:first-child { white-space: nowrap; }
.rule { width: 4rem; height: 2px; margin: clamp(2rem, 4vw, 2.75rem) 0; border: 0; background: var(--accent); }
.lead { max-width: 30rem; margin: 0; color: var(--text); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); font-weight: 300; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.5rem; }
.btn { display: inline-block; padding: 1rem 1.75rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .875rem; font-weight: 600; letter-spacing: .04em; text-decoration: none; transition: background .2s, transform .2s; }
.btn:hover { background: var(--accent); color: #fff; }
.link-arrow { font-size: .9375rem; font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; display: inline-block; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }
.photo { position: relative; margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 45% 50%; border-radius: 2px; }
@media (max-width: 61.99em) { .photo img { aspect-ratio: 16 / 10; } }
.photo::before { content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem; z-index: -1; background: var(--accent-soft); border-radius: 2px; }
.photo figcaption { margin-top: 1.75rem; color: var(--muted); font-size: .8125rem; letter-spacing: .04em; }

/* Sections */
.section { padding: var(--space) 0; border-top: 1px solid var(--line); }
.section--tint { background: var(--paper-2); border-top-color: transparent; }
.grid-2 { display: grid; gap: 2rem; }
@media (min-width: 52em) { .grid-2 { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4rem; } }
.statement { margin: 0; max-width: 40rem; color: var(--ink); font-size: clamp(1.375rem, 2.8vw, 2.125rem); font-weight: 300; line-height: 1.38; letter-spacing: -.01em; }
.statement + p { max-width: 36rem; margin: 1.75rem 0 0; color: var(--text); }
.statement strong { font-weight: 600; }

.fines { margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; padding: 0; list-style: none; display: grid; counter-reset: fin; }
@media (min-width: 52em) { .fines { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4rem; } }
.fines li { counter-increment: fin; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 1rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.fines li::before { content: counter(fin, decimal-leading-zero); color: var(--accent); font-size: 1.75rem; font-weight: 200; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fines h3 { margin: .15rem 0 .5rem; color: var(--ink); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.005em; }
.fines p { margin: 0; color: var(--text); font-size: .9875rem; }
.more { margin: 2.5rem 0 0; }

.contacts { margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; display: grid; }
@media (min-width: 52em) { .contacts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact { padding: 2rem 0; border-top: 1px solid var(--line); }
@media (min-width: 52em) { .contact { padding: 0 2.5rem; border-top: 0; border-left: 1px solid var(--line); } .contact:first-child { padding-left: 0; border-left: 0; } }
.contact h3 { margin: 1rem 0 .5rem; color: var(--ink); font-size: 1.25rem; font-weight: 300; }
.contact p { margin: 0; color: var(--muted); font-size: .9375rem; }
.contact a { display: inline-block; margin-top: 1.25rem; font-size: .9375rem; font-weight: 600; word-break: break-word; }
.address { margin: clamp(3rem, 6vw, 4.5rem) 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }

/* Statutes */
.page-head { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem); }
.page-head .display { font-size: clamp(2.6rem, 7vw, 5rem); }
.page-head .lead { max-width: 40rem; margin-top: 2rem; }
.band { height: clamp(9rem, 22vw, 16rem); overflow: hidden; }
.band img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.reader { display: grid; gap: 2.5rem; padding-top: var(--space); padding-bottom: var(--space); }
@media (min-width: 62em) { .reader { grid-template-columns: 15rem minmax(0, 1fr); gap: 6rem; } }
.toc-side { display: none; }
@media (min-width: 62em) {
	.toc-side { display: block; position: sticky; top: calc(var(--bar-h) + 2rem); align-self: start; max-height: calc(100vh - var(--bar-h) - 4rem); overflow: auto; }
	.toc-mobile { display: none; }
}
.toc-list { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.toc-list a { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); padding: .45rem 0; color: var(--muted); font-size: .8125rem; line-height: 1.4; text-decoration: none; border-top: 1px solid var(--line); }
.toc-list li:first-child a { border-top: 0; }
.toc-list a:hover { color: var(--ink); }
.toc-list .n { color: var(--accent); font-variant-numeric: tabular-nums; }
.toc-mobile { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc-mobile summary { cursor: pointer; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; }
.toc-mobile[open] summary::after { content: "–"; }
.toc-mobile .toc-list { margin: 0 0 1rem; }
.prose { max-width: 40rem; }
.prose h2 { margin: 5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--ink); color: var(--ink); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 300; line-height: 1.25; letter-spacing: -.01em; }
.prose h2:first-child { margin-top: 0; }
.prose h2 .label { display: block; margin-bottom: .75rem; color: var(--accent); }
.prose h3 { margin: 3rem 0 .75rem; color: var(--ink); font-size: 1.0625rem; font-weight: 600; }
.prose h3 .art { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.prose p { margin: 0 0 1.1rem; }
.prose ol, .prose ul { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.prose li { margin: .5rem 0; padding-left: .25rem; }
.prose li::marker { color: var(--accent); font-size: .875em; font-variant-numeric: tabular-nums; }
.to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 50%; background: rgba(251, 250, 247, .92); color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* Footer */
.site-footer { padding: clamp(3.5rem, 7vw, 5rem) 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.site-footer .wrap { display: grid; gap: 2rem; }
@media (min-width: 52em) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.site-footer .name { margin: 0 0 .35rem; color: var(--ink); font-size: 1.125rem; font-weight: 300; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 2rem; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }

@media print {
	.bar, .photo, .band, .toc-side, .toc-mobile, .to-top, .actions, .site-footer nav { display: none; }
	body { background: #fff; }
	.masthead { min-height: 0; }
}

/* Home header background: line map of the province (OpenStreetMap coastline) */
.masthead { position: relative; isolation: isolate; clip-path: inset(0); }
.masthead::before { content: ""; position: fixed; top: var(--bar-h); right: 0; bottom: 0; left: 0; z-index: -1; background: url("/assets/img/mapa-las-palmas.svg") 100% 50% / auto 100% no-repeat; opacity: .9; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 82%, transparent 100%); }
.photo::before { background: rgba(232, 238, 244, .85); }
.lead { text-shadow: 0 0 12px var(--paper), 0 0 2px var(--paper); }
@media (max-width: 61.99em) { .masthead::before { opacity: .5; background-position: 70% 0; background-size: auto 75%; } }
