/*
 * Hairline Index: components
 * Needs tokens.css first. Every class starts with "hx-" so it can sit next to any other CSS.
 */

/* Base: the whole page sits inside a heavy ink frame */
.hx { margin: 0; min-height: 100vh; background: var(--hx-paper); color: var(--hx-ink); font-family: var(--hx-sans); font-size: var(--hx-text-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.hx *, .hx *::before, .hx *::after { box-sizing: border-box; }
.hx-frame { min-height: 100vh; border: var(--hx-frame) solid var(--hx-ink); background: var(--hx-paper); overflow-x: clip; }
.hx :where(a) { color: inherit; }
.hx svg { display: block; max-width: 100%; }
.hx-pad { padding-inline: var(--hx-gutter); }
.hx-container { width: min(100%, var(--hx-container)); margin-inline: auto; padding-inline: var(--hx-gutter); }
.hx-narrow { width: min(100%, var(--hx-narrow)); margin-inline: auto; padding-inline: var(--hx-gutter); }
.hx-rule { height: 0; margin: 0; border: 0; border-top: var(--hx-hair); }
.hx-rule--faint { border-top: var(--hx-hair-faint); }
.hx-section { padding-block: var(--hx-section); }
.hx-section--plate { background: var(--hx-paper-2); }

/* Type */
.hx-logo { display: inline-block; font-family: var(--hx-display); font-weight: 300; font-size: 24px; letter-spacing: var(--hx-tracking-logo); line-height: 1; text-decoration: none; text-transform: uppercase; color: var(--hx-ink); white-space: nowrap; }
.hx-hero-title, .hx-h2 { margin: 0; font-family: var(--hx-display); font-weight: 200; text-transform: uppercase; color: inherit; }
.hx-hero-title { font-size: var(--hx-text-hero); letter-spacing: var(--hx-tracking-hero); line-height: .98; }
.hx-h2 { font-size: var(--hx-text-h2); letter-spacing: .04em; line-height: 1.05; }
.hx-h3 { margin: 0; font-family: var(--hx-serif); font-weight: 400; font-size: var(--hx-text-h3); line-height: 1.25; }
.hx-lead { max-width: 560px; margin: 18px 0 0; font-family: var(--hx-serif); font-weight: 300; font-size: var(--hx-text-lead); line-height: 1.5; color: var(--hx-soft); }
.hx-label { font-family: var(--hx-sans); font-size: var(--hx-text-small); font-weight: 400; letter-spacing: var(--hx-tracking-label); color: var(--hx-ink); }
.hx-label--soft { color: var(--hx-soft); }
.hx-serif-list { margin: 0; padding: 0; list-style: none; font-family: var(--hx-serif); font-size: var(--hx-text-small); line-height: 1.75; color: var(--hx-soft); }
.hx-serif-list a { text-decoration: none; }
.hx-serif-list a:hover, .hx-serif-list a[aria-current="true"] { color: var(--hx-ink); text-decoration: underline; text-decoration-color: var(--hx-moss); text-underline-offset: 3px; }
.hx-num { font-family: var(--hx-serif); font-feature-settings: "tnum"; }
.hx-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--hx-moss); vertical-align: middle; }
.hx-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-family: var(--hx-serif); }
.hx-link:hover { text-decoration-color: var(--hx-moss); }

/* Masthead: wordmark and two links on the left, index columns on the right, one hairline under it */
.hx-mast { display: grid; grid-template-columns: auto auto 1fr auto; gap: 18px 56px; align-items: start; padding: 22px var(--hx-gutter) 30px; }
.hx-mast__links { display: flex; gap: 48px; padding-top: 3px; }
.hx-mast__links a { font-size: var(--hx-text-small); text-decoration: none; white-space: nowrap; }
.hx-mast__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hx-mast__index { display: grid; grid-template-columns: repeat(3, minmax(100px, auto)); gap: 0 44px; padding-top: 3px; }
.hx-mast__index .hx-label { display: block; margin-bottom: 6px; }

