/* ======================================================================
   AKFA PLAST AI LABORATORY — v8 UI layer maintained in 0.10.0
   Deterministic system selector, saved AI consultations and source
   governance. All visual material is rendered with HTML/CSS/SVG.
   ====================================================================== */

:root {
  --v8-red: #ed1c24;
  --v8-red-deep: #b70811;
  --v8-red-soft: #fff0f1;
  --v8-ink: #151518;
  --v8-muted: #74767e;
  --v8-line: rgba(21, 21, 24, .105);
  --v8-panel: #fff;
  --v8-blueprint: #eef1f4;
  --v8-success: #138c5c;
  --v8-warning: #c17b14;
  --v8-risk: #b31920;
  --v8-ease: cubic-bezier(.16, 1, .3, 1);
}

/* Header selector entry ------------------------------------------------ */
.v8-selector-launch {
  position: relative;
  min-height: 42px;
  padding: 0 15px 0 8px;
  border-color: var(--v8-red) !important;
  background: linear-gradient(135deg, #f12831, #d51019) !important;
  color: #fff !important;
  box-shadow: 0 10px 25px rgba(237, 28, 36, .18) !important;
  overflow: hidden;
}
.v8-selector-launch::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -30%;
  width: 34%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
  animation: v8-selector-sheen 5s ease-in-out infinite;
}
.v8-selector-launch:hover { transform: translateY(-2px); background: linear-gradient(135deg, #ff343d, #c90912) !important; }
.v8-selector-ai {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
  color: #fff;
  font: 900 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.v8-selector-tab span {
  min-width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--v8-red);
  color: #fff !important;
}
.v8-save-chat {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(237,28,36,.16);
  border-radius: 10px;
  background: #fff4f5;
  color: var(--v8-red-deep);
  cursor: pointer;
  transition: .24s var(--v8-ease);
}
.v8-save-chat:hover { transform: translateY(-1px); border-color: rgba(237,28,36,.35); background: #ffe8ea; }
.v8-save-chat svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.v8-save-chat b { font-size: 7px; }

/* Selector panel ------------------------------------------------------- */
.v8-selector-panel {
  padding: clamp(18px, 2vw, 30px) !important;
  background:
    linear-gradient(rgba(20,21,24,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,21,24,.018) 1px, transparent 1px),
    #f2f3f5;
  background-size: 42px 42px;
}
.v8-selector-hero {
  width: min(100%, 1540px);
  min-height: 146px;
  margin: 0 auto 14px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 34px;
  padding: clamp(24px, 2.6vw, 38px);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(237,28,36,.28), transparent 33%),
    linear-gradient(135deg, #131417 0%, #232429 64%, #39080c 150%);
  box-shadow: 0 24px 70px rgba(18,19,22,.16);
  overflow: hidden;
  position: relative;
}
.v8-selector-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, #000, transparent 94%);
}
.v8-selector-hero::after {
  content: "AI";
  position: absolute;
  right: 1.5%;
  bottom: -41%;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.075);
  font-size: 220px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.12em;
}
.v8-selector-hero > * { position: relative; z-index: 1; }
.v8-selector-badge {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  backdrop-filter: blur(10px);
}
.v8-selector-badge i { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: var(--v8-red); color: #fff; font: 900 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace; font-style: normal; }
.v8-selector-badge b { color: rgba(255,255,255,.64); font: 850 6.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .12em; }
.v8-selector-hero h3 { max-width: 840px; margin: 0; font-size: clamp(30px, 3.15vw, 54px); line-height: .98; letter-spacing: -.057em; }
.v8-selector-hero p { max-width: 830px; margin: 13px 0 0; color: rgba(255,255,255,.59); font-size: 10px; line-height: 1.65; }
.v8-selector-method { min-width: 340px; display: grid; grid-template-columns: repeat(3, minmax(94px,1fr)); gap: 7px; }
.v8-selector-method span { min-height: 72px; display: grid; align-content: center; gap: 8px; padding: 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px; background: rgba(255,255,255,.055); backdrop-filter: blur(12px); }
.v8-selector-method small { color: rgba(255,255,255,.38); font: 800 5.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .12em; }
.v8-selector-method strong { font-size: 10px; line-height: 1.1; }

.v8-selector-shell {
  width: min(100%, 1540px);
  min-height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 228px minmax(0,1fr);
  gap: 12px;
  align-items: stretch;
}
.v8-selector-shell.has-result { grid-template-columns: minmax(0,1fr); }
.v8-selector-shell.has-result .v8-selector-steps { display: none; }
.v8-selector-steps {
  position: sticky;
  top: 0;
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--v8-line);
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 16px 50px rgba(24,25,29,.055);
}
.v8-selector-steps > button {
  min-height: 72px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--v8-muted);
  text-align: left;
  cursor: pointer;
  transition: .25s var(--v8-ease);
}
.v8-selector-steps > button:hover { background: #f7f7f8; color: var(--v8-ink); }
.v8-selector-steps > button.is-active { border-color: rgba(237,28,36,.16); background: var(--v8-red-soft); color: var(--v8-red-deep); }
.v8-selector-steps > button.is-complete:not(.is-active) { color: var(--v8-success); }
.v8-selector-steps > button > i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #f0f1f3; color: #8c8f96; font: 900 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; font-style: normal; }
.v8-selector-steps > button.is-active > i { background: var(--v8-red); color: #fff; box-shadow: 0 8px 20px rgba(237,28,36,.18); }
.v8-selector-steps > button.is-complete:not(.is-active) > i { background: #e8f7ef; color: var(--v8-success); }
.v8-selector-steps > button span { min-width: 0; display: grid; gap: 5px; }
.v8-selector-steps > button b { font-size: 9px; }
.v8-selector-steps > button small { color: inherit; opacity: .68; font-size: 6.5px; }
.v8-selector-progress { position: relative; height: 31px; margin: 5px 4px; border-radius: 10px; background: #eff0f2; overflow: hidden; }
.v8-selector-progress i { position: absolute; inset: 0 auto 0 0; width: 25%; border-radius: inherit; background: linear-gradient(90deg, var(--v8-red), #ff5960); transition: width .45s var(--v8-ease); }
.v8-selector-progress span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; mix-blend-mode: difference; font: 900 6px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.v8-selector-safety { display: grid; grid-template-columns: 30px 1fr; gap: 9px; padding: 12px; border-radius: 13px; background: #191a1e; color: #fff; }
.v8-selector-safety svg { width: 21px; fill: none; stroke: #ff686e; stroke-width: 1.7; }
.v8-selector-safety p { margin: 0; color: rgba(255,255,255,.55); font-size: 6.5px; line-height: 1.5; }

.v8-selector-form {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  padding: clamp(22px, 3vw, 44px);
  border: 1px solid var(--v8-line);
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 55px rgba(25,26,30,.06);
}
.v8-selector-step { min-height: 430px; animation: v8-step-in .38s var(--v8-ease) both; }
.v8-selector-step[hidden] { display: none !important; }
.v8-selector-step > header { max-width: 920px; margin-bottom: 25px; }
.v8-selector-step > header small { color: var(--v8-red); font: 900 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .13em; }
.v8-selector-step > header h4 { margin: 10px 0 8px; font-size: clamp(26px, 2.7vw, 46px); line-height: 1; letter-spacing: -.052em; }
.v8-selector-step > header p { max-width: 780px; margin: 0; color: var(--v8-muted); font-size: 9px; line-height: 1.62; }
.v8-choice-grid { min-width: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin: 0 0 24px; padding: 0; border: 0; }
.v8-choice-grid legend { grid-column: 1 / -1; width: 100%; margin-bottom: 9px; color: var(--v8-muted); font-size: 7px; font-weight: 850; }
.v8-choice-grid label { display: block; min-width: 0; }
.v8-choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.v8-choice-grid label > span {
  min-height: 75px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--v8-line);
  border-radius: 14px;
  background: #fff;
  color: var(--v8-ink);
  cursor: pointer;
  transition: .24s var(--v8-ease);
}
.v8-choice-grid label > span:hover { transform: translateY(-2px); border-color: rgba(237,28,36,.26); box-shadow: 0 13px 30px rgba(24,25,29,.06); }
.v8-choice-grid input:checked + span { border-color: rgba(237,28,36,.45); background: var(--v8-red-soft); box-shadow: inset 0 0 0 1px rgba(237,28,36,.1), 0 13px 30px rgba(237,28,36,.07); }
.v8-choice-grid input:focus-visible + span { outline: 3px solid rgba(237,28,36,.18); outline-offset: 2px; }
.v8-choice-grid span i { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: #eff0f2; color: #8b8d94; font: 900 6px/1 ui-monospace,SFMono-Regular,Menlo,monospace; font-style: normal; }
.v8-choice-grid input:checked + span i { background: var(--v8-red); color: #fff; }
.v8-choice-grid span b { font-size: 9px; line-height: 1.25; }
.v8-choice-grid.is-compact label > span { min-height: 55px; }
.v8-choice-grid.is-compact { grid-template-columns: repeat(4,minmax(0,1fr)); }
.v8-dimension-grid { display: grid; grid-template-columns: minmax(150px,1fr) 20px minmax(150px,1fr) minmax(120px,.55fr); gap: 10px; align-items: end; margin: 0 0 24px; }
.v8-dimension-grid > b { align-self: center; margin-top: 18px; color: #b4b5ba; font-size: 22px; text-align: center; }
.v8-dimension-grid label,
.v8-selector-text-fields label { display: grid; gap: 8px; color: var(--v8-muted); font-size: 7px; font-weight: 800; }
.v8-dimension-grid input,
.v8-selector-text-fields input {
  width: 100%;
  min-height: 53px;
  padding: 0 14px;
  border: 1px solid var(--v8-line);
  border-radius: 13px;
  background: #f8f8f9;
  color: var(--v8-ink);
  font: 780 12px/1 system-ui, sans-serif;
  outline: none;
  transition: .2s;
}
.v8-dimension-grid input:focus,
.v8-selector-text-fields input:focus { border-color: rgba(237,28,36,.48); background: #fff; box-shadow: 0 0 0 4px rgba(237,28,36,.07); }
.v8-dimension-grid [aria-invalid="true"],
.v8-selector-consent [aria-invalid="true"] + span { border-color: var(--v8-risk) !important; box-shadow: 0 0 0 4px rgba(179,25,32,.08) !important; }
.v8-selector-text-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.v8-selector-review { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0 0 22px; }
.v8-selector-review div { min-height: 67px; padding: 12px 13px; border: 1px solid var(--v8-line); border-radius: 13px; background: #f8f8f9; }
.v8-selector-review dt { color: var(--v8-muted); font-size: 6px; font-weight: 800; }
.v8-selector-review dd { margin: 8px 0 0; font-size: 9px; font-weight: 850; }
.v8-selector-consent { display: block; }
.v8-selector-consent input { position: absolute; opacity: 0; }
.v8-selector-consent > span { min-height: 78px; display: grid; align-content: center; gap: 6px; padding: 15px 15px 15px 50px; border: 1px solid rgba(237,28,36,.19); border-radius: 15px; background: #fff6f7; cursor: pointer; position: relative; }
.v8-selector-consent > span::before { content: ""; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); border: 1px solid rgba(237,28,36,.35); border-radius: 7px; background: #fff; }
.v8-selector-consent input:checked + span::before { background: var(--v8-red); box-shadow: inset 0 0 0 6px #fff; }
.v8-selector-consent b { font-size: 9px; }
.v8-selector-consent small { color: var(--v8-muted); font-size: 7px; line-height: 1.45; }
.v8-selector-controls { display: grid; grid-template-columns: minmax(110px,auto) 1fr minmax(150px,auto); align-items: center; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--v8-line); }
.v8-selector-controls > button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid var(--v8-line); border-radius: 12px; background: #fff; color: var(--v8-ink); cursor: pointer; }
.v8-selector-controls > button:disabled { opacity: .35; cursor: not-allowed; }
.v8-selector-controls > button b { font-size: 8px; }
.v8-selector-controls > button.is-primary { border-color: var(--v8-red); background: var(--v8-red); color: #fff; box-shadow: 0 12px 25px rgba(237,28,36,.15); }
.v8-selector-controls > button.is-primary:hover:not(:disabled) { background: var(--v8-red-deep); }
.v8-selector-controls > button.is-loading span { animation: v8-ai-pulse 1s ease-in-out infinite; }
.v8-selector-controls > div { display: flex; align-items: center; gap: 10px; justify-content: center; }
.v8-selector-controls > div span { color: var(--v8-muted); font: 850 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.v8-selector-controls > div i { width: min(180px,30vw); height: 1px; background: var(--v8-line); }

/* Selector result ------------------------------------------------------ */
.v8-selector-result {
  min-width: 0;
  padding: clamp(20px, 2.5vw, 38px);
  border: 1px solid var(--v8-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(25,26,30,.06);
  animation: v8-result-in .48s var(--v8-ease) both;
}
.v8-selector-result[hidden] { display: none !important; }
.v8-selector-result > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.v8-selector-result > header small { color: var(--v8-red); font: 900 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .13em; }
.v8-selector-result > header h4 { margin: 7px 0 0; font-size: clamp(28px,3vw,48px); line-height: 1; letter-spacing: -.055em; }
.v8-selector-result > header > button { min-height: 38px; padding: 0 12px; border: 1px solid var(--v8-line); border-radius: 11px; background: #f7f7f8; color: var(--v8-ink); font-size: 7px; font-weight: 850; cursor: pointer; }
.v8-selector-result-summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: stretch; margin-bottom: 13px; }
.v8-result-headline { padding: 17px; border: 1px solid rgba(237,28,36,.14); border-radius: 15px; background: #fff7f7; }
.v8-result-headline strong { font-size: 11px; }
.v8-result-headline p { margin: 7px 0 0; color: var(--v8-muted); font-size: 7px; line-height: 1.55; }
.v8-result-meta { display: grid; grid-template-columns: repeat(3,minmax(90px,1fr)); gap: 7px; }
.v8-result-meta span { min-width: 100px; display: grid; align-content: center; gap: 5px; padding: 12px; border: 1px solid var(--v8-line); border-radius: 14px; background: #f8f8f9; }
.v8-result-meta b { font-size: 16px; letter-spacing: -.04em; }
.v8-result-meta small { color: var(--v8-muted); font-size: 5.5px; }
.v8-selector-result-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.v8-selector-result-card { min-width: 0; display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto auto; gap: 12px; padding: 18px; border: 1px solid var(--v8-line); border-radius: 18px; background: linear-gradient(180deg,#fff,#fbfbfc); overflow: hidden; position: relative; }
.v8-selector-result-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: #9a9ca2; }
.v8-selector-result-card.is-recommended::before { background: var(--v8-success); }
.v8-selector-result-card.is-possible::before { background: var(--v8-red); }
.v8-selector-result-card.is-attention::before { background: var(--v8-warning); }
.v8-selector-result-card.is-mismatch::before { background: var(--v8-risk); }
.v8-selector-result-card > header { display: grid; grid-template-columns: 36px minmax(0,1fr) 58px; gap: 10px; align-items: center; }
.v8-result-rank { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #1d1e22; color: #fff; font: 900 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.v8-selector-result-card header small { display: block; color: var(--v8-red-deep); font-size: 5.5px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.v8-selector-result-card h5 { margin: 5px 0 0; font-size: 17px; line-height: 1.05; letter-spacing: -.04em; }
.v8-result-score { --score: 0; width: 54px; height: 54px; display: grid; grid-template-columns: auto auto; place-content: center; align-items: baseline; border-radius: 50%; background: radial-gradient(circle at center,#fff 58%,transparent 59%), conic-gradient(var(--v8-red) calc(var(--score)*1%),#e9eaec 0); }
.v8-result-score strong { font-size: 15px; letter-spacing: -.05em; }
.v8-result-score small { font-size: 6px; }
.v8-selector-result-card > p { margin: 0; color: var(--v8-muted); font-size: 7.5px; line-height: 1.55; }
.v8-result-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; margin: 0; border: 1px solid var(--v8-line); border-radius: 12px; overflow: hidden; }
.v8-result-metrics div { min-width: 0; min-height: 47px; padding: 9px; border-right: 1px solid var(--v8-line); border-bottom: 1px solid var(--v8-line); }
.v8-result-metrics div:nth-child(2n) { border-right: 0; }
.v8-result-metrics div:nth-last-child(-n+2) { border-bottom: 0; }
.v8-result-metrics dt { color: var(--v8-muted); font-size: 5.5px; }
.v8-result-metrics dd { margin: 6px 0 0; font-size: 7px; font-weight: 850; overflow-wrap: anywhere; }
.v8-result-analysis { display: grid; grid-template-columns: 1fr; gap: 8px; }
.v8-result-points { padding: 10px; border-radius: 12px; background: #f6f7f8; }
.v8-result-points.is-warning { background: #fff8eb; }
.v8-result-points h6 { margin: 0 0 7px; color: var(--v8-muted); font-size: 5.5px; letter-spacing: .07em; text-transform: uppercase; }
.v8-result-points ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.v8-result-points li { display: grid; grid-template-columns: 5px 1fr; gap: 7px; align-items: start; }
.v8-result-points li i { width: 5px; height: 5px; margin-top: 3px; border-radius: 50%; background: var(--v8-success); }
.v8-result-points.is-warning li i { background: var(--v8-warning); }
.v8-result-points li span { color: #4e5057; font-size: 6.2px; line-height: 1.45; }
.v8-result-evidence { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--v8-line); border-radius: 12px; background: #f8f8f9; }
.v8-result-evidence > span { min-width: 0; display: grid; gap: 3px; }
.v8-result-evidence small { color: var(--v8-muted); font-size: 5px; }
.v8-result-evidence strong { font: 850 6.5px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap: anywhere; }
.v8-result-evidence em { color: var(--v8-muted); font-size: 5.5px; font-style: normal; }
.v8-result-evidence a { flex: 0 0 auto; color: var(--v8-red-deep); font-size: 6px; font-weight: 800; text-decoration: none; }
.v8-selector-result-card > footer { display: grid; gap: 7px; }
.v8-result-product-question { min-height: 39px; border: 0; border-radius: 11px; background: #1d1e22; color: #fff; font-size: 7px; font-weight: 850; cursor: pointer; }
.v8-result-product-question:hover { background: var(--v8-red); }
.v8-result-calculators { display: flex; gap: 5px; flex-wrap: wrap; }
.v8-result-calculators button { min-height: 26px; padding: 0 8px; border: 1px solid var(--v8-line); border-radius: 8px; background: #fff; color: #55575d; font-size: 5.5px; cursor: pointer; }
.v8-result-calculators button:hover { border-color: rgba(237,28,36,.3); color: var(--v8-red-deep); }
.v8-selector-result > footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--v8-line); }
.v8-selector-result > footer button { min-height: 43px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--v8-line); border-radius: 11px; background: #fff; color: var(--v8-ink); cursor: pointer; }
.v8-selector-result > footer button:first-child { border-color: var(--v8-red); background: var(--v8-red); color: #fff; }
.v8-selector-result > footer span { font: 900 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.v8-selector-result > footer b { font-size: 7px; }
.v8-selector-empty { grid-column: 1/-1; min-height: 220px; display: grid; place-items: center; padding: 30px; border: 1px dashed rgba(237,28,36,.28); border-radius: 16px; background: #fff7f8; color: var(--v8-muted); font-size: 10px; text-align: center; }

/* Product evidence ---------------------------------------------------- */
.v8-product-evidence { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.v7-product-knowledge-card header .v8-product-evidence b { min-height: 18px; padding: 0 5px; font-size: 4.8px; }
.v8-product-evidence .is-freshness.is-fresh { background: #e8f7ed; color: #187747; }
.v8-product-evidence .is-freshness.is-due { background: #fff4dc; color: #9b6812; }
.v8-product-evidence .is-freshness.is-overdue,
.v8-product-evidence .is-freshness.is-missing { background: #ffe9ea; color: #a61920; }
.v8-product-evidence .is-completeness { background: #edf1f6 !important; color: #4d5867 !important; }
.v8-product-evidence .is-revision { background: #f1ecfa !important; color: #6b4a9d !important; }

/* Consultation projects ---------------------------------------------- */
.v8-consultation-projects {
  width: min(100%,1480px);
  margin: 0 auto 22px;
  padding: 18px;
  border: 1px solid var(--v8-line);
  border-radius: 20px;
  background: linear-gradient(180deg,#fff,#fbfbfc);
  box-shadow: 0 16px 45px rgba(24,25,29,.05);
}
.v8-consultation-projects > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.v8-consultation-projects > header small { color: var(--v8-red); font: 900 6px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .11em; }
.v8-consultation-projects h4 { margin: 7px 0 0; font-size: 20px; letter-spacing: -.035em; }
.v8-consultation-projects > header > div:last-child { display: flex; gap: 7px; }
.v8-consultation-projects > header button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--v8-line); border-radius: 11px; background: #fff; color: var(--v8-ink); cursor: pointer; }
.v8-consultation-projects > header button:first-child { border-color: rgba(237,28,36,.22); background: var(--v8-red-soft); color: var(--v8-red-deep); }
.v8-consultation-projects > header button b { font-size: 7px; }
.v8-consultation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.v8-consultation-card { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto auto; gap: 10px; padding: 15px; border: 1px solid var(--v8-line); border-radius: 15px; background: #fff; position: relative; overflow: hidden; }
.v8-consultation-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: #1d1e22; }
.v8-consultation-card.is-selector::before { background: var(--v8-red); }
.v8-consultation-card > header { display: flex; align-items: center; justify-content: space-between; }
.v8-consultation-card > header span { color: var(--v8-red); font: 900 5.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .1em; }
.v8-consultation-card > header i { color: #a2a4aa; font: 900 6px/1 ui-monospace,SFMono-Regular,Menlo,monospace; font-style: normal; }
.v8-consultation-card h5 { margin: 0; font-size: 14px; line-height: 1.15; letter-spacing: -.025em; overflow-wrap: anywhere; }
.v8-consultation-card > p { margin: 0; color: var(--v8-muted); font-size: 7px; line-height: 1.5; }
.v8-consultation-products { display: flex; flex-wrap: wrap; gap: 4px; }
.v8-consultation-products span { max-width: 100%; padding: 4px 6px; border-radius: 7px; background: #f0f1f3; color: #5f6168; font-size: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v8-consultation-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.v8-consultation-meta span { display: grid; gap: 3px; padding: 8px; border-radius: 9px; background: #f7f7f8; }
.v8-consultation-meta b { font-size: 6.5px; }
.v8-consultation-meta small { color: var(--v8-muted); font-size: 4.7px; }
.v8-consultation-card footer { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto auto; gap: 5px; }
.v8-consultation-card footer button { min-height: 31px; padding: 0 8px; border: 1px solid var(--v8-line); border-radius: 9px; background: #fff; color: #5f6168; font-size: 5.5px; font-weight: 800; cursor: pointer; }
.v8-consultation-card footer button.is-primary { border-color: #1d1e22; background: #1d1e22; color: #fff; }
.v8-consultation-card footer button.is-danger { color: var(--v8-risk); }
.v8-consultation-empty { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 10px; border: 1px dashed rgba(237,28,36,.22); border-radius: 14px; background: #fff8f8; text-align: center; }
.v8-consultation-empty[hidden] { display: none !important; }
.v8-consultation-empty span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--v8-red); color: #fff; font: 900 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.v8-consultation-empty p { max-width: 440px; margin: 0; color: var(--v8-muted); font-size: 8px; }
.v8-history-divider { width: min(100%,1480px); margin: 0 auto 15px; display: flex; align-items: center; gap: 12px; color: var(--v8-muted); font: 900 6px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing: .11em; }
.v8-history-divider::before,
.v8-history-divider::after { content: ""; flex: 1; height: 1px; background: var(--v8-line); }

/* Workflow / source status in admin is declared in admin CSS. ---------- */

@keyframes v8-selector-sheen { 0%,65%,100% { transform: translateX(-100%) rotate(18deg); opacity: 0; } 72% { opacity: 1; } 88% { transform: translateX(520%) rotate(18deg); opacity: 0; } }
@keyframes v8-step-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes v8-result-in { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes v8-ai-pulse { 50% { transform: scale(1.08); opacity: .72; } }

@media (max-width: 1320px) {
  .v8-selector-hero { grid-template-columns: 1fr; }
  .v8-selector-method { min-width: 0; max-width: 620px; }
  .v8-selector-result-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v8-consultation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v7-drawer-tabs button { padding-inline: 9px; }
  .v7-drawer-tabs button b { font-size: 7px; }
}

@media (max-width: 1040px) {
  .v8-selector-shell { grid-template-columns: 1fr; }
  .v8-selector-steps { position: static; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .v8-selector-steps > button { min-height: 62px; grid-template-columns: 32px 1fr; }
  .v8-selector-progress { grid-column: 1/-1; }
  .v8-selector-safety { grid-column: 1/-1; }
  .v8-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v8-choice-grid.is-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v8-selector-result-summary { grid-template-columns: 1fr; }
  .v8-result-meta { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .v7-drawer-header { grid-template-columns: minmax(170px,.5fr) minmax(0,1fr) 42px; gap: 10px; }
  .v7-drawer-tabs { overflow-x: auto; padding-bottom: 2px; }
  .v7-drawer-tabs button { flex: 0 0 auto; }
}

@media (max-width: 760px) {
  .v8-save-chat b { display: none; }
  .v8-save-chat { width: 34px; padding: 0; justify-content: center; }
  .v8-selector-panel { padding: 12px 10px 86px !important; }
  .v8-selector-hero { min-height: 0; margin-bottom: 10px; padding: 20px; border-radius: 18px; }
  .v8-selector-hero h3 { font-size: 30px; }
  .v8-selector-hero p { font-size: 8px; }
  .v8-selector-method { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .v8-selector-method span { min-width: 0; min-height: 60px; padding: 9px; }
  .v8-selector-method strong { font-size: 7px; overflow-wrap: anywhere; }
  .v8-selector-shell { gap: 9px; }
  .v8-selector-steps { grid-template-columns: repeat(4,minmax(0,1fr)); padding: 7px; overflow: hidden; }
  .v8-selector-steps > button { min-height: 51px; display: grid; grid-template-columns: 1fr; gap: 3px; padding: 6px; text-align: center; }
  .v8-selector-steps > button > i { width: 27px; height: 27px; margin: 0 auto; }
  .v8-selector-steps > button small { display: none; }
  .v8-selector-steps > button b { font-size: 6px; }
  .v8-selector-progress { height: 25px; margin: 2px 0; }
  .v8-selector-safety { display: none; }
  .v8-selector-form,
  .v8-selector-result { padding: 18px 14px; border-radius: 17px; }
  .v8-selector-step { min-height: 0; }
  .v8-selector-step > header { margin-bottom: 19px; }
  .v8-selector-step > header h4 { font-size: 28px; }
  .v8-selector-step > header p { font-size: 8px; }
  .v8-choice-grid,
  .v8-choice-grid.is-compact { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-bottom: 18px; }
  .v8-choice-grid label > span { min-height: 60px; padding: 10px; }
  .v8-choice-grid span b { font-size: 7.5px; }
  .v8-dimension-grid { grid-template-columns: 1fr 13px 1fr; }
  .v8-dimension-grid label:last-child { grid-column: 1/-1; }
  .v8-dimension-grid input,
  .v8-selector-text-fields input { min-height: 48px; }
  .v8-selector-text-fields { grid-template-columns: 1fr; }
  .v8-selector-review { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v8-selector-controls { grid-template-columns: auto 1fr auto; }
  .v8-selector-controls > div span { display: none; }
  .v8-selector-controls > div i { width: 100%; }
  .v8-selector-controls > button { min-height: 43px; padding: 0 11px; }
  .v8-selector-controls > button b { font-size: 0; }
  .v8-selector-controls > button b::first-letter { font-size: 0; }
  .v8-selector-controls > button.is-primary b { font-size: 7px; }
  .v8-selector-result > header { align-items: flex-start; }
  .v8-selector-result > header h4 { font-size: 29px; }
  .v8-result-meta { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .v8-result-meta span { min-width: 0; }
  .v8-selector-result-list { grid-template-columns: 1fr; }
  .v8-selector-result-card { padding: 15px; }
  .v8-selector-result > footer { display: grid; grid-template-columns: 1fr; }
  .v8-selector-result > footer button { justify-content: center; }
  .v8-consultation-projects { padding: 13px; border-radius: 16px; }
  .v8-consultation-projects > header { align-items: flex-start; flex-direction: column; }
  .v8-consultation-projects > header > div:last-child { width: 100%; }
  .v8-consultation-projects > header button:first-child { flex: 1; justify-content: center; }
  .v8-consultation-grid { grid-template-columns: 1fr; }
  .v8-consultation-card footer { grid-template-columns: minmax(0,1fr) auto auto auto auto; }
  .v8-product-evidence { max-width: 150px; }
  .v7-product-knowledge-card header { align-items: flex-start; }
  .v8-mobile-selector { color: var(--v8-red-deep) !important; }
  .v8-mobile-ai { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--v8-red); color: #fff; font: 900 7px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
}

@media (max-width: 430px) {
  .v8-selector-hero::after { font-size: 150px; }
  .v8-selector-method { grid-template-columns: 1fr 1fr; }
  .v8-selector-method span:first-child { grid-column: 1/-1; }
  .v8-choice-grid,
  .v8-choice-grid.is-compact { grid-template-columns: 1fr 1fr; }
  .v8-selector-review { grid-template-columns: 1fr 1fr; }
  .v8-result-meta { grid-template-columns: 1fr 1fr; }
  .v8-result-meta span:last-child { grid-column: 1/-1; }
  .v8-selector-result-card > header { grid-template-columns: 34px minmax(0,1fr) 52px; }
  .v8-consultation-card footer button:not(.is-primary):not(.is-danger) { padding-inline: 6px; font-size: 0; }
  .v8-consultation-card footer button:not(.is-primary):not(.is-danger)::first-letter { font-size: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .v8-selector-launch::after { animation: none !important; }
  .v8-selector-step,
  .v8-selector-result { animation: none !important; }
  .v8-selector-progress i,
  .v8-choice-grid label > span,
  .v8-selector-launch { transition-duration: .01ms !important; }
}

/* v0.9.0 — evidence state inside AI product answers */
.v7-product-proof.is-fresh{border-color:#b9dfc8;background:#eef9f2;color:#167747}.v7-product-proof.is-due{border-color:#efd59a;background:#fff8e8;color:#946112}.v7-product-proof.is-overdue,.v7-product-proof.is-missing{border-color:#f1b5b8;background:#fff0f1;color:#a51a21}
.v8-result-evidence.is-fresh{border-color:#b8ddc6;background:#f1faf4}.v8-result-evidence.is-due{border-color:#ecd39c;background:#fff9ea}.v8-result-evidence.is-overdue,.v8-result-evidence.is-missing{border-color:#efb6b9;background:#fff1f2}.v8-result-evidence.is-due strong{color:#8d5d0e}.v8-result-evidence.is-overdue strong,.v8-result-evidence.is-missing strong{color:#a51b22}
