/* Export · formats and colour spaces in ONE gamut (export/gamut-formats-and-colour-spaces-in-one.html).
   On top of export.css (title) + formats.css (the chart, the file pill). Script: export/js/gamut-merged.js. */

.gm-block {
  /* both columns start on the same line: step 01 level with the top of the diagram (its callout) */
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 5vw, 96px); align-items: start;
  max-width: 1180px; margin: 0 auto; font-family: var(--display);
}

/* ---------- the two choices ---------- */
.gm-step + .gm-step { margin-top: clamp(32px, 3.4vw, 48px); transition: opacity .35s; }
.gm-step h3 { display: flex; align-items: center; gap: 14px; margin: 0; font-size: clamp(26px, 2.5vw, 36px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.gm-step h3 .fx-step__n { width: 40px; font-size: 14px; }
.gm-sub { margin: 8px 0 18px 54px; font-size: 16px; font-weight: 500; color: var(--muted); }

.gm-fmts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.gm-fmt, .gm-space {
  border-radius: 14px; border: 1px solid #ffffff1a; background: #ffffff08; color: var(--text);
  font-family: var(--display); cursor: pointer; transition: border-color .25s, background .25s;
}
.gm-fmt:hover, .gm-space:hover { border-color: #ffffff3a; }
.gm-fmt:focus-visible, .gm-space:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.gm-fmt[aria-checked="true"], .gm-space[aria-checked="true"] { border-color: #fff; background: #ffffff14; box-shadow: 0 0 0 1px #fff; }
.gm-fmt { display: grid; gap: 3px; padding: 12px 6px; text-align: center; }
.gm-fmt b { font-size: clamp(16px, 1.4vw, 20px); font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; }
.gm-fmt span { font: 600 11.5px var(--mono); color: var(--text); }
.gm-fmt em { font-size: 12px; font-style: normal; color: var(--muted); }
.gm-fmt[data-f="dng"] b { color: #ffe6dc; }

.gm-spaces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gm-space { padding: 12px 14px; font-size: clamp(16px, 1.3vw, 18px); font-weight: 700; letter-spacing: -0.02em; text-align: left; }

.gm-line { min-height: 2.7em; margin: 22px 0 0; font-size: 16px; line-height: 1.4; color: var(--muted); transition: color .25s; }
.gm-line.is-warn { color: var(--warn, #f5a524); }
.gm-line.is-dng { color: #ffe6dc; }

/* DNG: no colour space (as in the app) */
.gm.is-dng .gm-step[data-gm-step2] { opacity: .3; pointer-events: none; }

/* ---------- the diagram ---------- */
.gm-visual { display: grid; justify-items: center; }
.gm .fx-chart { width: min(100%, 400px); margin-top: 44px; }
/* the dots: the steps a file has between its colours */
.gm-dots { transition: opacity .45s; }
/* until the outlines have drawn (gamut-merged.js adds .is-drawn), no dots and no gradient line */
.gm .gm-grad { transition: opacity .45s; }
.gm:not(.is-drawn) .gm-dots, .gm:not(.is-drawn) .gm-grad { opacity: 0; }
/* each dot is a colour the file can write, painted in that colour; the ones the gradient uses get a white ring */
.gm-dots circle { stroke: #0b0c0c; stroke-width: .9; transition: transform .7s cubic-bezier(.4, 0, .2, 1), fill .7s; }
.gm-dots[data-bits="16"] circle { stroke-width: .15; }
.gm-dots circle.is-hit { stroke: #fff; stroke-width: 2; }
.gm-grad line { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 3px #000); }
.gm-grad circle { fill: #fff; stroke: #0b0c0c; stroke-width: 1.5; }
.gm-dots:not(.is-on) { opacity: 0; }
/* DNG: the whole horseshoe stays lit, no shape, no dots */
.gm.is-dng .fx-dim { opacity: 0; }
.gm.is-dng .fx-tri { stroke: #ffffff26; stroke-width: 1; }
.gm.is-dng .fx-tlabel { opacity: 0; }
.gm.is-dng .fx-paint { opacity: 1; }

/* the two strips: the gradient as it is, and as the file stores it */
.gm-strips { display: grid; gap: 10px; width: min(100%, 460px); margin-top: 18px; }
.gm-strip { display: grid; gap: 5px; }
.gm-strip span { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.gm-strip span b { color: var(--text); font-weight: 600; }
.gm-strip em { font-style: normal; font-variant-numeric: tabular-nums; }
.gm-strip canvas { display: block; width: 100%; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px #ffffff1f; }
.gm-caption { margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: var(--text); }
.gm-caption span { color: var(--muted); }
.gm-caption i { font-style: normal; color: #ffffff66; }

.gm .fx-file { margin-top: clamp(36px, 4vw, 56px); }

@media (max-width: 1059px) {
  .gm-block { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
}
@media (max-width: 560px) {
  .gm-fmts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gm-sub { margin-left: 0; }
}
