/* ORIGIN v2 — screen-specific layouts */

/* Splash */
.splash {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(120% 70% at 50% -5%, rgba(35, 72, 230, 0.08) 0%, var(--paper) 55%);
}
.splash .hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 32px;
  gap: 20px;
}
.glyph {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--cobalt), var(--cobalt-deep));
  box-shadow: 0 20px 44px -14px var(--cobalt-glow);
  color: #fff;
}
.glyph svg { width: 44px; height: 44px; }
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 42px;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.tagline { font-size: 17px; font-weight: 600; color: var(--ink); margin-top: 6px; }
.lede { font-size: 15px; color: var(--body); line-height: 1.6; max-width: 280px; }
.splash .foot { font-size: 13px; color: var(--muted); text-align: center; margin-top: 12px; }

/* Profile ready */
.view:has(> .ready) {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
.view > .ready {
  flex: 1;
  min-height: 0;
}
.ready {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background: radial-gradient(120% 60% at 50% 8%, rgba(31, 164, 99, 0.08), var(--paper) 58%);
}
.ready-main {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px var(--pad-screen) 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.device[data-id="ready"] .ready .title {
  font-size: 28px;
  line-height: 1.15;
}
.device[data-id="ready"] .recap .r {
  padding: 12px 14px;
}
.device[data-id="ready"] .ready-main {
  padding-bottom: 18px;
}
.ready-main::-webkit-scrollbar { width: 0; }
.ready .sticky-cta {
  position: relative;
  flex: none;
  background: linear-gradient(180deg, transparent, var(--paper) 40%);
}
.ready .seal {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  box-shadow: 0 0 0 8px rgba(31, 164, 99, 0.08);
}
.ready .seal svg { width: 36px; height: 36px; }
.recap {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--surface);
}
.recap .r {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}
.recap .r:last-child { border-bottom: 0; }
.recap .ri {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--cobalt-50);
  color: var(--cobalt);
  display: grid;
  place-items: center;
  flex: none;
}
.recap .ri svg { width: 18px; height: 18px; }
.recap .rt b { font-size: 14px; font-weight: 600; display: block; color: var(--ink); }
.recap .rt span { font-size: 13px; color: var(--body); }

/* Scan home dashboard */
.scan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px var(--pad-screen) 10px;
}
.scan-top .mk {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.05em;
  color: var(--ink);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cobalt-50);
  color: var(--cobalt);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.insight-strip {
  margin: 0 var(--pad-screen) 12px;
  padding: 10px 14px;
  background: var(--cobalt-50);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--cobalt-deep);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.insight-strip span { opacity: 0.85; }
.insight-chip {
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 2px 0;
  transition: opacity 0.15s;
}
.insight-chip:hover { opacity: 1; }
.insight-chip--alert { color: var(--cobalt-deep); font-weight: 700; }

/* Camera-first home (v2.4) */
.home-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 var(--pad-screen) 8px;
  font-size: 13px;
  color: var(--body);
}
.home-compact .outcome-pill { font-size: 12px; padding: 4px 10px; }
.scan-top .avatar { cursor: pointer; }

