/* ============================================================================
   The pieces of chrome the design adds on top of Material: the header capsule,
   the hero, the topic cards, and the smaller article furniture.
   Everything here is written against the roles in theme.css.
   ========================================================================= */

/* -------------------------------------------------------------- header ---- */

/*
  The design's header is a white capsule floating on the page rather than a
  bar spanning it, so .md-header stops being the surface and .md-header__inner
  becomes one. On the landing page the capsule sits on the accent flood, which
  the hero continues below it - :has() is what tells the two pages apart
  without a per-page body class, which base.html gives no block to add.
*/
/*
  The vertical room around the capsule is padding here, not margin on the
  capsule itself. .md-header has no padding, border or formatting context of
  its own, so a child's top and bottom margins collapse straight through it:
  the painted box ended up shorter than the capsule, and the page scrolled
  visibly through the bands above and below it.
*/
.md-header {
  background: var(--c-canvas);
  box-shadow: none;
  color: var(--c-ink);
  /*
    The gutter lives here, as plain padding on the bar, not as a max-width on
    the capsule: the capsule keeps .md-grid's own 61rem cap and its auto
    margins, and simply has less room to fill on a narrow screen. One box
    model, nothing to resolve.

    Vertical padding for the same reason it was moved off the capsule: .md-header
    has no border or formatting context, so a child's top and bottom margins
    collapse straight through it and the painted box came out shorter than the
    capsule, with the page scrolling visibly through the bands.
  */
  padding: var(--space-3) var(--space-4);
  transition: background 250ms;
}

body:has(.hc-hero) .md-header {
  background: var(--c-flood);
}

.md-header__inner {
  background: var(--c-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--c-elevation-2);
  margin: 0 auto;
  /* Symmetric; the extra room on the right is added back at the width where
     the search field appears inline. */
  padding: var(--space-1-5) var(--space-4);
}

/*
  No line-height here. The theme gives this element a fixed 2.4rem height and
  the matching line-height, which is the only thing centring the title in the
  bar; a role's 1.2 replaces it and the text rides up against the capsule's
  top edge. Size and weight are safe to set, the vertical rhythm is not.

  The capsule carries the mark and nothing else: the theme's title would say in
  words what the mark already says. Nothing is lost for a screen reader - the
  mark's own link keeps the aria-label the title would have carried.
*/
.md-header__title {
  display: none;
}

/*
  Only where there is a search field inline to make room for: on a phone the
  field is behind a button, and the extra right-hand padding just pushed those
  icons further from the edge than the hamburger is on the other side.
*/
@media screen and (min-width: 60em) {
  .md-header__inner {
    padding-right: var(--space-5);
  }
}

/* DOM order puts the mark before the drawer button; the board's mobile capsule
   starts with the hamburger. */
.md-header__button[for="__drawer"] {
  order: -1;
}

/*
  The capsule's mark carries two colours of its own, so it is drawn rather
  than painted: a mask keeps only the silhouette and would hand the ring over
  as one flat blob. The theme's <img> steps aside and the box behind it shows
  the file instead. Hiding rather than removing is deliberate - the <a> around
  it carries the aria-label, and the alt text would only repeat it.

  One file for both schemes, and the mark cannot mend that by itself: an image
  referenced from CSS cannot read this page's custom properties, and a
  `prefers-color-scheme` block inside the file would answer to the operating
  system rather than to the scheme toggle, so a reader who flips to dark on a
  light desktop would get the light mark anyway. Following the scheme takes a
  second file with the ink baked in. Going without one has a measured cost: on
  the capsule's neutral-950 this mark's darkest tile sits at 1.71:1, so the
  ring reads dim in the dark scheme.
*/
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  visibility: hidden;
}

/*
  One rule for the mark, not two. The theme hides it below 1220px and leans on
  the title there instead, so `display` has to be stated unconditionally - and
  `margin` has to be the shorthand that also carries the auto, because a second
  rule setting `margin-right: auto` further up is simply overwritten here.
  The auto is what keeps the controls at the right edge now that the title,
  which used to be the flexible spacer, is gone.
*/
.md-header__button.md-logo {
  background: url("../assets/chenjio-support.svg") no-repeat center/contain;
  display: block;
  height: 1.4rem;  /* 28 */
  margin: 0 auto 0 var(--space-1);
  padding: 0;
  width: 4.7rem;   /* 94 */
}

