/* ============================================================
   PMES — the Pre-Membership Education Seminar
   ============================================================

   Loaded after styles.css, so everything here builds on the same
   tokens the rest of the public site uses. Nothing in this file
   redefines a brand colour; it only arranges them.
   ============================================================ */

/* Hidden from the page but read aloud — used by the table captions. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.pmes-body {
  background: var(--paper);

  /*
    The height of the fixed Back/Next bar. Everything at the bottom of the
    page has to end above it, or the bar sits on top of it.

    The page's own script overwrites this with the bar's real height, because
    it is not constant — the application's last step swaps Next for a larger
    Submit button and the bar grows by 13px. This value is only the fallback
    for the moment before the script runs.
  */
  --pmes-nav-h: 88px;
}

/*
  The footer is the last thing on the page and was being covered by the bar —
  on a phone, all of it. Its final line is the Data Privacy Notice, which is
  exactly the link that must not be unreachable.
*/
.pmes-body .site-footer {
  padding-bottom: calc(40px + var(--pmes-nav-h));
}


/* ------------------------------------------------------------
   Progress bar — pinned under the site header
   ------------------------------------------------------------ */

.pmes-bar {
  position: sticky;
  /* Sits directly beneath the header, which is itself sticky at 0. */
  top: var(--header-h);
  z-index: 90;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.pmes-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.pmes-track {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.pmes-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  border-radius: var(--r-pill);
  transition: width .32s cubic-bezier(.4, 0, .2, 1);
}

.pmes-count {
  flex: none;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.pmes-count b { color: var(--ink); font-weight: 700; }

.pmes-menu-btn {
  flex: none;
  padding: 7px 15px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-light);
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color .15s ease;
}
.pmes-menu-btn:hover { background: #D7E6FA; }


/* Contents — a panel dropped from the bar. */
.pmes-menu {
  position: absolute;
  right: max(24px, (100vw - var(--container)) / 2);
  top: calc(100% + 8px);
  width: min(320px, calc(100vw - 32px));
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}

.pmes-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--body);
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.pmes-menu-item:hover { background: var(--canvas); }
.pmes-menu-item.is-current { background: var(--blue-light); color: var(--blue-dark); }

.mi-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--canvas);
  border-radius: 50%;
}
.pmes-menu-item.is-current .mi-num { color: #fff; background: var(--blue); }


/* ------------------------------------------------------------
   The chapter itself
   ------------------------------------------------------------ */

/* Clears the fixed bar, plus room to breathe under the last line. */
.pmes-main { padding-bottom: calc(var(--pmes-nav-h) + 40px); }

.pmes-shell {
  /* A seminar is reading, so the measure is narrower than the site's. */
  max-width: 760px;
  padding-top: 48px;
}

.pmes-chapter[hidden] { display: none; }

.pmes-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--blue);
}

.pmes-title {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
}

.pmes-sub {
  margin: 52px 0 14px;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}

.pmes-lead {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.68;
  color: var(--body);
}

.pmes-aside {
  margin: 26px 0 0;
  padding-left: 16px;
  border-left: 3px solid var(--blue);
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
}

.pmes-quote {
  margin: 0 0 26px;
  padding: 24px 26px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--blue-light);
  border-radius: var(--r-lg);
}

.pmes-note {
  margin: 30px 0 0;
  padding: 24px 26px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.pmes-note h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.pmes-note p { margin: 0 0 10px; font-size: 15px; line-height: 1.65; color: var(--body); }
.pmes-note p:last-child { margin-bottom: 0; }

.pmes-strap {
  margin: 40px 0 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--blue);
}
.pmes-strap em { font-style: italic; color: var(--blue); }


/* ------------------------------------------------------------
   C-O-O-P and A-S-E-N-S-O
   The initial is the point of both lists, so it is given the
   weight of a heading rather than a bullet.
   ------------------------------------------------------------ */

.coop-acronym,
.asenso-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.coop-acronym li,
.asenso-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.coop-letter,
.as-letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  border-radius: var(--r-sm);
}
.asenso-list .as-letter { background: var(--blue); }

.coop-acronym p,
.asenso-list p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
}
.coop-acronym b,
.asenso-list b { color: var(--ink); font-weight: 700; }


/* ------------------------------------------------------------
   Purpose — fourteen items, so they stay a plain list
   ------------------------------------------------------------ */

.purpose-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}
.purpose-list li {
  position: relative;
  padding: 11px 0 11px 30px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--body);
  border-bottom: 1px solid var(--line);
}
.purpose-list li:last-child { border-bottom: 0; }
.purpose-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 19px;
  width: 7px; height: 7px;
  background: var(--blue);
  border-radius: 50%;
}


