/* Table grape programme page. Builds on quality-export.css. */
.grape-hero .quality-hero-image > img { object-position: center; }

.grape-facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-block: 0; border-block: 1px solid var(--line); }
.grape-facts > div { padding: 22px 18px; border-inline-start: 1px solid var(--line); }
.grape-facts > div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.grape-facts > div:nth-child(5n+1) { border-inline-start: 0; padding-inline-start: 0; }
.grape-facts > div:nth-child(n+6) { border-top: 1px solid var(--line); }
.grape-facts dt { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.grape-facts dd { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }

.grape-use-notice { display: flex; gap: 18px; align-items: flex-start; margin-top: 30px; padding: 22px 26px; border-radius: 18px; background: #f1e2db; }
.grape-use-notice > span { font-size: 24px; color: var(--red); line-height: 1; margin-top: 3px; }
.grape-use-notice h2 { font-size: 19px; letter-spacing: -.3px; margin-bottom: 6px; }
.grape-use-notice p { font-size: 14px; max-width: 760px; }

.grape-contents { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.grape-contents a { font-size: 12px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 30px; background: #fffdf8; }
.grape-contents a:hover, .grape-contents a:focus-visible { border-color: var(--red); color: var(--red); }
.quality-section, .grape-band, .quality-packing-section, .quality-brief-section { scroll-margin-top: 90px; }

.grape-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; }
.grape-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.grape-table th, .grape-table td { padding: 16px 20px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.grape-table thead th { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 500; background: #f5f2ea; }
.grape-table tbody tr:last-child > * { border-bottom: 0; }
.grape-table tbody th { font-weight: 500; color: var(--ink); }
.grape-table tbody th small { display: block; margin-top: 5px; font-size: 12px; font-weight: 400; color: var(--muted); max-width: 360px; }
.grape-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 8px; background: #b6c77a; vertical-align: 1px; }
.grape-dot-flame, .grape-dot-red-globe, .grape-dot-crimson { background: #b63847; }
.grape-dot-autumn-royal { background: #2c2233; }
.grape-dot-licensed { background: linear-gradient(90deg, #b6c77a 33%, #b63847 33% 66%, #2c2233 66%); }
.grape-note { font-size: 12px; color: var(--muted); margin-top: 16px; max-width: 720px; }

.grape-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: start; }
.grape-split-intro .eyebrow { margin-bottom: 22px; }
.grape-split-intro h2 { font-size: clamp(36px, 3.7vw, 52px); }
.grape-split-intro > p:not(.eyebrow) { margin: 24px 0; max-width: 420px; font-size: 14px; color: var(--muted); }
.grape-split-intro .text-link { font-size: 12px; }
.grape-parameters { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; margin: 0; }
.grape-parameters > div { border-top: 1px solid var(--line); padding: 16px 0; }
.grape-parameters dt { font-size: 14px; color: var(--ink); margin-bottom: 5px; }
.grape-parameters dd { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

.grape-band { background: #f0ede3; width: calc(100% - 40px); max-width: 1472px; margin-inline: auto; border-radius: 28px; padding-block: 64px; }
.grape-band > .wrap { width: min(1320px, calc(100% - 72px)); }
.grape-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grape-cards li { background: var(--cream); border-radius: 18px; padding: 22px 20px; }
.grape-cards h3 { margin: 18px 0 10px; font-size: 17px; letter-spacing: -.3px; line-height: 1.3; }
.grape-cards p { font-size: 13px; color: var(--muted); }

.grape-checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 30px; }
.grape-checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; }
.grape-checklist li > span { color: #71865d; font-size: 16px; line-height: 1.3; }
.grape-checklist-single { grid-template-columns: 1fr; }
.grape-band .grape-checklist li { border-color: #d7d9ca; }

.grape-label-card { background: var(--cream); border-radius: 22px; padding: 30px; align-self: center; }
.grape-label-card .eyebrow { margin-bottom: 18px; }
.grape-label-card ul { list-style: none; padding: 0; margin: 0; }
.grape-label-card li { padding: 12px 0; border-top: 1px dashed #cfd2c2; font-size: 14px; }

.grape-cert-name { font-family: var(--heading); font-size: 28px !important; letter-spacing: -1px !important; color: var(--red); margin: 18px 0 0; }

.grape-process { list-style: none; padding: 0; margin: 0 0 42px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 34px; }
.grape-process h3 { margin: 18px 0 9px; font-size: 18px; letter-spacing: -.4px; }
.grape-process p { font-size: 13px; color: var(--muted); }
.grape-inspection { grid-template-columns: .8fr 1.2fr; align-items: center; padding-block: 34px; }
.grape-inspection h3 { font-size: 26px; margin-top: 12px; }
.grape-inspection p { font-size: 14px; color: #e4e8d8; }

.grape-sheet-cta { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 34px 38px; margin-bottom: 70px; border: 1px solid var(--line); border-radius: 24px; }
.grape-sheet-cta .eyebrow { margin-bottom: 12px; }
.grape-sheet-cta h2 { font-size: 30px; letter-spacing: -1px; }
.grape-sheet-cta p:not(.eyebrow) { font-size: 14px; color: var(--muted); margin-top: 8px; }
.grape-sheet-cta .button { flex-shrink: 0; }

.grape-fields { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.grape-field-wide { grid-column: 1 / -1; }
.grape-fields fieldset { border: 0; padding: 0; margin: 0; }
.grape-fields legend { font-size: 11px; margin-bottom: 9px; padding: 0; }
.grape-variety-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.grape-variety-options label { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 0; }
.grape-variety-options input { width: 17px; height: 17px; min-height: 0; accent-color: var(--red); }
.quality-field textarea { width: 100%; padding: 12px; font: 13px var(--sans); color: var(--ink); background: #fffdf8; border: 1px solid #d3d5c7; border-radius: 8px; resize: vertical; }
.quality-field textarea:focus { outline: 2px solid #7e8d67; outline-offset: 2px; }

@media (max-width: 1100px) {
  .grape-facts { grid-template-columns: repeat(3, 1fr); }
  .grape-facts > div:nth-child(4) { border-inline-start: 0; padding-inline-start: 0; }
  .grape-facts > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .grape-cards { grid-template-columns: repeat(3, 1fr); }
  .grape-band { width: calc(100% - 64px); }
  .grape-band > .wrap { width: calc(100% - 40px); }
  .grape-split { gap: 45px; }
}
@media (max-width: 800px) {
  .grape-split, .grape-inspection { grid-template-columns: 1fr; gap: 28px; }
  .grape-cards, .grape-process { grid-template-columns: 1fr 1fr; }
  .grape-band { width: calc(100% - 40px); padding-block: 44px; }
  .grape-sheet-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
}
@media (max-width: 560px) {
  .grape-facts { grid-template-columns: 1fr 1fr; }
  .grape-facts > div { padding: 16px 12px; }
  .grape-facts > div:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .grape-facts > div:nth-child(4) { border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
  .grape-facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grape-facts > div:last-child { grid-column: 1 / -1; }
  .grape-use-notice { padding: 20px; gap: 14px; }
  .grape-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .grape-table tbody tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
  .grape-table tbody tr:last-child { border-bottom: 0; }
  .grape-table tbody th { grid-column: 1 / -1; padding: 0 0 6px; border: 0; font-size: 14px; }
  .grape-table tbody td { padding: 0; border: 0; font-size: 12px; }
  .grape-table tbody td::before { content: attr(data-label); display: block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
  .grape-parameters, .grape-checklist, .grape-cards, .grape-process, .grape-fields, .grape-variety-options { grid-template-columns: 1fr; }
  .grape-band { width: calc(100% - 24px); border-radius: 24px; padding-block: 34px; }
  .grape-band > .wrap { width: calc(100% - 36px); }
    .grape-sheet-cta h2 { font-size: 26px; }
}

/* Step timelines (traceability and cold chain): numbered nodes on a connecting line.
   Logical properties keep the line and order correct in right-to-left languages. */
.grape-flow { --node: #304b3b; --link: #b9c4ae; list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; counter-reset: flow; }
.grape-flow-cold { --node: #46707c; --link: #b7cbd1; }
.grape-flow li { position: relative; counter-increment: flow; padding: 56px 8px 0; text-align: center; font-size: 13px; line-height: 1.4; color: var(--ink); }
.grape-flow li::before { content: counter(flow); position: absolute; top: 0; inset-inline-start: 50%; margin-inline-start: -20px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--node); color: var(--cream); font-size: 14px; font-weight: 500; box-shadow: 0 0 0 5px var(--cream); z-index: 1; }
.grape-flow li:not(:last-child)::after { content: ''; position: absolute; top: 19px; inset-inline-start: calc(50% + 24px); width: calc(100% - 48px); height: 2px; background: var(--link); }
.grape-flow li:last-child::before { background: var(--red); }
@media (max-width: 800px) {
  .grape-flow { grid-auto-flow: row; margin-bottom: 30px; }
  .grape-flow li { text-align: start; padding: 9px 0 26px 0; padding-inline-start: 58px; min-height: 40px; font-size: 14px; }
  .grape-flow li::before { inset-inline-start: 0; margin-inline-start: 0; }
  .grape-flow li:not(:last-child)::after { top: 44px; inset-inline-start: 19px; width: 2px; height: calc(100% - 44px); }
  .grape-flow li:last-child { padding-bottom: 0; }
}


.grape-table tbody th small.grape-latin { font-size: 11px; letter-spacing: .3px; color: var(--muted); }
[dir=rtl] .grape-table tbody th small[dir=ltr] { text-align: end; }

.grape-load-table tbody th { width: 34%; }
.grape-load-table td { text-align: start; }
@media (max-width: 1100px) {
  .grape-facts > div:nth-child(5n+1) { border-inline-start: 1px solid var(--line); padding-inline-start: 18px; }
  .grape-facts > div:nth-child(3n+1) { border-inline-start: 0; padding-inline-start: 0; }
  .grape-facts > div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .grape-facts > div:nth-child(n) { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); }
  .grape-facts > div:nth-child(-n+2) { border-top: 0; }
  .grape-facts > div:nth-child(even) { border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
  .grape-facts > div:last-child { grid-column: auto; }
}
@media (max-width: 560px) { .grape-load-table tbody th { width: auto; } }

/* ---- Review pass: readability, navigation, alignment ------------------------ */
.grape-page { --muted: #535b51; }

/* Slimmer hero so the key facts show on the first screen */
.grape-hero { padding-bottom: 34px; }
.grape-hero .quality-hero-copy h1 { font-size: clamp(44px, 4.6vw, 66px); }
.grape-hero .quality-hero-image { height: 420px; }
.grape-hero .quality-hero-copy > p:not(.eyebrow) { max-width: 440px; font-size: 17px; line-height: 1.65; margin: 22px 0 28px; }
.grape-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grape-button-outline { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border: 1px solid var(--green); border-radius: 40px; font-size: 14px; font-weight: 500; color: var(--green); }
.grape-button-outline small { font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.grape-button-outline > span { display: inline-flex; font-size: 16px; }
.grape-button-outline:hover, .grape-button-outline:focus-visible { background: var(--green); color: var(--cream); }
.grape-button-outline:hover small, .grape-button-outline:focus-visible small { color: inherit; }

/* Section bar stays at the top while scrolling */
.grape-contents { position: sticky; top: 0; z-index: 15; margin-top: 30px; padding-block: 10px; background: color-mix(in srgb, var(--cream) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid transparent; }
.grape-contents > .wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grape-contents a { font-size: 13px; white-space: nowrap; }
.grape-contents a[aria-current] { border-color: var(--green); background: var(--green); color: var(--cream); }
.grape-contents a.grape-contents-cta { border-color: var(--red); background: var(--red); color: #fff; margin-inline-start: auto; }
.quality-section, .grape-band, .quality-packing-section, .quality-brief-section, .grape-loading { scroll-margin-top: 80px; }

/* Larger, darker body text */
.grape-facts dd { font-size: 15px; }
.grape-use-notice p, .quality-section-heading > p, .grape-split-intro > p:not(.eyebrow),
.quality-packing-copy > p:not(.eyebrow), .quality-brief-intro > p:not(.eyebrow) { font-size: 16px; line-height: 1.65; }
.grape-table { font-size: 15px; }
.grape-table tbody th small { font-size: 13px; }
.grape-note { font-size: 13.5px; line-height: 1.6; }
.grape-parameters dt { font-size: 16px; font-weight: 500; }
.grape-parameters dd { font-size: 14.5px; }
.grape-parameters dd.grape-value { margin-bottom: 4px; font-family: var(--heading); font-size: 20px; color: var(--red); letter-spacing: -.3px; line-height: 1.3; text-align: start; }
.grape-cards h3 { font-size: 18px; }
.grape-cards p, .grape-process p, .quality-document-card p { font-size: 14.5px; line-height: 1.6; }
.grape-checklist li, .grape-label-card li { font-size: 15px; }
.quality-packing-options dt { font-size: 15px; }
.quality-packing-options dd { font-size: 14px; }
.grape-inspection p { font-size: 15.5px; }
.quality-document-card a { font-size: 13px; }

/* Timelines: step name with the record kept at that step */
.grape-flow li strong { display: block; font-weight: 500; font-size: 14px; }
.grape-flow li small { display: block; margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.grape-flow li small + small { margin-top: 4px; }

/* Container loading inside the packing band */
.grape-loading { width: min(1320px, calc(100% - 72px)); margin-inline: auto; padding-bottom: 56px; }
.grape-loading-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 22px; }
.grape-loading-head h3 { font-size: 30px; letter-spacing: -1px; }
.grape-loading-head p { max-width: 420px; font-size: 15px; color: var(--muted); }
.grape-loading .grape-table-wrap { background: var(--cream); }
.grape-load-table td { text-align: end; font-variant-numeric: tabular-nums; }
.grape-load-table thead th:not(:first-child) { text-align: end; }
.grape-load-table td:last-child { font-weight: 600; color: var(--green); }

/* Documents: three columns under the heading */
.grape-checklist-docs { grid-template-columns: repeat(3, 1fr); }

/* Bands line up with the content column */
.grape-page .grape-band, .grape-page .quality-packing-section, .grape-page .quality-brief-section { width: min(1320px, calc(100% - 112px)); }
.grape-page .grape-band > .wrap, .grape-page .quality-packing-grid, .grape-page .quality-brief-grid, .grape-page .grape-loading { width: calc(100% - 80px); }

/* Enquiry form */
.quality-brief-grid { align-items: start; }
.quality-brief-intro { position: sticky; top: 90px; }
.quality-field label, .grape-fields legend { font-size: 13px; font-weight: 500; }
.grape-variety-options label { font-size: 14px; }
.grape-page .quality-field input, .grape-page .quality-field select, .grape-page .quality-field textarea { font-size: 15px; }
.grape-page .quality-field select { appearance: none; padding-inline-end: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-size: 6px 6px; background-repeat: no-repeat; background-position: right 20px center, right 14px center; }
[dir=rtl] .grape-page .quality-field select { background-position: left 14px center, left 20px center; }
.quality-brief-reminder p, .quality-form-note { font-size: 13.5px; }

/* Closing email row */
.quality-closing p { font-size: 15px; }
.quality-closing a { font-size: 15px; gap: 8px; align-items: center; }

/* Floating enquiry button on phones and tablets */
.grape-sticky-cta { display: none; }

@media (max-width: 1100px) {
  .grape-page .grape-band, .grape-page .quality-packing-section, .grape-page .quality-brief-section { width: calc(100% - 64px); }
  .grape-page .grape-band > .wrap, .grape-page .quality-packing-grid, .grape-page .quality-brief-grid, .grape-page .grape-loading { width: calc(100% - 56px); }
  .grape-checklist-docs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .grape-page .grape-band, .grape-page .quality-packing-section, .grape-page .quality-brief-section { width: calc(100% - 40px); }
  .grape-page .grape-band > .wrap, .grape-page .quality-packing-grid, .grape-page .quality-brief-grid, .grape-page .grape-loading { width: calc(100% - 40px); }
  .grape-hero .quality-hero-image { height: 360px; }
  .grape-contents > .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-inline: 20px; }
  .grape-contents > .wrap::-webkit-scrollbar { display: none; }
  .grape-contents a.grape-contents-cta { margin-inline-start: 0; }
  .quality-brief-intro { position: static; }
  .grape-loading-head { display: block; }
  .grape-loading-head p { margin-top: 10px; }
  .grape-flow li small { margin-top: 3px; }
  .grape-sticky-cta { display: flex; justify-content: space-between; position: fixed; z-index: 19; bottom: max(16px, env(safe-area-inset-bottom)); inset-inline-start: 16px; inset-inline-end: 84px; min-height: 52px; font-size: 14px; box-shadow: 0 6px 18px rgb(0 0 0 / .2); transition: opacity .2s, transform .2s; }
  .grape-sticky-cta.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
  .grape-page .quality-closing { padding-bottom: 90px; }
}
@media (max-width: 560px) {
  .grape-page .grape-band, .grape-page .quality-packing-section, .grape-page .quality-brief-section { width: calc(100% - 24px); }
  .grape-page .grape-band > .wrap, .grape-page .quality-packing-grid, .grape-page .quality-brief-grid, .grape-page .grape-loading { width: calc(100% - 32px); }
  .grape-hero .quality-hero-image { height: 300px; }
  .grape-hero-actions { flex-direction: column; align-items: stretch; }
  .grape-hero-actions > * { justify-content: space-between; }
  .grape-checklist-docs { grid-template-columns: 1fr; }
  .grape-page .quality-field input, .grape-page .quality-field select, .grape-page .quality-field textarea { font-size: 16px; }
  .grape-load-table td { text-align: start; }
}
@media (prefers-reduced-motion: reduce) { .grape-sticky-cta { transition: none; } }
@media (max-width: 560px) {
  .grape-table tbody tr { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .grape-table tbody td { font-size: 14px; }
  .grape-table tbody td::before { font-size: 10.5px; letter-spacing: .6px; }
}
@media (max-width: 800px) {
  .grape-sticky-cta { gap: 12px; padding: 0 18px; font-size: 13.5px; white-space: nowrap; }
  .grape-sticky-cta > span { flex-shrink: 0; }
}
/* contain the visually hidden table header on phones, so it cannot widen the page */
.grape-table-wrap { position: relative; }
@media (max-width: 800px) {
  .grape-sticky-cta { white-space: normal; line-height: 1.25; text-align: start; }
}
/* long compound words (German, Finnish, Dutch) must break on narrow screens */
.grape-page main h1, .grape-page main h2, .grape-page main h3 { hyphens: auto; overflow-wrap: break-word; }
.grape-facts > div { min-width: 0; }
.grape-facts dd, .grape-facts dt { hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 560px) { .grape-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Programme pages share these styles (table grapes and fresh strawberries) */
.grape-modes { margin-top: 18px; }
.grape-modes .grape-table tbody th { width: 22%; }
@media (max-width: 560px) { .grape-modes .grape-table tbody th { width: auto; } }

/* long German/Finnish words in headings and timeline records on phones */
.grape-flow li small, .grape-flow li strong { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .grape-page .quality-section-heading h2, .grape-page .grape-split-intro h2, .grape-page .quality-packing-copy h2 { font-size: clamp(26px, 7.6vw, 37px); }
  .grape-flow li { padding-inline-end: 10px; }
}
