/* RefDat Postcodes — Minimal CSS */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#ffffff;--bg-alt:#f7f8fa;--text:#1a1a2e;--text-muted:#5a6072;
  --primary:#1a56db;--primary-hover:#1141b0;--border:#e2e5ea;
  --radius:6px;--max-w:960px;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --accent:#e8f0fe;--green:#059669;--green-bg:#ecfdf5;
}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{font-family:var(--font);color:var(--text);background:var(--bg);line-height:1.6}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline;color:var(--primary-hover)}

/* Layout */
.wrap{max-width:var(--max-w);margin:0 auto;padding:0 1rem}
header{background:var(--bg);border-bottom:1px solid var(--border);padding:.75rem 0}
header .wrap{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.logo{font-size:1.25rem;font-weight:700;color:var(--text);text-decoration:none}
.logo span{color:var(--primary)}
nav a{color:var(--text-muted);font-size:.875rem;margin-left:1.25rem}
nav a:hover{color:var(--primary)}
main{padding:1.5rem 0 3rem}
footer{background:var(--bg-alt);border-top:1px solid var(--border);padding:1.5rem 0;font-size:.8rem;color:var(--text-muted)}
footer .wrap{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem}
footer a{color:var(--text-muted)}

/* Breadcrumbs */
.breadcrumbs{font-size:.8rem;color:var(--text-muted);margin-bottom:1.25rem;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:.25rem}
.breadcrumbs li::after{content:"›";margin-left:.35rem;color:var(--border)}
.breadcrumbs li:last-child::after{content:""}
.breadcrumbs a{color:var(--text-muted)}

/* Headings */
h1{font-size:1.75rem;font-weight:700;margin-bottom:.5rem;line-height:1.25}
h2{font-size:1.25rem;font-weight:600;margin:1.75rem 0 .75rem;color:var(--text)}
h3{font-size:1rem;font-weight:600;margin:1.25rem 0 .5rem}
.subtitle{color:var(--text-muted);font-size:1rem;margin-bottom:1.25rem}

/* Postcode highlight box */
.postcode-box{background:var(--accent);border-radius:var(--radius);padding:1.25rem 1.5rem;margin-bottom:1.5rem;display:flex;align-items:center;gap:1.25rem;flex-wrap:wrap}
.postcode-big{font-size:2.5rem;font-weight:800;color:var(--primary);line-height:1}
.postcode-meta{font-size:.9rem;color:var(--text-muted);line-height:1.6}

/* Data table */
.data-table{width:100%;border-collapse:collapse;margin-bottom:1.5rem;font-size:.9rem}
.data-table th{text-align:left;padding:.6rem .75rem;background:var(--bg-alt);border-bottom:2px solid var(--border);font-weight:600;color:var(--text-muted);font-size:.8rem;text-transform:uppercase;letter-spacing:.03em}
.data-table td{padding:.6rem .75rem;border-bottom:1px solid var(--border)}
.data-table tr:last-child td{border-bottom:none}
.data-table td:first-child{font-weight:500;color:var(--text-muted);width:40%}

/* Link grid */
.link-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.5rem;margin-bottom:1.5rem}
.link-grid a{display:block;padding:.6rem .75rem;background:var(--bg-alt);border-radius:var(--radius);font-size:.9rem;border:1px solid var(--border);transition:border-color .15s}
.link-grid a:hover{border-color:var(--primary);text-decoration:none}
.link-grid a .pc{float:right;color:var(--text-muted);font-size:.8rem}

/* State cards */
.state-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.75rem;margin-bottom:1.5rem}
.state-card{display:block;padding:1rem 1.25rem;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);transition:border-color .15s,box-shadow .15s}
.state-card:hover{border-color:var(--primary);box-shadow:0 2px 8px rgba(26,86,219,.08);text-decoration:none}
.state-card strong{display:block;font-size:1rem;color:var(--text)}
.state-card span{font-size:.8rem;color:var(--text-muted)}

/* Search */
.search-box{margin-bottom:1.5rem;position:relative}
.search-box input{width:100%;padding:.75rem 1rem;font-size:1rem;border:2px solid var(--border);border-radius:var(--radius);font-family:var(--font);transition:border-color .15s}
.search-box input:focus{outline:none;border-color:var(--primary)}
#search-results{position:absolute;top:100%;left:0;right:0;background:var(--bg);border:1px solid var(--border);border-top:none;border-radius:0 0 var(--radius) var(--radius);max-height:300px;overflow-y:auto;display:none;z-index:100;box-shadow:0 4px 12px rgba(0,0,0,.1)}
#search-results a{display:block;padding:.5rem 1rem;font-size:.9rem;border-bottom:1px solid var(--border)}
#search-results a:hover{background:var(--accent);text-decoration:none}

/* Content prose */
.prose{margin-bottom:1.5rem;font-size:.95rem;line-height:1.7;color:var(--text)}
.prose p{margin-bottom:.75rem}

/* Ad slots */
.ad-slot{text-align:center;margin:1.5rem 0;min-height:90px}
.ad-slot-inline{margin:1rem 0}
.ad-slot-sidebar{margin-bottom:1.5rem}

/* Two-col layout for desktop */
@media(min-width:768px){
  .two-col{display:grid;grid-template-columns:1fr 300px;gap:1.5rem}
}

/* Mobile */
@media(max-width:600px){
  h1{font-size:1.35rem}
  .postcode-big{font-size:2rem}
  .link-grid{grid-template-columns:1fr 1fr}
  .state-grid{grid-template-columns:1fr}
  header .wrap{flex-direction:column;align-items:flex-start}
  nav{margin-top:.25rem}
  nav a{margin-left:0;margin-right:1rem}
}