/* ------------------------------------------------------------
   The seminar's four parts, listed on the welcome page
   ------------------------------------------------------------ */

.topic-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: topic;
  display: grid;
  gap: 12px;
}
.topic-list li {
  position: relative;
  counter-increment: topic;
  padding: 14px 18px 14px 52px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.topic-list li::before {
  content: counter(topic);
  position: absolute;
  left: 16px; top: 13px;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
}
.topic-list b { color: var(--ink); }


/* ------------------------------------------------------------
   Types of cooperative
   ------------------------------------------------------------ */

.type-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.type-list li {
  padding: 11px 15px;
  font-size: 14.5px;
  color: var(--body);
  background: var(--canvas);
  border-radius: var(--r-sm);
}
/* The one the reader is actually joining, called out so twenty-one names do
   not read as twenty-one equally relevant options. */
.type-list .is-ours {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  grid-column: 1 / -1;
  font-weight: 700;
  color: var(--ink);
  background: var(--blue-light);
}
.type-list .is-ours span {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
}


/* ------------------------------------------------------------
   Affiliations, in the seminar
   ------------------------------------------------------------ */

.affiliate-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.affiliate-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.affiliate-list img {
  flex: none;
  width: 64px;
  height: 52px;
  object-fit: contain;
}
.affiliate-list h3 { margin: 0 0 3px; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.affiliate-list p  { margin: 0; font-size: 14px; line-height: 1.5; color: var(--body); }


/* ------------------------------------------------------------
   The cooperative year
   ------------------------------------------------------------ */

.calendar-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.calendar-list li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--r-md);
}
.cal-when {
  flex: none;
  width: 92px;
  font-size: 14px;
  font-weight: 800;
  color: var(--blue);
}
.calendar-list b { display: block; margin-bottom: 3px; font-size: 15.5px; color: var(--ink); }
.calendar-list p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--body); }


/* ------------------------------------------------------------
   Timelines
   ------------------------------------------------------------ */

.pmes-timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
}
/* The spine. Inset so it runs through the middle of each marker. */
.pmes-timeline::before {
  content: "";
  position: absolute;
  left: 4px; top: 10px; bottom: 10px;
  width: 2px;
  background: var(--line);
}
.pmes-timeline li {
  position: relative;
  padding: 0 0 26px 0;
}
.pmes-timeline li::before {
  content: "";
  position: absolute;
  left: -22px; top: 6px;
  width: 10px; height: 10px;
  background: var(--blue);
  border: 2px solid var(--paper);
  border-radius: 50%;
}
.pmes-timeline.is-brand li::before { background: var(--blue); }

.tl-year {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--blue);
}
.pmes-timeline.is-brand .tl-year { color: var(--blue); }

.pmes-timeline p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--body);
}


/* ------------------------------------------------------------
   The seven principles
   ------------------------------------------------------------ */

.principle-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.principle-grid li {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
/* The drawings vary in proportion, so each is given the same box and left to
   sit inside it rather than being stretched to fill it. */
.principle-grid img,
.duty-list img {
  display: block;
  width: 100%;
  height: 112px;
  margin-bottom: 14px;
  object-fit: contain;
  object-position: center bottom;
}
.pr-num {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--blue-dark);
}
.principle-grid h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
/* One line of what the principle actually means. A list of seven titles tells
   a prospective member nothing; this is the chapter doing its job. */
.principle-grid p {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--body);
}


/* ------------------------------------------------------------
   Mission & vision
   ------------------------------------------------------------ */

.mv-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.mv-card {
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.mv-card h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--blue);
}
.mv-card p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }


/* ------------------------------------------------------------
   Leadership charts
   ------------------------------------------------------------ */

.pmes-figure { margin: 0 0 26px; }
.pmes-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
/* A single photograph, held to a modest width so it illustrates the text
   rather than interrupting it. */
.pmes-photo {
  max-width: 340px;
  margin: 0 0 30px;
}
.pmes-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
}
.pmes-photo figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}
/* A photograph meant to fill the column rather than sit beside the text. */
.pmes-photo.is-wide { max-width: 100%; margin-top: 34px; }
.pmes-photo.is-wide img { border-radius: var(--r-lg); }

/* Four photographs in a row, cropped square so they line up whatever shape
   they were taken in. */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.photo-strip figure { margin: 0; }
.photo-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-md);
}

/* ------------------------------------------------------------
   Full-size picture viewer
   ------------------------------------------------------------ */