.scan-promise {
  margin: 0 var(--pad-screen) 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(35, 72, 230, 0.12);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--cobalt-50) 58%, var(--surface));
  overflow: hidden;
}
.scan-promise__item {
  padding: 10px 9px;
  border-right: 1px solid rgba(35, 72, 230, 0.1);
}
.scan-promise__item:last-child { border-right: 0; }
.scan-promise__label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.scan-promise__value {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.home--camera .finder {
  height: min(50vh, 380px);
  min-height: 260px;
  margin-top: 4px;
}
.home--camera .stat-row,
.home--camera .today-card,
.home--camera .quick-links { display: none; }
.home--camera .recent {
  margin-top: 8px;
}
.home--camera .polaroids {
  max-height: 88px;
  overflow-x: auto;
  overflow-y: hidden;
  mask-image: linear-gradient(90deg, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.today-card {
  margin: 0 var(--pad-screen) 14px;
  padding: 14px 16px;
}
.today-card b { font-size: 14px; color: var(--ink); display: block; }
.today-card span { font-size: 13px; color: var(--body); margin-top: 4px; display: block; }

.finder {
  margin: 0 18px;
  height: 240px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}
.finder__photo,
.scanning__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.finder .produce {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
.finder .vig {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 50% 45%, transparent 35%, rgba(21, 22, 26, 0.35));
}
.finder .brackets {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 58%;
  aspect-ratio: 1;
  animation: breathe 3.6s ease-in-out infinite;
}
.finder .brackets span {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(255, 255, 255, 0.92);
}
.finder .brackets span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.finder .brackets span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.finder .brackets span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.finder .brackets span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.finder .hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  background: rgba(21, 22, 26, 0.45);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.finder__sweep {
  position: absolute;
  left: 16%;
  right: 16%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.35);
  animation: sweepY 3.2s ease-in-out infinite;
  z-index: 3;
}
.finder__det {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  bottom: 44px;
  z-index: 3;
}
.finder-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 4;
  pointer-events: none;
  animation: finderFlash 0.32s ease-out both;
}
.detchip {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  opacity: 0;
  animation: detIn 0.5s ease forwards;
}
.detchip:nth-child(1) { animation-delay: 0.5s; }
.detchip:nth-child(2) { animation-delay: 0.9s; }

/* Polaroid recent scans */
.recent { padding: 6px var(--pad-screen) 4px; }
.recent .rh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.recent .rh b { font-size: 14px; color: var(--ink); }
.recent .rh span { font-size: 12px; color: var(--cobalt); font-weight: 600; cursor: pointer; }
.polaroids { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.polaroids::-webkit-scrollbar { height: 0; }
.polaroid {
  flex: 0 0 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 8px 10px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transform: rotate(-1.5deg);
  transition: transform 0.15s;
}
.polaroid:nth-child(even) { transform: rotate(1.5deg); }
.polaroid:hover { transform: rotate(0) translateY(-2px); }
.polaroid__img {
  height: 72px;
  border-radius: 8px;
  position: relative;
  margin-bottom: 8px;
}
.polaroid__score {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  font-variant-numeric: tabular-nums;
}
.polaroid__score.score-exc,
.polaroid__score.score-good { color: var(--success); }
.polaroid__score.score-fair { color: var(--warn); }
.polaroid__score.score-poor { color: var(--poor); }
.polaroid__name { font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--ink); }

.quick-links {
  display: flex;
  gap: 8px;
  padding: 10px var(--pad-screen) 6px;
  flex-wrap: wrap;
}
.quick-link {
  flex: 1;
  min-width: 90px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--body);
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-ambient);
}
.quick-link b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; }
.freebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 12px;
}
.freebar b { color: var(--ink); }
.freebar a { color: var(--cobalt); cursor: pointer; }

