:root{
  --teal:#008491; --teal-dark:#006174; --ink:#0a2e3f; --slate:#475569;
  --muted:#64748b; --line:#e2e8f0; --bg:#f6f8f9; --card:#ffffff; --maxw:880px;
}
*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  line-height:1.6; font-size:17px;}
a{color:var(--teal-dark);}
img{max-width:100%; height:auto; display:block;}

/* Top app bar — matches the Our Council / van-scan header: brand van on the
   left, notification bell + Kirklees Council logo on the right, teal band
   with a rounded white lip into the content. */
.header{background:var(--teal-dark,#006174); padding:calc(16px + env(safe-area-inset-top,0px)) 20px 24px; position:relative;}
.header::after{content:''; position:absolute; bottom:-16px; left:0; right:0; height:32px;
  background:var(--bg,#f6f8f9); border-radius:24px 24px 0 0; z-index:0;}
.header-content{max-width:var(--maxw); margin:0 auto; display:flex; align-items:center;
  justify-content:space-between; gap:12px; position:relative; z-index:1;}
.header-title{display:flex; align-items:center; gap:8px; min-width:0;}
.app-name-img{display:block; height:56px; width:auto; max-width:220px; object-fit:contain;}
.header-actions{display:flex; align-items:center; gap:12px;}
.notification-bell{position:relative; background:rgba(255,255,255,0.1); border:none; border-radius:50%;
  width:40px; height:40px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0;}
.notification-bell svg{width:22px; height:22px; fill:#fff;}
.header-logo{width:120px; height:auto; flex-shrink:0;}

/* Page intro under the bar */
.pagehead{max-width:var(--maxw); margin:0 auto; padding:20px 20px 0;}
.pagehead h1{font-size:25px; letter-spacing:-0.02em; margin:0 0 8px;}
.pagehead .lead{margin:0; color:var(--slate); font-size:16px; max-width:62ch;}

@media (max-width:480px){
  .app-name-img{height:46px; max-width:150px;}
  .header-logo{width:94px;}
  .header-actions{gap:9px;}
}
.pagehead .eyebrow{font-size:12px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase;
  color:var(--teal); margin:0 0 6px;}

/* ===== Linktree-style stacked cards (Our Council palette) ===== */
.lt-main{max-width:var(--maxw); margin:0 auto; padding:10px 20px 60px;}
.lt-stack{display:flex; flex-direction:column; gap:12px;}
.lt-heading{font-size:12px; font-weight:700; letter-spacing:0.07em; text-transform:uppercase;
  color:var(--muted); margin:24px 2px 4px;}

.lt-card{background:var(--card); border:1px solid rgba(10,46,63,0.10); border-radius:16px;
  overflow:hidden; box-shadow:0 1px 2px rgba(15,23,42,0.04), 0 8px 20px rgba(15,23,42,0.05);}
.lt-row{width:100%; display:flex; align-items:center; gap:14px; padding:15px 16px; min-height:76px;
  background:none; border:none; text-align:left; font-family:inherit; color:var(--ink); cursor:pointer;
  text-decoration:none; transition:background 0.15s;}
.lt-row:hover{background:#fafcfc;}
.lt-row:focus-visible{outline:3px solid var(--teal); outline-offset:-3px;}
.lt-ico{width:46px; height:46px; border-radius:12px; background:#e6f4f6; color:var(--teal-dark);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.lt-ico svg{width:24px; height:24px;}
.lt-txt{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.lt-focus{font-size:12px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; color:var(--teal);}
.lt-label{font-size:16.5px; font-weight:700; color:var(--ink); line-height:1.3;}
.lt-sub{font-size:13.5px; color:var(--muted);}
.lt-chev{flex-shrink:0; color:var(--muted); display:flex; align-items:center;}
.lt-chev svg{width:20px; height:20px; transition:transform 0.2s ease;}
.topic.open .lt-chev svg{transform:rotate(90deg);}
.topic.open{border-color:rgba(0,132,145,0.45);}

.lt-body{padding:14px 18px 18px; border-top:1px solid #eef2f3;}
.lt-body p{margin:0 0 12px; font-size:15px; color:var(--slate); line-height:1.6;}
.lt-body p:last-child{margin-bottom:0;}
.lt-body ul{margin:0 0 12px; padding-left:20px;}
.lt-body li{margin:0 0 7px; font-size:15px; color:var(--slate); line-height:1.55;}
.lt-body li:last-child{margin-bottom:0;}

/* "NEW" badge on a topic card + the featured what's-new banner */
.lt-metarow{display:flex; align-items:center; gap:8px;}
.lt-badge{font-size:10.5px; font-weight:800; letter-spacing:0.06em; color:#0a2e3f; background:#FFCB05;
  border-radius:999px; padding:2px 7px; line-height:1.4;}

.lt-newbanner{display:flex; align-items:center; gap:13px; position:relative; overflow:hidden;
  background:linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 60%, var(--ink) 100%);
  color:#fff; text-decoration:none; border-radius:16px; padding:15px 16px 15px 20px; min-height:72px;
  margin-bottom:16px; box-shadow:0 6px 16px rgba(0,64,75,0.22);}
.nb-rule{position:absolute; left:0; top:0; bottom:0; width:5px; background:#FFCB05;}
.nb-chip{background:#FFCB05; color:#0a2e3f; font-size:11px; font-weight:800; letter-spacing:0.06em;
  border-radius:6px; padding:3px 8px; flex-shrink:0;}
.nb-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px;}
.nb-kicker{font-size:11px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:rgba(255,255,255,0.82);}
.nb-title{font-size:16.5px; font-weight:700; color:#fff; line-height:1.25;}
.nb-sub{font-size:13px; color:rgba(255,255,255,0.82); line-height:1.3; margin-top:1px;}
.nb-chev{color:rgba(255,255,255,0.9); display:flex; flex-shrink:0;}
.nb-chev svg{width:20px; height:20px; transition:transform 0.2s ease;}
.lt-newbanner:hover .nb-chev svg{transform:translateX(3px);}

main{max-width:var(--maxw); margin:0 auto; padding:26px 20px 64px;}
section{margin:0 0 36px;}
h2{font-size:14px; text-transform:uppercase; letter-spacing:0.08em; color:var(--teal-dark);
   margin:0 0 14px; display:flex; align-items:center; gap:9px;}
h2::before{content:""; width:18px; height:3px; border-radius:2px; background:var(--teal); display:inline-block;}

.news{display:grid; gap:14px;}
.card{background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden;
  box-shadow:0 2px 10px rgba(15,23,42,0.04);}
.card .pad{padding:16px 18px 18px;}
.card .date{font-size:12px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:0.05em;}
.card h3{margin:5px 0 8px; font-size:19px; letter-spacing:-0.01em;}
.card p{margin:0 0 10px; color:var(--slate); font-size:15.5px; white-space:pre-wrap;}
.card p:last-child{margin-bottom:0;}
.card img.banner{width:100%; aspect-ratio:16/7; object-fit:cover; background:#dfe7ea;}

.prose{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px 20px 6px;}
.prose p{margin:0 0 16px; color:var(--slate); font-size:16px; white-space:pre-wrap;}
.figure{margin:0 0 8px; border-radius:14px; overflow:hidden; border:1px solid var(--line);}
.figure img{width:100%; aspect-ratio:16/9; object-fit:cover;}
.figure figcaption{font-size:13px; color:var(--muted); padding:9px 14px; background:var(--card);}

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

.links{display:grid; gap:10px;}
.linkrow{display:flex; align-items:center; gap:13px; background:var(--card); border:1px solid var(--line);
  border-radius:12px; padding:14px 16px; text-decoration:none; color:var(--ink); font-weight:600;
  transition:border-color .15s, transform .05s;}
.linkrow:hover{border-color:var(--teal);}
.linkrow:active{transform:scale(0.99);}
.linkrow .ico{width:34px; height:34px; border-radius:9px; background:#e6f4f6; color:var(--teal-dark);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.linkrow .arrow{margin-left:auto; color:var(--muted);}
.linkrow small{display:block; font-weight:400; color:var(--muted); font-size:13.5px;}

footer{max-width:var(--maxw); margin:0 auto; padding:24px 20px 48px; color:var(--muted); font-size:13.5px;
  border-top:1px solid var(--line);}
footer a{color:var(--teal-dark);}

/* ---- Admin editor ---- */
.admin-wrap{max-width:760px; margin:0 auto; padding:24px 20px 80px;}
.panel{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px; margin:0 0 20px;}
.field{margin:0 0 16px;}
label.lbl{display:block; font-size:13px; font-weight:700; color:var(--slate); margin:0 0 6px;}
input[type=text], input[type=url], input[type=password], textarea, input[type=date]{
  width:100%; padding:11px 13px; font-size:15px; border:1px solid var(--line); border-radius:9px;
  font-family:inherit; color:var(--ink); background:#fff;}
textarea{min-height:110px; resize:vertical;}
.btn{display:inline-flex; align-items:center; gap:8px; background:var(--teal); color:#fff; border:none;
  padding:12px 18px; font-size:15px; font-weight:600; border-radius:10px; cursor:pointer; font-family:inherit;}
.btn:active{transform:scale(0.98);}
.btn.secondary{background:#eef2f4; color:var(--ink);}
.btn.danger{background:#fff; color:#b91c1c; border:1px solid #fecaca; padding:8px 12px; font-size:13px;}
.btn.small{padding:9px 13px; font-size:13.5px;}
.row{border:1px dashed var(--line); border-radius:12px; padding:14px; margin:0 0 12px; background:#fbfcfd;}
.row .rowhead{display:flex; justify-content:space-between; align-items:center; margin:0 0 10px;}
.muted{color:var(--muted); font-size:13.5px;}
.toolbar{position:sticky; bottom:0; background:rgba(246,248,249,0.95); backdrop-filter:blur(6px);
  padding:14px 0; display:flex; gap:10px; align-items:center; border-top:1px solid var(--line);}
.thumb{margin-top:8px; max-height:90px; border-radius:8px; border:1px solid var(--line);}
.note{background:#ecfdf5; border:1px solid #a7f3d0; color:#065f46; border-radius:10px; padding:10px 14px; font-size:14px;}
.note.err{background:#fef2f2; border-color:#fecaca; color:#991b1b;}
.hidden{display:none !important;}
