/* TwinPegs — how WordPress blocks wear the design.
   theme.css holds the design itself. This file maps core block markup onto it and styles ordinary pages and posts. */

/* ---------- WordPress wrappers ---------- */

.wp-site-blocks { padding: 0; }
.wp-block-template-part { display: contents; }   /* lets the header stick to the page, not to its wrapper */
.wp-site-blocks > main { margin: 0; }

.wp-block-image { margin: 0; }
.wp-block-image img { display: block; }
.wp-block-heading { margin: 0; }
.wp-block-quote { margin: 0; padding: 0; border: 0; }
.wp-block-quote cite { display: block; font-style: normal; }
.wp-block-shortcode { margin: 0; }

/* ---------- Announcement and header ---------- */

.announce { display: flex; justify-content: center; flex-wrap: wrap; }
.announce p { font: inherit; letter-spacing: inherit; }
.announce .more::before { content: "/"; margin-inline: 0.6em; }
@media (max-width: 620px) { .announce .more { display: none; } }

.header .logo { margin: 0; }
.header .logo img { height: 74px; width: auto; }
.header .nav p { margin: 0; }
.header .nav a { display: block; }
.header > p { margin: 0; flex: none; }           /* the cart shortcode's paragraph */
@media (max-width: 900px) {
  .header .logo img { height: 50px; }
  .header > p:has(.cart) { margin-left: auto; }
  .header .nav p { border-bottom: 1px solid var(--line); }
  .header .nav a { border-bottom: 0; }
}

/* Logged-in editors see WordPress's toolbar above the page; keep the sticky header below it. */
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .header { top: 0; } }

/* ---------- Buttons ---------- */

.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.wp-block-button__link:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.wp-block-button.is-style-dark .wp-block-button__link { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

/* ---------- Text links: a paragraph with the class tp-link ---------- */

.tp-link a {
  font-weight: 600;
  text-decoration: underline 2px var(--gold);
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}
.tp-link a:hover { color: var(--gold); }
.band--light .tp-link a { text-decoration-color: var(--ink); }
.band--light .tp-link a:hover { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 4px; }

/* ---------- Hero ---------- */

.hero > .hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
@media (max-width: 620px) { .hero > .hero-media img { object-position: 64% 50%; } }
.hero h1 em { font-style: normal; color: var(--gold); }

/* ---------- Sections ---------- */

.why-photo .crop figure { height: 100%; }
.why-photo > p { margin-top: 12px; font-size: 1rem; color: var(--muted); }

.photo > .wp-block-image { height: 100%; }
.photo > .wp-block-image img { width: 100%; height: 100%; min-height: clamp(420px, 56vw, 720px); object-fit: cover; }
@media (max-width: 900px) { .photo > .wp-block-image img { min-height: 0; aspect-ratio: 4 / 3; } }

.proof .wp-block-quote cite { margin-top: 32px; max-width: 46ch; color: var(--soft); font-size: 1.125rem; }
.proof .wp-block-quote cite strong { display: block; font: 700 1.75rem/1.1 var(--display); text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }

.quotes .wp-block-quote cite { font-size: 1rem; line-height: 1.4; color: var(--soft); }
.quotes .wp-block-quote cite strong { display: block; font: 700 1.375rem/1.1 var(--display); text-transform: uppercase; color: var(--white); margin-bottom: 2px; }

.inline-quote cite { margin-top: 10px; font-size: 1rem; color: var(--soft); }

.all > .wp-block-shortcode, .all > p { min-width: 0; }
.band-head .tp-link { margin: 0; }

.foot nav p { margin: 0; break-inside: avoid; }
.foot nav a { display: block; padding: 5px 0; }

/* ---------- Ordinary pages and posts ---------- */

.tp-page { background: var(--bone); color: var(--ink); padding: clamp(40px, 6vw, 88px) var(--gutter) var(--sec); min-height: 60vh; }
.tp-page :focus-visible { outline-color: var(--ink); }
.tp-page > * { max-width: var(--measure); margin-inline: auto; }
.tp-page > .alignwide, .tp-page > .tp-wide, .tp-page > .tp-content { max-width: var(--max); }
.tp-page .wp-block-post-title, .tp-page .wp-block-query-title { font-size: clamp(2.5rem, 5.4vw, 4.5rem); line-height: 0.96; margin-bottom: clamp(24px, 3vw, 40px); }
.tp-page .wp-block-post-date { color: var(--muted); font-size: 1rem; margin-bottom: 20px; }

.tp-content > * { max-width: var(--measure); margin-inline: auto; }
.tp-content > * + * { margin-top: 1.2em; }
.tp-content > .alignwide { max-width: var(--max); }
.tp-content > .alignfull { max-width: none; }
.tp-content h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); margin-top: 1.6em; }
.tp-content h3 { font-size: 1.625rem; margin-top: 1.5em; }
.tp-content a { text-decoration: underline 2px var(--ink); text-underline-offset: 0.25em; font-weight: 600; }
.tp-content a:hover { text-decoration-color: var(--gold); text-decoration-thickness: 4px; }
.tp-content ul, .tp-content ol { padding-left: 1.3em; list-style: revert; }
.tp-content li + li { margin-top: 0.4em; }
.tp-content img { height: auto; }
.tp-content figcaption { margin-top: 10px; font-size: 1rem; color: var(--muted); }
.tp-content .wp-block-quote { border-left: 0; border-top: 2px solid var(--ink); padding-top: 20px; font-size: 1.375rem; line-height: 1.45; }
.tp-content .wp-block-quote cite { margin-top: 12px; font-size: 1rem; color: var(--muted); }
.tp-content .wp-block-button__link { border-color: var(--ink); }
.tp-content .wp-block-button__link:hover { background: var(--ink); border-color: var(--ink); color: var(--gold); }

