/* Remakka — WordPress-teeman komponenttityylit (bundle.css).
   Lataa ensin tokens.css, sitten tämä. Luokat ovat WordPressin omia
   (wp-block-*, has-*-color, is-style-*, screen-reader-text, entry-content)
   sekä teeman remakka-*-luokat. Ei JavaScriptiä, ei buildia.
   Data-URI-ikonien värit on kirjoitettu heksoina tokens.jsonista, koska
   CSS-muuttujat eivät toimi data-URI:n sisällä. */

/* ---------- Perusta ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 30px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
::selection { background: var(--brand-pink); color: var(--ink); }

h1, h2, h3, h4, .remakka-display { color: var(--ink); margin: 0; text-wrap: balance; }
.remakka-display { font-size: clamp(40px, 6vw, 64px); line-height: 1.06; font-weight: 300; letter-spacing: -0.02em; }
h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.12; font-weight: 300; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4vw, 40px); line-height: 1.15; font-weight: 300; letter-spacing: -0.015em; }
h3 { font-size: clamp(24px, 3vw, 28px); line-height: 1.2; font-weight: 400; letter-spacing: -0.01em; }
h4 { font-size: 21px; line-height: 28px; font-weight: 600; }
h1 em, h2 em, h3 em, .remakka-display em { font-style: italic; }
.has-accent-em em { color: var(--brand-brown); }

p { margin: 0 0 var(--space-5); }
.remakka-lead, .is-style-lead { font-size: clamp(19px, 2vw, 21px); line-height: 1.58; }
small, .has-small-font-size { font-size: 16px; line-height: 26px; }
.remakka-eyebrow { display: block; font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-brown); margin-bottom: var(--space-2); }

.entry-content > * + h2, .remakka-flow > * + h2 { margin-top: var(--space-7); }
.entry-content > * + h3, .remakka-flow > * + h3 { margin-top: var(--space-6); }
h2 + *, h3 + *, h4 + * { margin-top: var(--space-4); }

a { color: var(--brand-brown); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ---------- Painikkeet ---------- */
.wp-block-button__link, .remakka-btn {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: var(--space-3);
  min-height: 48px; max-width: 100%;
  padding: 8px 8px 8px var(--space-5);
  border: 2px solid var(--brand-brown); border-radius: var(--radius-lg);
  background: var(--brand-brown); color: var(--ink-on-dark);
  font: 500 17px/22px var(--font-sans);
  text-align: left; text-decoration: none; white-space: normal; overflow-wrap: anywhere; hyphens: auto;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.wp-block-button__link::after, .remakka-btn::after {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--brand-pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23724319' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform .15s;
}
.wp-block-button__link:hover, .remakka-btn:hover { background: var(--brand-brown-deep); border-color: var(--brand-brown-deep); color: var(--ink-on-dark); }
.wp-block-button__link:hover::after, .remakka-btn:hover::after { transform: translateX(2px); }
.wp-block-button__link:focus-visible, .remakka-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-lg); }

