/* Business value estimator (js/valuation.js): the /valuation page and the embed in every selling guide.
   Uses the tokens in styles.css. "Save as PDF" prints only #gmv-print (see the print rules at the end). */
.gmv { --gmv-gold: #C9A272; --gmv-line: var(--slate-200); }
.gmv [hidden] { display: none !important; }
.gmv-panel { padding: clamp(22px, 4vw, 40px); background: var(--white); border: 1px solid var(--gmv-line); box-shadow: 0 24px 48px -36px rgba(8, 42, 46, .25); }
.gmv .gmv-tag { margin: 0 0 8px; font-size: .6875rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--cognac); }

/* Form */
.gmv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.gmv-wide { grid-column: 1 / -1; }
.gmv-field { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.gmv-field > span, .gmv-field > legend { display: block; margin-bottom: 7px; padding: 0; font-size: .8125rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.gmv-field em { font-style: normal; font-weight: 400; color: var(--slate); }
.gmv-field input:not([type=radio]):not([type=checkbox]), .gmv-field select {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--gmv-line); border-radius: 2px; background: var(--white);
  font: inherit; font-size: 1rem; color: var(--ink); transition: border-color .2s var(--ease);
}
.gmv-field select { appearance: none; padding-right: 36px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2356625F' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px; }
.gmv-field input:focus, .gmv-field select:focus { outline: 2px solid var(--steel); outline-offset: 1px; border-color: var(--steel); }
.gmv-field [aria-invalid="true"] { border-color: #A33A3A !important; }
.gmv-basis { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.gmv-basis legend { width: 100%; }
.gmv-basis label { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-size: 1rem; color: var(--ink); cursor: pointer; }
.gmv-basis input { width: 18px; height: 18px; accent-color: var(--navy); }
.gmv .gmv-hint { flex-basis: 100%; margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--slate); }
.gmv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 24px; }
.gmv .gmv-private { flex: 1 1 260px; margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--slate); }
.gmv .gmv-private a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.gmv .gmv-status { margin: 14px 0 0; font-size: .9375rem; color: #8C2F2F; }
.gmv .gmv-status:empty { display: none; }
.gmv button.btn { cursor: pointer; }
.gmv .btn[disabled] { opacity: .5; cursor: wait; }
.gmv .btn-gold { background: var(--gmv-gold); color: var(--navy-deep); }
.gmv .btn-gold:hover { background: #D7B98F; }
.gmv-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Result */
.gmv-result { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--gmv-line); }
.gmv-result:focus { outline: none; }
.gmv-figs { display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: end; gap: 12px; text-align: center; }
.gmv-figs span { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
.gmv-figs b { display: block; margin-top: 4px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.625rem, 3.6vw, 2.25rem); line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.gmv-figs .typ b { font-size: clamp(2.25rem, 5.4vw, 3.25rem); color: var(--navy); }
.gmv-bar { position: relative; height: 8px; margin: 16px 0 18px; border-radius: 4px; background: linear-gradient(90deg, var(--slate-200), var(--steel), var(--slate-200)); }
.gmv-bar i { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 3px solid var(--white); border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.gmv .gmv-basis-line { margin: 0 0 14px; font-size: .875rem; line-height: 1.55; color: var(--slate); }
.gmv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.gmv .gmv-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--gmv-line); border-radius: 999px; font-size: .8125rem; color: var(--body); background: var(--mist); }
.gmv-chips b { font-weight: 600; color: var(--slate); }
.gmv-chips .up b { color: #2E6B4F; }
.gmv-chips .down b { color: #9A3B2E; }
.gmv .gmv-notes { margin: 0 0 14px; padding: 0 0 0 18px; font-size: .875rem; line-height: 1.55; color: var(--body); }
.gmv .gmv-notes li { font-size: .875rem; line-height: 1.55; }
.gmv .gmv-notes li + li { margin-top: 6px; }
.gmv .gmv-disclaim { margin: 0; font-size: .75rem; line-height: 1.5; color: var(--slate); }
.gmv .gmv-disclaim a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Email gate */
.gmv-gate { margin-top: 28px; padding: clamp(22px, 4vw, 32px); background: var(--navy-deep); color: #C9D6D4; }
.gmv .gmv-gate .gmv-tag { color: var(--gmv-gold); }
.gmv-gate h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.375rem, 3vw, 1.75rem); line-height: 1.2; color: var(--white); }
.gmv .gmv-gate > p { color: #C9D6D4; }
.gmv .gmv-gate > p { margin: 0 0 20px; max-width: 58ch; font-size: .9375rem; line-height: 1.55; }
.gmv-gate .gmv-field > span { color: #DCE5E4; }
.gmv-gate .gmv-field em { color: #93A8A6; }
.gmv-gate .gmv-field input { border-color: #3B5C60; background: rgba(255, 255, 255, .06); color: var(--white); }
.gmv-gate .gmv-field input:focus { outline-color: var(--gmv-gold); border-color: var(--gmv-gold); }
.gmv .gmv-gate .gmv-private { color: #AFC1BF; }
.gmv .gmv-gate .gmv-status { color: #F2B8AC; }

/* Report */
.gmv-report { margin-top: 28px; padding: clamp(22px, 4vw, 36px); border: 1px solid var(--gmv-line); background: var(--white); }
.gmv-report:focus { outline: none; }
.gmv-rep-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--gmv-line); }
.gmv-rep-head .brand-logo { width: auto; height: 22px; color: var(--navy); }
.gmv .gmv-rep-head p { margin: 0; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.gmv-report h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.2; color: var(--ink); }
.gmv-report h4 { margin: 26px 0 10px; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); }
.gmv .gmv-rep-sum { margin: 0; font-size: 1rem; line-height: 1.6; }
.gmv-rep-list { margin: 0; padding: 0; list-style: none; counter-reset: rep; }
.gmv-rep-list li { padding: 12px 0; border-top: 1px solid var(--gmv-line); }
.gmv-rep-list:not(.plain) li { counter-increment: rep; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; }
.gmv-rep-list:not(.plain) li::before { content: counter(rep); grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: .75rem; font-weight: 600; line-height: 24px; text-align: center; }
.gmv .gmv-rep-list p { margin: 0; font-size: .9375rem; line-height: 1.55; }
.gmv-rep-list .t { font-weight: 600; color: var(--ink); }
.gmv-rep-list .t span { display: block; font-weight: 400; color: #9A3B2E; }
.gmv-rep-list.plain .t span { color: #2E6B4F; }
.gmv .gmv-rep-list p + p { margin-top: 4px; }
.gmv-report a { color: var(--steel); text-decoration: underline; text-underline-offset: 3px; }
.gmv-rep-next { margin-top: 26px; padding: 20px 22px; background: var(--mist); }
.gmv-rep-next h4 { margin-top: 0; }
.gmv-rep-next ol { margin: 0; padding-left: 20px; }
.gmv .gmv-rep-next li { font-size: .9375rem; line-height: 1.55; }
.gmv .gmv-rep-next li + li { margin-top: 10px; }
.gmv-rep-who { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--gmv-line); }
.gmv-rep-who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.gmv .gmv-rep-who p { margin: 0; font-size: .875rem; line-height: 1.5; }
.gmv-rep-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.gmv-rep-actions .btn-outline { text-decoration: none; }
.gmv-rep-fine { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--gmv-line); }
.gmv .gmv-rep-fine p { margin: 0 0 8px; font-size: .75rem; line-height: 1.55; color: var(--slate); }

@media (max-width: 640px) {
  .gmv-grid { grid-template-columns: 1fr; }
  .gmv-figs { grid-template-columns: 1fr 1fr; }
  .gmv-figs .typ { grid-column: 1 / -1; order: -1; }
}

/* Inside a selling guide */
.ins-valuation { margin: 44px 0 8px; }
.ins-valuation > h2 { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; color: var(--ink); }
.ins-body .ins-valuation > p { margin: 0 0 18px; font-size: .9375rem; color: var(--slate); }

/* "Save as PDF" prints only the copied report */
#gmv-print { display: none; }
@media print {
  html.gmv-printing body > *:not(#gmv-print) { display: none !important; }
  html.gmv-printing #gmv-print { display: block; }
  html.gmv-printing body { background: #fff; }
  #gmv-print .gmv-report { margin: 0; padding: 0; border: 0; font-size: 11pt; }
  #gmv-print .gmv-rep-actions { display: none; }
  #gmv-print .gmv-rep-list li, #gmv-print .gmv-rep-next { break-inside: avoid; }
  #gmv-print a { color: var(--ink); }
  @page { margin: 16mm; }
}