/*
  Material fills the search field with --md-default-bg-color, which is the page
  canvas - a grey panel once the header around it became a white capsule - and
  on hover paints it rgba(255,255,255,.12), which on that white is nothing at
  all. Both states are replaced here: a subtle fill with a ring that is always
  visible, and an accent ring on hover and while typing.
*/
/*
  The band and the footer keep the wordmark; the ring is the capsule's mark
  alone. Here that is not only a preference - the band is accent-600 in both
  schemes and the ring's ramp is centred on that very fill, so its middle would
  disappear outright, its best tile reaching 1.66:1 and the orange topping out
  at 2.24:1.

  The wordmark is painted rather than drawn for the reason it always was: an
  <img> cannot take currentColor and a mask can, and with the accent baked into
  the file it was purple on purple and simply disappeared.
*/
.md-nav__title .md-nav__button.md-logo img {
  visibility: hidden;
}

.md-nav__title .md-nav__button.md-logo {
  background: var(--md-primary-bg-color);
  height: 1.4rem;  /* 28 */
  width: 4.7rem;   /* 94 */
  -webkit-mask: url("../assets/chenjio-logo.svg") no-repeat center/contain;
  mask: url("../assets/chenjio-logo.svg") no-repeat center/contain;
}

/*
  No rules between rows. The theme separates drawer items with a full-width
  border, which cuts straight across the rounded corners of a pill - two
  different ways of grouping the same list, fighting each other.
*/
.md-nav--primary .md-nav__item {
  border-top: none;
}

.md-search__form,
[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  background: var(--c-surface-subtle);
  border-radius: var(--radius-full);
  box-shadow: inset 0 0 0 1px var(--c-line);
  color: var(--c-ink);
  transition: box-shadow 125ms;
}

.md-search__form:hover,
.md-search__form:focus-within,
[data-md-toggle="search"]:checked ~ .md-header .md-search__form:hover {
  background: var(--c-surface-subtle);
  box-shadow: inset 0 0 0 1px var(--ref-accent-400);
}

/*
  Open, the field stops being a pill. It becomes the head of the results panel,
  which butts straight up against its bottom edge - rounded corners there leave
  two notches of header showing beside a flat sheet. Square, the two read as
  one surface, which is the shape the theme's own open state has.
*/
[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  border-radius: 0;
}

/*
  The suggestion is a separate layer sitting on top of the field, with
  white-space: pre, so the ghost text only lines up while it and the input
  share their metrics exactly - the theme sets both to the same size at each
  breakpoint for that reason. Size them together or not at all.

  16px rather than the 14px the rest of the capsule uses: the design system
  pins its input role at 16px because iOS Safari zooms the viewport on focus
  for anything smaller, and a help centre is read on phones.
*/
.md-search__input,
.md-search__suggest {
  font-size: var(--font-size-500);
}

.md-search__input {
  color: var(--c-ink);
}

.md-search__input::placeholder,
.md-search__suggest {
  color: var(--c-muted);
}

/*
  The theme paints these with --md-primary-bg-color - the ink it expects to use
  *on top of* the header's primary fill, which is white here. The capsule is a
  white surface, not a filled bar, so everything standing on it takes page ink
  instead. Scoped to .md-header so it outranks the theme's bare class.
*/
.md-header__button,
.md-header .md-search__icon {
  color: var(--c-ink);
}

/* Open, the icons move inside the field and step back to a muted weight. */
[data-md-toggle="search"]:checked ~ .md-header .md-search__icon,
.md-search__options .md-icon {
  color: var(--c-muted);
}

/*
  Only on desktop, where the results hang as a dropdown with an end to round.
  On a phone the panel runs to the bottom of the screen and a radius there
  would curve against nothing.
*/
@media screen and (min-width: 60em) {
  .md-search__output {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }
}

/* ---------------------------------------------------------------- hero ---- */