/* The page behind must not scroll while the picture is open, or closing it
   drops you somewhere else in the chapter. */
body.has-viewer { overflow: hidden; }

.pmes-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: rgba(10, 15, 22, .94);
}
.pmes-viewer[hidden] { display: none; }

.viewer-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  /* Clear of a phone's status bar and notch. */
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(0, 0, 0, .35);
}

.viewer-caption {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-btn {
  flex: none;
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
}
.viewer-btn:hover { background: rgba(255, 255, 255, .26); }

/* A 44px target, because this is the way out and it is pressed with a thumb. */
.viewer-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 30px;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.viewer-close:hover { background: rgba(255, 255, 255, .3); }
.viewer-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.viewer-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Fitted to the screen to begin with, so the whole chart is seen at once. */
.viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: var(--r-sm);
}

/* Zoomed: natural width, and the stage becomes pannable. */
.pmes-viewer.is-actual .viewer-stage { place-items: start; }
.pmes-viewer.is-actual .viewer-stage img {
  max-width: none;
  max-height: none;
  width: auto;
}

.pmes-figure a { display: block; cursor: zoom-in; }
.pmes-figure a:focus-visible img { outline: 3px solid var(--blue); outline-offset: 2px; }
.pmes-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}
.fig-hint { color: var(--blue); }


/* ------------------------------------------------------------
   Products
   ------------------------------------------------------------ */

.product-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.product-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  font-size: 15.5px;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  background: var(--blue-light);
  border-radius: var(--r-md);
}

/* One fixed-height stage for every icon, whatever shape the drawing is —
   otherwise the nine labels sit at nine different heights. */
.product-art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 84px;
}
.product-art img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* Condo and vehicle share a card, so they share the stage. */
.product-art.is-pair img { max-width: 48%; }


/* ------------------------------------------------------------
   Ways to earn
   ------------------------------------------------------------ */

