/*
 * C.P. Company · Help center
 * One stylesheet for the content asset. Every class starts with "cphc-" and every rule lives
 * under .cphc, so nothing leaks into the site and little of the site leaks in.
 *
 * The values come from the design system tokens (brand C.P. Company). Change them here, in the
 * variables: the rules below only use the variables.
 */

.cphc {
  /* fonts: the names the site already loads; the rest of the stack is the fallback */
  --cphc-font-sans: 'Akkurat Pro', Akkurat, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --cphc-font-mono: 'Akkurat Mono', 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;

  /* colours */
  --cphc-canvas: #ffffff;
  --cphc-surface: #efeeec;
  --cphc-surface-strong: #d0cfcd;
  --cphc-inverse: #101820;
  --cphc-text: #000000;
  --cphc-text-secondary: #504f4d;
  --cphc-text-inverse: #ffffff;
  --cphc-line: #000000;
  --cphc-border: #8a8987;
  --cphc-action: #101820;
  --cphc-action-text: #f9f9f9;
  --cphc-action-secondary: #f9f9f9;
  --cphc-focus: #101820;

  /* type scale: small screens first, large screens in the media query below */
  --cphc-body-m: 16px;
  --cphc-body-s: 13px;
  --cphc-body-xs: 11px;
  --cphc-heading-m: 23px;
  --cphc-subheading-l: 23px;
  --cphc-subheading-m: 19px;
  --cphc-label-s: 13px;
  --cphc-label-xs: 11px;

  /* layout */
  --cphc-container: 1536px;
  --cphc-content: 720px;
  --cphc-column: 960px;
  --cphc-gutter: 16px;

  font-family: var(--cphc-font-sans);
  font-size: var(--cphc-body-m);
  line-height: 1.4;
  color: var(--cphc-text);
  background: var(--cphc-canvas);
  text-align: left;
  -webkit-text-size-adjust: 100%;
}
@media (min-width: 768px) {
  .cphc {
    --cphc-body-m: 19px;
    --cphc-body-s: 16px;
    --cphc-body-xs: 13px;
    --cphc-heading-m: 40px;
    --cphc-subheading-l: 33px;
    --cphc-subheading-m: 28px;
  }
}
@media (min-width: 1024px) {
  .cphc {
    --cphc-gutter: 40px;
  }
}

/* ---------- base: undo what a site stylesheet usually sets on bare tags ---------- */
.cphc,
.cphc *,
.cphc *::before,
.cphc *::after {
  box-sizing: border-box;
}
.cphc :where(h1, h2, h3, p, ul, ol, table, figure) {
  margin: 0;
  padding: 0;
}
.cphc :where(ul, ol) {
  list-style: none;
}
.cphc :where(a) {
  color: inherit;
}
/* the store underlines every link of a content asset (".content-asset a"), which is stronger than a
   single class: so the underline is decided here, with a stronger rule. Only text links have one. */
.cphc a:not(.cphc-link),
.cphc a:not(.cphc-link):hover,
.cphc a:not(.cphc-link):focus {
  text-decoration: none;
}
.cphc a.cphc-link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.cphc :where(button, input) {
  font: inherit;
  color: inherit;
}
.cphc :where(strong) {
  font-weight: 700;
}
.cphc [hidden] {
  display: none !important;
}
.cphc :focus-visible {
  outline: 2px solid var(--cphc-focus);
  outline-offset: 2px;
}
.cphc h1:focus {
  outline: none;
}
.cphc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- type roles ---------- */
.cphc-eyebrow {
  font-family: var(--cphc-font-mono);
  font-weight: 400;
  font-size: var(--cphc-label-s);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cphc-text-secondary);
}
.cphc-eyebrow--inverse {
  color: var(--cphc-text-inverse);
  opacity: 0.8;
}
.cphc-h1 {
  font-family: var(--cphc-font-mono);
  font-weight: 400;
  font-size: var(--cphc-heading-m);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: none;
  text-wrap: balance;
}
.cphc-h2 {
  font-family: var(--cphc-font-sans);
  font-weight: 700;
  font-size: var(--cphc-subheading-l);
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
}
.cphc-h3 {
  font-family: var(--cphc-font-sans);
  font-weight: 700;
  font-size: var(--cphc-subheading-m);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
.cphc-lead {
  max-width: var(--cphc-content);
  font-size: var(--cphc-body-m);
  line-height: 1.4;
  color: var(--cphc-text-secondary);
  text-wrap: pretty;
}
.cphc-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.cphc-link:hover {
  color: var(--cphc-text-secondary);
}

/* ---------- icon ---------- */
.cphc-icon {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}
.cphc-icon--xs {
  width: 12px;
  height: 12px;
}

/* ---------- button ---------- */
.cphc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--cphc-action);
  color: var(--cphc-action-text);
  font-family: var(--cphc-font-mono);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  transition:
    background-color 150ms cubic-bezier(0.2, 0, 0, 1),
    color 150ms cubic-bezier(0.2, 0, 0, 1);
}
.cphc-button:hover {
  color: #ffffff;
}
.cphc-button:active {
  transform: translateY(1px);
}
.cphc-button--sm {
  height: 40px;
  padding: 0 12px;
  font-size: 16px;
}
.cphc-button--sm .cphc-icon {
  width: 16px;
  height: 16px;
}
.cphc-button--secondary {
  background: var(--cphc-action-secondary);
  color: var(--cphc-action);
  border-color: var(--cphc-action);
}
.cphc-button--secondary:hover {
  background: #ffffff;
  color: var(--cphc-action);
}
.cphc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- chip (quick links) ---------- */
.cphc-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--cphc-border);
  background: var(--cphc-canvas);
  color: var(--cphc-text);
  font-family: var(--cphc-font-mono);
  font-size: var(--cphc-label-s);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 150ms cubic-bezier(0.2, 0, 0, 1),
    border-color 150ms cubic-bezier(0.2, 0, 0, 1);
}
.cphc-chip:hover {
  border-color: var(--cphc-line);
  background: var(--cphc-surface);
}