/*
  Rendered from the theme's own `hero` block, which sits outside the content
  container - full width without a negative margin fighting the grid. It joins
  the header's flood above it into one field with a flat bottom edge.
*/
.hc-hero {
  background: var(--c-flood);
  color: var(--c-on-flood-ink);
  margin-top: calc(-1 * var(--space-3));
  padding-top: var(--space-3);
}

.hc-hero__inner {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0 auto;
  max-width: 38rem;  /* 760 */
  padding: var(--space-10) var(--space-4) var(--space-20);
  text-align: center;
}

.hc-hero__eyebrow {
  color: var(--c-on-flood-muted);
  font-size: var(--font-size-100);
  font-weight: var(--font-weight-medium);
  line-height: var(--font-line-height-snug);
  letter-spacing: var(--font-letter-spacing-wider);
  text-transform: uppercase;
}

.hc-hero__title {
  color: var(--c-on-flood-ink);
  font-size: var(--font-size-1300);
  font-weight: var(--font-weight-medium);
  line-height: var(--font-line-height-tight);
  letter-spacing: var(--font-letter-spacing-tighter);
  margin: 0;
  text-wrap: balance;
}

.hc-hero__tagline {
  color: var(--c-on-flood-muted);
  font-size: var(--font-size-500);
  font-weight: var(--font-weight-regular);
  line-height: var(--font-line-height-relaxed);
  margin: 0;
  text-wrap: pretty;
}

/*
  A label, not a button: it points at #__search, the checkbox the header's own
  search control toggles, so the theme's dialog opens with no script of ours
  and nothing to keep in sync.
*/
.hc-hero__search {
  align-items: center;
  background: var(--c-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--c-elevation-2);
  box-sizing: border-box;
  color: var(--c-ink);
  cursor: pointer;
  display: flex;
  font-size: var(--font-size-400);
  font-weight: var(--font-weight-medium);
  line-height: var(--font-line-height-snug);
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-3);
  max-width: 30rem;   /* 600 */
  min-height: 3rem;   /* 60 */
  padding: 0 var(--space-6);
  transition: box-shadow 125ms;
  width: 100%;
}

.hc-hero__search:hover,
.hc-hero__search:focus-visible {
  box-shadow: var(--c-elevation-2), inset 0 0 0 2px var(--ref-accent-400);
}

.hc-hero__search-icon {
  color: var(--c-accent-ink);
  display: flex;
}

.hc-hero__search-icon svg {
  fill: currentcolor;
  height: 1rem;  /* 20 */
  width: 1rem;
}

/* --------------------------------------------------------------- cards ---- */

/*
  The cards sit inside <article class="md-typeset">, which styles every link it
  contains. The .md-typeset prefix is what lets these rules win against it;
  without it the cards get underlines and link colour.
*/
.md-typeset .hc-cards {
  display: grid;
  gap: var(--space-6);
  /*
    min() inside minmax is what lets a track drop below its own minimum. A bare
    minmax(16rem, 1fr) is a hard floor of 320px at this root, which is wider
    than the content band on a 320px screen - the grid stopped shrinking and
    pushed the page sideways.
  */
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  margin: 0 0 var(--space-12);
}

/*
  The grid rides up over the flood's bottom edge, as the desktop board shows.
  Only where there is room for it: at one column the overlap reads as a
  collision rather than a layer.

  The theme puts 30px of margin above .md-main__inner and 12px of padding above
  .md-content__inner, which silently ate most of a negative margin set here -
  the number meant one thing and the page showed another. Zeroing both on this
  page makes --hc-card-overlap the real distance, so it can be tuned by itself.
*/
@media screen and (min-width: 60em) {
  :root {
    --hc-card-overlap: var(--space-16);
  }

  body:has(.hc-hero) .md-main__inner {
    margin-top: 0;
  }

  body:has(.hc-hero) .md-content__inner {
    padding-top: 0;
  }

  .md-typeset .hc-cards {
    margin-top: calc(-1 * var(--hc-card-overlap));
  }
}

.md-typeset .hc-card {
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--c-elevation-2);
  color: var(--c-ink);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-8);
  transition: background 125ms, box-shadow 125ms, transform 125ms;
}

