/*
 * holotype — structure the tokens can't express, loaded after press.css:
 * heading weights (Martina Plantijn has no semibold), a docs page's name, the
 * caption label, and the type scale. Sizes sit under @media screen so print keeps press's own
 * print sizes.
 */

/* ---------- Headings ---------- */
/* A medium title, medium section titles and medium italic subheads. */
.press-title {
  font-weight: 500;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
}

h3,
h4 {
  font-style: italic;
}

h2 {
  padding-bottom: 0;
  border-bottom: none;
}

/* ---------- A docs page's name ---------- */
/* A page of a docs site has its name as a page of Holotype's site has its own:
   Martina Plantijn Light at 48px, over a rule. A paper's title stays Medium at
   40px. */
@media screen {
  .press-doc-head {
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ink);
  }
  .press-doc-head .press-title {
    margin-bottom: 0;
    font-weight: 300;
    font-size: 48px;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }
}

@media screen and (max-width: 600px) {
  .press-doc-head .press-title {
    font-size: 36px;
  }
}

/* ---------- Front matter and captions ---------- */
.press-authors {
  font-weight: 600;
}

.press-figure-label,
.press-table-label,
figcaption strong {
  font-weight: 600;
  color: var(--ink);
}

/* Column heads in the table's own voice: semibold Plex Sans at the cell size,
   like the caption lead-in, rather than press's small mono label. */
th {
  font-family: var(--sans);
  font-weight: 600;
  font-size: inherit;
  color: var(--ink);
}

/* ---------- Screen sizes ---------- */
@media screen {
  .press-title {
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin-bottom: 22px;
  }
  .press-authors {
    font-size: 17px;
    line-height: 1.45;
  }
  .press-members {
    font-size: 15px;
  }
  .press-affiliations {
    font-size: 14px;
  }
  .press-correspondence,
  .press-date,
  .press-links,
  .press-citation,
  .press-stamp {
    font-size: 13px;
  }
  h1 {
    font-size: 29px;
    line-height: 1.25;
    letter-spacing: -0.006em;
    margin: 56px 0 14px;
  }
  h2 {
    font-size: 22px;
    line-height: 1.3;
    margin: 40px 0 12px;
  }
  h3,
  h4 {
    font-size: 19px;
    line-height: 1.4;
    margin: 32px 0 8px;
  }
  figcaption {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 12px;
  }
  .press-reference-list {
    font-size: 16px;
    line-height: 1.5;
  }
}

/* The link home (the `home` setting), as in the bar of Holotype's site: the
   Holotype wordmark over the specimen. Both shapes are copies of diorama's:
   `node scripts/bar.mjs --theme` there prints these two declarations.

   The wordmark is the small one, drawn from Martina Medium, at the bar's 26px
   in the rail and at 20px in the narrow bar: --holotype-scale is its size as a
   part of 26px. It's a mask, so it takes the ink. The link's text has no size
   and stays as the link's name. The mask's box is 1.2 of the size tall, which
   has room for the descenders, with the capitals at its middle. That puts them
   on the row's center, level with the chevron. The negative margins keep the
   box out of the line's height, which press fixes at 24px. */