/* Lists of posts */
.tp-posts { display: grid; gap: 0; }
.tp-posts > li { padding: 26px 0; border-top: 1px solid var(--bone-line); }
.tp-posts > li:last-child { border-bottom: 1px solid var(--bone-line); }
.tp-posts .wp-block-post-title { font-size: clamp(1.75rem, 2.8vw, 2.25rem); line-height: 1.04; margin-bottom: 8px; }
.tp-posts .wp-block-post-title a { text-decoration: none; }
.tp-posts .wp-block-post-title a:hover { text-decoration: underline 3px var(--gold); text-underline-offset: 0.18em; }
.tp-posts .wp-block-post-date { margin-bottom: 8px; }
.tp-posts .wp-block-post-excerpt__excerpt { margin: 0; max-width: 64ch; }
.tp-posts .wp-block-post-excerpt__more-text { margin: 8px 0 0; }

.wp-block-query-pagination { margin-top: 36px; display: flex; gap: 20px; font-weight: 600; }
.wp-block-search__inside-wrapper { display: flex; gap: 10px; }
.wp-block-search__input { height: 58px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 2px; font: 500 1.125rem/1.2 var(--text); background: var(--white); color: var(--ink); flex: 1; min-width: 0; }
.wp-block-search__button { margin: 0; height: 58px; padding: 0 28px; background: var(--ink); border: 2px solid var(--ink); border-radius: 2px; color: var(--gold); font: 700 1.375rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.wp-block-search__label { display: block; margin-bottom: 8px; font: 600 0.9375rem/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Team page ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 32px 24px; }
.team-grid .member img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.team-grid .member h3 { margin-top: 14px; font-size: 1.5rem; line-height: 1.05; }
.team-grid .member p { margin-top: 4px; font-size: 1rem; color: var(--muted); }
.tp-content > .team-grid > * + * { margin-top: 0; }

/* ---------- Galleries, video and questions on ordinary pages ---------- */
.tp-content .wp-block-gallery { gap: 12px; }
.tp-content .wp-block-video video, .tp-content .wp-block-embed iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; background: var(--black); }
.tp-content .wp-block-details { border-top: 1px solid var(--bone-line); padding: 16px 0; margin-top: 0; }
.tp-content > :not(.wp-block-details) + .wp-block-details { margin-top: 1.8em; }
.tp-content .wp-block-details:last-of-type { border-bottom: 1px solid var(--bone-line); }
.tp-content .wp-block-details summary { cursor: pointer; font: 700 1.5rem/1.15 var(--display); text-transform: uppercase; }
.tp-content .wp-block-details[open] summary { margin-bottom: 12px; }
.tp-content .wp-block-details > * + * { margin-top: 1em; }
.tp-content .wp-block-table table { width: 100%; border-collapse: collapse; }
.tp-content .wp-block-table td { border: 1px solid var(--bone-line); padding: 10px 12px; vertical-align: top; }
/* ---------- Reviews ---------- */

