/* New Parking Laws UK - a modern take on the original BlogEngine "NplStandard" look:
   dark tarmac, a double-yellow-line header, orange category headings and yellow page titles. */

:root {
    --yellow: #e5c54c;
    --orange: #f38f36;
    --ink: #161616;
    --text: #2e2e2e;
    --muted: #666;
    --link: #1257b8;
    --panel: #3d3d3d;
    --panel-head: #262626;
    --panel-link: #d8d8d8;
    --nav: #262626;
    --radius: 6px;
    --sidebar-width: 260px;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: #3a3a3a url("../images/tarmac_dark2.jpg") repeat fixed;
}

a { color: var(--link); }
a:hover { color: #0b3d82; }
img { max-width: 100%; height: auto; }

.skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 100;
    padding: 8px 14px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 700;
    border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

/* Page layout: sidebar on the left, header and content on the right, footer across both */
.site {
    max-width: 1600px;
    margin: 0 auto;
    padding: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "foot";
}
.main-col { grid-area: main; min-width: 0; background: #fff; border-radius: var(--radius); overflow: hidden; }
.sidebar { grid-area: side; }
.site-footer { grid-area: foot; }

@media (min-width: 992px) {
    .site {
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
        grid-template-areas: "side main" "foot foot";
        align-items: start;
    }
}

/* Header: the original double yellow lines photo */
.masthead {
    position: relative;
    height: 110px;
    padding: 10px 14px;
    background: #4a4a4a url("../images/double_yellow_lines.jpg") repeat-x left center / auto 100%;
    border-bottom: 1px solid #111;
    color: #fff;
    text-shadow: 1px 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.8);
}
.masthead-title {
    color: #fff;
    text-decoration: none;
    font-size: clamp(1.6rem, 5vw, 2.3rem);
    font-weight: 700;
    line-height: 1.1;
}
.masthead-title:hover { color: #fff; }
.masthead-strap {
    position: absolute;
    right: 14px;
    bottom: 6px;
    left: 14px;
    text-align: right;
    font-size: 0.9rem;
}
@media (min-width: 768px) {
    .masthead { height: 150px; background-size: auto; }
    .masthead-strap { font-size: 1rem; }
}

/* Top navigation bar */
.topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 6px 10px;
    background: var(--nav);
}
.topnav-links { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.topnav-links a {
    display: block;
    padding: 8px 12px;
    color: #ddd;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}
.topnav-links a:hover { color: #fff; border-bottom-color: #777; }
.topnav-links a[aria-current="page"] { color: var(--yellow); border-bottom-color: var(--yellow); }

.menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font: inherit;
    color: var(--ink);
    background: var(--yellow);
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
}
.menu-button-bars, .menu-button-bars::before, .menu-button-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    content: "";
}
.menu-button-bars { position: relative; }
.menu-button-bars::before { position: absolute; top: -6px; }
.menu-button-bars::after { position: absolute; top: 6px; }

.topnav-search { display: flex; flex: 1 1 220px; max-width: 340px; margin-left: auto; }
.topnav-search input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    font: inherit;
    color: #fff;
    background: #3a3a3a;
    border: 1px solid #5a5a5a;
    border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
}
.topnav-search input::placeholder { color: #aaa; }
.topnav-search button, .search-box button {
    padding: 7px 14px;
    font: inherit;
    font-weight: 600;
    color: var(--ink);
    background: var(--yellow);
    border: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}
.topnav-search button:hover, .search-box button:hover { background: #f0d35f; }

@media (max-width: 991.98px) {
    .topnav-links { order: 3; width: 100%; }
    .topnav-search { max-width: none; }
}
@media (min-width: 992px) {
    .menu-button { display: none; }
}

/* Content area, with the 300px ad column on wide screens */
.content-wrap { padding: 16px; }
@media (min-width: 768px) { .content-wrap { padding: 20px 24px; } }
@media (min-width: 1200px) {
    .content-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
}

.page-title {
    margin: 0 0 18px;
    padding: 6px 12px;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.3;
    font-weight: 700;
    color: var(--ink);
    background: var(--yellow);
    border: 2px solid var(--ink);
}

.article { min-width: 0; }
.article > p, .article > ul { margin: 0 0 1em; }
.article ul { padding-left: 1.4em; }
.article li { margin-bottom: 0.35em; }

.article-img {
    float: left;
    margin: 4px 20px 12px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}
@media (max-width: 575.98px) {
    .article-img { float: none; display: block; margin: 0 auto 14px; }
}

.note, .review-note {
    clear: both;
    margin: 1.4em 0 0;
    padding: 10px 14px;
    font-size: 0.92rem;
    color: #5a4a0c;
    background: #fdf6d8;
    border-left: 4px solid var(--yellow);
}
.review-note { clear: none; margin: 0 0 1.2em; }
/* The short check date beside the topic tags, and the full one at the end of the page */
.law-checked { align-self: center; font-size: 0.85rem; color: #666; }
.law-checked-note { clear: both; margin: 2em 0 0; padding-top: 10px; font-size: 0.85rem; color: #666; border-top: 1px solid #e3e3e3; }

/* Topic tags under the page title */
.article-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.topic-tag {
    display: inline-block;
    padding: 1px 10px;
    font-size: 0.85rem;
    color: #fff;
    text-decoration: none;
    background: #555;
    border-radius: 3px;
}
a.topic-tag:hover { color: #fff; background: #333; }

/* Article text */
.article h2 { margin: 1.4em 0 0.5em; font-size: 1.35rem; line-height: 1.3; color: var(--ink); }
.article h3 { margin: 1.3em 0 0.4em; font-size: 1.15rem; color: var(--ink); }
.article h4, .article h5 { margin: 1.1em 0 0.3em; font-size: 1rem; color: var(--ink); }
.article ol { padding-left: 1.6em; }
.article li > ul, .article li > ol { margin-top: 0.35em; }
.post-img { display: block; margin: 10px auto 14px; }

/* Examples of signs and lines, as in the original posts */
.sign-examples {
    clear: both;
    margin: 1.4em 0;
    padding: 4px 18px 10px;
    text-align: center;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: var(--radius);
}
.sign-examples h4 { margin-top: 0.9em; font-size: 1.1rem; }
.sign-examples h5 { margin: 1em 0 0; font-weight: 600; color: var(--muted); }

/* Tables (contravention codes) */
.table-wrap { overflow-x: auto; margin: 0 0 1em; }
.article table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.article th, .article td { padding: 6px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #e0e0e0; }
.article th { color: var(--ink); background: #f2f2f2; border-bottom: 2px solid var(--ink); }
.article tbody tr:nth-child(even) { background: #fafafa; }

/* "More in this category" list */
.related {
    clear: both;
    margin: 2em 0 0;
    padding: 12px 16px;
    background: #f6f6f6;
    border-top: 3px solid var(--yellow);
}
.related h2 { margin: 0 0 0.4em; font-size: 1.1rem; }
.related ul { margin: 0; padding-left: 1.2em; }

/* Lists of pages on section, category and page-list pages */
.topic-list { margin: 0 0 1.6em; padding: 0; list-style: none; }
.topic-list > li { padding: 10px 0; border-top: 1px solid #e3e3e3; }
.topic-list > li > a { font-size: 1.08rem; font-weight: 600; }
.topic-list p { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.section-intro { font-size: 1.05rem; }

/* Ad slots, filled by assets/js/ads.js (same sizes and widths as the old site) */
.ad-column { display: none; }
@media (min-width: 1200px) { .ad-column { display: block; } }
.ad-column .adslot { width: 300px; margin-bottom: 20px; }

.adslot336x280 { display: none; float: right; width: 336px; height: 280px; margin: 0 0 16px 20px; }
.adslot336x280--block { float: none; clear: both; margin: 20px auto 0; }
@media (min-width: 992px) and (max-width: 1199.98px) { .adslot336x280 { display: block; } }

.adslot300x250-row { display: none; clear: both; margin: 20px 0 0; text-align: center; }
@media (min-width: 768px) and (max-width: 991.98px) { .adslot300x250-row { display: block; } }

/* Sidebar: grey panels with orange group headings */
.panel { margin-bottom: 10px; background: var(--panel); border-radius: var(--radius); overflow: hidden; color: var(--panel-link); }
.panel-head {
    margin: 0;
    padding: 10px 14px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--panel-head);
}
.panel-body { padding: 8px 14px 12px; }
.group-head { margin: 12px 0 4px; font-size: 1.12rem; font-weight: 700; color: var(--orange); }
.group-head:first-child { margin-top: 4px; }
.panel .group-head a { color: var(--orange); }
.panel .group-head a:hover { color: #ffb066; }
.panel a[aria-current="page"] { padding: 2px 8px; margin-left: -8px; color: var(--ink); background: var(--yellow); border-radius: 3px; }
.panel .group-head a[aria-current="page"] { color: var(--ink); }
.panel a[aria-current="page"] .count { color: #5a4a0c; }
.panel ul { margin: 0; padding: 0; list-style: none; }
.panel li { margin: 2px 0; }
.panel a { display: inline-block; padding: 2px 0; color: var(--panel-link); text-decoration: none; line-height: 1.35; }
.panel a:hover { color: #fff; text-decoration: underline; }
.panel .count { color: #9a9a9a; font-size: 0.85em; }

/* Below 992px the sidebar becomes a slide-in menu */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(86vw, 320px);
        padding: 10px;
        overflow-y: auto;
        background: #2f2f2f url("../images/tarmac_dark2.jpg");
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        visibility: hidden;
    }
    .menu-open .sidebar { transform: none; visibility: visible; }
    .backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); }
    .menu-open { overflow: hidden; }
}
@media (min-width: 992px) { .backdrop { display: none !important; } }

/* Footer: the original yellow line strip */
.site-footer {
    padding: 8px 14px;
    text-align: center;
    font-weight: 700;
    color: var(--ink);
    background: var(--yellow) url("../images/yellow_line_h.jpg") repeat;
    border: 1px solid #000;
    border-radius: var(--radius);
}
.site-footer a { color: var(--ink); }
.site-footer p { margin: 0; }

/* Search page */
.search-box { display: flex; max-width: 640px; margin: 0 0 10px; }
.search-box input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font: inherit;
    font-size: 1.05rem;
    border: 2px solid var(--ink);
    border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
}
.search-box input:focus { outline: 3px solid var(--yellow); outline-offset: 0; }
.search-box button { padding: 10px 18px; border: 2px solid var(--ink); }

.search-status { min-height: 1.6em; margin: 0 0 10px; color: var(--muted); }
.search-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.search-filters button {
    padding: 4px 10px;
    font: inherit;
    font-size: 0.88rem;
    color: var(--text);
    background: #f2f2f2;
    border: 1px solid #ccc;
    border-radius: 999px;
    cursor: pointer;
}
.search-filters button[aria-pressed="true"] { color: var(--ink); background: var(--yellow); border-color: var(--ink); font-weight: 600; }

.search-results { margin: 0; padding: 0; list-style: none; }
.search-results li { padding: 12px 0; border-top: 1px solid #e3e3e3; }
.result-title { font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.result-title:hover { text-decoration: underline; }
.result-meta { display: block; margin-top: 2px; font-size: 0.85rem; color: var(--muted); }
.result-cat { display: inline-block; padding: 0 8px; margin-right: 6px; color: #fff; background: #555; border-radius: 3px; }
.result-excerpt { margin: 6px 0 0; font-size: 0.95rem; }
.result-excerpt mark { padding: 0 2px; color: inherit; background: #f7e7a1; border-radius: 2px; }

/* Councils page */
.enforcement-note { margin: 1.4em 0; padding: 4px 18px 8px; background: #f6f6f6; border-left: 4px solid var(--yellow); }
.enforcement-note h2 { margin-top: 0.6em; }
.small-print { font-size: 0.88rem; color: var(--muted); }
.az-links { display: flex; flex-wrap: wrap; gap: 4px; margin: 1.2em 0; }
.az-links a {
    min-width: 2.1em;
    padding: 3px 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    color: var(--ink);
    background: var(--yellow);
    border: 1px solid var(--ink);
    border-radius: 3px;
}
.az-links a:hover { background: #f0d35f; }
.az-letter { margin: 1.2em 0 0.3em; padding-bottom: 2px; border-bottom: 2px solid var(--yellow); scroll-margin-top: 10px; }
.council-list { columns: 2 260px; column-gap: 28px; margin: 0; padding: 0; list-style: none; }
.council-list li { break-inside: avoid; padding: 3px 0; }

/* Contact form */
.contact-form { max-width: 640px; margin-top: 1.4em; }
.contact-form .field { margin: 0 0 14px; }
.contact-form label { display: block; margin-bottom: 4px; font-weight: 600; color: var(--ink); }
.contact-form .optional { font-weight: 400; color: var(--muted); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
    width: 100%;
    padding: 9px 11px;
    font: inherit;
    border: 2px solid #999;
    border-radius: var(--radius);
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--ink); outline: 3px solid var(--yellow); outline-offset: 0; }
.contact-form textarea { resize: vertical; min-height: 9em; }
/* The field people never see: off screen rather than display:none, so bots still fill it in */
.contact-form .field-website { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.button {
    padding: 10px 20px;
    font: inherit;
    font-weight: 600;
    color: var(--ink);
    background: var(--yellow);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    cursor: pointer;
}
.button:hover { background: #f0d35f; }
.button:disabled { opacity: 0.6; cursor: wait; }
.form-problem { padding: 10px 14px; color: #7a1d1d; background: #fde8e8; border-left: 4px solid #c43c3c; }
.form-sent { margin-top: 1.4em; padding: 4px 18px 10px; background: #eef7ea; border-left: 4px solid #3f8f3a; }
.form-sent h2 { margin-top: 0.6em; }
.search-tips { margin-top: 18px; color: var(--muted); font-size: 0.92rem; }