.md-typeset .hc-card:hover,
.md-typeset .hc-card:focus-visible {
  background: var(--c-surface-hover);
  box-shadow: var(--c-elevation-3);
  color: var(--c-ink);
  transform: translateY(-2px);
}

.hc-card__icon {
  align-items: center;
  border-radius: var(--radius-full);
  color: var(--c-tint-ink);
  display: flex;
  height: 2.8rem;  /* 56 */
  justify-content: center;
  width: 2.8rem;
}

.hc-card__icon svg {
  fill: currentcolor;
  height: 1.2rem;  /* 24 */
  width: 1.2rem;
}

.hc-card--1 .hc-card__icon { background: var(--c-tint-1); }
.hc-card--2 .hc-card__icon { background: var(--c-tint-3); }
.hc-card--3 .hc-card__icon { background: var(--c-tint-2); }

.hc-card__title {
  font-size: var(--font-size-700);
  font-weight: var(--font-weight-medium);
  line-height: var(--font-line-height-snug);
  letter-spacing: var(--font-letter-spacing-tight);
}

.hc-card__body {
  color: var(--c-body);
  font-size: var(--font-size-400);
  font-weight: var(--font-weight-regular);
  line-height: var(--font-line-height-relaxed);
  text-wrap: pretty;
}

.hc-card__cta {
  align-items: center;
  color: var(--c-accent-ink);
  display: inline-flex;
  font-size: var(--font-size-400);
  font-weight: var(--font-weight-medium);
  line-height: var(--font-line-height-snug);
  gap: var(--space-1-5);
  margin-top: auto;
}

.hc-card__cta svg {
  fill: currentcolor;
  height: 0.8rem;  /* 16 */
  width: 0.8rem;
}

/*
  The closing line under the cards. It is the page's Markdown body, so the
  centring lives on a wrapper in home.html rather than on a selector that would
  have to guess which element the author wrote.
*/
.md-typeset .hc-closing {
  color: var(--c-body);
  margin: var(--space-12) auto 0;
  max-width: 38rem;  /* 760 */
  text-align: center;
}

/* The board sets this line in body-lg (16px); this is one step down the scale,
   which is what was asked for. Raise it back to --font-size-500 to match the
   board exactly. */
.md-typeset .hc-closing p {
  font-size: var(--font-size-400);
  line-height: var(--font-line-height-relaxed);
}

/* ------------------------------------------------------------- article ---- */

/*
  The board's article page is three columns - 240 / content / 220 inside a 1200
  container - which is the shape Material already renders; only the widths
  differ from its defaults.
*/
.md-grid {
  max-width: 60rem;  /* 1200 */
}

.md-sidebar--primary {
  width: 12rem;  /* 240 */
}

.md-sidebar--secondary {
  width: 11rem;  /* 220 */
}

.md-content__inner {
  max-width: 34rem;  /* 680 */
}

/*
  Except on the landing page, where the same container holds the card grid
  rather than a column of prose: capped at 680 it fitted two cards and left the
  rest of the 1200 band empty. Same :has() the header uses to tell the two
  pages apart.
*/
body:has(.hc-hero) .md-content__inner {
  max-width: none;
}

/* Breadcrumbs (theme feature navigation.path). */
.md-path {
  font-size: var(--font-size-300);
}

.md-path,
.md-path__link {
  color: var(--c-muted);
}

/*
  Headings. The theme sets h1 and h2 to weight 300 and h1 to the muted ink;
  the design system has no 300 and puts the page title in full ink.
*/
.md-typeset h1 {
  color: var(--c-ink);
  font-size: var(--font-size-1200);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--font-letter-spacing-tighter);
  line-height: var(--font-line-height-snug);
}

.md-typeset h2 {
  color: var(--c-ink);
  font-size: var(--font-size-800);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--font-letter-spacing-tight);
}

/*
  Left navigation: rows that are pills rather than plain links, with the
  current page filled with the accent tint. min-height is the design system's
  own touch-target floor, which is why the rows are as tall as they are.
*/
.md-nav--primary .md-nav__link {
  align-items: center;
  border-radius: var(--radius-lg);
  color: var(--c-body);
  display: flex;
  font-size: var(--font-size-400);
  font-weight: var(--font-weight-medium);
  margin: var(--space-0-5) 0;
  min-height: 2.2rem;  /* 44 - --size-target-min */
  padding: 0 var(--space-3);
}

