/* ==================================================================
   /tools/word-cloud-generator on the foundation look. A new free tool,
   built 2026-11-21 behind switch tools-word-cloud.

   Layout unique to this page only. The first screen, the guide, the
   questions and the links are the shared tool kit (foundation-tools.css);
   inputs, the range, the select, tabs, the segment, switches, buttons,
   chips and cards are the foundation's and are NOT redrawn here.

   Own parts (prior-art found nothing for them, 2026-11-21): the shape
   picker (.wc-shape), the colour picker (.wc-pal), the cloud stage
   (.wc-stage) and the word rows (.wc-row).
   ================================================================== */

/* ------------------------------------------------------------------
   1. THE FIRST SCREEN
   ------------------------------------------------------------------ */
@media (min-width: 1024px) {
  .wc-top .fnd-tool-top__in { display: block; }
}
.fnd .wc .fnd-tool-lead { max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }
.fnd .wc .fnd-tool-lead .fnd-display,
.fnd .wc .fnd-tool-lead__sub { margin-left: auto; margin-right: auto; text-align: center; }
.fnd .wc .fnd-tool-lead__sub { text-wrap: balance; }
.fnd .wc h1.fnd-display,
.fnd .wc-qa__list summary { text-wrap: balance; }
@media (max-width: 413px) {
  .fnd .wc .fnd-tool-lead .fnd-display { font-size: 2.15rem; }
}

.wc-chips {
  list-style: none; margin: var(--fnd-s4) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--fnd-s2);
}
.wc-chips .fnd-chip { margin: 0; }

/* ------------------------------------------------------------------
   2. THE TOOL: the cloud beside its settings on a computer, the
      settings under the cloud on a phone
   ------------------------------------------------------------------ */
.wc-grid {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: var(--fnd-s4);
  margin-top: var(--fnd-s5);
  max-width: 1160px; margin-left: auto; margin-right: auto;
}
.wc-main, .wc-side { display: flex; flex-direction: column; gap: var(--fnd-s4); min-width: 0; }
@media (min-width: 1024px) {
  .wc-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: var(--fnd-s5); }
}
/* On a tall computer screen the cloud stays in view while the settings scroll past.
   Only when the whole column fits (about 980px plus the header), or Download hides below the edge. */
@media (min-width: 1024px) and (min-height: 1100px) {
  .wc-main { position: sticky; top: 80px; }
}

/* Input: the three ways in */
.fnd .wc-tabs { margin-bottom: var(--fnd-s4); gap: var(--fnd-s3); }
.wc-panel[hidden] { display: none; }
.fnd .wc-text { width: 100%; min-height: 140px; resize: vertical; }
@media (max-width: 479px) { .fnd .wc-text { min-height: 88px; height: 88px; } }
.fnd .wc-clear {
  display: block; margin: 0 0 0 auto; min-height: 44px; padding: 0 var(--fnd-s3);
  border: 0; background: none; cursor: pointer; font: inherit; font-size: var(--fnd-t-meta);
  font-weight: 600; color: var(--fnd-text-soft); text-decoration: underline;
}
.fnd .wc-clear:hover { color: var(--fnd-text); }
.wc-yt__row { display: flex; gap: var(--fnd-s2); align-items: center; }
.wc-yt__row .fnd-input { flex: 1 1 auto; min-width: 0; }
.wc-yt__row .fnd-btn { flex: 0 0 auto; white-space: nowrap; }
.fnd .wc-yt .fnd-label { margin-bottom: var(--fnd-s2); }
.fnd .wc-file { width: 100%; height: auto; padding: var(--fnd-s2) var(--fnd-s3); }
.fnd .wc-in .fnd-help,
.fnd .wc-out .fnd-help { text-wrap: pretty; }
.fnd .wc-note { color: var(--fnd-text-soft); margin: var(--fnd-s3) 0 0; }
.fnd .wc-in .fnd-error { margin: var(--fnd-s3) 0 0; text-wrap: pretty; }
@media (max-width: 479px) {
  .wc-yt__row { flex-direction: column; align-items: stretch; }
  .wc-yt__row .fnd-btn { justify-content: center; }
}

