/* Barn Application and Barn Raising and the place pages, opened in place over the island. W8 (owner, 11 Nov: "pages like a normal page; less scrolling"): on a
   screen 901 px wide and up the page spans the free area right of the sidebar with 16 px margins (all of it from 901 to 1199 px; from 1200 px up at most 1280 px,
   centred in it), so the island shows around it; on a phone (900 px and less) it is a sheet that fills the screen under the bar. A bar at the top goes back to the island. */

.mode-root[hidden] { display: none; }
body[data-mode] #tabs, body[data-mode] .hint, body[data-mode] .enter,
body[data-mode] #labels, body[data-mode] .panel, body[data-mode] .ticker { display: none; }
.mode-bar {
  position: fixed; z-index: 6; top: calc(16px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
}
.mode-back {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--paper-solid); font: 600 13.5px var(--body); box-shadow: var(--shadow);
  transition: transform 0.2s, background 0.2s;
}
@media (hover: hover) { .mode-back:hover { background: #3d3025; transform: translateY(-1px); } }
.mode-back span { transition: transform 0.2s; }
@media (hover: hover) { .mode-back:hover span { transform: translateX(-3px); } }
/* W10: the room the top bar's right-hand controls take (sound, bell with its count badge, Live ledger, the wallet chip, their gaps, the 16 px margin and the 12 px gap to the
   mode bar). W9 held a constant of 460 px; the real group was 465 px at 901 px, so the page pill covered Sound. It is now MEASURED (src/core/barRight.js sets --bar-right on the
   root on a resize and when a control changes size, never per frame), and what is here is the fallback until the first measure: an upper bound, because the wallet chip is capped
   (chain.css: 210 px up to 1099 px, 300 px from 1100 px): 40 + 40 + 105 + chip + 3 x 12 + 16 + 12, with 11 and 10 px to spare. 901 px and up: the mode bar is a box from its left edge to --bar-right, so it
   can never be wider than the room that is left; Back to the island gives way (it clips) before it could reach a control, the pill is cut with an ellipsis and, when less than
   320 px is left (Back's 167 px, the 8 px gap and a pill of at least 140 px), it is left out: a pill that is only a dot shows nothing, and the page's title names the page. */
:root { --bar-right: 470px; --back-w: 180px; }
@media (min-width: 1100px) { :root { --bar-right: 560px; } }
.mode-back { flex: none; }
.phase-pill { min-width: 16px; } /* W11: the least the pill's CONTENT can be, the dot (8) and the gap (8), so the pill is never under 44 px (14 + 14 padding; the boxes are content-box): with 0 the dot and the gap stood out of a 28 px box, onto the next control (VW8) */
.phase-pill > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-pill > i { flex: none; }

.phase-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
}
.phase-pill i { width: 8px; height: 8px; border-radius: 50%; background: #3f8a3c; box-shadow: 0 0 0 0 rgba(63, 138, 60, 0.5); animation: live 2s ease-out infinite; }
.phase-pill.off i { background: #b9ae9c; box-shadow: none; animation: none; }
@keyframes live { 70%, 100% { box-shadow: 0 0 0 8px rgba(63, 138, 60, 0); } }

.apply {
  position: fixed; z-index: 6;
  top: calc(78px + env(safe-area-inset-top, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  width: min(440px, calc(100vw - 32px));
  display: flex; pointer-events: none;
}
.apply-card {
  pointer-events: auto; position: relative;
  box-sizing: border-box; width: 100%; max-height: 100%; margin-top: auto; overflow-y: auto; /* the padding inside the frame: the last line stays on screen */
  display: flex; flex-direction: column; gap: 18px;
  padding: 26px 26px 18px; border-radius: 24px;
  background: var(--paper-solid);
  box-shadow: 0 24px 70px rgba(60, 35, 10, 0.3), 0 0 0 1px rgba(42, 32, 24, 0.05);
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.85, 0.2, 1);
}
.mode-root.ready .apply-card { opacity: 1; transform: none; }
.apply[hidden] { display: none; }
.apply-card > * { flex: none; }

.progress { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.progress[hidden] { display: none; }
.progress li {
  flex: 1; display: flex; flex-direction: column; gap: 7px;
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.progress li::before { content: ""; height: 4px; border-radius: 4px; background: rgba(42, 32, 24, 0.1); transition: background 0.4s; }
.progress li.done::before { background: var(--c); }
.progress li.now { color: var(--ink); }
.progress li.now::before { background: linear-gradient(90deg, var(--c) 50%, rgba(42, 32, 24, 0.14) 50%); }

.step { display: flex; flex-direction: column; gap: 16px; animation: step-in 0.45s cubic-bezier(0.2, 0.85, 0.2, 1); }
.step[hidden] { display: none; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.step h1 { margin: 0; font: 800 40px/1.02 var(--display); letter-spacing: -0.035em; text-wrap: balance; }
.step h2 { margin: 0; font: 800 30px/1.05 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
.step .kicker { margin: 0; }
.lead { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.lead.small { font-size: 13.5px; }
.apply-card .note { margin: 0; font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-radius: 12px; background: rgba(63, 138, 60, 0.09); }

/* who is applying: three tabs, the active one in its type colour */
.apply-card { --c: #b5332b; --c-soft: rgba(181, 51, 43, 0.1); }
.apply-card[data-type="creator"] { --c: #7d4fa0; --c-soft: rgba(125, 79, 160, 0.11); }
.apply-card[data-type="project"] { --c: #2f61a9; --c-soft: rgba(47, 97, 169, 0.1); }
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.type {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 12px 11px;
  border-radius: 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; text-align: left; color: var(--ink);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
@media (hover: hover) { .type:hover { transform: translateY(-2px); border-color: rgba(42, 32, 24, 0.3); } }
.type canvas { width: 30px; height: 30px; image-rendering: pixelated; margin-bottom: 4px; transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.type b { font: 800 16px/1.1 var(--display); letter-spacing: -0.015em; }
.type span { font-size: 11.5px; line-height: 1.3; color: var(--ink-3); }
.type[aria-selected="true"] { border-color: var(--c); background: var(--c-soft); box-shadow: 0 6px 18px -8px var(--c); }
.type[aria-selected="true"] canvas { transform: scale(1.15) rotate(-6deg); }
.type:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
/* applications are closed (owner, 24 Nov 2026): the first screen leads to the Barn Checker and the Barn Sale in place of the type cards, the facts and the line
   about starting an application, which stay in the page for the modules that read them */
.step.is-closed > .types, .step.is-closed > .type-note, .step.is-closed > .mini, .step.is-closed > #signinLead { display: none; }
.next-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.next-step {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; min-width: 0; padding: 14px 16px;
  border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 8%, #fff);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.next-step b { font: 800 18px/1.15 var(--display); letter-spacing: -0.015em; }
.next-step em { font: 600 15px/1 var(--body); color: var(--c); }
.next-step span { grid-column: 1 / -1; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
@media (hover: hover) { .next-step:not(.is-inert):hover { transform: translateY(-2px); border-color: var(--c); box-shadow: 0 8px 20px -10px var(--c); } }
.next-step:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.next-step.is-inert { cursor: default; border-color: var(--line); background: rgba(42, 32, 24, 0.035); }
.next-step.is-inert em { padding: 4px 7px; border-radius: 6px; background: rgba(42, 32, 24, 0.08); color: var(--ink-2); font: 500 10.5px/1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.type-note { margin: -4px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); padding: 10px 12px; border-radius: 12px; background: var(--c-soft); border-left: 3px solid var(--c); }
.kicker em { font-style: normal; }
.kicker .type-name { color: var(--c); }

.mini { display: flex; gap: 0; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mini div { flex: 1; padding: 10px 0; min-width: 0; }
.mini div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.mini dt { font-size: 11.5px; color: var(--ink-3); }
.mini dd { margin: 2px 0 0; font: 500 13.5px/1.3 var(--mono); }

.mode-root .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mode-root .row.end { justify-content: flex-end; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border: 0; border-radius: 13px; cursor: pointer; text-decoration: none;
  font-weight: 600; font-size: 14.5px; transition: background 0.15s, transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.btn.primary { background: var(--ink); color: var(--paper-solid); }
@media (hover: hover) { .btn.primary:hover:not(:disabled) { background: #3d3025; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(42, 32, 24, 0.22); } }
.btn.ghost { background: rgba(42, 32, 24, 0.07); color: var(--ink); }
@media (hover: hover) { .btn.ghost:hover:not(:disabled) { background: rgba(42, 32, 24, 0.12); } }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn[hidden] { display: none; } /* display: inline-flex above would otherwise win over [hidden] (lane A2's sign-in buttons) */
/* the same for the rows lane A3's wallet and paste fields show and hide (their display rules are below) */
.field[hidden], .input[hidden], .list-choice[hidden], .link-row[hidden], .check[hidden] { display: none; } /* .check: lane A4's Barn wallet tick */
.btn.busy { pointer-events: none; }
.btn.busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { align-self: flex-start; border: 0; background: none; padding: 0; cursor: pointer; font-size: 13px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .link:hover { color: var(--ink); } }

.wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wallets[hidden] { display: none; }
.wallet {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; text-align: left; transition: border-color 0.2s, transform 0.2s;
}
@media (hover: hover) { .wallet:hover { border-color: rgba(42, 32, 24, 0.35); transform: translateY(-1px); } }
.wallet i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--w); color: #fff; font: 800 14px var(--display); font-style: normal; }
.wallet.busy { pointer-events: none; opacity: 0.6; }
.connected { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(63, 138, 60, 0.09); }
.connected[hidden] { display: none; }
.connected div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.connected b { font: 500 14.5px var(--mono); }
.connected span { font-size: 12px; color: var(--ink-3); }
.avatar { width: 36px; height: 36px; border-radius: 10px; flex: none; image-rendering: pixelated; background-size: cover; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: 13px; font-weight: 600; }
.field > span i { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.input { display: flex; align-items: center; border-radius: 12px; border: 1px solid var(--line); background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(42, 32, 24, 0.08); }
.input em { font-style: normal; color: var(--ink-3); padding-left: 12px; }
.input input, .input textarea { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 11px 12px; font: 15px var(--body); color: var(--ink); resize: vertical; }
.input.prefix input { padding-left: 2px; }
.field.bad .input { border-color: #b5332b; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset[hidden] { display: none; }
.input select { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 11px 36px 11px 12px; font: 15px var(--body); color: var(--ink); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232a2018' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: 500 13px var(--body); color: var(--ink-2); transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s; }
@media (hover: hover) { .chip:hover { border-color: rgba(42, 32, 24, 0.35); } }
.chip.on { background: var(--c); border-color: var(--c); color: #fff; transform: translateY(-1px); }
.field.bad .chips .chip { border-color: rgba(181, 51, 43, 0.55); }
.err { color: #a12d26; font-size: 12px; }
.field-help { color: var(--ink-3); font-size: 12px; }
.count { align-self: flex-end; color: var(--ink-3); font: 500 11.5px var(--mono); }

.herd { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; min-height: 40px; }
.herd .goat-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 9px;
  border-radius: 14px; background: #dfe9cf; animation: pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.herd .goat-card canvas { width: 56px; height: 44px; image-rendering: pixelated; }
.herd .goat-card b { font: 500 12px var(--mono); color: var(--ink-2); }
.herd .scan { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(42, 32, 24, 0.08); overflow: hidden; }
.herd .scan i { display: block; width: 35%; height: 100%; background: var(--ink); border-radius: 4px; animation: slide 1s ease-in-out infinite; }
@keyframes pop { from { opacity: 0; transform: scale(0.6) translateY(8px); } to { opacity: 1; transform: none; } }

.summary { margin: 0; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; }
.summary div + div { border-top: 1px solid var(--line); }
.summary dt { color: var(--ink-3); font-size: 13px; flex: none; }
.summary dd { margin: 0; font: 500 13.5px var(--mono); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }

/* the application pass: shown full screen over a dimmed island */
.pass-view {
  position: fixed; inset: 0; z-index: 4; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: calc(84px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 90% at 50% 45%, rgba(18, 28, 48, 0.25), rgba(18, 28, 48, 0.62));
  --pw: min(760px, 100%);
}
.pass-view[hidden] { display: none; }
/* centred while it fits, scrolled from the top when it does not (justify-content: center would cut the top off) */
.pass-view { justify-content: flex-start; }
.pass-view > :first-child { margin-top: auto; }
.pass-view > :last-child { margin-bottom: auto; }
.pass-view > * { width: var(--pw); flex: none; box-sizing: border-box; }
.pass-head { display: flex; flex-direction: column; gap: 6px; color: #fbf6ec; }
.pass-head .kicker { color: rgba(251, 246, 236, 0.75); margin: 0; }
.pass-head h2 { color: #fbf6ec; text-shadow: 0 2px 18px rgba(10, 20, 40, 0.4); }
.pass-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 18px;
  background: var(--paper-solid); box-shadow: 0 6px 18px -10px rgba(5, 15, 35, 0.28);
}
.pass-bar .grow { flex: 1; }
.app-status { display: grid; gap: 10px; padding: 18px; border-radius: 18px; background: var(--paper-solid); box-shadow: 0 6px 18px -10px rgba(5, 15, 35, 0.28); }
.app-status[hidden] { display: none; }
.app-progress { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.app-progress li { flex: 1; display: grid; gap: 6px; font: 500 11px/1.3 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.app-progress li::before { content: ""; height: 5px; border-radius: 5px; background: rgba(42, 32, 24, 0.1); }
.app-progress li.done::before { background: #5fb36a; }
.app-progress li.now { color: var(--ink); }
.app-progress li.now::before { background: linear-gradient(90deg, #d99a1e 50%, rgba(42, 32, 24, 0.12) 50%); }
.app-progress li small { display: block; text-transform: none; letter-spacing: 0; font: 400 11.5px var(--body); color: var(--ink-3); }
.app-next { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.app-lines { display: grid; gap: 6px; } /* lane A5: one .app-next per AH status line */
.app-lines:empty { display: none; }
.card-shot { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 12px; border: 1px solid var(--line); } /* lane A5: AH's card preview */
.card-shot[hidden] { display: none; }
.posts-box { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: var(--paper-solid); box-shadow: 0 6px 18px -10px rgba(5, 15, 35, 0.28); }
.posts-box[hidden] { display: none; }
.posts-head { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: flex-start; }
.posts-head h3 { margin: 0 0 4px; font: 700 18px var(--display); }
.posts-head p { margin: 0; max-width: 560px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.posts-stat { display: flex; gap: 18px; margin: 0; }
.posts-stat div { display: grid; gap: 2px; text-align: right; }
.posts-stat dt { font: 500 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.posts-stat dd { margin: 0; font: 600 16px var(--body); color: var(--ink); }
.posts-add { display: flex; gap: 8px; }
.posts-add[hidden] { display: none; } /* lane A5: no field once the form is closed */
.posts-add .input { flex: 1; }
.posts-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.posts-list:empty { display: none; }
.posts-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.posts-list li .day { font: 500 11.5px var(--mono); color: var(--ink-3); min-width: 82px; }
.posts-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.posts-list li .st { font: 500 11.5px var(--mono); color: var(--ink-3); }
.posts-list li .st.counted { color: #3f8a3c; }
.posts-list li .st.rejected { color: #a12d26; }
.posts-list li .why { flex-basis: 100%; font-size: 12px; color: #a12d26; }
.posts-list li .take { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.posts-note { margin: 0; font-size: 12px; color: var(--ink-3); }
/* owner, 6 Nov: Invite friends and Tasks (src/apply-points.js), in the .posts-box look */
.ref-chip { padding: 8px 12px; border-radius: 999px; background: rgba(226, 165, 40, 0.16); color: #8a5a0c; font: 600 15px/1.2 var(--mono); letter-spacing: 0.08em; }
.tasks-total { color: var(--ink-2); }
.tasks-total b { font: 700 18px var(--display); color: var(--ink); }
.task-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.task-list .co-sel, .co-add select { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; max-width: 140px; }
.co-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.co-add[hidden] { display: none; } /* display: flex above would otherwise win over [hidden]: the wallet form showed with no community, both forms after the form closed */
.co-add .input { flex: 1 1 240px; }
.co-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mode-back[hidden], .mini[hidden] { display: none; }
.co-total { margin: 0; font-weight: 700; }
#coCommunities { grid-template-columns: minmax(0, 1fr); }
#coCommunities .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* a link of up to 500 characters ran under Remove */
/* owner, 13 Nov (D648): a community per row, with its count, its Add wallets and its wallets folded under it; the paste
   box opens inside the row it is for */
.co-comms { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.co-comm { display: grid; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.co-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.co-head .name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink); }
.co-count { flex: none; font: 500 12px var(--mono); color: var(--ink-2); }
.co-count.full { color: #3f8a3c; }
.co-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.co-acts .btn { padding: 7px 12px; border-radius: 9px; font-size: 13px; }
.co-acts .link { align-self: center; }
.co-paste { display: grid; gap: 8px; }
.co-paste[hidden], .co-results[hidden] { display: none; } /* display: grid would otherwise win over [hidden] */
.co-paste textarea { min-height: 96px; font: 13px/1.5 var(--mono); }
.co-paste .row .btn { padding: 9px 16px; font-size: 13.5px; }
.co-paste .row .link { align-self: center; }
.co-results { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font: 500 12px/1.5 var(--mono); }
.co-results li { display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.co-results .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.co-results .st { flex: none; }
.co-results .ok { color: #3f8a3c; }
.co-results .bad { color: #a12d26; }
.co-wallets li { padding: 7px 10px; }
.task-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.task-list .name { flex: 1 1 150px; min-width: 0; }
.task-list .plus, .task-list .n { font: 500 11.5px var(--mono); color: var(--ink-3); }
.task-list .st { font: 500 11.5px var(--mono); color: var(--ink-3); }
.task-list .st.done { color: #3f8a3c; }
.task-list .st.done::before { content: "\2713"; content: "\2713" / ""; margin-right: 4px; }
.task-list .btn { margin-left: auto; padding: 7px 12px; border-radius: 9px; font-size: 13px; }
.task-list .why { flex-basis: 100%; font-size: 12px; color: var(--ink-2); }
/* lane tweet-task: the announcement post block (src/apply-tweet.js), on the last step and on the status view */
.tweet-task { display: grid; gap: 8px; margin: 4px 0 8px; }
.tweet-task[hidden] { display: none; }
.tweet-task .tweet-title { margin: 0; font: 700 16px var(--display); }
.tweet-task .tweet-body { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.tweet-task .tweet-links .tweet-btn { text-decoration: none; }
.tweet-task .tweet-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; color: var(--ink); }
/* D598/D599: the X task row (src/apply-tweet.js drawTasks) above the post field, and on the last step while one is left */
.x-tasks { display: grid; gap: 6px; }
.x-tasks[hidden] { display: none; }
.x-task-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.x-task-req { font-size: 13px; font-weight: 700; color: var(--ink); }
.x-task-row .x-task { position: relative; box-sizing: border-box; height: 48px; min-height: 0; padding: 0 16px; border-radius: 6px; font-size: 14px; gap: 6px; }
.x-task-row .x-task[data-done] { background: rgba(63, 138, 60, 0.14); }
.x-task-row .x-task[data-done]::after { content: "\2713"; content: "\2713" / ""; color: #3f8a3c; font-weight: 700; }
.x-task-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* why a Continue or Submit is off (owner, 6 Nov): a disabled button gets no hover, so the wrapper holds the tooltip */
.why-wrap { position: relative; display: inline-flex; }
.why-wrap .btn:disabled { pointer-events: none; }
.why-line { display: none; margin-top: 6px; font-size: 13px; color: var(--ink-2); text-align: right; }
@media (hover: hover) {
  .why-wrap[data-why] { cursor: not-allowed; }
  .why-wrap[data-why]:hover::after {
    content: attr(data-why); position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; pointer-events: none;
    max-width: 280px; width: max-content; padding: 7px 10px; border-radius: 8px; background: var(--ink); color: #fbf6ec; font-size: 13px; line-height: 1.3; text-align: left;
  }
}
@media (hover: none) { .why-line:not([hidden]) { display: block; } }
.pass-ref { font-size: 13px; color: var(--ink-3); padding: 0 6px; }
.pass-ref b { font: 500 14px var(--mono); color: var(--ink); margin-left: 4px; }
.pass-foot { margin: 0; font-size: 13.5px; line-height: 1.6; color: rgba(251, 246, 236, 0.82); text-align: center; }
.pass-foot a, .pass-foot .link { color: #fbf6ec; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.pass-foot .link { display: inline; align-self: auto; }
.state-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(226, 165, 40, 0.16); color: #8a5a0c; font: 500 12px var(--mono); }
.state-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d99a1e; animation: live 2s ease-out infinite; box-shadow: 0 0 0 0 rgba(217, 154, 30, 0.5); }
.state-pill[hidden] { display: none; } /* lane A5 fix round: no pill until GET /status answers (A5-S-2) */

.demo { margin: 4px 0 0; font-size: 11.5px; color: var(--ink-3); text-align: center; }

@media (max-width: 900px) {
  .phase-pill { display: none; }
  body[data-mode] .brand { display: none; }
  /* W10: Back to the island is the first thing in the top bar's first row, on the drawer button's own line (it sat over the drawer button): the bar keeps a slot of Back's width
     (--back-w, a fixed width, so the slot is exact) in front of the drawer button, and Back stands in it, 44 px tall like the drawer button */
  .mode-bar { top: calc(14px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); transform: none; }
  .mode-back { width: var(--back-w); justify-content: center; padding-inline: 0; overflow: hidden; white-space: nowrap; }
  body[data-mode] .topbar::before { content: ""; flex: none; width: var(--back-w); height: 44px; }
  /* W8: a full-height sheet (it was 64vh), from under the bar to the bottom edge. W10: under the WHOLE top bar (its measured height, main.js --topbar-h: two rows on a phone, where
     the wallet chip is on the second), so the sheet never covers the chip; the sheet is still as tall as it can be */
  .apply { top: calc(var(--topbar-h, 114px) + 8px); bottom: 0; left: 0; right: 0; width: auto; height: auto; }
  body[data-mode]:has(.world-dev) .apply { bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
  body[data-mode]:has(.world-dev) .apply-card { border-radius: 24px; }
  .apply-card { height: 100%; border-radius: 24px 24px 0 0; padding: 22px max(20px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
  .step h1 { font-size: 32px; }
  .step h2 { font-size: 26px; }
  .sound { margin-left: auto; }
  .types { gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); } /* four boxes: the fourth was cut off at phone width */
  .type { padding: 10px 9px; }
  .next-steps { grid-template-columns: minmax(0, 1fr); }
  .type span { display: none; }
  .pass-view { padding: calc(76px + env(safe-area-inset-top, 0px)) 14px 20px; justify-content: flex-start; --pw: 100%; }
  .pass-bar .grow { display: none; }
  .pass-bar .btn { flex: 1 1 auto; }
  .posts-stat { width: 100%; justify-content: space-between; }
  .posts-stat div { text-align: left; }
}
@media (max-width: 520px) {
  /* W10: on a phone Back is the arrow alone in a 44 px square (the words stay in the button for a screen reader); the full label needs 180 px */
  :root { --back-w: 44px; }
  .mode-back { font-size: 0; gap: 0; }
  .mode-back span { font-size: 18px; }
  .posts-add { flex-wrap: wrap; }
  .posts-add .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .step, .herd .goat-card, .phase-pill i { animation: none; }
  .next-step:not(.is-inert):hover { transform: none; }
}
.wallets.one { grid-template-columns: 1fr; }

/* desktop (W8): the frame is the free area right of the sidebar (--page-inset, sidebar.css); the application and Collabs are forms, so their card keeps a form's width (900 px) and sits in the middle of it */
@media (min-width: 901px) {
  /* W9: the mode bar from the left margin (the sidebar's rule, sidebar.css, moves it to the sidebar's edge), never centred, ending before the right-hand controls */
  .mode-bar { left: max(16px, env(safe-area-inset-left, 0px)); right: var(--bar-right); transform: none; pointer-events: none; container: modebar / inline-size; }
  .mode-bar > * { pointer-events: auto; }
  /* W11: Back keeps its whole label (it does not shrink for the pill); it is cut only when the box itself is narrower than the label (max-width: 100% of the box, which is definite: left and right are set) */
  .mode-back { flex: 0 0 auto; max-width: 100%; min-width: 0; overflow: hidden; white-space: nowrap; }
  .phase-pill { flex: 0 1 auto; } /* W11: the pill is the one that gives way: down to its floor (min-width, above) */
  .apply { left: calc(var(--page-inset) + 16px); right: max(16px, env(safe-area-inset-right, 0px)); width: auto; }
  .apply-card:not(.place-card):not(.sale-card) { max-width: 900px; margin-inline: auto; }
}
@media (min-width: 1200px) {
  .apply { width: min(1280px, calc(100vw - var(--page-inset) - 32px)); margin-inline: auto; }
}
/* the mode bar's own width (the room before the controls): too little for a pill of 140 px beside Back (167 px + the 8 px gap) and the pill goes */
@container modebar (max-width: 319px) { .phase-pill { display: none; } }
.apply-card:not(.place-card) { container-type: inline-size; }
@container (min-width: 600px) {
  #profileForm fieldset:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  #profileForm .field.wide { grid-column: 1 / -1; }
  .herd { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* X, Discord and the application post: buttons that turn green once done */
.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.link-btn { padding: 10px 14px; font-size: 14px; border: 1px solid var(--line); background: #fff; }
.link-btn .glyph { font: 700 15px/1 var(--body); width: 16px; text-align: center; }
@media (hover: hover) { .link-btn:hover { background: #fff; border-color: rgba(42, 32, 24, 0.35); } }
.link-btn.on { background: rgba(63, 138, 60, 0.12); border-color: rgba(63, 138, 60, 0.45); color: #2f6e2c; }
.link-btn.on .glyph { font-size: 0; }
.link-btn.on .glyph::before { content: "\2713"; font-size: 14px; }
.link-btn.busy::after { width: 12px; height: 12px; }
a.link-btn:not([href]) { cursor: pointer; }
.field.bad .link-btn:not(.on) { border-color: rgba(181, 51, 43, 0.6); }
.link-count { font: 500 12px var(--mono); color: var(--ink-3); margin-left: 4px; }

/* the wallet the list should hold */
.list-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.list-choice .pick { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 13px; border-radius: 13px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; text-align: left; color: var(--ink); font: inherit; transition: border-color 0.2s, background 0.2s; }
.list-choice .pick b { font-size: 14px; font-weight: 600; }
.list-choice .pick span { font-size: 12px; color: var(--ink-3); }
.list-choice .pick .mono { font: 500 12.5px var(--mono); color: var(--ink-2); }
.list-choice .pick[aria-checked="true"] { border-color: var(--c); background: var(--c-soft); }
.list-choice + .input { margin-top: 4px; }
.list-choice + .input[hidden] { display: none; }
@media (max-width: 420px) { .list-choice { grid-template-columns: 1fr; } }

/* the Barns asked for (1 to 10): a small number with minus and plus icon buttons, in the .input look */
.stepper { display: inline-flex; align-items: center; align-self: flex-start; border-radius: 12px; border: 1px solid var(--line); background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.stepper:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(42, 32, 24, 0.08); }
.field.bad .stepper { border-color: #b5332b; }
.stepper input { width: 3ch; box-sizing: content-box; border: 0; outline: none; background: transparent; padding: 9px 4px; text-align: center; font: 600 15px var(--mono); color: var(--ink); appearance: textfield; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-btn { position: relative; flex: none; width: 34px; height: 34px; margin: 2px; border: 0; border-radius: 9px; background: rgba(42, 32, 24, 0.07); color: var(--ink); cursor: pointer; transition: background 0.2s, opacity 0.2s; }
@media (hover: hover) { .stepper-btn:hover:not(:disabled) { background: rgba(42, 32, 24, 0.14); } }
.stepper-btn:disabled { opacity: 0.35; cursor: not-allowed; }
/* the minus and plus icons: two drawn bars, no glyph or image to load */
.stepper-btn::before, .stepper-btn.plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 1px; background: currentColor; }
.stepper-btn.plus::after { transform: rotate(90deg); }

/* FX P-8: the Back button of a page is at least 44 px to tap on a phone (it was 38) */
@media (max-width: 900px) { .mode-back { min-height: 44px; } }

/* ---------- W17 (UX1 item 7): one small state system for the buttons ----------
   hover (a mouse only: @media (hover: hover), so a tap leaves nothing stuck), active (works on touch: it presses in), focus-visible (the ring shows on a dark fill), disabled (no hover, the reason is the .why line),
   reduced motion (no transition, no move). The recipe is the same on .btn, .pl-seg button, the confirm and wallet buttons, .pl-entry.pick, .pl-goat-tile, .side-item, .link and the stepper. */
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); box-shadow: none; transition-duration: 60ms; }
/* FX6 (BW, press with a real mouse-down): the primary's hover rule has one more class, so a press on it needs its own selector or the lift stays */
.btn.primary:active:not(:disabled) { transform: translateY(0) scale(0.98); box-shadow: none; transition-duration: 60ms; }
.btn.primary:focus-visible { box-shadow: 0 0 0 2px var(--paper-solid); }
.link { transition: color 0.15s, opacity 0.15s; }
.link:active:not(:disabled) { opacity: 0.7; transition-duration: 60ms; }
.stepper-btn:active:not(:disabled) { transform: scale(0.94); transition-duration: 60ms; }
.stepper-btn { transition: background 0.15s, transform 0.15s, opacity 0.2s; }
/* a mouse on a wide screen: the buttons are 34 px tall (46 before), 13.5 px type; the icon buttons 32. Touch keeps 44 px (the 600 px rules in places.css, the 900 px rules in styles.css and sidebar.css). */
@media (min-width: 901px) and (pointer: fine) {
  .btn { min-height: 34px; padding: 8px 14px; font-size: 13.5px; line-height: 1.2; }
  .stepper-btn { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:active:not(:disabled), .btn.primary:active:not(:disabled), .btn.primary:hover:not(:disabled), .btn.primary:focus-visible, .stepper-btn, .stepper-btn:active:not(:disabled), .link, .pl-seg button, .pl-seg button:active, .pl-entry.pick, .pl-entry.pick:active,
  .pl-goat-tile, .pl-goat-tile:active, .side-item, .side-item:active, .side-open, .side-open:active, .tx-confirm .tx-btns button, .tx-confirm .tx-btns button:active, .wallet-btns .w-yes, .wallet-btns .w-no,
  .wallet-btns .w-yes:active, .wallet-btns .w-no:active, .tk-more, .tk-more:active, .side-find:active, .side-icon-btn:active, .side-sound:active,
  .mode-back:hover, .mode-back:hover span, .type:hover, .wallet:hover, .actions a.primary:hover, .actions .primary.cta:hover, .tx-confirm .tx-yes:not(:disabled):hover, .wallet-btns .w-yes:hover { transition: none !important; transform: none !important; }
  /* FX7 (VW11 N-3 on FX6): the hover lifts too; fx7-review.test.js finds every :hover rule with a transform in every sheet */
}

/* D644 (owner, 13 Nov: the application page does not change): the Barn Application and Collabs keep the frame they have on the
   live site, a card on the right on a screen 901 px wide and up and a bottom sheet of 64vh on a phone (never under the two-row top bar). The W8/W10 frame above is
   for the place pages and the sale page; the ids win over it whatever the order. The mode bar and the top bar stay as above. */
@media (max-width: 900px) {
  #apply, #collabs { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); width: auto; height: min(64vh, 640px, calc(100vh - var(--topbar-h, 114px) - 32px)); }
  #apply .apply-card, #collabs .apply-card { height: auto; border-radius: 24px; padding: 22px 20px 14px; }
}
@media (min-width: 901px) {
  #apply, #collabs { left: auto; right: max(16px, env(safe-area-inset-right, 0px)); width: min(900px, 62vw, calc(100vw - 32px)); margin-inline: 0; }
  #apply .apply-card, #collabs .apply-card { max-width: none; margin-inline: 0; }
}
/* D644, phone (shell review F4): the new bar's drawer button stood where the live application's second top-left button is (Collabs, for a
   signed-in applicant), and the arrow-only rule left that button a blank circle. While the Barn Application shows Collabs the drawer
   button (.side-open) waits for the island (the live page has none; Back goes to the island, where it is), and Collabs keeps its words.
   The bar's slot in front of the right-hand controls covers both buttons, so the bell, the Live ledger and the wallet chip never slide
   under them (375 px: 95 px are left for the chip, which holds the address whole). */
@media (max-width: 900px) {
  :root { --collabs-w: 84px; }
  body[data-mode="application"]:has(#toCollabs:not([hidden])) .topbar .side-open { display: none; }
  #toCollabs { width: var(--collabs-w); padding-inline: 12px; font-size: 13px; gap: 0; }
  body[data-mode="application"]:has(#toCollabs:not([hidden])) .topbar::before { width: calc(var(--back-w) + 8px + var(--collabs-w)); }
}
