/* Public design tokens: the editor changes only these documented variables and data options. */
.public-page {
  --theme-page: #f7f6f2;
  --theme-surface: #fffefa;
  --theme-ink: #222923;
  --theme-muted: #7e827a;
  --theme-accent: #567461;
  --theme-border: #e6e8df;
  --theme-heading: Georgia, 'Times New Roman', serif;
  --theme-body: 'Avenir Next', Avenir, 'Segoe UI', Arial, sans-serif;
  --theme-radius: 13px;
  --theme-max: 794px;
  --theme-gap: 11px;
  --theme-card-pad: 17px 25px;
  --theme-shadow: 0 20px 55px color-mix(in srgb, var(--theme-ink) 6%, transparent);
  --theme-soft: color-mix(in srgb, var(--theme-accent) 10%, var(--theme-surface));
  background-color: var(--theme-page);
  color: var(--theme-ink);
  font-family: var(--theme-body);
}
.public-page .public-shell { width: min(var(--theme-max), calc(100% - 44px)); }
.public-page .site-rail, .public-page .profile__foot, .public-page .public-footer { border-color: var(--theme-border); }
.public-page .site-rail__brand, .public-page .link-card__title, .public-page .empty-state h3 { color: var(--theme-ink); }
.public-page .site-rail__detail, .public-page .profile__edition, .public-page .profile__foot-note,
.public-page .section-heading__count, .public-page .link-card__number, .public-page .link-card__subtitle,
.public-page .public-footer, .public-page .loading-row, .public-page .empty-state p { color: var(--theme-muted); }
.public-page .eyebrow, .public-page .profile__intro, .public-page .presence, .public-page .rail-star,
.public-page .link-card__arrow, .public-page .share-link, .public-page .title-period,
.public-page .closing__ornament, .public-page .empty-state__flower { color: var(--theme-accent); }
.public-page .brand-mark, .public-page .avatar { background: var(--theme-accent); color: var(--theme-surface); }
.public-page .avatar { box-shadow: 0 0 0 8px var(--theme-soft), 0 12px 30px color-mix(in srgb, var(--theme-ink) 13%, transparent); font-family: var(--theme-heading); }
.public-page .profile, .public-page .link-card, .public-page .empty-state, .public-page .loading-row {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  border-radius: var(--theme-radius);
  color: var(--theme-ink);
}
.public-page .profile { box-shadow: var(--theme-shadow); }
.public-page .profile::before { background: radial-gradient(circle, var(--theme-soft) 0 35%, transparent 68%); }
.public-page .profile::after { content: var(--theme-symbol); color: color-mix(in srgb, var(--theme-accent) 25%, transparent); }
.public-page .profile__bio { color: var(--theme-muted); }
.public-page .presence__dot { background: var(--theme-accent); box-shadow: 0 0 0 4px var(--theme-soft); }
.public-page .link-card__icon { color: var(--theme-accent); background: var(--theme-soft); border-radius: calc(var(--theme-radius) * .75); }
.public-page .link-card__arrow { border-color: var(--theme-border); }
.public-page a.link-card:hover { border-color: var(--theme-accent); box-shadow: var(--theme-shadow); }
.public-page a.link-card:hover .link-card__arrow { background: var(--theme-soft); }
.public-page .share-link { border-color: var(--theme-accent); }
.public-page .profile h1, .public-page .section-heading h2, .public-page .closing p,
.public-page .empty-state h3 { font-family: var(--theme-heading); }
.public-page .ambient--one { background: color-mix(in srgb, var(--theme-accent) 16%, var(--theme-page)); }
.public-page .ambient--two { background: color-mix(in srgb, var(--theme-accent) 10%, var(--theme-page)); }
.public-page[data-tone="dark"] { color-scheme: dark; --theme-shadow: 0 24px 60px #0004; }
.public-page[data-tone="dark"] .profile__foot { border-color: var(--theme-border); }
.public-page[data-tone="dark"] .link-card__arrow { color: var(--theme-accent); }
.public-page[data-tone="dark"] .avatar { color: var(--theme-page); }
.public-page[data-tone="dark"] .brand-mark { color: var(--theme-page); }

/* Page geometry */
.public-page[data-width="narrow"] { --theme-max: 620px; }
.public-page[data-width="wide"] { --theme-max: 1080px; }
.public-page[data-corners="square"] { --theme-radius: 1px; }
.public-page[data-corners="round"] { --theme-radius: 28px; }
.public-page[data-density="compact"] { --theme-gap: 6px; --theme-card-pad: 10px 17px; }
.public-page[data-density="compact"] .link-card { min-height: 67px; }
.public-page[data-density="compact"] .directory { margin-top: 42px; }
.public-page[data-density="compact"] .closing { padding: 45px 0; }
.public-page[data-density="airy"] { --theme-gap: 20px; --theme-card-pad: 24px 31px; }
.public-page[data-density="airy"] .link-card { min-height: 110px; }
.public-page[data-density="airy"] .directory { margin-top: 95px; }
.public-page[data-density="airy"] .closing { padding: 110px 0; }
.public-page .links { gap: var(--theme-gap); }
.public-page .link-card { padding: var(--theme-card-pad); }
.public-page[data-columns="two"] .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-page[data-columns="two"] .link-card { gap: 10px; padding: 15px; }
.public-page[data-columns="two"] .link-card__subtitle { max-width: 25ch; }
.public-page[data-columns="two"] .link-card__number { width: 20px; }

/* Hero compositions */
.public-page[data-hero="stacked"] .profile__identity { flex-direction: column; align-items: flex-start; gap: 24px; }
.public-page[data-hero="stacked"] .profile__bio { margin-left: 0; max-width: 640px; }
.public-page[data-hero="centered"] .profile { text-align: center; }
.public-page[data-hero="centered"] .profile__identity { flex-direction: column; gap: 23px; }
.public-page[data-hero="centered"] .profile__intro { margin-left: 0; }
.public-page[data-hero="centered"] .profile__bio { margin-left: auto; margin-right: auto; }
.public-page[data-hero="centered"] .profile__foot { justify-content: center; gap: 30px; }
.public-page[data-hero="minimal"] .profile {
  min-height: 0; padding-left: 0; padding-right: 0; background: transparent; border: 0;
  box-shadow: none; overflow: visible;
}
.public-page[data-hero="minimal"] .profile::before, .public-page[data-hero="minimal"] .profile::after { display: none; }
.public-page[data-hero="minimal"] .profile__identity { margin-top: 38px; }
.public-page[data-hero="minimal"] .profile__foot { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }

/* Link card aesthetics */
.public-page[data-cards="outlined"] .link-card { background: transparent; box-shadow: none; border: 1.5px solid var(--theme-border); }
.public-page[data-cards="filled"] .link-card { background: var(--theme-soft); box-shadow: none; border-color: transparent; }
.public-page[data-cards="underlined"] .link-card { background: transparent; box-shadow: none; border: 0; border-bottom: 1px solid var(--theme-border); border-radius: 0; }
.public-page[data-cards="underlined"] .link-card__icon { background: transparent; }
.public-page[data-cards="underlined"] a.link-card:hover { border-bottom-color: var(--theme-accent); transform: translateX(5px); }
.public-page[data-cards="pill"] .link-card { border-radius: 999px; }
.public-page[data-cards="pill"] .link-card__icon { border-radius: 50%; }
.public-page[data-icons="circle"] .link-card__icon { border-radius: 50%; }
.public-page[data-icons="bare"] .link-card__icon { background: transparent; }

/* Background aesthetics */
.public-page[data-background="plain"] .ambient, .public-page[data-background="grid"] .ambient,
.public-page[data-background="dots"] .ambient { display: none; }
.public-page[data-background="gradient"] { background: linear-gradient(150deg, var(--theme-page), var(--theme-soft) 70%, var(--theme-page)); }
.public-page[data-background="grid"] { background-image: linear-gradient(var(--theme-border) 1px, transparent 1px), linear-gradient(90deg, var(--theme-border) 1px, transparent 1px); background-size: 42px 42px; }
.public-page[data-background="dots"] { background-image: radial-gradient(var(--theme-border) 1.3px, transparent 1.3px); background-size: 23px 23px; }

/* Optional page elements */
.public-page[data-show-avatar="false"] .avatar,
.public-page[data-show-status="false"] .presence,
.public-page[data-show-rail-detail="false"] .site-rail__detail,
.public-page[data-show-edition="false"] .profile__edition,
.public-page[data-show-scroll-hint="false"] .profile__foot-note,
.public-page[data-show-count="false"] .section-heading__count,
.public-page[data-show-numbers="false"] .link-card__number,
.public-page[data-show-descriptions="false"] .link-card__subtitle,
.public-page[data-show-closing="false"] .closing,
.public-page[data-show-share="false"] .share-link,
.public-page[data-show-footer="false"] .public-footer { display: none; }
.public-page[data-show-avatar="false"] .profile__bio { margin-left: 0; }
.public-page[data-show-status="false"][data-show-scroll-hint="false"] .profile__foot { display: none; }
.public-page[data-ornament="none"] .theme-symbol, .public-page[data-ornament="none"] .profile::after { display: none; }
.public-page[data-motion="none"] *, .public-page[data-motion="none"] *::before, .public-page[data-motion="none"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* Compact, genuine preview inside the editor. */
.preview-surface {
  width: 100%; min-height: 480px; max-height: 650px; overflow: auto; padding: 16px 20px;
  border: 1px solid var(--theme-border); border-radius: 9px;
  box-shadow: 0 18px 45px #1e332815;
}
.preview-surface .site-rail { height: 47px; }
.preview-surface .site-rail__brand { font-size: 7px; letter-spacing: .08em; gap: 5px; }
.preview-surface .brand-mark { width: 17px; height: 17px; font-size: 11px; }
.preview-surface .site-rail__detail { font-size: 5px; letter-spacing: .07em; }
.preview-surface .rail-star { margin: 0 2px; font-size: 7px; }
.preview-surface .profile { min-height: 0; margin-top: 14px; padding: 18px 20px 0; }
.preview-surface .profile::before { width: 220px; height: 220px; right: -80px; top: -100px; }
.preview-surface .profile::after { right: 13px; top: 35px; font-size: 32px; }
.preview-surface .eyebrow, .preview-surface .profile__edition { font-size: 6px; letter-spacing: .12em; }
.preview-surface .profile__identity { margin-top: 25px; gap: 13px; }
.preview-surface .avatar { width: 51px; height: 51px; flex-basis: 51px; font-size: 18px; box-shadow: 0 0 0 4px var(--theme-soft); }
.preview-surface .profile__intro { font-size: 10px; }
.preview-surface .profile h1 { font-size: 27px; }
.preview-surface .profile__bio { margin-top: 11px; margin-left: 65px; font-size: 8px; line-height: 1.5; }
.preview-surface .profile__foot { margin: 22px -20px 0; padding: 11px 20px; }
.preview-surface .presence, .preview-surface .profile__foot-note { font-size: 5px; letter-spacing: .05em; }
.preview-surface .presence__dot { width: 4px; height: 4px; box-shadow: 0 0 0 2px var(--theme-soft); }
.preview-surface .profile__foot-note span { margin-left: 2px; font-size: 8px; }
.preview-surface .directory { margin-top: 29px; }
.preview-surface .section-heading { margin-bottom: 11px; }
.preview-surface .section-heading h2 { font-size: 19px; margin-top: 4px; }
.preview-surface .section-heading__count { font-size: 6px; }
.preview-surface .links { gap: 6px; }
.preview-surface .link-card { min-height: 49px; padding: 8px 10px; gap: 8px; }
.preview-surface .link-card__number { width: 15px; font-size: 8px; }
.preview-surface .link-card__icon { width: 27px; height: 27px; flex-basis: 27px; }
.preview-surface .link-card__icon svg { width: 13px; height: 13px; }
.preview-surface .link-card__title { font-size: 9px; }
.preview-surface .link-card__subtitle { font-size: 7px; }
.preview-surface .link-card__arrow { width: 20px; height: 20px; flex-basis: 20px; font-size: 11px; }
.preview-surface .closing { padding: 25px 0 20px; }
.preview-surface .closing__ornament { font-size: 14px; }
.preview-surface .closing p { font-size: 12px; margin: 6px 0; }
.preview-surface .share-link { font-size: 7px; }
.preview-surface .public-footer { padding: 9px 0 16px; font-size: 5px; }
.preview-surface[data-hero="stacked"] .profile__bio,
.preview-surface[data-hero="centered"] .profile__bio,
.preview-surface[data-hero="minimal"] .profile__bio { margin-left: 0; }
.preview-surface[data-hero="minimal"] .profile__foot { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.preview-surface[data-columns="two"] .link-card { padding: 7px; gap: 4px; }
.preview-surface[data-columns="two"] .link-card__number { display: none; }
.preview-surface[data-columns="two"] .link-card__subtitle { display: none; }
.preview-surface[data-density="airy"] .link-card { min-height: 60px; }
.preview-surface[data-density="compact"] .link-card { min-height: 40px; }
@media (max-width: 620px) {
  .public-page:not(.preview-surface) .public-shell { width: min(100% - 28px, var(--theme-max)); }
  .public-page[data-columns="two"]:not(.preview-surface) .links { grid-template-columns: 1fr; }
  .public-page[data-hero="minimal"] .profile__foot { margin-left: 0; margin-right: 0; }
}
