/* Sandi Carbon page CSS: only what the kit lacks. Tokens come from system.css and the :root block in Base.astro.
   Logical properties only (margin-inline, padding-block, inset-inline-start) so an RTL version needs no rewrite. */

/* Figures: lining (all digits cap height) everywhere. Zilla Slab defaults to old-style figures, which
   drop the 3 in "8x30" below the line; mesh sizes, grade codes and specs must read level.
   A "font:" shorthand anywhere resets font-variant-numeric, so this rule wins with !important. */
*, *::before, *::after { font-variant-numeric: lining-nums !important; }
.spec table, .spec table * { font-variant-numeric: lining-nums tabular-nums !important; }

/* Placeholder chip: a value the owner still has to supply (PLACEHOLDERS.md). Visible on purpose. */
.ph {
  display: inline; padding: 1px 6px; border-radius: 4px;
  background: #fff4cc; color: #5b4300; border: 1px dashed #b38600;
  font: 500 13px/1.6 var(--font-text); white-space: normal;
}
.ph::before { content: "To provide: "; font-weight: 600; }

/* Data pages (spec tables, policy text) grow with their content instead of holding one screen. */
main > section.section--flow { height: auto; min-height: 0; padding-block-end: var(--s-8); }
main > section.section--flow + section.section--flow { padding-block-start: var(--s-8); }
main > section.section--flow > .wrap { height: auto; }

/* Spec tables: scroll inside their own frame, never the page. */
.spec { display: grid; gap: var(--s-4); }
.spec + .spec { margin-block-start: var(--s-8); }
.spec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); }
.spec__head h3 { font: var(--display-weight) var(--t-h3)/1.15 var(--font-display); letter-spacing: var(--display-tracking); margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--g-main, var(--p-bg)); }
.table-wrap:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.spec table { width: 100%; border-collapse: collapse; font: 400 15px/1.45 var(--font-text); font-variant-numeric: lining-nums tabular-nums; }
.spec caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.spec th, .spec td { padding: var(--s-3) var(--s-4); text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec thead th { font-weight: 500; font-size: 13px; color: var(--muted); background: var(--p-surface); white-space: nowrap; }
.spec thead th small { display: block; font-weight: 400; }
.spec tbody th { font-weight: 500; white-space: nowrap; }
.spec tbody th small { display: block; font-weight: 400; color: var(--muted); }
.spec tbody tr:last-child > * { border-bottom: 0; }
.spec td { white-space: nowrap; }
.spec td:has(.ph) { white-space: normal; min-width: 12em; }
.spec--props td { white-space: normal; }

/* Key facts list beside a product's summary */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-5); margin: 0; }
.facts dt { color: var(--muted); font-size: var(--t-small); padding-block-start: 2px; }
.facts dd { margin: 0; }

/* Small trail above an inner page's h1 */
.trail { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-4); padding: 0; list-style: none; font-size: var(--t-small); color: var(--muted); }
.trail li + li::before { content: "/"; margin-inline-end: var(--s-2); }
.trail a { color: inherit; }

/* Photo frame of fixed ratio for inner pages */
.pic { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--p-surface); }
.pic > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic--43 { aspect-ratio: 4 / 3; }
.pic--32 { aspect-ratio: 3 / 2; }
.pic--31 { aspect-ratio: 3 / 1; }

/* Plain lists in copy */
.list { margin: 0; padding-inline-start: 1.1em; display: grid; gap: var(--s-2); }
.list li::marker { color: var(--action); }

/* Inline grade index: jump links to each table on long spec pages */
.jump { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; padding: 0; list-style: none; }

/* Office cards in the contact page and footer */
.office address { font-style: normal; }

/* The RFQ form spans its column; the textarea gets room */
.form textarea { min-height: 140px; resize: vertical; }
.form select { appearance: auto; }

/* One line per item in a multi-value row (packing, documents) */
.rows__line { display: block; }

/* rows whose values are sentences (packing, ordering terms, documents): the value wraps at a readable
   width instead of running over its name; on a phone it sits under the name */
.rows--text > li { grid-template-columns: minmax(8rem, 1fr) auto; }
.rows--text .rows__value { white-space: normal; max-width: 48ch; text-wrap: pretty; }
@media (max-width: 599px) {
  .rows--text > li { grid-template-columns: minmax(0, 1fr); }
  .rows--text .rows__value { grid-column: 1; grid-row: 2; text-align: left; max-width: none; }
}