/* Toissijainen: ääriviiva */
.is-style-outline > .wp-block-button__link, .remakka-btn.is-outline {
  background: transparent; color: var(--brand-brown);
}
.is-style-outline > .wp-block-button__link::after, .remakka-btn.is-outline::after {
  background: var(--brand-brown) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23feeac7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.is-style-outline > .wp-block-button__link:hover, .remakka-btn.is-outline:hover { background: var(--surface-cream); color: var(--brand-brown-deep); border-color: var(--brand-brown-deep); }

/* Ilman nuolta */
.is-style-no-arrow > .wp-block-button__link, .remakka-btn.no-arrow { padding: 11px var(--space-5); }
.is-style-no-arrow > .wp-block-button__link::after, .remakka-btn.no-arrow::after { display: none; }

/* Pieni */
.is-size-small .wp-block-button__link, .remakka-btn.is-small { min-height: 40px; padding: 4px 4px 4px var(--space-4); font-size: 15px; line-height: 20px; gap: var(--space-2); }
.is-size-small .wp-block-button__link::after, .remakka-btn.is-small::after { width: 28px; height: 28px; background-size: 16px; }

/* Tummalla taustalla (footer, ruskea ryhmä) */
.has-brand-brown-background-color .wp-block-button__link, .remakka-on-dark .wp-block-button__link, .remakka-btn.on-dark {
  background: var(--ink-on-dark); border-color: var(--ink-on-dark); color: var(--brand-brown-deep);
}
.has-brand-brown-background-color .wp-block-button__link::after, .remakka-on-dark .wp-block-button__link::after, .remakka-btn.on-dark::after {
  background: var(--brand-brown) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23feeac7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.has-brand-brown-background-color .wp-block-button__link:hover, .remakka-on-dark .wp-block-button__link:hover, .remakka-btn.on-dark:hover { background: var(--surface-raised); border-color: var(--surface-raised); color: var(--brand-brown-deep); }
.has-brand-brown-background-color :focus-visible, .remakka-on-dark :focus-visible, .remakka-btn.on-dark:focus-visible { outline-color: var(--focus-on-dark); }

/* Ikoninappi (haku, valikko) */
.remakka-iconbtn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 1.5px solid var(--line); border-radius: var(--radius-full);
  background: var(--surface-raised); color: var(--ink); cursor: pointer;
}
.remakka-iconbtn:hover { border-color: var(--brand-brown); color: var(--brand-brown); }
.remakka-iconbtn.is-filled { background: var(--brand-brown); border-color: var(--brand-brown); color: var(--ink-on-dark); }
.remakka-iconbtn:focus-visible { border-radius: var(--radius-full); }

.wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.wp-block-button { max-width: 100%; }

/* ---------- Lomakkeet ---------- */
.remakka-field { margin-bottom: var(--space-5); }
.remakka-field > label, .remakka-legend, .wp-block-search__label {
  display: block; margin-bottom: var(--space-2);
  font-size: 16px; line-height: 22px; font-weight: 600; color: var(--ink);
}
.remakka-field .remakka-optional { font-weight: 400; color: var(--ink-muted); }
input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="url"],
input[type="number"], input[type="password"], select, textarea, .wp-block-search__input {
  display: block; width: 100%; min-height: 48px;
  padding: 11px var(--space-4);
  border: 1.5px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface-raised); color: var(--ink);
  font: 400 17px/24px var(--font-sans);
  transition: border-color .15s;
}
textarea { min-height: 128px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--brand-brown); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--brand-brown); border-radius: var(--radius-md);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer;
  background: var(--surface-raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b1a0d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 20px no-repeat;
}
.remakka-help { margin: var(--space-2) 0 0; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.remakka-field.has-error input, .remakka-field.has-error select, .remakka-field.has-error textarea,
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border: 2px solid var(--error); }
.remakka-error, .remakka-success {
  display: flex; gap: var(--space-2); align-items: flex-start;
  margin: var(--space-2) 0 0; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--error);
}
.remakka-error::before, .remakka-success::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a32a24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l9 16H3z'/%3E%3Cpath d='M12 10v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center / 20px no-repeat; }
.remakka-success { color: var(--success); }
.remakka-success::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f6b22' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }

.remakka-check { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-3); font-size: 17px; line-height: 26px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] {
  flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand-brown); cursor: pointer;
}
fieldset { border: 0; padding: 0; margin: 0 0 var(--space-5); }

/* Rivilomake: kenttä + painike (uutiskirje, haku) */
.remakka-inline-form, .wp-block-search__inside-wrapper { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: stretch; }
.remakka-inline-form input, .wp-block-search__input { flex: 1 1 220px; width: auto; }
.remakka-inline-form .remakka-btn { flex: 0 1 auto; }

/* Värillisillä täytöillä (pink, olive) kentän reuna ruskea */
.has-brand-pink-background-color input, .has-brand-olive-background-color input,
.remakka-cta input, .remakka-cta select { border-color: var(--brand-brown); }
.remakka-on-dark input, .has-brand-brown-background-color input { border-color: var(--ink-on-dark); }

