/* A listening guide with the same paper, rules and type as the workbench. */
#method-dialog {
  --guide-paper: #242522;
  --guide-inset: #1d1e1b;
  --guide-type: #f1ecdf;
  --guide-secondary: #c9c5ba;
  --guide-rule: #53534a;
  --guide-coral: #ffad88;
  --guide-gutter: clamp(.95rem, 4vw, 2.8rem);
  width: min(48rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: min(90vh, 57rem);
  max-height: min(90dvh, 57rem);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block-start: 6rem;
  border: 1px solid #5c5a50;
  border-top: 2px solid #e0d9c7;
  color: var(--guide-type);
  background: var(--guide-paper);
  font-family: var(--sans);
  word-break: normal;
}

#method-dialog:lang(ko) { word-break: keep-all; }

#method-dialog .dialog-head {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  padding: .65rem var(--guide-gutter);
  margin: 0;
  background: var(--guide-paper);
  border-bottom: 1px solid var(--guide-rule);
}

#method-title {
  margin: 0;
  min-width: 0;
  color: var(--guide-type);
}

#method-dialog .dialog-head h2 {
  font-size: clamp(1.45rem, 4vw, 2.2rem);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -.025em;
  text-wrap: balance;
}

#method-close { color: var(--guide-secondary); }
#method-close:hover { color: var(--guide-type); }

#method-dialog .method-body {
  padding: clamp(1.3rem, 4.2vw, 2.3rem) var(--guide-gutter) clamp(1.4rem, 4.6vw, 2.7rem);
  font-size: 1.13rem;
  overflow-wrap: anywhere;
}

#method-dialog .method-body p {
  color: var(--guide-secondary);
  font-size: 1.1rem;
  line-height: 1.52;
}

#method-dialog .method-body > .method-intro {
  max-width: 50ch;
  color: var(--guide-type);
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  line-height: 1.36;
  letter-spacing: -.012em;
}

#method-dialog .method-body > section {
  margin-block-start: clamp(1.55rem, 4.4vw, 2.5rem);
  padding-block-start: clamp(1.1rem, 3.1vw, 1.65rem);
  border-block-start: 1px solid var(--guide-rule);
}

#method-dialog .method-body h3 {
  margin: 0 0 .65rem;
  font-size: clamp(1.4rem, 3.7vw, 2rem);
  font-weight: 500;
  letter-spacing: -.022em;
  line-height: 1.19;
  text-wrap: balance;
}

#method-dialog .method-body section > p + p { margin-block-start: .5rem; }

#method-dialog figure { margin: 1.05rem 0 0; }
#method-dialog figure + p { margin-block-start: .9rem; }

#method-dialog:lang(ko) .dialog-head h2,
#method-dialog:lang(ja) .dialog-head h2 { font-size: clamp(1.15rem, 3.5vw, 1.6rem); }

#method-dialog:lang(ko) .method-body > .method-intro,
#method-dialog:lang(ja) .method-body > .method-intro {
  max-width: 35rem;
  font-size: clamp(1rem, 2.75vw, 1.23rem);
  line-height: 1.64;
}

#method-dialog:lang(ko) .method-body h3,
#method-dialog:lang(ja) .method-body h3 {
  font-size: clamp(1.12rem, 2.95vw, 1.48rem);
  font-weight: 500;
  line-height: 1.4;
}

#method-dialog:lang(ko) .method-body p,
#method-dialog:lang(ja) .method-body p { font-size: .95rem; line-height: 1.79; }

#method-example {
  --chart-gutter: clamp(.65rem, 2.7vw, 1.1rem);
  --axis-width: 2.7rem;
  padding: 0 var(--chart-gutter);
  border-block: 1px solid #655f52;
  background: var(--guide-inset);
}

.method-scan { padding-block: .95rem .8rem; }

.method-trackline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem 1rem;
  margin-block-end: .65rem;
}

.method-trackline > div { min-width: 0; }
.method-trackline small { display: block; color: var(--guide-coral); font-size: .9rem; }
.method-trackline h4 {
  display: inline;
  margin: 0;
  color: var(--guide-type);
  font-size: clamp(1.26rem, 3.5vw, 1.68rem);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.17;
}

