/* Sustain_Ability Pedagogical Guide feedback campaign.
   /sustain-ability/prirucka/, /en/sustain-ability/guide/ and the admin area.

   Loaded after event.css, which already carries the site menu, the footer, the
   alerts, the form controls and the rating scale. This file changes only what
   the brief asks to be different — Raleway everywhere and #3F7CB5 headings —
   and adds this campaign's own pieces: the hero, the tiles, the stepped form,
   the rated statements and the admin screens.

   Mobile first: most visitors arrive from a LinkedIn post on a phone. */

:root {
  /* The brief's heading blue. On white it measures 4.41:1 — WCAG AA for large
     text (3:1) but not for normal text (4.5:1) — so it dresses h1, h2 and the
     form's section titles, all of which are bold and 20px or more. Anything
     smaller uses the darker project blue below, which is 7.4:1. */
  --head: #3F7CB5;
  --head-small: #01579B;
  /* The teal accent is 3.52:1 on the hero's blue, too low for the small
     uppercase kicker; this tint of it is 5.26:1. */
  --teal-light: #8FE9E3;
  --sans: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Font and headings --------------------------------------------------
   event.css names a family in exactly five rules; these are the five. Every
   other control there inherits with `font: inherit`. */

body { font-family: var(--sans); }
h1, h2,
.sa-btn,
.sa-alert__title,
.sa-group > legend { font-family: var(--sans); }

h1, h2 { color: var(--head); }
h3 { color: var(--head-small); }
h1 { font-size: 1.8rem; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 1.6em 0 .4em; }
.sa-lead { color: var(--blue-dark); }
@media (min-width: 700px) {
  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.8rem; }
}

