:root {
  --ink: #11100f;
  --muted: #3f3a37;
  --paper: #fbf6ee;
  --veil: #f2eee8;
  --plum: #4b183e;
  --coral: #e86f5b;
  --gold: #c8a45d;
  --jade: #2f766b;
  --lilac: #b8a5d3;
  --line: rgba(36, 27, 33, 0.14);
  --shadow: 0 28px 80px rgba(48, 27, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbf6ee;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

i[data-lucide] {
  display: none;
}

.grain {
  display: none;
}

body > *:not(.grain) {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  width: min(1600px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 1.5rem 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.brand,
.top-nav,
.language-switch,
.hero-actions,
.privacy-strip,
.sample-controls,
.result-metrics,
.policy-links,
.filter-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  height: 4.5rem;
  width: auto;
  max-width: 14rem;
}

.brand-mark {
  display: none;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.7rem;
  color: #171514;
  font-size: 1.05rem;       /* bigger text per brand kit reference */
  font-weight: 600;
  flex: 1 1 auto;
  justify-content: flex-end;
}
/* Rounded pill that hosts the static menu links + (when signed-out) Sign in */
.top-nav-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem 1.6rem;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid rgba(60, 35, 12, 0.06);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  box-shadow: 0 4px 18px -10px rgba(60, 35, 12, 0.18);
}
.top-nav a {
  white-space: nowrap;
  color: #171514;
  font-size: 1.02rem;
  letter-spacing: 0.005em;
}
/* Outside-pill items (lang picker + sign-up) breathe a bit */
.top-nav > .nav-auth-lang,
.top-nav > .nav-auth { margin-left: 0.2rem; }
.top-nav > .nav-auth-signup {
  background: linear-gradient(180deg, #d99a9a 0%, #c98080 100%);
  color: #ffffff;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 6px 16px -8px rgba(180, 80, 80, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.top-nav > .nav-auth-signup:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 10px 22px -10px rgba(180, 80, 80, 0.55);
}
/* Inside-pill auth items get a subtle separator on the left */
.top-nav-pill .nav-auth-signin,
.top-nav-pill .nav-auth-user,
.top-nav-pill .nav-auth-signout,
.top-nav-pill .nav-auth { padding-left: 0; }
/* Language select retains its compact look but slightly larger text */
.top-nav .nav-auth-lang {
  font-size: 0.95rem;
  padding: 0.35rem 0.55rem;
}
@media (max-width: 720px) {
  .site-header { padding: 1rem 0; }
  .brand { font-size: 1.2rem; }
  .brand-logo { height: 3.4rem; max-width: 10rem; }
  .top-nav { gap: 0.4rem 0.85rem; font-size: 0.85rem; }
  .nav-auth-signup { padding: 0.3rem 0.75rem; }
}

.language-switch {
  gap: 0.45rem;
  margin-left: auto;
  color: #171514;
  font-size: 0.82rem;
  font-weight: 800;
}

.language-switch select {
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border: 1.2px solid #171514;
  border-radius: 999px;
  background: transparent;
  color: #171514;
  font: inherit;
  cursor: pointer;
}

.top-nav a {
  padding: 0;
  border-radius: 0;
}

.top-nav a:hover {
  background: transparent;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.3rem;
  min-height: 2.35rem;
  border: 1.2px solid #171514;
  border-radius: 999px;
  color: #171514;
  font-weight: 650;
}

main {
  overflow: hidden;
}

.hero,
.explain-band,
.tool-section,
.makeup-section,
.compat-section,
.shade-engine,
.season-library,
.guide-band,
.policy-band,
.legal-grid {
  width: min(1600px, calc(100% - 7rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(26rem, 0.43fr) minmax(42rem, 0.57fr);
  align-items: center;
  gap: 1.5rem;
  padding: 7.8rem 0 0;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  line-height: 0.95;
  letter-spacing: 0;
}

h1 {
  max-width: 8.5ch;
  font-size: clamp(5rem, 7.7vw, 7.75rem);
  line-height: 0.86;
  font-weight: 800;
}

h2 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

h3,
h4,
p {
  letter-spacing: 0;
}

.hero-text,
.section-head p,
.upload-zone p,
.result-card p,
.guide-grid p,
.policy-band p,
.legal-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 30rem;
  margin: 1.95rem 0 0;
  color: #252220;
  font-size: 1.19rem;
  line-height: 1.42;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.85rem 0 1.55rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 4.8rem;
  padding: 1rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 0.48rem;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button svg {
  width: 1.05rem;
  height: 1.05rem;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  border-color: transparent;
  background: #161616;
  box-shadow: 0 18px 44px rgba(16, 16, 16, 0.18);
  font-size: 1.12rem;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.58);
}

.button.full {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.privacy-strip {
  gap: 0.65rem;
  max-width: 36rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-weight: 650;
}

.hero-inline-link {
  display: inline-block;
  margin-left: 4.6rem;
  color: #1d1a18;
  border-bottom: 1px solid currentColor;
  font-size: 1.04rem;
  line-height: 1.4;
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 3rem;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack span,
.avatar-stack b {
  display: grid;
  place-items: center;
  width: 2.55rem;
  aspect-ratio: 1;
  margin-left: -0.42rem;
  border: 2px solid #fbf6ee;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4a179, #3f241d);
}

.avatar-stack span:first-child {
  margin-left: 0;
}

.avatar-stack span:nth-child(2) {
  background: linear-gradient(135deg, #e6b591, #7b432e);
}

.avatar-stack span:nth-child(3) {
  background: linear-gradient(135deg, #c66a45, #2b1713);
}

.avatar-stack span:nth-child(4) {
  background: linear-gradient(135deg, #f0cdb5, #6b3b2e);
}

.avatar-stack b {
  width: 2.9rem;
  color: #1f1b19;
  background: #eee6dc;
  font-size: 0.85rem;
  font-weight: 800;
}

.stars {
  color: #c6943d;
  font-size: 1.15rem;
  letter-spacing: 0.08rem;
}

.social-proof p {
  margin: 0.25rem 0 0;
  color: #3d3936;
  font-size: 0.98rem;
}

.privacy-strip svg {
  color: var(--jade);
  flex: 0 0 auto;
}

.editorial-panel {
  position: relative;
  align-self: stretch;
  min-height: calc(100vh - 7.8rem);
  margin-right: calc((100vw - min(1600px, calc(100vw - 7rem))) / -2);
}

.editorial-panel img,
.editorial-panel video,
.editorial-panel .hero-video {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 7.8rem);
  object-fit: cover;
  object-position: center center;
  border-radius: 0;
  box-shadow: none;
  border: 0;
  display: block;
  /* Crisper rendering on hi-DPI screens; subtle saturate makes the hero pop. */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  filter: saturate(1.06) contrast(1.02);
  transform: translateZ(0); /* GPU compositing — smoother playback */
}

.editorial-panel::after {
  display: none;
}

.hero-palette-card {
  position: absolute;
  left: -1.2rem;
  bottom: 2.1rem;
  width: min(23rem, 78%);
  padding: 1.1rem;
  border: 1px solid rgba(36, 27, 33, 0.12);
  border-radius: 0.85rem;
  background: rgba(255, 252, 248, 0.94);
  box-shadow: 0 24px 70px rgba(36, 27, 33, 0.22);
  backdrop-filter: blur(20px);
  z-index: 2;
}

.hero-palette-card span {
  display: block;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 800;
}

.hero-palette-card strong {
  display: block;
  margin: 0.15rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-swatch-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.hero-swatch-row b {
  aspect-ratio: 1.55 / 1;
  border: 1px solid rgba(36, 27, 33, 0.1);
  border-radius: 0.28rem;
}

.fabric-chip {
  position: absolute;
  display: block;
  width: 4.7rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 0.18rem;
  box-shadow: 0 12px 30px rgba(36, 27, 33, 0.18);
  transform: rotate(9deg);
  z-index: 2;
}

.fabric-chip::before,
.fabric-chip::after {
  content: "";
  position: absolute;
  inset: -0.18rem;
  background: repeating-linear-gradient(90deg, transparent 0 0.35rem, rgba(255,255,255,0.35) 0.35rem 0.42rem);
  opacity: 0.28;
  clip-path: polygon(0 8%, 8% 0, 16% 8%, 24% 0, 32% 8%, 40% 0, 48% 8%, 56% 0, 64% 8%, 72% 0, 80% 8%, 88% 0, 100% 8%, 100% 92%, 92% 100%, 84% 92%, 76% 100%, 68% 92%, 60% 100%, 52% 92%, 44% 100%, 36% 92%, 28% 100%, 20% 92%, 12% 100%, 0 92%);
}

.chip-one {
  top: 5.5rem;
  left: 1.2rem;
  background: #d7b28a;
}

.chip-two {
  top: 8.5rem;
  right: 1.2rem;
  background: #6b7a3d;
  transform: rotate(-12deg);
}

.chip-three {
  right: 3.2rem;
  bottom: 10.5rem;
  background: #c66a45;
  transform: rotate(15deg);
}

.floating-card {
  position: absolute;
  right: -0.7rem;
  bottom: 3rem;
  width: min(17rem, 70%);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0.95rem;
  background: rgba(255, 250, 244, 0.82);
  box-shadow: 0 24px 70px rgba(36, 27, 33, 0.2);
  backdrop-filter: blur(20px);
}

.floating-card span,
.result-metrics span,
.sample-count,
.shade-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.floating-card strong {
  display: block;
  margin: 0.3rem 0 0.8rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.8rem;
}

.mini-swatches,
.palette-row,
.shade-swatches,
.skin-tone-row {
  display: flex;
  gap: 0.45rem;
}

.mini-swatches b,
.palette-row b {
  width: 2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(36, 27, 33, 0.12);
  border-radius: 50%;
}

.tool-section,
.makeup-section,
.compat-section,
.shade-engine,
.season-library,
.guide-band,
.policy-band,
.legal-grid {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-head {
  max-width: 48rem;
  margin: 0 auto 1.5rem auto;     /* horizontally center within the parent band */
  text-align: center;
}
.section-head .eyebrow,
.section-head h2,
.section-head p { margin-left: auto; margin-right: auto; }

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.upload-card,
.result-card,
.makeup-card,
.makeup-result,
.compat-card,
.compat-result,
.search-shell,
.shade-card,
.season-card,
.guide-grid article,
.policy-band,
.legal-grid article {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 60px rgba(36, 27, 33, 0.08);
  backdrop-filter: blur(18px);
}

.upload-card,
.result-card,
.makeup-card,
.makeup-result,
.compat-card,
.compat-result {
  padding: 1rem;
}

.explain-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.explain-band article {
  padding: 1.2rem;
  border-top: 1px solid rgba(17, 16, 15, 0.18);
}

.explain-band span {
  display: block;
  margin-bottom: 0.8rem;
  color: #9a7a43;
  font-weight: 900;
}

.explain-band h2 {
  font-size: clamp(1.7rem, 2.7vw, 2.6rem);
  line-height: 1;
}

.explain-band p {
  color: var(--muted);
  line-height: 1.6;
}

.makeup-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
  gap: 1rem;
  align-items: start;
}

.makeup-card h3,
.makeup-result h3 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.makeup-card canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fffaf4;
}

.makeup-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.makeup-detail-grid div,
.makeup-palette-block {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.68);
}

.makeup-detail-grid span {
  display: block;
  color: var(--plum);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.makeup-detail-grid strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
}

.makeup-palette-block {
  margin-top: 0.75rem;
}

.makeup-palette-block h4 {
  margin: 0 0 0.65rem;
  color: var(--plum);
}

#makeupPairingText,
#veinResultText {
  color: var(--muted);
  line-height: 1.6;
}

.compat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(18rem, 0.78fr);
  gap: 1rem;
  align-items: stretch;
}

.compat-card h3,
.compat-result h3 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.mini-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  margin-bottom: 0.85rem;
  padding: 0.8rem;
  border: 1px dashed rgba(75, 24, 62, 0.32);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.7);
  color: var(--plum);
  font-weight: 850;
  cursor: pointer;
}

.mini-upload input {
  display: none;
}

.mini-upload svg {
  width: 1.1rem;
}

.compat-card canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fffaf4;
}

.compat-result {
  display: grid;
  align-content: start;
  gap: 0.8rem;
}

.compat-result label {
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compat-result select {
  min-height: 2.7rem;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 7.5rem;
  aspect-ratio: 1;
  border: 10px solid rgba(75, 24, 62, 0.14);
  border-top-color: var(--coral);
  border-right-color: var(--jade);
  border-radius: 50%;
  color: var(--plum);
  font-size: 1.8rem;
  font-weight: 900;
}

.compat-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.compat-result ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.compat-recommendations {
  display: grid;
  gap: 0.65rem;
}

.compat-recommendations div {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 250, 244, 0.68);
}

.compat-recommendations span {
  display: block;
  color: var(--plum);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compat-recommendations strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.compact-makeup {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 0.55rem;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 15rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed rgba(75, 24, 62, 0.32);
  border-radius: 0.8rem;
  background: linear-gradient(135deg, rgba(255, 250, 244, 0.8), rgba(232, 111, 91, 0.1));
}

.upload-zone.dragging {
  border-color: var(--coral);
  background: rgba(232, 111, 91, 0.15);
}

.upload-zone > svg {
  width: 2.8rem;
  height: 2.8rem;
  color: var(--plum);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.upload-zone h3 {
  margin: 0.8rem 0 0;
  font-size: 1.5rem;
}

.canvas-wrap {
  position: relative;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #1c171a;
}

#photoCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  cursor: crosshair;
}

.empty-canvas {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.sample-controls {
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
}

.sample-controls p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.sample-guide {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(255, 250, 244, 0.72);
}

.sample-guide h4 {
  margin: 0 0 0.6rem;
  color: var(--plum);
}

.sample-guide ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.55;
}

.sample-guide p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.result-card h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.2rem;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.result-metrics div,
.advice-boxes div {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.56);
}

.result-metrics strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.95rem;
}

.season-calibrator {
  display: grid;
  gap: 0.45rem;
  margin: 0.9rem 0 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.56);
}

