: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;}

/* ===== Van Scan app (Sep 2026): news feed, articles, pages, alerts ===== */
.back{display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,0.12); color:#fff; transform:rotate(180deg); flex-shrink:0;}
.back svg{width:20px; height:20px;}
.header-title a{display:block;}

.appbar{display:flex; flex-direction:column; gap:10px; margin:0 0 16px;}
.appbar-row{display:flex; align-items:center; justify-content:space-between; gap:12px; background:#fff;
  border:1px solid rgba(0,132,145,0.35); border-radius:14px; padding:12px 14px; font-size:14.5px; line-height:1.4;}
.appbar-row .btn{flex-shrink:0;}
.appbar-row.ok-row{border-color:#a7f3d0; background:#f0fdf4; color:#065f46;}
.appbar-row.muted-row{border-color:var(--line); color:var(--slate);}

.news-card{display:flex; align-items:center; gap:14px; background:var(--card); border:1px solid rgba(10,46,63,0.10);
  border-radius:16px; padding:14px 16px; text-decoration:none; color:var(--ink);
  box-shadow:0 1px 2px rgba(15,23,42,0.04), 0 8px 20px rgba(15,23,42,0.05);}
.news-card:hover{background:#fafcfc;}
.news-card:focus-visible{outline:3px solid var(--teal); outline-offset:2px;}
.news-thumb{width:64px; height:64px; border-radius:12px; object-fit:cover; flex-shrink:0; background:#dfe7ea;}
.news-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px;}
.news-meta{display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px;}
.news-date{font-size:12.5px; color:var(--muted);}
.news-title{font-size:16.5px; font-weight:700; line-height:1.3;}
.news-summary{font-size:14px; color:var(--slate); line-height:1.45;}
.chip{display:inline-block; font-size:11.5px; font-weight:700; letter-spacing:0.03em; color:var(--teal-dark);
  background:#e6f4f6; border-radius:999px; padding:2px 9px; text-decoration:none;}
.chips{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px;}
.chips .chip{padding:6px 12px; font-size:13px;}
.chips .chip.on{background:var(--teal-dark); color:#fff;}
.more{margin:20px 0 0; text-align:center;}
.muted{color:var(--muted);}

.article{max-width:720px; margin:0 auto; padding:20px 20px 48px;}
.article h1{font-size:26px; line-height:1.25; letter-spacing:-0.02em; margin:10px 0 10px;}
.article .lead{font-size:17px; color:var(--slate); margin:0 0 18px;}
.article-img{width:100%; border-radius:14px; margin:0 0 20px; aspect-ratio:16/9; object-fit:cover;}
.prose-body{font-size:16.5px; line-height:1.65;}
.prose-body p{margin:0 0 16px;}
.prose-body h2{font-size:19px; text-transform:none; letter-spacing:0; color:var(--ink); margin:26px 0 10px; display:block;}
.prose-body h2::before{display:none;}
.prose-body ul{margin:0 0 16px; padding-left:22px;}
.prose-body li{margin:0 0 8px;}
.preview-bar{background:#fef3c7; color:#92400e; text-align:center; padding:10px 16px; font-size:14px; font-weight:600;}

.gate{text-align:center; padding-top:40px;}
.gate-card{background:#fff; border:1px solid var(--line); border-radius:18px; padding:32px 24px; max-width:420px; margin:0 auto;}
.gate-card h1{margin:12px 0 8px;}
.lt-ico.big{width:64px; height:64px; margin:0 auto;}
.lt-ico.big svg{width:34px; height:34px;}

/* ===== Editor ===== */
body.admin{font-size:15.5px;}
.admin-wrap.narrow{max-width:460px;}
.admin-top{max-width:980px; margin:0 auto; padding:14px 20px 0; display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between;}
.tabs{display:flex; flex-wrap:wrap; gap:4px; background:rgba(0,64,75,0.06); padding:4px; border-radius:12px;}
.tabs button{border:0; background:none; font:inherit; font-weight:600; font-size:14px; color:var(--slate); padding:8px 13px; border-radius:9px; cursor:pointer;}
.tabs button.on{background:#fff; color:var(--teal-dark); box-shadow:0 1px 3px rgba(0,0,0,0.08);}
.whoami{font-size:13px; color:var(--muted);}
body.admin .admin-wrap{max-width:980px;}
.admin-h1{font-size:22px; margin:0 0 12px;}
.admin-h2{font-size:16px; text-transform:none; letter-spacing:0; color:var(--ink); margin:26px 0 10px; display:block;}
.admin-h2::before{display:none;}
.bar{display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px;}
.panel.flush{padding:0; overflow:hidden;}
.tbl{width:100%; border-collapse:collapse; font-size:14.5px;}
.tbl th{text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); padding:10px 14px; border-bottom:1px solid var(--line); background:#fafbfc;}
.tbl td{padding:12px 14px; border-bottom:1px solid #f0f3f5; vertical-align:top;}
.tbl tr:last-child td{border-bottom:0;}
.tbl .num{text-align:right; white-space:nowrap;}
.tbl a{text-decoration:none;}
.nowrap{white-space:nowrap;}
.pill{display:inline-block; font-size:11.5px; font-weight:700; border-radius:999px; padding:2px 9px; vertical-align:middle;}
.pill.live{background:#dcfce7; color:#166534;}
.pill.draft{background:#f1f5f9; color:#475569;}
.pill.pin{background:#FFCB05; color:#0a2e3f;}
.check{display:flex; gap:10px; align-items:flex-start; margin:0 0 12px; font-size:14.5px; cursor:pointer;}
.check input{margin-top:4px; width:18px; height:18px; accent-color:var(--teal);}
.fmt{display:flex; flex-wrap:wrap; gap:6px; margin:0 0 6px;}
.fmt button{border:1px solid var(--line); background:#fff; border-radius:8px; padding:5px 10px; font:inherit; font-size:13px; cursor:pointer;}
.help{font-size:13.5px; color:var(--slate); margin-top:6px;}
.help summary{cursor:pointer; color:var(--teal-dark);}
.help code, .danger-zone code{background:#f1f5f9; padding:1px 5px; border-radius:4px;}
input[type=email], select{width:100%; padding:11px 13px; font-size:15px; border:1px solid var(--line); border-radius:9px; font-family:inherit; color:var(--ink); background:#fff;}
.row2{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.file{cursor:pointer;}
.btn.wide{width:100%; justify-content:center;}
.btn[disabled]{opacity:0.6;}
a.btn{text-decoration:none;}
.code-input{font-size:28px !important; letter-spacing:8px; text-align:center;}
.stats{display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:12px; margin:0 0 12px;}
.stat{background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px;}
.stat strong{display:block; font-size:30px; color:var(--teal-dark); line-height:1.1;}
.stat span{font-size:13.5px; color:var(--slate);}
.big-number{font-size:17px;}
.big-number strong{font-size:24px; color:var(--teal-dark);}
.copy{display:flex; gap:8px;}
.copy input{flex:1; font-size:13px;}
.danger-zone{margin-top:14px; border-top:1px solid var(--line); padding-top:12px;}
.danger-zone summary{cursor:pointer; color:#b91c1c; font-weight:600;}
.toast{position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:var(--ink); color:#fff; padding:12px 18px;
  border-radius:12px; font-size:14.5px; box-shadow:0 8px 24px rgba(0,0,0,0.2); z-index:50; max-width:92vw;}
.toast.bad{background:#b91c1c;}
@media (max-width:640px){ .row2{grid-template-columns:1fr;} .toolbar{flex-wrap:wrap;} }

/* Rich text editor (admin) */
.rte{border:1px solid var(--line); border-radius:10px; background:#fff; overflow:hidden;}
.rte:focus-within{border-color:var(--teal); box-shadow:0 0 0 3px rgba(0,132,145,0.15);}
.rte-bar{display:flex; flex-wrap:wrap; gap:4px; padding:6px; border-bottom:1px solid var(--line); background:#f8fafb; position:sticky; top:0; z-index:2;}
.rte-bar button{display:inline-flex; align-items:center; gap:6px; border:1px solid transparent; background:none; border-radius:8px; padding:7px 11px; font:inherit; font-size:14px; font-weight:600; color:var(--ink); cursor:pointer;}
.rte-bar button svg{width:18px; height:18px;}
.rte-bar button:hover{background:#eef2f4;}
.rte-bar button.on{background:#e6f4f6; border-color:rgba(0,132,145,0.4); color:var(--teal-dark);}
.rte-link{display:flex; flex-wrap:wrap; gap:8px; padding:8px; border-bottom:1px solid var(--line); background:#f0f9fa;}
.rte-link input{flex:1; min-width:200px;}
.rte-area{min-height:260px; padding:14px 16px; font-size:16px; line-height:1.6; outline:none;}
.rte-area p{margin:0 0 12px;}
.rte-area h2,.rte-area h1,.rte-area h3{font-size:19px; margin:18px 0 8px; text-transform:none; letter-spacing:0; color:var(--ink); display:block;}
.rte-area h2::before{display:none;}
.rte-area ul{margin:0 0 12px; padding-left:22px;}
.rte-area li{margin:0 0 6px;}
.rte-area a{color:var(--teal-dark); text-decoration:underline;}
.rte-hint{margin:0; padding:8px 12px; border-top:1px solid var(--line); font-size:13px;}

/* ===== Home and feed, modelled on the Our Council App ===== */
.section-title{font-size:13px; font-weight:700; letter-spacing:0.07em; text-transform:uppercase; color:var(--muted);
  margin:26px 2px 10px; display:block;}
.section-title::before{display:none;}

.hero-card{display:block; background:#fff; border-radius:18px; overflow:hidden; text-decoration:none; color:var(--ink);
  box-shadow:0 1px 2px rgba(15,23,42,0.05), 0 10px 26px rgba(15,23,42,0.08); margin-top:6px;}
.hero-img{display:block; width:100%; aspect-ratio:16/8; object-fit:cover; background:#dfe7ea;}
.hero-plain{display:flex; align-items:center; justify-content:center; aspect-ratio:16/6;
  background:linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 70%, var(--ink) 100%); color:rgba(255,255,255,0.9);}
.hero-plain svg{width:56px; height:56px;}
.hero-body{display:flex; flex-direction:column; gap:6px; padding:16px 18px 18px;}
.hero-meta{display:flex; flex-wrap:wrap; align-items:center; gap:8px;}
.hero-label{font-size:11px; font-weight:800; letter-spacing:0.06em; text-transform:uppercase; color:#fff; background:var(--teal-dark); border-radius:6px; padding:3px 8px;}
.hero-label.must{background:#FFCB05; color:#0a2e3f;}
.hero-title{font-size:21px; font-weight:800; line-height:1.25; letter-spacing:-0.01em;}
.hero-text{font-size:15px; color:var(--slate); line-height:1.5;}
.hero-foot{display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); margin-top:4px;}
.hero-read{display:inline-flex; align-items:center; gap:2px; font-weight:700; color:var(--teal-dark); font-size:14px;}
.hero-read svg{width:18px; height:18px;}

.badge{display:inline-block; color:#fff; font-size:10.5px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase;
  border-radius:6px; padding:3px 9px; line-height:1.4;}

.feed{background:#fff; 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);}
.feed-item{display:flex; gap:14px; padding:18px 18px; border-bottom:1px solid #eef2f4; text-decoration:none; color:var(--ink);}
.feed-item:last-child{border-bottom:0;}
.feed-item:active{background:#f6f8f9;}
.feed-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:4px;}
.feed-meta{display:flex; flex-wrap:wrap; gap:6px; align-items:center;}
.feed-meta:empty{display:none;}
.feed-title{font-size:16px; font-weight:700; line-height:1.35;}
.feed-excerpt{font-size:14px; color:var(--slate); line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.feed-time{font-size:12.5px; color:var(--muted);}
.feed-thumb{width:72px; height:72px; border-radius:12px; object-fit:cover; flex-shrink:0; align-self:center; background:#dfe7ea;}

.tiles{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.tile{display:flex; flex-direction:column; align-items:flex-start; gap:10px; background:#fff; border-radius:16px; padding:16px;
  text-decoration:none; color:var(--ink); box-shadow:0 1px 2px rgba(15,23,42,0.04), 0 8px 20px rgba(15,23,42,0.05);}
.tile:active{background:#f6f8f9;}
.tile-icon{width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0;}
.tile-icon svg{width:24px; height:24px;}
.tile-text{display:flex; flex-direction:column; gap:2px; min-width:0;}
.tile-title{font-size:15.5px; font-weight:700; line-height:1.3;}
.tile-sub{font-size:13px; color:var(--muted); line-height:1.4;}

.appbar{margin:28px 0 0;}

/* ===== Helpful pages, modelled on the app's Safety Centre ===== */
.page-hero{color:#fff; text-align:center; padding:26px 22px 60px; margin-top:-16px; position:relative;}
.page-hero-icon{display:inline-flex; width:64px; height:64px; border-radius:18px; background:rgba(255,255,255,0.18);
  align-items:center; justify-content:center; margin:10px 0 8px;}
.page-hero-icon svg{width:36px; height:36px; stroke:#fff;}
.page-hero h1{margin:0 0 6px; font-size:26px; letter-spacing:-0.02em;}
.page-hero p{margin:0 auto; max-width:34ch; font-size:16px; color:rgba(255,255,255,0.9);}
.page-main{margin-top:-40px; position:relative;}
.page-intro > * + *{margin-top:14px;}
.page-intro p{margin:0;}

.call-card{background:linear-gradient(135deg, #0f766e, #006174); color:#fff; border-radius:18px; padding:18px 18px 20px; text-align:center;
  box-shadow:0 10px 24px rgba(0,64,75,0.25);}
.call-card.urgent{background:linear-gradient(135deg, #e53e3e, #b91c1c); box-shadow:0 10px 24px rgba(185,28,28,0.3);}
.call-card p{margin:0 0 12px; font-size:16px; color:rgba(255,255,255,0.95);}
.call-btn{display:inline-flex; align-items:center; gap:10px; background:#fff; color:#b91c1c; text-decoration:none; font-weight:800;
  font-size:21px; border-radius:999px; padding:12px 30px;}
.call-card:not(.urgent) .call-btn{color:#006174;}
.call-btn svg{width:24px; height:24px;}

.folds{display:flex; flex-direction:column; gap:12px; margin-top:22px;}
.fold{background:#fff; border-radius:16px; box-shadow:0 1px 2px rgba(15,23,42,0.04), 0 8px 20px rgba(15,23,42,0.05); overflow:hidden;}
.fold summary{display:flex; align-items:center; gap:14px; padding:16px; cursor:pointer; list-style:none;}
.fold summary::-webkit-details-marker{display:none;}
.fold-icon{width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.fold-icon svg{width:24px; height:24px;}
.fold-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.fold-title{font-size:16.5px; font-weight:700;}
.fold-sub{font-size:14px; color:var(--muted);}
.fold-chev{color:var(--muted); display:flex;}
.fold-chev svg{width:20px; height:20px; transform:rotate(90deg); transition:transform 0.2s;}
.fold[open] .fold-chev svg{transform:rotate(-90deg);}
.fold-body{padding:0 18px 16px 18px; border-top:1px solid #eef2f4; padding-top:14px;}
.fold-body .tiles{margin:6px 0 10px;}
.fold-body .call-card{margin:6px 0 12px;}

/* Anything marked hidden stays hidden, whatever display rule it has. */
[hidden]{display:none !important;}

/* An odd tile out (one tile, or the last of three, five…) stretches across. */
.tiles > .tile:last-child:nth-child(odd){grid-column:1 / -1; flex-direction:row; align-items:center; gap:14px;}

.offline-bar{background:#fef3c7; color:#92400e; text-align:center; padding:9px 16px; font-size:14px; font-weight:600;}

/* Editor toolbar fits on one row on a phone. */
@media (max-width:480px){
  .rte-bar{display:grid; grid-template-columns:repeat(4, 1fr); gap:2px; padding:4px;}
  .rte-bar button{flex-direction:column; justify-content:center; gap:3px; padding:7px 2px; font-size:12px;}
  .rte-bar button svg{width:20px; height:20px;}
}
