/* Matches www.eastbournelibdems.org.uk: Open Sans, Lib Dem orange, dark navy, angled panels. */
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url(/static/fonts/open-sans-400.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap; src: url(/static/fonts/open-sans-600.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap; src: url(/static/fonts/open-sans-700.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 800; font-display: swap; src: url(/static/fonts/open-sans-800.woff2) format("woff2"); }

:root {
  --orange: #ff6400;
  --orange-dark: #d95500;
  --orange-soft: #fff1e8;
  --navy: #151721;
  --navy-2: #2a2d3d;
  --ink: #151721;
  --muted: #5b5e6b;
  --line: #e4e2dd;
  --bg: #ffffff;
  --bg-alt: #f6f4f0;
  --card: #ffffff;
  --ok: #1f7a3a;
  --bad: #b3261e;
  --radius: 10px;
  --wrap: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800; margin: 0 0 .6em; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .3em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--navy); color: #fff; }
.section.dark a { color: #fff; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 42em; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--orange-dark); margin: 0 0 .5em; }

/* --- header -------------------------------------------------------------------------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; line-height: 1.1; }
.brand-mark { width: 38px; height: 38px; border-radius: 6px; background: var(--orange); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 9px 7px 11px 9px; border: 3px solid #fff; border-radius: 0 60% 0 60%; transform: rotate(-12deg); }
.brand-logo { height: 54px; width: auto; flex: none; margin: -6px -6px -6px -8px; }  /* the official file has built-in padding */
.brand-text { font-size: .8rem; color: var(--muted); }
.brand-text strong { display: block; font-size: 1rem; color: var(--ink); font-weight: 800; }
@media (max-width: 400px) { .brand-text strong { font-size: .86rem; } .brand-text { font-size: .74rem; } .brand-logo { height: 46px; } .site-header .wrap { gap: 8px; } }
@media (max-width: 370px) { .brand-text strong { font-size: .8rem; letter-spacing: -.01em; } }
.site-nav { display: flex; align-items: center; gap: 20px; font-weight: 600; font-size: .95rem; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--orange-dark); }
.site-nav .nav-link { display: none; }
@media (min-width: 760px) { .site-nav .nav-link { display: inline; } }

/* --- buttons ------------------------------------------------------------------------------- */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--navy); color: #fff; border: 0; border-radius: 6px;
  padding: 12px 22px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; min-height: 48px; line-height: 1.2; }
.btn:hover, button:hover { filter: brightness(1.08); }
.btn.primary, button.primary { background: var(--orange); color: #fff; font-size: 1.1rem; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.section.dark .btn.ghost, .hero .btn.ghost { color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.btn.small, button.small { padding: 6px 12px; min-height: 0; font-size: .9rem; }
.btn.big { padding: 16px 30px; font-size: 1.2rem; }
button.danger { background: var(--bad); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* --- hero ---------------------------------------------------------------------------------- */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21,23,33,.55), rgba(21,23,33,.05) 70%); pointer-events: none; }
.hero .panel { z-index: 1; }
.hero .panel { position: relative; padding: 48px 0 56px; }
.hero .panel .inner { background: var(--navy); padding: 28px 24px 30px; max-width: 620px;
  clip-path: polygon(0 0, 100% 0, 94% 100%, 0 100%); padding-right: 48px; }
