/* kb.ordercounter.com - the laminated quick-reference card.
   Each page is a white card lying on the counter; its tab, coloured by topic, says what it covers. The tab colour
   rides on the tab, the step numerals and tinted table heads - nowhere else (direction contract, OWN-WORLD).
   Links, controls, markers and focus stay in ink. One family throughout.
   SiteAssets.Load rewrites each asset token in a url() to that file's fingerprinted name. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("AtkinsonHyperlegibleNext.18b2a1a3.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("AtkinsonHyperlegibleNext-Italic.4a5037bf.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* OrderCounter brand palette (OC25 Brand at a Glance): Modern Grey ground, black ink, OC Orange, and the
     secondary Turquoise, Blue Friend and Sun Yellow for topics. */
  --ground: #e6e7e8;        /* Modern Grey: the counter */
  --ground-ink: #45484b;
  --card: #ffffff;
  --ink: #231f20;           /* the logo's black */
  --ink-2: #4b4e52;
  --edge: #c7c9cb;
  --edge-strong: #84888c;
  --hair: #e4e5e7;
  --wash: #f3f4f5;

  /* Each tab has a fill, the text that sits on it (4.5:1 or better), and a deep ink for numerals and tints
     on the white card (3:1 or better at numeral size). Brand colours too pale or too light for white text
     keep their brand fill with black text; the darker fills are the brand colour taken down for contrast. */
  --tab: #231f20;
  --tab-text: #fff;
  --tab-ink: #231f20;
}

