/* openNutrition brand page: only what that page has on top of ../styles.css (figures on fixed
   backgrounds, swatches, the do and don't cards). Modelled on opengym.ch/brand. The panels keep their
   own background in both themes, because each one shows the logo on a specific colour. */
.brand-doc figure { margin: 18px 0 0; }
.bg-stage { background: #0c0e12; border-radius: var(--r-m); aspect-ratio: 16 / 7; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.bg-stage img { width: 74%; }
.bg-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.bg-values div { background: var(--surface); border-radius: 14px; padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.bg-values b { font-size: 17px; color: var(--acc); }
.bg-values span { font-size: 15px; line-height: 1.45; color: var(--fg-2); }

.bg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.bg-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brand-doc .bg-card { margin: 0; background: var(--surface); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.bg-panel { display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; box-shadow: inset 0 0 0 1px var(--hair-soft); }
.bg-panel > img { width: 74%; }
.bg-panel > .bg-tile { width: 58%; border-radius: 23%; }
.bg-panel > .bg-round { border-radius: 50%; }
.bg-word { aspect-ratio: 16 / 7; }
.bg-word > img { width: 82%; }
.bg-card figcaption { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; flex: 1; }
.bg-card figcaption b { color: var(--fg); font-size: 15.5px; }
.bg-card figcaption span { color: var(--fg-2); line-height: 1.4; }
.bg-dl { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: auto; padding-top: 4px; }
.bg-dl a, .bg-files td a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 14.5px; }
.bg-files td a { margin-right: 14px; }
.bg-files td { vertical-align: middle; padding-top: 4px; padding-bottom: 4px; }
.bg-files td:first-child { color: var(--fg); font-weight: 600; white-space: nowrap; }

/* don't: a straight red stroke across the figure */
.bg-no .bg-panel { position: relative; }
.bg-no .bg-panel::after { content: ""; position: absolute; left: -10%; right: -10%; top: 50%; height: 3px; margin-top: -1.5px; background: #e5484d; transform: rotate(-45deg); }
.bg-retype { font: 700 clamp(15px, 2vw, 21px) Georgia, "Times New Roman", serif; color: #a3e635; }

/* contents column: sub-entries, and the downloads under the menu (as on opengym.ch/brand).
   On phones the two buttons in the page head do that job, so these are hidden with the drawer. */
.toc .toc-sub { padding-bottom: 0; }
.toc .toc-sub a { min-height: 30px; padding-left: 14px; font-size: 14px; }
.toc-dl { display: grid; gap: 8px; margin-top: 18px; padding-right: 4px; }
.toc-dl .btn { min-height: 44px; padding: 8px 14px; font-size: 15px; text-align: center; flex-wrap: wrap; gap: 0 8px; }
.toc .toc-dl a.btn { color: var(--ink); }
.toc .toc-dl a.btn.ghost { color: var(--fg); }
.btn small { font-size: 13.5px; font-weight: 500; opacity: .75; }

/* construction: two drawings on the dark ground, built by scripts/brand/book.py --construction */
.bg-construct-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bg-construct .bg-panel { aspect-ratio: auto; background: #0c0e12; border-radius: var(--r-m); padding: 4%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.bg-construct svg { display: block; width: 100%; height: auto; }
.bg-construct figcaption { margin-top: 10px; font-size: 14.5px; line-height: 1.45; color: var(--fg-3); }
.bg-measure td:first-child { color: var(--acc); font-weight: 700; width: 1%; padding-right: 0; }
.bg-measure td:nth-child(2) { color: var(--fg); font-weight: 600; }
.prose .table-wrap .bg-measure { min-width: 720px; }

/* clear space */
.bg-space { aspect-ratio: 16 / 7; border-radius: var(--r-m); }
/* The SVG's own box is the mark plus a quarter of its width on every side, so the dashed line
   around the picture is the clear space and the thin inner line is the mark itself. */
.bg-space-box { position: relative; width: min(44%, 280px); outline: 1.5px dashed rgba(163, 230, 53, .8); background: rgba(163, 230, 53, .07); }
.bg-space-box img { width: 100%; }
.bg-space-box::after { content: ""; position: absolute; inset: 16.3%; border: 1px solid rgba(255, 255, 255, .3); }

/* colour */
.bg-swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.bg-sw { position: relative; border: 0; border-radius: 14px; padding: 62px 14px 12px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 1px;
  box-shadow: inset 0 0 0 1px var(--hair); transition: transform .16s var(--ease); }
.bg-sw:active { transform: scale(.97); }
.bg-sw b { font-size: 15px; } .bg-sw span { font-size: 14px; font-variant-numeric: tabular-nums; }
.bg-copied { position: absolute; top: 10px; right: 12px; font-style: normal; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s ease; }
.bg-sw.is-copied .bg-copied { opacity: 1; }

/* type */
.bg-specimen { background: #0c0e12; border-radius: var(--r-m); aspect-ratio: auto; place-items: start; align-content: center; gap: 8px; padding: clamp(24px, 4vw, 40px); }
.bg-sp-1 { font-size: clamp(44px, 7vw, 76px); font-weight: 700; letter-spacing: -.045em; line-height: 1; color: #f2f2f7; }
.bg-sp-2 { font-size: clamp(21px, 3vw, 30px); font-weight: 700; letter-spacing: -.03em; color: #a3e635; }
.bg-sp-3 { font-size: 16px; color: #a1a1a6; }

/* voice */
.bg-say { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.bg-say > div { background: var(--surface); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.bg-say b { font-size: 15px; } .bg-say span { font-size: 16px; color: var(--fg-2); }
.bg-yes b { color: var(--acc); } .bg-nope b { color: var(--bad); }
.bg-nope span { text-decoration: line-through; text-decoration-color: var(--bad); }

/* sisters */
.bg-pair { aspect-ratio: 16 / 7; border-radius: var(--r-m); display: flex; align-items: center; justify-content: center; gap: clamp(36px, 8.5%, 64px); }
.bg-pair > img { width: clamp(72px, 17%, 128px); border-radius: 23%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }

@media (max-width: 1100px) { .bg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bg-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) { .toc-dl { display: none; } .toc .toc-sub a { min-height: 40px; font-size: 15px; } }
@media (max-width: 640px) {
  .bg-values, .bg-say, .bg-grid-wide, .bg-construct-pair { grid-template-columns: minmax(0, 1fr); }
  .bg-space, .bg-pair, .bg-stage { aspect-ratio: 4 / 3; }
  .bg-space-box { width: 58%; }
  .bg-stage img { width: 88%; }
}
@media (prefers-reduced-motion: reduce) { .bg-sw, .bg-copied { transition: none; } }