/* ---------- skeleton ---------- */
.cphc-sk {
  display: block;
  max-width: 100%;
  background: var(--cphc-surface-strong);
  background-image: linear-gradient(90deg, var(--cphc-surface-strong) 0%, var(--cphc-surface) 50%, var(--cphc-surface-strong) 100%);
  background-size: 200% 100%;
  animation: cphc-shimmer 1.4s cubic-bezier(0.2, 0, 0, 1) infinite;
}
.cphc-sk-lines {
  display: grid;
  gap: 4px;
  width: 100%;
  font-size: var(--cphc-body-m);
  line-height: 1.4;
}
.cphc-hero .cphc-sk {
  opacity: 0.35;
}
@keyframes cphc-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---------- home: hero ---------- */
.cphc-hero {
  position: relative;
  isolation: isolate;
  /* no overflow clipping: the search results hang below the hero, over the topics */
  z-index: 1;
  background: var(--cphc-inverse);
  color: var(--cphc-text-inverse);
  padding: 96px 16px;
}
.cphc-hero__img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 60%;
  opacity: 0.42;
}
.cphc-hero__inner {
  max-width: var(--cphc-content);
  margin: 0 auto;
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}
.cphc-hero__title {
  color: var(--cphc-text-inverse);
}
.cphc-hero__lead {
  color: var(--cphc-text-inverse);
  opacity: 0.85;
}
.cphc-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ---------- home: search ---------- */
.cphc-search {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-top: 8px;
  text-align: left;
}
.cphc-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--cphc-border);
  background: var(--cphc-canvas);
  color: var(--cphc-text);
}
.cphc-field:focus-within {
  border-color: var(--cphc-line);
  outline: 2px solid var(--cphc-text-inverse);
  outline-offset: 2px;
}
.cphc-field input {
  flex: 1;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--cphc-font-sans);
  font-size: var(--cphc-body-m);
  line-height: 1.4;
  color: var(--cphc-text);
  appearance: none;
}
.cphc-field input:focus,
.cphc-field input:focus-visible {
  outline: none;
  box-shadow: none;
}
.cphc-field input::placeholder {
  color: var(--cphc-text-secondary);
  opacity: 1;
}
.cphc-field input::-webkit-search-cancel-button {
  appearance: none;
}
.cphc-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 5;
  /* four rows and the top of the fifth: the list reads as scrollable */
  max-height: min(336px, 60vh);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--cphc-canvas);
  color: var(--cphc-text);
  border: 1px solid var(--cphc-line);
  box-shadow: 0 16px 40px rgba(16, 24, 32, 0.28);
}
.cphc-dropdown__title {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--cphc-canvas);
  padding: 12px 16px;
  font-family: var(--cphc-font-mono);
  font-size: var(--cphc-label-xs);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cphc-text-secondary);
  border-bottom: 1px solid var(--cphc-line);
}
.cphc-dropdown__item {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  color: var(--cphc-text);
  text-decoration: none;
  font-size: var(--cphc-body-m);
  line-height: 1.4;
  border-bottom: 1px solid var(--cphc-line);
}
.cphc-dropdown__list li:last-child .cphc-dropdown__item {
  border-bottom: 0;
}
.cphc-dropdown__item[data-active],
.cphc-dropdown__item:hover {
  background: var(--cphc-surface);
}
.cphc-dropdown__item:focus-visible {
  outline-offset: -2px;
}
.cphc-dropdown__empty .cphc-dropdown__title {
  position: static;
  border-bottom: 0;
  padding-bottom: 0;
  color: var(--cphc-text);
}
.cphc-dropdown__note {
  padding: 12px 16px 16px;
  font-size: var(--cphc-body-s);
  line-height: 1.4;
  color: var(--cphc-text-secondary);
}

