/* Undercut product page. Loaded after site.css, only on /undercut/. */

.page--undercut {
  --uc-ink: #175a38;
  --uc-warn: #a3261f;
  --dots: color-mix(in srgb, var(--ink) 34%, transparent);
}

/* Section labels: plain words */
.page--undercut .eyebrow {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font: 650 16px/1.3 var(--body);
  letter-spacing: 0;
  text-transform: none;
  color: var(--uc-ink);
}
.page--undercut .eyebrow--dark { color: var(--uc-2); }
.page--undercut .tile__tag {
  padding: 0;
  border: 0;
  background: none;
  font: 650 15px/1.3 var(--body);
  letter-spacing: 0;
  text-transform: none;
  color: var(--uc-ink);
}

/* ---------- The receipt line ---------- */
.uc-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.uc-line__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-line__dots { flex: 1; min-width: 16px; border-bottom: 2px dotted var(--dots); transform: translateY(-5px); }
.uc-line__price { font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* ---------- Hero ---------- */
.uc-hero { padding-block: clamp(14px, 2vw, 28px) clamp(56px, 7.5vw, 104px); }
.uc-hero .p-hero__copy { align-self: center; }
.uc-hero h1 { max-width: 11ch; }
.uc-hero h1 em { font-style: normal; color: var(--uc-ink); }
.uc-hero__where { margin-top: 20px; font-size: 15px; font-weight: 600; color: var(--muted); }

.uc-desk {
  padding: clamp(14px, 2vw, 24px);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-xl);
  background: var(--uc-2);
  box-shadow: 0 10px 0 var(--ink);
  min-width: 0;
}

.uc-seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  max-width: 100%;
}
.uc-seg button {
  min-height: 36px;
  padding: 6px 15px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: 650 14.5px/1.15 var(--body);
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s, color .18s;
}
.uc-seg button:hover { background: var(--cream); color: var(--ink); }
.uc-seg button[aria-selected="true"] { background: var(--ink); color: var(--cream); }

/* Torn-edge receipt */
.uc-receipt {
  --tooth: 8px;
  margin-top: 14px;
  filter:
    drop-shadow(2px 0 0 var(--ink)) drop-shadow(-2px 0 0 var(--ink))
    drop-shadow(0 2px 0 var(--ink)) drop-shadow(0 -2px 0 var(--ink))
    drop-shadow(0 12px 16px color-mix(in srgb, var(--ink) 15%, transparent));
}
.uc-receipt__paper {
  padding: clamp(16px, 2vw, 22px) clamp(16px, 2vw, 22px) calc(clamp(16px, 2vw, 22px) + var(--tooth));
  border-radius: 18px 18px 0 0;
  background: var(--paper);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--tooth) * 2) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--tooth) * 2) 100%;
}
.uc-receipt__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.uc-receipt__route { margin: 4px 0 10px; font-size: clamp(20px, 1.85vw, 24px); line-height: 1.15; }

.uc-receipt__result {
  min-height: 384px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed color-mix(in srgb, var(--ink) 18%, transparent);
}