.earn-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.earn-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.earn-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
}
.earn-list li > div { flex: 1; min-width: 0; }
.earn-list h3 { margin: 0 0 5px; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.earn-list p  { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }

/* Beside the text on a desktop; dropped below it on a phone, where 120px of
   picture would leave the sentence about four words wide. */
.earn-art {
  flex: none;
  width: 120px;
  height: 90px;
  object-fit: contain;
  align-self: center;
}


/* ------------------------------------------------------------
   Tables — savings rates, and the table under each figure
   ------------------------------------------------------------ */

.table-wrap {
  /* Narrow screens scroll the table rather than squeezing the columns. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/*
   Its own class, NOT .rate-table. The home page already owns that name and
   paints every `th` with a blue gradient — which swallowed the row headings
   here, because these tables mark the first cell of each row as a `th` for
   screen readers. Two designs, one class name, and the wrong one won.
*/
.pmes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  /* Digits of equal width, so a column of rates can be compared down the page
     rather than read one at a time. The single biggest thing a table of
     numbers can do for a reader. */
  font-variant-numeric: tabular-nums;
}

.pmes-table caption {
  margin-bottom: 10px;
  font-size: 13.5px;
  text-align: left;
  color: var(--muted);
}

.pmes-table th,
.pmes-table td {
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.pmes-table thead th {
  padding-bottom: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}

.pmes-table tbody th {
  font-weight: 600;
  color: var(--ink);
}
.pmes-table tbody td { color: var(--body); }

/* A hairline between rows, and a tint on every other one. Either alone is
   weak across a wide table; together the eye keeps its place. */
.pmes-table tbody tr { border-bottom: 1px solid var(--line); }
.pmes-table tbody tr:nth-child(even) { background: var(--canvas); }
.pmes-table tbody tr:last-child { border-bottom: 0; }
.pmes-table tbody tr:hover { background: var(--blue-light); }

/* Numbers right-aligned so their digits line up under each other; the first
   column stays left, because names read from the left. */
.pmes-table thead th + th,
.pmes-table tbody td { text-align: right; }

/* The figure that matters most in its row. */
.pmes-table .is-lead { font-weight: 700; color: var(--ink); }

/* Not applicable — present, but not competing with the real numbers. */
.pmes-table .is-na { color: var(--muted); }

/* A forecast row, matching the hollow bars in the figures above. */
.pmes-table .is-forecast th,
.pmes-table .is-forecast td { color: var(--muted); }
.pmes-table .is-forecast th { font-weight: 500; font-style: italic; }

.table-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}


/* ------------------------------------------------------------
   Figures
   ------------------------------------------------------------ */

.chart-figure {
  margin: 0 0 42px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.chart-figure figcaption { margin-bottom: 16px; }
.chart-figure figcaption h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.chart-figure figcaption p { margin: 0; font-size: 14px; color: var(--muted); }

/* The tooltip is positioned against this box. */
.chart-holder { position: relative; }

.chart-tip {
  position: absolute;
  z-index: 5;
  transform: translateY(-100%);
  padding: 8px 11px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  white-space: nowrap;
}

.chart-table { margin-top: 14px; }
.chart-table summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}
.chart-table[open] summary { margin-bottom: 10px; }


/* ---- chart marks ----
   Two hues only, checked for colourblind separation before use.
   A forecast is drawn unfilled, so "not yet actual" survives being
   printed in black and white. */

.chart { display: block; overflow: visible; }

.chart .grid        { stroke: var(--line); stroke-width: 1; }
.chart .axis-label  { font-size: 12px; fill: var(--muted); }
.chart .axis-title  { font-size: 11.5px; font-weight: 600; fill: var(--muted);
                      letter-spacing: .04em; text-transform: uppercase; }
.chart .legend-label{ font-size: 13px; fill: var(--body); }
.chart .point-label { font-size: 12px; font-weight: 700; fill: var(--ink); }
/* One figure per bar. Quieter than a point label because there are sixteen of
   them, and they should read as annotation rather than as the chart itself. */
.chart .bar-label { font-size: 11px; font-weight: 600; fill: var(--body); }
.chart .bar-label.is-forecast { fill: var(--muted); }
.chart .row-label   { font-size: 13.5px; fill: var(--ink); }
.chart .row-value   { font-size: 13px; font-weight: 700; fill: var(--body); }
.chart .axis-label.is-forecast { fill: var(--muted); font-style: italic; }

/* Qualified with the element name on purpose: the series rules below set a
   fill, they are declared later, and at equal specificity the later rule wins
   — which would close the line into a solid blob. */
.chart polyline.line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart .line.is-forecast { stroke-dasharray: 6 5; }

.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.is-forecast { fill: var(--surface); stroke-width: 2.5; }

.chart .bar-bed { fill: var(--canvas); }
.chart .bar.is-forecast { fill: var(--surface); stroke-width: 2; }

.chart .hit { fill: transparent; }

/* series-1 — brand blue */
.chart .series-1               { fill: var(--blue); }
.chart .line.series-1          { stroke: var(--blue); }
.chart .dot.series-1           { fill: var(--blue); }
.chart .dot.series-1.is-forecast,
.chart .bar.series-1.is-forecast { stroke: var(--blue); }

/* series-2 — the deeper blue */
.chart .series-2               { fill: var(--blue); }
.chart .bar.series-2.is-forecast { stroke: var(--blue); }

.chart .swatch.series-1 { fill: var(--blue); }
.chart .swatch.series-2 { fill: var(--blue); }


/* ------------------------------------------------------------
   Eligibility
   ------------------------------------------------------------ */

.region-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.region-list li {
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--r-md);
}
.region-list h3 { margin: 0 0 6px; font-size: 15px; font-weight: 800; color: var(--blue); }
.region-list p  { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }


/* ------------------------------------------------------------
   Membership types and cost
   ------------------------------------------------------------ */

.type-pair,
.cost-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}

.type-card {
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
/* The regular member is the fuller offer, so it is the one given the accent. */
.type-card.is-regular { border-color: var(--blue); box-shadow: var(--shadow-md); }

.type-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.type-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.type-card li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
}
/* A tick or a cross, not a colour difference alone. */
.type-card li::before {
  position: absolute;
  left: 0; top: -1px;
  font-size: 15px;
  font-weight: 800;
}
.type-card li.yes::before { content: "\2713"; color: var(--ok); }
.type-card li.no::before  { content: "\2715"; color: var(--danger-soft); }
.type-card li b { color: var(--ink); }

.cost-pair { margin-top: 4px; }
.cost-card {
  padding: 24px 26px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.cost-card.is-return { background: var(--blue-light); border-color: var(--blue-mid); }
.cost-card h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cost-lines { margin: 0; display: grid; gap: 10px; }
.cost-lines > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.cost-lines dt { font-size: 15px; color: var(--body); }
.cost-lines dd {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.cost-lines dd span { font-size: 13px; font-weight: 500; color: var(--muted); }
.cost-lines .is-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.cost-lines .is-total dd { color: var(--blue-dark); }
.cost-foot { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--body); }

.benefit-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}
.benefit-list li {
  position: relative;
  padding: 11px 0 11px 30px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--body);
  border-bottom: 1px solid var(--line);
}
.benefit-list li:last-child { border-bottom: 0; }
.benefit-list li::before {
  content: "\2713";
  position: absolute;
  left: 4px; top: 11px;
  font-weight: 800;
  color: var(--blue-dark);
}