/* Light scan overlay */
.scanning {
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}
.scanning .produce {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.scanning .light-overlay {
  position: absolute;
  inset: 0;
  background: rgba(248, 247, 244, 0.42);
  backdrop-filter: blur(1px);
}
.scanning .vig {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 50% 40%, transparent 25%, rgba(21, 22, 26, 0.35));
}
.scanning.is-locking .scan-focus span {
  animation: bracketLock 0.5s ease 2.4s 2;
}
.scanline {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 2px;
  background: var(--cobalt);
  box-shadow: 0 0 16px 3px var(--cobalt-glow);
  animation: scanLine 1.5s ease-in-out infinite;
  z-index: 5;
}
.scan-focus {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 54%;
  aspect-ratio: 1;
  z-index: 4;
}
.scan-focus span {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--cobalt);
}
.scan-focus span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.scan-focus span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.scan-focus span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.scan-focus span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.scan-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px var(--pad-screen) 36px;
  background: linear-gradient(180deg, transparent, rgba(248, 247, 244, 0.96) 35%);
  z-index: 6;
}
.scan-status .prod {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 4px;
}
.scan-status .pcat { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--muted);
  transition: 0.3s;
}
.stage .ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
}
.stage.active { color: var(--ink); font-weight: 600; }
.stage.done { color: var(--body); }
.stage.done .ic { background: var(--success); border-color: var(--success); color: #fff; }
.stage.done .ic svg { width: 11px; height: 11px; }
.stage.active .ic {
  border-color: var(--cobalt);
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
.stage .ic svg { width: 12px; height: 12px; }

/* Score reveal extras */
.result-head {
  padding: 6px var(--pad-screen) 0;
  display: flex;
  gap: 12px;
  align-items: center;
}
.result-head .cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.result-head .nm {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.12;
  color: var(--ink);
}
.pairing-teaser {
  margin: 12px var(--pad-screen) 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--body);
  box-shadow: var(--shadow-ambient);
}
.pairing-teaser b { color: var(--cobalt); cursor: pointer; }

/* Quick stats on score reveal */
.qstat {
  display: flex;
  gap: 8px;
  padding: 10px var(--pad-screen) 0;
}
.qstat-item {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  box-shadow: var(--shadow-ambient);
}
.qstat-item .n {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.qstat-item .l {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}
.qstat-item--g .n { color: var(--success); }
.qstat-item--w .n { color: var(--warn); }

.result-app .body { padding-bottom: 4px; }
.result-app .result-head { padding-top: 2px; }
.result-app .ring-wrap { padding: 2px 0 0; }
.result-app .ring-wrap .halo { width: 150px; height: 150px; top: 4px; }
.result-app .ring { width: 158px; height: 158px; }
.result-app .ring .num { font-size: 43px; }
.result-app .ring .foru-badge svg {
  width: 11px;
  height: 11px;
  flex: none;
}
.result-app .verdict-tag { margin-top: 4px; padding: 5px 14px; font-size: 11px; }
.result-app .micro-legend { padding: 4px var(--pad-screen) 0; gap: 4px; }
.result-app .vs-card { margin-top: 4px; }
.result-app .chip-row,
.result-app .qstat,
.result-app .pairing-teaser {
  display: none;
}

.result-action {
  margin: 7px var(--pad-screen) 0;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(35, 72, 230, 0.14);
  box-shadow: var(--shadow-ambient);
}
.result-action__eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.result-action__eyebrow svg {
  width: 13px;
  height: 13px;
}
.result-action__title {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.result-action__body {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--body);
}
.result-action__links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
}
.result-action__links span {
  color: var(--cobalt);
  cursor: pointer;
}
.result-action__links span:last-child {
  color: var(--muted);
}

.result-footer {
  flex: none;
  padding: 8px var(--pad-screen) 6px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
}
.result-footer .btn {
  width: 100%;
  min-height: 44px;
  margin-bottom: 7px;
  padding: 11px 14px;
}
.result-footer__row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.result-footer__row .btn { flex: 1; margin-bottom: 0; font-size: 13px; padding: 11px 10px; }
.result-footer__row--single .btn { flex: none; width: 100%; }
.result-footer .linkrow { text-align: center; padding: 4px 0 2px; font-size: 13px; }
.result-footer__links {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 7px 0 1px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cobalt);
}
.result-footer__links span {
  cursor: pointer;
}