/* Results bar: count on the left, a sort control set in serif */
.hx-bar { display: flex; flex-wrap: wrap; gap: 8px 64px; align-items: baseline; padding: 20px var(--hx-gutter); font-size: var(--hx-text-small); }
.hx-bar select, .hx-bar button { padding: 0; border: 0; background: none; color: var(--hx-ink); font: inherit; font-family: var(--hx-serif); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Buttons: square, hairline. Ink fill for the one main action */
.hx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border: var(--hx-hair); border-radius: var(--hx-radius); background: transparent; color: var(--hx-ink); font: 500 var(--hx-text-small) var(--hx-sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s var(--hx-ease), color .2s var(--hx-ease); }
.hx-btn:hover { background: var(--hx-ink); color: var(--hx-paper); }
.hx-btn--solid { background: var(--hx-ink); color: var(--hx-paper); }
.hx-btn--solid:hover { background: var(--hx-moss); border-color: var(--hx-moss); }
.hx-btn--block { width: 100%; }
.hx-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Plate: a flat tonal block holding a fine ink line drawing. The kit's only imagery */
.hx-plate { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; background: var(--hx-paper-2); overflow: hidden; }
.hx-plate--moss { background: var(--hx-moss-soft); }
.hx-plate--clay { background: var(--hx-clay-soft); }
.hx-plate--deep { background: var(--hx-paper-3); }
.hx-plate--wide { aspect-ratio: 16 / 9; }
.hx-plate.hx-plate--wide svg { width: 20%; stroke-width: .7; }
.hx-plate--square { aspect-ratio: 1; }
.hx-plate svg { width: 56%; height: auto; stroke: var(--hx-ink); stroke-width: 1; fill: none; }
.hx-plate__tag { position: absolute; left: 12px; bottom: 10px; font-family: var(--hx-serif); font-size: var(--hx-text-micro); color: var(--hx-soft); }

/* Catalogue grid: entries with a plate, a serif title and two micro labels. No cards, no borders */
.hx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px var(--hx-gutter); }
.hx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hx-entry { display: block; text-decoration: none; }
.hx-entry__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: var(--hx-text-micro); color: var(--hx-soft); }
.hx-entry__title { margin: 4px 0 0; font-family: var(--hx-serif); font-size: 17px; font-weight: 400; line-height: 1.3; }
.hx-entry:hover .hx-entry__title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hx-moss); }

/* Split: a label column and a text column, the magazine colophon layout */
.hx-split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px var(--hx-gutter); }

/* Leader list: label .......... value */
.hx-leaders { margin: 0; padding: 0; list-style: none; }
.hx-leaders li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; font-size: var(--hx-text-small); }
.hx-leaders li::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--hx-faint); }
.hx-leaders li > :last-child { order: 2; font-family: var(--hx-serif); }

/* Badge: plain small text in a hairline box */
.hx-badge { display: inline-block; padding: 2px 8px; border: var(--hx-hair); font-size: var(--hx-text-micro); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.hx-badge--moss { border-color: var(--hx-moss); color: var(--hx-moss); }

/* Forms: underline fields, labels above in tiny grotesk */
.hx-field { display: grid; gap: 6px; margin-bottom: 26px; }
.hx-field label { font-size: var(--hx-text-micro); color: var(--hx-soft); letter-spacing: .02em; }
.hx-input, .hx-select { width: 100%; padding: 8px 0 10px; border: 0; border-bottom: var(--hx-hair); border-radius: 0; background: transparent; color: var(--hx-ink); font: 300 20px var(--hx-serif); outline: none; appearance: none; }
.hx-input::placeholder { color: var(--hx-faint); }
.hx-input:focus, .hx-select:focus { border-bottom-color: var(--hx-moss); box-shadow: 0 1px 0 var(--hx-moss); }
.hx-check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--hx-text-small); color: var(--hx-soft); }
.hx-check input { width: 15px; height: 15px; margin: 3px 0 0; accent-color: var(--hx-moss); }
.hx-choice { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--hx-hair); }
.hx-choice label { padding: 14px 12px; border-left: var(--hx-hair); font-size: var(--hx-text-small); cursor: pointer; }
.hx-choice label:first-child { border-left: 0; }
.hx-choice input { position: absolute; opacity: 0; }
.hx-choice label:has(input:checked) { background: var(--hx-ink); color: var(--hx-paper); }