.md-nav--primary .md-nav__link:hover {
  background: var(--c-surface-hover);
  color: var(--c-ink);
}

/*
  The row is the pill, and with navigation.indexes a section's row is a
  .md-nav__container that itself carries .md-nav__link and holds two more
  inside it: the section's own page and the expand toggle. Styling every
  .md-nav__link as a pill drew three nested ones, which came apart as soon as
  the title wrapped. The inner two are flattened; the container keeps the shape.
*/
.md-nav--primary .md-nav__link > .md-nav__link {
  background: none;
  border-radius: 0;
  margin: 0;
  min-height: 0;
  padding: 0;
}

/*
  So the fill has to move up to the row. :has() only reaches the section's own
  page and its toggle here - the child pages live in a sibling <nav> - so an
  open section whose child is current does not light up with it.
*/
.md-nav--primary .md-nav__container:has(.md-nav__link--active) {
  background: var(--c-tint-1);
  color: var(--c-accent-ink);
  padding-left: var(--space-6);
}

/*
  The current page only. The theme also puts --item--active on every ancestor
  of that page, so keying off the item filled the parent section as well -
  "Legal" lit up beside "Terms of Service". --link--active sits on exactly one
  link.
*/
.md-nav--primary .md-nav__link--active {
  background: var(--c-tint-1);
  color: var(--c-accent-ink);
  /* The board indents the current row rather than marking it with a rule. */
  padding-left: var(--space-6);
}

/* Right column. The theme's label reads "Table of contents"; the board says
   "On this page", which is a translation string and would need a language
   partial, so the wording is left as the theme has it. */
.md-nav--secondary .md-nav__title {
  color: var(--c-muted);
  font-size: var(--font-size-100);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--font-letter-spacing-wider);
  text-transform: uppercase;
}

/*
  The board runs a hairline down the whole column and thickens it into the
  accent where the current heading is - the indicator is a segment of that
  rail, not a mark of its own. So the rail lives on the nav, and each link is
  pulled back onto it by its own left edge: -(padding + the rail's 1px). The
  shadow is declared transparent on every link so becoming current changes a
  colour and never a position.
*/
.md-nav--secondary {
  box-shadow: inset 1px 0 0 var(--c-line);
  padding-left: var(--space-4);
  /* The board specifies 2px; this is a touch heavier by eye, which is what was
     asked for. One number, changed here. */
  --hc-toc-marker: 3px;
  --hc-toc-space: var(--space-1-5);
  --hc-toc-indent: var(--space-4);
  --hc-toc-size: var(--font-size-300);
  --hc-toc-ink: var(--c-body);
}

/*
  A sub-heading's step inward is the link's own padding, never the list's: the
  shadow that marks the current heading is cast by the link box, so moving the
  box would carry the mark off the rail with it. Padding moves the text and
  leaves the box where the rail is.

  The depth is carried by inherited values rather than a `.md-nav__item
  .md-nav__item > .md-nav__link` rule, because that rule would be a class
  heavier than --active and would take the accent back off the current
  sub-heading.
*/
.md-nav--secondary .md-nav__item .md-nav__item {
  --hc-toc-space: var(--space-1);
  --hc-toc-indent: var(--space-8);
  --hc-toc-size: var(--font-size-200);
  --hc-toc-ink: var(--c-muted);
}

.md-nav--secondary .md-nav__title {
  padding-bottom: var(--space-2);
  padding-left: 0;
  padding-right: 0;
}

.md-nav--secondary .md-nav__link {
  box-shadow: inset var(--hc-toc-marker) 0 0 transparent;
  color: var(--hc-toc-ink);
  font-size: var(--hc-toc-size);
  padding: var(--hc-toc-space) 0 var(--hc-toc-space) var(--hc-toc-indent);
}

