/* 1000 websites challenge page. Builds on /site.css (tokens, nav, footer, ui- kit). */

/* The board: 1,000 squares, one per business. Same panel language as the access log. */
.board { background: var(--ink); color: var(--paper); border-top: 10px solid var(--red); }
.board-head { display: flex; justify-content: space-between; gap: 16px; padding: 16px 22px; color: #a9a7a0; border-bottom: 1px solid var(--line-dark); font-size: var(--t-xs); font-weight: 600; }
.board-grid { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 3px; padding: 22px; }
.board-grid i { aspect-ratio: 1; background: var(--line-dark); }
.board-grid i.waiting, .sq.waiting { background: var(--paper); }
.board-grid i.building, .sq.building { background: var(--yellow); }
.board-grid i.built, .sq.built { background: var(--red); }
.board-count { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0 22px 20px; }
.board-count dt { display: flex; align-items: center; gap: 8px; font-size: var(--t-xs); font-weight: 600; color: #c9c6bf; }
.board-count dd { font-family: var(--fs-display); font-size: var(--t-xl); line-height: 1; letter-spacing: -0.02em; margin-top: 8px; }
.sq { display: inline-block; flex: none; width: 10px; height: 10px; }
.board figcaption { padding: 14px 22px 18px; border-top: 1px solid var(--line-dark); font-size: var(--t-xs); color: #a9a7a0; }

.get-list { padding-top: 6px; }
.get-list li { font-size: var(--t-l); line-height: 1.35; }

/* Request form */
.req-section { padding-top: 120px; }
.req-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 72px; align-items: start; }
.req-intro { position: sticky; top: 112px; }
.req-ready-h { font-weight: 700; margin-top: 32px; margin-bottom: 14px; }
.req-ready { gap: 10px; }

.req-form { counter-reset: step; }
.req-form [hidden], .req-box [hidden] { display: none !important; } /* follow-up questions toggle with the hidden attribute */
.req-step { border: 0; border-top: 6px solid var(--ink); padding: 22px 0 56px; min-width: 0; }
.req-step > * + * { margin-top: 22px; }
.req-step legend { float: left; width: 100%; padding: 0; margin-bottom: 26px; counter-increment: step; display: flex; gap: 14px; align-items: baseline; font-family: var(--fs-display); font-size: var(--t-xl); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; }
.req-step legend::before { content: counter(step); color: var(--red); }
.req-step legend + * { clear: both; margin-top: 0; }

.req-form .f { display: block; font-size: var(--t-xs); font-weight: 700; }
.req-form .opt { font-weight: 400; color: var(--mute); margin-left: 4px; }
.req-form .hint { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--mute); line-height: 1.5; margin-top: 2px; }
.req-form p.hint { max-width: var(--measure); }
.req-form input[type=text], .req-form input[type=email], .req-form input[type=tel], .req-form textarea, .req-form select {
  display: block; width: 100%; margin-top: 8px; font: 400 16px/1.4 var(--fs-sans); color: var(--ink); background: #fff;
  border: 2px solid var(--ink); border-radius: 0; padding: 11px 12px; -webkit-appearance: none; appearance: none;
}
.req-form textarea { resize: vertical; min-height: 84px; }
.req-form select { padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
.req-form input:focus, .req-form textarea:focus, .req-form select:focus { outline: 3px solid var(--yellow); outline-offset: 0; }
.req-form ::placeholder { color: #8f8d86; }

.choices { display: grid; gap: 10px; }
.choices.pages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--ink); background: #fff; cursor: pointer; font-weight: 600; line-height: 1.3; }
.choice input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); }
.choice small { display: block; margin-top: 2px; font-size: var(--t-xs); font-weight: 400; color: var(--mute); }
.choice:has(input:checked) { background: var(--yellow); }
.choice:has(input:focus-visible), .mood:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.choice.is-fixed { background: var(--paper-deep); cursor: default; }
.choice:has(input:disabled:not(:checked)) { opacity: 0.45; cursor: not-allowed; }
.group-h { font-size: var(--t-xs); font-weight: 700; margin-bottom: 10px; }
.group > .choices ~ .f, .group > .choices ~ .moods { margin-top: 16px; }
.group + .group, .group + .f, .f + .group { margin-top: 32px; }

.moods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mood { position: relative; display: grid; gap: 10px; padding: 10px; border: 2px solid var(--ink); background: #fff; cursor: pointer; font-size: 15px; font-weight: 600; line-height: 1.25; }
.mood input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mood .sw { height: 44px; border: 1px solid rgba(17, 17, 17, 0.2); background: linear-gradient(90deg, var(--a) 0 25%, var(--b) 25% 50%, var(--c) 50% 75%, var(--d) 75%); }
.mood:has(input:checked) { background: var(--yellow); }

.req-form .file input[type=file] { display: block; width: 100%; margin-top: 8px; padding: 14px; border: 2px dashed var(--ink); background: #fff; font: 400 15px var(--fs-sans); color: var(--ink); cursor: pointer; }
.req-form input[type=file]::file-selector-button { margin-right: 14px; padding: 10px 14px; border: 0; background: var(--ink); color: var(--paper); font: 700 15px var(--fs-sans); cursor: pointer; }
.file-list { display: block; margin-top: 8px; font-size: var(--t-xs); font-weight: 400; color: var(--mute); overflow-wrap: anywhere; }
.file-list:empty { display: none; }
.file-list.err { color: var(--red-ink); font-weight: 700; }

.tick { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; line-height: 1.4; cursor: pointer; }
.tick input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ink); }

.req-form .bad input:not([type=checkbox]):not([type=radio]), .req-form .bad textarea, .req-form .bad select,
.choices.bad .choice, .moods.bad .mood { border-color: var(--red-ink); }
.f-err { display: block; margin-top: 8px; font-size: var(--t-xs); font-weight: 700; color: var(--red-ink); }

.req-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.req-send { border-top: 6px solid var(--ink); padding-top: 28px; display: grid; gap: 14px; }
.req-send button { cursor: pointer; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 700 var(--t-lead) var(--fs-sans); padding: 20px; transition: background 0.15s, border-color 0.15s; }
.req-send button:hover { background: var(--red-ink); border-color: var(--red-ink); }
.req-send button[disabled] { opacity: 0.6; cursor: wait; }
.req-progress { height: 10px; background: var(--paper-deep); }
.req-progress span { display: block; width: 0; height: 100%; background: var(--red); transition: width 0.2s; }
.req-status:empty { display: none; }
.req-status { font-size: 15px; line-height: 1.5; padding: 12px 14px; border: 2px solid var(--ink); background: var(--paper-deep); }
.req-status.err { border-color: var(--red-ink); color: var(--red-ink); font-weight: 700; }

.req-done { background: var(--ink); color: var(--paper); border-top: 10px solid var(--red); padding: 40px; scroll-margin-top: 110px; }
.req-done:focus { outline: none; }
.req-done-num { font-family: var(--fs-display); font-size: var(--t-3xl); line-height: 0.9; letter-spacing: -0.04em; margin-bottom: 20px; }
.req-done-num:empty { display: none; }
.req-done p { max-width: var(--measure); }

@media (max-width: 1000px) {
  .req-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .req-intro { position: static; }
}
@media (max-width: 640px) {
  .req-section { padding-top: 80px; }
  .board-grid { gap: 1px; padding: 14px; }
  .board-head, .board-count, .board figcaption { padding-left: 16px; padding-right: 16px; }
  .board-count { gap: 10px; }
  .choices.pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice { padding: 12px; }
  .get-list li { font-size: var(--t-m); }
  .req-done { padding: 28px 24px; }
}