.press-contents {
  --holotype-wordmark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -950 4034 1200'%3E%3Cpath d='M330 -46V0H18V-46Q65 -48 91 -63.5Q117 -79 117 -118V-582Q117 -621 91 -636.5Q65 -652 18 -654V-700H330V-654Q284 -652 257.5 -636.5Q231 -621 231 -582V-390H557V-582Q557 -621 531 -636.5Q505 -652 458 -654V-700H770V-654Q724 -652 697.5 -636.5Q671 -621 671 -582V-118Q671 -79 697.5 -63.5Q724 -48 770 -46V0H458V-46Q505 -48 531 -63.5Q557 -79 557 -118V-332H231V-118Q231 -79 257.5 -63.5Q284 -48 330 -46ZM814 -236Q814 -309 844 -368.5Q874 -428 927.5 -464Q981 -500 1051 -500Q1118 -500 1171 -468.5Q1224 -437 1255.5 -382Q1287 -327 1287 -254Q1287 -182 1257 -122Q1227 -62 1174 -26Q1121 10 1051 10Q985 10 931 -21.5Q877 -53 845.5 -108.5Q814 -164 814 -236ZM933 -273Q933 -214 949 -160Q965 -106 994 -71.5Q1023 -37 1061 -37Q1118 -37 1143 -86Q1168 -135 1168 -217Q1168 -276 1152 -330Q1136 -384 1107 -418Q1078 -452 1038 -452Q983 -452 958 -403.5Q933 -355 933 -273ZM1407 -95V-639L1334 -685V-707L1499 -766H1517V-95Q1517 -70 1536 -58Q1555 -46 1589 -44V0H1335V-44Q1369 -46 1388 -58Q1407 -70 1407 -95ZM1634 -236Q1634 -309 1664 -368.5Q1694 -428 1747.5 -464Q1801 -500 1871 -500Q1938 -500 1991 -468.5Q2044 -437 2075.5 -382Q2107 -327 2107 -254Q2107 -182 2077 -122Q2047 -62 1994 -26Q1941 10 1871 10Q1805 10 1751 -21.5Q1697 -53 1665.5 -108.5Q1634 -164 1634 -236ZM1753 -273Q1753 -214 1769 -160Q1785 -106 1814 -71.5Q1843 -37 1881 -37Q1938 -37 1963 -86Q1988 -135 1988 -217Q1988 -276 1972 -330Q1956 -384 1927 -418Q1898 -452 1858 -452Q1803 -452 1778 -403.5Q1753 -355 1753 -273ZM2326 -604V-490H2722V-446Q2675 -442 2658.5 -427Q2642 -412 2655 -377L2754 -122L2852 -377Q2866 -412 2849.5 -427Q2833 -442 2786 -446V-490H2986V-446Q2960 -444 2945.5 -432.5Q2931 -421 2920 -395L2735 50Q2712 106 2686.5 149Q2661 192 2629 216Q2597 240 2553 240Q2517 240 2491.5 218Q2466 196 2466 164Q2466 135 2484 116Q2502 97 2529 97Q2552 97 2563 106Q2574 115 2579.5 127.5Q2585 140 2590 149Q2595 158 2606 158Q2616 158 2625.5 150Q2635 142 2648 119Q2661 96 2679 52L2699 6L2532 -395Q2514.9 -436 2470.5 -436H2326V-126Q2326 -94 2350 -80Q2374 -66 2409 -66Q2424 -66 2444.5 -69Q2465 -72 2479 -76V-29Q2452 -12 2417.5 -1Q2383 10 2344 10Q2289 10 2252.5 -18.5Q2216 -47 2216 -93V-436H2147V-465Q2185 -483 2224 -520.5Q2263 -558 2284 -604ZM3271 186V230H2996V186Q3030 184 3049 172Q3068 160 3068 135V-373L2996 -418V-440L3161 -500H3179V-417Q3208 -450 3250.5 -475Q3293 -500 3338 -500Q3393 -500 3434 -470.5Q3475 -441 3498 -390.5Q3521 -340 3521 -276Q3521 -185 3484 -121Q3447 -57 3387.5 -23.5Q3328 10 3262 10Q3239 10 3219 6.5Q3199 3 3179 -3V135Q3179 160 3200.5 171.5Q3222 183 3271 186ZM3179 -385V-144Q3179 -93 3207 -66.5Q3235 -40 3277 -40Q3315 -40 3345 -64.5Q3375 -89 3392.5 -132Q3410 -175 3410 -230Q3410 -319 3373.5 -369.5Q3337 -420 3272 -420Q3246 -420 3220.5 -410.5Q3195 -401 3179 -385ZM3691 -281Q3691 -223 3712.5 -178Q3734 -133 3771.5 -107.5Q3809 -82 3858 -82Q3894 -82 3927.5 -95Q3961 -108 3988 -139L4011 -118Q3984 -63 3934.5 -26.5Q3885 10 3816 10Q3754 10 3703 -21.5Q3652 -53 3622.5 -108.5Q3593 -164 3593 -236Q3593 -310 3623 -369.5Q3653 -429 3704 -464.5Q3755 -500 3817 -500Q3867 -500 3903 -480Q3939 -460 3962.5 -427.5Q3986 -395 3997 -357Q4008 -319 4008 -283H3691ZM3798 -450Q3761 -450 3732.5 -419Q3704 -388 3695 -331L3891 -330Q3891 -361 3880.5 -388Q3870 -415 3850 -432.5Q3830 -450 3798 -450Z'/%3E%3C/svg%3E");
  --holotype-specimen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='111.78 15.97 220 350'%3E%3Cpath fill-rule='evenodd' d='M252.4 22L251.7 22.9L251.4 23.9L249 45.6L246.1 68.9L242.8 92.9L239.2 116.1L234.5 143.9L233.7 146.4L232.2 149.1L227.1 155.1L221.5 163.4L219.4 165.6L218 166.4L217.2 166.6L215.7 166.6L214.6 166.4L212.8 165.6L211.9 165L211.1 164.1L210.3 162.6L209.6 160.4L208.7 155.1L207.5 151.4L206.6 149.1L202.9 141.6L201.4 137.9L200.5 134.9L199.5 130.4L198.8 125.1L195.9 110.1L192 95.9L186.5 80.9L181.2 69.1L180.4 68.2L179.7 68L178.9 68.2L178.2 68.8L177.8 69.6L177.8 70.4L183.1 82.4L188.1 96.6L191.8 110.9L194.6 125.9L194.7 130.4L194.3 134.1L193.9 135.6L193.2 137.1L192.4 138.2L191.7 138.8L190.9 139.2L189.4 139.5L187.2 138.9L184.2 136.8L181.2 134.2L172.7 124.4L164.1 113.1L156.6 101.9L150.4 91.4L149.7 91L148.9 90.9L148.2 91.2L146.9 92.1L146.7 92.8L146.8 93.6L147.1 94.4L152.6 104.1L160.4 116.1L168.6 127.4L177.3 137.9L183.3 144.6L184.8 146.9L186.3 149.9L188.7 156.6L190.2 159.6L193.2 163.4L198.4 168.2L199.3 169.4L199.9 170.9L200.1 172.4L200 173.9L198.5 182.9L197.3 193.4L196.4 197.1L195.1 200.1L189.8 210.6L187.2 214.4L184.9 216.6L182.7 218.2L179.7 219.4L177.4 219.5L175.2 219L173.6 218.1L171.4 216.1L163.2 206.1L150.5 187.4L140.2 168.6L131.8 149.1L125.7 130L124.9 129.2L124.2 129.1L123.4 129.1L118.2 130.6L117.4 131.1L117.1 131.9L117.4 133.4L123 152.1L131.5 173.1L142.1 193.4L154.2 212L165.3 226.4L166.5 228.6L167.8 232.4L170 244.4L173.6 257.9L174.1 260.9L174.3 263.9L173.6 300.6L172 357.6L172.2 359.1L172.9 359.8L174.4 360L203.7 359.9L204.4 359.6L204.8 359.1L205 358.4L204.8 339.6L203.2 299.9L201.5 264.6L201.5 260.1L202 256.4L203.5 248.9L204.8 240.6L205.8 229.4L206.5 224.9L207.9 220.4L213.9 205.4L215.8 202.4L221 196.4L224.3 191.9L226.6 188.1L229.3 182.1L230.8 179.9L232.9 178L239.7 173.8L243.9 170.9L250.9 165L253.9 163L256.9 161.5L265.9 158.3L280.9 152.1L295.2 145.2L309.3 137.1L320.7 129.6L321.3 128.9L321.5 128.1L321.3 127.4L319.7 125.1L319.2 124.7L318.4 124.5L317.7 124.7L305.7 132.3L292.2 139.6L277.9 146.2L263.7 151.7L258.4 153.4L253.9 154.3L251.7 154.4L249.4 154.1L247.8 153.6L245.7 152.4L244.4 151.4L243.2 149.9L242.4 148.4L242 146.9L241.9 143.9L246 116.9L249.4 92.9L252.3 69.6L254.9 46.4L257.1 24.6L257 23.1L256.4 22.4L255.4 22L253.2 21.9Z'/%3E%3C/svg%3E");
}

