/* ==========================================================================
   petpypelink.com – site styles
   Black frame (header, footer), white page, content in solid panels with
   white space around them: music black, writing yellow, shared pages stone.
   Fonts: Manrope (headings, menus, music side) and Literata (writing side),
   self-hosted in fonts/ (SIL Open Font License, see the .txt files there).
   Player and photo enlarger: at the end of this file (was player.css).

   Contents: 1 fonts and colours · 2 basics · 3 header · 4 panels · 5 home ·
   6 music · 7 writing and read · 8 about · 9 contact · 10 footer · 11 phones
   ========================================================================== */

/* 1. Fonts and colours ---------------------------------------------------- */
@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/literata-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
	--black: #111;
	--white: #fff;
	--yellow: #F2C230;      /* the writing colour, also the menu marker */
	--stone: #EFEDE9;       /* shared pages reached directly */
	--sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--serif: "Literata", Georgia, "Times New Roman", serif;

	/* set per side below */
	--panel: var(--stone);
	--panel-text: var(--black);
	--muted: #555;
	--line: rgba(0, 0, 0, .15);
	--link-hover: var(--black);
	--focus: var(--black);
	--button-bg: var(--black);
	--button-text: var(--white);
	--body-font: var(--sans);

	--wide: 80rem;                         /* widest the content gets */
	--gap: clamp(1rem, 3vw, 2.5rem);       /* white space around panels */
	--pad: clamp(1.5rem, 5vw, 5.5rem);     /* space inside panels */
	--measure: 40rem;                      /* comfortable line length */
}
.side-music {
	--panel: var(--black); --panel-text: #EDEDED; --muted: #a3a3a3; --line: rgba(255, 255, 255, .16);
	--link-hover: var(--yellow); --focus: var(--yellow); --button-bg: var(--yellow); --button-text: var(--black);
}
.side-writing {
	--panel: var(--yellow); --panel-text: var(--black); --muted: #3a3a3a; --line: rgba(0, 0, 0, .2);
	--body-font: var(--serif);
}

/* 2. Basics --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	margin: 0; min-height: 100vh; min-height: 100svh;
	display: flex; flex-direction: column;
	background: var(--white); color: var(--black);
	font: 400 1.0625rem/1.65 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--sans); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin-top: 1.9em; }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: .07em; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
cite { font-style: italic; }

.skip-link { position: absolute; left: -9999px; z-index: 10; }
.skip-link:focus { left: 1rem; top: 1rem; padding: .6rem 1rem; background: var(--yellow); color: var(--black); font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.todo { background: var(--white); color: var(--black); outline: 1px dashed currentColor; padding: 0 .2em; }
noscript p { margin: 0; padding: .75rem var(--gap); background: var(--stone); text-align: center; font-size: .9rem; }

/* 3. Header (black, full width; content within --wide) -------------------- */
.site-header, .site-footer {
	padding-left: max(var(--gap), calc((100% - var(--wide)) / 2 + var(--gap)));
	padding-right: max(var(--gap), calc((100% - var(--wide)) / 2 + var(--gap)));
	background: var(--black); color: var(--white);
}
.site-header {
	padding-top: 1.1rem; padding-bottom: 1.1rem;
	display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem;
}
.site-header a { color: var(--white); text-decoration: none; }
.site-header a:hover { color: var(--yellow); }
.brand { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.site-nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 2.25rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-nav a { font-size: .95rem; padding-bottom: .3rem; border-bottom: 3px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--yellow); }
.side-switch { font-size: .95rem; font-weight: 800; }
.site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--yellow); }

/* 4. Panels: the content area of every page ------------------------------- */
main {
	flex: 1 0 auto;
	width: min(100% - 2 * var(--gap), var(--wide) - 2 * var(--gap));
	margin: var(--gap) auto;
	padding: var(--pad);
	background: var(--panel); color: var(--panel-text);
	font-family: var(--body-font);
}
main::after, section::after { content: ""; display: table; clear: both; }
main > p, main > ul, main > ol, main > section > p, main > section > ul, main > aside > p, main > aside > ul,
.book > p, .excerpt > p { max-width: var(--measure); }
.welcome { font-family: var(--sans); font-size: .95rem; color: var(--muted); margin: 0 0 2rem; }
.welcome.is-fading { height: 0 !important; margin-bottom: 0; padding-top: 0; padding-bottom: 0; opacity: 0; overflow: hidden;
	transition: opacity .8s ease, height .6s ease .7s, margin .6s ease .7s, padding .6s ease .7s; }
.tagline, .album-number, .book-status, .excerpt-date, .excerpt-book {
	font-family: var(--sans); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
/* beside the text; as wide as the space next to a full-length line allows (16–28rem) */
/* a large statement line (Listen: "Not for everyone…"): two lines, the second
   softer and slightly overlapping the first */
.statement { margin: 0 0 1.5rem; font-family: var(--sans); font-size: clamp(2.4rem, 4.3vw, 3.9rem); font-weight: 800; line-height: 1; letter-spacing: -.035em; color: var(--link-hover); }
.statement span { display: block; }
.statement span + span { margin-top: -.18em; padding-left: 1.1em; opacity: .42; }

/* two columns on wide screens: Listen (statement and "More about my music" on the right)
   and Contact (intro and closing line beside the form) */
@media (min-width: 60rem) {
	.page-listen main, .page-playlist main, .page-contact main { display: grid; grid-template-columns: minmax(0, 32rem) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 5rem); align-content: start; }
	.page-contact main { grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); }
	.page-listen main::after, .page-playlist main::after, .page-contact main::after { display: none; }
	.page-listen main > *, .page-playlist main > *, .page-contact main > * { grid-column: 1; }
	.page-listen main > .welcome, .page-playlist main > .welcome, .page-contact main > .welcome { grid-row: 1; }
	.page-listen main > h1, .page-playlist main > h1, .page-contact main > h1 { grid-row: 2; }

	/* Listen and Playlist: text and player on the left; the large line on the right, level with
	   the text, and the side note at the bottom right, level with the end of the track list.
	   The large line keeps room under it for the side note, so the two never overlap. */
	:is(.page-listen, .page-playlist) .statement + p { grid-row: 3; }
	:is(.page-listen, .page-playlist) main > .statement { grid-column: 2; grid-row: 3 / span 2; align-self: start; margin: .1rem 0 var(--side-room, 4rem); }
	:is(.page-listen, .page-playlist) main > .player { grid-row: 4; }
	:is(.page-listen, .page-playlist) main > .side-note { grid-column: 2; grid-row: 4; align-self: end; margin: 0 0 2.4rem; max-width: 24rem; }
	/* Playlist: the closing note is longer, so it gets its own row under the player; any extra
	   height from the large line goes into that row, never between the intro and the player */
	.page-playlist main { grid-template-rows: auto auto auto auto 1fr; }
	.page-playlist main > .statement { grid-row: 3 / span 3; margin-bottom: 1.5rem; }
	.page-playlist main > .side-note { grid-row: 5; align-self: end; margin: 0 0 2.4rem; }

	.page-contact main > h1 + p { grid-column: 2; grid-row: 3; align-self: start; margin-top: 3.4rem; font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 700; line-height: 1.3; max-width: 18em; }
	.page-contact main > .contact-form { grid-row: 3 / span 2; }
	.page-contact main > p:last-child { grid-column: 2; grid-row: 4; align-self: end; margin-bottom: 2.5rem; }
}

.page-photo { float: right; width: clamp(16rem, calc(100% - var(--measure) - 3rem), 28rem); margin: .4rem 0 2rem 3rem; }
.button {
	display: inline-block; padding: .8rem 2.2rem; border: 2px solid var(--button-bg); border-radius: 99px;
	background: var(--button-bg); color: var(--button-text); font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover { background: transparent; color: inherit; }

/* 5. Home: white band with the headline, then a black and a yellow block --- */
.page-home main { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0; background: none; color: var(--black); display: flex; flex-direction: column; }
.page-home .welcome { max-width: none; margin: 0; padding: 1.25rem var(--gap) 0; text-align: center; color: #555; }
.home { flex: 1 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: 0 var(--gap) var(--gap); }
.home-intro { grid-column: 1 / -1; text-align: center; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.home-intro h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* the name is in the header */
.home-lead { margin: 0; font-size: clamp(2rem, 4.4vw, 4rem); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; }
.home-lead span { display: block; }
.choice { min-width: 0; display: flex; flex-direction: column; padding: clamp(1.75rem, 4vw, 3.5rem); min-height: 25rem; }
.choice-music { background: var(--black); color: #EDEDED; --muted: #a3a3a3; --link-hover: var(--yellow); --focus: var(--yellow); }
.choice-writing { background: var(--yellow); color: var(--black); --muted: #3a3a3a; }
.choice h2 { margin: 0 0 1.5rem; font-size: 1rem; letter-spacing: 0; }
.button-music { --button-bg: var(--white); --button-text: var(--black); }
.button-writing { --button-bg: var(--black); --button-text: var(--white); }
.choice .tagline { margin-bottom: .75rem; }
.choice-text { max-width: 26rem; font-size: .95rem; }
.choice-writing .choice-text { font-family: var(--serif); }
.choice-player { width: min(100%, 26rem); }
.choice-cover .cover { max-width: 6.5rem; margin: 1.5rem 0 1.25rem; } /* same space above as the player strip (.player margin-top) */
/* music-only website (WRITING off in includes/init.php): the headline, then one music block across the page */
.home-solo { grid-template-columns: 1fr; }
.home-solo .choice-music { align-items: center; justify-items: center; text-align: center; min-height: 22rem; }
.home-solo .choice-text { max-width: 34rem; }
.home-solo .choice-player { text-align: left; }
/* both blocks share their rows, so the cover starts level with the music player */
@supports (grid-template-rows: subgrid) {
	.home { grid-template-rows: auto auto auto auto auto 1fr; }
	.choice { display: grid; grid-row: span 5; grid-template-rows: subgrid; align-content: start; row-gap: 0; }
	.choice > * { align-self: start; }
}

/* 6. Music: Music, Listen, Playlist, Albums -------------------------------- */
/* short facts as a list (Music: Rights and Licensing) */
.facts { max-width: var(--measure); padding-left: 1.2rem; }
.facts li { margin-bottom: .45rem; padding-left: .25rem; }
.facts li::marker { color: var(--link-hover); }
.listen-links { clear: both; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.listen-links h2 { margin-top: 0; }

/* Albums: a grid of covers; the chosen album opens in a full-width panel under
   its row (grid-auto-flow: dense lets the covers after it fill up that row).
   Without JavaScript all albums are simply shown one after another. */
.album-grid { margin-top: 2.5rem; }
.album-cover { display: none; }
.album { display: grid; grid-template-columns: minmax(7rem, 13rem) minmax(0, 1fr); gap: 0 clamp(1.5rem, 3vw, 2.5rem); align-items: start; margin-bottom: 3rem; scroll-margin-top: 7.5rem; }
.album[hidden] { display: none; }
.album-art img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.album-number { margin: 0 0 .3rem; }
.album h2 { margin: 0 0 .3rem; font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.album-desc { color: var(--muted); }
.album .button { padding: .55rem 1.5rem; font-size: .95rem; }
.album .tracks { max-width: 36rem; margin-top: 1.5rem; }

.js .album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); grid-auto-flow: row dense; gap: 2.25rem 1.5rem; }
.js .album-cover {
	display: block; align-self: start; min-width: 0; padding: 0; background: none; border: 0;
	color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.album-cover img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: .7rem; transition: transform .2s ease; }
.album-cover:hover img { transform: translateY(-3px); }
.album-name { display: block; font-weight: 700; line-height: 1.25; }
.album-meta { display: block; margin-top: .15rem; font-size: .85rem; line-height: 1.35; color: var(--muted); }
.album-cover:hover .album-name { text-decoration: underline; text-underline-offset: .18em; }
.album-cover[aria-expanded="true"] img { outline: 3px solid var(--yellow); outline-offset: 3px; }
.album-cover[aria-expanded="true"] .album-name { color: var(--yellow); }
.album-cover:focus-visible { outline: none; }
.album-cover:focus-visible img { outline: 3px solid var(--focus); outline-offset: 3px; }
.album-close { display: none; }
.js .album { position: relative; }
.js .album-close {
	position: absolute; top: .75rem; right: .75rem; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
	background: none; border: 0; border-radius: 50%; color: #fff; cursor: pointer;
}
.js .album-close svg { width: 26px; height: 26px; fill: currentColor; }
.js .album-close:hover { color: var(--yellow); }
.js .album-close:focus-visible { outline: 2px solid var(--yellow); outline-offset: 0; }
.js .album { grid-column: 1 / -1; margin: 0; padding: clamp(1.25rem, 3vw, 2.25rem); background: #1b1b1b; border-top: 3px solid var(--yellow); }

/* 7. Writing and Read ----------------------------------------------------- */
.side-writing h1, .side-writing h2 { font-family: var(--sans); }
.author-photo { float: left; width: 14rem; margin: .35rem 2rem 1rem 0; }
.excerpt-list { list-style: none; padding: 0; }
.excerpt-list li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.excerpt-list li:first-child { border-top: 1px solid var(--line); }
.excerpt-list a { font-weight: 600; }
.excerpt-list .excerpt-date { display: block; margin-top: .15rem; font-size: .7rem; }

.cover { box-shadow: 0 8px 28px rgba(0, 0, 0, .28); }
.subtitle { font-style: italic; font-size: 1.15rem; margin-top: -.4rem; }
.book-status { margin-bottom: 1.5rem; }
.book { display: grid; grid-template-columns: minmax(10rem, 20rem) minmax(0, 1fr); gap: 0 clamp(2rem, 5vw, 4.5rem); align-items: start; }
.book > .cover { grid-row: span 20; width: 100%; }
.book > * { grid-column: 2; }
.book > .cover { grid-column: 1; }
.book h2 { margin-top: 1.5em; }
.books { list-style: none; padding: 0; margin-top: 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: 2.25rem 1.5rem; max-width: none !important; }
.books .cover { width: 100%; margin-bottom: .7rem; transition: transform .2s ease; }
.books a:hover .cover { transform: translateY(-3px); }
.books h2, .books h3 { margin: 0; font-size: 1.0625rem; line-height: 1.25; letter-spacing: 0; }
.books h2 a, .books h3 a { text-decoration: none; }
.books h2 a:hover, .books h3 a:hover { text-decoration: underline; }
.books .subtitle { margin: .15rem 0 .3rem; font-size: .85rem; line-height: 1.35; }
.books .book-status { margin: 0; font-size: .7rem; }

/* Read (like Listen): intro, books and latest excerpts on the left; the large line
   and "More about my writing" on the right.
   A book page: cover, title, description and contents on the left; its excerpts on the right. */
.book-head { display: flex; gap: clamp(1.25rem, 3vw, 2rem); align-items: flex-end; margin-bottom: 2rem; }
.book-head .cover { width: clamp(7rem, 14vw, 11rem); flex: 0 0 auto; }
.book-head h1 { margin-bottom: .2em; }
.book-head .subtitle { margin: 0 0 .6rem; }
.book-head .book-status { margin: 0; }
.book-text > p, .read-intro { max-width: var(--measure); }
.contents { max-width: var(--measure); margin: 1.5rem 0 0; padding: .9rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--sans); }
.contents summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: .6rem; }
.contents summary::-webkit-details-marker { display: none; }
.contents summary::after { content: ""; width: .5em; height: .5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15em) rotate(45deg); transition: transform .2s; }
.contents[open] summary::after { transform: translateY(.1em) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .contents summary::after { transition: none; } }
.contents h3 { margin: 1.25rem 0 .35rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.contents ol { margin: 0; padding-left: 2rem; }
.contents li { padding: .1rem 0; }
.book-excerpts h2 { margin-top: 0; }
.read-latest h2, .read-books h2 { margin-top: 2.25rem; }
.excerpt-list.numbered, .book-excerpts .excerpt-list, .read-latest .excerpt-list { counter-reset: excerpt; max-width: 36rem; font-family: var(--sans); }
.excerpt-list.numbered li, .book-excerpts .excerpt-list li, .read-latest .excerpt-list li { counter-increment: excerpt; position: relative; padding-left: 2.6rem; }
.excerpt-list.numbered li::before, .book-excerpts .excerpt-list li::before, .read-latest .excerpt-list li::before { content: counter(excerpt, decimal-leading-zero); position: absolute; left: .35rem; top: .8rem; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.excerpt-of { color: var(--muted); }
.read-more { font-family: var(--sans); }
.book-side { margin-top: 2.5rem; }

@media (min-width: 60rem) {
	.page-read main:has(> .book-head), .page-read main:has(> .read-books) {
		display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); column-gap: clamp(2rem, 5vw, 5rem); align-content: start;
	}
	.page-read main:has(> .book-head)::after, .page-read main:has(> .read-books)::after { display: none; }
	.page-read main:has(> .book-head) > *, .page-read main:has(> .read-books) > * { grid-column: 1; }
	.page-read main > .welcome { grid-row: 1; }
	/* Read */
	.page-read main > h1 { grid-row: 2; }
	.page-read main > .read-intro { grid-row: 3; }
	.page-read main > .statement { grid-column: 2; grid-row: 3 / span 2; align-self: start; margin: .1rem 0 0; }
	.page-read main > .read-books { grid-row: 4; }
	.page-read main > .read-latest { grid-row: 5; }
	.page-read main > .read-more { grid-column: 2; grid-row: 5; align-self: end; margin: 0 0 1.6rem; }
	/* a book */
	.page-read main > .book-head { grid-row: 2; }
	.page-read main > .book-text { grid-row: 3; }
	.page-read main > .book-side { grid-column: 2; grid-row: 2 / span 2; align-self: start; margin: 0; padding-top: .4rem; }
}

/* one excerpt: a light reading sheet on the yellow panel */
.excerpt {
	max-width: 46rem; margin: 0 auto 2rem; padding: clamp(1.5rem, 5vw, 4rem);
	background: #FFFDF6; color: var(--black); box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 12px 40px rgba(0, 0, 0, .12);
	font-size: 1.125rem; line-height: 1.75;
}
.excerpt h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-bottom: .3em; }
.excerpt .excerpt-book { margin-bottom: .75rem; }
.excerpt .excerpt-date { margin-bottom: 2.25rem; }
.excerpt-back { max-width: 46rem; margin: 0 auto; font-family: var(--sans); font-weight: 600; }

/* 8. About ---------------------------------------------------------------- */
.photos { list-style: none; padding: 0; clear: both; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 60rem !important; }
.photos a { display: block; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity .2s; }
.photos a:hover img { opacity: .85; }

/* 9. Contact -------------------------------------------------------------- */
.contact-form { max-width: 36rem; margin-bottom: 2.5rem; font-family: var(--sans); }
.contact-form label { display: block; margin: 1.1rem 0 .35rem; font-size: .9rem; font-weight: 700; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form select, .contact-form textarea {
	width: 100%; padding: .65rem .75rem; font: inherit; color: var(--black); background: var(--white);
	border: 1px solid rgba(0, 0, 0, .35); border-radius: 0;
}
.contact-form textarea { min-height: 10rem; resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; }
.contact-form button { margin-top: 1.5rem; padding: .8rem 2.2rem; border: 2px solid var(--button-bg); border-radius: 99px; background: var(--button-bg); color: var(--button-text); font: 700 1rem var(--sans); cursor: pointer; }
.contact-form button:hover { background: transparent; color: inherit; }
.form-note { margin: 1.5rem 0 0; font-size: .85rem; color: var(--muted); }
.form-errors { padding: .75rem 1rem; background: var(--white); color: #b00020; border-left: 4px solid #b00020; font-family: var(--sans); }
.form-success { padding: .75rem 1rem; background: var(--white); color: var(--black); border-left: 4px solid var(--black); font-weight: 700; font-family: var(--sans); }
/* book announcement: sign-up on the book page, confirm/remove on /notify */
.announce { margin: 2.5rem 0 2rem; max-width: 30rem; }
.announce > p { font-family: var(--sans); }
.signup-form { margin: 0; }
.signup-form label { margin-top: .75rem; }
.signup-row { display: flex; gap: .5rem; }
.signup-row input[type=email] { flex: 1; min-width: 0; }
.signup-form .signup-row button { margin: 0; padding: .6rem 1.4rem; white-space: nowrap; }
.signup-form .form-note { margin-top: .75rem; }
.announce .form-errors { margin-bottom: .5rem; }
.notify-form button { margin-top: .5rem; }
.admin-remove button { margin-left: .5rem; padding: .1rem .7rem; border: 1px solid currentColor; border-radius: 99px; background: none; font: 600 .8rem var(--sans); cursor: pointer; }

/* 10. Footer -------------------------------------------------------------- */
.site-footer { padding-top: 1.4rem; padding-bottom: 1.75rem; font-size: .85rem; color: #bbb; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--yellow); }

/* Terms page */
.page-terms main ul { padding-left: 1.2rem; }
.page-terms main li { margin-bottom: .6rem; }

/* 11. Phones and narrow windows ------------------------------------------- */
@media (max-width: 46rem) {
	/* header: name and the Music/Writing switch on one row, the menu on the next, spread across the width */
	.site-header { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .55rem 1rem; padding-top: .9rem; padding-bottom: .35rem; }
	.site-nav { display: contents; }
	.brand { grid-row: 1; grid-column: 1; }
	.side-switch { grid-row: 1; grid-column: 2; }
	.site-nav ul { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: .1rem .8rem; }
	.site-nav a { display: inline-block; padding: .3rem 0 .35rem; font-size: .9rem; }
	.page-photo { float: none; width: 100%; margin: 0 0 1.5rem; }
	.author-photo { float: none; width: 12rem; margin: 0 0 1.25rem; }
	.photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
	.statement { font-size: clamp(2rem, 9vw, 2.6rem); }
	.books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
	.book { display: block; }
	.book > .cover { width: min(70%, 16rem); margin-bottom: 1.75rem; }
	.album { grid-template-columns: 1fr; }
	.album-art { width: 9rem; margin-bottom: 1rem; }
	.js .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }

	/* home: the music block on top, the writing block below, each with its own line (approved 26 Nov) */
	.page-home .welcome { padding-bottom: 1rem; }
	.home { display: flex; flex-direction: column; gap: 0; padding: 0; }
	.home-intro, .home-lead { display: contents; }
	.home-lead span { padding: 2rem var(--gap) 1rem; text-align: center; font-size: clamp(1.9rem, 8.5vw, 2.6rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
	.lead-music { order: 1; background: var(--black); color: #EDEDED; }
	.choice-music { order: 2; }
	.lead-writing { order: 3; background: var(--yellow); color: var(--black); }
	.choice-writing { order: 4; }
	.choice { display: flex; flex: 1 0 auto; min-height: 0; align-items: center; text-align: center; padding: 0 var(--gap) 1.75rem; }
	.choice h2 { margin-bottom: 1rem; }
	.choice .tagline, .choice-player, .choice-cover { display: none; }
	.choice-text { margin: 0; font-size: .9rem; }
	/* music-only Home: there is room for the tagline and the player */
	.home-solo .choice .tagline, .home-solo .choice-player { display: block; }
	.home-solo .choice > * { align-self: center; }
	.home-solo .choice-player { margin-top: .5rem; text-align: left; }
}

/* small phones: a little less space between the menu items, so the menu stays on one row */
@media (max-width: 25rem) {
	.site-nav ul { gap: .1rem .6rem; }
}

/* one column (phones and tablets upright): only the first line of the large line;
   the second, overlapping line needs the right-hand column */
@media (max-width: 59.99rem) {
	.statement span + span { display: none; }
}

/* Real Instruments: a row of photos of the instruments I play, beyond the guitar (opens in the photo viewer) */
.instrument-row { list-style: none; padding: 0; margin: 2rem 0 2.5rem; clear: both; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; max-width: none !important; }
.instrument-row a { display: block; }
.instrument-row img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; transition: opacity .2s; }
.instrument-row a:hover img { opacity: .85; }
.instrument-row span { display: block; margin-top: .4rem; font: 600 .85rem var(--sans); color: var(--muted); }
@media (max-width: 59.99rem) { .instrument-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ==========================================================================
   Player and photo enlarger (formerly player.css)
   ========================================================================== */

/* ==========================================================================
   Audio player and photo viewer (both built by assets/js/site.js).
   Colours follow site.css: a dark player strip, the current track and the
   controls marked in yellow.
   ========================================================================== */

/* ---- Player -------------------------------------------------------------- */
.player { max-width: 36rem; margin: 1.5rem 0 2rem; font-family: var(--sans, system-ui, sans-serif); }
.player-albums { max-width: none; }

/* the control strip */
.player-bar { padding: .85rem 1rem .55rem 1.1rem; background: #1d1d1d; color: #fff; border: 1px solid rgba(255, 255, 255, .1); }
.player-albums > .player-bar { position: sticky; top: 0; z-index: 5; max-width: 36rem; }
.player-now { margin: 0; line-height: 1.35; }
.player-title { font-weight: 700; font-size: 1.05rem; }
.player-album { font-size: .85rem; color: #bdbdbd; }
.player-error .player-album { color: #ffb4b4; }
.player-controls { display: flex; align-items: center; gap: 0 .15rem; margin-top: .3rem; }
.player-controls button {
	flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
	background: none; border: 0; border-radius: 50%; color: #fff; cursor: pointer;
}
.player-controls button svg { width: 22px; height: 22px; fill: currentColor; }
.player-controls .player-play svg { width: 28px; height: 28px; }
.player-controls button:not([disabled]):hover { color: var(--yellow, #F2C230); }
.player-controls button:focus-visible { outline: 2px solid var(--yellow, #F2C230); outline-offset: 0; }
.player-controls button[disabled] { opacity: .3; cursor: default; }
.player-loading .player-play { animation: player-pulse 1s ease-in-out infinite alternate; }
@keyframes player-pulse { to { opacity: .4; } }
.player-time { flex: 0 0 auto; margin-left: .35rem; font-size: .85rem; font-variant-numeric: tabular-nums; color: #d6d6d6; white-space: nowrap; }

/* position bar */
.player-seek { flex: 1 1 auto; min-width: 5rem; height: 24px; margin: 0 .5rem; background: none; border: 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
.player-seek:disabled { cursor: default; opacity: .5; }
.player-seek:focus-visible { outline: 2px solid var(--yellow, #F2C230); outline-offset: 2px; }
.player-seek::-webkit-slider-runnable-track { height: 4px; background: rgba(255, 255, 255, .45); border-radius: 2px; }
.player-seek::-moz-range-track { height: 4px; background: rgba(255, 255, 255, .45); border-radius: 2px; }
.player-seek::-moz-range-progress { height: 4px; background: var(--yellow, #F2C230); border-radius: 2px; }
.player-seek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5px; background: var(--yellow, #F2C230); border: 0; border-radius: 50%; }
.player-seek::-moz-range-thumb { width: 14px; height: 14px; background: var(--yellow, #F2C230); border: 0; border-radius: 50%; }

/* the track list: every track is a button */
.tracks { list-style: none; counter-reset: track; margin: .25rem 0 0; padding: 0; }
.tracks li { counter-increment: track; position: relative; border-bottom: 1px solid var(--line, rgba(255, 255, 255, .16)); }
.tracks li::before { content: counter(track, decimal-leading-zero); position: absolute; left: .35rem; top: .62rem; color: var(--muted, #a3a3a3); font-size: .85rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.track {
	display: block; width: 100%; padding: .55rem .35rem .55rem 2.6rem; margin: 0;
	background: none; border: 0; color: inherit; font: inherit; line-height: 1.4; text-align: left; cursor: pointer;
}
.track:hover .track-title { text-decoration: underline; text-underline-offset: .18em; }
.track:focus-visible { outline: 2px solid var(--focus, #F2C230); outline-offset: -2px; }
.track[aria-current] { color: var(--link-hover, #F2C230); font-weight: 700; }
.tracks li:has(.track[aria-current])::before { color: var(--link-hover, #F2C230); font-weight: 700; }
.track-album { color: var(--muted, #a3a3a3); font-weight: 400; }
/* a small moving bar next to the track that is playing */
.is-playing .track[aria-current] .track-title::after {
	content: ""; display: inline-block; width: .55em; height: .55em; margin-left: .5em; vertical-align: .05em;
	background: currentColor; border-radius: 50%; animation: player-pulse .8s ease-in-out infinite alternate;
}

/* ---- Photo viewer (About, Albums) ---------------------------------------- */
.viewer {
	width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 3.5rem 4.5rem 1.5rem;
	border: 0; background: transparent; color: #fff; overflow: hidden;
}
.viewer::backdrop { background: rgba(0, 0, 0, .9); }
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; touch-action: pan-y; }
.viewer-image { display: block; max-width: 100%; max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; background: #222; user-select: none; }
.viewer-caption { display: flex; gap: 1.5rem; justify-content: space-between; width: 100%; padding-top: .75rem; font: .95rem/1.4 var(--sans, system-ui, sans-serif); }
.viewer-count { flex: 0 0 auto; color: #bbb; font-variant-numeric: tabular-nums; }
.viewer button {
	position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
	background: rgba(0, 0, 0, .35); border: 0; border-radius: 50%; color: #fff; cursor: pointer;
}
.viewer button svg { width: 28px; height: 28px; fill: currentColor; }
.viewer button:hover { color: var(--yellow, #F2C230); }
.viewer button:focus-visible { outline: 2px solid var(--yellow, #F2C230); outline-offset: 2px; }
.viewer-close { top: .75rem; right: .75rem; }
.viewer-prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.viewer-next { right: .75rem; top: 50%; transform: translateY(-50%); }
.viewer button[hidden] { display: none; }

@media (max-width: 46rem) {
	/* narrow screens: buttons and time on one line, the position bar below them */
	.player-controls { flex-wrap: wrap; }
	.player-time { margin-left: auto; }
	.player-seek { order: 5; flex-basis: 100%; margin: .15rem 0 .1rem; }
	.viewer { padding: 3.5rem .5rem 1rem; }
	.viewer-prev, .viewer-next { top: auto; bottom: .75rem; transform: none; }
	.viewer-caption { padding: .75rem 3.5rem 0 .25rem; }
	.viewer-image { max-height: calc(100dvh - 11rem); }
}