/* ---------- Header ---------- */
.remakka-header {
  position: sticky; top: var(--space-3); z-index: 50;
  display: flex; align-items: center; gap: var(--space-5);
  max-width: 1200px; margin: var(--space-3) auto;
  padding: 6px 6px 6px var(--space-5);
  background: var(--surface-raised); border-radius: var(--radius-full); box-shadow: var(--shadow-float);
}
.remakka-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 24px; line-height: 1; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.remakka-logo__mark svg { display: block; }
.remakka-logo__mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--brand-brown); color: var(--brand-pink); }
.remakka-logo:focus-visible { border-radius: var(--radius-full); }
.remakka-nav { flex: 1; }
.remakka-nav ul { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; padding: 0; list-style: none; }
.remakka-nav a { display: inline-block; padding: 10px 2px; color: var(--ink); font-size: 16px; line-height: 22px; font-weight: 500; text-decoration: none; }
.remakka-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.remakka-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--brand-brown); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.remakka-header__actions { display: flex; align-items: center; gap: var(--space-2); }
.remakka-header .remakka-menu-toggle { display: none; }
@media (max-width: 860px) {
  .remakka-header { gap: var(--space-3); margin: var(--space-3); }
  .remakka-nav, .remakka-header .remakka-header__cta { display: none; }
  .remakka-header__actions { margin-left: auto; }
  .remakka-header .remakka-menu-toggle { display: inline-grid; }
}
.remakka-header.is-compact { gap: var(--space-3); }
.remakka-header.is-compact .remakka-nav, .remakka-header.is-compact .remakka-header__cta { display: none; }
.remakka-header.is-compact .remakka-header__actions { margin-left: auto; }
.remakka-header.is-compact .remakka-menu-toggle { display: inline-grid; }

/* Avattu mobiilivalikko */
.remakka-mobile-menu { background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); padding: var(--space-3) var(--space-5) var(--space-5); }
.remakka-mobile-menu ul { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.remakka-mobile-menu li + li { border-top: 1.5px solid var(--line); }
.remakka-mobile-menu li a { display: block; padding: 14px 0; color: var(--ink); font-size: 20px; line-height: 26px; text-decoration: none; }
.remakka-mobile-menu { margin: 0 var(--space-3) var(--space-3); }
.remakka-mobile-menu[hidden] { display: none; }
@media (min-width: 861px) { .remakka-mobile-menu { display: none; } }

/* ---------- Footer ---------- */
.remakka-footer { background: var(--brand-brown); color: var(--ink-on-dark); padding: var(--space-9) var(--space-5) 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.remakka-footer a { color: var(--ink-on-dark); }
.remakka-footer :focus-visible { outline-color: var(--focus-on-dark); }
.remakka-footer__inner { max-width: 1200px; margin: 0 auto; }
.remakka-footer__grid { display: grid; grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(140px, 1fr)); gap: var(--space-7) var(--space-6); }
.remakka-footer h2 { color: var(--ink-on-dark); font-size: 28px; line-height: 34px; font-weight: 300; margin-bottom: var(--space-3); }
.remakka-footer h3 { color: var(--ink-on-dark-muted); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--space-4); }
.remakka-footer p { color: var(--ink-on-dark-muted); font-size: 16px; line-height: 26px; }
.remakka-footer ul { list-style: none; margin: 0; padding: 0; }
.remakka-footer li { margin-bottom: var(--space-2); }
.remakka-footer li a { font-size: 16px; line-height: 26px; text-decoration: none; }
.remakka-footer li a:hover { text-decoration: underline; }
.remakka-footer .remakka-inline-form input { border-color: var(--ink-on-dark); }
.remakka-disclosure { display: flex; gap: var(--space-3); margin-top: var(--space-7); padding: var(--space-5); border: 1.5px solid var(--ink-on-dark-muted); border-radius: var(--radius-lg); font-size: 15px; line-height: 24px; color: var(--ink-on-dark); }
.remakka-disclosure svg { flex: none; color: var(--brand-pink); }
.remakka-footer__word { display: block; margin: var(--space-7) 0 var(--space-4); font-size: clamp(64px, 11vw, 144px); line-height: .78; font-weight: 300; letter-spacing: -0.04em; color: var(--brand-pink); user-select: none; }
.remakka-footer__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin: 0 calc(-1 * var(--space-5)); padding: var(--space-4) var(--space-5); background: var(--brand-brown-deep); font-size: 14px; line-height: 20px; color: var(--ink-on-dark-muted); }
.remakka-footer__bar a { color: var(--ink-on-dark); }
@media (max-width: 860px) { .remakka-footer__grid { grid-template-columns: 1fr 1fr; } .remakka-footer__brand { grid-column: 1 / -1; } }