.season-calibrator label {
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.season-calibrator select {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.season-calibrator p {
  margin: 0;
  font-size: 0.88rem;
}

.calibration-help {
  margin-top: 0.35rem;
}

.calibration-help summary {
  color: var(--plum);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.calibration-help p {
  margin-top: 0.45rem;
}

.palette-row {
  flex-wrap: wrap;
  margin: 1rem 0;
}

.palette-row b {
  width: 2.65rem;
}

.mini-heading,
.swatch-label {
  margin: 1rem 0 0.45rem;
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skin-tone-row {
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.skin-tone-row span {
  width: 2.65rem;
  aspect-ratio: 1;
  border: 1px solid rgba(36, 27, 33, 0.14);
  border-radius: 50%;
}

.identified-color-box {
  display: grid;
  gap: 0.65rem;
  margin: 0.75rem 0 0.9rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.72);
}

.identified-color-box span {
  display: block;
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.identified-color-box strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-word;
}

.identified-gradient {
  min-height: 3.2rem;
  border: 1px solid rgba(36, 27, 33, 0.14);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.55);
}

.advice-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.advice-columns h4,
.advice-boxes strong {
  margin: 0;
  color: var(--plum);
}

.advice-columns ul {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
}

.advice-boxes {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

.advice-boxes p,
.disclaimer {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
}

.search-shell {
  padding: 0.8rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fff;
}

.search-box svg {
  color: var(--plum);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.filter-row {
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.filter-row button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.52rem 0.72rem;
  background: rgba(255, 250, 244, 0.76);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.filter-row button.active {
  color: #fff;
  background: var(--plum);
}

.vein-choice-panel {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 250, 244, 0.72);
}

.vein-choice-panel h4 {
  margin: 0 0 0.65rem;
  color: var(--plum);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vein-choice-panel p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.vein-choice-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.vein-choice-row button {
  display: grid;
  gap: 0.45rem;
  min-height: 4.6rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-align: left;
}

.vein-choice-row button span {
  width: 100%;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 27, 33, 0.14);
}

.vein-choice-row button.active {
  border-color: var(--plum);
  box-shadow: 0 0 0 2px rgba(75, 24, 62, 0.14);
}

.shade-results,
.season-grid,
.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.shade-card {
  overflow: hidden;
}

.shade-card .color-top {
  height: 6.5rem;
  border-bottom: 1px solid var(--line);
}

.shade-card .shade-body,
.season-card {
  padding: 1rem;
}

.shade-card h3,
.season-card h3,
.guide-grid h3 {
  margin: 0.25rem 0;
}

.shade-card p,
.season-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.hex-pill {
  display: inline-flex;
  margin-top: 0.8rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: rgba(255, 250, 244, 0.7);
  font-size: 0.82rem;
  font-weight: 850;
}

.season-card {
  min-height: 18rem;
}

.season-card header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.season-card .season-label {
  color: var(--muted);
  font-weight: 800;
}

.shade-swatches {
  flex-wrap: wrap;
  margin: 1rem 0;
}

.shade-swatches span {
  width: 2.2rem;
  aspect-ratio: 1;
  border: 1px solid rgba(36, 27, 33, 0.14);
  border-radius: 0.35rem;
}

.skin-tone-row.compact {
  margin: 0.55rem 0 1rem;
}

.skin-tone-row.compact span {
  width: 1.9rem;
}

.season-download {
  width: 100%;
  margin-top: 1rem;
}

.guide-grid article {
  padding: 1.2rem;
}

.guide-grid svg {
  color: var(--coral);
}

.policy-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.55fr);
  gap: 1rem;
  padding: 1.2rem;
  margin-bottom: 2rem;
}

.policy-band h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.policy-links {
  align-content: start;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.policy-links a {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 250, 244, 0.72);
  color: var(--plum);
  font-weight: 850;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 0;
}

.legal-grid article {
  padding: 1rem;
}

.legal-grid h2 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1rem, 4vw, 3rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .site-header {
    position: relative;
    width: min(100% - 2rem, 1180px);
    padding: 1.2rem 0;
    flex-wrap: wrap;            /* logo on top row, nav wraps below */
    justify-content: center;
    gap: 0.6rem;
  }

  /* v2 nav — keep it visible on mobile, stack below the logo, full-width */
  .top-nav {
    width: 100%;
    margin: 0.4rem 0 0;
    justify-content: center;
    gap: 0.4rem 0.6rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
  }
  .top-nav-pill {
    padding: 0.5rem 0.9rem;
    gap: 0.3rem 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
  }
  .top-nav a {
    font-size: 0.92rem;
    padding: 0.25rem 0.05rem;
  }
  .top-nav > .nav-auth-signup {
    padding: 0.45rem 0.95rem;
    font-size: 0.92rem;
  }

  .language-switch {
    margin-left: 0;
  }

  .hero,
  .explain-band,
  .tool-grid,
  .makeup-grid,
  .compat-grid,
  .policy-band,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .editorial-panel {
    margin-right: 0;
    min-height: auto;
  }

  .editorial-panel img,
  .editorial-panel video,
  .editorial-panel .hero-video {
    min-height: 32rem;
    border-radius: 1rem;
  }

  .shade-results,
  .season-grid,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 1rem, 1180px);
  }

  .brand {
    font-size: 1.45rem;
  }

  .hero,
  .explain-band,
  .tool-section,
  .makeup-section,
  .compat-section,
  .shade-engine,
  .season-library,
  .guide-band,
  .policy-band,
  .legal-grid {
    width: min(100% - 1rem, 1180px);
  }

  h1 {
    font-size: clamp(3.8rem, 16vw, 5rem);
  }

  .hero-text {
    font-size: 1rem;
  }

  .button {
    width: 100%;
    min-height: 3.8rem;
  }

  .hero-inline-link {
    margin-left: 0;
  }

  .social-proof {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.8rem;
  }

  .editorial-panel img,
  .editorial-panel video,
  .editorial-panel .hero-video {
    min-height: 28rem;
  }

  .floating-card {
    right: 0.7rem;
    bottom: 1rem;
  }

  .hero-palette-card {
    left: 0.8rem;
    bottom: 1rem;
  }

  .fabric-chip {
    width: 3.5rem;
  }

  .result-metrics,
  .makeup-detail-grid,
  .advice-columns,
  .shade-results,
  .season-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

body > .vein-zoom {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 14, 18, 0.7);
  backdrop-filter: blur(2px);
}

