@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/dm-serif-display-latin.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f2f4;
  --ink: #282126;
  --muted: #574d55;
  --line: #d8ccd4;
  --plum: #432e40;
  --display: "DM Serif Display", Georgia, serif;
  font: 1rem/1.55 Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid #663e62; outline-offset: 4px; }
h1, h2, p, dl, dd, figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; }
h1 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: .98; letter-spacing: -.034em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -.024em; }
.page-width { width: min(100% - 2 * clamp(1.125rem, 5vw, 4.5rem), 74rem); margin-inline: auto; }

.studio-header {
  min-height: 5.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.studio-mark { font: 1.5rem/1.1 var(--display); text-decoration: none; }
.header-current { font-size: .875rem; font-weight: 650; text-underline-offset: .22em; }
.catalog, .detail { padding-block: clamp(2.7rem, 8vw, 6rem) 4rem; }
.detail { padding-block-start: clamp(2rem, 5vw, 4.25rem); }
.intro { max-width: 35rem; margin-top: 1rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.catalog h1 { font-size: clamp(2.4rem, 6vw, 5rem); }

.product-list { margin: clamp(1.7rem, 4.2vw, 3.5rem) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.product-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding-block: 1.45rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.product-row:hover h2 { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }
.row-action { text-decoration: underline; }
.product-row p:not(.format) { margin-top: .5rem; color: var(--muted); }
.format { margin-bottom: .45rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.row-action { font-weight: 675; font-size: .875rem; text-underline-offset: .24em; }

.product-icon {
  display: block;
  aspect-ratio: 1;
  height: auto;
  flex: none;
  border-radius: .48rem;
  background: #dfd0d7;
}
.catalog-icon { width: 3.75rem; }

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(1.7rem, 4vw, 3.5rem);
}
.product-heading {
  display: flex;
  align-items: flex-start;
  gap: clamp(.7rem, 1.4vw, 1rem);
}
.detail-icon { width: clamp(2.75rem, 4.2vw, 4rem); }
.detail h1 { font-size: clamp(2.45rem, 4.15vw, 4.15rem); line-height: 1.01; }

.buy-link {
  display: inline-block;
  padding: .73rem 1.15rem;
  margin-top: 1.45rem;
  border-radius: .25rem;
  background: var(--plum);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.buy-link:hover { background: #5c4058; }
.purchase-note { margin-top: .55rem; font-size: .82rem; color: var(--muted); }
.purchase-note { max-width: 42ch; }
.example { border: 1px solid #b4c7bb; border-radius: .3rem; padding: clamp(1rem, 3vw, 2rem); background: #e8f0ea; color: #20382c; }
.example .format { color: #395648; }
.example-rows { margin-top: 1rem; border-top: 1px solid #b4c7bb; }
.example-rows > div { padding-block: .78rem; border-bottom: 1px solid #b4c7bb; }
.example-rows dt, .contents-list dt { font-weight: 700; }
.example-rows dd { margin-top: .35rem; font-size: .9rem; }
.caption-sample-track {
  display: grid;
  gap: .55rem;
  margin-block: 1rem;
  padding: .8rem;
  border-radius: .28rem;
  background: #181c30;
  color: #e7e4fb;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.caption-sample-track > div { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); align-items: center; gap: .45rem; }
.caption-sample-bar { position: relative; height: .8rem; border-radius: .13rem; }
.caption-sample-first { width: 50%; background: #a797f2; }
.caption-sample-first i { position: absolute; inset: 0 0 0 88%; border-radius: 0 .13rem .13rem 0; background: #f7ad99; }
.caption-sample-next { margin-inline-start: 44.2%; background: #596b95; }
.caption-sample-used .caption-sample-first { width: 44.2%; background: #76d1b3; }
.caption-sample-used .caption-sample-first i { display: none; }
.caption-sample-cues > div { padding-block: .55rem; border-top: 1px solid #b4c7bb; }
.caption-sample-cues dt { font-size: .85rem; font-weight: 700; }
.caption-sample-cues dt span { margin-inline-start: .3rem; font-weight: 500; }
.caption-sample-cues dd { margin-top: .18rem; font-size: .8rem; color: #395648; }
.caption-sample-cues code { color: #20382c; font-variant-numeric: tabular-nums; }
.caption-sample-status { margin-top: .55rem; font-size: .85rem; }
.caption-sample-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .85rem; margin-top: .8rem; }
.caption-sample-actions a { font-size: .85rem; }
.caption-sample-button {
  padding: .55rem .8rem;
  border: 1px solid #284e3b;
  border-radius: .25rem;
  background: #284e3b;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.caption-sample-button:hover { background: #37644d; }
.caption-sample-button:focus-visible { outline: 2px solid #244735; outline-offset: 3px; }
.status { display: inline-block; min-width: 3.35rem; padding: .1rem .3rem; margin-right: .3rem; text-align: center; border-radius: .2rem; font-size: .73rem; }
.status-go { background: #d0e4d6; color: #1d543c; }
.status-hold { background: #f3dfdf; color: #6c2330; }
.status-neutral { background: #ebdfed; color: #432e40; }

.detail-support {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4.75rem);
  margin-top: clamp(2.15rem, 5vw, 4rem);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
}
.contents p { margin-top: .85rem; max-width: 40rem; color: var(--muted); }
.contents-list { margin-top: 1.05rem; }
.contents-list > div + div { margin-top: .8rem; }
.contents-list dd { color: var(--muted); }

.preview-link { display: block; text-decoration: none; }
.preview-link img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: .38rem;
  background: #eee9ed;
}
.preview-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  margin-top: .55rem;
  font-size: .82rem;
  color: var(--muted);
}
.preview-caption > span:last-child {
  flex: none;
  margin-inline-start: auto;
  font-weight: 675;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 820px) {
  .detail-hero, .detail-support { grid-template-columns: minmax(0, 1fr); }
  .detail-hero { gap: 1.5rem; }
  .detail h1 { font-size: clamp(2.2rem, 7.5vw, 4rem); }
}

@media (max-width: 739px) {
  .studio-header { min-height: 4.3rem; }
  .product-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: .65rem .85rem;
  }
  .catalog-icon { width: 2.9rem; }
  .row-action { grid-column: 2; }
}

@media (max-width: 480px) {
  .detail { padding-block-start: 1.5rem; }
  .detail-hero { gap: 1.25rem; }
  .detail-icon { width: 2.4rem; }
  .detail h1 { font-size: clamp(1.95rem, 8.7vw, 2.65rem); }
  .detail .intro { margin-top: .8rem; }
  .buy-link { margin-top: 1.1rem; }
}