/* ------------------------------------------------------------
   Duties
   ------------------------------------------------------------ */

.duty-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.duty-list li {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.duty-num {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--blue);
}
.duty-list p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink); }


/* ------------------------------------------------------------
   How to join
   ------------------------------------------------------------ */

.join-steps {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.join-steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.join-steps b { display: block; margin-bottom: 4px; font-size: 16.5px; color: var(--ink); }
.join-steps p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }


/* ------------------------------------------------------------
   The acknowledgement
   ------------------------------------------------------------ */

.pmes-ack {
  margin: 28px 0 0;
  padding: 26px;
  background: var(--blue-light);
  border-radius: var(--r-lg);
}

.ack-check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
}
.ack-check input {
  flex: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  accent-color: var(--blue-dark);
  cursor: pointer;
}
.ack-check span {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

.ack-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
}

/* Locked rather than disabled: an anchor cannot be disabled, and a
   pointer-events:none button gives no way to explain why it will not go. */
.btn.is-locked {
  opacity: .5;
  cursor: not-allowed;
}

.ack-hint { margin: 0; font-size: 14px; color: var(--body); }
.ack-hint.is-nudge { color: var(--blue); font-weight: 700; }


/* ------------------------------------------------------------
   Back / Next
   ------------------------------------------------------------ */

.pmes-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.pmes-nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
/* The label between the buttons names what comes next, so "Next" is never
   a leap in the dark. It yields its space first when the bar is tight. */
.pmes-nav-label {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.pmes-nav .btn:disabled { opacity: .4; cursor: not-allowed; }
.pmes-nav #pmesNext { flex: none; }
/* .btn sets a display of its own, and a class beats the browser's built-in
   [hidden] rule — so on the last chapter Next has to be told again. */
.pmes-nav .btn[hidden] { display: none; }


/* ------------------------------------------------------------
   Phones
   ------------------------------------------------------------ */

@media (max-width: 720px) {
  .pmes-shell { padding-top: 32px; }
  .pmes-main  { padding-bottom: calc(var(--pmes-nav-h) + 28px); }

  /* The chapter counter is the first thing to go: the bar itself already
     shows how far along the reader is. */
  .pmes-count { display: none; }

  .pmes-menu { right: 16px; }

  .pmes-quote,
  .pmes-note,
  .pmes-ack,
  .chart-figure { padding: 20px; }

  .coop-acronym li,
  .asenso-list li { gap: 14px; padding: 12px 14px; }
  .coop-letter,
  .as-letter { width: 40px; height: 40px; font-size: 21px; }

  /* The picture goes under the sentence rather than beside it. */
  .earn-list li { flex-wrap: wrap; }
  .earn-art { order: 3; width: 100%; height: 120px; margin-top: 6px; }

  /* Nine services one-per-row is a long scroll for short labels, so a phone
     gets two columns. The principles and duties keep one: their headings are
     sentences, and two columns would wrap every one of them. */
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid li { padding: 16px 12px; font-size: 14.5px; }
  .product-art { height: 66px; }

  .pmes-photo { max-width: 100%; }
  .principle-grid img,
  .duty-list img { height: 96px; }

  /* The date stacks above its entry rather than taking a fifth of the row. */
  .calendar-list li { flex-direction: column; gap: 6px; }
  .cal-when { width: auto; }

  .affiliate-list li { gap: 14px; padding: 14px 16px; }
  .affiliate-list img { width: 52px; height: 44px; }

  /* Tighter, and the long row names are allowed to wrap onto a second line.
     Held on one line these tables are about 630px wide, which on a phone means
     reading a rates table by dragging it sideways. */
  .pmes-table { font-size: 14px; }
  .pmes-table th,
  .pmes-table td { padding: 10px 8px; }
  .pmes-table thead th,
  .pmes-table tbody th { white-space: normal; }
  /* The numbers themselves still never break. */
  .pmes-table tbody td { white-space: nowrap; }

  .ack-actions { gap: 12px; }
  .ack-actions .btn { width: 100%; }
  .ack-hint { width: 100%; text-align: center; }
}

/* Someone who has asked for less motion should not get a sliding bar. */
@media (prefers-reduced-motion: reduce) {
  .pmes-fill { transition: none; }
}