.tab-orange { --tab: #c4461f; --tab-text: #fff; --tab-ink: #c4461f; }      /* OC Orange #ec572b, darkened */
.tab-turquoise { --tab: #007a6b; --tab-text: #fff; --tab-ink: #007a6b; }   /* Turquoise #00a08a, darkened */
.tab-blue { --tab: #6dcbd6; --tab-text: #231f20; --tab-ink: #1f7f8c; }     /* Blue Friend #6dcbd6 */
.tab-yellow { --tab: #f4cd75; --tab-text: #231f20; --tab-ink: #8a6100; }   /* Sun Yellow #f4cd75 */
.tab-black { --tab: #231f20; --tab-text: #fff; --tab-ink: #231f20; }

:root {

  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --radius: 14px;
  --tab-radius: 11px;
  --page: 70rem;
  --measure: 68ch;
  --lift: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.25rem;
  scrollbar-color: #a4a7aa var(--ground);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  caret-color: var(--ink);
}

::selection { background: #d3d5d8; color: var(--ink); }

a { color: inherit; text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none;
  border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------------ top bar */

.top__inner, .main, .foot__inner {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.top__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ink); text-decoration: none;
  margin-right: auto;
}
.brand__logo { display: block; width: auto; height: 1.875rem; }
.brand__sub {
  font-weight: 700; font-size: 1.1875rem; color: var(--ground-ink);
  padding-left: 0.55rem; border-left: 2px solid var(--edge);
}

.top__search { display: flex; gap: 0.5rem; width: min(24rem, 52vw); }
.top__search input { flex: 1; min-width: 0; height: 2.625rem; font-size: 1rem; }
.top__search button { height: 2.625rem; padding-inline: 1rem; }

/* ------------------------------------------------------------------ cards */

.main { flex: 1; padding-top: 1.75rem; padding-bottom: 4rem; }

/* A card is its tab plus its body. The wrapper's drop-shadow follows both, so the tab reads as part of the card. */
.card {
  display: flex; flex-direction: column; align-items: flex-start;
  margin: 0 0 2rem;
  filter: drop-shadow(0 1px 1px rgb(35 31 32 / 0.08)) drop-shadow(0 8px 14px rgb(35 31 32 / 0.10));
}

.card__tab {
  position: relative; z-index: 1;
  margin: 0 0 -1px 1.25rem;
  max-width: calc(100% - 2.5rem);
  padding: 0.5rem 1.05rem 0.45rem;
  background: var(--tab); color: var(--tab-text);
  border-radius: var(--tab-radius) var(--tab-radius) 0 0;
  font-size: 1rem; font-weight: 800; line-height: 1.35; letter-spacing: 0.01em;
}
/* The tab's foot: tab-coloured, below the tab, folded away at rest. It unfolds as the tab rises, so the tab stays
   joined to its card (no ground shows between them). */
.card__tab::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 100%;
  height: 4px;
  background: var(--tab);
  transform: scaleY(0); transform-origin: top;
}
label.card__tab { display: block; cursor: text; }
.card__tab a { color: var(--tab-text); text-decoration: none; }
.card__tab a:hover { text-decoration: underline; }
.card__tab a:focus-visible { outline-color: var(--tab-text); outline-offset: 2px; }

.card__body {
  align-self: stretch;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
}

/* Breadcrumb inside a tab. */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; }
/* The chevron trails each step of the path, so a wrapped tab starts its next line with a name, not a chevron. */
.crumbs li:not(:last-child)::after {
  content: "";
  width: 0.38em; height: 0.38em;
  margin: 0 0.6em 0 0.45em;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
}
.crumbs [aria-current="page"] span { opacity: 0.92; }

/* ------------------------------------------------------------------ home + notices */

.card--hero .card__body { padding-block: clamp(1.75rem, 5vw, 3.25rem); }

.hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(2.25rem, 1.55rem + 2.6vw, 3.5rem);
  font-weight: 800; line-height: 1.04; letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero__lead { margin: 0 0 1.75rem; max-width: 44ch; font-size: 1.1875rem; color: var(--ink-2); text-wrap: pretty; }
.card--notice .hero__title { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); }
.card--notice .hero__lead { margin-bottom: 1.25rem; }

.empty { margin: 0; color: var(--ink-2); }

/* ------------------------------------------------------------------ search controls */

.search { display: flex; gap: 0.625rem; max-width: 46rem; }
.search--large { max-width: none; }
.search input { flex: 1; min-width: 0; height: 3rem; }
.search--large input { height: 3.75rem; font-size: 1.1875rem; padding-inline: 1.1rem; }
.search--large button { height: 3.75rem; padding-inline: 1.6rem; font-size: 1.0625rem; }

input[type="search"] {
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  padding: 0 0.9rem;
  background: var(--card);
  border: 2px solid var(--edge-strong);
  border-radius: 10px;
  -webkit-appearance: none; appearance: none;
}
input[type="search"]::placeholder { color: #6b6e72; opacity: 1; }
input[type="search"]:hover { border-color: var(--ink-2); }
input[type="search"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px #d3d5d8; }

button {
  font: inherit; font-weight: 700; font-size: 1rem;
  color: #fff; background: var(--ink);
  border: 0; border-radius: 10px;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}
button:hover { background: #3d383a; }
button:active { transform: translateY(1px); }

/* ------------------------------------------------------------------ the rack of topic cards */

.rack { margin: 3rem 0 1rem; }
.rack__title {
  margin: 0 0 1.25rem;
  font-size: 1.375rem; font-weight: 800; letter-spacing: -0.01em;
}
.rack__space { margin: 2rem 0 1rem; font-size: 1.125rem; font-weight: 700; }
.rack__space a { text-decoration-color: var(--edge-strong); }

.rack__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 1.75rem 1.5rem;
  align-items: start;
  margin: 0; padding: 0; list-style: none;
}
.rack__cards .card { margin: 0; }

/* Signature interaction: pulling a card from the rack. The card lifts; its tab rises a little further. */
.card--topic { transition: transform 180ms var(--lift), filter 180ms var(--lift); }
.card--topic .card__tab { font-size: 1.0625rem; transition: transform 180ms var(--lift); }
.card--topic .card__tab::after { transition: transform 180ms var(--lift); }
.card--topic:hover, .card--topic:focus-within {
  transform: translateY(-3px);
  filter: drop-shadow(0 2px 2px rgb(35 31 32 / 0.10)) drop-shadow(0 14px 22px rgb(35 31 32 / 0.16));
}
.card--topic:hover .card__tab, .card--topic:focus-within .card__tab { transform: translateY(-3px); }
.card--topic:hover .card__tab::after, .card--topic:focus-within .card__tab::after { transform: scaleY(1); }

.card--topic .card__body { padding: 1.1rem 1.25rem 1.2rem; }
.topic__list { margin: 0 0 0.9rem; padding: 0; list-style: none; }
.topic__list li { padding: 0.45rem 0; border-bottom: 1px solid var(--hair); line-height: 1.4; }
.topic__list li:first-child { padding-top: 0.1rem; }
.topic__list a { text-decoration: none; }
.topic__list a:hover { text-decoration: underline; }
.topic__more {
  display: inline-block;
  font-weight: 700; font-size: 0.9375rem;
  text-decoration: underline; text-decoration-color: var(--edge-strong); text-decoration-thickness: 2px;
}
.topic__more:hover { text-decoration-color: var(--ink); }

/* ------------------------------------------------------------------ the A to Z index */

.card--index { margin-top: 3rem; }
.index { columns: 16rem 3; column-gap: 2.5rem; }
.index__group { break-inside: avoid; margin-bottom: 1.25rem; }
.index__letter {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem; font-weight: 800;
  padding-bottom: 0.2rem; border-bottom: 2px solid var(--ink);
}
.index__list { margin: 0; padding: 0; list-style: none; }
.index__list li { padding: 0.2rem 0; line-height: 1.4; }
.index__list a { text-decoration: none; }
.index__list a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ lists of articles */

.list { margin: 0; padding: 0; list-style: none; }
.list__item { border-top: 1px solid var(--hair); }
.list__item:last-child { border-bottom: 1px solid var(--hair); }
.list__link { display: block; padding: 0.85rem 0; text-decoration: none; }
.list__title { display: block; font-weight: 700; font-size: 1.0625rem; line-height: 1.35; }
.list__desc { display: block; margin-top: 0.2rem; color: var(--ink-2); font-size: 0.96875rem; line-height: 1.5; max-width: var(--measure); }
.list__link:hover .list__title { text-decoration: underline; text-decoration-thickness: 2px; }
.list__heading { margin: 2rem 0 0.6rem; font-size: 1.125rem; font-weight: 800; }

/* ------------------------------------------------------------------ article card */

.doc__head { max-width: 52rem; margin-bottom: 1.75rem; }
.doc__title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
  text-wrap: balance;
}
.doc__lead { margin: 0 0 0.75rem; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.doc__meta { margin: 0; font-size: 0.9375rem; color: var(--ink-2); }

.doc__grid { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.doc__grid--single { grid-template-columns: minmax(0, 1fr); }

.contents {
  position: sticky; top: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--wash);
  border-radius: 10px;
  font-size: 0.9375rem;
}
.contents__title { margin: 0 0 0.5rem; font-size: 0.9375rem; font-weight: 800; }
.contents__list { margin: 0; padding: 0; list-style: none; }
.contents__item a { display: block; padding: 0.3rem 0; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.contents__item a:hover { color: var(--ink); text-decoration: underline; }
.contents__item--l3 a { padding-left: 0.9rem; font-size: 0.90625rem; }

.doc__foot {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 0 2.5rem;
  margin-top: 2.75rem; padding-top: 0.25rem;
  border-top: 2px solid var(--hair);
}

.files { margin: 0; padding: 0; list-style: none; }
.files li { border-top: 1px solid var(--hair); }
.files li:last-child { border-bottom: 1px solid var(--hair); }
.files__link { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; text-decoration: none; }
.files__name { font-weight: 700; overflow-wrap: anywhere; }
.files__link:hover .files__name { text-decoration: underline; }
.files__size { color: var(--ink-2); white-space: nowrap; }

/* ------------------------------------------------------------------ the reading column */

.prose { max-width: var(--measure); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose dl, .prose table, .prose figure, .prose blockquote, .prose pre { margin: 0 0 1.1em; }
.prose h2 {
  margin: 2.1em 0 0.6em;
  font-size: 1.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em;
  text-wrap: balance;
}
.prose h3 { margin: 1.8em 0 0.5em; font-size: 1.1875rem; font-weight: 800; line-height: 1.3; }
.prose h4 { margin: 1.5em 0 0.4em; font-size: 1.0625rem; font-weight: 700; }
.prose a { text-decoration-color: var(--edge-strong); text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose strong { font-weight: 750; }
.prose ul { padding-left: 1.25rem; }
.prose ul li::marker { color: var(--ink-2); }
.prose li { margin-bottom: 0.4em; }
.prose li > ul, .prose li > ol { margin: 0.4em 0 0; }
.prose hr { border: 0; border-top: 2px solid var(--hair); margin: 2.25em 0; }
.prose img { display: block; border: 1px solid var(--edge); border-radius: 8px; }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 0.5rem; font-size: 0.9375rem; color: var(--ink-2); }

/* Signature move: a numbered list is the card's steps. Each step hangs a big heavy numeral in the topic's tab ink,
   the way a till card's steps are found at arm's length. */
.prose > ol, .prose li > ol { list-style: none; padding-left: 0; counter-reset: step; }
.prose > ol > li, .prose li > ol > li {
  position: relative;
  counter-increment: step;
}
.prose > ol > li {
  min-height: 2.75rem;
  padding: 0.35rem 0 0 4rem;
  margin-bottom: 1.15em;
}
.prose > ol > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 3rem;
  color: var(--tab-ink);
  font-weight: 800; font-size: 2.75rem; line-height: 0.9; letter-spacing: -0.04em;
  text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
}
/* A list inside a step is a sub-step: smaller, outlined, same colour. */
.prose li > ol > li { padding-left: 2.35rem; min-height: 1.6rem; margin-bottom: 0.55em; margin-top: 0.4em; }
.prose li > ol > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.1rem;
  width: 1.6rem; height: 1.6rem;
  display: grid; place-items: center;
  border: 2px solid var(--tab-ink); color: var(--tab-ink);
  border-radius: 50%;
  font-weight: 800; font-size: 0.875rem; line-height: 1;
}

.prose table {
  display: block; max-width: 100%; overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.96875rem; line-height: 1.45;
}
.prose th, .prose td { padding: 0.6rem 0.85rem; text-align: left; vertical-align: top; border: 1px solid var(--hair); }
.prose thead th { background: color-mix(in srgb, var(--tab) 16%, white); font-weight: 800; border-color: color-mix(in srgb, var(--tab) 30%, white); }
.prose tbody tr:nth-child(even) td { background: var(--wash); }

.prose blockquote {
  margin-inline: 0;
  padding: 0.9rem 1.15rem;
  background: var(--wash);
  border: 1px solid var(--hair);
  border-radius: 10px;
}
.prose blockquote > :last-child { margin-bottom: 0; }

.prose code {
  font-family: var(--mono); font-size: 0.875em;
  padding: 0.1em 0.35em;
  background: var(--wash); border: 1px solid var(--hair); border-radius: 5px;
}
.prose pre {
  overflow-x: auto;
  padding: 1rem 1.15rem;
  background: var(--ink); color: #f3f4f5;
  border-radius: 10px;
  font-size: 0.9375rem; line-height: 1.5;
}
.prose pre code { padding: 0; background: none; border: 0; color: inherit; font-size: inherit; }
.prose kbd {
  font-family: var(--font); font-size: 0.875em; font-weight: 700;
  padding: 0.05em 0.45em;
  border: 1px solid var(--edge-strong); border-bottom-width: 2px; border-radius: 5px;
  background: var(--card);
}
.prose input[type="checkbox"] { accent-color: var(--ink); margin-right: 0.4em; }
.prose dt { font-weight: 800; }
.prose dd { margin: 0 0 0.75em 1.25rem; }
.prose sup a { text-decoration: none; }

/* ------------------------------------------------------------------ search results */

.card--search .search { margin-bottom: 1.25rem; }
.results__status { margin: 0 0 1rem; color: var(--ink-2); min-height: 1.6em; }
.results { margin: 0; padding: 0; list-style: none; max-width: 52rem; }
.result { border-top: 1px solid var(--hair); }
.result:last-child { border-bottom: 1px solid var(--hair); }
.result__link { display: grid; gap: 0.15rem; padding: 0.95rem 0; text-decoration: none; }
.result__title { font-weight: 800; font-size: 1.125rem; line-height: 1.35; }
.result__link:hover .result__title { text-decoration: underline; text-decoration-thickness: 2px; }
.result__cat { font-size: 0.875rem; font-weight: 700; color: var(--ink-2); }
.result__text { color: var(--ink-2); font-size: 0.96875rem; line-height: 1.5; }
.result mark { background: #d3d5d8; color: var(--ink); font-weight: 800; border-radius: 3px; padding: 0 0.1em; }

/* ------------------------------------------------------------------ footer */

.foot { color: var(--ground-ink); font-size: 0.9375rem; }
.foot__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-top: 1.5rem; padding-bottom: 2rem;
  border-top: 1px solid var(--edge);
}
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.foot a { color: inherit; }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 52rem) {
  .doc__grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .contents { position: static; }
}

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .top__inner { flex-wrap: wrap; gap: 0.5rem 1rem; padding-block: 0.75rem; }
  .top__search { width: 100%; }
  .brand__logo { height: 1.625rem; }
  .brand__sub { font-size: 1.0625rem; }
  .main { padding-top: 1.25rem; }
  .card__tab { margin-left: 0.85rem; max-width: calc(100% - 1.7rem); font-size: 0.9375rem; padding-inline: 0.85rem; }
  .search--large { flex-direction: column; }
  .search--large input, .search--large button { flex: none; height: 3.25rem; }
  .doc__head { margin-bottom: 1.25rem; }
  .prose > ol > li { padding-left: 3.4rem; }
  .prose > ol > li::before { width: 2.6rem; font-size: 2.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card--topic:hover, .card--topic:focus-within,
  .card--topic:hover .card__tab, .card--topic:focus-within .card__tab { transform: none; }
  /* The tab does not rise, so its foot stays folded too (an unfolded foot would paint over the card's top edge). */
  .card--topic:hover .card__tab::after, .card--topic:focus-within .card__tab::after { transform: scaleY(0); }
}

@media print {
  body { background: #fff; }
  .top, .foot, .contents, .skip { display: none; }
  .card { filter: none; }
  .card__body { border-color: #999; }
}

/* A preview build says so on every page (SiteOptions.PreviewNote). Production builds never set it. */
.preview-note {
  margin: 0; padding: 0.5rem 1rem;
  background: var(--ink); color: #fff;
  font-size: 0.875rem; font-weight: 700; text-align: center;
}