.hero h1 { color: #fff; }
.hero .prize { display: inline-block; background: var(--orange); color: #fff; font-weight: 800; padding: 4px 12px; border-radius: 4px; }
.hero p { font-size: 1.1rem; margin: 0 0 1.2em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .next { font-size: .95rem; opacity: .85; margin-top: 16px; }
@media (min-width: 760px) { .hero .panel { padding: 90px 0 100px; } .hero .panel .inner { padding: 40px 72px 44px 40px; } }
/* Variant: panel on the right, so the left of the photo (the MP) stays visible on desktop. */
@media (min-width: 760px) {
  .hero.panel-right .photo { object-position: 20% 30%; }
  .hero.panel-right .panel .wrap { display: flex; justify-content: flex-end; }
  .hero.panel-right .panel .inner { clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%); padding: 40px 40px 44px 72px; max-width: 560px; }
  .hero.panel-right::after { background: linear-gradient(270deg, rgba(21,23,33,.5), rgba(21,23,33,.05) 60%); }
}
/* Phones: photo as a strip above the text rather than hidden behind it. */
@media (max-width: 759px) {
  .hero .photo { position: static; height: 250px; object-position: 30% 40%; }
  .hero::after { display: none; }
  .hero .panel { padding: 0; }
  .hero .panel .wrap { padding: 0; }
  .hero .panel .inner { clip-path: none; max-width: none; padding: 26px 16px 30px; background: var(--navy); }
}

/* Photo placeholder - swap for a real <img> once the party supplies photos. */
.photo-ph { background:
    linear-gradient(135deg, rgba(255,100,0,.55), rgba(21,23,33,.2) 60%),
    repeating-linear-gradient(45deg, #3a3e52 0 14px, #333747 14px 28px);
  display: flex; align-items: flex-end; justify-content: flex-end; }
.photo-ph span { margin: 12px; font-size: .75rem; font-weight: 600; color: #fff; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 3px; }

/* --- stat strip ---------------------------------------------------------------------------- */
.stats { background: var(--orange); color: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-top: 20px; padding-bottom: 20px; text-align: center; }
@media (min-width: 760px) { .stats .wrap { grid-template-columns: repeat(4, 1fr); } }
.stats b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stats span { font-size: .9rem; font-weight: 600; }

/* --- steps and cards ----------------------------------------------------------------------- */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--orange); color: #fff; font-weight: 800; font-size: 1.3rem; margin-bottom: 14px; }
.step p { margin: 0; color: var(--muted); }
.cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.card .photo-ph { height: 150px; }
.card .card-img { width: 100%; height: 190px; object-fit: cover; background: var(--bg-alt); }
.card .body { padding: 18px 20px 22px; }
.card p { margin: 0; color: var(--muted); }
.placeholder-note { font-size: .8rem; color: var(--orange-dark); font-weight: 600; margin-top: 10px; }

/* --- prizes -------------------------------------------------------------------------------- */
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.prize-table { background: #fff; color: var(--ink); border-radius: var(--radius); overflow: hidden; }
.prize-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.prize-row:last-child { border-bottom: 0; }
.prize-row .rank { font-weight: 700; }
.prize-row .amount { font-size: 1.4rem; font-weight: 800; color: var(--orange-dark); }
.prize-row.total { background: var(--bg-alt); }
.prize-row.total .amount { color: var(--ink); font-size: 1.1rem; }

/* --- winners ------------------------------------------------------------------------------- */
.winners { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.winner { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); gap: 12px; }
.winner:last-child { border-bottom: 0; }
.winner .name { font-weight: 700; }
.winner .amount { font-weight: 800; font-size: 1.2rem; color: var(--orange-dark); }
.winner .num { color: var(--muted); font-size: .9rem; font-weight: 400; }
.draw-meta { font-size: .85rem; color: var(--muted); padding: 12px 20px; border-top: 1px solid var(--line); }

/* --- trust strip, FAQ ---------------------------------------------------------------------- */
.trust { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust div { display: flex; gap: 12px; align-items: flex-start; }
.trust svg { flex: none; width: 28px; height: 28px; color: var(--orange); }
.trust strong { display: block; }
.trust span { font-size: .9rem; color: var(--muted); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* --- sticky mobile join -------------------------------------------------------------------- */
.sticky-join { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.sticky-join span { font-size: .9rem; font-weight: 600; }
.sticky-join .btn { min-height: 44px; padding: 10px 18px; font-size: 1rem; }
body.has-sticky { padding-bottom: 76px; }
@media (min-width: 760px) { .sticky-join { display: none; } body.has-sticky { padding-bottom: 0; } }

/* --- forms --------------------------------------------------------------------------------- */
.page-head { background: var(--navy); color: #fff; padding: 36px 0 40px; }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { margin: .4em 0 0; opacity: .85; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; margin-bottom: 18px; }
@media (min-width: 640px) { .form-card { padding: 28px 30px; } }
.form-card h2 { font-size: 1.2rem; margin-bottom: .2em; }
.form-card .sub { color: var(--muted); font-size: .95rem; margin: 0 0 8px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
form.stack label { display: block; margin: 14px 0 5px; font-weight: 600; }
form.stack input[type=text], form.stack input[type=email], form.stack input[type=tel], form.stack input[type=date],
form.stack input[type=number], form.stack input[type=password], form.stack input[type=month], form.stack textarea, form.stack select, input.inline {
  width: 100%; padding: 12px 14px; font: inherit; border: 1.5px solid #b9b6ae; border-radius: 6px; background: #fff; min-height: 48px; }
form.stack input:focus, input.inline:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(255,100,0,.2); }
form.stack .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 14px 0; }
form.stack .check input { margin-top: 3px; width: 22px; height: 22px; flex: none; accent-color: var(--orange); }
.stepper { display: flex; align-items: stretch; gap: 0; max-width: 220px; margin-top: 6px; }
.stepper button { background: var(--bg-alt); color: var(--ink); border: 1.5px solid #b9b6ae; min-width: 52px; font-size: 1.5rem; padding: 0; border-radius: 6px 0 0 6px; }
.stepper button:last-child { border-radius: 0 6px 6px 0; }
.stepper input[type=number] { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; text-align: center; font-weight: 800; font-size: 1.3rem; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.total-line { margin-top: 12px; font-size: 1.05rem; }
.total-line strong { font-size: 1.4rem; color: var(--orange-dark); }
.secure { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .9rem; margin-top: 12px; }
.hint { color: var(--muted); font-size: .9rem; }
.notice { padding: 12px 16px; border-radius: 8px; margin: 12px 0; background: #eaf5ec; border: 1px solid #b7dcbf; }
.notice.error { background: #fbeceb; border-color: #e7b7b3; }
.notice.warn { background: var(--orange-soft); border-color: #ffc9a3; }
.hp { position: absolute; left: -9999px; }
.narrow { max-width: 720px; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }

.choice { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 12px 0 0; cursor: pointer; font-weight: 400 !important; }
.choice:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.choice input { margin-top: 4px; width: 22px; height: 22px; flex: none; accent-color: var(--orange); }
.tag { display: inline-block; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 3px; vertical-align: 2px; }
dl.bank { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 14px 0; }
dl.bank dt { color: var(--muted); font-weight: 600; }
dl.bank dd { margin: 0; font-weight: 600; }
.mono-big { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; letter-spacing: .04em; }
dd.ref { color: var(--orange-dark); font-weight: 800; }

/* --- footer -------------------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #c9cad3; font-size: .88rem; padding: 36px 0 28px; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; gap: 20px; }
@media (min-width: 760px) { .site-footer .cols { grid-template-columns: 2fr 1fr; } }
.site-footer .links { display: flex; flex-direction: column; gap: 6px; }
.site-footer .imprint { border-top: 1px solid #33364a; margin-top: 24px; padding-top: 16px; }

/* --- shared bits used by admin ------------------------------------------------------------- */
main.admin-main { max-width: 1080px; margin: 0 auto; padding: 20px 16px 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: .9rem; }
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .8rem; background: #eee; }
.pill.active, .pill.confirmed { background: #dcefdc; }
.pill.lapsed, .pill.drawn { background: #ffe9d6; }
.pill.cancelled, .pill.void { background: #f3dcdc; }
.pill.pending { background: #e5e5f5; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; word-break: break-all; }
.admin h1 { font-size: 1.7rem; } .admin h2 { font-size: 1.25rem; margin-top: 1.6em; }
.admin .site-header { background: var(--navy); border: 0; position: static; }
.admin .site-header .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.admin .site-header a, .admin .brand-text strong { color: #fff; }
.admin .admin-nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: .92rem; }
.admin .admin-nav form { display: inline; }
.admin .admin-nav button { background: none; padding: 0; min-height: 0; color: #fff; font-weight: 500; font-size: .92rem; text-decoration: underline; }
.admin .btn.primary, .admin button.primary { font-size: 1rem; }
