:root {
	--ink: #18242b;
	--muted: #68777d;
	--paper: #f8f7f3;
	--coral: #e96d57;
	--teal: #1c7774;
	--line: #dfe5e3;
	--font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
	--font-display: 'Playfair Display', Georgia, serif;
}

* {
	letter-spacing: 0;
}

body {
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--paper);
}

h1,
h2,
h3,
.navbar-brand {
	font-family: var(--font-display);
}

.navbar-brand {
	font-size: 1.45rem;
	font-weight: 700;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	background: var(--teal);
	color: white;
	border-radius: 50%;
	font: 700 1.1rem var(--font-body);
}

.text-coral {
	color: var(--coral);
}

.btn-coral {
	background: var(--coral);
	border-color: var(--coral);
	color: white;
}

.btn-coral:hover {
	background: #cf5844;
	border-color: #cf5844;
	color: #fff;
}

.nav-search {
	border: 1px solid var(--line);
	background: #fff;
	border-radius: 4px;
	max-width: 270px;
}

.nav-search input {
	border: 0;
	outline: 0;
	padding: 0.55rem 0.75rem;
	width: 100%;
	background: transparent;
}

.nav-search button {
	border: 0;
	background: none;
	padding: 0 0.8rem;
	font-size: 1.2rem;
}

.avatar-btn {
	background: #d7ebe8;
	color: var(--teal);
	font-weight: 700;
	border: 0;
	border-radius: 50%;
	width: 42px;
	height: 42px;
}

.hero {
	background: var(--teal);
	color: white;
	padding: 5.5rem 0 5rem;
	position: relative;
	overflow: hidden;
}

.hero:after {
	content: '';
	position: absolute;
	right: -8%;
	top: -45%;
	width: 55%;
	height: 180%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	transform: rotate(-25deg);
}

.hero h1 {
	font-size: clamp(2.8rem, 5vw, 5rem);
	line-height: 1.02;
	max-width: 680px;
}

.hero p {
	color: #d7efec;
	max-width: 540px;
	font-size: 1.12rem;
}

.hero-search {
	background: #fff;
	padding: 0.45rem;
	border-radius: 4px;
	max-width: 600px;
	position: relative;
	z-index: 1;
}

.hero-search input {
	border: 0;
	outline: 0;
	padding: 0.75rem;
	width: 100%;
}

.hero-search button {
	white-space: nowrap;
}

.section-pad {
	padding: 4.5rem 0;
}

.eyebrow {
	text-transform: uppercase;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	color: var(--coral);
	font-weight: 700;
}

.book-card {
	background: #fff;
	border: 1px solid var(--line);
	height: 100%;
	transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 28px rgba(24, 36, 43, 0.08);
}

.cover {
	aspect-ratio: 3 / 4;
	background: #dce9e6;
	display: grid;
	place-items: center;
	position: relative;
	overflow: hidden;
}

.cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cover-detail {
	max-width: 360px;
}

.card-body {
	padding: 1.25rem;
}

.book-title {
	font: 700 1.2rem var(--font-display);
	margin: 0.2rem 0;
}

.pill {
	display: inline-block;
	background: #edf5f3;
	color: var(--teal);
	font-size: 0.72rem;
	padding: 0.3rem 0.55rem;
	border-radius: 20px;
}

.form-shell {
	max-width: 760px;
	margin: 4rem auto;
}

.portal-sidebar {
	background: #183c3c;
	color: #d5eae7;
	min-height: calc(100vh - 90px);
}

.portal-sidebar a {
	color: #b5cfcc;
	padding: 0.7rem 1rem;
	display: block;
	text-decoration: none;
	border-radius: 4px;
}

.portal-sidebar a:hover,
.portal-sidebar a.active {
	background: #2d5a58;
	color: white;
}

.metric {
	background: #fff;
	border: 1px solid var(--line);
	padding: 1.5rem;
}

.metric strong {
	font: 700 2.2rem var(--font-display);
}

@media (min-width: 992px) {
	.col-lg-5 {
		flex: 0 0 auto;
		width: 81.66666667%;
	}
}
/* Homepage book showcase */
.book-hero { padding: 3.5rem 0 2.5rem; background: #185d5c; }
.book-hero::after { pointer-events: none; }
.hero-content { position: relative; z-index: 1; }
.hero-slides { display: grid; overflow: hidden; }
.hero-slide { grid-area: 1 / 1; display: grid; grid-template-columns: 1.2fr 1fr;
    align-items: center; gap: 3rem; padding: 1.5rem 0 2rem;
    visibility: hidden; opacity: 0; transform: translateX(8%);
    transition: transform 600ms ease, opacity 600ms ease, visibility 600ms; }
.hero-slide.is-active { visibility: visible; opacity: 1; transform: translateX(0); }
.hero-copy { min-width: 0; }
.hero-title { font-size: clamp(2.5rem, 4.8vw, 4.8rem); line-height: 1.08;
    max-width: 680px; overflow-wrap: anywhere; margin-bottom: 1rem; }
.hero-author { margin-bottom: 1.5rem; }
.hero-description { min-height: 5rem; }
.hero-art { position: relative; display: grid; place-items: center; padding: 1rem 2rem; }
.hero-halo { position: absolute; width: 100%; max-width: 400px; aspect-ratio: 1;
    border-radius: 50%; background: #ffffff0b; border: 1px solid #ffffff20; }
.hero-book { position: relative; width: clamp(180px, 22vw, 285px); height: auto;
    transform: rotate(6deg); border-radius: 2px 7px 7px 2px;
    box-shadow: -9px 8px 0 #ffffff18, 18px 24px 40px #082e3b66; }
.hero-controls { display: flex; align-items: center; gap: .75rem; }
.hero-controls[hidden] { display: none; }
.hero-control { border: 1px solid #ffffff66; border-radius: 50%; color: white;
    background: transparent; min-width: 44px; height: 44px; font-size: 1.2rem; }
.hero-control:hover { background: #ffffff1a; }
.hero-control:focus-visible, .hero-dot:focus-visible { outline: 3px solid #f7c984; outline-offset: 3px; }
.hero-pause { border-radius: 24px; padding: 0 1rem; font-size: .85rem; }
.hero-dots { display: flex; }
.hero-dot { width: 28px; height: 44px; padding: 0; border: 0; background: transparent; }
.hero-dot::before { content: ''; display: block; width: 8px; height: 8px;
    margin: auto; border-radius: 50%; background: #ffffff66; }
.hero-dot[aria-pressed="true"]::before { background: #fff; width: 20px; border-radius: 8px; }
.hero-search input { min-width: 0; }
@media (max-width: 767px) {
    .book-hero { padding: 1.5rem 0 2rem; }
    .hero-slide { grid-template-columns: 1fr; gap: 1.75rem; padding-top: .5rem; }
    .hero-art { grid-row: 1; padding: 1rem; }
    .hero-book { width: 145px; }
    .hero-halo { max-width: 215px; }
    .hero-title { font-size: 2.5rem; }
    .hero-description { min-height: 0; }
    .hero-search { flex-direction: column; gap: .3rem; }
    .hero-controls { gap: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; transform: none; }
}

.upload-preview { display: block; width: 100%; height: 200px; object-fit: contain; background: #f1f3f0; border-radius: 6px; margin-top: 1rem; }
.upload-preview[hidden] { display: none; }
.book-photo img { object-fit: contain; }