.method-trackline span[lang] {
  display: inline-block;
  margin-inline-start: .45rem;
  color: var(--guide-secondary);
  font-size: 1.02rem;
  font-style: italic;
}

.method-trackline button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  max-width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: .38rem .65rem;
  border: 1px solid #6d685b;
  border-radius: 0;
  background: transparent;
  color: var(--guide-type);
  font-size: .99rem;
  font-weight: 400;
  line-height: 1.32;
}

.method-trackline button:hover, .method-trackline button.is-playing {
  color: var(--guide-coral);
  border-color: var(--guide-coral);
}

.method-plot {
  display: grid;
  grid-template-columns: var(--axis-width) minmax(0, 1fr);
  align-items: stretch;
}

.method-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: start;
  gap: .3rem;
  padding-inline-end: .4rem;
  color: var(--guide-secondary);
  font-size: .87rem;
  line-height: 1.03;
}

.method-plot canvas {
  display: block;
  width: 100%;
  min-width: 0;
  height: clamp(4rem, 13vw, 6.8rem);
  background: #252925;
}

.method-clock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: .35rem;
  align-items: start;
  margin-inline-start: var(--axis-width);
  margin-block-start: .32rem;
  color: var(--guide-secondary);
  font-size: .89rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.26;
}

.method-clock > :last-child { text-align: end; }
.method-range { color: var(--guide-type); text-align: center; }
.method-range strong { color: var(--guide-coral); font-weight: 400; white-space: nowrap; }
.method-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: .52rem 0 0 var(--axis-width);
  border-block: 1px solid #44443c;
}

.method-control label { color: var(--guide-type); font-size: 1.02rem; }
.method-buildup-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 .75rem;
}
.method-control .method-buildup-choice {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  min-height: 2.75rem;
  cursor: pointer;
}
#method-include-buildup { width: 1rem; height: 1rem; margin: 0; accent-color: var(--guide-coral); }
#method-mark { color: var(--guide-coral); font-variant-numeric: tabular-nums; }

#method-point {
  appearance: none;
  grid-column: 1 / -1;
  width: 100%;
  min-height: 2.75rem;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  accent-color: var(--guide-coral);
}

#method-point::-webkit-slider-runnable-track { height: 3px; background: #999185; }
#method-point::-moz-range-track { height: 3px; background: #999185; }
#method-point::-webkit-slider-thumb {
  appearance: none;
  width: .875rem;
  height: 1.4rem;
  margin-top: calc((3px - 1.4rem) / 2);
  border: 2px solid var(--guide-inset);
  border-radius: 0;
  background: var(--guide-coral);
  box-shadow: 0 0 0 1px var(--guide-coral);
}
#method-point::-moz-range-thumb {
  box-sizing: border-box;
  width: .875rem;
  height: 1.4rem;
  border: 2px solid var(--guide-inset);
  border-radius: 0;
  background: var(--guide-coral);
  box-shadow: 0 0 0 1px var(--guide-coral);
}

#method-dialog #method-demo-caption,
#method-dialog #method-example-status:not(:empty),
#method-dialog .dialog-status:not(:empty) {
  padding-block: .78rem;
  color: var(--guide-secondary);
  font-size: .97rem;
  line-height: 1.48;
}

#method-demo-caption { border-block-start: 1px solid #44443c; }
#method-retry { margin-block-end: .8rem; }
#method-dialog .dialog-status:empty { display: none; }

#method-history, .method-annotation {
  padding: .9rem clamp(.6rem, 2.5vw, 1.15rem);
  background: var(--guide-inset);
}

