/* ==========================================================================
   Standfast — interactive surfaces (checker, wizard, pack, checkout)
   ========================================================================== */

.app-shell {
  min-height: calc(100vh - 69px);
  background:
    radial-gradient(900px 460px at 50% -6%, var(--green-050) 0%, rgba(238,245,242,0) 60%),
    var(--paper);
  padding: var(--s-7) 0 var(--s-9);
}

.app-head { max-width: 780px; margin: 0 auto var(--s-6); text-align: center; }
.app-head h1 { font-size: clamp(2rem, 3.4vw, 2.7rem); margin-bottom: var(--s-3); }
.app-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* --------------------------------------------------------------- progress */
.progress { max-width: 780px; margin: 0 auto var(--s-5); }
.progress__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .84rem; font-weight: 600; color: var(--muted);
  margin-bottom: 9px; letter-spacing: .01em;
}
.progress__meta strong { color: var(--green-800); font-weight: 600; }
.progress__track {
  height: 7px; background: var(--sand); border-radius: 999px; overflow: hidden;
}
.progress__fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green-600), var(--green-500));
  width: 0%; transition: width .45s cubic-bezier(.3,.8,.3,1);
}

/* step dots (wizard) */
.stepdots {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  max-width: 780px; margin: 0 auto var(--s-6);
}
.stepdot {
  font-size: .76rem; font-weight: 600; color: var(--muted-light);
  padding: 5px 11px; border-radius: 999px; border: 1px solid transparent;
  background: transparent; white-space: nowrap;
}
.stepdot.is-done { color: var(--green-700); background: var(--green-050); }
.stepdot.is-current {
  color: var(--white); background: var(--green-700); border-color: var(--green-700);
}
@media (max-width: 760px) { .stepdots { display: none; } }

/* --------------------------------------------------------------- question card */
.qcard {
  max-width: 780px; margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--s-7) var(--s-7) var(--s-6);
}
@media (max-width: 620px) { .qcard { padding: var(--s-5); } }

.qcard__kicker {
  font-size: .78rem; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 700; color: var(--green-600); margin-bottom: var(--s-3);
}
.qcard h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.05rem);
  margin-bottom: var(--s-3); line-height: 1.2;
}
.qcard__help {
  color: var(--muted); font-size: 1.02rem; line-height: 1.6;
  margin: 0 0 var(--s-6); max-width: 58ch;
}
.qcard__help em { font-style: italic; color: var(--ink-soft); }

/* --------------------------------------------------------------- options */
.options { display: grid; gap: 10px; margin-bottom: var(--s-6); }
.options--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .options--2 { grid-template-columns: 1fr; } }

.option {
  display: flex; align-items: flex-start; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--white);
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: var(--sans); font-size: 1.04rem; color: var(--ink);
  transition: border-color .13s ease, background .13s ease, box-shadow .13s ease, transform .1s ease;
}
.option:hover { border-color: var(--green-500); background: var(--green-050); }
.option:active { transform: translateY(1px); }
.option.is-selected {
  border-color: var(--green-700); background: var(--green-050);
  box-shadow: 0 0 0 3px rgba(78,139,123,.16);
}
.option__box {
  flex: none; width: 22px; height: 22px; margin-top: 2px;
  border: 1.5px solid var(--rule-strong); border-radius: 6px;
  background: var(--white);
  display: grid; place-items: center;
  transition: all .13s ease;
}
.option--radio .option__box { border-radius: 999px; }
.option.is-selected .option__box {
  background: var(--green-700); border-color: var(--green-700);
}
.option.is-selected .option__box::after {
  content: ""; width: 10px; height: 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.option__label { font-weight: 550; line-height: 1.4; color: var(--green-900); }
.option__note { display: block; font-size: .9rem; color: var(--muted); font-weight: 400; margin-top: 3px; line-height: 1.45; }

/* --------------------------------------------------------------- fields */
.field { margin-bottom: var(--s-5); }
.field__label {
  display: block; font-weight: 600; font-size: 1.02rem;
  color: var(--green-900); margin-bottom: 6px;
}
.field__hint { font-size: .92rem; color: var(--muted); margin: 0 0 10px; line-height: 1.5; }
.input, .textarea, .select {
  width: 100%; font-family: var(--sans); font-size: 1.05rem; color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius);
  padding: 13px 15px; line-height: 1.5;
  transition: border-color .13s ease, box-shadow .13s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-light); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(78,139,123,.16);
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.6 6 6.4l5-4.8' stroke='%235F6F69' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 12px;
  padding-right: 40px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- nav */