/* ---------- WordPress-perusblokit ---------- */
.wp-block-list, .entry-content ul, .entry-content ol, .remakka-flow ul, .remakka-flow ol { margin: 0 0 var(--space-5); padding-left: 1.4em; }
.wp-block-list li, .remakka-flow li { margin-bottom: var(--space-2); padding-left: .2em; }
ul.wp-block-list li::marker, .remakka-flow ul li::marker { color: var(--brand-brown); font-size: 1.1em; }
ol.wp-block-list li::marker, .remakka-flow ol li::marker { color: var(--brand-brown); font-weight: 600; }
ul.is-style-tassut { list-style: none; padding-left: 0; }
ul.is-style-tassut li { position: relative; padding-left: 34px; }
ul.is-style-tassut li::before { content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23724319' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12.5c-2.7 0-5.2 2.6-5.2 4.9 0 1.6 1.2 2.6 2.7 2.6.9 0 1.6-.4 2.5-.4s1.6.4 2.5.4c1.5 0 2.7-1 2.7-2.6 0-2.3-2.5-4.9-5.2-4.9z'/%3E%3Ccircle cx='5.6' cy='10.4' r='1.8'/%3E%3Ccircle cx='9.2' cy='6.3' r='1.9'/%3E%3Ccircle cx='14.8' cy='6.3' r='1.9'/%3E%3Ccircle cx='18.4' cy='10.4' r='1.8'/%3E%3C/svg%3E") center / 22px no-repeat; }

.wp-block-quote {
  position: relative; margin: var(--space-6) 0; padding: var(--space-7) var(--space-6) var(--space-6);
  border: 0; border-radius: var(--radius-lg); background: var(--brand-pink-soft);
}
.wp-block-quote::before { content: "\201C"; position: absolute; top: 4px; left: var(--space-6); font-size: 72px; line-height: 1; font-weight: 300; color: var(--brand-rose); }
.wp-block-quote p { font-size: clamp(21px, 2.4vw, 25px); line-height: 1.4; font-weight: 300; letter-spacing: -0.01em; margin-bottom: var(--space-4); }
.wp-block-quote cite { display: block; font-size: 15px; line-height: 22px; font-style: normal; font-weight: 500; color: var(--ink-muted); }

.wp-block-image { margin: var(--space-6) 0; }
.wp-block-image img, .wp-block-image svg { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.wp-block-image figcaption, .wp-element-caption { margin-top: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-muted); }

.wp-block-table { margin: var(--space-6) 0; overflow-x: auto; }
.wp-block-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; line-height: 24px; border: 1.5px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.wp-block-table th, .wp-block-table td { padding: var(--space-3) var(--space-4); text-align: left; vertical-align: top; border-bottom: 1.5px solid var(--line); }
.wp-block-table tr:last-child td { border-bottom: 0; }
.wp-block-table thead th { background: var(--surface-cream); font-weight: 600; }
.wp-block-table.is-style-stripes tbody tr:nth-child(even) td { background: var(--surface-cream-soft); }
.wp-block-table figcaption { margin-top: var(--space-2); }

.wp-block-separator { margin: var(--space-7) auto; border: 0; border-top: 1.5px solid var(--line); opacity: 1; }
.wp-block-separator.is-style-dots { border: 0; height: auto; text-align: center; }
.wp-block-separator.is-style-dots::before { content: "\00b7 \00b7 \00b7"; color: var(--brand-brown); font-size: 32px; letter-spacing: .6em; padding-left: .6em; }

.wp-block-columns { display: flex; flex-wrap: wrap; gap: var(--space-6); margin: var(--space-6) 0; }
.wp-block-column { flex: 1 1 0; min-width: 180px; }
.wp-block-column > :last-child { margin-bottom: 0; }

.wp-block-group.has-background, .remakka-group { padding: var(--space-6); border-radius: var(--radius-lg); margin: var(--space-6) 0; }
.wp-block-group.has-background > :last-child { margin-bottom: 0; }

.wp-block-details { border-top: 1.5px solid var(--line); margin: 0; }
.wp-block-details:last-of-type { border-bottom: 1.5px solid var(--line); }
.wp-block-details summary {
  position: relative; display: block; list-style: none; cursor: pointer;
  padding: var(--space-5) 56px var(--space-5) 0;
  font-size: 19px; line-height: 27px; font-weight: 500;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 36px; height: 36px; margin-top: -18px;
  border: 1.5px solid var(--brand-brown); border-radius: var(--radius-full);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23724319' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.wp-block-details[open] summary::after { background-color: var(--brand-brown); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23feeac7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.wp-block-details summary:hover { color: var(--brand-brown); }
.wp-block-details summary:focus-visible { outline-offset: 2px; border-radius: var(--radius-sm); }
.wp-block-details > :not(summary) { margin: 0 56px var(--space-5) 0; }

/* Värit editorin paletista (theme.json luo samat luokat) */
.has-surface-background-color { background-color: var(--surface); }
.has-surface-cream-background-color { background-color: var(--surface-cream); }
.has-surface-cream-soft-background-color { background-color: var(--surface-cream-soft); }
.has-brand-brown-background-color { background-color: var(--brand-brown); color: var(--ink-on-dark); }
.has-brand-brown-background-color h2, .has-brand-brown-background-color h3, .has-brand-brown-background-color h4 { color: var(--ink-on-dark); }
.has-brand-brown-background-color a:not(.wp-block-button__link) { color: var(--ink-on-dark); }
.has-brand-rose-background-color { background-color: var(--brand-rose); }
.has-brand-pink-background-color { background-color: var(--brand-pink); }
.has-brand-pink-soft-background-color { background-color: var(--brand-pink-soft); }
.has-brand-olive-background-color { background-color: var(--brand-olive); }
.has-brand-olive-soft-background-color { background-color: var(--brand-olive-soft); }
.has-brand-rose-background-color a, .has-brand-pink-background-color a:not(.wp-block-button__link) { color: var(--ink); }

/* ---------- Sisältömallit ---------- */

/* Vinkkilaatikko */
.remakka-vinkki {
  position: relative; margin: var(--space-6) 0; padding: var(--space-6) var(--space-6) var(--space-6) 100px;
  border-radius: var(--radius-lg); background: var(--surface-cream);
}
.remakka-vinkki::before {
  content: ""; position: absolute; left: var(--space-6); top: var(--space-6); width: 48px; height: 48px;
  border-radius: var(--radius-full); background: var(--brand-olive) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b1a0d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 18h5'/%3E%3Cpath d='M10.5 21h3'/%3E%3Cpath d='M12 3a6 6 0 0 0-3.6 10.8c.7.5 1.1 1.3 1.1 2.1V16h5v-.1c0-.8.4-1.6 1.1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E") center / 24px no-repeat;
}
.remakka-vinkki > .remakka-eyebrow::after { content: none; }
.remakka-vinkki h4 { margin-bottom: var(--space-2); }
.remakka-vinkki > :last-child { margin-bottom: 0; }
.remakka-vinkki.is-huomio { background: var(--brand-pink-soft); }
.remakka-vinkki.is-huomio::before { background: var(--brand-rose) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b1a0d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l9 16H3z'/%3E%3Cpath d='M12 10v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center / 24px no-repeat; }
.remakka-vinkki.is-huomio .remakka-eyebrow { color: var(--ink-rose); }
@media (max-width: 560px) {
  .remakka-vinkki { padding: 84px var(--space-5) var(--space-5); }
  .remakka-vinkki::before { left: var(--space-5); top: var(--space-5); }
}

/* Plussat ja miinukset */
.remakka-plusmiinus { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-6) 0; }
.remakka-plusmiinus > * { flex: 1 1 260px; margin: 0; padding: var(--space-6); border-radius: var(--radius-lg); }
.remakka-plussat { background: var(--brand-olive-soft); }
.remakka-miinukset { background: var(--brand-pink-soft); }
.remakka-plusmiinus h4 { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.remakka-plusmiinus h4::before { content: ""; flex: none; width: 32px; height: 32px; border-radius: var(--radius-full); background-position: center; background-size: 18px; background-repeat: no-repeat; }
.remakka-plussat h4 { color: var(--ink-olive); }
.remakka-plussat h4::before { background-color: var(--ink-olive); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eef0d6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.remakka-miinukset h4 { color: var(--ink-rose); }
.remakka-miinukset h4::before { background-color: var(--ink-rose); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fde4e3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.remakka-plusmiinus ul { list-style: none; margin: 0; padding: 0; }
.remakka-plusmiinus li { position: relative; padding-left: 32px; margin-bottom: var(--space-3); font-size: 17px; line-height: 27px; }
.remakka-plusmiinus li:last-child { margin-bottom: 0; }
.remakka-plusmiinus li::before { content: ""; position: absolute; left: 0; top: 3px; width: 21px; height: 21px; background: center / 21px no-repeat; }
.remakka-plussat li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5419' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }
.remakka-miinukset li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23933c3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }

/* Vertailutaulukko */
.remakka-vertailu { position: relative; margin: var(--space-6) 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.remakka-vertailu table { border: 0; border-radius: 0; overflow: visible; width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: 16px; line-height: 24px; }
.remakka-vertailu th, .remakka-vertailu td { padding: var(--space-4); text-align: left; vertical-align: middle; border-bottom: 1.5px solid var(--line); background: var(--surface); }
.remakka-vertailu thead th { padding-top: var(--space-3); padding-bottom: var(--space-3); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); background: var(--surface); }
.remakka-vertailu th:first-child, .remakka-vertailu td:first-child { position: sticky; left: 0; z-index: 1; }
.remakka-vertailu tr.is-paras td { background: var(--surface-cream); }
.remakka-vertailu tr.is-paras td:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.remakka-vertailu tr.is-paras td:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.remakka-vertailu tr.is-paras td { border-bottom-color: transparent; }
.remakka-vertailu tr:has(+ tr.is-paras) td { border-bottom-color: transparent; }
.remakka-product { display: flex; align-items: center; gap: var(--space-3); min-width: 220px; }
.remakka-product__img { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--brand-pink); color: var(--brand-brown); }
.remakka-product__name { display: block; font-weight: 600; font-size: 17px; line-height: 24px; }
.remakka-product__meta { display: block; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.remakka-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm); background: var(--brand-olive); color: var(--ink); font-size: 13px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.remakka-badge.is-pink { background: var(--brand-pink); }
.remakka-rating { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.remakka-rating svg { color: var(--brand-brown); }
.remakka-rating span { font-weight: 400; color: var(--ink-muted); }
.remakka-price { font-weight: 600; white-space: nowrap; }
.remakka-vertailu .remakka-btn { min-width: 150px; }
.remakka-vertailu figcaption { margin-top: var(--space-3); font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Usein kysytyt kysymykset */
.remakka-ukk { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: var(--space-6) var(--space-8); margin: var(--space-8) 0; }
.remakka-ukk__intro p { color: var(--ink-muted); }
@media (max-width: 760px) { .remakka-ukk { grid-template-columns: 1fr; gap: var(--space-5); } }

/* Toimintakehote */
.remakka-cta {
  position: relative; overflow: hidden; margin: var(--space-8) 0;
  padding: var(--space-8) var(--space-7); border-radius: var(--radius-lg); background: var(--brand-pink);
}
.remakka-cta__content { position: relative; z-index: 1; max-width: 560px; }
.remakka-cta h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.08; margin-bottom: var(--space-4); }
.remakka-cta p { font-size: 19px; line-height: 30px; }
.remakka-cta__art { position: absolute; right: 0; top: 0; bottom: 0; width: 42%; pointer-events: none; }
.remakka-cta__art .a { fill: var(--brand-rose); }
.remakka-cta__art .b { fill: var(--brand-brown); }
.remakka-cta__art .c { fill: var(--brand-olive); }
.remakka-cta__art .d { fill: var(--surface-cream); }
.remakka-cta.is-olive { background: var(--brand-olive); }
.remakka-cta.is-olive .remakka-cta__art .c { fill: var(--brand-pink); }
.remakka-cta.is-brown { background: var(--brand-brown); color: var(--ink-on-dark); }
.remakka-cta.is-brown h2 { color: var(--ink-on-dark); }
.remakka-cta.is-brown .remakka-cta__art .b { fill: var(--brand-pink); }
@media (max-width: 760px) { .remakka-cta { padding: var(--space-7) var(--space-5) 200px; } .remakka-cta__art { top: auto; height: 180px; width: 100%; } }

/* Kategoriakortit */
.remakka-kortit { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); margin: var(--space-6) 0; }
.remakka-kortti {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6);
  min-height: 220px; padding: var(--space-5); border-radius: var(--radius-lg);
  color: var(--ink); text-decoration: none; transition: transform .15s;
}
.remakka-kortti:hover { transform: translateY(-3px); }
.remakka-kortti:focus-visible { border-radius: var(--radius-lg); }
.remakka-kortti__title { font-size: 44px; line-height: 48px; font-weight: 300; letter-spacing: -0.02em; }
.remakka-kortti__title em { font-style: italic; }
.remakka-kortti__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); font-size: 15px; line-height: 22px; }
.remakka-kortti__foot::after { content: ""; flex: none; width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23feeac7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px no-repeat; }
.remakka-kortti.is-cream { background: var(--surface-cream); }
.remakka-kortti.is-pink { background: var(--brand-pink); }
.remakka-kortti.is-olive { background: var(--brand-olive); }
.remakka-kortti.is-rose { background: var(--brand-rose); }
.remakka-kortti.is-brown { background: var(--brand-brown); color: var(--ink-on-dark); }
.remakka-kortti.is-brown .remakka-kortti__foot::after { background-color: var(--brand-pink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23724319' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.remakka-kortti.is-brown:focus-visible { outline-color: var(--focus); }

/* ---------- Saavutettavuus: WordPressin vakioluokat ---------- */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: normal; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-3); top: -100px; z-index: 100;
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-lg);
  background: var(--brand-brown); color: var(--ink-on-dark); font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }
.skip-link:focus-visible { outline-color: var(--brand-brown); }

/* ---------- Sivurakenne (header.php / footer.php / sivupohjat) ---------- */
/* Leveys: sisältö 720px (content-width), leveät osat 1200px (wide-width).
   Sivun reunus 24px, alle 560px 16px. Osioiden väli 96px, alle 760px 64px. */
.remakka-main { max-width: var(--wide-width); margin: 0 auto; padding: 0 var(--space-5); }
.remakka-content { max-width: var(--content-width); margin-left: auto; margin-right: auto; }
.remakka-section { margin-top: var(--space-9); }
.remakka-page-top { padding-top: var(--space-8); }
@media (max-width: 760px) {
  .remakka-section { margin-top: var(--space-8); }
  .remakka-page-top { padding-top: 40px; }
}
@media (max-width: 560px) { .remakka-main { padding: 0 var(--space-4); } }
.remakka-footer { margin-top: var(--space-9); }
@media (max-width: 760px) { .remakka-footer { margin-top: var(--space-8); } }

/* the_content(): perusblokit 720px leveydelle, .alignwide 1200px, .alignfull koko leveys */
.entry-content > * { max-width: var(--content-width); margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--wide-width); }
.entry-content > .alignfull { max-width: none; }
.entry-content > :first-child { margin-top: 0; }