.stars { font-size: 1.25rem; line-height: 1; letter-spacing: 0.08em; color: var(--ink); white-space: nowrap; }
.stars i { font-style: normal; opacity: 0.25; }
.reviews { max-width: var(--measure); }
.tp-content > .reviews { margin-inline: auto; }
.reviews-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 8px; }
.reviews-total .stars { font-size: 1.75rem; }
.reviews-total b { font: 700 2.25rem/1 var(--display); }
.reviews-total span:last-child { color: var(--muted); }
.review { padding: 28px 0; border-top: 1px solid var(--bone-line); }
.review:first-of-type { border-top: 2px solid var(--ink); margin-top: 20px; }
.review header { display: grid; gap: 10px; margin-bottom: 12px; }
.tp-content .review-title, .review-title { font: 700 1.5rem/1.15 var(--display); text-transform: uppercase; margin: 0; }
.review p { margin: 0 0 0.8em; max-width: 65ch; }
.review-pics { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.review-pics a { display: block; }
.review-pics img { display: block; width: 160px; height: 120px; object-fit: cover; }
.review footer { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; margin-top: 12px; font-size: 1rem; }
.review footer span { color: var(--muted); }
.tp-content .review footer a, .review footer a { font-weight: 400; text-decoration: underline 1px; text-underline-offset: 0.2em; }
.review-reply { margin: 16px 0 0; padding-left: 16px; border-left: 2px solid var(--ink); }
.pdp-rating { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; font-size: 1rem; }
.pdp-rating a { text-decoration: underline 1px; text-underline-offset: 0.2em; }
#reviews .reviews { margin-inline: 0; }
@media (max-width: 600px) {
  .review-pics img { width: 120px; height: 90px; }
}

/* The form for a new review comes from the plugin CusRev. Its own list and summary are switched off:
   the theme shows the reviews itself. */
.review-write { margin-top: 28px; padding-top: 28px; border-top: 2px solid var(--ink); }
.tp-content .review-write h3, .review-write h3 { font: 700 1.75rem/1.1 var(--display); text-transform: uppercase; margin: 0 0 8px; }
.review-write > p { margin: 0 0 20px; max-width: 55ch; }
.review-write .cr-all-reviews-shortcode > *:not(.cr-review-form-wrap):not(.cr-summaryBox-wrap) { display: none !important; }
.review-write .cr-summaryBox-wrap { display: block; border: 0; padding: 0; margin: 0; background: none; }
.review-write .cr-summaryBox-wrap > *:not(.cr-add-review-wrap) { display: none !important; }
.review-write .cr-add-review-wrap { display: block; padding: 0; }
.review-write .cr-all-reviews-shortcode .cr-summaryBox-wrap .cr-add-review-wrap .cr-all-reviews-add-review,
.review-write .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit,
.review-write .cr-review-form-wrap .cr-review-form-continue {
  display: inline-flex; align-items: center; justify-content: center; width: auto; height: 58px; min-height: 58px; padding: 0 28px; margin: 0;
  border: 2px solid var(--ink); border-radius: 2px; background: var(--ink) !important; color: var(--white) !important;
  font: 700 1.0625rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
}
.review-write .cr-all-reviews-shortcode .cr-summaryBox-wrap .cr-add-review-wrap .cr-all-reviews-add-review:hover,
.review-write .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit:hover,
.review-write .cr-review-form-wrap .cr-review-form-continue:hover { background: transparent !important; color: var(--ink) !important; }
.review-write .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-cancel {
  height: 58px; padding: 0 28px; border: 2px solid var(--ink); border-radius: 2px; background: transparent; color: var(--ink);
  font: 700 1.0625rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
}
.review-write .cr-review-form-wrap { max-width: 640px; }
.review-write .cr-review-form-wrap, .review-write .cr-review-form-wrap input, .review-write .cr-review-form-wrap textarea { font-family: inherit; }
.review-write .cr-review-form-wrap input[type="text"], .review-write .cr-review-form-wrap input[type="email"], .review-write .cr-review-form-wrap textarea {
  border: 1px solid var(--ink); border-radius: 2px; background: var(--white); color: var(--ink);
}
.review-write .cr-all-reviews-shortcode .cr-summaryBox-wrap, .review-write .cr-all-reviews-shortcode .cr-summaryBox-wrap .cr-add-review-wrap { background: none !important; border: 0 !important; box-shadow: none; padding: 0 !important; margin: 0; width: auto; display: block; }

/* ---------- News: pictures in the list and on the post ---------- */
.tp-posts > li { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0 32px; align-items: start; }
.tp-posts > li > .wp-block-post-featured-image { margin: 0; }
.tp-posts > li > .wp-block-post-featured-image img { display: block; width: 240px; height: 160px; object-fit: cover; }
.tp-posts > li > .tp-post-text { grid-column: 2; }
.tp-posts > li > .tp-post-text:first-child { grid-column: 1 / -1; }
.tp-page > .tp-post-picture { max-width: var(--measure); margin: 0 auto 32px; }
.tp-page > .tp-post-picture img { display: block; width: 100%; height: auto; }
.tp-page > .tp-post-end { max-width: var(--measure); margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--bone-line); display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: baseline; }
.tp-post-end .wp-block-post-terms { color: var(--muted); font-size: 1rem; }
.tp-post-end .tp-link { margin: 0; }
.member-portrait img { width: 280px; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.tp-content .member-role { margin-top: 12px; color: var(--muted); font-size: 1rem; }
.team-grid .member h3 a { text-decoration: underline 2px var(--ink); text-underline-offset: 0.2em; }
.team-grid .member h3 a:hover { text-decoration-color: var(--gold); text-decoration-thickness: 4px; }
@media (max-width: 640px) {
  .tp-posts > li { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tp-posts > li > .wp-block-post-featured-image img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .tp-posts > li > .tp-post-text { grid-column: 1; }
}

/* ---------- Affiliate area (AffiliateWP): sign in, apply, and the partner's own pages ---------- */
.tp-content:has(> .affwp-form) { display: flex; flex-direction: column; }
.tp-content:has(> .affwp-form) > * { width: 100%; }
.tp-content > .affwp-login-form { order: 1; }
.tp-content > .affwp-register-form { order: 2; }
.affwp-form { max-width: 560px; margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--ink); }
.tp-content > .affwp-form { margin-inline: auto 0; margin-left: max(0px, calc((100% - var(--measure)) / 2)); }
.affwp-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.affwp-form legend { padding: 0; margin: 0 0 20px; font: 700 1.75rem/1.1 var(--display); text-transform: uppercase; }
.affwp-form p { margin: 0 0 18px; }
.affwp-form label { display: block; margin-bottom: 6px; font: 600 0.8125rem/1.2 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.affwp-form input[type="text"], .affwp-form input[type="email"], .affwp-form input[type="password"], .affwp-form input[type="url"], .affwp-form select, .affwp-form textarea {
  display: block; width: 100%; height: 58px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 2px; background: var(--white); color: var(--ink); font: inherit;
}
.affwp-form textarea { height: auto; min-height: 140px; padding: 14px 16px; }
.affwp-form input:focus-visible, .affwp-form textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.affwp-form label.affwp-tos, .affwp-form label.affwp-user-remember { display: flex; align-items: center; gap: 10px; font: inherit; letter-spacing: 0; text-transform: none; }
.affwp-form label.affwp-tos input, .affwp-form label.affwp-user-remember input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); }
.affwp-form input[type="submit"], .affwp-form .button {
  height: 58px; padding: 0 28px; border: 2px solid var(--ink); border-radius: 2px; background: var(--ink); color: var(--white); cursor: pointer;
  font: 700 1.0625rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase;
}
.affwp-form input[type="submit"]:hover, .affwp-form .button:hover { background: transparent; color: var(--ink); }
.affwp-form .affwp-lost-password { margin: 0; font-size: 1rem; }
.affwp-errors, .affwp-notice { max-width: var(--measure); margin-inline: auto; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 2px; background: var(--white); color: var(--ink); }
.affwp-errors .affwp-error { margin: 0; }
#affwp-affiliate-dashboard { max-width: var(--measure); margin-inline: auto; }
#affwp-affiliate-dashboard table { width: 100%; border-collapse: collapse; font-size: 1rem; }
#affwp-affiliate-dashboard th, #affwp-affiliate-dashboard td { padding: 12px 10px; border-bottom: 1px solid var(--bone-line); text-align: left; }
#affwp-affiliate-dashboard th { font: 600 0.8125rem/1.2 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
#affwp-affiliate-dashboard-tabs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0 0 16px; margin: 0 0 24px; border-bottom: 2px solid var(--ink); }
#affwp-affiliate-dashboard-tabs li { margin: 0; }
#affwp-affiliate-dashboard-tabs a { text-decoration: none; font: 700 1.0625rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
#affwp-affiliate-dashboard-tabs .active a, #affwp-affiliate-dashboard-tabs a:hover { text-decoration: underline 3px var(--gold); text-underline-offset: 0.3em; }