/* Output: the cloud */
.fnd .wc-status { margin: 0 0 var(--fnd-s3); font-size: var(--fnd-t-sm); font-weight: 600; color: var(--fnd-text); text-wrap: pretty; }
.wc-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 260px;
  border: 1px solid var(--fnd-edge); border-radius: 12px;
  overflow: hidden;
  background-color: var(--fnd-card);
}
/* Clear: a checker so the see-through picture can be seen. */
.wc-stage[data-bg="clear"] {
  background-image: repeating-conic-gradient(var(--fnd-paper-2) 0 25%, var(--fnd-card) 0 50%);
  background-size: 20px 20px;
}
.wc-canvas { display: block; max-width: 100%; }
.wc-empty {
  position: absolute; inset: 0; margin: 0; padding: var(--fnd-s5);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: var(--fnd-t-sm); color: #6b6574; text-wrap: balance;
}
.fnd .wc-hint { margin: var(--fnd-s2) 0 var(--fnd-s3); }
.wc-actions { display: flex; flex-wrap: wrap; gap: var(--fnd-s2); }
.wc-actions .fnd-btn { flex: 0 0 auto; }
.wc-actions [hidden] { display: none; }
.fnd .wc-out .fnd-error { margin: var(--fnd-s3) 0 0; text-wrap: pretty; }
@media (max-width: 479px) {
  .wc-actions .fnd-btn { flex: 1 1 calc(50% - var(--fnd-s2)); justify-content: center; white-space: nowrap; padding-left: var(--fnd-s3); padding-right: var(--fnd-s3); }
  .wc-actions #wc-png { flex-basis: 100%; }
}

/* ------------------------------------------------------------------
   3. SETTINGS
   ------------------------------------------------------------------ */
.wc-grp { margin-bottom: var(--fnd-s4); }
.wc-grp:last-child { margin-bottom: 0; }
.fnd .wc-grp .fnd-label { display: block; margin: 0 0 var(--fnd-s2); }
.wc-grp__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--fnd-s2); margin-bottom: var(--fnd-s2); }
.fnd .wc-grp__top .fnd-label { margin: 0; }
.wc-val { font-size: var(--fnd-t-sm); font-weight: 700; color: var(--fnd-text); font-variant-numeric: tabular-nums; }
.fnd .wc-set .fnd-range { width: 100%; height: 44px; }
.fnd .wc-set .fnd-select { width: 100%; }
.fnd .wc-bgnote { margin: calc(var(--fnd-s2) * -1) 0 0; text-wrap: pretty; }

/* Shapes: a small drawing above each name */
.wc-shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--fnd-s2); }
.wc-shape {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 62px; padding: var(--fnd-s2) 4px;
  background: var(--fnd-card); border: 1px solid var(--fnd-edge); border-radius: 10px;
  font: inherit; font-size: var(--fnd-t-meta); font-weight: 600; color: var(--fnd-text-soft);
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease, transform 140ms ease;
}
.wc-shape svg { width: 24px; height: 24px; fill: currentColor; }
.wc-shape:hover { border-color: var(--fnd-text-soft); color: var(--fnd-text); transform: translateY(-1px); }
.wc-shape:focus-visible { outline: 2px solid var(--fnd-text); outline-offset: 2px; }
.wc-shape[aria-pressed="true"] { border-color: var(--fnd-text); background: var(--fnd-paper-2); color: var(--fnd-text); box-shadow: inset 0 0 0 1px var(--fnd-text); }

/* Segments: full width, three even parts */
.fnd .wc-seg { display: flex; width: 100%; }
.fnd .wc-seg button { flex: 1 1 0; min-width: 0; padding: 6px var(--fnd-s1); white-space: normal; line-height: 1.2; text-wrap: balance; }

/* Colours: a strip of dots, then the name */
.wc-pals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fnd-s2); }
.wc-pal {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 44px; padding: var(--fnd-s2) var(--fnd-s3);
  background: var(--fnd-card); border: 1px solid var(--fnd-edge); border-radius: 10px;
  font: inherit; font-size: var(--fnd-t-meta); font-weight: 600; color: var(--fnd-text-soft); text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease, transform 140ms ease;
}
.wc-pal:hover { border-color: var(--fnd-text-soft); color: var(--fnd-text); transform: translateY(-1px); }
.wc-pal:focus-visible { outline: 2px solid var(--fnd-text); outline-offset: 2px; }
.wc-pal[aria-pressed="true"] { border-color: var(--fnd-text); background: var(--fnd-paper-2); color: var(--fnd-text); box-shadow: inset 0 0 0 1px var(--fnd-text); }
.wc-pal__sw { display: flex; gap: 3px; padding: 3px 4px; border-radius: 6px; }
.wc-pal__sw i { display: block; width: 14px; height: 14px; border-radius: 50%; }