/* Detail / breakdown */
.detail-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 20px 12px;
}
.detail-top .dt { flex: 1; min-width: 0; }
.detail-top .dt .nm {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.detail-top .dt .cat { font-size: 12px; color: var(--muted); font-weight: 600; }
.scorechip {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--good-soft);
  color: var(--good);
  flex: none;
}
.sect { padding: 14px var(--pad-screen) 2px; }
.sect h3 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.dim { border-bottom: 1px solid var(--line); padding: 12px 0; cursor: pointer; }
.dim:last-of-type { border-bottom: 0; }
.dim .dr { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dim .dr .nm { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--ink); }
.dim .dr .nm .chev { color: var(--muted); transition: transform 0.2s; }
.dim.open .dr .nm .chev { transform: rotate(90deg); }
.dim .dr .vl { font-size: 13px; font-weight: 700; color: var(--body); }
.dim .dr .vl b { color: var(--ink); font-size: 15px; }
.track2 {
  height: 7px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
  margin-top: 8px;
}
.track2 i {
  display: block;
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 1s var(--ease-out);
}
.track2 i.e { background: var(--exc); }
.track2 i.g { background: var(--good); }
.track2 i.w { background: var(--fair); }
.track2 i.p { background: var(--poor); }
.dim-why { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.dim.open .dim-why { max-height: 160px; }
.dim-why p { font-size: 13px; line-height: 1.5; color: var(--body); padding: 10px 0 2px; }
.dim-why .imp { color: var(--cobalt-deep); font-weight: 600; }
.adjust {
  margin: 4px var(--pad-screen) 0;
  border: 1px solid rgba(35, 72, 230, 0.12);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-ambient);
}
.adjust .ai {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--cobalt-50);
  color: var(--cobalt);
  display: grid;
  place-items: center;
  flex: none;
}
.adjust .ai svg { width: 17px; height: 17px; }
.adjust .at { font-size: 13px; line-height: 1.4; color: var(--body); flex: 1; }
.adjust .at b { color: var(--cobalt-deep); }
.adjust .av {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}
.whycard {
  margin: 8px var(--pad-screen) 0;
  background: var(--cobalt-50);
  border: 1px solid rgba(35, 72, 230, 0.12);
  border-radius: var(--radius-md);
  padding: 16px;
}
.whycard .wh { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.whycard .wh svg { width: 17px; height: 17px; color: var(--cobalt); }
.whycard .wh b { font-size: 11px; font-weight: 800; color: var(--cobalt); letter-spacing: 0.04em; }
.whycard p { font-size: 13px; line-height: 1.55; color: var(--body); }
.whycard p .hl { font-weight: 700; color: var(--cobalt-deep); }
.ingline { display: flex; flex-wrap: wrap; gap: 8px; }
.tagpill {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--body);
}
.tagpill.ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.tagpill.flag { background: var(--warn-soft); color: #9A7A20; border-color: transparent; cursor: pointer; }
.tagpill svg { width: 14px; height: 14px; vertical-align: -2px; }
.pair { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pair:last-child { border-bottom: 0; }
.pair .pi {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--cobalt-50);
  color: var(--cobalt);
  display: grid;
  place-items: center;
  flex: none;
}
.pair .pi svg { width: 20px; height: 20px; }
.pair .pt b { font-size: 14px; font-weight: 600; display: block; color: var(--ink); }
.pair .pt span { font-size: 13px; color: var(--body); }

/* Alternatives */
.context-banner {
  margin: 2px var(--pad-screen) 6px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: #9A7A20;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  gap: 9px;
  align-items: center;
}
.context-banner svg { width: 17px; height: 17px; flex: none; }
.alt-base, .altcard {
  margin: 10px var(--pad-screen);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-card);
  background: var(--surface);
}
.alt-base { border-style: dashed; opacity: 0.92; }
.altcard.top { border-color: var(--success); background: var(--success-soft); }
.altscore {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: grid;
  place-content: center;
  text-align: center;
  flex: none;
  color: #fff;
}
.altscore .as { font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1; }
.altscore .ax { font-size: 10px; opacity: 0.85; }
.altmeta { flex: 1; min-width: 0; }
.altmeta .an { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--ink); }
.altmeta .ad { font-size: 13px; color: var(--body); margin-top: 3px; line-height: 1.4; }
.bestbadge {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: var(--success);
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

/* Compare */
.cmp-head { padding: 6px var(--pad-screen) 4px; }
.cmp-head h1 { font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--ink); }
.cmp-head p { font-size: 14px; color: var(--body); margin-top: 6px; }
.cmprow {
  margin: 10px var(--pad-screen);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  background: var(--surface);
}
.cmprow.win { border-color: var(--success); background: var(--success-soft); }
.cmprow.win.is-revealed { animation: winReveal 0.55s var(--ease-out) both; }
.cmprank { font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--muted); width: 16px; flex: none; text-align: center; }
.cmpbody { flex: 1; min-width: 0; }
.cmptop { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; }
.cmpname { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--ink); }
.cmpname .crown { color: var(--success); }
.cmpname .crown svg { width: 15px; height: 15px; }
.cmpscore { font-family: var(--serif); font-weight: 700; font-size: 17px; flex: none; font-variant-numeric: tabular-nums; }
.cmpbar { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.cmpbar i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 0.9s var(--ease-out); }
.cmpwhy { font-size: 12px; color: var(--body); margin-top: 7px; line-height: 1.4; }
.cmpwhy b { color: var(--ink); }
.verdict-box {
  margin: 8px var(--pad-screen) 0;
  padding: 14px 15px;
  border-radius: var(--radius-md);
  background: var(--success-soft);
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.verdict-box .vi {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.verdict-box .vi svg { width: 16px; height: 16px; }
.verdict-box .vt b { font-size: 14px; color: var(--success); display: block; margin-bottom: 2px; }
.verdict-box .vt span { font-size: 13px; color: var(--body); line-height: 1.45; }

/* Shopping trip */
.trip-cart {
  display: flex;
  gap: 10px;
  padding: 12px var(--pad-screen);
  overflow-x: auto;
}
.trip-item {
  flex: 0 0 100px;
  text-align: center;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-ambient);
}
.trip-item__img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  margin: 0 auto 8px;
  background-size: cover;
  background-position: center;
}
.trip-item__score { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--cobalt); }
.trip-item__name { font-size: 11px; font-weight: 600; color: var(--body); margin-top: 4px; }
.trip-summary {
  margin: 0 var(--pad-screen) 12px;
  padding: 16px;
  text-align: center;
}
.trip-summary .big {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Recipe & synergy */
.recipe-hero, .synergy-hero {
  margin: 8px var(--pad-screen);
  padding: 20px;
  text-align: center;
}
.recipe-hero__img {
  height: 120px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  margin-bottom: 16px;
}
.synergy-stack {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.synergy-stack__img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-card);
}
.synergy-stack__img:last-child { margin-top: 12px; margin-left: -24px; }
.recipe-items, .synergy-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.recipe-items span, .synergy-items span {
  padding: 8px 14px;
  background: var(--cobalt-50);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--cobalt-deep);
}

