/* ============================================================================
   mesenaatti.me — guide.css   (Joukkorahoituksen opas)
   ----------------------------------------------------------------------------
   Styles for the guide's hub and its pages, both the Twig ones under
   /joukkorahoituksen-opas/ and the CMS-backed ones (/markkinointi/ etc.).
   Scoped to .guide-new / .guide-menu so nothing else on the site changes.
   Loaded by page.html.twig (only when guide data is present) and the guide
   templates. Tokens come from tokens.css. No border radius anywhere.
   ============================================================================ */

/* ---- Content card ------------------------------------------------------- */
/* No card of its own: .leftside is already the white card (16px padding), so a
   second bordered, padded card inside it doubled the margins (text started ~31px
   further in than on the other pages) and drew a grey outline. Text now sits
   14px inside the frame and 27px below its top, like the legacy pages' h1/p. */
.guide-new {
  background: transparent;
  border: 0;
  padding: 27px 14px 16px;
  box-sizing: border-box;
  color: var(--fg-1);
  font-family: var(--font-sans);
  border-radius: 0;
}
.leftside .guide-new .entry { max-width: 720px; }
.guide-new.guide-hub article { max-width: 720px; }

.leftside .guide-new h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 2.6vw, 32px);
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}
.leftside .guide-new h2 {
  margin: 32px 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0;
  border: 0;
}
.leftside .guide-new h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}
.leftside .guide-new p { margin: 0 0 12px; font-size: 17px; line-height: 1.6; }
.leftside .guide-new p.ingress {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--fg-2);
  text-wrap: pretty;
}
.leftside .guide-new a { color: var(--link); text-decoration: none; }
.leftside .guide-new a:hover { color: var(--link-hover); }

/* Lists: square accent bullets; numbered lists keep their numbers */
.leftside .guide-new ul { margin: 0 0 14px; padding: 0; list-style: none; }
.leftside .guide-new ul > li { position: relative; margin: 0 0 6px; padding: 0 0 0 19px; max-width: none; font-size: 16px; line-height: 1.6; }
.leftside .guide-new ul > li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; background: var(--accent); }
.leftside .guide-new ol { margin: 0 0 14px; padding-left: 1.4em; }
.leftside .guide-new ol > li { margin: 0 0 6px; font-size: 16px; line-height: 1.6; }

/* ---- Crumb and pager ---------------------------------------------------- */
.guide-crumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; font-size: 14px; color: var(--fg-3); }
.guide-crumb a { font-size: 14px; }

.guide-pager {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px;
  margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--border-strong);
}
.guide-pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--border); color: var(--fg-1); }
.guide-pager a:hover { border-color: var(--brand); color: var(--fg-1); }
.guide-pager a span { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--fg-3); }
.guide-pager a strong { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: var(--brand); }
.guide-pager__next { text-align: right; }

/* ---- Tips panel and parts (kampanjasivun-tekeminen) ---------------------- */
.leftside .guide-new ul.guide-tips { padding: 16px 20px; background: var(--bg-surface-2); margin: 0 0 8px; }
.guide-part {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 6px 24px;
  padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--border);
}
.guide-part__body { grid-column: span 2; min-width: 0; }
.guide-part__body > :last-child { margin-bottom: 0; }

/* ---- Guide menu card (sidebar) ------------------------------------------ */
.info-sidebar-stack > .guide-menu { margin-top: 15px; }
.guide-menu { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); font-family: var(--font-sans); }
.guide-menu a { text-decoration: none; border: 0; }
.guide-menu__head { display: flex; flex-direction: column; gap: 4px; padding: 20px 20px 16px; border-bottom: 2px solid var(--border); color: var(--fg-1); }
.guide-menu__head.is-current { background: var(--bg-surface-2); }
.guide-menu__overline { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.guide-menu__title { font-family: var(--font-display); font-size: 19px; line-height: 1.2; }
.guide-menu__stage { padding: 14px 20px 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.guide-menu__stage:last-child { border-bottom: 0; }
.guide-menu__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--fg-3); }
.guide-menu__item { display: flex; gap: 10px; align-items: baseline; font-family: var(--font-display); font-size: 17px; line-height: 1.3; color: var(--brand); }
.guide-menu__item span:first-child { min-width: 16px; font-size: 14px; color: var(--fg-3); }
.guide-menu__item:hover { color: var(--accent-hover); }
.guide-menu__item.is-current { color: var(--fg-1); }
.guide-menu__toc { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 26px; padding-left: 12px; border-left: 2px solid var(--brand); }
.guide-menu__toc--flat { margin-left: 0; }
.guide-menu__toc a { align-self: flex-start; font-size: 15px; line-height: 1.5; color: var(--fg-2); }
.guide-menu__toc a:hover { color: var(--brand); }

