/* Forms */
.label { display: block; font-size: 13px; font-weight: 500; }
.field-label { font-size: 15px; font-weight: 500; }
.optional { font-weight: 400; color: var(--ink-faint); }
.input { width: 100%; height: 56px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line-strong); background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.input::placeholder { color: #8a817c; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(32, 19, 19, 0.08); }
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(224, 49, 49, 0.12); }
.input--area { height: auto; min-height: 104px; background: var(--field); padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field-error { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--red-ink); }

/* A question answered by picking one card. See ApplicationFormBuilder#choices. */
.choices .field-error { clear: both; margin-bottom: 12px; }
.question__hint { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--ink-faint); }
.choices__row { clear: both; display: grid; grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr)); gap: 8px; }
.choice__input, .recipient__input, .checkbox__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-warm); font-size: 14px; cursor: pointer; }
.choice:hover { border-color: var(--ink); }
.choice__input:checked + .choice { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice__input:checked + .choice { font-weight: 500; }
:is(.choice__input, .recipient__input, .checkbox__input):focus-visible + * { outline: 2px solid var(--ink); outline-offset: 3px; }

.choices--large .choices__row { gap: 10px; }
.choices--large .choice { min-height: 56px; font-size: 15px; }

/* Says who will read it, with a link to send it to the other person instead. */
.recipient { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 13px; color: var(--ink-soft); }
.recipient__option { order: 1; cursor: pointer; }
.recipient__input:checked + .recipient__option { order: 0; cursor: default; }
.recipient__switch { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.recipient__input:checked + .recipient__option .recipient__switch,
.recipient__input:not(:checked) + .recipient__option .recipient__current { display: none; }

.checkbox { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; cursor: pointer; }
.checkbox__box { flex: none; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); color: #fff; font-size: 12px; }
.checkbox__input:checked + .checkbox__box { background: var(--ink); border-color: var(--ink); }
.checkbox__input:checked + .checkbox__box::after { content: "✓"; }

/* Approve a milestone */
.agreement { font-family: var(--serif); font-size: 22px; line-height: 1.45; }
.evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.evidence-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--paper-deep); text-decoration: none; }
.evidence-card:hover { background: var(--paper-aside); }
.evidence-card svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.evidence-card__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background: var(--paper-deep); color: var(--ink); }
.evidence-card__icon--play { background: var(--ink); color: var(--paper); }
.evidence-card__icon--play svg { width: 15px; height: 15px; stroke-width: 2; }
.evidence-card__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.evidence-card__title { font-size: 15px; font-weight: 500; }
.evidence-card__detail { font-size: 13px; color: var(--ink-soft); }
.evidence-card__arrow { flex: none; color: var(--ink-faint); }

.take__questions { display: flex; flex-direction: column; gap: 28px; }

/* A note that appears once the questions are answered, and asks what fits.
 * Answers carry a data-tone (Hub::Milestone::TONES, Feedback::TONES): any low
 * answer makes it low, otherwise any high answer makes it high. The
 * tone-placeholder Stimulus controller does the same for the placeholder. */
.follow-up { display: none; }
.follow-up--open,
.take:has([name$="[expectation]"]:checked):has([name$="[value]"]:checked) .follow-up,
.check-in:has([name$="[rating]"]:checked) .follow-up { display: flex; }
.for-tone { display: var(--shown, inline); }
.checkbox.for-tone { --shown: flex; }
.for-tone--low, .for-tone--high,
.tones:has(:checked[data-tone="low"]) :is(.for-tone--neutral, .for-tone--high),
.tones:has(:checked[data-tone="high"]) .for-tone--neutral { display: none; }
.tones:has(:checked[data-tone="low"]) .for-tone--low,
.tones:has(:checked[data-tone="high"]):not(:has(:checked[data-tone="low"])) .for-tone--high { display: var(--shown, inline); }