/* ---------- home: topics ---------- */
.cphc-container {
  max-width: var(--cphc-container);
  margin: 0 auto;
  padding: 40px var(--cphc-gutter) 96px;
  display: grid;
  gap: 64px;
}
.cphc-block {
  display: grid;
  gap: 32px;
}
.cphc-block__head {
  display: grid;
  gap: 4px;
}
.cphc-topics {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .cphc-topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .cphc-topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}
.cphc-topic {
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--cphc-line);
  background: var(--cphc-canvas);
  color: var(--cphc-text);
  text-decoration: none;
  transition: background-color 150ms;
}
.cphc-topic:hover {
  background: var(--cphc-surface);
}
.cphc-topic__icon {
  display: inline-flex;
  margin-bottom: 4px;
}
.cphc-topic__title {
  font-weight: 700;
  font-size: var(--cphc-subheading-m);
  line-height: 1.2;
}
/* the first questions of the topic as a running text, cut after three lines */
.cphc-topic__questions {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  font-size: var(--cphc-body-s);
  line-height: 1.4;
  color: var(--cphc-text-secondary);
}
.cphc-topic__more {
  margin-top: auto;
  padding-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--cphc-font-mono);
  font-size: var(--cphc-label-xs);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cphc-text-secondary);
}

/* ---------- contact block: the same on every view ---------- */
.cphc-write {
  display: grid;
  gap: 24px;
  padding: 32px 24px;
  background: var(--cphc-surface);
  border: 1px solid var(--cphc-line);
}
.cphc-write--canvas {
  background: var(--cphc-canvas);
}
@media (min-width: 1024px) {
  .cphc-write {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
  }
}
.cphc-write__text {
  display: grid;
  gap: 4px;
  justify-items: start;
}
.cphc-write__note {
  max-width: var(--cphc-content);
  font-size: var(--cphc-body-s);
  line-height: 1.4;
  color: var(--cphc-text-secondary);
}
.cphc-hours {
  margin-top: 4px;
  display: grid;
  gap: 2px;
  font-size: var(--cphc-body-s);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

/* ---------- topic and answer views: sub-head, then a centred column on grey ---------- */
.cphc-subhead {
  background: var(--cphc-canvas);
  border-bottom: 1px solid var(--cphc-line);
  padding: 24px 16px;
}
.cphc-subhead__inner {
  max-width: var(--cphc-column);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}
.cphc-subhead__title {
  display: grid;
  gap: 4px;
  text-align: center;
  justify-items: center;
}
.cphc-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--cphc-text);
}
.cphc-listing {
  background: var(--cphc-surface);
  padding: 40px 16px 96px;
}
.cphc-column {
  max-width: var(--cphc-column);
  margin: 0 auto;
  display: grid;
  gap: 32px;
}
.cphc-questions {
  display: grid;
  gap: 8px;
}
.cphc-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 16px 24px;
  background: var(--cphc-canvas);
  border: 1px solid var(--cphc-line);
  color: var(--cphc-text);
  text-decoration: none;
  font-size: var(--cphc-body-m);
  line-height: 1.4;
  transition: background-color 150ms;
}
a.cphc-question:hover {
  background: var(--cphc-surface);
}
a.cphc-question:hover .cphc-question__text > :last-child {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cphc-question__text {
  display: grid;
  gap: 2px;
}
.cphc-question__topic {
  font-family: var(--cphc-font-mono);
  font-size: var(--cphc-label-xs);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cphc-text-secondary);
}
.cphc-more {
  display: grid;
  gap: 16px;
}

