/* context.css - the "Context" section (sidebar), its add flow, and the context item page (middle).
   Everything is scoped to .cw-ctx-* classes. Tokens come from css/base.css. */

/* ---------- shared bits ---------- */

.cw-ctx-ico {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.cw-ctx-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--cw-muted);
}

.cw-ctx-mark--big,
.cw-ctx-mark--big .cw-ctx-ico {
  width: 24px;
  height: 24px;
}

.cw-ctx-muted {
  color: var(--cw-muted);
}

.cw-ctx-code {
  flex: none;
  min-width: 2.6em;
  color: var(--cw-muted);
  font-variant-numeric: tabular-nums;
}

.cw-ctx-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-ctx-time {
  flex: none;
  color: var(--cw-muted);
  font-size: var(--cw-fs-sm);
  white-space: nowrap;
}

.cw-ctx-relmark {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--cw-accent);
}

.cw-ctx-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 10px;
  height: 10px;
}

.cw-ctx-caret::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--cw-muted);
  transition: transform 0.12s ease;
}

[aria-expanded="true"] > .cw-ctx-caret::before {
  transform: rotate(90deg);
}

.cw-ctx-linkbtn {
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--cw-accent);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.cw-ctx-linkbtn:hover {
  text-decoration: underline;
}

.cw-ctx-more {
  display: block;
  width: 100%;
  min-height: 22px;
  margin: 0;
  padding: 2px var(--cw-pad-3);
  border: 0;
  background: none;
  color: var(--cw-accent);
  font: inherit;
  font-size: var(--cw-fs-sm);
  text-align: left;
  cursor: pointer;
}

.cw-ctx-more:hover {
  text-decoration: underline;
}

.cw-ctx-more--inner {
  padding-left: 22px;
}

.cw-ctx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid var(--cw-border-strong);
  border-radius: var(--cw-radius);
  background: var(--cw-surface);
  color: var(--cw-text);
  font: inherit;
  font-size: var(--cw-fs);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.cw-ctx-btn:hover {
  background: var(--cw-surface-2);
}

.cw-ctx-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.cw-ctx-btn--primary {
  border-color: var(--cw-accent);
  background: var(--cw-accent);
  color: #ffffff;
}

.cw-ctx-btn--primary:hover {
  background: var(--cw-accent);
  filter: brightness(0.92);
}

.cw-ctx-btn--quiet {
  border-color: transparent;
  background: none;
  color: var(--cw-muted);
}

.cw-ctx-btn--quiet:hover {
  border-color: var(--cw-border);
  background: none;
  color: var(--cw-danger);
}

.cw-ctx-btn--wide {
  width: 100%;
}

.cw-ctx-section button:focus-visible,
.cw-ctx-add button:focus-visible,
.cw-ctx-item button:focus-visible,
.cw-ctx-item a:focus-visible,
.cw-ctx-q:focus-visible {
  outline: 2px solid var(--cw-accent);
  outline-offset: -2px;
}

/* ---------- sidebar section ---------- */

.cw-ctx-section {
  padding-bottom: var(--cw-pad);
  font-size: var(--cw-fs);
  line-height: var(--cw-lh);
}

.cw-ctx-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px var(--cw-pad-3) 3px;
  overflow: hidden;
  color: var(--cw-muted);
  font-size: var(--cw-fs-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Private drop area: counts per person only */
.cw-ctx-private::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cw-muted);
}

.cw-ctx-thanks {
  margin: 2px var(--cw-pad-3) 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--cw-accent-weak);
  color: var(--cw-accent);
  font-weight: 600;
}

.cw-ctx-total {
  padding: 2px var(--cw-pad-3);
  font-weight: 600;
}

.cw-ctx-you {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 0 var(--cw-pad-3) 4px;
  color: var(--cw-accent);
  font-weight: 600;
}

.cw-ctx-people {
  margin: 0;
  padding: 0 0 2px;
  list-style: none;
}

.cw-ctx-prow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 1px var(--cw-pad-3);
}

.cw-ctx-prow .cw-ctx-gname {
  font-weight: 500;
}

.cw-ctx-prow.is-me {
  background: var(--cw-accent-weak);
  box-shadow: inset 3px 0 0 var(--cw-accent);
}

.cw-ctx-prow.is-me .cw-ctx-gname,
.cw-ctx-prow.is-me .cw-ctx-gcount {
  color: var(--cw-accent);
  font-weight: 700;
}

.cw-ctx-privactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cw-ctx-empty {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 4px var(--cw-pad-3);
  color: var(--cw-muted);
}