/* Share card — poster ratio feel */
.share-screen {
  position: relative;
  padding: 12px var(--pad-screen) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 100%;
}
.share-card {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-key), 0 24px 48px -12px rgba(21, 22, 26, 0.2);
  border: 1px solid var(--border);
}
.share-card--poster { max-width: 260px; }
.share-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--cobalt);
  z-index: 3;
}
.share-card__foru {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}
.share-card__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.share-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(21, 22, 26, 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 20px;
  color: #fff;
}
.share-card__score {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.share-card__sub { font-size: 14px; opacity: 0.9; margin-top: 6px; }
.share-card__insight { font-size: 13px; opacity: 0.85; margin-top: 10px; line-height: 1.4; }
.share-card__brand {
  font-family: var(--serif);
  letter-spacing: 0.12em;
  font-size: 13px;
  margin-top: 16px;
  opacity: 0.7;
}

/* History */
.search-bar {
  display: block;
  width: calc(100% - var(--pad-screen) * 2);
  margin: 0 var(--pad-screen) 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.search-bar:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px var(--cobalt-50);
}
.hist-empty {
  padding: 24px var(--pad-screen);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.detail-simple {
  padding: 8px var(--pad-screen) 0;
}
.detail-simple.hidden { display: none; }
#detailFull.hidden { display: none; }
.detail-simple__score {
  padding: 28px 20px;
  text-align: center;
  margin-top: 8px;
}
.detail-simple__num {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.detail-simple__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 6px;
}
.detail-simple__note {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
}
.btn.feel-saved {
  background: var(--success);
  box-shadow: 0 8px 24px -8px rgba(31, 164, 99, 0.45);
}
.hist-group { padding: 8px var(--pad-screen); }
.hist-group h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 8px;
}
.hist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.hist-row:last-child { border-bottom: 0; }
.hist-thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); flex: none; }
.hist-row .hn { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.hist-row .ht { font-size: 12px; color: var(--muted); }
.hist-row .hs {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.hist-row .hs.red { color: var(--poor); }
.hist-row .hs.green { color: var(--success); }

/* Additive intel */
.additive-panel {
  margin: 8px var(--pad-screen);
  padding: 18px;
}
.additive-panel .flag-count {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: var(--warn-soft);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: #9A7A20;
}

/* Weekly digest */
.digest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px var(--pad-screen);
}
.digest-stat {
  padding: 14px;
  text-align: center;
}
.digest-stat .dv {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.digest-stat .dl { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.digest-insight {
  margin: 8px var(--pad-screen);
  padding: 16px;
}
.digest-action {
  margin: 8px var(--pad-screen) 0;
  padding: 14px 16px;
  background: var(--cobalt-50);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--cobalt-deep);
}
.digest-action b { display: block; font-size: 14px; margin-bottom: 4px; color: var(--cobalt); }
.digest-chart {
  margin: 8px var(--pad-screen);
  padding: 12px 14px 8px;
}
.digest-chart__labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.digest-chart svg { width: 100%; height: 48px; display: block; }

/* Feel check */
.feel { padding: 8px var(--pad-screen) 20px; }
.feel .ill {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--cobalt-50);
  color: var(--cobalt);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.feel .ill svg { width: 30px; height: 30px; }
.feelopts { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.feelopt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  cursor: pointer;
  background: var(--surface);
}
.feelopt.sel { border-color: var(--cobalt); background: var(--cobalt-50); }
.feelopt .fe {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
}
.feelopt .fe svg { width: 18px; height: 18px; }
.feelopt .ft { font-size: 14px; font-weight: 600; color: var(--ink); }
.feel-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.45;
  color: var(--body);
}
.feel-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--cobalt); }