.qnav {
  display: flex; align-items: center; gap: var(--s-3);
  border-top: 1px solid var(--rule); padding-top: var(--s-5); margin-top: var(--s-6);
}
.qnav__spacer { flex: 1; }
.qnav__hint { font-size: .88rem; color: var(--muted-light); }

.btn-back {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: .98rem; font-weight: 600; color: var(--muted);
  padding: 12px 4px; display: inline-flex; align-items: center; gap: 7px;
}
.btn-back:hover { color: var(--green-800); }

.qsaved {
  max-width: 780px; margin: var(--s-4) auto 0; text-align: center;
  font-size: .86rem; color: var(--muted-light);
}

/* --------------------------------------------------------------- result */
.result { max-width: 860px; margin: 0 auto; }
.result__banner {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--s-7) var(--s-7) var(--s-6);
  color: var(--white);
}
.result__banner--standard { background: linear-gradient(150deg, var(--green-700), var(--green-900)); }
.result__banner--enhanced { background: linear-gradient(150deg, #8A5A1E, #5D3A10); }
.result__banner--out     { background: linear-gradient(150deg, #46605A, #23332F); }

.result__tier {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; opacity: .75; margin-bottom: var(--s-3);
}
.result__banner h2 {
  color: var(--white); font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-bottom: var(--s-4); max-width: 20ch;
}
.result__banner p { font-size: 1.12rem; line-height: 1.6; margin: 0; opacity: .93; max-width: 56ch; }

.result__body {
  background: var(--white); border: 1px solid var(--rule); border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: var(--s-7);
  box-shadow: var(--shadow-md);
}
@media (max-width: 620px) { .result__banner, .result__body { padding: var(--s-5); } }

.reasoning { margin: 0 0 var(--s-6); }
.reasoning h3 { font-size: 1.2rem; margin-bottom: var(--s-4); }
.reasoning ol { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.reasoning li {
  position: relative; padding: 0 0 var(--s-4) 40px; counter-increment: r;
  border-left: 1px solid var(--rule); margin-left: 12px;
}
.reasoning li:last-child { border-left-color: transparent; padding-bottom: 0; }
.reasoning li::before {
  content: counter(r); position: absolute; left: -12px; top: -2px;
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--green-050); border: 1px solid var(--green-100);
  color: var(--green-700); font-size: .74rem; font-weight: 700;
  display: grid; place-items: center;
}
.reasoning__q { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 2px; }
.reasoning__a { display: block; font-weight: 600; color: var(--green-900); font-size: 1.02rem; }
.reasoning__rule {
  display: block; margin-top: 6px; font-size: .92rem; color: var(--muted);
  background: var(--paper-2); border-radius: 6px; padding: 8px 11px; line-height: 1.5;
}

.result__next { border-top: 1px solid var(--rule); padding-top: var(--s-6); }
.result__next h3 { margin-bottom: var(--s-4); }
.result__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-6); }

.disclaimer {
  margin-top: var(--s-5);
  font-size: .92rem; color: var(--muted); line-height: 1.6;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: var(--s-4) var(--s-5);
}
.disclaimer strong { color: var(--green-900); }

/* --------------------------------------------------------------- misc app */
.app-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .93rem; font-weight: 600; color: var(--muted);
  text-decoration: none; margin-bottom: var(--s-5);
}
.app-back:hover { color: var(--green-800); }

@media print {
  .site-header, .site-footer, .result__actions, .app-back, .no-print { display: none !important; }
  .app-shell { background: #fff; padding: 0; }
  .result__body, .qcard { box-shadow: none; border: none; }
  body { font-size: 12pt; }
}