.wc-grp--two { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fnd-s4); }
@media (min-width: 480px) and (max-width: 1023px) {
  .wc-grp--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.fnd .wc-h { margin: 0 0 var(--fnd-s3); }
.wc-sw { list-style: none; margin: 0 0 var(--fnd-s4); padding: 0; display: flex; flex-direction: column; gap: var(--fnd-s3); }
.wc-sw__t { display: inline-flex; flex-direction: column; gap: 2px; font-size: var(--fnd-t-sm); font-weight: 600; color: var(--fnd-text); }
.wc-sw__d { font-size: var(--fnd-t-meta); font-weight: 400; color: var(--fnd-text-soft); text-wrap: pretty; }
.fnd .wc-set .fnd-help { text-wrap: pretty; }

/* ------------------------------------------------------------------
   4. TOP WORDS
   ------------------------------------------------------------------ */
.wc-words__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--fnd-s2); margin-bottom: var(--fnd-s3); }
.fnd .wc-words__head .wc-h { margin: 0; }
.wc-list-head, .wc-row__in {
  display: grid; grid-template-columns: minmax(0, 1fr) 56px 44px; align-items: center; gap: var(--fnd-s2);
}
.wc-list-head {
  padding: 0 var(--fnd-s2) var(--fnd-s1);
  font-size: var(--fnd-t-meta); font-weight: 600; color: var(--fnd-text-soft);
  border-bottom: 1px solid var(--fnd-rule);
  margin-bottom: var(--fnd-s1);
}
.wc-list-head span:nth-child(2) { text-align: right; }
.wc-list-head span:nth-child(3) { text-align: center; }
.wc-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.wc-row { border-bottom: 1px solid var(--fnd-rule); }
.wc-row__in { min-height: 44px; padding: 0 var(--fnd-s2); cursor: pointer; transition: background 140ms ease; }
.wc-row__in:hover { background: var(--fnd-paper-2); }
.wc-row__in:focus-within { background: var(--fnd-paper-2); }
.wc-row__w { font-size: var(--fnd-t-sm); font-weight: 600; color: var(--fnd-text); overflow-wrap: anywhere; }
.wc-row__n { font-size: var(--fnd-t-sm); color: var(--fnd-text-soft); text-align: right; font-variant-numeric: tabular-nums; }
.wc-row__in input { justify-self: center; width: 20px; height: 20px; margin: 0; accent-color: var(--fnd-text); cursor: pointer; }
.wc-row--off .wc-row__w, .wc-row--off .wc-row__n { text-decoration: line-through; opacity: .55; }
.fnd .wc-list-empty { margin: var(--fnd-s3) 0 0; }
.wc-list-empty[hidden] { display: none; }

/* ------------------------------------------------------------------
   5. THE OLD MAKERS, THE QUESTIONS
   ------------------------------------------------------------------ */
.fnd .wc-guide .fnd-tool-guide__in { display: block; }
.fnd .wc-guide .fnd-tool-read { max-width: 760px; margin-left: auto; margin-right: auto; }
.fnd .wc-guide p { text-wrap: pretty; }

/* ------------------------------------------------------------------
   6. PRINT: only the picture
   ------------------------------------------------------------------ */
.wc-printsheet { display: none; }
@media print {
  /* The sheet is moved directly under body on Print; everything else is
     removed from layout so only one page prints. */
  .wc-printing body > *:not(.wc-printsheet) { display: none !important; }
  .wc-printing .wc-printsheet { display: block; }
  .wc-printing .wc-printsheet img { display: block; max-width: 100%; max-height: 95vh; width: auto; height: auto; margin: 0 auto; }
}

/* Three tabs have to fit a 375px phone without sliding. */
@media (max-width: 413px) {
  .fnd .wc-tabs { gap: var(--fnd-s2); justify-content: space-between; }
  .fnd .wc-tabs .fnd-tab { font-size: 13px; }
}
.wc-chips .fnd-chip { white-space: nowrap; }
.fnd .wc .fnd-tool-links p { text-wrap: balance; }
.fnd .wc-qa__list p { text-wrap: pretty; }
#wc-csv { text-wrap: balance; }