/* ================= After the design review ================= */

:root { --measure: 700px; }

/* One button system on light grounds: gold with ink border is the main action, an ink outline the second. */
.btn-outline, .wp-block-query-pagination a, .review-write .cr-all-reviews-shortcode .cr-summaryBox-wrap .cr-add-review-wrap .cr-all-reviews-add-review {
  display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 28px; border: 2px solid var(--ink) !important; border-radius: 2px;
  background: transparent !important; color: var(--ink) !important; text-decoration: none; cursor: pointer;
  font: 700 1.375rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase;
}
.btn-outline:hover, .wp-block-query-pagination a:hover, .review-write .cr-all-reviews-shortcode .cr-summaryBox-wrap .cr-add-review-wrap .cr-all-reviews-add-review:hover { background: var(--ink) !important; color: var(--gold) !important; }
.affwp-form input[type="submit"], .affwp-form .button, .wp-block-search__button,
.review-write .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit, .review-write .cr-review-form-wrap .cr-review-form-continue {
  background: var(--gold) !important; color: var(--ink) !important; border: 2px solid var(--ink) !important; font: 700 1.375rem/1 var(--display); letter-spacing: 0.05em;
}
.affwp-form input[type="submit"]:hover, .affwp-form .button:hover, .wp-block-search__button:hover,
.review-write .cr-review-form-wrap .cr-review-form-buttons .cr-review-form-submit:hover, .review-write .cr-review-form-wrap .cr-review-form-continue:hover { background: var(--ink) !important; color: var(--gold) !important; }
.tp-content .wp-block-button__link { text-decoration: none; }

