/* The Pages site in the app's Harvest skin (static/style.css): gold on
   green-cast greys in dark, gold on parchment in light. The values are
   Harvest's own tokens; where a token is named, it's the one copied. */

:root {
  /* The header and tabs are Harvest's dark panel in both schemes, so the
     brand mark's gold reads the same way on either. */
  --md-primary-fg-color: #1b201d;          /* dark --panel-2 */
  --md-primary-fg-color--light: #272d29;   /* dark --line */
  --md-primary-fg-color--dark: #141816;    /* dark --panel */
  --md-primary-bg-color: #e3dfd2;
  --md-primary-bg-color--light: #e3dfd2b3;
}

[data-md-color-scheme="default"] {
  --md-default-bg-color: #fdfbf4;          /* light --panel */
  --md-code-bg-color: #efeade;             /* light --panel-2 */
  --md-accent-fg-color: #a8792d;           /* light --accent */
  --md-accent-fg-color--transparent: #a8792d1a;
  /* --accent-dim for text: --accent itself is under 4.5:1 on parchment. */
  --md-typeset-a-color: #8a6420;
  --md-typeset-mark-color: #f0e9d6;        /* light --sel */
}

[data-md-color-scheme="slate"] {
  /* Material's slate greys take their cast from --md-hue; Harvest's are
     green, not Material's default blue. */
  --md-hue: 140;
  --md-default-bg-color: #141816;          /* dark --panel */
  --md-code-bg-color: #1b201d;             /* dark --panel-2 */
  --md-accent-fg-color: #cfa057;           /* dark --accent */
  --md-accent-fg-color--transparent: #cfa0571a;
  --md-typeset-a-color: #cfa057;
  --md-typeset-mark-color: #cfa05740;
  --md-footer-bg-color: #0f1211;           /* dark --ink */
  --md-footer-bg-color--dark: #0b0d0c;
}

/* The header's search box and the active sidebar entry pick up the gold. */
.md-nav__link--active,
.md-nav__item .md-nav__link--active code {
  color: var(--md-typeset-a-color);
}

/* Wide reference tables (filter syntax, the keyboard map) scroll inside
   their own box rather than squeezing every column to a word per line. */
.md-typeset table:not([class]) {
  font-size: .7rem;
}
.md-typeset table:not([class]) td:first-child code {
  white-space: nowrap;
}

/* --- The front page (overrides/home.html) -------------------------------- */

/* Harvest dark in both schemes, like the header above it: the banner is
   the brand, and the screenshot in it is the app in that skin. */
.wn-hero {
  background:
    radial-gradient(60rem 28rem at 85% -10%, #cfa05726, transparent 60%),
    linear-gradient(180deg, #1b201d 0%, #141816 100%);
  border-bottom: 1px solid #272d29;
  color: #c3c8be;
  overflow: hidden;
}
.wn-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 2.4rem;
  align-items: center;
  padding: 2.8rem .8rem 3rem;
}
.wn-hero__mark {
  display: block;
  width: 2.8rem;
  height: 2.8rem;
  margin-bottom: .6rem;
}
.wn-hero__title {
  margin: 0;
  color: #f1ede2;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
/* The loading screen's tagline under its wordmark, in the splash's own
   setting: mono, widely tracked, uppercase (.splash-tagline in
   static/style.css). */
.wn-hero__tagline {
  margin: .8rem 0 0;
  color: #c3c8be;
  font-family: var(--md-code-font-family);
  font-size: .7rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-wrap: balance;
  opacity: .85;
}
.wn-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 2rem;
}
/* Material styles .md-button only inside .md-typeset, which the banner
   is not, so the whole button is spelled out here. */
.wn-hero .md-button {
  display: inline-block;
  margin: 0;
  padding: .55em 1.6em;
  color: #e3dfd2;
  border: .1rem solid #4a524c;
  border-radius: .2rem;
  font-size: .75rem;
  font-weight: 700;
  transition: color 125ms, background-color 125ms, border-color 125ms;
}
.wn-hero .md-button:hover,
.wn-hero .md-button:focus {
  color: #0f1211;
  background-color: #e3b46a;
  border-color: #e3b46a;
}
.wn-hero .md-button--primary {
  color: #0f1211;
  background-color: #cfa057;
  border-color: #cfa057;
}
.wn-hero__shot {
  margin: 0;
  perspective: 80rem;
}
.wn-hero__shot picture,
.wn-hero__shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #363d38;
  border-radius: .3rem;
  box-shadow: 0 1.2rem 3rem #00000080, 0 0 0 1px #00000040;
  transform: rotateY(-7deg) rotateX(2deg);
  transform-origin: left center;
}

