/* Face Shape Detector — every rule is scoped to .fsd so it cannot clash with your theme. */
.fsd {
  --fsd-bg: #fbf9fb;
  --fsd-tint: #f4ecf1;
  --fsd-surface: #ffffff;
  --fsd-ink: #2a1a2e;
  --fsd-muted: #66566b;
  --fsd-line: #e6dae2;
  --fsd-accent: #b3305f;
  --fsd-accent-dark: #8f2249;
  --fsd-deep: #2a1a2e;
  --fsd-note-bg: #fff7e8;
  --fsd-note-line: #f0dbb0;
  --fsd-c-fore: #c2416b;
  --fsd-c-cheek: #1f7a74;
  --fsd-c-jaw: #b7791f;
  --fsd-c-len: #5b4b9a;
  --fsd-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fsd-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fsd-radius-lg: 22px;
  --fsd-radius-sm: 10px;

  background: var(--fsd-bg);
  color: var(--fsd-ink);
  font-family: var(--fsd-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
.fsd *, .fsd *::before, .fsd *::after { box-sizing: border-box; }
.fsd [hidden] { display: none !important; }
.fsd p, .fsd ul, .fsd ol, .fsd dl, .fsd dd, .fsd figure { margin: 0; padding: 0; }
.fsd a { color: var(--fsd-accent); text-decoration: underline; text-underline-offset: 3px; }
.fsd a:hover { color: var(--fsd-accent-dark); }
.fsd :focus-visible { outline: 3px solid var(--fsd-c-len); outline-offset: 3px; }
.fsd img, .fsd canvas, .fsd video, .fsd svg { max-width: 100%; }

.fsd h1, .fsd h2, .fsd h3 {
  font-family: var(--fsd-display);
  color: var(--fsd-ink);
  margin: 0;
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.fsd .fsd-h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
.fsd .fsd-h2 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); font-weight: 700; letter-spacing: -0.02em; }
.fsd .fsd-h3 { font-size: 1.15rem; font-weight: 600; }

.fsd .fsd-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.fsd .fsd-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.fsd .fsd-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--fsd-body); font-size: 1rem; font-weight: 600; line-height: 1;
  text-decoration: none; text-transform: none; letter-spacing: 0;
  cursor: pointer; box-shadow: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.fsd .fsd-btn--primary { background: var(--fsd-accent); color: #fff; }
.fsd .fsd-btn--primary:hover { background: var(--fsd-accent-dark); color: #fff; }
.fsd .fsd-btn--ghost { background: transparent; color: var(--fsd-ink); border-color: var(--fsd-ink); }
.fsd .fsd-btn--ghost:hover { background: var(--fsd-ink); color: var(--fsd-surface); }
.fsd .fsd-btn:disabled { opacity: .5; cursor: default; }
.fsd .fsd-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.fsd .fsd-actions--left { justify-content: flex-start; margin-top: 28px; }

/* Measurement colours, shared by the art, the canvas legend and the manual guide */
.fsd .fsd-m-fore { stroke: var(--fsd-c-fore); background: var(--fsd-c-fore); }
.fsd .fsd-m-cheek { stroke: var(--fsd-c-cheek); background: var(--fsd-c-cheek); }
.fsd .fsd-m-jaw { stroke: var(--fsd-c-jaw); background: var(--fsd-c-jaw); }
.fsd .fsd-m-len { stroke: var(--fsd-c-len); background: var(--fsd-c-len); }
.fsd svg .fsd-art__line { background: none; }
.fsd .fsd-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; flex: none; }

/* Hero */
.fsd .fsd-hero { padding: 56px 0 64px; }
.fsd .fsd-hero__grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "copy tool" "meta tool"; column-gap: 48px; row-gap: 0; align-items: center; }
.fsd .fsd-hero__copy { grid-area: copy; align-self: end; }
.fsd .fsd-hero__meta { grid-area: meta; align-self: start; }
.fsd .fsd-tool { grid-area: tool; }
.fsd .fsd-lead { font-size: 1.15rem; color: var(--fsd-muted); margin-top: 18px; max-width: 34em; }
.fsd .fsd-checks { list-style: none; margin-top: 24px; display: grid; gap: 8px; }
.fsd .fsd-checks li { position: relative; padding-left: 28px; font-weight: 500; }
.fsd .fsd-checks li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--fsd-c-cheek); border-bottom: 2.5px solid var(--fsd-c-cheek);
  transform: rotate(-45deg);
}
.fsd .fsd-hero__alt { margin-top: 22px; color: var(--fsd-muted); font-size: .95rem; }

/* Tool card */
.fsd .fsd-tool {
  background: var(--fsd-surface);
  border: 1px solid var(--fsd-line);
  border-radius: var(--fsd-radius-lg);
  padding: 22px;
  box-shadow: 0 1px 0 var(--fsd-line), 0 24px 48px -28px rgba(90, 30, 70, .35);
  min-height: 460px;
  display: flex;
}
.fsd .fsd-panel { width: 100%; display: flex; flex-direction: column; }
.fsd .fsd-panel--center { justify-content: center; align-items: center; text-align: center; }
.fsd .fsd-drop {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--fsd-line); border-radius: 16px;
  background: var(--fsd-bg);
  transition: border-color .15s ease, background-color .15s ease;
}
.fsd .fsd-drop:hover, .fsd .fsd-drop.is-over { border-color: var(--fsd-accent); background: var(--fsd-tint); }
.fsd .fsd-drop__art { width: 150px; height: 180px; margin-bottom: 6px; }
.fsd .fsd-drop__title { font-family: var(--fsd-display); font-size: 1.3rem; font-weight: 600; }
.fsd .fsd-drop__hint { color: var(--fsd-muted); font-size: .92rem; }
.fsd .fsd-tip { margin-top: 14px; text-align: center; color: var(--fsd-muted); font-size: .92rem; }

.fsd .fsd-art__face { fill: var(--fsd-surface); stroke: var(--fsd-ink); stroke-width: 2.5; }
.fsd .fsd-art__line { stroke-width: 3.5; stroke-linecap: round; }
.fsd .fsd-art__line.fsd-m-len { stroke-dasharray: 2 8; }
@media (prefers-reduced-motion: no-preference) {
  .fsd .fsd-drop__art .fsd-art__line { stroke-dashoffset: 200; stroke-dasharray: 200; animation: fsd-draw .9s ease-out forwards; }
  .fsd .fsd-drop__art .fsd-m-fore { animation-delay: .15s; }
  .fsd .fsd-drop__art .fsd-m-cheek { animation-delay: .35s; }
  .fsd .fsd-drop__art .fsd-m-jaw { animation-delay: .55s; }
  .fsd .fsd-drop__art .fsd-m-len { animation: fsd-draw-dots .9s ease-out .75s forwards; stroke-dasharray: 2 8; opacity: 0; }
}
@keyframes fsd-draw { to { stroke-dashoffset: 0; } }
@keyframes fsd-draw-dots { to { opacity: 1; } }

/* Camera */
.fsd .fsd-cam { position: relative; flex: 1; min-height: 320px; border-radius: 16px; overflow: hidden; background: var(--fsd-deep); }
.fsd .fsd-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.fsd .fsd-cam__guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fsd .fsd-cam__guide ellipse { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 10 8; opacity: .85; }

/* Loading */
.fsd .fsd-scan { position: relative; width: 120px; height: 150px; border: 3px solid var(--fsd-ink); border-radius: 50% / 45%; overflow: hidden; margin-bottom: 20px; }
.fsd .fsd-scan span { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--fsd-accent); }
@media (prefers-reduced-motion: no-preference) {
  .fsd .fsd-scan span { animation: fsd-scan 1.3s ease-in-out infinite alternate; }
}
@keyframes fsd-scan { to { top: calc(100% - 3px); } }
.fsd .fsd-status { font-weight: 600; }

/* Error */
.fsd .fsd-error__title { font-family: var(--fsd-display); font-size: 1.35rem; font-weight: 700; }
.fsd .fsd-error__text { color: var(--fsd-muted); margin-top: 8px; max-width: 26em; }

/* Result */
.fsd .fsd-result { padding: 56px 0; background: var(--fsd-surface); border-top: 1px solid var(--fsd-line); border-bottom: 1px solid var(--fsd-line); scroll-margin-top: 80px; }
.fsd .fsd-result__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.fsd .fsd-result__figure { position: sticky; top: 90px; }
.fsd .fsd-result__figure canvas { display: block; width: 100%; height: auto; border-radius: 16px; background: var(--fsd-tint); }
.fsd .fsd-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: .9rem; color: var(--fsd-muted); }
.fsd .fsd-legend span { display: inline-flex; align-items: center; }
.fsd .fsd-result__pre { color: var(--fsd-muted); font-weight: 500; }
.fsd .fsd-result__shape { font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1; margin-top: 4px; color: var(--fsd-accent); outline: none; }
.fsd .fsd-result__summary { margin-top: 14px; font-size: 1.08rem; max-width: 36em; }
.fsd .fsd-result__guide { margin-top: 12px; font-weight: 600; }
.fsd .fsd-notes:empty { display: none; }
.fsd .fsd-notes { margin-top: 16px; display: grid; gap: 8px; }
.fsd .fsd-note { padding: 10px 14px; border-radius: var(--fsd-radius-sm); background: var(--fsd-note-bg); border: 1px solid var(--fsd-note-line); font-size: .93rem; }
.fsd .fsd-result__body > .fsd-h3 { margin-top: 32px; margin-bottom: 12px; }

.fsd .fsd-bars { display: grid; gap: 8px; }
.fsd .fsd-bar { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 12px; font-size: .95rem; }
.fsd .fsd-bar__track { height: 10px; border-radius: 99px; background: var(--fsd-tint); overflow: hidden; }
.fsd .fsd-bar__fill { height: 100%; border-radius: 99px; background: var(--fsd-muted); width: 0; transition: width .6s ease-out; }
.fsd .fsd-bar.is-top { font-weight: 700; }
.fsd .fsd-bar.is-top .fsd-bar__fill { background: var(--fsd-accent); }
.fsd .fsd-bar__pct { text-align: right; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .fsd .fsd-bar__fill { transition: none; } }

.fsd .fsd-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 10px; }
.fsd .fsd-metrics > div { padding: 12px 14px; border: 1px solid var(--fsd-line); border-radius: var(--fsd-radius-sm); background: var(--fsd-bg); }
.fsd .fsd-metrics dt { display: flex; align-items: center; font-size: .88rem; color: var(--fsd-muted); }
.fsd .fsd-metrics dd { font-family: var(--fsd-display); font-size: 1.35rem; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }

.fsd .fsd-tabs { margin-top: 32px; }
.fsd .fsd-tabs__list { display: flex; gap: 4px; border-bottom: 2px solid var(--fsd-line); overflow-x: auto; }
.fsd .fsd-tabs__list button {
  background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  padding: 10px 14px; font: 600 1rem var(--fsd-body); color: var(--fsd-muted); cursor: pointer; white-space: nowrap;
  border-radius: 0; box-shadow: none; text-transform: none; letter-spacing: 0;
}
.fsd .fsd-tabs__list button[aria-selected="true"] { color: var(--fsd-ink); border-bottom-color: var(--fsd-accent); }
.fsd .fsd-tabs__list button:hover { color: var(--fsd-ink); background: none; }
.fsd .fsd-tabs__pane { padding-top: 18px; }
.fsd .fsd-tabs__pane h4 { font: 600 1rem var(--fsd-body); margin: 16px 0 6px; color: var(--fsd-ink); }
.fsd .fsd-tabs__pane h4:first-child { margin-top: 0; }
.fsd .fsd-tabs__pane ul { list-style: none; display: grid; gap: 6px; }
.fsd .fsd-tabs__pane li { position: relative; padding-left: 18px; }
.fsd .fsd-tabs__pane li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--fsd-accent); }
.fsd .fsd-tabs__pane p { color: var(--fsd-muted); }

/* Content sections */
.fsd .fsd-section { padding: 80px 0; }
.fsd .fsd-section--tint { background: var(--fsd-tint); }
.fsd .fsd-intro { margin-top: 12px; color: var(--fsd-muted); font-size: 1.08rem; max-width: 40em; }

.fsd .fsd-steps { list-style: none; counter-reset: fsd-step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 40px; }
.fsd .fsd-steps li { counter-increment: fsd-step; border-top: 3px solid var(--fsd-ink); padding-top: 18px; }
.fsd .fsd-steps li::before { content: counter(fsd-step); display: block; font: 700 2.4rem/1 var(--fsd-display); color: var(--fsd-accent); margin-bottom: 12px; }
.fsd .fsd-steps p { margin-top: 8px; color: var(--fsd-muted); }

.fsd .fsd-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 36px; }
.fsd .fsd-shape { background: var(--fsd-surface); border-radius: var(--fsd-radius-lg); padding: 24px; scroll-margin-top: 90px; }
.fsd .fsd-shape svg { width: 64px; height: 84px; display: block; margin-bottom: 14px; }
.fsd .fsd-shape svg ellipse, .fsd .fsd-shape svg path { fill: var(--fsd-tint); stroke: var(--fsd-accent); stroke-width: 3; }
.fsd .fsd-shape p { margin-top: 6px; color: var(--fsd-muted); font-size: .97rem; }
.fsd .fsd-shape:target { outline: 3px solid var(--fsd-accent); }
.fsd .fsd-shape { position: relative; transition: box-shadow .15s ease; }
.fsd .fsd-shape h3 a { color: inherit; text-decoration: none; }
.fsd .fsd-shape h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.fsd .fsd-shape:has(a):hover { box-shadow: 0 0 0 2px var(--fsd-accent); }
.fsd .fsd-shape h3 a:focus-visible { outline: none; }
.fsd .fsd-shape:has(a:focus-visible) { outline: 3px solid var(--fsd-c-len); outline-offset: 3px; }
.fsd .fsd-shape__more { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--fsd-accent); }