.cw-ctx-ghead {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 26px;
  padding: 2px var(--cw-pad-3);
  border: 0;
  background: none;
  color: var(--cw-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cw-ctx-ghead:hover,
.cw-ctx-row:hover,
.cw-ctx-result:hover {
  background: rgba(27, 31, 36, 0.05);
}

.cw-ctx-gname {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-ctx-gcount {
  flex: none;
  min-width: 1.4em;
  color: var(--cw-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cw-ctx-group.has-active > .cw-ctx-ghead .cw-ctx-gname {
  color: var(--cw-accent);
}

.cw-ctx-gbody {
  padding-bottom: 2px;
}

.cw-ctx-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 28px;
  padding: 2px var(--cw-pad-3) 2px 22px;
  border: 0;
  background: none;
  color: var(--cw-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cw-ctx-row.is-related {
  box-shadow: inset 2px 0 0 var(--cw-accent);
}

.cw-ctx-row.is-related .cw-ctx-mark {
  color: var(--cw-accent);
}

.cw-ctx-row.is-active,
.cw-ctx-row.is-active:hover {
  background: var(--cw-accent-weak);
  box-shadow: inset 3px 0 0 var(--cw-accent);
}

.cw-ctx-row.is-active .cw-ctx-title {
  font-weight: 600;
}

/* ---------- add flow (its own page in the middle, #/c/new) ---------- */

.cw-ctx-add {
  margin: 2px var(--cw-pad-3) 6px;
  padding: var(--cw-pad-2);
  border: 1px solid var(--cw-border-strong);
  background: var(--cw-surface);
  color: var(--cw-text);
  font-size: var(--cw-fs);
  line-height: var(--cw-lh);
}

.cw-ctx-add.is-page {
  max-width: 560px;
  margin: 8px 0 0;
  padding: 10px 12px 0;
  font-size: var(--cw-fs-page);
}

.cw-ctx-lead {
  margin: 0 0 4px;
}

.cw-ctx-add.is-page .cw-ctx-choice {
  min-height: 52px;
  margin-top: 6px;
  padding: 8px 10px;
}

.cw-ctx-add.is-page textarea {
  min-height: 120px;
}

/* Save and Cancel stay in view at the bottom while the page scrolls. */
.cw-ctx-add.is-page .cw-ctx-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 12px -12px 0;
  padding: 8px 12px;
  border-top: 1px solid var(--cw-border);
  background: var(--cw-surface);
}

.cw-ctx-add.is-page .cw-ctx-btn {
  min-height: 36px;
  padding: 4px 16px;
}

.cw-ctx-sublabel {
  padding: 8px var(--cw-pad-3) 2px;
}

.cw-ctx-group.is-used > .cw-ctx-ghead .cw-ctx-gname {
  color: var(--cw-accent);
}

.cw-ctx-fileref {
  margin-top: 12px;
  font-size: var(--cw-fs-sm);
}

.cw-ctx-float {
  position: fixed;
  top: 64px;
  left: 50%;
  z-index: 1000;
  max-height: calc(100vh - 96px);
  overflow: auto;
  transform: translateX(-50%);
  background: var(--cw-surface);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.cw-ctx-addhead {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
}

.cw-ctx-addtitle {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.cw-ctx-backbtn {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cw-text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.cw-ctx-backbtn:hover .cw-ctx-chev {
  color: var(--cw-accent);
}

.cw-ctx-chev {
  color: var(--cw-muted);
  font-size: 16px;
  line-height: 1;
}

.cw-ctx-x {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  color: var(--cw-muted);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.cw-ctx-x:hover {
  border-color: var(--cw-border);
  color: var(--cw-text);
}

.cw-ctx-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid var(--cw-border);
  background: var(--cw-surface);
  color: var(--cw-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cw-ctx-choice:hover,
.cw-ctx-choice:focus-visible {
  border-color: var(--cw-accent);
  background: var(--cw-accent-weak);
}

.cw-ctx-choice-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.cw-ctx-choice-title {
  font-weight: 600;
}

.cw-ctx-choice-sub {
  overflow: hidden;
  color: var(--cw-muted);
  font-size: var(--cw-fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-ctx-form {
  margin: 0;
}

.cw-ctx-field {
  margin-top: 6px;
}

.cw-ctx-field > label,
.cw-ctx-label {
  display: block;
  margin-bottom: 2px;
  color: var(--cw-muted);
  font-size: var(--cw-fs-sm);
  font-weight: 600;
}

.cw-ctx-add input:not([type="file"]),
.cw-ctx-add textarea,
.cw-ctx-editform input,
.cw-ctx-editform textarea {
  display: block;
  width: 100%;
  min-height: 28px;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid var(--cw-border-strong);
  border-radius: var(--cw-radius);
  background: var(--cw-surface);
  color: var(--cw-text);
  font: inherit;
}

.cw-ctx-add textarea,
.cw-ctx-editform textarea {
  min-height: 64px;
  line-height: 1.4;
  resize: vertical;
}

.cw-ctx-add input:focus,
.cw-ctx-add textarea:focus,
.cw-ctx-editform input:focus,
.cw-ctx-editform textarea:focus {
  border-color: var(--cw-accent);
  outline: 1px solid var(--cw-accent);
  outline-offset: 0;
}

.cw-ctx-fileinput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.cw-ctx-help {
  margin-top: 2px;
  color: var(--cw-muted);
  font-size: var(--cw-fs-sm);
}

.cw-ctx-help:empty {
  display: none;
}

.cw-ctx-extras {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 6px;
}

.cw-ctx-extras > .cw-ctx-field {
  align-self: stretch;
  margin-top: 0;
}

.cw-ctx-fromline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.cw-ctx-fromline b {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-ctx-error {
  margin-top: 6px;
  color: var(--cw-danger);
  font-size: var(--cw-fs-sm);
}

.cw-ctx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cw-ctx-filecard {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--cw-border);
  background: var(--cw-surface-2);
}

.cw-ctx-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--cw-border);
  object-fit: cover;
}

.cw-ctx-filemeta {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.cw-ctx-filename {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Workflow picker */

.cw-ctx-pick {
  min-width: 0;
}

.cw-ctx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.cw-ctx-chips:empty {
  display: none;
}

.cw-ctx-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 22px;
  padding: 0 0 0 4px;
  border: 1px solid var(--cw-border);
  background: var(--cw-accent-weak);
  font-size: var(--cw-fs-sm);
}

.cw-ctx-chip .cw-ctx-code {
  min-width: 0;
}

.cw-ctx-chiptitle {
  min-width: 0;
  max-width: 14em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-ctx-chipx {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cw-muted);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.cw-ctx-chipx:hover {
  color: var(--cw-danger);
}

.cw-ctx-results {
  max-height: 200px;
  margin-top: 2px;
  overflow: auto;
  border: 1px solid var(--cw-border);
  background: var(--cw-surface);
}

.cw-ctx-results:empty {
  display: none;
}

.cw-ctx-results .cw-ctx-help {
  margin: 0;
  padding: 3px 6px;
}

.cw-ctx-result {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 26px;
  padding: 3px 6px;
  border: 0;
  border-bottom: 1px solid var(--cw-border);
  background: none;
  color: var(--cw-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cw-ctx-result:last-child {
  border-bottom: 0;
}

.cw-ctx-result:focus-visible {
  background: var(--cw-accent-weak);
}

/* ---------- item page (middle) ---------- */

.cw-ctx-item {
  padding-bottom: 56px;
  color: var(--cw-text);
  font-size: var(--cw-fs-page);
  line-height: 1.5;
}

.cw-ctx-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 28px;
  margin-bottom: 6px;
  font-size: var(--cw-fs);
}

.cw-ctx-back {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 8px;
  border: 1px solid var(--cw-border);
  background: var(--cw-surface);
  color: var(--cw-text);
  font: inherit;
  cursor: pointer;
}

.cw-ctx-back:hover {
  border-color: var(--cw-border-strong);
}

.cw-ctx-crumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  color: var(--cw-muted);
  white-space: nowrap;
}

.cw-ctx-crumb {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: none;
  color: var(--cw-muted);
  font: inherit;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.cw-ctx-crumb:hover {
  color: var(--cw-accent);
  text-decoration: underline;
}

.cw-ctx-crumb.is-plain,
.cw-ctx-crumb.is-plain:hover {
  color: var(--cw-text);
  text-decoration: none;
  cursor: default;
}

.cw-ctx-sep {
  flex: none;
  color: var(--cw-border-strong);
}

.cw-ctx-sep--comma {
  margin-left: -5px;
  color: var(--cw-muted);
}

.cw-ctx-h1 {
  margin: 4px 0;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cw-ctx-editing {
  margin-top: 4px;
  color: var(--cw-muted);
  font-size: var(--cw-fs-sm);
  font-weight: 600;
}

.cw-ctx-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  margin-bottom: 10px;
  color: var(--cw-muted);
  font-size: var(--cw-fs);
}

.cw-ctx-meta b {
  color: var(--cw-text);
  font-weight: 600;
}

.cw-ctx-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid var(--cw-border);
  background: var(--cw-surface-2);
  color: var(--cw-text);
}

.cw-ctx-ref {
  padding: 0 4px;
  border: 1px solid var(--cw-border);
  background: var(--cw-surface);
  color: var(--cw-text);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: var(--cw-fs-sm);
}

.cw-ctx-photo {
  margin: 0 0 10px;
}

/* Fits the width; tall (portrait) photos stop at about half the screen so the text below stays
   in reach. A click opens the full-size photo. */
.cw-ctx-photo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(60vh, 640px);
  border: 1px solid var(--cw-border);
  background: var(--cw-surface);
  cursor: zoom-in;
}

.cw-ctx-bodylabel {
  margin: 0 0 2px;
  color: var(--cw-muted);
  font-size: var(--cw-fs-sm);
  font-weight: 600;
}

.cw-ctx-photo figcaption {
  margin-top: 2px;
  font-size: var(--cw-fs-sm);
}

.cw-ctx-photo figcaption a {
  color: var(--cw-accent);
}

.cw-ctx-body {
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--cw-border);
  background: var(--cw-surface);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.cw-ctx-linkwrap {
  margin-bottom: 10px;
}

.cw-ctx-embed {
  position: relative;
  width: 100%;
  margin-bottom: 4px;
  padding-top: 56.25%;
  background: #000000;
}

.cw-ctx-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cw-ctx-linkcard {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--cw-border);
  background: var(--cw-surface);
  color: var(--cw-text);
  text-decoration: none;
}

.cw-ctx-linkcard:hover {
  border-color: var(--cw-accent);
}

.cw-ctx-linkhost {
  flex: none;
  font-weight: 600;
}

.cw-ctx-linkurl {
  min-width: 0;
  overflow: hidden;
  color: var(--cw-muted);
  font-size: var(--cw-fs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cw-ctx-filewrap {
  margin-bottom: 10px;
}

.cw-ctx-filecard--item {
  padding: 8px;
  background: var(--cw-surface);
}

.cw-ctx-player {
  display: block;
  width: 100%;
  max-height: 420px;
  margin-bottom: 4px;
}

video.cw-ctx-player {
  background: #000000;
}

.cw-ctx-block {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--cw-border);
}

.cw-ctx-blockhead {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: var(--cw-fs);
  font-weight: 600;
}

.cw-ctx-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--cw-border-strong);
  color: var(--cw-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: help;
}

.cw-ctx-none {
  font-size: var(--cw-fs);
}

.cw-ctx-wflist {
  border: 1px solid var(--cw-border);
  background: var(--cw-surface);
}

.cw-ctx-wfrow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 3px 8px;
  border-bottom: 1px solid var(--cw-border);
  color: var(--cw-text);
  text-decoration: none;
}

.cw-ctx-wfrow:last-child {
  border-bottom: 0;
}

.cw-ctx-wfrow:hover {
  background: var(--cw-accent-weak);
}

.cw-ctx-wfrow.is-missing .cw-ctx-title {
  color: var(--cw-muted);
}

.cw-ctx-tag {
  flex: none;
  padding: 0 4px;
  border: 1px solid var(--cw-border);
  color: var(--cw-muted);
  font-size: var(--cw-fs-sm);
}

.cw-ctx-block > .cw-ctx-more {
  padding-left: 0;
}

.cw-ctx-actions--item {
  margin-top: 12px;
}

.cw-ctx-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 28px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--cw-text);
  font: inherit;
  font-size: var(--cw-fs);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.cw-ctx-toggle:hover {
  color: var(--cw-accent);
}

.cw-ctx-histbody {
  padding-top: 4px;
  font-size: var(--cw-fs);
}

.cw-ctx-editform textarea {
  font-size: var(--cw-fs-page);
}

/* ---------- phones and tablets ---------- */

@media (max-width: 1023px) {
  .cw-ctx-ghead,
  .cw-ctx-row,
  .cw-ctx-result,
  .cw-ctx-wfrow,
  .cw-ctx-choice,
  .cw-ctx-toggle {
    min-height: var(--cw-tap);
  }

  .cw-ctx-btn,
  .cw-ctx-back,
  .cw-ctx-backbtn,
  .cw-ctx-more {
    min-height: var(--cw-tap);
  }

  .cw-ctx-x,
  .cw-ctx-chipx {
    width: var(--cw-tap);
    height: var(--cw-tap);
  }

  .cw-ctx-linkbtn {
    min-height: var(--cw-tap);
  }

  .cw-ctx-photo figcaption a {
    display: inline-flex;
    align-items: center;
    min-height: var(--cw-tap);
  }

  /* 16px stops phones from zooming in when a field gets focus. */
  .cw-ctx-add input:not([type="file"]),
  .cw-ctx-add textarea,
  .cw-ctx-editform input,
  .cw-ctx-editform textarea,
  .cw-ctx-pick input {
    font-size: 16px;
  }
}
