/* simple.css — layout for the simplified, general-audience version (/simple).
   Consumes theme.css custom properties only; no raw hex codes, font names, or
   brand strings here, so a client re-skin still only touches theme.css +
   brand.js + the logo asset. Mobile-first; the one media query below only adds
   desktop breathing room, it never reflows the single-column structure. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}

h1 { font-family: var(--font-heading); margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: var(--color-accent-dark); }

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-sm);
}

.stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: var(--space-sm) 0;
}

/* --- header bits --- */

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-accent-dark);
  opacity: 0.75;
}

.hook {
  font-size: clamp(1.3rem, 4.6vw, 1.85rem);
  font-weight: 900;
  color: var(--color-charcoal);
}

.setup {
  font-size: 0.95rem;
  opacity: 0.85;
}

.support-line { font-size: 0.95rem; }
.support-line strong { color: var(--color-navy); }
.support-num { font-weight: 700; }

.freshness {
  display: block;
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.7;
  margin-top: 0.15rem;
}
.freshness a { color: inherit; }

/* --- the one slider --- */

.gap-control {
  background: var(--color-surface);
  /* faint left-to-right spectrum wash, remain colour -> separation colour,
     echoing the end labels and the result meter below */
  background-image: linear-gradient(
    to right,
    color-mix(in srgb, var(--color-remain) 10%, transparent),
    color-mix(in srgb, var(--color-separation) 10%, transparent)
  );
  border-radius: var(--radius);
  padding: 0.75rem var(--space-sm);
}

.gap-control > .label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

input[type="range"] {
  width: 100%;
  height: 1.6rem;
  accent-color: var(--color-separation);
  margin: 0;
}

.ends {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: 0.5rem;
}
.ends span {
  flex: 1 1 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}
/* ends map to the two meter colours below: at the left the remain majority
   turns out and stays comfortably ahead; at the right the separation side is
   the one showing up */
.ends span:first-child {
  text-align: left;
  color: var(--color-remain);
}
.ends span:last-child {
  text-align: right;
  color: var(--color-separation);
}

.readout {
  margin-top: 0.6rem;
  font-size: 0.9rem;
}
.readout strong { color: var(--color-charcoal); }

/* --- result --- */

.result {
  text-align: center;
  background: var(--color-accent-light);
  border-radius: var(--radius);
  padding: 0.75rem var(--space-sm);
}

.transform {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.2rem, 4.5vw, 1.6rem);
  color: var(--color-charcoal);
  margin-bottom: 0.5rem;
}
.transform .n-support { color: var(--color-separation); }
.transform .n-share { color: var(--color-separation); }

.meter {
  display: flex;
  width: 100%;
  height: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-border);
}
.meter-fill { transition: width 0.3s ease; }
.meter-remain { background: var(--color-remain); }
.meter-separation { background: var(--color-separation); }

.meter-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.25rem;
}
.meter-ends .remain { color: var(--color-remain); }
.meter-ends .separation { color: var(--color-separation); }

.outcome {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.5rem;
  color: var(--color-charcoal);
}

/* --- note + share --- */

.note {
  font-size: 0.82rem;
  opacity: 0.75;
  text-align: center;
}

/* icon-only share buttons — logos instead of words to keep the row compact
   as more networks are added (mirrors the blog's ShareButtons on the main site) */
.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.share-label {
  flex-basis: 100%;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.1rem;
}

.s-share {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.s-share:hover,
.s-share:focus-visible {
  background: var(--color-accent-dark);
  color: var(--color-offwhite);
}
.s-share svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.s-tip {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-charcoal);
  color: var(--color-offwhite);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.s-share:hover .s-tip,
.s-share:focus-visible .s-tip,
.s-share.copied .s-tip {
  opacity: 1;
}

/* --- collapsible explainer (below the fold) --- */

.how {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
  font-size: 0.9rem;
}
.how summary {
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
}
.how .how-body { padding-top: var(--space-xs); }
.how .how-body p { margin-bottom: var(--space-xs); opacity: 0.9; }
.how .footnote { font-size: 0.8rem; opacity: 0.65; }

/* --- link to the advanced version --- */

.advanced-link {
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.75;
}

/* --- footer --- */

.site-footer {
  background: var(--color-charcoal);
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  text-align: center;
}
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-offwhite);
  text-decoration: none;
  font-size: 0.8rem;
  opacity: 0.85;
}
.footer-credit:hover { opacity: 1; }
.footer-logo { height: 1.5rem; width: auto; }

/* --- desktop: a little more air, same single column --- */

@media (min-width: 40rem) {
  body { font-size: 1.0625rem; }
  .stack { gap: 1rem; padding: var(--space-md) 0; }
  .gap-control, .result { padding: var(--space-sm) var(--space-md); }
  .ends span { font-size: 0.95rem; }
}
