"""Source-grounded HTML surfaces for the Curology offline clone."""
from __future__ import annotations
from html import escape
from typing import Any
from urllib.parse import quote
PURPLE = "#6c57ff"
def _e(value: Any) -> str:
return escape("" if value is None else str(value), quote=True)
def _selected(current: Any, value: Any) -> str:
return "selected" if current == value else ""
def _logo() -> str:
return """Curology"""
def _shop_menu() -> str:
return """
'
return layout("Shop skincare", body, account=account, show_offer=True)
def product_detail(account: dict[str, Any] | None, slug: str) -> str:
_, name, description, price, color = PRODUCT_BY_SLUG[slug]
meta = PRODUCT_META[slug]
prescription = _is_prescription(slug)
badge = (
"" if slug == "cream-moisturizer"
else 'Rx · HSA/FSA ELIGIBLE'
if prescription else 'DERMATOLOGIST DEVELOPED'
)
targets = (
'AcneClogged poresSkin textureDark spots'
if prescription
else 'CleanseHydrateSupport your routine'
)
main_art = (
''
if slug == "cream-moisturizer"
else f'
Curology
'
)
gallery = (
''
if slug == "cream-moisturizer"
else ''.join(f'' for index in range(3))
)
purchase = (
'Get your formula'
if prescription
else f'
'
)
review_cards = "".join(
f'
{_five_stars()}
{_e(title)}
{_e(copy)}
Local demonstration review · results vary'
for title, copy in (
("Comforting hydration", "A rich texture that spreads easily and leaves dry areas feeling soft without a sticky finish."),
("Gentle in my routine", "This fit neatly after cleansing and before my evening treatment, even when my skin felt sensitive."),
("An everyday staple", "The finish feels balanced through the day and layers well with the rest of a simple routine."),
)
)
faq = "".join(
f'{_e(question)}
{_e(answer)}
'
for question, answer in (
(f"What makes the {name} special?", "It is designed to fit a straightforward routine and pairs with personalized prescription care when appropriate."),
("How do I choose between moisturizer textures?", "Choose the richer cream for dry-feeling skin and the lighter gel texture when you prefer weightless hydration."),
("Is it designed to be non-clogging?", "The daily essentials are designed with acne-prone skin in mind, but individual reactions can vary."),
("How can I personalize my routine?", "Complete the local skin questionnaire to compare formula and routine options based on synthetic answers."),
("Are online and store products the same?", "This offline catalog models product information only and does not represent live retail availability."),
)
)
recommendation_slugs = [item for item in ("custom-formula-acne", "gel-moisturizer", "gentle-cleanser") if item != slug][:2]
recommendations = "".join(
f'
{_e('A personalized treatment option designed around the goals you select in the consultation.' if prescription else 'Powered by thoughtfully selected ingredients to support your skin barrier and fit a simple daily routine.')}
{_e('Subject to consultation' if prescription else 'Dermatologist-designed daily care')}
After the 30-day local trial, the selected routine is modeled at ${recurring:.2f} every {cadence}. Cancel anytime in the local account. No source subscription or charge is created.
"""
return layout("Help center", body, account=account)
ARTICLES = [
("skin-concerns", "What is acne anyway?", "Think you’re breaking out? Start with this one-stop acne guide.", "11 min read", "acne"),
("skin-concerns", "What are blackheads?", "Understand why pores clog and how skin experts approach prevention.", "8 min read", "blackheads"),
("skin-treatments", "How to build a consistent evening routine", "Put cleansing, treatment, and hydration in a practical order.", "6 min read", "routine"),
("skincare-products", "Choosing a moisturizer for your skin type", "Compare gel and cream textures without the guesswork.", "7 min read", "moisturizer"),
("ingredients", "Prescription ingredients explained", "A plain-language guide to tretinoin, azelaic acid, and niacinamide.", "5 min read", "ingredients"),
("ingredients", "Hyaluronic acid and your skin barrier", "Learn how humectants support comfortable daily hydration.", "6 min read", "hydration"),
("curology", "The science behind a personalized skin quiz", "See why the questions connect skin goals to routine choices.", "5 min read", "quiz"),
("mind-body", "Skin confidence without perfection", "Practical ways to track progress while remembering that results vary.", "4 min read", "confidence"),
("video", "Three steps for a calmer morning routine", "A short visual guide to cleanse, treat, and protect.", "3 min watch", "video"),
]
def skincare_101(
account: dict[str, Any] | None, topic: str = "", query: str = ""
) -> str:
topics = {item[0] for item in ARTICLES}
topic = topic if topic in topics else ""
normalized = query.strip().casefold()
articles = [
item for item in ARTICLES
if (not topic or item[0] == topic)
and (not normalized or normalized in " ".join(item).casefold())
]
chips = "".join(
f'{_e(label)}'
for value, label in (
("", "All"), ("skin-concerns", "Skin concerns"),
("skin-treatments", "Skin treatments"), ("skincare-products", "Skincare products"),
("ingredients", "Ingredients"), ("curology", "Curology"),
("mind-body", "Mind & body"), ("video", "Video"),
)
)
cards = "".join(
f'
Clear, practical information about skin concerns, ingredients, treatments, and daily products.
skinscienceroutine
Latest from Curology
{len(articles)} stories
{cards}
Educational content only. Talk to a medical provider about individual health concerns.
"""
return layout("Skincare 101", body, account=account)
def skincare_article(account: dict[str, Any] | None, slug: str) -> str:
match = next((item for item in ARTICLES if item[4] == slug), None)
if match is None:
return not_found(account, f"/skincare-101/articles/{slug}")
category, title, summary, duration, art = match
body = f"""
{_e(category.replace('-', ' '))}
{_e(title)}
{_e(summary)}
By Curology Team · {_e(duration)}
We’re here to share general skincare information, but this is not medical advice.
Start with the basics
Skin routines work best when each step has a clear job. Begin with gentle cleansing, introduce one treatment at a time, and support the skin barrier with consistent hydration.
Track what your skin tells you
Give a routine time, note irritation or comfort, and adjust one variable at a time. Personalized prescription care requires review by a licensed provider on the source service; this offline page provides education only.
'
for topic, curology, other in (
("Formula", "Ingredients chosen for you", "One-size-fits-all formulas"),
("Ingredients", "Prescription-strength options", "Non-prescription ingredients only"),
("Guidance", "1:1 licensed provider care", "Research products on your own"),
("Plan", "Designed for more effective results", "Results based on trial and error"),
)
)
concern_panels = "".join(
f'
'
for index, (key, title, copy, tags) in enumerate((
("acne", "Clear acne", "Target breakouts, clogged pores, and visible inflammation with a provider-guided routine.", ("Oiliness", "Hormonal acne", "Clogged pores")),
("spots", "Fade dark spots", "Support a more even-looking tone while addressing the source of post-acne marks.", ("Post-acne marks", "Uneven tone", "Sun support")),
("texture", "Smooth texture", "Combine proven actives and barrier support to improve rough or uneven-looking skin.", ("Texture", "Fine lines", "Dryness")),
("redness", "Calm redness", "Build a gentler routine around visible redness and rosacea-prone skin goals.", ("Redness", "Sensitivity", "Rosacea")),
), start=1)
)
faq = "".join(
f'{_e(question)}
{_e(answer)}
'
for question, answer in (
("What is Curology and how does it work?", "Curology combines an online consultation, licensed-provider review, personalized prescription formulas when appropriate, scheduled shipments, and ongoing support."),
("How is prescription skincare different from over-the-counter products?", "A licensed provider can select prescription-strength ingredients and adjust concentrations to an individual plan instead of relying on one-size-fits-all formulas."),
("Is Curology actual dermatology care, or just an automated quiz?", "On the source service, patient information is assessed by a licensed dermatology provider. This offline clone models the flow but provides no care."),
("Who is Curology best for?", "It may suit people seeking provider-guided options for acne, dark spots, rosacea, texture, or early aging concerns."),
("Can a personalized formula change over time?", "The source service can adjust a formula as skin needs evolve. The local clone models plan changes without medical claims."),
)
)
body = f"""
Why Curology
Award-winning skincare for real results.
Personalized prescriptions. Clinically-proven ingredients. Access to real, licensed dermatology providers. The evidence is in the effect.
Get your formula"""
return layout("Why Curology", body, account=account)
def reviews_page(account: dict[str, Any] | None) -> str:
stories = (
("acne", "LR", "12 months", "My routine gave me a simpler way to stay consistent, and I felt more confident tracking gradual changes."),
("dark-spots", "VM", "9 months", "The biggest difference was having one clear plan instead of changing products every week."),
("texture", "AK", "6 months", "Hydration and consistency helped my skin feel smoother and made my evening routine easier."),
("acne", "JS", "3 months", "Progress was not instant, but the structured routine made it easier to keep going."),
("redness", "MT", "8 months", "A gentler routine helped me pay attention to comfort instead of chasing quick fixes."),
("dark-spots", "RB", "1 year", "Seeing my progress side by side helped me notice changes that were easy to miss day to day."),
("texture", "CY", "5 months", "The routine felt straightforward and fit into mornings without adding lots of products."),
("acne", "EP", "10 months", "I liked having a plan I could adjust rather than starting over whenever my skin changed."),
)
cards = "".join(
f' 5 else ""}" data-review-card="{_e(category)}" {"hidden" if index > 5 else ""}>
Before{_e(initials)}After
{_five_stars()}
{_e(duration)} of consistency
{_e(copy)}
Local composite story · results may vary
'
for index, (category, initials, duration, copy) in enumerate(stories)
)
body = f"""
Transparency first
Our Review Policy
Positive feedback is not incentivized. Public review figures are presented with their source labels, and individual results may vary.
4.42out of 5 on Reviews.io1,142 reviews4.2out of 5 on Facebook3,441 reviews4.2out of 5 on Influenster9,103 reviews
Real routines, individual results
Confident skin starts here. Just ask the internet.
Results may vary.
{cards}
Featured in
VOGUErefinery29AlluregoopForbes
Your routine, your choices
Get more with your trial
Your trial includes a Custom Formula and daily essentials. Edit the local box to fit your routine and budget.
Unlock your offer30-day trial simulation. Subject to consultation. Cancel anytime.