/* ---------- answer ---------- */
.cphc-answer-card {
  display: grid;
  gap: 32px;
  padding: 24px;
  background: var(--cphc-canvas);
  border: 1px solid var(--cphc-line);
}
@media (min-width: 1024px) {
  .cphc-answer-card {
    padding: 32px;
  }
}
.cphc-answer {
  display: grid;
  gap: 16px;
  font-size: var(--cphc-body-m);
  line-height: 1.4;
  text-wrap: pretty;
}
/* a sub-title opens a new part of the answer: more air above than between paragraphs */
.cphc-answer__heading {
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--cphc-line);
  font-family: var(--cphc-font-mono);
  font-weight: 400;
  font-size: var(--cphc-label-s);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cphc-list {
  display: grid;
  gap: 8px;
}
.cphc-list li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 4px;
  align-items: start;
}
.cphc-list li::before {
  content: '–';
  color: var(--cphc-text-secondary);
}
.cphc-steps {
  counter-reset: cphc-step;
  display: grid;
  gap: 8px;
}
.cphc-steps li {
  counter-increment: cphc-step;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.cphc-steps li::before {
  content: counter(cphc-step, decimal-leading-zero);
  font-family: var(--cphc-font-mono);
  font-size: var(--cphc-label-s);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--cphc-text-secondary);
}
/* the button right after the sentence that names the page: a little air around it */
.cphc-cta {
  display: flex;
  flex-wrap: wrap;
  margin: 4px 0 8px;
}
.cphc-cta:last-child {
  margin-bottom: 0;
}
.cphc-tip {
  margin: 8px 0;
  display: grid;
  gap: 8px;
  padding: 16px 24px;
  background: var(--cphc-surface);
  font-size: var(--cphc-body-s);
  line-height: 1.4;
}
.cphc-tip__label {
  font-family: var(--cphc-font-mono);
  font-size: var(--cphc-label-s);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cphc-text-secondary);
}
.cphc-table-wrap {
  margin: 8px 0;
  overflow-x: auto;
}
.cphc-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--cphc-line);
  font-size: var(--cphc-body-s);
  line-height: 1.4;
}
.cphc-table th,
.cphc-table td {
  padding: 16px 12px 16px 0;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid var(--cphc-line);
  background: none;
}
.cphc-table thead th {
  font-family: var(--cphc-font-mono);
  font-weight: 400;
  font-size: var(--cphc-label-xs);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cphc-text-secondary);
}
.cphc-table tbody th {
  font-weight: 700;
  white-space: nowrap;
}
.cphc-table td:last-child,
.cphc-table th:last-child {
  padding-right: 0;
}
.cphc-vote {
  display: grid;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--cphc-line);
}
.cphc-vote__label {
  font-family: var(--cphc-font-mono);
  font-size: var(--cphc-label-s);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cphc-vote__thanks {
  font-size: var(--cphc-body-s);
  line-height: 1.4;
  color: var(--cphc-text-secondary);
}

/* ---------- live data from the store: shipping methods, return cost ---------- */
.cphc-live-block {
  display: grid;
  gap: 8px;
}
.cphc-live-block .cphc-table-wrap {
  margin: 8px 0 0;
}
.cphc-live-block__note {
  font-size: var(--cphc-body-s);
  line-height: 1.4;
  color: var(--cphc-text-secondary);
}
/* a value still on its way: a short shimmering dash in the line */
.cphc-live .cphc-sk {
  display: inline-block;
  width: 5em;
  height: 0.9em;
  vertical-align: -0.1em;
}

/* ---------- an answer drawn in another page (CPHelpCenter.render): no background, one size down ---------- */
.cphc-embed {
  background: none;
  font-size: var(--cphc-body-s);
}
.cphc-embed__title {
  margin-bottom: 12px;
  font-weight: 700;
  font-size: var(--cphc-body-m);
  line-height: 1.3;
}
.cphc-embed .cphc-answer {
  gap: 12px;
  font-size: var(--cphc-body-s);
}
.cphc-embed .cphc-answer__heading {
  margin-top: 8px;
  padding-top: 16px;
}
.cphc-embed .cphc-button {
  height: 40px;
  padding: 0 12px;
  font-size: 16px;
}

/* ---------- notice (the content could not be loaded) ---------- */
.cphc-notice {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 24px;
  border: 1px solid var(--cphc-line);
  background: var(--cphc-surface);
}
.cphc-notice__detail {
  font-family: var(--cphc-font-mono);
  font-size: var(--cphc-label-xs);
  color: var(--cphc-text-secondary);
  word-break: break-all;
}

@media (prefers-reduced-motion: reduce) {
  .cphc-sk {
    animation: none;
    background-image: none;
  }
  .cphc-button,
  .cphc-chip,
  .cphc-topic,
  .cphc-question {
    transition: none;
  }
}