/*
  Two offsets stand between a link and the rail, and both have to go.

  The list carries one: `[dir=ltr] .md-nav--secondary .md-nav__list` sets
  padding-left .6rem above 60em, at three classes, so it outranks a bare
  two-class rule. Repeating .md-nav alongside .md-nav--secondary matches that
  weight without depending on the dir attribute being where we think it is.

  The nav's own padding is the other, and the link takes itself back over it -
  minus the padding, minus the rail's 1px, which is what puts the 2px segment
  on top of the hairline rather than beside it.
*/
.md-nav.md-nav--secondary .md-nav__list {
  padding-left: 0;
}

.md-nav--secondary .md-nav__item > .md-nav__link {
  margin-left: calc(-1 * var(--space-4) - 1px);
}

.md-nav--secondary .md-nav__link--active {
  box-shadow: inset var(--hc-toc-marker) 0 0 var(--c-accent-ink);
  color: var(--c-accent-ink);
}

/*
  The note the board draws is a tinted block, not the theme's blue wash and not
  the left-hand stripe this used to be. The tint carries the meaning: accent
  for a note, warm for a warning - the two hues the design system gives those
  roles. The icon stays the theme's own; only its room on the left is kept.
*/
.md-typeset .admonition {
  background: var(--c-tint-1);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: none;
  color: var(--c-tint-ink);
  font-size: var(--font-size-400);
  padding: var(--space-4) var(--space-5);
}

.md-typeset .admonition.warning {
  background: var(--c-tint-2);
}

/*
  The child combinator is not decoration: the theme tints the title row and the
  icon per type - `.md-typeset .note>.admonition-title`, three classes - so a
  rule on `.md-typeset .admonition-title` is a class short and loses, which is
  how a blue band and a blue pencil survived on a block that is otherwise
  lavender. Matching the shape ties the weight, and this file comes later.

  Only .admonition, not details: `pymdownx.details` is not enabled, so no
  collapsible block can be produced from the Markdown, and selectors for one
  would be dead code with a maintenance cost.
*/
.md-typeset .admonition > .admonition-title {
  background: transparent;
  border: none;
  color: var(--c-tint-ink);
  font-size: var(--font-size-400);
  font-weight: var(--font-weight-medium);
  margin: 0 0 var(--space-2);
  padding: 0 0 0 var(--space-6);
}

.md-typeset .admonition > .admonition-title::before {
  background-color: var(--c-tint-ink);
  left: 0;
  top: 0.1rem;
}

.md-typeset .admonition > :last-child {
  margin-bottom: 0;
}

/*
  "Next steps" is a Markdown list inside <div class="hc-next" markdown>, the
  same wrapper Material's own grid cards use. The wrapper also scopes the flush
  alignment: the theme indents every list item by 1.25em, and removing that
  globally would move the lists in Contact Us and the legal pages too.

  One pill per row, full width, starting where the heading does.
*/
.md-typeset .hc-next ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

/*
  `ul li`, not `li`: the theme indents items with `[dir=ltr] .md-typeset ul li`,
  which carries one more type selector than a rule on `.hc-next li` does and so
  outweighs it at equal class count. Matching the shape ties it, and this file
  is later.
*/
.md-typeset .hc-next ul li {
  margin: 0;
}

.md-typeset .hc-next ul li > a {
  align-items: center;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--c-elevation-1);
  color: var(--c-ink);
  display: flex;
  font-size: var(--font-size-400);
  font-weight: var(--font-weight-medium);
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  transition: background 125ms, box-shadow 125ms;
}

.md-typeset .hc-next ul li > a::after {
  color: var(--c-muted);
  content: "\203A";
  font-size: 1.25em;
  line-height: 1;
}

.md-typeset .hc-next ul li > a:hover {
  background: var(--c-surface-hover);
  box-shadow: var(--c-elevation-2);
}

/*
  The QR on Add to Home Screen. The SVG carries its own white ground and quiet
  zone, so it stays dark-on-light in the slate scheme too - most cameras will not
  read an inverted code. Hidden on phones together with its caption: there it is
  the screen the reader would have to scan.
*/
.md-typeset .hc-qr img {
  border-radius: var(--radius-md);
  display: block;
  width: 160px;
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .hc-qr {
    display: none;
  }
}

/* ------------------------------------------------------------- support ---- */