body > .vein-zoom[hidden] {
  display: none;
}

.vein-zoom-inner {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.4rem 1.1rem;
  width: min(460px, 92vw);
  box-shadow: var(--shadow);
}

.vein-zoom-inner h3 {
  margin: 0 0 0.4rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
}

.vein-zoom-inner > p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.vein-zoom-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #1c171a;
  cursor: crosshair;
}

#veinZoomCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  /* Visual aid only: bumps subtle vein color shifts so you can see them clearly.
     Sampled data is read from the underlying source canvas — unaffected. */
  filter: contrast(1.45) saturate(1.7);
}

/* When the chromatic-extraction view is active, we've already amplified the
   color deviation in pixel data — applying the CSS filter on top would over-
   process. Disable it. */
#veinZoomCanvas.chroma-mode {
  filter: none;
}

.vein-zoom-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.9rem;
  flex-wrap: wrap;
}

.vein-zoom-toggle {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
}

.vein-zoom-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.vein-zoom-toggle-help {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.personalized-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.personalized-tag-sm {
  margin: 0.4rem 0 0;
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
}

.palette-row .palette-swatch {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.palette-row .palette-swatch b {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}

.palette-row .palette-swatch small {
  font: 600 0.66rem/1.15 ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: var(--muted);
  letter-spacing: 0;
  max-width: 64px;
  text-align: center;
  word-break: break-word;
}

.palette-row .palette-swatch small.palette-swatch-hex {
  font-size: 0.6rem;
  color: var(--muted);
}

.palette-row {
  flex-wrap: wrap;
  gap: 0.55rem;
}

.result-makeup-kit {
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
}

.result-makeup-kit .mini-heading {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
}

.result-makeup-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 0.6rem;
  margin: 0.35rem 0;
}

.result-makeup-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.result-makeup-row .hero-swatch-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.result-makeup-row .hero-swatch-row b {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
}

.vein-zoom-crosshair {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid #fffaf4;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(36, 27, 33, 0.7), 0 0 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.06s linear, top 0.06s linear;
}

.vein-zoom-crosshair::before,
.vein-zoom-crosshair::after {
  content: "";
  position: absolute;
  background: #fffaf4;
}

.vein-zoom-crosshair::before {
  left: 50%;
  top: -8px;
  bottom: -8px;
  width: 1px;
  margin-left: -0.5px;
}

.vein-zoom-crosshair::after {
  top: 50%;
  left: -8px;
  right: -8px;
  height: 1px;
  margin-top: -0.5px;
}

.vein-zoom-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.9rem 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.vein-zoom-info strong {
  color: var(--ink);
  font-weight: 800;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.vein-zoom-swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-left: auto;
}

.vein-zoom-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* ---------- Static / content pages (about, contact, privacy, terms, articles) ---------- */
.page-static .site-header {
  position: relative;
  width: min(1200px, calc(100% - 4rem));
  padding: 1.4rem 0;
}
.static-main {
  width: min(820px, calc(100% - 3rem));
  margin: 2rem auto 4rem;
}
.static-article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.4rem 2.4rem 2rem;
  box-shadow: 0 18px 48px rgba(48, 27, 42, 0.06);
}
.static-article h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin: 0.4rem 0 1rem;
  max-width: 18ch;
}
.static-article h2 {
  font-size: 1.5rem;
  margin: 2.2rem 0 0.8rem;
  font-family: "Playfair Display", Georgia, serif;
}
.static-article h3 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.6rem;
  font-weight: 800;
}
.static-article p,
.static-article li {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
}
.static-article .lede {
  font-size: 1.13rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.static-article .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.static-article ul, .static-article ol {
  padding-left: 1.4rem;
  margin: 0.8rem 0 1.2rem;
}
.static-article ul li, .static-article ol li {
  margin: 0.4rem 0;
}
.static-article a {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.static-article a:hover { text-decoration-thickness: 2px; }
.static-article code {
  font: 0.9em ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: var(--veil);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}
.static-cta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.contact-email {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0.2rem 0 1rem;
}

/* Article-specific layouts */
.article-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0 1rem;
}
.article-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem 1.2rem 1rem;
  text-decoration: none !important;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(48, 27, 42, 0.1);
}
.article-card .tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--plum);
}
.article-card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0;
}
.article-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* Quick-answer & FAQ blocks inside articles */
.quick-answer {
  background: var(--veil);
  border-left: 3px solid var(--plum);
  padding: 0.9rem 1.1rem;
  border-radius: 6px;
  margin: 1.2rem 0 1.6rem;
  font-size: 0.98rem;
  line-height: 1.5;
}
.quick-answer strong { display: block; margin-bottom: 0.3rem; color: var(--plum); }

