/* Spiral Gallery */

.content {
  max-width: 1260px;
}

/* the themes size every svg like an icon; the drawings opt out, same as
   common.css does for .plain */
svg.ruler,
svg.rbar {
  display: block;
  width: 100%;
  height: auto;
  fill: none;
  cursor: default;
}
svg.ruler:hover,
svg.rbar:hover {
  fill: none;
}

/* ---------------------------------------------------------------- controls */

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 28px;
  align-items: start;
}
.tool.wide {
  grid-column: span 2;
}
.tool h3 {
  margin: 0 0 10px;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  font-weight: normal;
}
.tools .ctl {
  margin-bottom: 10px;
}
.tools .chips {
  margin-bottom: 10px;
}
.chips.picks button {
  padding: 5px 10px;
  font-size: 0.9em;
  opacity: 0.5;
}
.chips.picks button[aria-pressed="true"] {
  opacity: 1;
}
.chips.picks .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

/* ---------------------------------------------------------------- the gallery */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  align-items: start;
  margin: 0 0 24px;
}
.card {
  box-sizing: border-box;
  background-color: var(--card-bg);
  border: 3px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px 14px;
}
.card-head {
  margin: 0 0 10px;
}
.card-head h3 {
  margin: 0;
  font-size: 1.05em;
  font-weight: bold;
  color: var(--card-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .eq {
  font-size: 0.78em;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.card .canvas-box {
  border-width: 2px;
}
.card .rulecap {
  font-size: 0.7em;
  opacity: 0.6;
  margin: 1px 0 0;
  text-align: center;
}
.card .ruler {
  margin-top: 6px;
}
.nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
  margin: 12px 0 10px;
  font-size: 0.78em;
}
.nums .k {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
  font-size: 0.85em;
}
.nums .v {
  color: var(--card-strong);
  font-variant-numeric: tabular-nums;
}
.card .note {
  font-size: 0.82em;
  margin: 0;
}
.card .found {
  font-size: 0.76em;
  opacity: 0.75;
  margin: 10px 0 0;
  line-height: 1.4;
}
.card .found span {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85em;
  opacity: 0.75;
  margin-right: 4px;
}

/* ---------------------------------------------------------------- the overlay */

#overlay .stage {
  max-width: 640px;
}
#overlay .stage .note {
  margin-top: 10px;
}
.rrow {
  margin: 0 0 10px;
}
.rname {
  display: block;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1px;
}

/* ---------------------------------------------------------------- the table */

.tablebox {
  overflow-x: auto;
  margin: 0 0 10px;
}
.omg-table {
  font-size: 0.85em;
  min-width: 760px;
}
.omg-table th {
  white-space: nowrap;
}
.omg-table .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.omg-table .eqc {
  white-space: nowrap;
  opacity: 0.85;
}
.tablenote {
  max-width: 900px;
  margin: 0 0 30px;
}
.layout.info .note {
  font-size: 0.9em;
}

/* ---------------------------------------------------------------- drawn in */

#app.anim .canvas-box svg path.curve {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: sg-draw 1.6s ease-out forwards;
}
#app.anim .canvas-box svg g.art {
  animation: sg-fade 1.8s ease-out forwards;
}
@keyframes sg-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes sg-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  #app.anim .canvas-box svg path.curve,
  #app.anim .canvas-box svg g.art {
    animation: none;
    stroke-dashoffset: 0;
  }
}

@media only screen and (max-width: 700px) {
  .tool.wide {
    grid-column: span 1;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
