/* The Make page. Tokens, pills, segments, frames and menus come from board.css. */

.make__head { display: grid; gap: 16px; padding: 24px 0 8px; }

/* The brief: what the site is for, who writes it, and the one button. */

.make__form { display: grid; gap: 12px; max-width: 720px; }
.make__form .block__label { margin: 8px 0 0; }
.make__ways { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.make__ways legend { padding: 0 0 12px; }
.make__key { display: grid; gap: 12px; }
.make__key-row { display: flex; flex-wrap: wrap; gap: 8px; }
.make__key-row .account__field { flex: 1 1 240px; width: auto; }
.make__remember { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.make__remember input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.make__form > [data-account-link] { justify-self: start; }
.make__go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.make__notice { padding: 12px 0; border-top: var(--rule); border-bottom: var(--rule); font-size: 15px; }
.make__notice a { text-decoration: underline; text-underline-offset: 3px; }
.make .pill:disabled { opacity: 0.4; cursor: default; }
.make .pill:disabled:hover { background: var(--surface-strong); color: var(--ink); }
.make .pill--dark:disabled:hover { background: var(--accent); color: var(--on-accent); opacity: 0.4; }
.make .pill--quiet:disabled:hover { background: transparent; color: var(--muted); }
.make .pill[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.make a.pill:not([href]) { display: none; }

/* A word to pick: a way to write, a style tag, the style's own colours. */

.make__way, .make__chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: var(--rule);
  background: var(--page);
  font: 400 12px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.make__way { position: relative; }
.make__way input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.make__way:hover, .make__chip:hover { background: var(--surface); }
.make__way:has(input:checked), .make__chip[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.make__way:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The look: the styles that make the page, its colours, and the page itself, one ruled row each. */

.make__look, .make__saved, .make__choose, .make__suggested { padding-top: 40px; }
.make__row { display: grid; gap: 10px 16px; padding: 12px 0 16px; border-top: var(--rule); }
.make__label { font: 400 12px/1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.make__row-body { display: grid; gap: 12px; min-width: 0; }
.make__styles { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.make__style { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.make__style-view, .make__card-view { display: block; box-shadow: 0 0 0 1px var(--ink); }
.make__thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--surface); }
.make__style-title, .make__card-title { margin: 0; font: 700 22px/1.05 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.make__style-title a:hover, .make__card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.make__style-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.make__leads { display: inline-flex; align-items: center; min-height: 44px; padding-right: 8px; font: 400 12px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.make__reasons { padding-top: 6px; font: 400 11px/1.4 var(--mono); letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.make__reasons:empty { display: none; }

.make__palettes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.make__swatch { flex: none; width: 56px; height: 44px; padding: 0; border: var(--rule); cursor: pointer; }
.make__own { flex: none; width: 56px; height: 44px; padding: 0; border: var(--rule); background: var(--surface); cursor: pointer; }
.make__swatch[aria-pressed="true"], .make__own[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.make__own:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.frame iframe[data-loading] { position: absolute; top: 0; left: 0; visibility: hidden; }
.make__swatch:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.make__state { display: grid; gap: 12px; min-width: 0; }
.make__placeholder { max-width: 62ch; font-size: 15px; color: var(--muted); }
.make__writing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 15px; }
.make__pulse { flex: none; width: 10px; height: 10px; background: var(--accent); animation: make-pulse 1.2s var(--ease) infinite alternate; }
.make__elapsed { font: 400 12px/1 var(--mono); color: var(--muted); }
.make__row-body > .segment { justify-self: start; }

@keyframes make-pulse {
  from { opacity: 1; }
  to { opacity: 0.15; }
}

/* Choosing the style yourself: words to pick, rounds to vote on, saved styles, and the styles that fit. */

.make__hint { max-width: 560px; padding-bottom: 16px; color: var(--muted); }
.make__facets { border-bottom: 1px solid var(--line); }
.make__facet { border-top: 1px solid var(--line); }
.make__question { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 15px; list-style: none; cursor: pointer; }
.make__question::-webkit-details-marker { display: none; }
.make__question::after { content: "+"; margin-left: auto; padding: 0 4px; font-family: var(--mono); }
.make__facet[open] > .make__question::after { content: "\2212"; }
.make__picked { font: 400 11px/1.3 var(--mono); letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.make__chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; }
.make__more > summary { margin: 12px 0; list-style: none; cursor: pointer; }
.make__more > summary::-webkit-details-marker { display: none; }
.make__more > summary::after { content: "+"; font-family: var(--mono); }
.make__more[open] > summary::after { content: "\2212"; }
.make__choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wall-gap); }
.make__choice { display: block; min-width: 0; padding: 0; border: 0; background: none; box-shadow: 0 0 0 1px var(--ink); transition: box-shadow var(--fast) var(--ease); }
.make__choice:hover { box-shadow: 0 0 0 3px var(--accent); }
.make__choice:disabled { opacity: 0.4; cursor: default; }
.make__actions { margin-top: 20px; }
.make__cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px var(--wall-gap); }
.make__cards:not(:empty) { padding-bottom: 24px; }
.make__cards--small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px var(--wall-gap); }
.make__card { display: grid; align-content: start; gap: 10px; min-width: 0; }
.make__card .make__reasons { padding-top: 0; }
.make__cards--small .make__card-title { font-size: 16px; letter-spacing: -0.02em; }
.make__cards--small .pill { padding: 0 12px; }

@media (min-width: 600px) {
  .make__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .make__cards--small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .make__style { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .make__style-actions { grid-column: auto; justify-content: flex-end; }
  .make__row { grid-template-columns: 88px minmax(0, 1fr); }
  .make__label { padding-top: 4px; }
}

@media (min-width: 900px) {
  .make__head { padding-top: 40px; }
  .make__facets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; align-items: start; }
  .make__choices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .make__cards--small { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .make__cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .make__cards--small { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* On a wide screen the look stands beside the brief, so one screen holds what was asked and what came back. */

@media (min-width: 1100px) {
  .make { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 48px; align-items: start; }
  .make__head, .make__saved, .make__choose, .make__suggested { grid-column: 1 / -1; }
  .make__form { grid-area: 2 / 1; }
  .make__look { grid-area: 2 / 2; padding-top: 16px; }
  .make__row-body:has(> .segment) { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  .make__pulse { animation: none; }
}