.color-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}
.color-table th, .color-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
}
.color-table th { font-weight: 800; background: var(--veil); }
.color-swatch {
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 4px;
  vertical-align: middle;
  border: 1px solid var(--line);
  margin-right: 0.4rem;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 0.7rem 0;
}
.faq details:first-of-type { border-top: 0; }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  position: relative;
  padding-right: 1.6rem;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--plum);
}
.faq details[open] summary::after { content: "−"; }
.faq details > p { margin-top: 0.6rem; }

.related-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.related-articles a {
  text-decoration: none !important;
  background: var(--veil);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Cookie consent banner */
#cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 9000;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: center;
}
.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  max-width: 1100px;
  width: 100%;
}
.cookie-banner-inner p {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  min-width: 240px;
}
.cookie-banner-inner a { color: #f3c8a8; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 0.5rem; }
.cookie-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
}
.cookie-btn-primary { background: var(--paper); color: var(--ink); }
.cookie-btn-ghost { background: transparent; color: var(--paper); border: 1px solid rgba(251, 246, 238, 0.4); }
@media (max-width: 600px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-end; }
}


/* ============================================================
   Auth + dashboard styles (Phase 2)
   ============================================================ */

.auth-shell {
  width: min(440px, calc(100% - 2rem));
  margin: 3rem auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  box-shadow: 0 8px 30px rgba(48, 27, 42, 0.06);
}
.auth-shell h1 {
  font-size: 1.55rem;
  margin: 0 0 0.5rem 0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  letter-spacing: -0.01em;
}
.auth-shell .meta {
  margin: 0 0 1.4rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.auth-form { display: flex; flex-direction: column; gap: 0.85rem; }
.auth-form label {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.88rem; color: var(--muted); font-weight: 600;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}
.auth-form input:focus {
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(75, 24, 62, 0.10);
}
.auth-form .checkbox {
  flex-direction: row; align-items: flex-start; gap: 0.55rem;
  font-weight: 400; color: var(--ink);
}
.auth-form .checkbox input { margin-top: 0.18rem; }
.auth-error {
  background: #fdecea;
  border: 1px solid #f4b6ad;
  color: #8a1c0d;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.9rem;
}
.auth-success {
  background: #ebf6ee;
  border: 1px solid #aedab9;
  color: #1f5b30;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.9rem;
}
.auth-divider {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--muted); font-size: 0.82rem; margin: 1.2rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.auth-google {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-google:hover { background: var(--paper); }
.auth-google svg { width: 18px; height: 18px; }
.auth-foot {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
.auth-foot a { color: var(--plum); }

/* dashboard */
.dashboard,
.dashboard-main {
  width: min(1080px, calc(100% - 3rem));
  margin: 2.5rem auto 4rem;
  display: grid;
  gap: 2rem;
}
.dashboard h1,
.dashboard-hero h1 {
  margin: 0 0 0.25rem 0;
  font-family: ui-serif, Georgia, serif;
  letter-spacing: -0.01em;
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
}
.dashboard .greeting,
.dashboard-greeting {
  color: var(--muted);
  margin: 0 0 0;
  font-size: 1.05rem;
}
.dashboard-hero {
  padding: 0 0 0.5rem;
  border-bottom: 1px dashed var(--line);
}

/* Section heading in the new layout */
.dashboard-section { display: grid; gap: 1rem; }
.dashboard-section-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: inherit;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.dashboard-grid.premium-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -10px rgba(60, 35, 12, 0.18);
  border-color: #e3d7c2;
}
.dash-card h2,
.dash-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.3;
  font-family: ui-serif, Georgia, serif;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.dash-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.dash-card .dash-card-meta {
  font-size: 0.88rem;
  color: var(--muted);
}
.dash-card .dash-card-price {
  font-size: 0.92rem;
  color: #3a2a08;
  margin-top: auto;
}
.dash-card .dash-card-price .strike {
  text-decoration: line-through;
  color: #a09786;
}
.dash-card .button {
  margin-top: auto;
  align-self: flex-start;
}
.dash-list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

/* Premium-card variants */
.dash-card.pdf-card,
.dash-card.passport-card,
.dash-card.gift-card {
  border: 1.5px solid #c8a45d;
  background: linear-gradient(180deg, #fbf6ee 0%, #f3e8d2 100%);
}
.dash-card.passport-card {
  background: linear-gradient(180deg, #fbf6ee 0%, #f0e0c2 100%);
  border-width: 2px;
}
.dash-card.gift-card { background: linear-gradient(180deg, #fff7ea 0%, #ffe9c2 100%); border-color: #e8c577; }
.dash-card.pdf-card h3,
.dash-card.passport-card h3,
.dash-card.gift-card h3 { color: #3a2a08; }

/* NEW · PHYSICAL badge — flow-positioned, no overlap */
.dash-card .dash-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7a5b16;
  font-weight: 700;
  background: #ffffff;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #c8a45d;
  margin-bottom: 0.1rem;
}

.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.dash-pill {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  background: var(--veil); color: var(--ink);
}
.dash-pill.warn { background: #fdecea; color: #8a1c0d; }
.dash-pill.ok { background: #ebf6ee; color: #1f5b30; }

/* ---- Site-wide auth nav widget (injected by site-auth.js) ---- */
.nav-auth { font-weight: 600; padding: 0.3rem 0.6rem; border-radius: 999px; }
.nav-auth-signin { color: var(--ink); }
.nav-auth-signup { background: var(--plum); color: #fff; padding: 0.4rem 0.95rem; }
.nav-auth-signup:hover { background: #36112d; color: #fff; }
.nav-auth-user { color: var(--muted); padding-right: 0.2rem; cursor: default; pointer-events: none; }
.nav-auth-signout { color: var(--coral); }
@media (max-width: 720px) {
  .nav-auth-user { display: none; }
}

/* ---- Tool gate overlay (homepage when signed out) ---- */
.tool-gated { position: relative; }
.tool-gated > .tool-grid,
.tool-gated > .section-head + .tool-grid { filter: blur(3px) opacity(0.55); pointer-events: none; user-select: none; }
.tool-gate {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  z-index: 5;
}
.tool-gate-inner {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 2.25rem;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(48, 27, 42, 0.18);
}
.tool-gate-eyebrow {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--plum); font-weight: 700; margin-bottom: 0.5rem;
}
.tool-gate h3 {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.55rem;
  margin: 0 0 0.65rem 0;
  letter-spacing: -0.01em;
}
.tool-gate p { margin: 0 0 1.25rem 0; color: var(--muted); line-height: 1.55; }
.tool-gate-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 1rem; }
.tool-gate-foot { font-size: 0.82rem; color: var(--muted); margin: 0.6rem 0 0 0; }

/* ---- Per-tool focus pages (palette-test / makeup-reveal / outfit-match) ---- */
.page-tool .tool-section,
.page-tool .makeup-section,
.page-tool .compat-section { padding-top: 2.5rem; }
body.tool-only-palette #makeup-reveal,
body.tool-only-palette #compatibility { display: none !important; }
body.tool-only-makeup #tool,
body.tool-only-makeup #compatibility { display: none !important; }
body.tool-only-compat #tool,
body.tool-only-compat #makeup-reveal { display: none !important; }

/* ---- Landing-page tools grid ---- */
.tools-cards-band {
  width: min(1100px, calc(100% - 3rem));
  margin: 3rem auto 1rem auto;
}
.tools-cards-band .section-head { text-align: center; margin: 0 auto 2rem auto; }
.tools-cards-band .section-head h2 { font-size: 2rem; margin: 0.4rem 0 0.6rem 0; }
.tools-cards-band .section-head p  { color: var(--muted); max-width: 620px; margin: 0 auto; }
.tools-cards-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.tool-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 1.6rem 1.5rem 1.4rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.7rem;
  transition: transform 0.18s, box-shadow 0.18s;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(48, 27, 42, 0.10); }
.tool-card .tool-card-eyebrow {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--plum); font-weight: 700; margin: 0;
}
.tool-card h3 { margin: 0; font-family: ui-serif, Georgia, serif; font-size: 1.35rem; letter-spacing: -0.01em; }
.tool-card p  { margin: 0 0 0.4rem 0; color: var(--muted); line-height: 1.55; font-size: 0.95rem; }
.tool-card .button { margin-top: auto; align-self: flex-start; }

/* ---- Premium Buy CTA (used on /upgrade/) ---- */
.button.cta-buy {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #4b183e 0%, #862763 100%);
  color: #fff !important;
  font-size: 1.08rem;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 14px 28px rgba(75, 24, 62, 0.28), 0 4px 8px rgba(75, 24, 62, 0.16);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  cursor: pointer;
}
.button.cta-buy:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 40px rgba(75, 24, 62, 0.36), 0 6px 12px rgba(75, 24, 62, 0.18);
  filter: brightness(1.08);
  text-decoration: none !important;
}
.button.cta-buy:active { transform: translateY(0); }
.button.cta-buy::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #f5d76e; box-shadow: 0 0 12px #f5d76e;
  display: inline-block;
}

/* ---- Inline save toast for the result card ---- */
#save-toast {
  display: none;
  padding: 0.5rem 0.85rem;
  background: #ebf6ee; color: #1f5b30;
  border: 1px solid #aedab9; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600;
  text-align: center;
  margin-top: 0.4rem;
}

/* ---- Result-actions stack: ensure consistent button height + visible CTA ---- */
.result-actions .button { min-height: 3rem; padding: 0.85rem 1.4rem; font-size: 1rem; }
.result-actions .button.cta-buy { min-height: 3.4rem; font-size: 1.05rem; }

/* ---- Gold pulsating CTA (used on dashboard for premium PDF + gift) ---- */
.button.cta-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, #f6ce5a 0%, #c8961f 50%, #8a5a0d 100%);
  color: #1a1308 !important;
  font-size: 1rem; font-weight: 800;
  border: 0; border-radius: 999px;
  text-decoration: none !important;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 28px rgba(200, 150, 31, 0.45), 0 4px 8px rgba(138, 90, 13, 0.30);
  animation: gold-pulse 2.2s ease-in-out infinite;
  transition: transform 0.18s, filter 0.18s;
}
.button.cta-gold:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
  text-decoration: none !important;
}
.button.cta-gold:active { transform: translateY(0); }
.button.cta-gold::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px #ffe9a3;
  display: inline-block;
}
@keyframes gold-pulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(200, 150, 31, 0.45), 0 4px 8px rgba(138, 90, 13, 0.30), 0 0 0 0 rgba(246, 206, 90, 0.55); }
  50%      { box-shadow: 0 12px 32px rgba(200, 150, 31, 0.55), 0 4px 10px rgba(138, 90, 13, 0.35), 0 0 0 12px rgba(246, 206, 90, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .button.cta-gold { animation: none; }
}

/* ---- Gift card eyebrow tweak ---- */
.dash-card.gift-card { background: linear-gradient(180deg, #fff7ea 0%, #ffe9c2 100%); border-color: #e8c577; }
.dash-card.gift-card h2,
.dash-card.gift-card h3 { color: #5a3e0e; }

/* =====================================================================
   BRAND-PALETTE animations + consistent header
   Brand palette: amber #FFD700, blue #4682B4, orange #FFA500, lilac #DDA0DD
   ===================================================================== */
:root {
  --brand-amber:  #FFD700;
  --brand-blue:   #4682B4;
  --brand-orange: #FFA500;
  --brand-lilac:  #DDA0DD;
  --brand-brown:  #5C2A0E;
}

/* ---- Site-header polish (consistent across home / dashboard / tools) ---- */
.site-header {
  /* allow the header strip to host the gradient underline animation below */
  position: relative;
  isolation: isolate;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--brand-amber) 0%, var(--brand-blue) 33%,
    var(--brand-orange) 66%, var(--brand-lilac) 100%);
  background-size: 300% 100%;
  opacity: 0;
  animation: brandShimmer 14s linear infinite;
  pointer-events: none;
  border-radius: 999px;
}
.site-header:hover::after { opacity: 0.55; }
@keyframes brandShimmer {
  0%   { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

/* Top nav links: animated underline in brand colours on hover */
.top-nav a {
  position: relative;
  padding: 0.35rem 0.1rem;
  transition: color 0.18s ease;
}
.top-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-amber), var(--brand-blue),
    var(--brand-orange), var(--brand-lilac));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(.4,.0,.2,1);
  border-radius: 2px;
}
.top-nav a:hover { color: var(--brand-brown); }
.top-nav a:hover::after,
.top-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Brand logo subtle hover lift + arch shimmer */
.brand { transition: transform 0.18s ease; }
.brand:hover { transform: translateY(-1px); }
.brand-logo { transition: filter 0.4s ease; }
.brand:hover .brand-logo { filter: drop-shadow(0 4px 14px rgba(70, 130, 180, 0.18)); }

/* ---- Dashboard hero entrance + colour-tinted greeting accent ---- */
.dashboard-hero h1 {
  background: linear-gradient(90deg, var(--ink) 0%, var(--brand-brown) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: dashFadeIn 0.7s cubic-bezier(.4,.0,.2,1) both;
}
.dashboard-greeting { animation: dashFadeIn 0.9s cubic-bezier(.4,.0,.2,1) both; }
.dashboard-section  { animation: dashFadeIn 0.9s cubic-bezier(.4,.0,.2,1) both; }
.dashboard-section:nth-of-type(1) { animation-delay: 0.05s; }
.dashboard-section:nth-of-type(2) { animation-delay: 0.18s; }
.dashboard-section:nth-of-type(3) { animation-delay: 0.30s; }
@keyframes dashFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Dashboard section title gets a tiny brand-colour accent dot */
.dashboard-section-title::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px; border-radius: 999px;
  margin-right: 0.55rem;
  vertical-align: middle;
  background: var(--brand-amber);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.18);
  animation: dotPulse 3s ease-in-out infinite;
}
.dashboard-section:nth-of-type(2) .dashboard-section-title::before { background: var(--brand-blue);   box-shadow: 0 0 0 2px rgba(70, 130, 180, 0.18); }
.dashboard-section:nth-of-type(3) .dashboard-section-title::before { background: var(--brand-orange); box-shadow: 0 0 0 2px rgba(255, 165, 0,  0.18); }
@keyframes dotPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.75; }
}