.press-contents .press-contents-home {
  display: flex;
  align-items: center;
  font-size: 0;
}

.press-contents .press-contents-home::before {
  content: "";
  flex: none;
  width: calc(104.88px * var(--holotype-scale));
  height: calc(31.2px * var(--holotype-scale));
  margin: -4px 0;
  background: var(--ink);
  mask: var(--holotype-wordmark) center / contain no-repeat;
}

/* Behind the wordmark, on the ground press leaves for a theme behind the link's
   bar, the specimen: in one color, the ink at 7%, and close in on its main
   fork, so what shows is its spokes. At 26px it's 1.1px to one of its units,
   with the fork 64px right of the wordmark's left edge and 6.2px below the
   middle of its capitals. The mask's box is 220 by 350 units with the fork at
   (80, 150), which puts the box's corner 24px left of the wordmark and 158.8px
   above that middle. --holotype-left and --holotype-middle say where the
   wordmark is on each ground. In the narrow bar the specimen runs on under the
   divider and the section's name. */
.press-contents-with-home .press-contents-head::before,
.press-contents-bar-row::before {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  mask: var(--holotype-specimen)
    calc(var(--holotype-left) - 24px * var(--holotype-scale))
    calc(var(--holotype-middle) - 158.8px * var(--holotype-scale)) /
    calc(242px * var(--holotype-scale)) auto no-repeat;
}

.press-contents-head {
  --holotype-scale: 1;
  --holotype-left: 20px;
  --holotype-middle: 30px;
}

.press-contents-bar-row {
  --holotype-scale: calc(20 / 26);
  --holotype-left: 1.5rem;
  --holotype-middle: 24px;
}

@media screen and (max-width: 600px) {
  .press-paper {
    padding-left: 20px;
    padding-right: 20px;
  }
  .press-title {
    font-size: 28px;
  }
  h1 {
    font-size: 24px;
  }
  /* A docs page is many short sections: its headings sit closer on a phone. */
  .press-doc h1 {
    margin-top: 44px;
  }
  .press-doc h2 {
    font-size: 20px;
    margin-top: 32px;
  }
  html[data-press-contents-js] .press-contents-bar {
    padding-left: 20px;
    padding-right: 20px;
  }
  .press-contents-bar-row {
    --holotype-left: 20px;
  }
  .press-contents-bar-row .press-contents-home {
    padding-left: 20px;
  }
}

/* Print keeps the small gap between paragraphs. */
@media print {
  .press-paper > p {
    margin: 0.5em 0;
  }
}
