/* Applicant results: visible decisions and compact product groups. */
#queryResult { scroll-margin-top: 24px; }
.query-result.query-result-notice { border: 0; padding: 0; background: transparent; margin-top: 28px; }
.query-session-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 13px; border: 1px solid var(--line); background: #fffdf8; color: var(--muted); font-size: 12px; }
.query-resource-status { margin: 18px 0; padding: 14px; border: 1px solid var(--line); background: #fffdf8; }
.query-resource-status h3 { margin: 0 0 5px; font-size: 16px; color: var(--wine); }
.query-resource-status-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 12px 0; }
.query-resource-status-grid > div { display: grid; gap: 5px; min-width: 0; padding: 10px; border: 1px solid #e4d7d1; background: var(--cream); }
.query-resource-status-grid span { color: var(--muted); font-size: 12px; }
.query-resource-status-grid strong { overflow-wrap: anywhere; color: var(--wine); font-size: 13px; }
.query-resource-status-grid strong.is-empty { color: var(--muted); font-weight: 500; }
.query-result-notice .sample-query { margin: 0; }
.query-summary { --result-color: #735023; --result-line: #dac9aa; --result-bg: #faf5e9; border: 1px solid var(--result-line); border-top: 5px solid var(--result-color); background: var(--result-bg); border-radius: 10px; padding: 22px 24px; overflow-wrap: anywhere; }
.query-summary.is-success { --result-color: #a52a2a; --result-line: #cda65d; --result-bg: #fff1ed; }
.query-summary.is-action { --result-color: #955207; --result-line: #e4c496; --result-bg: #fff7e8; }
.query-summary.is-review { --result-color: #655747; --result-line: #d8c9b0; --result-bg: #faf7f0; }
.query-summary.is-ended { --result-color: #685e56; --result-line: #d1c9bf; --result-bg: #f3f0eb; }
.query-summary-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #605b52; line-height: 1.7; }
.query-summary-meta strong { font-size: 16px; letter-spacing: 1px; font-variant-numeric: tabular-nums; color: #302c26; }
.query-summary-meta .text-button { padding: 3px 6px; min-height: 28px; font-size: 12px; }
.query-summary-name { font-size: clamp(21px,3.8vw,27px); line-height: 1.4; font-weight: 750; margin: 12px 0 16px; color: #302c26; }
.query-status-label { display: block; font-size: 12px; line-height: 1.5; margin: 0 0 5px; color: #605b52; }
.query-status-title { display: block; font-size: clamp(23px,4.4vw,30px); font-weight: 750; line-height: 1.4; margin: 0 0 10px; color: var(--result-color); }
.query-next-step { margin: 0; line-height: 1.8; font-size: 15px; color: #443e34; white-space: pre-line; }
.query-counts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 17px 0 0; padding-top: 12px; border-top: 1px solid var(--result-line); font-size: 13px; color: #514c43; }
.query-counts strong { font-size: 19px; color: var(--result-color); font-variant-numeric: tabular-nums; margin: 0 3px; }
.query-result-notice .sample-progress { margin: 16px 0 20px; }
.query-products { display: grid; gap: 16px; margin: 20px 0; }
.query-product-group { border: 1px solid #dedbd2; border-radius: 9px; padding: 15px; background: #fdfbf7; min-width: 0; }
.query-group-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; margin: 0 0 12px; font-size: 16px; line-height: 1.5; color: #423e37; }
.query-group-heading span { font-size: 12px; font-weight: 500; }
.query-product-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.query-product-card { min-width: 0; padding: 13px 14px; border: 1px solid #e1ded6; border-radius: 7px; background: #fff; overflow-wrap: anywhere; }
.query-product-card h4,.query-product-card>strong { display: block; font-size: 17px; line-height: 1.55; font-weight: 700; margin: 0 0 8px; color: #352f25; }
.query-product-status { display: inline-block; border-radius: 4px; padding: 3px 8px; font-size: 12px; line-height: 1.5; font-weight: 650; color: #655747; background: #f3ecdf; }
.query-product-note { display: block; font-size: 13px; line-height: 1.75; color: #645e52; margin: 9px 0 0; white-space: pre-line; }
.query-product-group.is-passed { border: 2px solid #cda65d; background: #fff7e8; }
.query-product-group.is-passed .query-group-heading { color: #a52a2a; font-size: 18px; }
.query-product-group.is-passed .query-product-card { border-color: #d9bb80; background: #fffaf2; }
.query-product-group.is-passed .query-product-card h4,.query-product-group.is-passed .query-product-card>strong { color: #a52a2a; font-size: 19px; }
.query-product-group.is-passed .query-product-status { color: #a52a2a; background: #fbe3dc; }
.query-product-group.is-action { border-color: #dfbd85; background: #fffaef; }
.query-product-group.is-action .query-group-heading { color: #895007; }
.query-product-group.is-action .query-product-status { color: #7b4300; background: #fff0d0; }
.query-product-group.is-declined { background: #f6f3ed; border-color: #d6cec2; }
.query-product-group.is-declined .query-product-status { color: #685e56; background: #ede8df; }
.query-event-info { border: 1px solid #d9bb80; border-left: 4px solid #a52a2a; border-radius: 8px; background: #fff8ed; padding: 17px 18px; margin: 20px 0; overflow-wrap: anywhere; }
.query-event-info h3 { color: #a52a2a; font-size: 17px; margin: 0 0 10px; }
.query-summary.is-ended ~ .query-event-info { border-color: #d1c9bf; border-left-color: #817468; background: #f6f3ed; }
.query-summary.is-ended ~ .query-event-info h3 { color: #685e56; }
.query-event-info p { margin: 6px 0; line-height: 1.8; font-size: 14px; white-space: pre-line; }
.query-event-info.is-approved { border-width: 2px; border-left-width: 5px; background: #fff4e3; }
.query-event-dates { display: grid; gap: 4px; margin: 14px 0; }
.query-event-dates span { font-size: 13px; color: #655747; }
.query-event-dates strong { color: #a52a2a; font-size: clamp(21px,4vw,27px); line-height: 1.5; }
.query-event-venue { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 12px 20px; padding: 13px 0; margin: 0 0 8px; border-bottom: 1px solid #e0c89e; }
.query-event-venue dt { color: #655747; font-size: 12px; margin-bottom: 4px; }
.query-event-venue dd { margin: 0; color: #473b2b; font-weight: 650; font-size: 15px; line-height: 1.7; white-space: pre-line; }
.query-event-info .query-event-scope { font-size: 13px; color: #6a4d2c; }
.query-shipping { border: 1px solid #dfbd85; background: #fffaf0; border-radius: 9px; padding: 18px; margin: 20px 0; }
.query-shipping>h3 { color: #7b4300; font-size: 18px; }
.query-shipping .sample-address { background: #fff; border: 1px solid #e9dcc8; border-radius: 7px; padding: 14px; }
.query-shipping .sample-address dd { font-size: 15px; font-weight: 650; color: #4f3923; line-height: 1.6; }
.query-shipping-history,.query-registration-details { border-top: 1px solid #dfd6c6; padding-top: 14px; margin-top: 20px; font-size: 13px; }
.query-shipping-history>summary,.query-registration-details>summary { cursor: pointer; font-weight: 600; line-height: 1.8; color: #655741; }
.query-shipping-history[open]>summary,.query-registration-details[open]>summary { margin-bottom: 14px; }
.query-shipping-history:focus-within,.query-registration-details:focus-within { outline-offset: 3px; }
.query-result-notice .sample-buttons { margin-top: 20px; }
.query-result-notice .sample-buttons [data-refresh] { font-size: 13px; }
@media(max-width:700px) {
  .query-panel { width: calc(100% - 24px); margin-top: 20px; }
  .query-panel .query-card { padding: 18px 14px; }
  .query-summary { padding: 17px 15px; }
  .query-summary-name { margin-bottom: 12px; }
  .query-next-step { font-size: 14px; }
  .query-counts { gap: 7px 12px; }
  .query-product-cards { grid-template-columns: 1fr; }
  .query-product-group { padding: 12px; }
  .query-product-card { padding: 11px 12px; }
  .query-resource-status-grid { grid-template-columns: minmax(0,1fr); }
  .query-product-group.is-passed .query-product-card h4,.query-product-group.is-passed .query-product-card>strong { font-size: 18px; }
  .query-event-info,.query-shipping { padding: 14px 12px; }
  .query-event-venue { grid-template-columns: minmax(0,1fr); }
  .query-shipping .field-grid { grid-template-columns: minmax(0,1fr); }
  .query-shipping .sample-address { padding: 11px; }
}

/* A2: current action first, compact audit rows and aligned parcel fields. */
.query-top-actions{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0 22px;justify-content:flex-end}.query-top-actions button{font-size:13px;padding:10px 16px}.query-account-actions{margin:0 0 14px}.query-summary{padding:20px 22px}.query-summary-name{margin:12px 0}.query-status-title{font-size:24px}.query-next-step{font-size:14px;line-height:1.65}.query-section-heading{font-size:19px;margin:0;color:var(--wine)}.query-products{gap:12px}.query-product-group,.query-product-group.is-passed{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:8px 0 14px;background:transparent}.query-product-cards{grid-template-columns:minmax(0,1fr);gap:0}.query-product-card,.query-product-group.is-passed .query-product-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;align-items:start;background:transparent;border:0;border-radius:0;padding:12px 0}.query-product-card>strong,.query-product-group.is-passed .query-product-card>strong{font-size:15px;margin:0;color:var(--ink)}.query-product-note{grid-column:1/-1;margin:0;font-size:12px}.query-group-heading,.query-product-group.is-passed .query-group-heading{font-size:14px;margin:0}.query-shipping{padding:18px 20px}.query-shipping>h3{font-size:18px}.query-shipping .sample-entry{border:0;padding:0;margin:12px 0}.sample-entry h4{font-size:15px;color:var(--wine);margin:0 0 12px}.query-shipping .field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;align-items:start}.query-shipping .parcel-field{display:flex;flex-direction:column;gap:8px;min-width:0}.parcel-field>span{font-size:13px;font-weight:600;line-height:20px}.query-shipping .parcel-field input{height:46px;box-sizing:border-box;min-width:0;width:100%}.parcel-error{color:#aa313c;font-size:12px;line-height:1.6;grid-column:1/-1}.parcel-error:empty{display:none}.query-shipping .sample-address{margin:0;gap:10px}.query-shipping .sample-important{margin:10px 0 0;padding:10px 12px}.query-shipping .sample-product-choice{margin:0;min-width:0}.query-shipping .sample-ack{gap:8px;align-items:flex-start}.query-shipping .form-actions{margin:0;justify-content:flex-end}.query-shipping .sample-feedback{min-height:0;margin:0}.query-action-reason{font-size:13px;line-height:1.7;margin:8px 0}.query-auxiliary{border-top:1px solid var(--line);padding:12px 0;margin-top:18px;font-size:12px;color:var(--muted)}.query-auxiliary>summary{cursor:pointer}.query-auxiliary .sample-progress{margin:12px 0}.query-shipping form{scroll-margin-top:85px}.query-product-group .hint{font-size:12px;margin:6px 0}.query-shipping-history{margin:14px 0 0;padding-top:10px}
@media(max-width:700px){.query-summary{padding:16px 14px}.query-status-title{font-size:21px}.query-top-actions{justify-content:flex-start}.query-shipping{padding:14px 12px}.query-shipping .field-grid{grid-template-columns:minmax(0,1fr)}.query-product-card{grid-template-columns:minmax(0,1fr)}.query-product-status{justify-self:start}.query-shipping .form-actions button{width:100%}.query-summary-meta{gap:6px 12px}}
.query-shipping .sample-important>strong{display:inline}

.query-parcel-latest{display:grid;gap:7px;font-size:13px;padding:12px 0;overflow-wrap:anywhere}.query-parcel-latest span{font-size:12px;color:var(--muted)}.query-parcel-latest strong{color:var(--wine)}.query-parcel-latest p{margin:0;color:var(--muted)}
.query-card>h1{font-size:clamp(28px,4vw,38px);line-height:1.25;margin:4px 0 22px}