/* Affiliate fields match the contact form. */
.affwp-form input[type="text"], .affwp-form input[type="email"], .affwp-form input[type="password"], .affwp-form input[type="url"], .affwp-form select, .affwp-form textarea { border-width: 2px; font: 500 1.125rem/1.4 var(--text); }
.affwp-form label { font-size: 0.9375rem; }
.affwp-form label.affwp-tos input, .affwp-form label.affwp-user-remember input { appearance: none; border: 2px solid var(--ink); border-radius: 2px; background: var(--white); }
.affwp-form label.affwp-tos input:checked, .affwp-form label.affwp-user-remember input:checked { background: var(--ink); box-shadow: inset 0 0 0 3px var(--white); }

/* Pictures are never shown larger than they are, and a tall portrait does not fill the screen. */
.tp-page > .tp-post-picture img { width: auto; max-width: 100%; max-height: 620px; }
.tp-content > .wp-block-image img { max-height: 620px; width: auto; max-width: 100%; }
.tp-content > .wp-block-image.member-portrait img { max-height: none; }

/* Pages with a wide grid (team, gallery): the title and text start at the edge of the grid. */
.tp-page:has(> .tp-content > .alignwide) > .wp-block-post-title { max-width: var(--max); }
.tp-page:has(> .tp-content > .alignwide) > .tp-content > :not(.alignwide):not(.alignfull) { margin-left: 0; }

/* Gallery: even tiles. */
.tp-content .wp-block-gallery.alignwide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tp-content .wp-block-gallery.alignwide > .wp-block-image { width: auto !important; margin: 0 !important; }
.tp-content .wp-block-gallery.alignwide > .wp-block-image img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; max-height: none; }
@media (max-width: 760px) { .tp-content .wp-block-gallery.alignwide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Questions open with a plus, drawn like the one in the quantity stepper. */
.tp-content .wp-block-details summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.tp-content .wp-block-details summary::-webkit-details-marker { display: none; }
.tp-content .wp-block-details summary::after { content: ""; flex: none; width: 18px; height: 18px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.5px 100% no-repeat; }
.tp-content .wp-block-details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 100% 2.5px no-repeat; }