/* Pricing: columns divided by hairlines, never boxed cards */
.hx-pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--hx-hair); border-bottom: var(--hx-hair); }
.hx-plan { display: flex; flex-direction: column; padding: 34px var(--hx-gutter) 36px; border-left: var(--hx-hair); }
.hx-plan:first-child { border-left: 0; }
.hx-plan--marked { background: var(--hx-paper-2); }
.hx-plan__name { font-family: var(--hx-display); font-weight: 300; font-size: 26px; letter-spacing: .14em; text-transform: uppercase; }
.hx-plan__price { margin: 26px 0 4px; font-family: var(--hx-serif); font-weight: 300; font-size: 54px; line-height: 1; }
.hx-plan__price small { font-size: 15px; color: var(--hx-soft); }
.hx-plan .hx-leaders { margin: 22px 0 30px; flex: 1; }

/* Table: hairline rows, serif values */
.hx-table { width: 100%; border-collapse: collapse; font-size: var(--hx-text-small); }
.hx-table th { padding: 10px 0; border-bottom: var(--hx-hair); font-weight: 400; color: var(--hx-soft); text-align: left; }
.hx-table td { padding: 12px 0; border-bottom: var(--hx-hair-faint); font-family: var(--hx-serif); }
.hx-table td:first-child { font-family: var(--hx-sans); }

/* Article: centered serif body, a label rail on wide screens, drop-in figures and pull quote */
.hx-article { font-family: var(--hx-serif); font-weight: 300; font-size: 20px; line-height: 1.65; }
.hx-article p { margin: 0 0 1.1em; }
.hx-article h2 { margin: 2em 0 .6em; font-family: var(--hx-display); font-weight: 300; font-size: 26px; letter-spacing: .12em; text-transform: uppercase; }
.hx-article blockquote { margin: 1.6em 0; padding: 18px 0; border-top: var(--hx-hair); border-bottom: var(--hx-hair); font-style: italic; font-size: 26px; line-height: 1.4; }
.hx-article figure { margin: 2em 0; }
.hx-article figcaption { margin-top: 8px; font-family: var(--hx-sans); font-size: var(--hx-text-micro); color: var(--hx-soft); }
.hx-article ol { padding-left: 1.2em; }
.hx-byline { display: flex; flex-wrap: wrap; gap: 6px 36px; font-size: var(--hx-text-small); color: var(--hx-soft); }

/* Footer: a hairline, then the index again in small type */
.hx-foot { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px var(--hx-gutter); padding: 40px var(--hx-gutter) 34px; border-top: var(--hx-hair); }
.hx-foot__note { max-width: 300px; margin: 14px 0 0; font-family: var(--hx-serif); font-size: var(--hx-text-small); color: var(--hx-soft); }
.hx-foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px var(--hx-gutter) 18px; border-top: var(--hx-hair-faint); font-size: var(--hx-text-micro); color: var(--hx-soft); }

@media (max-width: 1000px) {
  .hx-mast { grid-template-columns: auto 1fr; }
  .hx-mast__index { grid-column: 1 / -1; }
  .hx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hx-mast__links { gap: 24px; justify-content: flex-end; }
  .hx-mast__index { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
  .hx-split { grid-template-columns: 1fr; }
  .hx-pricing { grid-template-columns: 1fr; }
  .hx-plan { border-left: 0; border-top: var(--hx-hair); }
  .hx-plan:first-child { border-top: 0; }
  .hx-bar { gap: 8px 28px; }
}
@media (max-width: 480px) {
  .hx-grid, .hx-grid--3 { gap: 34px 14px; }
  .hx-entry__meta { flex-direction: column; gap: 0; }
  .hx-foot { grid-template-columns: 1fr 1fr; }
  .hx-foot > :first-child { grid-column: 1 / -1; }
  .hx-choice { grid-template-columns: 1fr; }
  .hx-choice label { border-left: 0; border-top: var(--hx-hair); }
  .hx-choice label:first-child { border-top: 0; }
}