/* A ghost button, for "Back" and the secondary actions. */
.sa-btn--ghost {
  background: #fff;
  color: var(--blue);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.sa-btn--ghost:hover { background: var(--tint); color: var(--blue-dark); box-shadow: inset 0 0 0 2px var(--blue-dark); }
.sa-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Landing page: hero ------------------------------------------------- */

.sg-hero {
  padding: 40px 0 44px;
  background: linear-gradient(135deg, var(--blue) 0%, #065C96 55%, #0A6AAE 100%);
  color: #fff;
}
.sg-hero h1 { color: #fff; max-width: 22em; }
.sg-hero__kicker {
  margin-bottom: .8em;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal-light);
}
.sg-hero__subtitle { max-width: 40em; font-size: 1.1rem; line-height: 1.6; color: #E8F3FA; }
.sg-hero__facts {
  display: flex; flex-wrap: wrap; gap: 8px 10px;
  margin: 0 0 1.6em; padding: 0; list-style: none;
}
.sg-hero__facts li {
  padding: 5px 13px;
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px;
  font-size: .85rem; font-weight: 600;
}
@media (min-width: 700px) {
  .sg-hero { padding: 72px 0 76px; }
  .sg-hero__subtitle { font-size: 1.25rem; }
}

/* ---- Landing page: "What's inside" tiles -------------------------------- */

.sg-tiles {
  display: grid; gap: 16px;
  margin: 1.8em 0 0; padding: 0; list-style: none;
}
.sg-tile {
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--line); border-top: 3px solid var(--teal);
  border-radius: var(--radius);
}
.sg-tile h3 { margin: .5em 0 .3em; font-size: 1.05rem; color: var(--head-small); }
.sg-tile p { margin: 0; font-size: .95rem; color: var(--muted); }
.sg-tile__icon { width: 32px; height: 32px; fill: var(--blue); display: block; }
@media (min-width: 600px) { .sg-tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) {
  .sg-tiles { grid-template-columns: repeat(3, 1fr); }
  /* Five tiles: the last two share the bottom row rather than leaving a gap. */
  .sg-tile:nth-child(4) { grid-column: 1 / 2; }
}

/* ---- Landing page: how it works ---------------------------------------- */

.sg-steps__heading { margin-top: 1.8em; }
.sg-steps { counter-reset: sg-step; margin: 0; padding: 0; list-style: none; }
.sg-steps li {
  counter-increment: sg-step;
  position: relative;
  margin-bottom: 14px; padding-left: 46px;
  min-height: 32px;
}
.sg-steps li::before {
  content: counter(sg-step);
  position: absolute; left: 0; top: -2px;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%; background: var(--blue); color: #fff;
  font-weight: 700; font-size: .95rem;
}

/* ---- The stepped feedback form ----------------------------------------- */

.sg-feedback__lead {
  margin-top: -.4em;
  font-family: var(--sans); font-size: 1.15rem; font-weight: 600;
  color: var(--head-small);
}
.sg-section__title { font-size: 1.25rem; margin-bottom: .5em; }
.sg-section__title::after { display: none; }   /* no teal rule inside a form */

.sg-progress {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 1.6em 0 1.2em; padding: 0; list-style: none;
  counter-reset: none;
}
.sg-progress__item { flex: 1 1 auto; min-width: 0; }
.sg-progress__item a {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 4px;
  border-bottom: 3px solid var(--line);
  color: var(--muted); font-size: .8rem; font-weight: 600; text-decoration: none;
}
.sg-progress__n {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%; background: var(--line); color: var(--ink);
  font-size: .75rem; font-weight: 700;
}
.sg-progress__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-progress__item.is-done a { border-bottom-color: var(--teal); color: var(--teal-text); }
.sg-progress__item.is-done .sg-progress__n { background: var(--teal); color: #05413D; }
.sg-progress__item.is-current a { border-bottom-color: var(--blue); color: var(--blue); }
.sg-progress__item.is-current .sg-progress__n { background: var(--blue); color: #fff; }
.sg-progress__item a:hover { color: var(--blue-dark); }
/* On a phone only the numbers fit; the current step keeps its name. */
@media (max-width: 599px) {
  .sg-progress__item:not(.is-current) .sg-progress__label { display: none; }
  .sg-progress__item { flex: 0 0 auto; }
  .sg-progress__item.is-current { flex: 1 1 auto; }
}

/* With JavaScript one step is shown at a time; without it, all of them. */
.js .sg-step { display: none; }
.js .sg-step.is-current { display: block; }
.sg-step + .sg-step { margin-top: 1.4em; }

.sg-grid--two { }
@media (min-width: 640px) {
  .sg-grid--two { grid-template-columns: 1fr 1fr; }
}
.sg-field--inline .sa-choices { grid-template-columns: none; display: flex; flex-wrap: wrap; gap: 8px; }
.sg-field--inline .sa-choice { flex: 1 1 140px; }

.sg-readonly {
  margin: 0 0 1.4em; padding: 16px 18px;
  background: var(--tint); border-radius: var(--radius); border-left: 4px solid var(--head);
}
.sg-readonly dt { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sg-readonly dd { margin: 2px 0 .9em; font-weight: 600; }
.sg-readonly dd:last-child { margin-bottom: 0; }
.sg-readonly code { font-size: .9rem; word-break: break-all; }

.sg-group--consent .sg-consent__items { margin: 0 0 1em; padding-left: 1.4em; }
.sg-group--consent .sg-consent__items li { margin-bottom: .35em; }

/* ---- One rated statement ----------------------------------------------- */

.sg-rates { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.sg-rate { margin: 0; padding: 14px 14px 12px; border: 0; min-width: 0; }
.sg-rate + .sg-rate { border-top: 1px solid var(--line); }
.sg-rate:nth-child(even) { background: #FAFCFD; }
.sg-rate > legend {
  float: left; width: 100%; padding: 0; margin-bottom: 9px;
  font-size: .95rem; font-weight: 600;
}
.sg-rate.is-invalid { background: var(--error-bg); }
.sg-rate .sa-scale { clear: both; max-width: 420px; }
.sg-rate .sa-scale__opt > span { height: 40px; font-size: .9rem; }

/* On a phone the six options stack, as the brief asks: full-width rows, each
   with its wording spelled out, so nobody has to remember what 3 meant and
   every target is comfortably bigger than a fingertip. The wording is the
   same screen-reader text the segmented control carries, simply shown. */
@media (max-width: 559px) {
  .sg-rate .sa-scale { grid-template-columns: 1fr; gap: 6px; max-width: none; }
  .sg-rate .sa-scale__opt > span {
    height: auto; min-height: 46px;
    justify-content: flex-start; gap: 9px;
    padding: 10px 14px;
    text-align: left;
  }
  .sg-rate .sa-scale__opt > span > .sa-sr {
    position: static !important;
    width: auto !important; height: auto !important;
    margin: 0 !important; clip: auto !important; clip-path: none;
    overflow: visible; white-space: normal;
    font-weight: 400;
  }
}

.sg-legend {
  display: flex; flex-wrap: wrap; gap: 2px 14px;
  margin: 0 0 1em; padding: 10px 12px;
  background: var(--tint); border-radius: 8px;
  font-size: .8rem; color: var(--muted);
}
.sg-legend dd { margin: 0; }
.sg-legend b { color: var(--blue); }

/* "Add comment": a disclosure under the scale. Without JavaScript the box is
   simply always open, which is why the [hidden] attribute is overridden. */
.sg-comment { margin-top: 8px; }
.sg-comment__toggle {
  padding: 2px 0; border: 0; background: none; cursor: pointer;
  color: var(--blue); font: inherit; font-size: .82rem; font-weight: 600;
}
.sg-comment__toggle:hover { color: var(--blue-dark); text-decoration: underline; }
.sg-comment__toggle[aria-expanded="true"] span[aria-hidden] { transform: rotate(45deg); display: inline-block; }
.sg-comment__box { margin-top: 6px; }
.sg-comment__box textarea {
  display: block; width: 100%; min-height: 56px; padding: 9px 12px;
  border: 1px solid #B7C3CE; border-radius: 8px;
  font: inherit; font-size: 1rem; resize: vertical; background: #fff;
}
.sg-comment__box textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1, 87, 155, .18); }
html:not(.js) .sg-comment__toggle { display: none; }
html:not(.js) .sg-comment__box[hidden] { display: block; }

@media (min-width: 820px) {
  .sg-rate { display: flow-root; }
  .sg-rate > legend { width: calc(100% - 380px); margin: 0; padding-top: 4px; }
  .sg-rate .sa-scale { clear: none; float: right; width: 360px; }
  .sg-rate .sg-comment { clear: both; padding-top: 6px; }
}

.sg-counter { margin: 4px 0 0; font-size: .78rem; }

/* ---- Form navigation and the summary ----------------------------------- */

.sg-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 1.6em; padding-top: 1.2em;
  border-top: 1px solid var(--line);
}
.sg-nav .sa-btn { width: auto; margin-top: 0; }
.sg-nav__save { margin-left: auto; }
.sg-nav__status { flex: 1 0 100%; margin: 0; color: var(--teal-text); font-size: .82rem; min-height: 1.2em; }
html:not(.js) .sg-nav__prev,
html:not(.js) .sg-nav__next { display: none; }

.sg-summary { margin-top: 1.4em; border-left-color: var(--head); }
.sg-summary__title { margin-bottom: .4em; }
.sg-summary__counts { margin: 0 0 .8em; padding-left: 1.2em; font-size: .95rem; }

.sg-narrow-page { padding-top: 40px; }

/* ---- Print: a reviewer who would rather fill the form on paper ---------- */

@media print {
  .sa-subnav, .site-header, .sg-progress, .sg-nav, .sa-skip { display: none !important; }
  .js .sg-step { display: block !important; }
  .sg-comment__box[hidden] { display: block !important; }
  body { font-size: 11pt; }
  .sg-hero { background: none; color: var(--ink); }
  .sg-hero h1, .sg-hero__kicker { color: var(--ink); }
}
