/* Support entry — 1in80
   Standalone: no dependency on the main bundles, no changes to them. */

.supc {
  position: fixed;
  right: 16px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 6px 2px;
  margin: 0;
  background: none;
  color: var(--ink3, #5F6E72);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
  opacity: .45;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .18s ease, color .18s ease;
}
.supc:hover,
.supc:focus-visible { opacity: .92; color: var(--accent, #8C1D3C); }
.supc:focus-visible { outline: 2px solid var(--accent, #8C1D3C); outline-offset: 4px; border-radius: 2px; }

/* The end-of-life footer is fixed and centred at the bottom, so lift the
   entry above it once the death screen is open. */
body.sup-dead .supc { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }

.supp {
  --b1: #1E8AD0;
  --b2: #002F86;
  position: fixed;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 56;
  width: 292px;
  max-width: calc(100vw - 32px);
  padding: 14px 14px 13px;
  background: var(--card, #F7FAF8);
  color: var(--ink, #13212A);
  border: 1px solid var(--rule, #C7D2CE);
  border-radius: 10px;
  box-shadow: 0 24px 48px -20px rgba(19, 33, 42, .45);
  display: none;
}
.supp[data-open="1"] { display: block; }
.supp:focus { outline: none; }
body.sup-dead .supp { bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }

.supp-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 11px;
}
.supp-h b {
  font-family: var(--f-display, 'Hahmlet', serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.supp-x {
  appearance: none;
  border: 0;
  background: none;
  padding: 2px 4px;
  margin: -4px -4px -4px 0;
  color: var(--ink3, #5F6E72);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.supp-x:hover { color: var(--ink, #13212A); }
.supp-x:focus-visible { outline: 2px solid var(--accent, #8C1D3C); outline-offset: 2px; }

/* three ways, one shown at a time — segmented, each in its own brand colour */
.supp-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 0 0 11px;
}
.supp-t {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 6px 4px;
  margin: 0;
  border: 1px solid var(--rule, #C7D2CE);
  border-radius: 7px;
  background: transparent;
  color: var(--ink2, #4A5A61);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.supp-t:hover { border-color: var(--ink3, #5F6E72); color: var(--ink, #13212A); }
.supp-t:focus-visible { outline: 2px solid var(--accent, #8C1D3C); outline-offset: 2px; }
.supp-ti { display: block; width: 14px; height: 14px; flex: 0 0 auto; }
.supp-ti svg { display: block; width: 100%; height: 100%; }
.supp-tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.supp-t[aria-selected="true"] { border-color: transparent; color: #fff; }
.supp-t[data-k="pp"][aria-selected="true"] { background: linear-gradient(160deg, #0C7BC0, #002F86); }
.supp-t[data-k="wx"][aria-selected="true"] { background: linear-gradient(160deg, #4DA848, #2C6329); }
.supp-t[data-k="ali"][aria-selected="true"] { background: linear-gradient(160deg, #2E8BF0, #0A55C8); }
.supp-t[data-k="pp"] .supp-ti { color: #0070BA; }
.supp-t[data-k="wx"] .supp-ti { color: #4DA848; }
.supp-t[data-k="ali"] .supp-ti { color: #1677FF; }
.supp-t[aria-selected="true"] .supp-ti,
.supp-t[data-k="pp"][aria-selected="true"] .supp-ti,
.supp-t[data-k="wx"][aria-selected="true"] .supp-ti,
.supp-t[data-k="ali"][aria-selected="true"] .supp-ti { color: #fff; }

/* brand-tinted mat around the white code: keeps the poster framing without
   eating space — the code itself stays pure white with its quiet zone */
.supp-frame {
  background: linear-gradient(165deg, var(--b1), var(--b2));
  border-radius: 9px;
  padding: 7px;
  margin: 0 0 11px;
}
.supp-frame[data-k="wx"] { --b1: #4DA848; --b2: #2C6329; }
.supp-frame[data-k="ali"] { --b1: #2E8BF0; --b2: #0A55C8; }
.supp-qr {
  background: #fff;
  border-radius: 5px;
  padding: 6px;
  line-height: 0;
}
.supp-qr img {
  display: block;
  width: 100%;
  height: auto;
}

.supp-s {
  margin: 0 0 5px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink2, #4A5A61);
}
.supp-n {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink3, #5F6E72);
}

html[dir="rtl"] .supp-tn { letter-spacing: 0; }

/* static pages: the entry floats over the footer, so reserve room for it */
body.sup-doc footer {
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 520px) {
  .supp {
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  body.sup-dead .supp { bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }
  .supc { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  body.sup-dead .supc { bottom: calc(102px + env(safe-area-inset-bottom, 0px)); }
  .supp-t { font-size: 12px; padding: 7px 4px; }
}

@media print {
  .supc, .supp { display: none !important; }
}
