/* The Barn Checker (src/places/checker.js; the owner, 23 Nov 2026): the form and the answer beside the field of the 1,000 Barns,
   on the place page's card (places.css). One square a Barn: GTD reserved green, still open a quiet neutral that slowly flows,
   the public auction outlined, a GTD wallet's own Barns ringed. The answers: GTD green, WL FCFS gold, In progress blue. */
.place-root[data-place="checker"] {
  --ck-g: #2f6b45; --ck-w: #87591a; --ck-b: #2f5596; --ck-o: #e3e0d8; --ck-o2: #cdc8bc; --ck-p: #bdb3a3; --ck-m: #b5332b; --ck-y: #f2b632; --ck-soft: #f2eee6;
}
.ck { display: flex; flex-direction: column; gap: 14px; }
.ck-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) {
  .ck-grid { grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "desk field" "side field"; }
  .ck-desk { grid-area: desk; }
  .ck-side { grid-area: side; }
  .ck-field { grid-area: field; }
  /* before a check the field is the picture and the tasks stand under the form, so the countdown and the first tasks show without a
     scroll; after one the tasks come first, beside the answer (owner, 23 Nov 2026: the tasks were too low) */
  .ck-grid.is-asked { grid-template-areas: "desk side" "desk field"; }
}
.ck-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ck-desk, .ck-field {
  background: #fffdf8; border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}

/* the form */
.ck-form { display: flex; flex-direction: column; gap: 8px; }
.ck-form label { font-weight: 600; font-size: 14px; }
.ck-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ck-row input {
  min-width: 0; min-height: 48px; box-sizing: border-box; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid rgba(42, 32, 24, 0.24); background: #fff; color: var(--ink); font: 500 14px var(--mono);
}
.ck-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ck-row .btn { min-height: 48px; padding: 0 22px; }
.ck-under { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: center; font-size: 13px; color: var(--ink-2); }
.ck-link {
  min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; align-self: flex-start;
  font: 500 14px var(--body); text-decoration: underline; text-underline-offset: 3px;
}
.ck-err { margin: 0; padding: 10px 12px; border-radius: 10px; background: #f8e3df; color: #8c2219; font-size: 14px; line-height: 1.45; }

/* the way in: Connect wallet, and pasting an address as a line of text (owner, 25 Nov 2026) */
.ck-connect { display: flex; flex-direction: column; gap: 6px; }
.ck-big { width: 100%; min-height: 52px; justify-content: center; text-align: center; font-size: 16px; }
.ck-answer > p.ck-wallet { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.ck-wallet span { padding: 2px 8px; border-radius: 999px; background: #e4eddf; color: var(--ck-g); font: 600 12px/1.4 var(--body); }

/* before an answer, while reading, and when the lists did not load */
.ck-idle, .ck-wait, .ck-down { border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.ck-idle { border: 1.5px dashed rgba(42, 32, 24, 0.24); }
.ck-idle span, .ck-down span { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ck-wait, .ck-down { background: var(--ck-soft); }
.ck-down .btn { align-self: flex-start; margin-top: 6px; }
.ck-bar { height: 6px; border-radius: 999px; background: #e3ddd1; overflow: hidden; display: block; }
.ck-bar i { display: block; width: 40%; height: 100%; border-radius: 999px; background: var(--ink); animation: ck-load 1.2s ease-in-out infinite; }

/* the answer */
.ck-answer { display: flex; flex-direction: column; gap: 12px; }
.ck-answer > p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.ck-title { margin: 0; font: 800 32px/1.05 var(--display); letter-spacing: -0.02em; }
/* the lead line: what the wallet has, big and bold above the ticket (owner, 23 Nov 2026) */
.ck-answer > p.ck-lead { margin: 0; font: 700 clamp(18px, 2.4vw, 22px)/1.3 var(--body); letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.ck-answer > p.ck-sub { margin: -4px 0 0; font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.ck-progress > p.ck-lead { font: 600 15px/1.45 var(--body); letter-spacing: 0; color: var(--ink-2); }
.ck-gtd .ck-title { color: var(--ck-g); }
.ck-wl .ck-title { color: var(--ck-w); }
.ck-progress .ck-title { color: var(--ck-b); }

/* the ticket: the person's Barn Raising card with its stamp */
.ck-ticket { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 24px rgba(30, 20, 10, 0.2); }
.ck-ticket img { display: block; width: 100%; height: auto; }
.ck-stamp {
  position: absolute; right: 7%; bottom: 22%; transform: rotate(-9deg); white-space: nowrap;
  border: 4px double currentColor; border-radius: 8px; padding: 6px 12px; background: rgba(244, 236, 216, 0.62);
  font: 800 clamp(14px, 2.2vw, 24px)/1 var(--display); letter-spacing: 0.04em;
}
/* the entrances (stamp, title, lead, squares) play once, when an answer or a batch is new (checker.js render: is-fresh, is-risen): a
   redraw for a press or a refresh never replays them */
.ck.is-fresh .ck-stamp, .ck.is-fresh .ck-stamp.ck-stamp-sm { animation: ck-slam 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) 0.12s both; }
@keyframes ck-slam { from { opacity: 0; transform: rotate(-9deg) scale(2.1); } to { opacity: 1; } }
.ck.is-fresh .ck-stamp.ck-stamp-sm { animation-name: ck-slam-sm; }
@keyframes ck-slam-sm { from { opacity: 0; transform: rotate(-4deg) scale(1.8); } to { opacity: 1; } }
.ck.is-fresh .ck-answer > .ck-title { animation: ck-in 0.35s ease-out both; }
.ck.is-fresh .ck-answer > .ck-lead { animation: ck-in 0.4s ease-out 0.06s both; }
.ck-title:focus { outline: none; } /* it takes the focus so the answer is read out; it is no control */
@keyframes ck-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ck-gtd .ck-stamp { color: var(--ck-g); }
.ck-wl .ck-stamp { color: var(--ck-w); }
.ck-progress .ck-stamp { color: var(--ck-b); }
.ck-make { border-radius: 14px; background: var(--ck-soft); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ck-make p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ck-make .btn { align-self: flex-start; }
.ck-stamp.ck-stamp-sm { position: static; align-self: flex-start; transform: rotate(-4deg); font-size: 18px; }
.ck-tk { display: flex; flex-direction: column; gap: 10px; }
.ck-tk .ck-ticket { border-radius: 10px; }
.ck-tk .ck-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.ck-tk .ck-acts .btn { box-sizing: border-box; min-height: 48px; justify-content: center; text-align: center; }
.ck-make .btn[aria-busy="true"] { opacity: 0.62; }
.ck-make .btn.ck-big { align-self: stretch; }
.ck-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-make .ck-acts { align-items: stretch; }
.ck-make .ck-acts .btn { box-sizing: border-box; min-height: 46px; align-self: auto; }
.ck-small { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.ck-box { border-radius: 14px; background: var(--ck-soft); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ck-box b { font-size: 15px; }
.ck-box span { font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* the tasks card, beside the answer: the next batch's post first, then (signed in) the application's own */
.ck-tasks-card {
  border-radius: 18px; background: linear-gradient(180deg, #fffdf8, var(--ck-soft)); border: 1px solid var(--line); padding: 18px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.ck-tasks-card.is-all { border-color: var(--ck-g); box-shadow: 0 0 0 3px rgba(47, 107, 69, 0.14); }
.ck-tasks-card > .btn { align-self: flex-start; }
.ck-hype { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.ck-hype-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ck-hype-title { margin: 0; font: 800 clamp(22px, 3vw, 30px)/1.1 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.ck-tasks-card.is-all .ck-hype-title { color: var(--ck-g); }
/* the ring: done of total (a conic gradient, so it needs no script to draw; @property lets it grow where the browser can) */
@property --ck-ring-p { syntax: "<number>"; inherits: false; initial-value: 0; }
.ck-ring {
  --ck-ring-p: var(--to, 0); width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative;
  background: conic-gradient(var(--ck-g) calc(var(--ck-ring-p) * 1%), #e3ddd1 0); animation: ck-fill 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ck-ring::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #fffdf8; }
.ck-ring b { position: relative; z-index: 1; font: 800 18px/1 var(--display); color: var(--ink); }
.ck-ring i { font: 600 12px/1 var(--mono); color: var(--ink-2); font-style: normal; }
.ck-ring.is-full b { color: var(--ck-g); }
@keyframes ck-fill { from { --ck-ring-p: var(--from, 0); } to { --ck-ring-p: var(--to, 0); } }
/* the countdown to the next batch */
.ck-cd {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--ink); color: #f6f1e4;
}
.ck-cd .ck-mono { color: #cfc6b4; }
.ck-cd b { font: 800 clamp(20px, 2.6vw, 26px)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: #fff; }
.ck-cd.is-due b { font: 600 14px/1.3 var(--body); letter-spacing: 0; }
.ck-tasks-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ck-tasks-head b { font-size: 15px; }
.ck-tasks-head span { font: 500 12px var(--mono); color: var(--ck-b); }
.ck-tasks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ck-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
/* two columns where the tasks' own card has the room (the window's width says nothing: the sidebar and the form take theirs) */
.ck-side { container-type: inline-size; }
@container (min-width: 620px) { .ck-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ck-tasks .btn { min-height: 44px; padding: 0 14px; }
/* one task: its picture and tick, its name and hint, its button; the next one open is the one that stands out */
.ck-tasks li.ck-task {
  background: #fff; border: 1.5px solid rgba(42, 32, 24, 0.1); border-radius: 14px; padding: 12px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.ck-tasks li.ck-task.is-next { border-color: var(--ink); box-shadow: 0 6px 18px rgba(30, 20, 10, 0.14); }
.ck-tasks li.ck-task.is-done { border-color: rgba(47, 107, 69, 0.45); background: #f7fbf6; }
.ck-ico {
  position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ck-soft); color: var(--ink);
}
.ck-task.is-next .ck-ico { background: var(--ink); color: #fff; }
.ck-task.is-done .ck-ico { background: #e2efe4; color: var(--ck-g); }
.ck-tbody { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ck-tbody .name { margin-right: auto; min-width: 0; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.ck-tbody .ck-hint { width: 100%; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.ck-tasks .plus, .ck-tasks .n { font: 500 12px var(--mono); color: var(--ink-2); }
.ck-tasks .st { font: 600 12px var(--mono); color: var(--ink-2); }
.ck-tasks .st.done { color: var(--ck-g); }
.ck-tasks .why { width: 100%; font-size: 12.5px; color: var(--ink-2); }
/* the ETH task (owner, 25 Nov 2026): its button goes under the words where the card is narrow */
@container (max-width: 480px) {
  .ck-hold li.ck-task { grid-template-columns: 44px minmax(0, 1fr); }
  .ck-hold li.ck-task .btn { grid-column: 1 / -1; justify-content: center; text-align: center; }
}
/* the tick on the picture (owner, 23 Nov 2026: ticked once done, an empty box until then) */
.ck-tick {
  position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; box-sizing: border-box; border-radius: 6px;
  border: 1.5px solid rgba(42, 32, 24, 0.32); background: #fff;
}
.ck-task.is-done .ck-tick { background: var(--ck-g); border-color: var(--ck-g); }
.ck-task.is-new .ck-tick { animation: ck-tick-in 0.3s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.ck-task.is-done .ck-tick::after {
  content: ''; position: absolute; left: 4.5px; top: 0.5px; width: 4px; height: 9px; box-sizing: content-box;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
@keyframes ck-tick-in { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
.ck-task.is-done .name { color: var(--ink-2); }
.ck-tasks-sub { padding-top: 10px; border-top: 1px solid rgba(42, 32, 24, 0.1); }
.ck-tasks-card > [data-ck-apply] { align-self: flex-start; }
.ck-sign { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(42, 32, 24, 0.1); }
.ck-sign span { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.place-root[data-place="checker"] .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the field */
.ck-field-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.ck-field-head h2 { margin: 0; font: 700 20px var(--body); letter-spacing: -0.01em; }
.ck-mono { font: 500 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.ck-counts, .ck-legend { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.ck-counts li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ck-counts b { font: 500 14px var(--mono); }
.ck-legend li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.ck-legend .ck-legend-note { margin-left: auto; }
.ck-sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.ck-sw-g { background: var(--ck-g); }
.ck-sw-w { background: var(--ck-w); }
.ck-sw-o { background: #d8d4ca; }
.ck-sw-p { box-shadow: inset 0 0 0 1.5px var(--ck-p); }
.ck-sw-m { width: 9px; height: 9px; background: var(--ck-y); outline: 2px solid var(--ck-m); outline-offset: 1px; }
.ck-cells { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 3px; }
.ck-cells i { display: block; aspect-ratio: 1 / 1; border-radius: 2px; }
.ck-cells .ck-g { background: var(--ck-g); box-shadow: inset 0 -1.5px 0 rgba(16, 40, 24, 0.38); }
.ck.is-risen .ck-cells .ck-g { animation: ck-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.ck-cells .ck-o { background: var(--ck-o); animation: ck-flow 3.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.ck-cells .ck-p { box-shadow: inset 0 0 0 1px var(--ck-p); }
/* a wallet's own squares: gold with a red ring (the ring alone has no contrast on the green beside it) */
.ck-cells .ck-g.ck-m { background: var(--ck-y); box-shadow: inset 0 -1.5px 0 rgba(90, 60, 0, 0.4); outline: 2px solid var(--ck-m); outline-offset: 1px; position: relative; z-index: 1; }
.ck.is-fresh .ck-cells .ck-g.ck-m { animation: ck-pop 0.7s ease-out both; }
@media (max-width: 600px) { .ck-cells { grid-template-columns: repeat(25, minmax(0, 1fr)); gap: 2px; } }
@keyframes ck-flow { 0%, 100% { background: var(--ck-o); } 50% { background: var(--ck-o2); } }
@keyframes ck-rise { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ck-pop { 0% { transform: scale(1); } 35% { transform: scale(1.7); } 100% { transform: scale(1); } }
@keyframes ck-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
/* every rule above that moves, with its own selector, so nothing outranks it (test/site/checker-css-1124.test.js) */
@media (prefers-reduced-motion: reduce) {
  .ck.is-fresh .ck-stamp, .ck.is-fresh .ck-stamp.ck-stamp-sm, .ck.is-fresh .ck-answer > .ck-title, .ck.is-fresh .ck-answer > .ck-lead,
  .ck.is-fresh .ck-cells .ck-g.ck-m, .ck.is-risen .ck-cells .ck-g, .ck-cells .ck-o, .ck-bar i, .ck-ring, .ck-task.is-new .ck-tick { animation: none; }
  .ck-tasks li.ck-task { transition: none; }
}
.ck-notread { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }

/* the light page (checker.html, src/checkerPage.js): the checker with no island behind it, only a still of it. Its bar is the
   brand (the way to the island) and Connect, so the shell's own Back is not drawn; the loader goes as soon as the form is there */
body.lite { --page-inset: 0px; background: #dcd9d0 url(assets/lite/island-wide.webp) center 35% / cover no-repeat fixed; }
body.lite .mode-bar, body.lite .topbar::before { display: none; }
body.lite .brand { display: flex; }
body.lite .connect { flex: 0 1 auto; margin-left: 0; }
.lite-island {
  margin-left: auto; padding: 11px 16px; box-sizing: border-box; display: inline-flex; align-items: center; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); color: var(--ink);
  text-decoration: none; font: 600 13.5px/1 var(--body); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
@media (hover: hover) { .lite-island:hover { background: var(--paper-solid); } }
body.lite #loader { background: none; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
body.lite .loader-card, .lite-soon { box-sizing: border-box; max-width: calc(100vw - 40px); padding: 28px 34px; border-radius: 24px; background: var(--paper-solid); box-shadow: 0 24px 70px rgba(60, 35, 10, 0.3); }
.lite-soon {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 40px)); box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.lite-soon .kicker { color: #2f6b45; }
.lite-soon h1 { margin: 0; font: 800 42px/1.05 var(--display); letter-spacing: -0.03em; }
.lite-soon p { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) {
  body.lite {
    background: linear-gradient(180deg, rgba(236, 228, 211, 0) 45%, #ece4d3 100%) center top / 100% max(32vw, 160px) no-repeat,
      #ece4d3 url(assets/lite/island-band.webp) center top / max(100vw, 500px) auto no-repeat; /* the picture is 1000 x 320 */
  }
  body.lite .apply { top: calc(92px + env(safe-area-inset-top, 0px)); }
  .lite-island { min-height: 44px; }
}
@media (max-width: 600px) { .lite-island { display: none; } body.lite .connect { margin-left: auto; } }