/* Otsikkorivi, jonka oikeassa reunassa on linkki ("Kaikki vertailut") */
.remakka-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.remakka-section-head a { font-size: 16px; line-height: 26px; }
.remakka-section-intro { margin: var(--space-4) 0 0; color: var(--ink-muted); }

/* ---------- Etusivun hero ---------- */
.remakka-hero__text { max-width: 880px; margin: 0 auto; text-align: center; }
.remakka-hero__text .remakka-lead { max-width: 680px; margin: var(--space-5) auto 0; }
.remakka-hero .wp-block-image { margin: var(--space-7) 0 0; }
.remakka-hero .wp-block-image img { height: clamp(300px, 40vw, 520px); object-fit: cover; object-position: center 40%; }
@media (max-width: 760px) {
  .remakka-hero__text { text-align: left; }
  .remakka-hero__text .remakka-lead { margin: var(--space-4) 0 0; }
  .remakka-hero .wp-block-image { margin-top: var(--space-6); }
}

/* Artikkelin ja sivun otsikko-osa */
.remakka-entry-header .remakka-lead { margin: var(--space-4) 0 0; }
.remakka-entry-header + .wp-block-image,
.remakka-entry-header + .remakka-featured { margin: var(--space-7) 0 0; }
.remakka-featured img, .remakka-featured .remakka-placeholder { height: clamp(300px, 38vw, 480px); object-fit: cover; }
@media (max-width: 760px) { .remakka-entry-header + .remakka-featured { margin-top: var(--space-6); } }