/* ---- Buttons ------------------------------------------------------------- */
.guide-button {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border: 0; border-radius: 0;
  background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 15px; letter-spacing: .04em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.leftside .guide-new a.guide-button, .leftside .guide-new .guide-button { color: #fff; }
.guide-button:hover, .leftside .guide-new a.guide-button:hover { background: var(--brand-hover); color: #fff; }

/* ---- Hub ------------------------------------------------------------------ */
.guide-hub .guide-hero { margin-bottom: 8px; }
.guide-hub section { margin-top: 40px; }
.guide-hub section > h2 { margin-top: 0; }
.guide-route {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 24px;
  padding: 20px 0; border-top: 1.5px solid var(--border);
}
.guide-route__stage { display: flex; gap: 12px; align-items: baseline; }
.guide-route__stage span:first-child { font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--brand); }
.guide-route__stage span:last-child { font-family: var(--font-display); font-size: 18px; line-height: 1.25; }
.guide-route__pages { grid-column: span 2; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.guide-route__pages a { display: flex; flex-direction: column; gap: 2px; color: var(--fg-1); }
.guide-route__title { font-family: var(--font-display); font-size: 17px; color: var(--brand); }
.guide-route__desc { font-size: 16px; line-height: 1.5; color: var(--fg-2); }
.guide-table-wrap { overflow-x: auto; border: 1px solid var(--border); margin-bottom: 12px; }
.guide-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.guide-table thead tr { background: var(--bg-inverse); color: #fff; text-align: left; }
.guide-table th, .guide-table td { padding: 10px 10px; text-align: left; vertical-align: top; }
.guide-table thead th { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.guide-table tbody tr { border-top: 1px solid var(--border); }
.guide-table tbody th { font-weight: 700; width: 22%; }
.guide-twocol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.guide-twocol h3 { font-size: 17px; margin-bottom: 8px; }
.guide-twocol p { color: var(--fg-2); font-size: 16px; }
.guide-faq { border-top: 1.5px solid var(--border); }
.guide-faq details { border-bottom: 1.5px solid var(--border); }
.guide-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 17px; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary span { color: var(--brand); }
.guide-faq details[open] summary span { transform: rotate(45deg); }
.guide-faq details p { margin: 0 0 16px; font-size: 16px; color: var(--fg-2); max-width: 640px; }
.guide-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding: 24px; background: var(--bg-inverse); color: #fff; }
.guide-band span { font-family: var(--font-display); font-size: 19px; }

/* ---- Tips page: phase timeline, quotes, bar chart ------------------------- */
.guide-phases { list-style: none; margin: 24px 0; padding: 0 0 0 28px; border-left: 3px solid var(--accent-hover); counter-reset: phase; }
.leftside .guide-new ol.guide-phases { padding-left: 28px; }
.guide-phase { position: relative; margin: 0 0 22px; padding: 0 0 0 14px; counter-increment: phase; }
.guide-phase::before {
  content: counter(phase); position: absolute; left: -46px; top: 0; width: 30px; height: 30px; box-sizing: border-box;
  background: var(--bg-inverse); color: #fff; font-weight: 700; text-align: center; line-height: 30px;
}
.guide-phase h3 { margin: 0 0 4px; }
.guide-phase p { margin: 0 0 6px; }
.leftside .guide-new .guide-phase p.guide-mood { display: inline-block; padding: 2px 8px; background: var(--accent-soft); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.guide-quote { margin: 20px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--brand); }
.guide-quote p { margin: 0 0 6px; font-style: italic; }
.guide-quote footer { font-size: 14px; color: var(--fg-3); }
.guide-chart { margin: 20px 0; padding: 16px; background: #fff; border: 1px solid var(--border); }
.guide-chart figcaption { font-weight: 700; margin-bottom: 12px; }
.leftside .guide-new ul.guide-bars { margin: 0; }
.leftside .guide-new ul.guide-bars > li { display: grid; grid-template-columns: 5.5em 1fr 3em; align-items: center; gap: 10px; margin: 0 0 8px; padding: 0; }
.leftside .guide-new ul.guide-bars > li::before { content: none; }
.guide-bars__bar { display: block; width: 100%; height: 22px; background: var(--border); }
.guide-bars__bar rect { fill: var(--accent); }
.guide-bars__value { font-weight: 700; text-align: right; }
.leftside .guide-new p.guide-chart__source { margin: 12px 0 0; font-size: 13px; color: var(--fg-3); }