/* Dash-card: animated gradient border on hover (uses brand colours) */
.dash-card {
  position: relative;
  overflow: hidden;
}
.dash-card::before {
  content: "";
  position: absolute; inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--brand-amber), var(--brand-blue),
    var(--brand-orange), var(--brand-lilac));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}
.dash-card:hover::before { opacity: 0.7; }

/* CTA buttons inside cards: subtle shimmer on hover */
.dash-card .button.primary,
.dash-card .button.cta-gold {
  position: relative;
  overflow: hidden;
}
.dash-card .button.primary::after,
.dash-card .button.cta-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.dash-card .button.primary:hover::after,
.dash-card .button.cta-gold:hover::after { transform: translateX(120%); }

@media (prefers-reduced-motion: reduce) {
  .site-header::after,
  .dashboard-section-title::before,
  .dash-card::before,
  .dash-card .button.primary::after,
  .dash-card .button.cta-gold::after,
  .dashboard-hero h1,
  .dashboard-greeting,
  .dashboard-section { animation: none; transition: none; }
}

/* ---------------- Hero kinetic-typography rotator on H1 (Tier 1) ----------- */
/* The .hero-rotator class is applied to the H1 itself. Container height is
   pinned via min-height so swapping phrases doesn't push the page (CLS=0).
   Phrases vary in length — the min-height accommodates the longest one
   ("Find the Colors You Were Built For." → ~3 lines at H1 size). */
.hero-rotator {
  min-height: 3.3em;            /* fits 3 lines of the longest phrase at H1 size */
  display: block;
}
.hero-rotator-line {
  display: inline-block;
  /* inter-phrase opacity transition is driven inline by JS */
}
/* .word is the line-break unit. Each word is inline-block + nowrap so the
   chars inside stay together; line-breaks only happen at the real spaces
   between words. */
.hero-rotator-line .word {
  display: inline-block;
  white-space: nowrap;
}
.hero-rotator-line .char {
  display: inline-block;
  opacity: 0;
  animation-name: heroRotatorCharIn;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* animation-delay + animation-duration set per-char inline by JS */
  will-change: opacity, transform;
}
@keyframes heroRotatorCharIn {
  from { opacity: 0; transform: translateY(0.18em); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-rotator-line .char { animation: none; opacity: 1; transform: none; }
}
@media (max-width: 700px) {
  .hero-rotator { min-height: 4.4em; }   /* phrases wrap further on mobile */
}