/* ---------- Artikkelikortti ja artikkelilista ---------- */
/* Käytetään Kyselysilmukka-lohkossa (etusivu) ja arkistojen PHP-silmukassa (template-parts/kortti.php). */
.remakka-artikkelit { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-7) var(--space-6); margin: var(--space-6) 0 0; padding: 0; list-style: none; }
.remakka-artikkeli { display: flex; flex-direction: column; }
.remakka-artikkeli__kuva { margin: 0 0 var(--space-5); }
.remakka-artikkeli__kuva img { display: block; }
.remakka-artikkeli__kuva img, .remakka-artikkeli__kuva .remakka-placeholder { width: 100%; aspect-ratio: 16 / 11; height: auto; object-fit: cover; border-radius: var(--radius-lg); }
.remakka-artikkeli__otsikko { font-size: 24px; line-height: 30px; font-weight: 400; letter-spacing: -0.01em; margin: 0; }
.remakka-artikkeli__otsikko a { color: var(--ink); text-decoration: none; }
.remakka-artikkeli__otsikko a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.remakka-meta { margin: var(--space-2) 0 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.remakka-meta a { color: var(--brand-brown); }

/* ---------- Hakutulokset ---------- */
.remakka-hakutulokset { list-style: none; margin: var(--space-6) 0 0; padding: 0; border-bottom: 1.5px solid var(--line); }
.remakka-hakutulos { padding: var(--space-5) 0; border-top: 1.5px solid var(--line); }
.remakka-hakutulos h2 { font-size: 24px; line-height: 30px; font-weight: 400; letter-spacing: -0.01em; margin: 0; }
.remakka-hakutulos h2 a { color: var(--ink); text-decoration: none; }
.remakka-hakutulos h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.remakka-hakutulos p { margin: var(--space-2) 0 0; font-size: 16px; line-height: 26px; color: var(--ink-muted); }
.remakka-hakutulos .remakka-meta { margin-top: var(--space-2); }
.remakka-hakumaara { margin: var(--space-4) 0 0; font-size: 16px; line-height: 26px; color: var(--ink-muted); }

/* ---------- Sivutus (Uudemmat / Vanhemmat) ---------- */
.remakka-sivutus { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin: var(--space-7) 0 0; }

/* ---------- Ikoniympyrä (Näin vertailemme) ---------- */
.remakka-ikoniympyra { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-full); background: var(--brand-olive); color: var(--ink); }
.remakka-ikoniympyra.is-rose { background: var(--brand-rose); color: var(--ink); }
.remakka-ikoniympyra + h3 { margin-top: var(--space-4); }
.remakka-nain h3 { font-size: 21px; line-height: 28px; font-weight: 600; letter-spacing: 0; margin-bottom: var(--space-2); }
.remakka-nain .wp-block-column p { margin: 0; }
.remakka-nain.wp-block-group.has-background { padding: var(--space-7); margin: 0; }
@media (max-width: 560px) { .remakka-nain.wp-block-group.has-background { padding: var(--space-6) var(--space-5); } }
/* Osion kääreen sisällä laatikoilla ei omaa ylämarginaalia */
.remakka-section > .remakka-cta, .remakka-section > .wp-block-group { margin-top: 0; margin-bottom: 0; }

/* Laatikoiden otsikko voi olla H3 tai H4 rakenteen mukaan, ulkoasu on sama */
.remakka-vinkki h3, .remakka-plusmiinus h3 { font-size: 21px; line-height: 28px; font-weight: 600; letter-spacing: 0; }
.remakka-vinkki h3 { margin-bottom: var(--space-2); }

/* Kapealla haku-/uutiskirjelomakkeen painike koko leveydelle */
@media (max-width: 420px) { .remakka-inline-form .remakka-btn { flex: 1 1 100%; justify-content: center; } }
