/* portal-kit: styles owned by the kit screens (status and Content Kit). Tokens and base components are in
   portal.css. Phone first: everything stacks at 375px, wider screens only add room. */

/* Text for screen readers only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Screen 1: where your project stands ---- */
.status-who { margin: 0 0 14px; }
.status-due { margin: -8px 0 24px; text-wrap: balance; }
.status-steps { margin-top: clamp(36px, 7vw, 56px); }
.status-steps .progress { margin-top: 0; }

/* ---- Screen 2: the Content Kit ---- */
.kit-closed { margin: 0 0 24px; }
.kit-closed a { color: var(--ink); }

.kit-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px clamp(16px, 4vw, 22px); margin: 0 0 18px; }
.kit-summary-line { margin: 0; }
.kit-summary-line + .kit-summary-line { margin-top: 8px; }
.kit-no-passwords { font-size: 15px; color: var(--muted); }

.kit-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kit-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 15px; color: var(--muted); text-decoration: none; }
.kit-nav a:hover { color: var(--ink); border-color: var(--field-border); }

.part-head { flex-wrap: wrap; row-gap: 2px; }
.part-head h2 { margin: 0; }
.part-intro { color: var(--muted); max-width: 60ch; margin: -4px 0 18px; }
.part:target, .item:target { scroll-margin-top: 16px; }
.item:target { border-color: var(--field-border); }

.kit-group + .kit-group { margin-top: 26px; }
.kit-group-title { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }

/* Messages inside the part or item they belong to */
.kit-flash { margin: 12px 0 0; padding: 10px 14px; border: 1px solid; border-radius: 10px; font-size: 15px; }
.kit-flash-ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.kit-flash-error { border-color: color-mix(in srgb, var(--error) 55%, transparent); background: color-mix(in srgb, var(--error) 10%, transparent); }
.part > .kit-flash, .done-card > .kit-flash { margin: 0 0 16px; }

/* Items */
.item-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; line-height: 1.4; margin: 0; padding-top: 1px; }
.item-title label { cursor: pointer; }
.item-help { font-size: 15px; color: var(--muted); max-width: 62ch; margin: 8px 0 0; }
.item-body > :last-child { margin-bottom: 0; }
.item .badge { margin-top: 1px; }
@media (min-width: 560px) {
  .item > .item-help, .item > .item-body, .item > .kit-flash { margin-left: 36px; }
}

/* About your project */
.about-form { padding-top: 22px; padding-bottom: 22px; }
.question { margin: 0 0 26px; }
.question legend, .question > label { display: block; font-weight: 600; line-height: 1.4; margin: 0 0 8px; }
.question .badge { margin-left: 6px; vertical-align: 2px; }
.question .hint { margin-top: -4px; }
.choice span { line-height: 1.45; }

/* Answers and links */
.answer-form { display: grid; gap: 10px; }
.answer-form .btn { justify-self: start; }
@media (min-width: 560px) {
  .answer-form:not(:has(textarea)) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}
.answer { margin: 0; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Files */
.files { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 0 0 14px; }
.files .thumb { display: block; color: inherit; text-decoration: none; }
.files .thumb:focus-visible { outline-offset: -2px; border-radius: 10px; }
.files .doc { font-size: 15px; letter-spacing: .06em; }
.files form { top: 6px; right: 6px; }
.files .remove { width: 38px; height: 38px; font-size: 22px; display: grid; place-items: center; }
.files .remove:hover { background: rgb(0 0 0 / .85); }
.upload { display: grid; gap: 8px; }
.upload-label { font-weight: 600; font-size: 15px; }
.upload-hint { margin: 0; }
.upload .btn { justify-self: start; margin-top: 4px; }

/* Access */
.access-invite { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.invite { overflow-wrap: anywhere; }
.access-state { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.access-form { margin-top: 14px; }

/* Style picker */
.style-pick { margin: 0 0 30px; }
.style-pick-legend { display: block; font-weight: 600; margin: 0 0 10px; }
/* Up to three: a fourth tick (and any after it, in page order) is marked, with a line under the cards. The
   server keeps the first three if more are sent. */
.style-limit { display: none; grid-column: 1 / -1; margin: 0; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--error) 55%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--error) 10%, transparent); font-size: 15px; }
.style-card:has(input:checked) ~ .style-card:has(input:checked) ~ .style-card:has(input:checked) ~ .style-card:has(input:checked) { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.style-card:has(input:checked) ~ .style-card:has(input:checked) ~ .style-card:has(input:checked) ~ .style-card:has(input:checked) ~ .style-limit { display: block; }
.style-card .swatch { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.style-grid-chosen { list-style: none; margin: 0 0 24px; padding: 0; }
.style-card.is-chosen { cursor: default; }
.refs-set legend { display: block; font-weight: 600; margin: 0 0 6px; }
.refs-set .badge { margin-left: 6px; vertical-align: 2px; }
.ref label { font-size: 15px; font-weight: 600; }
.ref label + input { margin-bottom: 4px; }
.ref-list { list-style: none; margin: 0; padding: 0; }
.ref-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ref-url { display: block; overflow-wrap: anywhere; }
.ref-note { display: block; color: var(--muted); font-size: 15px; }

/* I'm done */
.done-card { border-color: color-mix(in srgb, var(--spark) 35%, var(--line)); }
.done-card.is-sent { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.done-card h2 { margin-bottom: 12px; }
.done-card p { color: var(--muted); max-width: 60ch; }
.done-card .actions { margin-top: 8px; }
.missing { margin: 0 0 16px; padding-left: 20px; }
.missing li + li { margin-top: 4px; }
.missing a { color: var(--ink); }
.style-card .meta { display: block; }
@media (max-width: 519px) {
  /* Two cards a row on a phone: half the scrolling, and easier to compare. */
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .style-card .meta { padding: 10px 11px 13px; }
  .style-card .meta strong { font-size: 19px; }
  .style-card .meta span { font-size: 13.5px; }
  .style-card input { top: 9px; right: 9px; }
}
