/* Local Strategies — reuses the theme's :root palette (--gold, --ink, --radius …). */

/* ---------- news ticker (modelled on the notmyvote.com breaking bar) ---------- */
.ky-ticker{background:var(--ink);color:#f3f4f6;height:44px;display:flex;align-items:center;
  overflow:hidden;position:relative;border-bottom:3px solid var(--gold)}
.ky-ticker__inner{display:flex;align-items:center;gap:0;height:100%}
.ky-ticker__badge{flex-shrink:0;z-index:2;background:var(--gold);color:var(--ink);font-weight:800;
  font-size:.7rem;letter-spacing:.09em;padding:5px 12px;border-radius:5px;display:inline-flex;
  align-items:center;gap:6px;white-space:nowrap;margin-right:18px}
.ky-ticker__dot{animation:kyTickerPulse 2.4s ease-in-out infinite;display:inline-block}
@keyframes kyTickerPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.55;transform:scale(.88)}}
.ky-ticker__viewport{flex:1;min-width:0;overflow:hidden;height:100%;display:flex;align-items:center;
  mask-image:linear-gradient(to right,transparent 0,#000 24px,#000 calc(100% - 28px),transparent 100%);
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 24px,#000 calc(100% - 28px),transparent 100%)}
.ky-ticker__track{display:inline-flex;align-items:center;gap:30px;white-space:nowrap;
  will-change:transform;animation:kyMarquee var(--ky-ticker-duration,60s) linear infinite}
.ky-ticker__track:hover,.ky-ticker__track:focus-within{animation-play-state:paused}
@keyframes kyMarquee{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
.ky-ticker__item{display:inline-flex;align-items:center;gap:9px;text-decoration:none;font-size:.82rem;
  white-space:nowrap;flex-shrink:0;color:#d7dae0;transition:color .2s ease}
.ky-ticker__item:hover{color:#fff}
.ky-ticker__source{color:var(--gold);font-weight:700;font-size:.66rem;text-transform:uppercase;
  letter-spacing:.05em;background:rgba(250,166,26,.13);border:1px solid rgba(250,166,26,.3);
  padding:2px 7px;border-radius:3px;flex-shrink:0}
.ky-ticker__item:hover .ky-ticker__text{text-decoration:underline}
.ky-ticker__sep{color:#565c69;margin-left:10px}

/* ---------- topic cards ---------- */
.ky-topic-card{transition:transform .35s cubic-bezier(.2,.7,.3,1),box-shadow .35s ease}
.ky-topic-card:hover{transform:translateY(-8px);box-shadow:var(--shadow-lg)}
.ky-topic-card__media{position:relative;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#11203f,#0b4eb0);min-height:170px;overflow:hidden}
.ky-topic-card__media img{transition:transform .6s cubic-bezier(.2,.7,.3,1)}
.ky-topic-card:hover .ky-topic-card__media img{transform:scale(1.07)}
.ky-topic-card__glyph{font-family:var(--head);font-size:4rem;font-weight:800;color:rgba(255,255,255,.22);
  line-height:1;transition:transform .5s ease,color .3s ease}
.ky-topic-card:hover .ky-topic-card__glyph{transform:scale(1.14) rotate(-4deg);color:rgba(250,166,26,.55)}
.ky-topic-card__facts{list-style:none;margin:.5em 0 .9em;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.ky-topic-card__facts li{font-size:.74rem;color:var(--muted);background:var(--bg-alt);
  border:1px solid var(--line);border-radius:999px;padding:3px 10px}
.ky-topic-card__facts strong{color:var(--gold-deep)}

/* portrait-orientation photos must still fill the landscape card window */
.ky-topic-card__media img{width:100%;height:100%;min-height:170px;object-fit:cover;display:block}

/* ---------- image credits ---------- */
.ky-credits{margin:46px 0 0;padding:20px 22px;background:var(--bg-alt);border:1px solid var(--line);
  border-radius:var(--radius)}
.ky-credits__h{font-family:var(--head);font-size:1rem;margin:0 0 .5em;color:var(--ink-soft)}
.ky-credits__list{list-style:none;margin:0;padding:0;font-size:.82rem;color:var(--muted);
  display:grid;gap:5px}
.ky-credits__topic{font-weight:600;color:var(--ink-soft)}
.ky-credits a{color:var(--accent)}

/* ---------- blocks ---------- */
.ky-ls-block{margin:0 0 54px}
.ky-ls-h{font-family:var(--head);font-size:1.6rem;margin:0 0 .35em;position:relative;padding-left:16px}
.ky-ls-h::before{content:"";position:absolute;left:0;top:.18em;bottom:.18em;width:5px;
  border-radius:3px;background:var(--gold)}
.ky-ls-sub{color:var(--muted);margin:-.2em 0 1.1em;font-size:.95rem}
.ky-ls-ext{font-size:.75em;opacity:.6}
.ky-ls-review{background:#fff8e1;border:1px solid var(--gold);border-left:5px solid var(--gold);
  border-radius:var(--radius);padding:14px 18px;margin:22px 0 0;font-size:.92rem}

/* ---------- decisions timeline ---------- */
.ky-timeline{list-style:none;margin:0;padding:0 0 0 26px;position:relative}
.ky-timeline::before{content:"";position:absolute;left:6px;top:6px;bottom:6px;width:2px;
  background:linear-gradient(to bottom,var(--gold),var(--line))}
.ky-timeline__item{position:relative;padding:0 0 20px 14px}
.ky-timeline__item::before{content:"";position:absolute;left:-26px;top:7px;width:11px;height:11px;
  border-radius:50%;background:#fff;border:3px solid var(--gold);transition:transform .25s ease,box-shadow .25s ease}
.ky-timeline__item:hover::before{transform:scale(1.45);box-shadow:0 0 0 5px rgba(250,166,26,.22)}
.ky-timeline__when{display:block;font-size:.76rem;text-transform:uppercase;letter-spacing:.07em;
  font-weight:700;color:var(--gold-deep)}
.ky-timeline__what{display:block;font-size:1rem;color:var(--ink)}
.ky-timeline__what a{text-decoration:none;border-bottom:1px solid transparent;transition:border-color .2s ease}
.ky-timeline__what a:hover{border-bottom-color:var(--accent)}
.ky-timeline__ref{display:inline-block;margin-left:8px;padding:1px 7px;border-radius:999px;
  background:var(--bg-alt);border:1px solid var(--line);font-size:.7rem;font-weight:700;
  letter-spacing:.03em;color:var(--ink-soft);vertical-align:2px;white-space:nowrap}
.ky-timeline__gist{display:block;margin-top:5px;font-size:.9rem;color:var(--ink-soft);line-height:1.5;max-width:68ch}

/* ---------- the documents ---------- */
.ky-doc-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.ky-doc{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;background:var(--bg-alt);
  border:1px solid var(--line);border-left:4px solid var(--blue,#0b4eb0);border-radius:12px;
  padding:13px 16px;transition:transform .25s ease,box-shadow .25s ease,background .25s ease,border-color .25s ease}
.ky-doc:hover{transform:translateX(5px);box-shadow:var(--shadow);background:#fff;border-left-color:var(--gold)}
.ky-doc__t{font-weight:600;color:var(--ink);text-decoration:none;font-size:.98rem}
a.ky-doc__t{border-bottom:1px solid transparent;transition:border-color .2s ease}
a.ky-doc__t:hover{border-bottom-color:var(--accent)}
.ky-doc__n{font-size:.85rem;color:var(--muted)}
@media (max-width:560px){.ky-doc{flex-direction:column;gap:3px}}

/* ---------- other organisations ---------- */
.ky-org-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}
.ky-org{background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;
  box-shadow:var(--shadow);transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease}
.ky-org:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg);border-color:var(--gold)}
.ky-org__name{font-family:var(--head);font-size:1.05rem;margin:0 0 .35em}
.ky-org__name a{text-decoration:none}
.ky-org__what{margin:0;font-size:.9rem;color:var(--ink-soft)}

/* ---------- topic news ---------- */
.ky-news-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}
.ky-news{display:flex;flex-direction:column;gap:7px;text-decoration:none;background:var(--bg-alt);
  border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:12px;padding:15px 17px;
  transition:transform .3s ease,box-shadow .3s ease,background .3s ease}
.ky-news:hover{transform:translateX(5px);box-shadow:var(--shadow);background:#fff}
.ky-news__source{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--gold-deep)}
.ky-news__title{font-size:.95rem;color:var(--ink);line-height:1.4}
.ky-news__date{font-size:.74rem;color:var(--muted)}

/* ---------- Karen's note ---------- */
.ky-ls-note{background:linear-gradient(135deg,#11203f,#0b4eb0);color:#fff;border-radius:var(--radius-lg);
  padding:26px 28px;box-shadow:var(--shadow-lg);margin:0 0 40px}
.ky-ls-note__head{display:flex;align-items:center;gap:14px;margin-bottom:12px}
.ky-ls-note__avatar{width:46px;height:46px;flex:0 0 46px;border-radius:50%;background:var(--gold);
  color:var(--ink);font-family:var(--head);font-weight:800;display:flex;align-items:center;
  justify-content:center;letter-spacing:.02em}
.ky-ls-note__meta{display:block;font-size:.8rem;color:#ffd98a}
.ky-ls-note__body{font-size:1.02rem;line-height:1.65}
.ky-ls-note__body a{color:#ffd98a}
.ky-ls-back{margin-top:10px}

@media (max-width:860px){
  .ky-ls-h{font-size:1.35rem}
  .ky-ticker__badge{font-size:.62rem;padding:4px 9px;margin-right:12px}
  .ky-ticker__item{font-size:.76rem}
}
/* Honour the visitor's motion preference. */
@media (prefers-reduced-motion:reduce){
  .ky-ticker__track{animation:none;transform:none}
  .ky-ticker__dot{animation:none}
  .ky-topic-card,.ky-org,.ky-news,.ky-doc,.ky-topic-card__media img,.ky-timeline__item::before{transition:none}
  .ky-topic-card:hover,.ky-org:hover,.ky-news:hover,.ky-doc:hover{transform:none}
}

/* editor-only view of what the editorial filter held back */
.ky-ls-filtered{margin:-.4em 0 1.1em;font-size:.84rem;background:#fff8e1;border:1px solid var(--gold);
  border-radius:10px;padding:9px 13px}
.ky-ls-filtered summary{cursor:pointer;font-weight:600;color:var(--gold-deep)}
.ky-ls-filtered ul{margin:.6em 0 0;padding-left:18px;color:var(--ink-soft)}
.ky-ls-filtered em{color:var(--muted)}

/* ---------- maps (links out to the council's own interactive maps) ---------- */
.ky-map-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.ky-map{display:flex;gap:14px;align-items:flex-start;text-decoration:none;background:var(--bg-alt);
  border:1px solid var(--line);border-radius:14px;padding:16px 18px;box-shadow:var(--shadow);
  transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease,background .3s ease}
.ky-map:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg);border-color:var(--gold);background:#fff}
.ky-map__icon{font-size:1.5rem;line-height:1;flex:0 0 auto;filter:saturate(.9)}
.ky-map__body{display:flex;flex-direction:column;gap:4px}
.ky-map__t{font-family:var(--head);font-size:1rem;color:var(--ink)}
.ky-map__n{font-size:.86rem;color:var(--ink-soft);line-height:1.45}
@media (prefers-reduced-motion:reduce){.ky-map{transition:none}.ky-map:hover{transform:none}}

/* ---------- which authority a link belongs to ---------- */
.ky-auth{display:inline-block;margin-left:7px;padding:1px 8px;border-radius:999px;font-size:.68rem;
  font-weight:700;letter-spacing:.04em;text-transform:uppercase;vertical-align:2px;white-space:nowrap;
  border:1px solid transparent;cursor:help}
.ky-auth--city{background:#fff3d6;border-color:var(--gold);color:#6b4a00}
.ky-auth--county{background:#e4f0ff;border-color:#8bb6ea;color:#124a86}
.ky-auth--cpca{background:#ece4ff;border-color:#b29be0;color:#4a2a86}
.ky-auth--shared-planning{background:#e2f6ec;border-color:#87c9a6;color:#14603c}
.ky-auth--south-cambs{background:#f0f0f0;border-color:#c4c4c4;color:#4a4a4a}
.ky-auth--uk-government{background:#f6e4e4;border-color:#d79b9b;color:#7a2222}
.ky-auth--peterborough{background:#fdeede;border-color:#e0b183;color:#7a4712}

/* ---------- click-to-load map embed ---------- */
.ky-embed{margin:0 0 18px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--bg-alt)}
.ky-embed__facade{padding:30px 24px;text-align:center}
.ky-embed__icon{font-size:2.2rem;line-height:1;display:block;margin-bottom:8px}
.ky-embed__t{font-family:var(--head);font-size:1.1rem;margin:0 0 6px;color:var(--ink)}
.ky-embed__n{font-size:.87rem;color:var(--ink-soft);margin:0 auto 16px;max-width:52ch;line-height:1.5}
.ky-embed__go{font:inherit;font-weight:700;cursor:pointer;background:var(--gold);color:var(--ink);
  border:none;border-radius:999px;padding:11px 26px;box-shadow:var(--shadow);
  transition:transform .25s ease,box-shadow .25s ease,filter .25s ease}
.ky-embed__go:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);filter:brightness(1.05)}
.ky-embed__go:focus-visible{outline:3px solid var(--blue,#0b4eb0);outline-offset:3px}
.ky-embed__alt{font-size:.82rem;margin:14px 0 0}
.ky-embed.is-loaded{background:#fff}
.ky-embed__frame{display:block;width:100%;height:clamp(340px,62vh,620px);border:0}
.ky-embed__after{font-size:.78rem;color:var(--muted);margin:0;padding:8px 14px;border-top:1px solid var(--line)}
@media (prefers-reduced-motion:reduce){.ky-embed__go{transition:none}.ky-embed__go:hover{transform:none}}

/* ---- Editor-only affordances -------------------------------------------------------------
   Rendered only for users who can edit the topic (KY_Local_Strategies::edit_link() returns an
   empty string for everyone else), so a visitor's markup is unchanged by any of this. Kept
   deliberately quiet: it sits beside headings on a public page and must not read as a button. */
.ky-ls-h .ky-edit {
  float: right;
  font-size: .6em;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px dashed currentColor;
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 12px;
  opacity: .62;
  transition: opacity .15s ease, color .15s ease;
}
.ky-ls-h .ky-edit:hover,
.ky-ls-h .ky-edit:focus-visible { opacity: 1; color: var(--gold-deep); }

.ky-ls-note__head .ky-edit {
  float: none;
  display: inline-block;
  font-size: .68rem;
  margin-left: 10px;
  vertical-align: middle;
}

.ky-ls-editbar {
  margin: 28px 0 8px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius, 8px);
  background: var(--gold-soft);
  font-size: .86rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.ky-ls-editbar a { color: inherit; text-decoration: underline; }
.ky-ls-editbar a:hover, .ky-ls-editbar a:focus-visible { color: var(--gold-deep); }
.ky-ls-editbar__sep { opacity: .5; margin: 0 4px; }

/* Never print the editing furniture, and keep it out of the way on a phone. */
@media print {
  .ky-ls-h .ky-edit, .ky-ls-note__head .ky-edit, .ky-ls-editbar { display: none !important; }
}
@media (max-width: 560px) {
  .ky-ls-h .ky-edit { float: none; display: inline-block; margin: 6px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ky-ls-h .ky-edit { transition: none; }
}

/* ---- Like button ---------------------------------------------------------------------------
   Reader response, sitting below the substance of the page. Quiet by design: this is a
   councillor's record of work, not a social feed. */
.ky-like {
  margin: 30px 0 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius, 10px);
  background: var(--bg-alt, #fbfaf7);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.ky-like__form { margin: 0; }
.ky-like__btn {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.ky-like__btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); filter: brightness(1.05); }
.ky-like__btn:focus-visible { outline: 3px solid var(--blue, #0b4eb0); outline-offset: 3px; }
.ky-like__btn:disabled { cursor: default; background: var(--gold-soft); box-shadow: none; }
.ky-like__icon { font-size: 1.05em; line-height: 1; }
.ky-like__count { margin: 0; font-size: .93rem; color: var(--ink-soft); font-weight: 600; }
/* Below the display threshold there is nothing to say, so the line collapses rather than
   leaving a gap beside the button. */
.ky-like__count:empty { display: none; }
.ky-like.is-liked .ky-like__count { color: var(--gold-deep); }

@media (prefers-reduced-motion: reduce) {
  .ky-like__btn { transition: none; }
  .ky-like__btn:hover:not(:disabled) { transform: none; }
}
@media print { .ky-like { display: none !important; } }

/* ---- Like: hero variant ---------------------------------------------------------------------
   Sits in the pill row on the dark banner at the top of a topic page, so it is outlined rather
   than filled - a solid gold button there would outshout the title. */
.ky-like--hero { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 0;
  border: 0; background: none; }
.ky-like--hero .ky-like__btn {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .55);
  box-shadow: none;
  padding: .3em .9em;
  font-size: .76rem;
  font-weight: 800;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .05em;
  gap: 6px;
}
.ky-like--hero .ky-like__btn:hover:not(:disabled) {
  background: var(--gold); color: var(--ink); border-color: var(--gold); transform: translateY(-1px);
}
.ky-like--hero .ky-like__btn:disabled { background: var(--gold); color: var(--ink); border-color: var(--gold); opacity: 1; }
.ky-like--hero .ky-like__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ky-like--hero .ky-like__count { color: rgba(255, 255, 255, .85); font-weight: 600; font-size: .92rem; }
.ky-like--hero .ky-like__count:empty { display: none; }

/* ---- Like: card variant ---------------------------------------------------------------------
   A quiet heart in the card footer. The number appears inside it only once the display
   threshold is passed, so most cards show the outline alone. */
.ky-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ky-card-foot .card__more { margin-top: 0; }
.ky-like--card { display: inline-flex; margin: 0; padding: 0; border: 0; background: none; }
.ky-like--card .ky-like__btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .82rem;
  font-weight: 700;
  gap: 6px;
}
.ky-like--card .ky-like__btn:hover:not(:disabled) { color: var(--gold-deep); border-color: var(--gold); transform: none; }
.ky-like--card .ky-like__btn:disabled { color: var(--gold-deep); border-color: var(--gold); background: var(--gold-soft); }
.ky-like--card .ky-like__btn:focus-visible { outline: 3px solid var(--blue, #0b4eb0); outline-offset: 2px; }
.ky-like--card .ky-like__num { font-variant-numeric: tabular-nums; }
.ky-like--card .ky-like__num:empty { display: none; }

@media print { .ky-like--hero, .ky-like--card { display: none !important; } }

/* A note may now carry a photograph, so keep it inside the panel on every screen. */
.ky-ls-note__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius, 10px);
  margin: 10px 0;
  display: block;
}
.ky-ls-note__body figure { margin: 12px 0; }
.ky-ls-note__body figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }
