:root {
  color-scheme: light;
  --bg: #f6f7fa;
  --surface: #fff;
  --picker: #f4f7fd;
  --ink: #1d2129;
  --muted: #545d6c;
  --line: #dce2ec;
  --accent: #075ac4;
  --on-accent: #fff;
  --error: #a32727;
  --radius: 30px;
  --button-radius: 999px;
  --shadow: 0 24px 70px #1c306715;
  --light-blue: #cbdbff;
  --light-mint: #bcecdf;
  --light-violet: #e5d7fa;
  --page-wash: #edf2fc;
  --signal-bg: #fff2d6;
  --signal-ink: #704207;
  --quiet-bg: #eef1fa;
  --quiet-ink: #425474;
  --sign-tile: #e8edf9;
  --sign-shape: #5a457e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background:
    linear-gradient(to bottom, transparent 440px, var(--bg) 830px),
    radial-gradient(ellipse at 21% 65%, var(--light-violet), transparent 53%) 0 0 / 100% 830px no-repeat,
    radial-gradient(ellipse at 95% 31%, var(--light-mint), transparent 48%) 0 0 / 100% 830px no-repeat,
    radial-gradient(ellipse at 44% 0%, var(--light-blue), transparent 70%) 0 0 / 100% 830px no-repeat,
    linear-gradient(var(--page-wash), var(--bg) 830px);
  color: var(--ink);
  line-height: 1.5;
}
button { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(1140px, calc(100% - clamp(36px, 10vw, 112px))); margin-inline: auto; }
.site-header { display: flex; min-height: 80px; justify-content: space-between; align-items: center; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 690; letter-spacing: -.04em; text-decoration: none; }
.brand-mark { position: relative; display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); background: var(--surface); }
.brand-mark::before { width: 12px; height: 12px; border: 1.5px solid; border-radius: 50%; content: ""; }
.brand-mark::after { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; content: ""; }
.styles { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: var(--button-radius); }
.styles a { padding: 6px 11px; border: 1px solid transparent; border-radius: var(--button-radius); font-size: 12px; line-height: 1.3; color: var(--muted); text-decoration: none; }
.styles a[aria-current] { border-color: var(--line); background: var(--surface); color: var(--ink); font-weight: 640; }

.workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .93fr); align-items: center; gap: clamp(30px, 7vw, 92px); padding-block: clamp(20px, 7vh, 88px) clamp(26px, 7vh, 84px); }
h1, p, dl, dd, figure { margin: 0; }
h1 { max-width: 12ch; font-weight: 710; font-size: clamp(38px, 6.25vw, 84px); letter-spacing: -.07em; line-height: 1.02; }
.lead { max-width: 33ch; margin-top: 19px; color: var(--muted); font-size: clamp(16px, 1.8vw, 22px); letter-spacing: -.015em; line-height: 1.45; }
.scope-note { max-width: 45ch; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.upload-panel { min-width: 0; padding: clamp(16px, 3vw, 33px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.upload-panel fieldset { min-width: 0; padding: 0; margin: 0 0 17px; border: 0; }
.upload-panel legend { margin-bottom: 7px; padding: 0; font-size: 13px; font-weight: 650; }
.capture-options { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); }
.capture-options label { position: relative; }
.capture-options input, .file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.capture-options span { display: grid; min-height: 37px; place-items: center; padding: 5px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); font-size: 14px; text-align: center; cursor: pointer; }
.capture-options input:checked + span { border-color: var(--line); background: var(--surface); color: var(--ink); font-weight: 630; }
.capture-options input:focus-visible + span, .file-picker:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-picker { position: relative; display: grid; width: 100%; min-height: 215px; aspect-ratio: 1.8; overflow: hidden; place-items: center; border: 1px dashed #9baccc; border-radius: calc(var(--radius) * .56); background: var(--picker); color: var(--accent); text-align: center; cursor: pointer; }
.file-picker:hover, .file-picker.is-over { border-style: solid; border-color: var(--accent); }
.file-picker-prompt { display: grid; padding: 14px; gap: 4px; justify-items: center; }
.file-picker-prompt strong { margin-top: 7px; font-size: 19px; letter-spacing: -.025em; }
.file-picker-prompt span:last-child { color: var(--muted); font-size: 14px; }
.picker-symbol { position: relative; display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.picker-symbol::before { width: 16px; height: 2px; background: currentColor; content: ""; }
.picker-symbol::after { position: absolute; width: 2px; height: 16px; background: currentColor; content: ""; }
.selected-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg); }
.replace-photo { position: absolute; bottom: 10px; padding: 5px 11px; border: 1px solid var(--line); border-radius: var(--button-radius); background: var(--surface); color: var(--ink); font-size: 13px; }
.file-meta { min-width: 0; margin-top: 8px; color: var(--muted); font-size: 12px; }
#file-name { overflow-wrap: anywhere; }
.form-error { margin-top: 8px; color: var(--error); font-size: 14px; }
.action { display: block; width: 100%; min-height: 48px; margin-top: 16px; padding: 10px 15px; border: 1px solid transparent; border-radius: var(--button-radius); color: var(--on-accent); background: var(--accent); font-weight: 660; cursor: pointer; }
.action:hover { filter: brightness(.93); }
.action:disabled { opacity: .58; cursor: default; }

.result-page { flex: 1; }
.back-link { display: inline-flex; align-items: center; min-height: 40px; gap: 7px; color: var(--accent); font-size: 14px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.back-link span { font-size: 22px; line-height: 1; }
.result-workbench {
  align-items: start;
  gap: clamp(20px, 4vw, 56px);
  margin: 10px 0 clamp(22px, 4vw, 44px);
  padding: clamp(18px, 3.6vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
}
.result-copy { align-self: center; }
.result-copy h1 { max-width: 17ch; font-size: clamp(33px, 4.5vw, 59px); letter-spacing: -.055em; line-height: 1.05; }
.capture-label { display: inline-block; margin-bottom: 14px; padding: 5px 10px; border-radius: var(--button-radius); background: var(--quiet-bg); color: var(--quiet-ink); font-size: 13px; font-weight: 650; }
.capture-label.is-flagged { background: var(--signal-bg); color: var(--signal-ink); }
.result-lead { max-width: 47ch; margin-top: 15px; font-size: clamp(16px, 1.55vw, 19px); }
.result-note { max-width: 47ch; margin-top: 10px; color: var(--muted); font-size: 14px; }
.guide-link { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; margin-top: 14px; color: var(--accent); font-size: 14px; font-weight: 650; text-underline-offset: .23em; }
.guide-link span { text-decoration: none; }
.analysis-details { max-width: 47ch; margin-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.analysis-details summary { width: fit-content; padding: 10px 0; cursor: pointer; }
.analysis-details summary:hover { color: var(--ink); }
.analysis-details p { margin-top: 10px; font-size: 13px; }
.metrics { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 3px; }
.metrics dt { color: var(--muted); font-size: 13px; }
.metrics dd { color: var(--ink); font-size: 23px; font-weight: 670; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.photo-stage {
  align-self: start;
  min-width: 0;
  padding: clamp(10px, 2vw, 22px);
  border-radius: calc(var(--radius) * .74);
  background:
    repeating-radial-gradient(circle at 83% 10%, transparent 0 21px, color-mix(in srgb, var(--ink) 9%, transparent) 22px, transparent 23px 42px),
    linear-gradient(130deg, var(--light-blue), var(--light-mint) 58%, var(--light-violet));
}
.photo-result { display: grid; gap: 8px; padding: 8px; min-width: 0; border: 1px solid var(--line); border-radius: calc(var(--radius) * .55); background: var(--surface); }
.photo-result img { display: block; width: 100%; height: clamp(180px, 42vh, 360px); object-fit: contain; background: var(--bg); border-radius: calc(var(--radius) * .38); }
.photo-result figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 0 3px 2px; color: var(--muted); font-size: 12px; }

.mole-guide { scroll-margin-top: 18px; margin-bottom: clamp(25px, 5vw, 60px); padding: clamp(18px, 3.6vw, 38px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.guide-header h2 { margin: 0; font-size: clamp(25px, 3.6vw, 42px); letter-spacing: -.045em; line-height: 1.12; }
.guide-header p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.sign-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 22px; margin-top: 22px; }
.sign { border-top: 1px solid var(--line); padding-top: 12px; }
.sign dt { margin: 6px 0 3px; font-weight: 660; }
.sign dt span { margin-right: 3px; color: var(--accent); }
.sign dd { color: var(--muted); font-size: 14px; }
.sign-icon { position: relative; display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: var(--sign-tile); }
.sign-icon::before, .sign-icon::after { content: ""; grid-area: 1 / 1; }
.sign-icon::before { width: 22px; height: 20px; background: var(--sign-shape); }
.sign-asymmetry::before { clip-path: polygon(49% 5%, 74% 13%, 92% 37%, 83% 68%, 94% 88%, 51% 96%, 20% 73%, 10% 49%, 19% 25%); }
.sign-asymmetry::after { height: 28px; border-inline-start: 1px dashed var(--sign-shape); box-shadow: 0 0 0 1px var(--sign-tile); }
.sign-border::before { clip-path: polygon(48% 0%, 59% 17%, 83% 10%, 86% 32%, 100% 47%, 88% 63%, 87% 86%, 68% 83%, 50% 100%, 35% 85%, 12% 93%, 13% 68%, 0 56%, 12% 41%, 8% 19%, 31% 18%); }
.sign-color::before { border-radius: 48% 43% 50% 39%; background: radial-gradient(circle at 33% 32%, #c2756c 0 24%, transparent 25%), radial-gradient(circle at 62% 63%, #9b66a0 0 26%, transparent 27%), var(--sign-shape); }
.sign-diameter::before { width: 14px; height: 14px; transform: translateY(-4px); border-radius: 50%; }
.sign-diameter::after { width: 28px; height: 6px; transform: translateY(10px); border: solid var(--sign-shape); border-width: 0 1px 1px; }
.sign-evolving::before { width: 11px; height: 11px; transform: translateX(-8px); border-radius: 48% 48% 40% 46%; }
.sign-evolving::after { width: 17px; height: 17px; transform: translateX(7px); border: 1px dashed var(--sign-shape); border-radius: 48% 35% 44% 36%; }
.guide-footer { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px 22px; margin-top: 19px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.guide-footer p { max-width: 62ch; }
.guide-footer a { text-underline-offset: .21em; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 19px; margin-top: auto; padding-block: 19px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer a { text-underline-offset: .21em; }
.external { margin-inline-start: 4px; }

:root[data-style="ink"] {
  color-scheme: dark;
  --bg: #222521;
  --surface: #2d302a;
  --picker: #20231e;
  --ink: #f5f2e8;
  --muted: #c3c5b9;
  --line: #494e41;
  --accent: #dceb9e;
  --on-accent: #24291b;
  --error: #ffc2a3;
  --radius: 11px;
  --button-radius: 7px;
  --shadow: none;
  --light-blue: #374b42;
  --light-mint: #27514b;
  --light-violet: #55503f;
  --page-wash: #212c26;
  --signal-bg: #554126;
  --signal-ink: #ffe1a8;
  --quiet-bg: #363e36;
  --quiet-ink: #d5dfd3;
  --sign-tile: #3a4236;
  --sign-shape: #e3d8a5;
}

[data-style="ink"] .site-header { border-bottom: 1px solid var(--line); }
[data-style="ink"] .workbench { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); }
[data-style="ink"] .workbench > :last-child { grid-column: 1; grid-row: 1; }
[data-style="ink"] .intro { grid-column: 2; grid-row: 1; }
[data-style="ink"] h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(39px, 6.2vw, 83px); letter-spacing: -.065em; }
[data-style="ink"] .result-workbench { grid-template-columns: minmax(0, .93fr) minmax(0, 1fr); }
[data-style="ink"] .result-copy h1 { font-size: clamp(34px, 4.6vw, 61px); }
[data-style="ink"] .guide-header h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
[data-style="ink"] .file-picker { border-color: #747e60; background-color: var(--picker); background-image: radial-gradient(#515746 1px, transparent 1px); background-size: 15px 15px; }
[data-style="ink"] .file-picker:hover, [data-style="ink"] .file-picker.is-over { border-color: var(--accent); }
[data-style="ink"] .file-picker-prompt { background: var(--picker); border-radius: 4px; }
[data-style="ink"] .capture-options, [data-style="ink"] .capture-options span { border-radius: 6px; }

@media (max-width: 900px) {
  .sign-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 740px) {
  .workbench, [data-style="ink"] .workbench { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  [data-style="ink"] .workbench > :last-child, [data-style="ink"] .intro { grid-area: auto; }
  h1, [data-style="ink"] h1 { max-width: 17ch; font-size: clamp(38px, 8vw, 60px); }
  .scope-note { margin-top: 15px; padding-top: 12px; }
  .lead { margin-top: 10px; }
  .site-header { min-height: 64px; }
}

@media (max-width: 520px) {
  .sign-list { grid-template-columns: 1fr; }
  .sign { display: grid; grid-template-columns: 46px 1fr; gap: 3px 12px; align-items: start; }
  .sign-icon { grid-row: span 2; }
  .sign dt { margin: 0; }
}

@media (max-width: 380px) {
  .styles a { padding-inline: 7px; }
  .wordmark { font-size: 16px; gap: 7px; }
  .capture-options span { font-size: 12px; }
  .file-picker { min-height: 175px; }
}


/* ================= Browser edition (site v2) ================= */
:root {
  --danger: #b3261e;
  --danger-bg: #fbeceb;
  --calm: #1d6b45;
  --calm-bg: #e8f5ec;
}
:root[data-style="ink"] {
  --danger: #ffb4a8;
  --danger-bg: #4a2a25;
  --calm: #a7e3bd;
  --calm-bg: #2a4436;
}

.header-nav { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 22px); }
.header-nav > a { color: var(--muted); font-size: 13px; text-decoration: none; }
.header-nav > a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .22em; }
.styles button { padding: 6px 11px; border: 1px solid transparent; border-radius: var(--button-radius); background: transparent; color: var(--muted); font-size: 12px; line-height: 1.3; cursor: pointer; }
.styles button[aria-pressed="true"] { border-color: var(--line); background: var(--surface); color: var(--ink); font-weight: 640; }

.eyebrow { margin-bottom: 14px; color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 9px 20px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); content: ""; }

.capture-cards { gap: 7px; padding: 6px; }
.capture-cards .capture-card { display: block; }
.capture-cards .capture-card-body { display: grid; gap: 2px; justify-items: start; min-height: 58px; padding: 9px 11px; text-align: left; border-radius: 10px; }
.capture-card-body strong { font-size: 14px; font-weight: 660; color: var(--ink); }
.capture-card-body small { color: var(--muted); font-size: 11.5px; }
.capture-options input:checked + .capture-card-body { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.capture-options input:checked + .capture-card-body strong { color: var(--accent); }

.capture-hint { margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.model-status { min-height: 18px; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.model-status.is-busy { color: var(--accent); }
.model-status.is-ready { color: var(--calm); }

.examples { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.examples > p { color: var(--muted); font-size: 12.5px; }
.example-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.link-button { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--button-radius); background: transparent; color: var(--accent); font-size: 12px; cursor: pointer; }
.link-button:hover { border-color: var(--accent); }
.link-button:disabled { opacity: .5; cursor: default; }

.result-page.is-danger { --result-accent: var(--danger); }
.result-page.is-calm { --result-accent: var(--calm); }
.result-copy h2 { max-width: 18ch; font-weight: 710; font-size: clamp(28px, 4.1vw, 50px); letter-spacing: -.055em; line-height: 1.05; outline: none; }
.result-page.is-danger .capture-label { background: var(--danger-bg); color: var(--danger); }
.result-page.is-calm .capture-label { background: var(--calm-bg); color: var(--calm); }
.capture-label { margin-bottom: 12px; }
.result-lead { max-width: 48ch; }
.score-block { display: grid; gap: 14px; max-width: 48ch; margin-top: 20px; }
.score-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; }
.score-head b { font-size: 16px; font-variant-numeric: tabular-nums; }
.bar { height: 8px; margin-top: 6px; border-radius: 999px; background: var(--quiet-bg); overflow: hidden; }
.bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--result-accent, var(--accent)); transition: width .55s ease; }
.score-note { margin: 0; color: var(--muted); font-size: 12.5px; }
.verdict { max-width: 50ch; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
.verdict-title { margin: 0 0 8px; font-size: 14px; font-weight: 660; }
.next-steps { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: 14px; }
.caution { max-width: 50ch; margin-top: 14px; padding-left: 11px; border-left: 3px solid var(--line); color: var(--muted); font-size: 13px; }
.analysis-note { color: var(--muted); font-size: 12px; }
.action-secondary { max-width: 300px; margin-top: 18px; border-color: var(--accent); background: transparent; color: var(--accent); }

.info-section { margin-bottom: clamp(25px, 5vw, 60px); padding-block: clamp(24px, 5vw, 52px); border-top: 1px solid var(--line); }
.info-head h2 { margin: 0; font-size: clamp(24px, 3.5vw, 40px); letter-spacing: -.045em; }
.info-head p { max-width: 68ch; margin-top: 9px; color: var(--muted); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 26px; margin: 24px 0 0; padding: 0; list-style: none; }
.steps li { padding-top: 14px; border-top: 1px solid var(--line); }
.step-number { display: inline-grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--quiet-bg); color: var(--quiet-ink); font-size: 13px; font-weight: 680; }
.steps h3 { margin: 10px 0 5px; font-size: 17px; }
.steps p { color: var(--muted); font-size: 14px; }
.honesty { margin-top: 26px; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.honesty h3 { margin: 0 0 10px; font-size: 17px; }
.honesty ul { display: grid; gap: 8px; margin: 0; padding-left: 19px; color: var(--muted); font-size: 13.5px; }
.honesty strong { color: var(--ink); }

.site-footer { align-items: flex-start; gap: 18px 34px; }
.footer-main { display: grid; gap: 7px; max-width: 70ch; }
.footer-disclaimer { color: var(--ink); font-size: 14px; font-weight: 660; }
.footer-links { display: grid; gap: 6px; justify-items: end; font-size: 12px; }
.footer-links a { text-underline-offset: .21em; }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .header-nav > a { display: none; }
}

@media (max-width: 740px) {
  .result-workbench { grid-template-columns: minmax(0, 1fr); }
  .photo-stage { order: -1; }
  .footer-links { justify-items: start; }
  .action-secondary { max-width: none; }
}

@media (max-width: 520px) {
  .capture-cards { grid-template-columns: 1fr; }
  .hero-facts { display: grid; gap: 6px; }
  .site-header { flex-wrap: wrap; padding-block: 10px; }
}