/* Thank-you pages */
.tally { display: flex; align-items: baseline; gap: 8px; }
.tally__count { font-family: var(--serif); font-size: 34px; line-height: 1; }
.tally__total { color: #8a817c; }
.next-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 16px; background: var(--paper-deep); }
.next-card__title { font-family: var(--serif); font-size: 21px; line-height: 1.25; }

/* Share feedback, a quick check-in */
.check-in__eyebrow { display: flex; align-items: center; gap: 10px; }
.check-in__more { flex-direction: column; gap: 20px; }
.field-label--large { font-size: 16px; }
.check-in__footer { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.check-in__send { align-self: center; padding: 0 36px; }
.check-in:not(:has([name$="[rating]"]:checked)) .check-in__send { background: var(--paper-deep); color: var(--ink-soft); cursor: default; }

/* The send button names whoever the client picked to read it. */
.send-to--private,
.check-in:has(.recipient__input[value="true"]:checked) .send-to--team { display: none; }
.check-in:has(.recipient__input[value="true"]:checked) .send-to--private { display: inline; }
/* A note for the account manager alone is required, so it isn't "Optional". */
.check-in:has(.recipient__input[value="true"]:checked) .optional { display: none; }

.told-us { padding: 20px 24px 8px; border-radius: 20px; background: var(--paper-deep); }
.told-us h2 { margin-bottom: 4px; }
.told-us__item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid #dad3cf; line-height: 1.5; }
.told-us__date { padding-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }

@media (max-width: 560px) {
  .choices__row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence { grid-template-columns: minmax(0, 1fr); }
}

/* Settings */
.settings { max-width: 592px; margin: 0 auto; padding-top: clamp(48px, 8vw, 104px); display: flex; flex-direction: column; gap: 48px; }
.settings__intro { display: flex; flex-direction: column; gap: 12px; }
.settings__who { font-size: 16px; color: var(--ink-soft); }
.settings__form { display: flex; flex-direction: column; gap: 48px; }
.settings__section { display: flex; flex-direction: column; gap: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.settings__section--first { border-top-color: var(--ink); }
.settings__heading { font-size: 16px; font-weight: 500; }
.settings__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.settings__field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.settings__input { height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fbfaf7; font: inherit; font-size: 15px; color: var(--ink); }
select.settings__input { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%236b5f5a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.settings__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(32, 19, 19, 0.08); }
.settings__field--wide { grid-column: 1 / -1; }
.settings__input[aria-invalid="true"] { border-color: var(--red); }
.person-row__text { flex: 1; }
.person-row__link { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.person-row__link:hover { color: var(--ink); }

/* What Hub holds, shown as plain facts. */
.facts { margin: 0; }
.facts__row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts__row:first-child { padding-top: 0; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts__list { display: flex; flex-direction: column; gap: 4px; }
.settings__heading-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.people { display: flex; flex-direction: column; gap: 6px; }
.people__heading { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
@media (max-width: 560px) {
  .facts__row { grid-template-columns: minmax(0, 1fr); }
}
.person-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.35; }
.person-row:last-child { border-bottom: 0; }
.person-row__avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: #eae6e4; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.person-row__avatar--you { background: var(--red); color: #fff; font-family: var(--mono); font-weight: 700; }
.person-row__text { display: flex; flex-direction: column; font-size: 15px; }
.settings__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.saved { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--green-ink); }
.settings__session { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.settings__session form { margin: 0; }
.settings__sign-out { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
.settings__sign-out:hover { color: #000; }
.working-style { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 20px; background: var(--paper-deep); }
.working-style__text { font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.working-style__footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }

/* Settings, as a thoughtbot teammate sees them */
.settings__people { margin-top: 8px; border-top: 1px solid var(--ink); }
.settings__people .person-row--link { text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--line); }
.person-row--link:hover .person-row__arrow { color: var(--ink); }
.person-row__arrow { margin-left: auto; color: var(--ink-faint); }
