/*
 * Raconteur — author archives, linked bylines, and reader discussion.
 *
 * Loaded after main.css and built entirely from its tokens (--rc-ink,
 * --rc-paper, --rc-accent, --rc-sp-*, --rc-size-*, --rc-font-*, --rc-line).
 * No new palette entries and no new type sizes are introduced here: an
 * author page that invented its own scale would read as a bolted-on
 * section rather than part of the publication.
 *
 * @package Raconteur
 */

/* ---------- Linked bylines ---------- */

/*
 * A byline is a name first and a link second, so it stays in the running
 * text colour and earns its underline on hover/focus rather than shouting
 * in accent orange from the outset. The dotted rule is a printed-credit
 * convention: enough to signal "this resolves somewhere" without turning
 * every card into a field of blue.
 */
.rc-byline-link {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px dotted var(--rc-line-strong);
	transition: color 0.25s, border-color 0.25s;
}
.rc-byline-link:hover,
.rc-byline-link:focus-visible {
	color: var(--rc-accent-bright);
	border-bottom-color: var(--rc-accent-bright);
}
.rc-byline-link:focus-visible {
	outline: 2px solid var(--rc-accent-bright);
	outline-offset: 3px;
	border-radius: 1px;
}

/* Credit line under a novel's title on its index page. */
.rc-credit {
	margin: 0 0 var(--rc-sp-2);
	font-size: var(--rc-size-0);
	letter-spacing: 0.04em;
	color: var(--rc-paper-faint);
}

/* ---------- Cards split into wrapper + link ---------- */

/*
 * archive-rc_novel.php and archive-rc_essay.php used to be a single <a>
 * per card. They are now a wrapper element with the body as the link, so
 * a second anchor (the byline) can live in the same card without illegal
 * anchor nesting. These two rules restore the anchor's inherited colour
 * and block layout; every other card rule in main.css keys off the
 * wrapper class and is unchanged.
 */
.novel-card__link,
.essay-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.novel-card__credit {
	margin-top: 0.35rem;
	font-size: var(--rc-size-0);
	color: var(--rc-paper-faint);
}

/* ---------- Author archive ---------- */

/*
 * .back-link is inline-flex, so the kicker beneath it needs to be a block
 * or it sits on the same baseline as "All Novels" and reads as part of the
 * breadcrumb.
 */
.author-hero .eyebrow {
	display: block;
}
.author-hero__name {
	margin: 0.35rem 0 var(--rc-sp-3);
}
/* The hero already carries its own bottom space; the first work section
   does not need a full --rc-sp-8 on top of it. */
.author-hero + .section {
	padding-top: var(--rc-sp-5);
}
.author-hero__bio {
	max-width: 46rem;
}

/*
 * Work counts, set as a small figure row. Serials / chapters / essays are
 * the three units this publication actually measures a contributor in.
 */
.author-hero__stats {
	list-style: none;
	margin: var(--rc-sp-4) 0 0;
	padding: var(--rc-sp-3) 0 0;
	border-top: 1px solid var(--rc-line);
	display: flex;
	flex-wrap: wrap;
	gap: var(--rc-sp-5);
}
.author-hero__stats li {
	display: flex;
	align-items: baseline;
	gap: 0.45rem;
}
.author-stat__n {
	font-family: var(--rc-font-display);
	font-size: var(--rc-size-4);
	line-height: 1;
	color: var(--rc-paper);
}
.author-stat__label {
	font-size: var(--rc-size-0);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--rc-paper-faint);
}

@media (max-width: 620px) {
	.author-hero__stats { gap: var(--rc-sp-4); }
	.author-stat__n { font-size: var(--rc-size-3); }
}

/* Second work section on an author page sits closer to the first. */
.section--tight {
	padding-top: 0;
}

/* ---------- Chapter & essay reader discussion ---------- */

/*
 * rc_chapter and rc_essay now declare comment support, so comments.php
 * renders for real on the reader templates. The reader body is width-
 * constrained and, under the paper/sepia reading modes, light — so the
 * discussion area is pinned to the same 700px measure as the prose and
 * styled against the --rc-read-* triad rather than the site chrome
 * tokens, otherwise a cream page would sprout a black comment form.
 */
.comments-area {
	/* The reader templates already wrap this in a 700px .wrap; only the
	   colour context needs establishing, not a second set of insets. */
	color: var(--rc-read-fg);
}
.comments-area .h-3 {
	font-size: var(--rc-size-3);
	margin-bottom: var(--rc-sp-3);
	padding-top: var(--rc-sp-4);
	border-top: 1px solid var(--rc-read-rule);
}
.comments-area .comment-body {
	border-color: var(--rc-read-rule);
}
.comments-area .comment-meta {
	color: var(--rc-read-fg);
	opacity: 0.6;
}
.comments-area .comment-reply-link {
	font-size: var(--rc-size-0);
	/* The high-contrast accent step for the surface: --rc-accent-bright on
	 * night, redirected to --rc-accent on the light modes by main.css. */
	color: var(--rc-accent-bright);
	border-bottom: 1px dotted currentColor;
}

.comments-area .comment-respond {
	margin-top: var(--rc-sp-5);
	padding-top: var(--rc-sp-4);
	border-top: 1px solid var(--rc-read-rule);
}
.comments-area .comment-reply-title {
	font-family: var(--rc-font-display);
	font-size: var(--rc-size-3);
	margin-bottom: var(--rc-sp-2);
}
.comments-area .comment-notes,
.comments-area .logged-in-as,
.comments-area .comment-form-cookies-consent label {
	font-size: var(--rc-size-0);
	color: var(--rc-read-fg);
	opacity: 0.65;
}
/*
 * comments.php passes class_form => 'form-grid', which inherits main.css's
 * two-column contact-form grid. A comment form is a single measure of prose
 * plus one field row, so it is forced back to one column here rather than
 * leaving a half-width comment textarea.
 */
.comments-area form {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--rc-sp-2);
}
.comments-area form label {
	display: block;
	font-size: var(--rc-size-0);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.3rem;
	opacity: 0.75;
}
.comments-area form input[type="text"],
.comments-area form input[type="email"],
.comments-area form input[type="url"],
.comments-area form textarea {
	width: 100%;
	font-family: var(--rc-font-text);
	font-size: var(--rc-size-1);
	color: var(--rc-read-fg);
	background: transparent;
	border: 1px solid var(--rc-read-rule);
	border-radius: var(--rc-radius);
	padding: 0.7rem 0.85rem;
	transition: border-color 0.25s;
}
.comments-area form textarea {
	min-height: 9rem;
	resize: vertical;
}
.comments-area form input:focus,
.comments-area form textarea:focus {
	outline: none;
	border-color: var(--rc-accent);
}
.comments-area .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.comments-area .comment-form-cookies-consent label {
	text-transform: none;
	letter-spacing: 0;
	margin: 0;
}
.comments-area .form-submit {
	margin: 0;
}
.comments-area .form-submit .submit {
	font-family: var(--rc-font-display);
	cursor: pointer;
}