/* Reviews page */
.tp-content .reviews-jump { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-bottom: 20px; border-bottom: 1px solid var(--bone-line); }
.tp-content .reviews-jump a { text-decoration: none; font: 700 1.125rem/1.2 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.tp-content .reviews-jump a:hover { text-decoration: underline 3px var(--gold); text-underline-offset: 0.3em; }
.tp-content h2[id], #write-review { scroll-margin-top: 110px; }
.review:first-of-type { border-top: 1px solid var(--bone-line); }
.review-text.is-short { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.review-more { margin: 4px 0 0; padding: 0; border: 0; background: none; cursor: pointer; font: 600 1rem/1.4 var(--text); color: var(--ink); text-decoration: underline 2px var(--ink); text-underline-offset: 0.25em; }
.review-more:hover { text-decoration-color: var(--gold); text-decoration-thickness: 4px; }
.reviews-all { margin: 28px 0 0; padding-top: 28px; border-top: 1px solid var(--bone-line); }
.review-write h3 + p, .tp-content .review-write h3 + p { margin-top: 12px; }
@media (max-width: 600px) {
  .review-pics { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
  .review-pics a { flex: none; scroll-snap-align: start; }
}

/* Product page: reviews next to the invitation to write one. */
#reviews .reviews { max-width: none; display: grid; grid-template-columns: minmax(0, 700px) minmax(0, 1fr); gap: 0 clamp(32px, 6vw, 96px); align-items: start; }
#reviews .reviews > .review, #reviews .reviews > p { grid-column: 1; }
#reviews .reviews > #write-review, #reviews .reviews > .review-write { grid-column: 2; grid-row: 1 / span 20; }
#reviews .reviews .review-write { margin-top: 0; padding-top: 28px; border-top: 1px solid var(--bone-line); }
@media (max-width: 980px) { #reviews .reviews { display: block; } #reviews .reviews .review-write { margin-top: 28px; } }

/* News */
.wp-block-query-pagination { align-items: center; }
.tp-post-end .tp-link a { text-decoration-color: var(--ink); }

/* The page you are on, in the menu. */
.header .nav a[aria-current="page"] { text-decoration: underline 3px var(--gold); text-underline-offset: 0.45em; }

/* A partner logo sits in a frame instead of floating on the page. */
.tp-content > .wp-block-image:first-child img[src*="Logo"], .tp-content > .wp-block-image:first-child img[src*="logo"] { max-width: 320px; height: auto; padding: 20px; background: var(--white); border: 1px solid var(--bone-line); }
.reviews-total span:last-child { color: inherit; }
.reviews-total > span:last-child { color: var(--muted); }
.finder-msg[hidden] { display: none; }

/* Kit finder: the kit that is found is itself a link to its page. */
.result > .result-kit { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; color: inherit; text-decoration: none; }
.result > .result-kit:hover b, .result > .result-kit:focus-visible b { text-decoration: underline 3px var(--gold); text-underline-offset: 0.2em; }

/* ---------- Team: people in three groups, each a card; a person with text of their own is a link ---------- */
.team { display: grid; gap: clamp(40px, 5vw, 72px); }
.tp-content > .team > * + * { margin-top: 0; }
.team-group h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin: 0 0 24px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); scroll-margin-top: 110px; }
.team-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.team-grid .member { display: block; color: inherit; text-decoration: none; }
.team-grid .member img, .team-grid .member-blank { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--bone-line); }
.team-grid .member-name { display: block; margin-top: 14px; font: 700 1.5rem/1.05 var(--display); text-transform: uppercase; }
.team-grid .member-title { display: block; margin-top: 6px; font-size: 1rem; color: var(--muted); }
.team-grid a.member .member-name { text-decoration: underline 2px var(--ink); text-underline-offset: 0.2em; }
.team-grid a.member:hover .member-name, .team-grid a.member:focus-visible .member-name { text-decoration-color: var(--gold); text-decoration-thickness: 4px; }
.tp-member > .tp-back { margin-bottom: 16px; font-size: 1rem; }
.tp-member > .tp-back a { text-decoration: underline 1px; text-underline-offset: 0.25em; color: var(--muted); }
.tp-member > .tp-back a::before { content: "← "; }
.tp-member > .wp-block-post-title { margin-bottom: 24px; }
.tp-member > .member-head { margin-bottom: 32px; }
.member-head img.member-portrait { display: block; width: 320px; max-width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.member-head .member-role { margin: 14px 0 0; color: var(--muted); font-size: 1rem; }

/* A review that goes with a ride report links to it. */
.review .review-link { margin: 4px 0 0; }
.review .review-link a { font-weight: 600; text-decoration: underline 2px var(--ink); text-underline-offset: 0.25em; }
.review .review-link a:hover { text-decoration-color: var(--gold); text-decoration-thickness: 4px; }
.review header:empty { display: none; }

/* Seven items in the top menu: keep each on one line, and tighten the row on narrower desktops. */
.header .nav a { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1080px) {
  .header .nav { gap: 6px 18px; }
  .header .nav a { font-size: 1.0625rem; letter-spacing: 0.04em; }
}

/* ================= After the second design review ================= */

/* The page title alone sets the gap to the first block. */
.tp-content > :first-child { margin-top: 0; }

/* Team overview */
.tp-content > .team { margin-top: clamp(40px, 5vw, 72px); }
.team-grid a.member { font-weight: 400; }
.team-grid a.member .member-name { text-decoration: none; }
.team-grid a.member:hover .member-name, .team-grid a.member:focus-visible .member-name { text-decoration: underline 3px var(--gold); text-underline-offset: 0.2em; }
.team-grid .member img { object-position: 50% 30%; }
/* A group of one is a feature row, not a lone card in a wide grid. */
.team-grid:has(> .member:only-child) { display: block; }
.team-grid:has(> .member:only-child) > .member { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); grid-template-rows: 1fr auto auto; column-gap: 32px; max-width: 700px; }
.team-grid:has(> .member:only-child) > .member img, .team-grid:has(> .member:only-child) > .member .member-blank { grid-row: 1 / -1; }
.team-grid:has(> .member:only-child) > .member .member-name { grid-column: 2; grid-row: 2; margin-top: 0; font-size: clamp(2rem, 3.4vw, 2.75rem); }
.team-grid:has(> .member:only-child) > .member .member-title { grid-column: 2; grid-row: 3; font-size: 1.125rem; padding-bottom: 4px; }
@media (max-width: 620px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .team-grid .member-name { font-size: 1.125rem; margin-top: 10px; }
  .team-grid .member-title { font-size: 0.9375rem; }
  .team-grid:has(> .member:only-child) > .member { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
  .team-grid:has(> .member:only-child) > .member .member-name { font-size: 1.5rem; }
}

/* A person's page: name and title at the page edge, picture beside the text. */
.tp-page.tp-member { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 72px); align-items: start; padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.tp-page.tp-member > * { max-width: none; margin-inline: 0; }
.tp-member > .tp-back, .tp-member > .wp-block-post-title, .tp-member > .member-role { grid-column: 1 / -1; }
.tp-member > .wp-block-post-title { margin-bottom: 8px; }
.tp-member > .member-role { margin: 0 0 32px; color: var(--muted); font: 600 1.125rem/1.3 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.tp-member > .member-head { grid-column: 1; margin: 0; }
.tp-member > .member-head img.member-portrait { width: 100%; aspect-ratio: 4 / 5; }
.tp-member > .tp-content { grid-column: 2; max-width: var(--measure); }
.tp-member > .tp-content > * { margin-inline: 0; }
.tp-member:not(:has(> .member-head)) > .tp-content { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .tp-page.tp-member { display: block; padding-inline: var(--gutter); }
  .tp-member > .member-head { margin-bottom: 28px; }
}

/* News list and post end */
.tp-posts .wp-block-post-excerpt__more-link { font-weight: 600; text-decoration: underline 2px var(--ink); text-underline-offset: 0.25em; }
.tp-posts .wp-block-post-excerpt__more-link:hover { text-decoration-color: var(--gold); text-decoration-thickness: 4px; }
.tp-page > .tp-post-end { justify-content: flex-start; }
.tp-page > .tp-post-picture img { width: 100%; height: auto; max-height: none; }
.tp-page > .tp-post-picture img[width="150"], .tp-page > .tp-post-picture img[width="300"] { width: auto; }

/* Affiliate forms are as wide as the other forms. */
.affwp-form { max-width: var(--measure); }

/* Reviews page: one rule between the list and the invitation to write. */
.reviews-all { border-top: 0; padding-top: 0; }
.reviews > #write-review .review-write, .reviews > .review-write { margin-top: 64px; }
#reviews.reviews-empty .reviews { display: block; }
#reviews.reviews-empty .review-write { margin-top: 0; padding-top: 0; border-top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; }
#reviews.reviews-empty .review-write h3 { margin: 0; }
#reviews.reviews-empty .review-write > p { margin: 0; flex: 1 1 320px; }
#reviews.reviews-empty .review-write .cr-review-form-wrap { flex-basis: 100%; }
@media (max-width: 600px) { .review-pics { margin-right: calc(var(--gutter) * -1); } }

/* Phone: targets a finger can hit. */
@media (max-width: 900px) {
  .foot nav a { padding-block: 11px; }
  .header .cart, .header .menu-toggle { min-height: 44px; display: inline-flex; align-items: center; }
  .tp-page:has(.tpc) { padding-bottom: 96px; }
}

/* Legal text: the date it was last looked over stands apart at the end. */
.tp-content .legal-date { margin-top: 2.5em; padding-top: 1em; border-top: 1px solid var(--bone-line); color: var(--soft); }

/* ================= After the third design review ================= */
.tp-content .legal-date { color: var(--muted); font-size: 0.9375rem; }
.tp-content .legal-date em { font-style: normal; }
.tp-content .wp-block-quote em { font-style: normal; }
.tp-content > .wp-block-image:not(.alignwide):not(.alignfull) img { width: auto; }
@media (max-width: 600px) { .tp-content h2 { font-size: 1.75rem; } .reviews-all .btn-outline { height: auto; white-space: normal; padding-block: 14px; line-height: 1.2; } }
@media (max-width: 900px) { .tarmac .inline-quote { margin-top: 24px; } }
@media (min-width: 901px) { .tp-member > .member-head { position: sticky; top: calc(var(--header, 96px) + 24px); } }
@media (max-width: 760px) { .team-grid:has(> .member:only-child) > .member .member-title { font-size: 0.9375rem; } }

/* Under the kit finder: what makes it safe to order. Not in the shop's own finder row. */
.finder-note { grid-column: 1 / -1; margin: 0; font-size: 1rem; line-height: 1.45; color: var(--soft); }
.shop-finder .finder-note { display: none; }

/* The company's address and number, under the contact lines in the footer. */
.foot .foot-company { margin-top: 14px; font-size: 0.9375rem; line-height: 1.5; }
/* After a list of questions the last one already draws the line above the date. */
.tp-content .wp-block-details + .legal-date { border-top: 0; padding-top: 0; margin-top: 1.5em; }

/* The newsletter sign-up: the note about Mailchimp, and the line shown while waiting. */
.tpn .tpn-note { font-size: 1rem; line-height: 1.45; color: var(--muted); max-width: 60ch; }
.tpn .tpn-note a { color: var(--ink); font-weight: 600; }
.tpn .tpn-wait { font-size: 1rem; color: var(--muted); }

/* The videos page: the films from YouTube side by side, two in a row. */
.tp-content > .video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; align-items: start; }
.tp-content > .video-grid > * { margin: 0; max-width: none; }
.tp-content > .video-grid figcaption { margin-top: 8px; }
@media (max-width: 760px) { .tp-content > .video-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.tp-content > .video-grid > :only-child { grid-column: 1 / -1; }

/* The Norwegian flag in the line at the very top, before the word Norway. */
.announce .flag { display: inline-block; height: 0.8em; width: auto; margin-inline: 0.15em 0.1em; vertical-align: -0.04em; box-shadow: 0 0 0 1px rgba(17, 17, 16, 0.25); }
/* Three films in a row, on the Reviews page. Wider than the text, and centred like it. */
.tp-content > .video-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: var(--max); gap: 28px 20px; }
@media (max-width: 900px) { .tp-content > .video-grid--3 { grid-template-columns: minmax(0, 1fr); } }

/* The Dealers page: shops under their country. */
.dealers { display: grid; gap: clamp(40px, 5vw, 64px); }
.tp-content > .dealers { margin-top: clamp(32px, 4vw, 56px); }
.tp-content > .dealers > * + * { margin-top: 0; }
.dealer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 24px; }
.dealer { display: grid; gap: 6px; align-content: start; }
.dealer .dealer-name { font: 700 1.5rem/1.1 var(--display); text-transform: uppercase; margin: 0; }
.dealer p { margin: 0; font-size: 1rem; color: var(--muted); }
.dealer .dealer-phone a, .dealer .dealer-email a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.dealer .dealer-links { display: grid; gap: 6px; justify-items: start; margin-top: 8px; }
.dealer .dealer-links a { color: var(--ink); font-weight: 600; text-decoration: underline 2px var(--ink); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.dealer .dealer-links a:hover, .dealer .dealer-links a:focus-visible { text-decoration-color: var(--gold); text-decoration-thickness: 4px; }
.dealer .dealer-links .dealer-site { font-weight: 400; }

/* ---------- Geo Popup (TwinPegs' own plugin): the theme's colours and type ---------- */
body .gp-overlay {
  --gp-bg: var(--coal);
  --gp-text: var(--white);
  --gp-muted: var(--soft);
  --gp-accent: var(--gold);
  --gp-accent-text: var(--ink);
  --gp-line: var(--line);
  --gp-radius: 0px;
  background: rgba(0, 0, 0, 0.7);
  font-family: var(--text);
}
body .gp-box { border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 0; }
body .gp-title { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1.05; letter-spacing: 0.02em; text-transform: uppercase; }
body .gp-message a { color: var(--gold); }
body .gp-dismiss--solo { border-radius: 0; font-family: var(--display); font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; padding: 13px 22px; }
body .gp-dismiss--solo:hover, body .gp-dismiss--solo:focus-visible { opacity: 1; background: var(--white); }
body .gp-overlay :focus-visible { outline-color: var(--white); }