/* Grants and funding: green opener with the figure and the checker, results (Flip), every scheme on ink,
   the other money, questions */

/* ------------------------------------------------------------ opener */
.gr-op { min-height: min(80svh, 860px); display: flex; align-items: center; overflow: clip; }
.gr-op::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(50% 70% at 10% 20%, rgba(122,188,99,.32), transparent 70%),
  radial-gradient(40% 60% at 95% 100%, rgba(15,36,24,.45), transparent 70%); }
.gr-op__photo { position: absolute; inset-inline: 0; top: -15%; height: 130%; width: 100%; z-index: -1; pointer-events: none; opacity: .2; mix-blend-mode: luminosity;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 70%); mask-image: linear-gradient(90deg, transparent 30%, #000 70%); }
.gr-op__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; transform-origin: 70% 50%; }
.gr-op > .wrap { position: relative; z-index: 1; }
.gr-op__grid { display: grid; gap: clamp(20px, 2.4vw, 32px) clamp(28px, 4vw, 72px); align-items: center; grid-template-areas: "copy" "check" "more"; }
.gr-op__copy { grid-area: copy; display: grid; gap: clamp(14px, 1.4vw, 20px); }
.gr-op__more { grid-area: more; display: grid; gap: 14px; }
.gr-check { grid-area: check; }
.gr-op h1 { color: #fff; font-size: clamp(36px, 3.9vw, 64px); }
.gr-op h1 em { color: #c9ecb9; }
.gr-op .lede { color: rgba(255,255,255,.86); }

.gr-fig { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 22px; isolation: isolate; }
.gr-fig__num { display: inline-grid; justify-items: start; }
.gr-fig__num > span { grid-area: 1 / 1; }
.gr-fig__ghost { visibility: hidden; }
.gr-fig > b { position: relative; font-family: var(--display); font-weight: 800; font-size: clamp(70px, 8.2vw, 148px); line-height: .82; letter-spacing: -.045em; color: #fff; font-variant-numeric: tabular-nums;
}
.gr-fig__val { background: linear-gradient(100deg, #fff 0%, #fff 40%, #d9f5cc 48%, #fff 56%, #fff 100%) 0 0 / 300% 100% no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: gr-shine 6s ease-in-out infinite; }
@keyframes gr-shine { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0% 0; } }
.gr-fig > span:last-child { flex: 1 1 220px; max-width: 34ch; padding-bottom: .3em; font-family: var(--display); font-weight: 650; font-size: clamp(17px, 1.3vw, 21px); line-height: 1.25; color: #c9ecb9; }
.gr-fig__ring { position: absolute; z-index: -1; left: clamp(-40px, -2vw, -14px); top: 50%; width: clamp(170px, 15vw, 260px); aspect-ratio: 1; margin-top: calc(clamp(170px, 15vw, 260px) / -2); pointer-events: none; animation: gr-spin 40s linear infinite; }
.gr-fig__ring svg { width: 100%; height: 100%; overflow: visible; }
.gr-fig__ring circle { fill: none; stroke: rgba(201,236,185,.6); stroke-width: 1.5; stroke-dasharray: 3 9; }
@keyframes gr-spin { to { transform: rotate(360deg); } }
.gr-stamp { display: inline-flex; align-items: center; gap: 10px; font-size: var(--small); color: rgba(255,255,255,.82); }
.gr-stamp svg { flex: 0 0 22px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(255,255,255,.14); fill: none; stroke: #c9ecb9; stroke-width: 2.6; }

/* the checker card */
.gr-check { position: relative; display: grid; gap: 0; padding: clamp(20px, 2.2vw, 32px); border-radius: var(--radius); background: #fff; color: var(--ink); box-shadow: 0 50px 90px -40px rgba(4,14,8,.7), 0 0 0 8px rgba(255,255,255,.08); }
.gr-check__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gr-check__top strong { font-family: var(--display); font-weight: 750; font-size: 18px; color: var(--green-dark); }
.gr-check__count { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--muted); white-space: nowrap; }
.gr-check__count b { color: var(--ink); }
.gr-check__bar { height: 4px; margin: 12px 0 20px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.gr-check__bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--green-deep), var(--green)); transform-origin: left; transform: scaleX(.25); }
.gr-check__stage { position: relative; }
.gr-q { margin: 0; padding: 0; border: 0; min-width: 0; }
.gr-q + .gr-q, .gr-q + .gr-done { margin-top: 22px; }
.gr-q legend { padding: 0; margin-bottom: 14px; font-family: var(--display); font-weight: 750; font-size: clamp(24px, 2vw, 32px); line-height: 1.1; letter-spacing: -.02em; }
.gr-opts { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gr-opts--many .gr-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gr-opt { position: relative; display: block; cursor: pointer; }
.gr-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gr-opt__box { position: relative; display: grid; gap: 3px; align-content: center; min-height: 76px; height: 100%; padding: 14px 48px 14px 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--paper); transition: border-color .3s, background .3s, transform .4s var(--ease), box-shadow .4s var(--ease); }
.gr-opt__box b { font-family: var(--display); font-weight: 750; font-size: 18px; line-height: 1.15; }
.gr-opt__box small { font-size: 16px; line-height: 1.3; color: var(--muted); }
.gr-opt__box i { position: absolute; right: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid #b9c7b2; background: #fff; transition: background .3s, border-color .3s, transform .4s var(--ease); }
.gr-opt__box i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; transform: scale(0); transition: transform .3s var(--ease); }
.gr-opt:hover .gr-opt__box { border-color: var(--green-deep); transform: translateY(-2px); box-shadow: 0 16px 26px -20px rgba(15,36,24,.5); }
.gr-opt input:focus-visible + .gr-opt__box { outline: 3px solid var(--coral); outline-offset: 2px; }
.gr-opt input:checked + .gr-opt__box { border-color: var(--green-deep); background: #eef6ea; }
.gr-opt input:checked + .gr-opt__box i { background: var(--green-deep); border-color: var(--green-deep); transform: scale(1.1); }
.gr-opt input:checked + .gr-opt__box i::after { transform: scale(1); }
.gr-check__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.gr-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--green-dark); text-decoration: none; background: none; border: 0; cursor: pointer; }
.gr-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.gr-link[disabled] { opacity: .35; cursor: default; }
.gr-done { display: grid; gap: 12px; }
.gr-done__big { font-family: var(--display); font-weight: 750; font-size: clamp(26px, 2.2vw, 34px); line-height: 1.1; letter-spacing: -.02em; }
.gr-done__big b { color: var(--green-deep); }
.gr-done__sum { color: var(--muted); }
.gr-done__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.gr-check__nojs { display: none; margin-top: 10px; color: var(--muted); }
/* with the script: one question at a time; without it, the questions cannot filter anything, so they are hidden */
html:not(.no-js) .gr-q:not(.is-on), html:not(.no-js) .gr-done:not(.is-on) { display: none; }
html:not(.no-js) .gr-q + .gr-q, html:not(.no-js) .gr-q + .gr-done { margin-top: 0; }
.no-js .gr-done { display: none; }
.no-js .gr-check__stage, .no-js .gr-check__foot, .no-js .gr-check__bar, .no-js .gr-check__count { display: none; }
.no-js .gr-check__nojs { display: block; }

/* ------------------------------------------------------------ results */
.gr-results__grid { display: grid; gap: clamp(28px, 3.5vw, 56px); align-items: start; }
.gr-aside { display: grid; gap: 16px; align-content: start; }
.gr-aside h2 { font-size: clamp(28px, 2.3vw, 40px); }
.gr-aside h2 em { color: var(--green-deep); font-style: normal; }
.gr-change[hidden], .gr-answers[hidden] { display: none; }
.gr-status { color: #33443a; }
.gr-answers { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-answers li { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--green-dark); }
.gr-change { justify-self: start; }
.gr-aside__figure { display: grid; gap: 12px; margin-top: 6px; }
.gr-aside__figure .frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); }
.gr-aside__figure .frame img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; }
.gr-aside__note { display: flex; gap: 10px; align-items: flex-start; font-size: var(--small); color: #33443a; line-height: 1.45; }
.gr-aside__note svg, .gr-card__check svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--green-deep); stroke-width: 2.6; }
.gr-cards { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.gr-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 22px 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); overflow: hidden; transition: box-shadow .45s var(--ease), border-color .3s; }
.gr-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--green-deep); }
.gr-card--wales::before { background: var(--coral); }
.gr-card--england::before { background: #d9a21f; }
.gr-card:hover { box-shadow: 0 30px 50px -30px rgba(15,36,24,.45); border-color: rgba(79,154,58,.45); }
.gr-card.is-out { display: none; }
.gr-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.gr-card__kind { font-size: 15px; color: var(--muted); white-space: nowrap; }
.gr-tag { display: inline-flex; align-items: center; padding: 4px 9px; white-space: nowrap; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.3; background: #e3f0dc; color: #24561c; }
.gr-tag--wales { background: #f8e1df; color: #8a2f28; }
.gr-tag--england { background: #fbefcc; color: #6b4f05; }
.gr-tag.on-ink { background: rgba(122,188,99,.18); color: #c9ecb9; }
.gr-tag--wales.on-ink { background: rgba(200,96,91,.22); color: #f5c6c2; }
.gr-tag--england.on-ink { background: rgba(243,192,76,.18); color: #f7dc97; }
.gr-card__amount { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 2.5vw, 42px); line-height: 1; letter-spacing: -.025em; color: var(--green-deep); margin-top: 4px; }
.gr-card--wales .gr-card__amount { color: var(--coral-deep); }
.gr-card--england .gr-card__amount { color: #9c7408; }
.gr-card__amount small { display: block; margin-top: 6px; font-family: var(--body); font-weight: 600; font-size: 15px; line-height: 1.3; letter-spacing: 0; color: var(--muted); }
.gr-card h3 { font-size: clamp(19px, 1.4vw, 23px); }
.gr-card__how { color: #33443a; font-size: var(--small); line-height: 1.5; }
.gr-card__check { margin-top: auto; display: flex; gap: 8px; align-items: flex-start; font-weight: 650; font-size: var(--small); color: var(--green-dark); line-height: 1.35; padding-top: 10px; border-top: 1px solid var(--line); }
.gr-card__more { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
.gr-card__more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; transition: transform .35s var(--ease); }
.gr-card__more:hover svg { transform: translateX(4px); }
.gr-note, .gr-empty { grid-column: 1 / -1; padding: 16px 20px; border-radius: 14px; background: rgba(79,154,58,.1); border: 1px dashed rgba(79,154,58,.5); color: #24402b; }
.gr-empty a { color: var(--green-dark); font-weight: 700; }

/* ------------------------------------------------------- every scheme (ink) */
.gr-schemes__grid { display: grid; gap: clamp(28px, 4vw, 64px); align-items: start; }
.gr-index { position: relative; padding-left: 22px; }
.gr-index ul { display: grid; gap: 4px; }
.gr-index a { display: grid; gap: 2px; padding: 10px 14px; border-radius: var(--radius-sm); color: rgba(255,255,255,.72); text-decoration: none; transition: background .35s, color .35s; }
.gr-index a span { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.2; }
.gr-index a small { font-size: 15px; color: rgba(201,236,185,.75); }
.gr-index a:hover, .gr-index a.is-on { background: rgba(255,255,255,.08); color: #fff; }
.gr-index__rail { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.gr-index__rail i { display: block; width: 100%; height: 100%; background: var(--green); transform-origin: top; transform: scaleY(1); }
.gr-list { display: grid; gap: 16px; }
.gr-scheme { position: relative; padding: clamp(22px, 2.4vw, 34px); border-radius: var(--radius); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); transform-style: preserve-3d; scroll-margin-top: calc(var(--header-h) + 24px); transition: background .4s, border-color .4s; }
.gr-scheme:hover { background: rgba(255,255,255,.08); border-color: rgba(122,188,99,.5); }
.gr-scheme .scheme__glare { border-radius: var(--radius); }
.gr-scheme__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.gr-scheme__head h3 { margin-top: 10px; font-size: clamp(24px, 2vw, 32px); color: #fff; }
.gr-scheme__amount { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 3vw, 52px); line-height: 1; letter-spacing: -.03em; color: var(--green); white-space: nowrap; }
.gr-rows { margin: 18px 0 0; display: grid; }
.gr-rows > div { display: grid; gap: 4px 24px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); }
.gr-rows dt { font-family: var(--display); font-weight: 700; color: #fff; }
.gr-rows dd { margin: 0; color: rgba(255,255,255,.8); }
.gr-closed { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.28); color: rgba(255,255,255,.8); font-size: var(--small); }
.gr-closed svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: var(--green); stroke-width: 2; margin-top: 1px; }

/* ------------------------------------------------------- other money */
.gr-other__grid { display: grid; gap: clamp(32px, 5vw, 80px); align-items: start; }
.gr-other__copy { display: grid; gap: 16px; }
.gr-other__copy h2 em { color: var(--green-deep); font-style: normal; }
.gr-other__list { display: grid; gap: 10px; margin-top: 4px; }
.gr-other__copy .lede { max-width: none; }
.gr-money { display: grid; gap: 6px 22px; padding: 16px 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.gr-money__amount { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 2.1vw, 34px); line-height: 1.05; letter-spacing: -.02em; color: var(--green-deep); }
.gr-money__body { display: grid; gap: 4px; }
.gr-money__body h3 { font-size: clamp(20px, 1.5vw, 24px); }
.gr-money__body p { font-size: var(--small); color: #33443a; line-height: 1.5; }
.gr-money__body b { color: var(--ink); }
.gr-other__figure { --media-cap: min(68vh, 640px); }
.gr-other__figure .figure__set { width: min(100%, calc(var(--media-cap) * .8)); }
.gr-other__figure .frame { width: 100%; aspect-ratio: 4 / 5; }
.gr-other__figure .frame img { position: absolute; inset: 0; }
.gr-other__tag { position: absolute; z-index: 3; left: -22px; bottom: 34px; display: grid; gap: 4px; max-width: 250px; padding: 16px 20px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: 0 24px 40px -20px rgba(15,36,24,.6); animation: gr-bob 5.5s ease-in-out infinite; }
.gr-other__fig { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--green); }
.gr-other__tag span + span { font-size: 16px; line-height: 1.3; color: rgba(255,255,255,.86); }
@keyframes gr-bob { 50% { transform: translateY(-10px); } }

/* ------------------------------------------------------------ questions */
.gr-faq__grid { display: grid; gap: clamp(28px, 4vw, 72px); align-items: start; }
.gr-faq__head { display: grid; gap: 16px; }
.gr-faq__head h2 em { color: var(--green-deep); font-style: normal; }
.gr-faq__head a { color: var(--green-dark); font-weight: 700; }
.gr-faq__figure .frame { position: relative; aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); max-height: 40vh; }
.gr-faq__figure .frame img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; }

/* motion start states: the big figure row waits for the web fonts, so the line beside it never shifts */
html.has-js.motion .gr-fig { opacity: 0; }
html.has-js.motion .gr-card, html.has-js.motion .gr-scheme { opacity: 0; }
html.has-js.motion .gr-index__rail i { transform: scaleY(0); }

@media (min-width: 720px) {
  .gr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gr-rows > div { grid-template-columns: 190px minmax(0, 1fr); }
  .gr-money { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (min-width: 1000px) {
  .gr-op__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-areas: "copy check" "more check"; align-items: end; }
  .gr-op__copy { align-self: end; }
  .gr-op__more { align-self: start; }
  .gr-results__grid { grid-template-columns: minmax(280px, .3fr) minmax(0, 1fr); }
  .gr-aside { position: sticky; top: calc(var(--header-h) + 24px); }
  .gr-schemes__grid { grid-template-columns: minmax(240px, .28fr) minmax(0, 1fr); }
  .gr-index { position: sticky; top: calc(var(--header-h) + 28px); }
  .gr-other__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .gr-faq__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .gr-faq__head { position: sticky; top: calc(var(--header-h) + 32px); }
}
@media (min-width: 1200px) {
  .gr-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 999px) {
  .gr-op { min-height: 0; }
  .gr-index { display: none; }
  .gr-op__photo { opacity: .16; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 85%); mask-image: linear-gradient(180deg, #000 30%, transparent 85%); }
  .gr-other__tag { left: 10px; bottom: 16px; }
}
@media (max-width: 719px) {
  .gr-opts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gr-opts--many .gr-opt:last-child:nth-child(odd) { grid-column: auto; }
  .gr-opt__box { min-height: 0; padding: 12px 46px 12px 16px; }
  .gr-fig > b { font-size: 64px; }
  .gr-fig > span:last-child { flex-basis: 100%; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gr-fig__ring, .gr-other__tag, .gr-fig__val { animation: none; }
  html.has-js.motion .gr-card, html.has-js.motion .gr-scheme { opacity: 1; }
  html.has-js.motion .gr-index__rail i { transform: none; }
  html.has-js.motion .gr-fig { opacity: 1; }
}

/* the coloured phrase always takes its own line, so a wrapped heading never breaks inside it */
.gr-aside h2 em, .gr-schemes h2 em, .gr-other__copy h2 em, .gr-faq__head h2 em { display: block; }

/* "More ways to save" sits inside one screen on big desktops */
@media (min-width: 1000px) {
  .gr-other { padding-block: clamp(48px, 4.4vw, 72px); }
  .gr-other__copy { gap: 12px; }
}
@media (min-width: 1000px) {
  .gr-other__grid { grid-template-columns: minmax(0, 1fr) auto; }
  .gr-other__figure { width: min(calc(var(--media-cap) * .8), 40vw); }
  .gr-other__figure .figure__set { width: 100%; margin: 0; }
}