#method-history {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: .75rem;
  border-block: 1px solid #655f52;
  padding-block-end: .3rem;
}
#method-history-title { font-size: 1.45rem; line-height: 1.2; }
#method-history-options { display: flex; align-items: stretch; }
#method-history-options button {
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 .42rem;
  border-block: 1px solid var(--guide-rule);
  border-inline-start: 1px solid var(--guide-rule);
  border-radius: 0;
  color: var(--guide-secondary);
  font-size: 1.03rem;
  font-variant-numeric: tabular-nums;
}
#method-history-options button:last-child { border-inline-end: 1px solid var(--guide-rule); }
#method-history-options button:not(:disabled):hover { background: #37352e; color: var(--guide-type); }
#method-history-options button[aria-pressed="true"] {
  background: var(--guide-type);
  color: var(--guide-inset);
  border-color: var(--guide-type);
}
#method-history-options button:disabled { color: #929186; border-style: dashed; }
#method-history-chart, #method-history-empty, #method-history-move { grid-column: 1 / -1; }
.method-history-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.55rem; margin-block: .95rem .75rem; }
.method-history-legend > div {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: center;
  column-gap: .4rem;
  font-size: 1.12rem;
  line-height: 1.17;
}
.method-history-legend > div::before {
  content: "";
  border-top: 2px solid var(--guide-coral);
}
.method-history-legend > div + div::before { border-color: var(--guide-type); border-top-style: dashed; }
.method-history-legend small { grid-column: 2; color: var(--guide-secondary); font-size: .95rem; font-variant-numeric: tabular-nums; }
.method-history-audio { grid-column: 3; grid-row: 1 / 3; }
.method-history-play {
  display: grid;
  place-items: center;
  position: relative;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0;
  color: var(--guide-type);
}
.method-history-play .play-symbol {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid #817c6e;
  font-size: .72rem;
  line-height: 1;
}
.method-history-play:is(:hover, .is-playing) .play-symbol { color: var(--guide-coral); border-color: currentColor; }
.method-history-play .play-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.method-history-plot {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .28rem .48rem;
  font-size: .96rem;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  color: var(--guide-secondary);
}
.method-history-axis {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: end;
  white-space: nowrap;
}
#method-history-zero-label {
  position: absolute;
  inset-inline-end: 0;
  top: var(--history-zero, 50%);
  transform: translateY(-50%);
}
.method-history-plot svg {
  display: block;
  width: 100%;
  height: clamp(6.4rem, 17vw, 9rem);
  border-block: 1px solid var(--guide-rule);
  border-inline-end: 1px solid #9e998c;
  /* Quarter divisions make intervals readable at every plot width. */
  background: repeating-linear-gradient(90deg, #45453e 0 1px, transparent 1px 25%);
}
.method-history-plot polyline {
  fill: none;
  stroke-width: 2.35px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
#method-history-zero { stroke: #a6a192; vector-effect: non-scaling-stroke; }
#method-history-seed { stroke: var(--guide-coral); }
#method-history-candidate { stroke: var(--guide-type); stroke-width: 1.9px; stroke-dasharray: 5 4; }
.method-history-clock { grid-column: 2; display: flex; justify-content: space-between; gap: .4rem; }
#method-history-end { text-align: end; }
#method-dialog #method-history .method-history-caption { margin-block: .72rem .4rem; font-size: 1.02rem; line-height: 1.47; }
#method-history-summary {
  display: block;
  border-inline-start: 2px solid var(--guide-coral);
  padding-inline-start: .6rem;
  margin-block: .65rem;
  font-size: 1.05rem;
  line-height: 1.47;
}
#method-history-summary:empty { display: none; }
#method-dialog #method-history-empty { margin-block: .8rem; }
.method-jump {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: .4rem;
  min-height: 2.75rem;
  margin: 0;
  padding: .1rem .1rem .1rem 0;
  color: var(--guide-coral);
  font-size: 1.02rem;
}
.method-jump span:first-child { text-decoration: underline; text-underline-offset: .22em; }
.method-jump:hover { color: var(--guide-type); }

.method-annotation figcaption { color: var(--guide-secondary); font-size: .98rem; }
.method-sections, .method-note {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.method-sections { margin-block-start: .65rem; }
.method-sections > span {
  display: grid;
  align-content: center;
  padding: .42rem .45rem;
  border-inline-start: 1px solid #858070;
  border-block-start: 3px solid #858070;
  color: var(--guide-secondary);
  font-size: 1rem;
  line-height: 1.28;
}

.method-sections > :last-child {
  border-color: var(--guide-coral);
  background: #3c3029;
  color: var(--guide-type);
}

.method-note > span {
  grid-column: 3;
  position: relative;
  padding: .6rem 0 0 .8rem;
  color: var(--guide-coral);
  font-size: .94rem;
  line-height: 1.32;
}
.method-note > span::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: .5rem;
  height: 1.1rem;
  border-inline-start: 1px solid currentColor;
  border-block-end: 1px solid currentColor;
}

/* The line connects the three stages of the selection process. */
.method-ranking {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.method-ranking li {
  position: relative;
  min-width: 0;
  padding: .9rem .95rem 0 0;
  border-block-start: 1px solid #858070;
}
.method-ranking li:last-child { padding-inline-end: 0; }
.method-ranking li::before {
  content: "";
  position: absolute;
  inset: -3px auto auto 0;
  height: 5px;
  width: 5px;
  background: var(--guide-coral);
}
.method-ranking h4 {
  margin: 0 0 .35rem;
  color: var(--guide-type);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.32;
}
#method-dialog .method-ranking p { font-size: .99rem; line-height: 1.48; }

.method-credits {
  margin-top: clamp(1.6rem, 4vw, 2.5rem);
  border-block-start: 1px solid var(--guide-rule);
}
.method-credits > summary {
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  padding-block: .7rem;
  color: var(--guide-secondary);
  font-size: 1rem;
  cursor: pointer;
}
.method-credits > summary::marker { color: var(--guide-coral); }
.method-credits .source-link { color: var(--guide-coral); font-size: 1rem; }

#method-dialog :is(button, a, input, summary):focus-visible {
  outline: 2px solid var(--guide-coral);
  outline-offset: 2px;
}

#method-dialog:is(:lang(ko), :lang(ja)) :is(.method-axis, .method-clock, .method-trackline small) { font-size: .78rem; }
#method-dialog:is(:lang(ko), :lang(ja)) .method-axis { padding-inline-end: .1rem; }
#method-dialog:is(:lang(ko), :lang(ja)) :is(.method-trackline button, .method-control label, #method-demo-caption, .method-annotation figcaption, .method-note span, .method-jump) { font-size: .84rem; }
#method-dialog:is(:lang(ko), :lang(ja)) #method-history-title { font-size: 1.02rem; line-height: 1.45; }
#method-dialog:is(:lang(ko), :lang(ja)) #method-history :is(.method-history-caption, #method-history-summary) { font-size: .86rem; line-height: 1.65; }
#method-dialog:is(:lang(ko), :lang(ja)) .method-ranking h4 { font-size: 1rem; }
#method-dialog:is(:lang(ko), :lang(ja)) .method-ranking p { font-size: .88rem; line-height: 1.68; }

@media (max-width: 36rem) {
  #method-dialog { width: calc(100% - 1rem); max-height: 94vh; max-height: 94dvh; }
  #method-example { --axis-width: 2.45rem; }
  .method-ranking { grid-template-columns: 1fr; }
  .method-ranking li, .method-ranking li:last-child {
    padding: 0 0 1rem .85rem;
    border-block-start: 0;
    border-inline-start: 1px solid #858070;
  }
  .method-ranking li:last-child { border-color: transparent; padding-bottom: 0; }
  .method-ranking li::before { inset: .45rem auto auto -3px; }
  .method-ranking h4 { margin-bottom: .15rem; }
}

@media (max-width: 26rem) {
  #method-dialog .dialog-head { padding-block: .4rem; }
  .method-trackline { gap: .3rem .6rem; }
  .method-trackline span[lang] { display: block; margin-inline-start: 0; }
  .method-trackline button { padding-inline: .45rem; }
  .method-control { padding-inline-start: 0; }
  .method-clock { row-gap: .1rem; }
  .method-clock .method-range { line-height: 1.32; }
  .method-range strong { display: block; }
  #method-history { grid-template-columns: minmax(0, 1fr); }
  #method-history-options { margin-block-start: .55rem; }
  .method-history-legend { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .method-sections > span { padding-inline: .25rem; }
}

@media (max-height: 24rem) {
  #method-dialog { max-height: calc(100vh - .5rem); max-height: calc(100dvh - .5rem); }
  #method-dialog .dialog-head { position: static; }
}

@media (forced-colors: active) {
  #method-point { appearance: auto; }
  .method-ranking li::before { background: CanvasText; }
  #method-point::-webkit-slider-thumb { appearance: auto; }
  #method-history-seed, #method-history-candidate { stroke: CanvasText; }
  #method-history-zero { stroke: GrayText; }
  #method-history-options [aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}
