:root {
  --bg: #F6F5EC;
  --ink: #141414;
  --muted: #8A8A85;       /* rules and underlines; too light for small text */
  --muted-text: #6C6C67;  /* muted text, 4.8:1 on --bg */
  --line: #DDDCD1;
  --accent: var(--ink);

  --font-text: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --side: 24px;
  --gutter: 24px;
  --section-gap: 48px;
  --axis: 1;              /* column the content hangs from; 1–2 become a rail on desktop */

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, dl, dd, figure { margin: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.35 var(--font-text);
  letter-spacing: -0.015em;
}

.wrap {
  max-width: calc(1240px + 2 * var(--side));
  margin-left: max(0px, (100vw - 1336px) / 6);   /* sits left of center on wide screens */
  padding-inline: var(--side);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.grid > * { grid-column: var(--axis) / -1; }

.note,
figcaption,
thead th,
.includes,
.condition,
.status,
.site-footer {
  font: 400 0.8125rem/1.35 var(--font-mono);
}

/* Links */

a { color: var(--accent); text-decoration: none; }

.site-header a,
.inquire a {
  position: relative;
  display: inline-block;
}
.site-header a::after,
.inquire a::after {
  content: "";
  position: absolute;
  inset: auto 0 0.1em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms ease-out;
}
.site-header a:hover::after,
.inquire a:hover::after { transform: scaleX(1); }

.price a,
.more a,
.contact a,
.unavailable a,
noscript a {
  text-decoration: underline 1px var(--muted);
  text-underline-offset: 0.25em;
}
.price a:hover,
.more a:hover,
.contact a:hover,
.unavailable a:hover,
noscript a:hover { text-decoration-color: var(--ink); }

a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  a::after { transition: none !important; }
}

/* Header and intro */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 28px;
  max-width: none;        /* nav reaches the right edge of the window */
  min-height: 84px;       /* holds its height until the name loads */
}
.site-header a { padding-block: 2px; }
.wordmark { font-weight: 500; }
.site-header nav { margin-left: auto; display: flex; gap: 24px; }

main { min-height: 100vh; }

.intro { padding-block: clamp(72px, 13vw, 184px) var(--section-gap); }
.intro h1 {
  margin-bottom: calc(10px - 0.067em);
  font-size: clamp(3.25rem, 9.5vw, 8.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: pretty;
}
.subheading {
  line-height: 1;
  margin: -0.205em 0 -0.14em;   /* trims the font’s built-in space so the visible gaps are 2px */
  font-family: var(--font-text), "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: clamp(1.0625rem, 1.8vw, 1.5rem);
  letter-spacing: 0;
}
.intro .note { margin-top: 0.4px; }
.note { color: var(--muted-text); }

/* Catalog */

.series + .series { margin-top: var(--section-gap); }
.closing { margin-top: 28px; }

.series h2 {
  margin: 0.1em 0 0.5em -0.03em;    /* optical: pulls the capital onto the axis */
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.series h2 small {
  margin-left: 0.3em;
  color: var(--muted-text);
  font-size: clamp(1rem, 1.6vw, 1.375rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

figure { margin-bottom: 48px; }
figure img { display: block; width: 100%; height: auto; }
figcaption { margin-top: 12px; color: var(--muted-text); }

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;    /* same columns in every series */
}
th, td {
  padding: 11px 12px 11px 0;
  font-weight: 400;
  text-align: left;
  vertical-align: baseline;
}
thead th { padding-block: 0 10px; color: var(--muted-text); }

thead .product { width: 26%; }
thead .length { width: 11.5%; }
thead .includes { width: 17%; }
thead .condition { width: 17%; }
thead .price { width: 17%; }
thead .inquire { width: 11.5%; }

.price, .inquire { text-align: right; }
.inquire { padding-right: 0; }
.length, .price { font-variant-numeric: tabular-nums; }
td.price, td.inquire { white-space: nowrap; }
.status { margin-right: 0.6em; }

td, tbody th { border-top: 1px solid var(--line); }
.out, .out a { color: var(--muted-text); }

thead .inquire span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.unavailable { font-size: 1.25rem; }

/* About, contact and footer */

.more { margin-top: 40px; }
.about { padding-top: clamp(72px, 10vw, 144px); }
.about > p { margin-top: 1em; font-size: 1.0625rem; line-height: 1.4; }
.about > h3 {
  margin: 1.6em 0 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}
.about > h1 + p {
  margin: 8px 0 0.4em;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.contact { padding-top: 40px; padding-bottom: var(--section-gap); }
.about h1, .contact h2 { font: 400 0.8125rem/1.35rem var(--font-mono); }
.contact > p { margin-top: 8px; }
.contact dl {
  display: grid;
  grid-template-columns: 9ch minmax(0, 1fr);
  row-gap: 4px;
  margin-top: 32px;
  font: 400 0.8125rem/1.35rem var(--font-mono);
}
.contact dd { overflow-wrap: anywhere; }

.site-footer {
  padding-block: 32px 40px;
  row-gap: 16px;
  color: var(--muted-text);
  font-size: 0.75rem;
}

/* Desktop */

@media (min-width: 720px) {
  :root { --side: 48px; --section-gap: 72px; }

  .more { margin-left: calc((100% + var(--gutter)) / 12 * (var(--axis) - 1)); }
  .about > p { grid-column-end: span 7; }
  .contact > p, .contact dl { grid-column-end: span 8; }

  .site-footer > :first-child { grid-column: 1 / span 5; }
  .site-footer > :last-child { grid-column: 7 / -1; }

  /* The name shows once per group; the rule picks up at Length for its other sizes. */
  .repeat {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  tr + tr th { border-top-color: transparent; }
}

@media (min-width: 720px) and (max-width: 1099.98px) {
  table { font-size: 0.9375rem; }
}

@media (min-width: 1000px) {
  :root { --axis: 3; --section-gap: 72px; }
  .about h1, .contact h2 { grid-column: 1 / span 2; }
  .about > h1 + p { margin-top: 0; }
  .contact > p { margin-top: 0; }
}

/* Mobile: each row becomes a stacked block */

@media (max-width: 719.98px) {
  table, tbody { display: block; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  tbody tr {
    display: block;
    position: relative;
    padding: 16px 112px 16px 0;
    border-top: 1px solid var(--line);
  }
  tbody :is(th, td) { display: inline; width: auto; padding: 0; border: 0; }
  tbody .length { margin-left: 0.4em; white-space: nowrap; }
  .includes::before { content: "\A"; white-space: pre; }
  .condition::before { content: "·"; margin-inline: 0.5em; }
  .includes, .condition { line-height: 1.5rem; }
  tbody .price,
  tbody .inquire { position: absolute; top: 16px; right: 0; }
  tbody .inquire { top: 40px; }
  .site-footer > :last-child { grid-row: 2; }
}

/* Scroll indicator */

.custom-scroll { scrollbar-width: none; }
.custom-scroll::-webkit-scrollbar { display: none; }
.scrollbar {
  position: fixed;
  top: 0;
  right: 0;
  width: 14px;
  touch-action: none;
}
.scrollbar::after {
  content: "";
  position: absolute;
  inset: 4px 4px 4px auto;
  width: 2px;
  background: var(--ink);
}