/*
  The board went through three options for this block and settled on a white
  card carrying an accent ring - the system's mark for an action target - which
  is what keeps it from reading as a fourth "Next steps" card. The ring rides
  on the same box-shadow as the lift, so it stays a ring and not a border that
  would change the box.
*/
.md-typeset .hc-support {
  align-items: center;
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--c-elevation-2), inset 0 0 0 1px var(--c-accent-ink);
  display: grid;
  gap: var(--space-6);
  grid-template-columns: minmax(0, 1fr) auto;
  margin: var(--space-16) 0 0;
  padding: var(--space-6) var(--space-6) var(--space-6) var(--space-8);
}

.md-typeset .hc-support__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1-5);
}

.md-typeset .hc-support__eyebrow {
  color: var(--c-accent-ink);
  font-size: var(--font-size-100);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--font-letter-spacing-wider);
  text-transform: uppercase;
}

.md-typeset .hc-support__title {
  font-size: var(--font-size-700);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--font-letter-spacing-tight);
  margin: 0;
}

.md-typeset .hc-support__body {
  color: var(--c-body);
  font-size: var(--font-size-400);
  margin: 0;
  text-wrap: pretty;
}

/* Secondary, not filled: the page already has its accent in the ring, and the
   board keeps a filled action for places that commit something. */
.md-typeset .hc-support__action {
  align-items: center;
  background: var(--c-surface);
  border-radius: var(--radius-full);
  box-shadow: inset 0 0 0 1px var(--c-line);
  color: var(--c-ink);
  display: inline-flex;
  font-size: var(--font-size-400);
  font-weight: var(--font-weight-medium);
  gap: var(--space-2);
  justify-content: center;
  min-height: 2.2rem;  /* 44 - --size-target-min */
  padding: 0 var(--space-5);
  white-space: nowrap;
}

.md-typeset .hc-support__action:hover {
  background: var(--c-surface-hover);
  color: var(--c-ink);
}

.md-typeset .hc-support__action svg {
  fill: currentcolor;
  height: 0.8rem;  /* 16 */
  width: 0.8rem;
}

/* On a phone the button drops under the text and stops stretching, as the
   mobile board draws it. */
@media screen and (max-width: 44.9375em) {
  .md-typeset .hc-support {
    align-items: flex-start;
    gap: var(--space-4);
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-5);
  }

  .md-typeset .hc-support__action {
    justify-self: start;
  }
}

/* -------------------------------------------------------------- footer ---- */

.hc-footer {
  background: var(--c-surface);
  box-shadow: inset 0 1px 0 var(--c-line);
}

.hc-footer__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: 0 auto;
  max-width: 60rem;  /* 1200 */
  padding: var(--space-8) var(--space-6);
}

/*
  The wordmark again, and a mask again - this one is a bare <span> with no
  <img> in it, so the mask is also what puts the shape there at all. Being
  painted is what lets the ink follow the scheme.
*/
.hc-footer__logo {
  background: var(--c-accent-ink);
  display: block;
  height: 1.2rem;  /* 24 */
  width: 4rem;     /* 80 */
  -webkit-mask: url("../assets/chenjio-logo.svg") no-repeat center/contain;
  mask: url("../assets/chenjio-logo.svg") no-repeat center/contain;
}

.hc-footer__spacer {
  flex: 1;
}

.hc-footer__copyright {
  color: var(--c-muted);
  font-size: var(--font-size-200);
  font-weight: var(--font-weight-regular);
  line-height: var(--font-line-height-normal);
}

/*
  The board sets the mobile hero in display-sm and the desktop one in
  display-lg; at 52px the title filled a phone's width edge to edge, which read
  as missing padding rather than as oversized type. Same breakpoint as the card
  overlap, so the page changes shape once rather than twice.
*/
@media screen and (max-width: 59.9375em) {
  .hc-hero__title {
    font-size: var(--font-size-1000);
  }
}

@media screen and (max-width: 44.9375em) {
  .hc-footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .hc-footer__spacer {
    display: none;
  }

  .hc-hero__inner {
    padding: var(--space-10) var(--space-4) var(--space-12);
  }
}