/* Contact form */
.fsd .fsd-form { display: grid; gap: 16px; max-width: 620px; }
.fsd .fsd-form label { display: grid; gap: 6px; font-weight: 600; }
.fsd .fsd-form input, .fsd .fsd-form textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--fsd-line); border-radius: var(--fsd-radius-sm);
  background: var(--fsd-surface); color: var(--fsd-ink); font: 400 1rem/1.5 var(--fsd-body); box-shadow: none;
}
.fsd .fsd-form input:focus, .fsd .fsd-form textarea:focus { border-color: var(--fsd-accent); outline: none; }
.fsd .fsd-form textarea { min-height: 160px; resize: vertical; }
.fsd .fsd-form .fsd-btn { justify-self: start; }
.fsd .fsd-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fsd .fsd-alert { padding: 14px 16px; border-radius: var(--fsd-radius-sm); margin-bottom: 18px; font-weight: 500; }
.fsd .fsd-alert--ok { background: #e6f4f2; border: 1px solid #b5ddd8; color: #134e4a; }
.fsd .fsd-alert--err { background: var(--fsd-note-bg); border: 1px solid var(--fsd-note-line); }
.fsd.fsd--inline { background: transparent; }

.fsd .fsd-measure { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 56px; align-items: center; }
.fsd .fsd-measure__art { width: 100%; max-width: 320px; justify-self: center; }
.fsd .fsd-defs { display: grid; gap: 16px; margin-top: 28px; }
.fsd .fsd-defs dt { display: flex; align-items: center; font-weight: 700; }
.fsd .fsd-defs dd { color: var(--fsd-muted); margin-top: 2px; padding-left: 20px; }
.fsd .fsd-measure .fsd-h3 { margin-top: 32px; }
.fsd .fsd-list { margin-top: 10px; padding-left: 1.2em; display: grid; gap: 6px; }

.fsd .fsd-privacy { max-width: 760px; }
.fsd .fsd-privacy p { margin-top: 14px; font-size: 1.12rem; }

.fsd .fsd-faq { max-width: 820px; }
.fsd .fsd-faq .fsd-h2 { margin-bottom: 24px; }
.fsd .fsd-faq details { border-bottom: 1px solid var(--fsd-line); }
.fsd .fsd-faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--fsd-display); font-size: 1.12rem; font-weight: 600;
}
.fsd .fsd-faq summary::-webkit-details-marker { display: none; }
.fsd .fsd-faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font: 400 1.7rem/1 var(--fsd-body); color: var(--fsd-accent); }
.fsd .fsd-faq details[open] summary::after { content: "\2212"; }
.fsd .fsd-faq details p { padding: 0 0 20px; color: var(--fsd-muted); max-width: 42em; }
.fsd .fsd-faq h3 { font: inherit; margin: 0; display: inline; }

.fsd .fsd-cta { padding: 72px 0 88px; text-align: center; background: var(--fsd-deep); }
.fsd .fsd-cta .fsd-h2 { color: #fff; }
.fsd .fsd-cta p { color: #d9ccd8; margin: 10px 0 26px; }

/* Responsive */
@media (max-width: 900px) {
  .fsd .fsd-hero { padding: 32px 0 44px; }
  .fsd .fsd-hero__grid, .fsd .fsd-result__grid, .fsd .fsd-measure { grid-template-columns: 1fr; gap: 32px; }
  .fsd .fsd-hero__grid { grid-template-areas: "copy" "tool" "meta"; row-gap: 24px; }
  .fsd .fsd-lead { font-size: 1.05rem; }
  .fsd .fsd-checks { margin-top: 0; }
  .fsd .fsd-result__figure { position: static; max-width: 520px; }
  .fsd .fsd-steps { grid-template-columns: 1fr; gap: 28px; }
  .fsd .fsd-section { padding: 56px 0; }
  .fsd .fsd-measure__art { max-width: 220px; order: -1; }
}
@media (max-width: 520px) {
  .fsd { font-size: 16px; }
  .fsd .fsd-wrap { padding: 0 16px; }
  .fsd .fsd-tool { padding: 14px; min-height: 380px; }
  .fsd .fsd-drop__art { width: 120px; height: 144px; }
  .fsd .fsd-btn { flex: 1 1 100%; }
  .fsd .fsd-bar { grid-template-columns: 72px 1fr 40px; gap: 8px; }
}