/* Patterns */
.pat-head { padding: 4px var(--pad-screen) 6px; }
.pat-head h1 { font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--ink); }
.pat-head p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.highlight-card {
  margin: 8px var(--pad-screen);
  padding: 14px 16px;
  border-left: 3px solid var(--success);
}
.highlight-card b { font-size: 14px; color: var(--ink); display: block; }
.highlight-card span { font-size: 13px; color: var(--body); margin-top: 4px; display: block; }
.trendcard { margin: 8px var(--pad-screen); padding: 16px; }
.trendcard .tl { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.trendcard .tl b { font-size: 14px; color: var(--ink); }
.trendcard .tl .up { font-size: 13px; font-weight: 700; color: var(--success); }
.trendcard .big {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.trendcard .big small { font-size: 14px; color: var(--muted); font-weight: 600; }
.spark { margin-top: 8px; }
.spark svg { width: 100%; height: 60px; display: block; }
.lockcard {
  margin: 8px var(--pad-screen);
  border-radius: var(--radius-md);
  padding: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cobalt), var(--cobalt-deep));
  cursor: pointer;
  box-shadow: 0 14px 32px -14px var(--cobalt-glow);
}
.lockcard::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 160%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 60%);
}
.lockcard .lk {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.92;
  position: relative;
}
.lockcard .lk svg { width: 13px; height: 13px; }
.lockcard .lq {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  margin: 10px 0 12px;
  position: relative;
}
.lockcard .lq .blur { filter: blur(6px); opacity: 0.85; user-select: none; }
.lockcard .lbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--cobalt-deep);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  position: relative;
}
.lockcard .lbtn svg { width: 14px; height: 14px; }
.listcard { margin: 8px var(--pad-screen); }
.listcard h3 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 8px;
}
.fitem { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.fitem .fd { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.fitem .ff { font-size: 14px; font-weight: 500; flex: 1; color: var(--ink); }
.fitem .fn { font-size: 12px; color: var(--muted); font-weight: 600; }
.avoided {
  margin: 10px var(--pad-screen) 0;
  background: var(--success-soft);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.avoided .av {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  color: var(--success);
  flex: none;
  font-variant-numeric: tabular-nums;
}
.avoided .at { font-size: 13px; color: var(--body); line-height: 1.4; }
.avoided .at b { font-weight: 700; color: var(--ink); }
.footer-link {
  text-align: center;
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cobalt);
  cursor: pointer;
}

/* Paywall */
.paywall { padding: 12px var(--pad-screen) 20px; }
.paywall .pw-glyph {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, var(--cobalt), var(--cobalt-deep));
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  box-shadow: 0 14px 30px -12px var(--cobalt-glow);
}
.paywall .pw-glyph svg { width: 28px; height: 28px; }
.paywall h1 { font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.12; color: var(--ink); }
.paywall .psub { font-size: 14px; color: var(--body); margin-top: 8px; line-height: 1.5; }
.pw-vals { margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.pw-val { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--body); }
.pw-val svg { width: 18px; height: 18px; color: var(--success); flex: none; margin-top: 1px; }
.pw-val b { font-weight: 600; color: var(--ink); }
.plan {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 10px;
  background: var(--surface);
}
.plan.sel { border-color: var(--cobalt); background: var(--cobalt-50); }
.plan .radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex: none;
  display: grid;
  place-items: center;
}
.plan.sel .radio { border-color: var(--cobalt); }
.plan.sel .radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cobalt);
}
.plan .pinfo { flex: 1; }
.plan .pinfo b { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; color: var(--ink); }
.plan .pinfo span { font-size: 12px; color: var(--muted); }
.plan .pprice { text-align: right; }
.plan .pprice b { font-size: 14px; color: var(--ink); }
.plan .pprice span { font-size: 11px; color: var(--muted); display: block; }
.popbadge {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: var(--cobalt);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.pw-foot { text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* Future vision */
.future-screen {
  padding: 8px var(--pad-screen) 24px;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(238, 241, 254, 0.5) 100%);
  min-height: 100%;
}
.vision-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--line);
  color: var(--muted);
  margin-bottom: 12px;
}
.vision-teaser {
  margin: 12px 0;
  padding: 18px;
  border: 1px dashed rgba(35, 72, 230, 0.25);
  background: rgba(255, 255, 255, 0.8);
}
.vision-teaser--interactive {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  text-align: left;
}
.vision-teaser__img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
}
.vision-teaser p { font-size: 14px; line-height: 1.55; color: var(--body); }
.vision-teaser b { color: var(--ink); }
.timeline { margin-top: 20px; position: relative; padding-left: 24px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cobalt), var(--line) 60%);
}
.timeline-row.future::after {
  content: "";
  position: absolute;
  left: -17px;
  top: 20px;
  bottom: -6px;
  width: 0;
  border-left: 2px dashed rgba(35, 72, 230, 0.35);
}
.timeline-row {
  position: relative;
  padding: 0 0 22px 18px;
}
.timeline-row::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--cobalt);
}
.timeline-row.future::before {
  border-style: dashed;
  background: transparent;
}
.timeline-row.done::before {
  background: var(--cobalt);
}
.timeline-row .phase {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.timeline-row.future .phase { color: var(--muted); }
.timeline-row .title { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.timeline-row .desc { font-size: 13px; color: var(--body); margin-top: 4px; line-height: 1.45; }
.coming-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--cobalt-50);
  color: var(--cobalt);
  margin-left: 6px;
  vertical-align: middle;
}