.uc-spin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 15%, transparent);
  border-top-color: var(--uc-vivid);
  animation: uc-spin .8s linear infinite;
}
@keyframes uc-spin { to { transform: rotate(360deg); } }
.uc-fade { animation: uc-rise .34s var(--ease) both; }
@keyframes uc-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.uc-desk__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 14px;
}
.uc-run {
  --lift: 4px;
  height: 42px;
  padding: 0 16px;
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: var(--cream);
  font: 700 14.5px/1 var(--body);
  box-shadow: 0 var(--lift) 0 var(--uc-deep);
  cursor: pointer;
  transition: transform .4s var(--spring), box-shadow .4s var(--spring);
}
.uc-run:hover { transform: translateY(-2px); box-shadow: 0 calc(var(--lift) + 2px) 0 var(--uc-deep); }
.uc-run:active { transform: translateY(var(--lift)); box-shadow: 0 0 0 var(--uc-deep); transition-duration: .07s; }
.uc-run:disabled { cursor: progress; opacity: .8; }
.uc-desk__note { flex: 1; min-width: 210px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
.uc-desk__note .kbd { font-size: 12.5px; }

/* ---------- Why ---------- */
.uc-why {
  padding-block: clamp(68px, 9vw, 128px);
  border-top: var(--line) solid var(--ink);
  background: var(--cream-2);
}
.uc-evidence {
  max-width: 960px;
  margin: 48px auto 0;
  padding: 8px clamp(20px, 3.4vw, 40px);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: 0 8px 0 var(--ink);
}
.uc-fact {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 8px 32px;
  padding-block: clamp(20px, 2.6vw, 28px);
  border-top: 2px dashed color-mix(in srgb, var(--ink) 16%, transparent);
}
.uc-fact:first-child { border-top: 0; }
.uc-fact__fig {
  font: 700 clamp(34px, 3.6vw, 48px)/1 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  letter-spacing: -0.03em;
  color: var(--uc-ink);
}
.uc-fact__fig.is-small { font-size: clamp(28px, 2.6vw, 36px); }
.uc-fact h3 { font-size: clamp(21px, 1.8vw, 24px); line-height: 1.15; }
.uc-fact p { margin-top: 8px; font-size: 16.5px; color: var(--ink-2); max-width: 56ch; }
.uc-src {
  display: inline-flex;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.uc-why__close {
  max-width: 60ch;
  margin: 40px auto 0;
  text-align: center;
  font-size: clamp(17px, 1.35vw, 20px);
  color: var(--ink-2);
}
@media (max-width: 680px) {
  .uc-fact { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- How it works ---------- */
.page--undercut .formats { background: var(--cream-2); }
.uc-how__panel h3 { margin-top: 0; }
.uc-how__bill {
  display: grid;
  gap: 10px;
  padding: 20px 22px;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  background: var(--cream);
  font-size: 17px;
}
.uc-how__bill .uc-line.is-good .uc-line__price { color: var(--uc-ink); }
.uc-how__bill .uc-line.is-off .uc-line__price { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--uc-warn); text-decoration-thickness: 2px; }
.uc-how__verdict { font-size: 14.5px; font-weight: 650; color: var(--uc-ink); }
.uc-how__verdict.is-off { color: var(--uc-warn); }
.uc-how__tip { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

.uc-threshold {
  max-width: 820px;
  margin: 28px auto 0;
  padding: 16px 22px;
  border: 2px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: var(--r-md);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  text-align: center;
}
.uc-threshold strong { color: var(--ink); }

/* ---------- Controls ---------- */
.uc-sc-note { cursor: default; }
.uc-sc-note:hover { transform: none; }
.uc-sc-ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(252, 251, 245, 0.3);
  border-radius: 14px;
  color: var(--uc-2);
}
.uc-sc-ico svg { width: 24px; height: 24px; }

/* ---------- Privacy ---------- */
.page--undercut .safe { background: var(--uc-3); }

/* ---------- The verdict, as the extension shows it ---------- */
.uc-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15.5px; }
.uc-status i { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font: 800 12.5px/1 var(--body); font-style: normal; color: #fff; }
.uc-status.is-good i { background: #0ca30c; }
.uc-hero-fig { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.uc-hero-fig strong { font: 700 clamp(40px, 4.4vw, 56px)/1 var(--body); letter-spacing: -0.04em; font-variant-numeric: proportional-nums; }
.uc-hero-fig span { font-size: 15px; line-height: 1.3; color: var(--ink-2); padding-bottom: 5px; max-width: 25ch; }
.uc-verdict-sub { margin-top: 6px; font-size: 14.5px; color: var(--muted); }

.uc-facts { display: grid; gap: 6px; margin-top: 14px; font-size: 15px; }
.uc-facts__title { margin-bottom: 0; font-size: 13.5px; font-weight: 700; }
.uc-facts .uc-line__label { color: var(--ink-2); }
.uc-facts .uc-line.is-quiet { font-size: 14.5px; }
.uc-facts .uc-line.is-quiet .uc-line__price { font-weight: 550; color: var(--muted); }

.uc-advice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--cream); font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.uc-advice b { color: var(--ink); }

.uc-skel { display: grid; gap: 12px; margin-top: 6px; }
.uc-skel span { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--cream), color-mix(in srgb, var(--ink) 7%, var(--cream)), var(--cream)); background-size: 200% 100%; animation: uc-shimmer 1.1s ease-in-out infinite; }
@keyframes uc-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Cheaper ways, as the panel lists them ---------- */
.uc-opts { display: grid; gap: 8px; margin-top: 12px; }
.uc-opt {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 2px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 13px;
  background: var(--paper);
}
.uc-opt.is-best { border-color: var(--uc-ink); box-shadow: inset 0 0 0 1px var(--uc-ink); }
.uc-opt__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 15.5px; line-height: 1.25; }
.uc-opt__head b { font-weight: 700; }
.uc-opt__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.uc-opt__sub { font-size: 13.5px; line-height: 1.38; color: var(--muted); }
.uc-opt__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.uc-opt__save { font-size: 13.5px; font-weight: 700; color: var(--uc-ink); white-space: nowrap; }
.uc-opt__note { margin-top: 3px; font-size: 13.5px; color: var(--ink-2); }
.uc-tag {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  background: var(--cream);
  color: var(--ink-2);
}
.uc-tag.is-same { background: color-mix(in srgb, var(--uc-ink) 12%, transparent); color: var(--uc-ink); }
.uc-tag.is-rules { background: color-mix(in srgb, #ec835a 18%, transparent); color: #8f3a12; }
.uc-know {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
  margin: 6px 0 0;
  padding: 8px 0 0;
  border-top: 1.5px dashed color-mix(in srgb, var(--ink) 14%, transparent);
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: #8f3a12;
}
.uc-know li { display: inline-flex; align-items: center; gap: 6px; }
.uc-know li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ec835a; flex-shrink: 0; }
.uc-checking { display: grid; gap: 10px; }
.uc-checking .uc-status { gap: 10px; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .uc-seg { display: flex; width: 100%; justify-content: space-between; }
  .uc-seg button { flex: 1 1 auto; padding: 6px 8px; font-size: 13px; }
  .uc-receipt__result { min-height: 0; }
  .uc-opt__head { flex-direction: column; gap: 2px; }
  .uc-line { align-items: flex-start; gap: 10px; }
  .uc-line__label { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
  .uc-line__dots { display: none; }
  .uc-line__price { margin-left: auto; }
  .uc-how__bill { padding: 16px; font-size: 15.5px; }
}

@media (max-width: 360px) {
  .uc-seg button { white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .uc-spin, .uc-fade, .uc-skel span { animation: none; }
}
