/* The homepage application's own layout, on the app's theme tokens (css/app.css). */
/* The page scrolls under the bar (body.page is the window's height); its content centred, at most 1100 px wide. */
.homepage, .homepage-settings { width: 100%; box-sizing: border-box; overflow-y: auto; padding: 24px max(16px, calc((100% - 1100px) / 2)); }
.homepage__who { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin: 8px 0 32px; }
.homepage__avatar { border-radius: 50%; object-fit: cover; background: var(--bg-raised); }
/* The look's typeface (looks.js) for the page's words, its buttons and fields too. */
body[data-look] .button, body[data-look] input, body[data-look] textarea, body[data-look] select { font-family: inherit; }
.homepage__name { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.homepage__line { margin: 6px 0 0; font-size: 1.1rem; color: var(--text); }
.homepage__handle { margin: 6px 0 0; color: var(--text-dim); }
.homepage-form { display: grid; gap: 12px; max-width: 560px; }
.homepage-form__field { display: grid; gap: 4px; }
.homepage-form__field input { font: inherit; padding: 6px 8px; }
.homepage-form__picture { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.homepage-form__switch { display: flex; gap: 8px; align-items: center; }
.homepage-form__address { margin: 0; color: var(--text-dim); overflow-wrap: anywhere; }
.homepage-form .page-section__note { margin: -6px 0 0; }

/* The page (render.js): sections of blocks, one column or two. */
.hp-section { margin: 0 0 40px; }
.hp-section__blocks { display: grid; gap: 24px 32px; }
.hp-section--two .hp-section__blocks { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.hp-block p { line-height: 1.6; max-width: 70ch; }
.hp-hero { margin: 0; }
.hp-hero img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: var(--bg-raised); border-radius: 6px; }
.hp-hero figcaption { margin-top: 8px; color: var(--text-dim); }
.hp-headline { margin: 0; font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.15; }
.hp-subline { margin: 8px 0 0; font-size: 1.2rem; color: var(--text-dim); }
.hp-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* The builder (edit.js): the page with handles round its sections and blocks. */
.hp-edit-section { border: 1px dashed var(--border, #8884); border-radius: 8px; padding: 12px; }
.hp-edit-block { border: 1px solid var(--border, #8884); border-radius: 6px; padding: 8px 12px 12px; }
.hp-edit__bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.hp-edit__bar .button { padding: 2px 10px; }
.hp-edit__kind { font-weight: 600; margin-right: auto; color: var(--text-dim); }
.hp-edit__add { margin: 12px 0; color: var(--text-dim); }
.hp-edit__form { max-width: none; }
.hp-edit__link { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: end; margin: 0; }
.hp-choose__doc { display: grid; gap: 4px; cursor: pointer; }
.hp-choose__doc img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg-raised); border-radius: 4px; }
.hp-edit__page { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 16px; color: var(--text-dim); }

/* Pages (render.js pagesNav): the artist's pages in their order, the one shown marked. */
.hp-pages { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: -16px 0 32px; padding-bottom: 8px; border-bottom: 1px solid var(--border, #8884); }
.hp-pages__page { color: var(--text-dim); text-decoration: none; padding: 4px 0; }
.hp-pages__page:hover { color: var(--text); }
.hp-pages__page[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
/* The builder's pages: a tab each, the chosen one's title and handles beside. */
.hp-edit__pages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.hp-edit__pages [aria-pressed="true"] { border-color: var(--accent); font-weight: 600; }
.hp-edit__pagebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 24px; }
.hp-edit__pagebar input { font: inherit; padding: 4px 8px; }
/* Private pages (step 5): the lock in the pages' list, a locked page's form, the builder's Who sees it. */
.hp-pages__lock { vertical-align: -1px; opacity: 0.8; }
.hp-locked { margin: 24px 0; }
.hp-edit__access { display: grid; gap: 8px; max-width: 720px; margin: 0 0 20px; }
.hp-edit__access-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.hp-edit__access-row .homepage-form__field { flex: 1 1 320px; }
.hp-edit__access-row input[readonly] { font: inherit; padding: 4px 8px; }
.hp-edit__access-row input[type="password"] { font: inherit; padding: 4px 8px; }
/* Work for adults (step 6): the mark beside a page's name, the choice to see it. */
.hp-pages__mark { font-size: 0.7em; font-weight: 600; letter-spacing: 0.04em; padding: 1px 5px; border-radius: 4px; border: 1px solid currentColor; vertical-align: 1px; }
.hp-owner-says { color: var(--text); }
/* Find an artist (find.js): the search box, then the homepages found as cards. */
.hp-find { max-width: 560px; margin: 0 0 8px; }
.hp-find input { font: inherit; padding: 8px 10px; }
.hp-find__grid { margin-top: 16px; }
