/* Petcare owner app. Builds on site.css tokens; light form controls, the
   builder, the recipe page, the account page and print. */

.app main { padding-top: 40px; padding-bottom: 88px; }
.app__nav { display: flex; gap: 20px; margin-left: auto; }
.app__nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.app__nav a[aria-current="page"], .app__nav a:hover { color: var(--cobalt); }
.app fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Light form controls */
.app .field { margin-bottom: 22px; }
.app .field label, .app .field legend { display: block; color: var(--ink); font-weight: 700; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.app .field label span, .app .field legend span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.app .field input, .app .field select {
  width: 100%; font: 500 1rem var(--text); color: var(--ink); background: #fff;
  border: 2px solid var(--hair); border-radius: 12px; padding: 12px 14px;
}
.app .field input:focus, .app .field select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(242, 178, 51, .45); }
.app .field input[aria-invalid="true"] { border-color: var(--tomato); }
.app .field--pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field--weight { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.hint { margin-top: 8px; font-size: .86rem; color: var(--muted); }

.seg--light { border-color: var(--hair); background: #fff; }
.seg--light span { color: var(--ink); }
.seg--light input:checked + span { background: var(--cobalt); color: #fff; }
.seg--light input:focus-visible + span { outline: 3px solid var(--yolk); outline-offset: 2px; }

.btn--ghost { color: var(--cobalt); background: transparent; box-shadow: inset 0 0 0 2px var(--cobalt); }
.btn--ghost:hover { background: #E8ECF8; }
.btn--danger { color: var(--tomato); box-shadow: inset 0 0 0 2px var(--tomato); }
.btn--danger:hover { background: #FBEAE6; }

/* Builder */
.builder { max-width: 820px; }
.builder__intro { margin-bottom: 26px; }
.progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.progress li { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 4px solid var(--hair); font-size: .86rem; font-weight: 600; color: var(--muted); }
.progress li span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--hair); color: var(--ink); font-size: .78rem; font-weight: 800; }
.progress li.is-done { border-top-color: var(--cobalt); color: var(--ink); }
.progress li.is-done span { background: var(--cobalt); color: #fff; }
.progress li[aria-current="step"] { border-top-color: var(--yolk); color: var(--ink); }
.progress li[aria-current="step"] span { background: var(--yolk); }
.wizard { background: #fff; border: 1.5px solid var(--hair); border-radius: 24px; padding: 30px 30px 22px; }
.step__title { font: 600 1.6rem/1.2 var(--display); margin-bottom: 22px; }
.step__title:focus { outline: none; }

.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choices--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice__box { display: block; height: 100%; padding: 14px 14px 16px; border: 2px solid var(--hair); border-radius: 14px; background: #fff; transition: border-color .15s ease, background-color .15s ease; }
.choice__box b { display: block; font-size: .98rem; margin-bottom: 4px; }
.choice__box small { display: block; font-size: .84rem; line-height: 1.4; color: var(--muted); }
.choice:hover .choice__box { border-color: #AEB7CC; }
.choice input:checked + .choice__box { border-color: var(--cobalt); background: #F2F5FC; box-shadow: inset 0 0 0 1px var(--cobalt); }
.choice input:focus-visible + .choice__box { outline: 3px solid var(--yolk); outline-offset: 2px; }

.chipset { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: block; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--hair); background: #fff; font-weight: 600; font-size: .92rem; }
.chip input:checked + span { border-color: var(--cobalt); background: var(--cobalt); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--yolk); outline-offset: 2px; }

.stop { margin: 4px 0 18px; padding: 18px 20px; border-radius: 16px; background: #FFF6DE; border: 1px solid #F0D48D; }
.stop__title { font-weight: 800; margin-bottom: 6px; }
.stop__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-weight: 700; }

.wizard__nav { display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--hair); margin-top: 8px; padding-top: 20px; }
.wizard__nav [data-back] { margin-right: auto; }
.wizard__status { min-height: 1.4em; margin-top: 12px; font-size: .92rem; color: var(--tomato); font-weight: 600; }

.building { display: grid; justify-items: center; gap: 10px; padding: 70px 20px; text-align: center; background: #fff; border: 1.5px solid var(--hair); border-radius: 24px; }
.building__bowl { width: 150px; height: auto; }
.building__body { fill: #fff; stroke: var(--cobalt); stroke-width: 3; }
.building__fill rect { fill: var(--yolk); transform-box: fill-box; transform-origin: 50% 100%; animation: fillup 1.8s ease-in-out infinite; }
.building__fill rect:nth-child(2) { fill: #95573C; animation-delay: .3s; }
.building__fill rect:nth-child(3) { fill: #5F8D3B; animation-delay: .6s; }
@keyframes fillup { 0%, 15% { transform: scaleY(0); } 45%, 80% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.building__title { font: 600 1.5rem/1.2 var(--display); }
.building__sub { color: var(--muted); }

/* Recipe page */
.recipe__loading { padding: 60px 0; color: var(--muted); }
.recipe__missing { padding: 40px 0; }
.recipe__missing p { margin: 0 0 22px; color: var(--muted); }
.recipe__head { margin-bottom: 28px; }
.recipe__head .h2 { margin-bottom: 12px; }
.recipe__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.recipe__actions .btn { padding: 12px 18px; font-size: .94rem; }
.recipe__status { min-height: 1.4em; margin-top: 10px; font-size: .9rem; color: var(--muted); }
.recipe__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.recipe__bowl { margin: 0; align-self: start; position: sticky; top: 96px; }
.recipe__bowl figcaption { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.recipe__label .facts { max-width: none; }
.recipe__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; margin: 48px 0 36px; }
.recipe__section h2 { font: 600 1.4rem/1.2 var(--display); margin-bottom: 12px; }
.howto { list-style: decimal; padding-left: 22px; display: grid; gap: 8px; }
.plain { display: grid; gap: 8px; }
.plain li { padding-left: 16px; position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--yolk); }
.plan { display: grid; gap: 12px; }
.plan li { padding: 12px 14px; background: #fff; border: 1px solid var(--hair); border-radius: 12px; }
.plan__note { margin-top: 4px; font-size: .9rem; color: var(--muted); }
.recipe .never { max-width: 520px; }
.recipe__disclaimer { margin-top: 28px; font-size: .86rem; color: var(--muted); max-width: 60em; }

/* Account */
.account { max-width: 820px; }
.auth { max-width: 460px; margin-top: 10px; }
.auth__tabs { margin-bottom: 22px; }
.auth__form .btn--wide { margin-top: 4px; }
.account__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 26px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card--link { display: block; text-decoration: none; color: var(--ink); padding: 18px 20px; background: #fff; border: 1.5px solid var(--hair); border-radius: 16px; }
.card--link:hover { border-color: var(--cobalt); }
.card--link h3 { font: 600 1.3rem/1.2 var(--display); margin-bottom: 6px; }
.card--link p { font-size: .9rem; color: var(--muted); }
.empty { color: var(--muted); }
.danger { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--hair); }
.danger h2 { font-size: 1.05rem; margin-bottom: 6px; }
.danger p { color: var(--muted); font-size: .92rem; margin-bottom: 12px; max-width: 40em; }

@media (max-width: 900px) {
  .recipe__grid { grid-template-columns: minmax(0, 1fr); }
  .recipe__bowl { position: static; }
  .recipe__label { max-width: 440px; justify-self: center; width: 100%; }
  .recipe__cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .choices, .choices--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wizard { padding: 22px 18px 18px; border-radius: 18px; }
  .progress li { font-size: 0; gap: 0; justify-content: center; }
  .progress li span { font-size: .78rem; }
  .choices, .choices--4 { grid-template-columns: minmax(0, 1fr); }
  .app__nav { gap: 14px; }
  .app__nav a { font-size: .88rem; }
}

@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  .top, .foot, .skip, .recipe__actions, .recipe__status { display: none !important; }
  .app main { padding: 0; }
  .recipe__grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; }
  .bowl--full { display: block !important; }
  .bowl--compact { display: none !important; }
  .facts { box-shadow: none; break-inside: avoid; }
  .recipe__cols { margin: 18px 0; gap: 12px 24px; }
  .recipe__section, .plan li, .never { break-inside: avoid; }
}