/* Narrower than the sidebar breakpoint: text first, the shot under it,
   flat. */
@media screen and (max-width: 59.984375em) {
  .wn-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    padding: 2rem .8rem 2.2rem;
  }
  .wn-hero__title { font-size: 2.1rem; }
  /* Tracked as wide as the splash's, the line wraps on a phone. */
  .wn-hero__tagline { font-size: .58rem; letter-spacing: .2em; }
  .wn-hero__shot img { transform: none; }
}

/* Home.md under the banner: its prose at a reading width, the features
   and the cards (Home's page list; build_wiki.py writes the grid) across
   the page, the cards two by two. */
.wn-home > :not(.grid, .wn-features) {
  max-width: 40rem;
}
.md-typeset .wn-home .grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
@media screen and (min-width: 60em) {
  .md-typeset .wn-home .grid.cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.md-typeset .grid.cards > ul > li {
  border-color: var(--md-default-fg-color--lightest);
}
.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--md-accent-fg-color);
}
.md-typeset .grid.cards .twemoji.lg {
  color: var(--md-accent-fg-color);
}
.md-typeset .grid.cards li ul {
  margin-left: 0;
  list-style: none;
}
.md-typeset .grid.cards li li {
  margin-left: 0;
  font-size: .7rem;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
}
.md-typeset .grid.cards li li a {
  font-weight: 600;
}

/* The features: a line of text beside its picture, sides alternating
   down the page; on a phone, the text over the picture. */
.wn-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 2.4rem;
  align-items: center;
  margin: 0 0 3.2rem;
}
.wn-feature:nth-child(even) {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
}
.wn-feature:nth-child(even) > .wn-feature__shot {
  order: -1;
}
.md-typeset .wn-feature h3 {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.md-typeset .wn-feature p {
  margin: 0 0 .8rem;
  color: var(--md-default-fg-color--light);
}
/* The bundled plugins ship switched off; the badge says which these are. */
.wn-feature__badge {
  margin-left: .3em;
  padding: .1em .45em;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: .2rem;
  color: var(--md-default-fg-color--light);
  font-family: var(--md-code-font-family);
  font-size: .55rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  vertical-align: .25em;
}
.md-typeset .wn-feature__more {
  font-size: .7rem;
  font-weight: 600;
}
.md-typeset .wn-feature__more::after {
  content: " →";
}
/* The picture opens full size. Screenshots of the dark skin, so they keep
   a dark edge on parchment too. */
.wn-feature__shot {
  display: block;
}
.md-typeset .wn-feature__shot img {
  display: block;
  width: 100%;
  border: 1px solid #363d38;
  border-radius: .3rem;
  box-shadow: 0 .6rem 1.6rem #00000040;
}
@media screen and (max-width: 59.984375em) {
  .wn-feature,
  .wn-feature:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 2.4rem;
  }
  .wn-feature:nth-child(even) > .wn-feature__shot {
    order: 0;
  }
}

/* A feature page's recording (docs/site/features/, put in a <picture> by
   hooks.py), framed as the front page's pictures are. */
.md-typeset .wn-recording img {
  display: block;
  border: 1px solid #363d38;
  border-radius: .3rem;
  box-shadow: 0 .6rem 1.6rem #00000040;
}

/* The footer's "Built from docs/wiki/ on main" sits on the footer's dark
   ground in both schemes; light mode's parchment code boxes glare there. */
.md-copyright code {
  padding: 0 .3em;
  color: inherit;
  background-color: #ffffff14;
}
