/* KDCR File Portal — front end. Inherits k7 tokens (--ink, --accent,
   --hairline, --paper, --serif, --sans) set in the theme's :root. */

.fp-portal { --fp-accent: var(--accent, #2e4e78); }

/* ---------- Gate ---------- */

.fp-gate { padding: 4.5rem 0 7rem; }
.fp-gate-card {
	max-width: 480px;
	margin: 0 auto;
	border: 1px solid var(--hairline, #e5e9ee);
	padding: 3rem 2.6rem;
	background: var(--paper, #fff);
}
.fp-gate-card h2 {
	font-size: clamp(1.7rem, 3vw, 2.2rem);
	margin-bottom: .9rem;
}
.fp-gate-lede { color: var(--body, #445); font-size: .98rem; margin-bottom: 1.8rem; }

/* wp-members form, restyled to k4 idiom */
.fp-gate-card #wpmem_login { width: 100%; }
.fp-gate-card #wpmem_login fieldset { border: 0; margin: 0; padding: 0; }
.fp-gate-card #wpmem_login legend { display: none; }
.fp-gate-card #wpmem_login label {
	display: block;
	font-family: var(--sans, sans-serif);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ink, #16384e);
	margin: 1rem 0 .35rem;
}
.fp-gate-card #wpmem_login input[type="text"],
.fp-gate-card #wpmem_login input[type="password"],
.fp-gate-card .login-username input,
.fp-gate-card .login-password input {
	width: 100%;
	padding: .8rem .9rem;
	border: 1px solid var(--hairline, #e5e9ee);
	border-radius: 0;
	font-size: .95rem;
	background: #fff;
}
.fp-gate-card #wpmem_login input:focus { outline: 2px solid var(--fp-accent); outline-offset: 0; border-color: var(--fp-accent); }
.fp-gate-card #wpmem_login .button_div,
.fp-gate-card .login-submit { margin-top: 1.4rem; }
.fp-gate-card #wpmem_login input[type="submit"],
.fp-gate-card .login-submit input[type="submit"] {
	display: inline-flex;
	font-family: var(--sans, sans-serif);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	padding: 1rem 2.1rem;
	background: var(--ink, #16384e);
	color: #fff;
	border: 1px solid var(--ink, #16384e);
	cursor: pointer;
	transition: all .3s ease;
}
.fp-gate-card #wpmem_login input[type="submit"]:hover,
.fp-gate-card .login-submit input[type="submit"]:hover { background: var(--ink-soft, #2c4d63); }
.fp-gate-card #wpmem_login .link-text { font-size: .85rem; margin-top: 1.2rem; }
.fp-gate-card #wpmem_login .link-text a { color: var(--fp-accent); }

/* ---------- Compact header ---------- */

.fp-header {
	/* Top padding only needs to clear the theme's fixed nav.site (~81px) plus
	   a little breathing room — deliberately tighter than the old .page-head
	   hero so the compact header sits high on the page. */
	padding: 5.5rem 0 1.3rem;
	background: var(--paper, #fff);
	border-bottom: 1px solid var(--hairline, #e5e9ee);
}
.fp-header-grid {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}
.fp-header-title {
	font-size: clamp(1.6rem, 2.6vw, 1.9rem);
	line-height: 1.1;
	margin: 0 0 .35rem;
}
.fp-header-meta {
	font-family: var(--sans, sans-serif);
	font-size: .8rem;
	color: var(--body, #667);
	margin: 0;
}
.fp-header .fp-search { flex: 0 0 300px; }

/* ---------- Welcome callout ---------- */
/* Persistent brand callout under the header: white on deep slate-navy. */

.fp-welcome { padding: 1.6rem 0 0; }
.fp-welcome-card {
	background: var(--ink, #16384e);
	color: #fff;
	padding: 2rem 2.4rem;
	border: 1px solid var(--ink-soft, #2c4d63);
	box-shadow: 0 12px 30px rgba(22, 56, 78, .18);
}
.fp-welcome-heading {
	font-family: var(--serif, serif);
	font-weight: 400;
	font-size: clamp(1.35rem, 2.4vw, 1.75rem);
	color: #fff;
	margin: 0 0 .75rem;
}
.fp-welcome-body p {
	font-family: var(--sans, sans-serif);
	font-size: .95rem;
	line-height: 1.65;
	color: rgba(255, 255, 255, .92);
	margin: 0 0 .85rem;
}
.fp-welcome-body p:last-child { margin-bottom: 0; }
.fp-welcome-body a { color: #fff; text-decoration: underline; }
@media (max-width: 640px) {
	.fp-welcome-card { padding: 1.5rem 1.3rem; }
}

/* ---------- Notice bar ---------- */
/* Reads as a distinct banner: accent-tinted background, full all-sides
   border + soft shadow (never a left accent bar — see design rule). */

.fp-notice {
	padding: 1.4rem 0;
}
.fp-notice[hidden] { display: none; }
.fp-notice-inner {
	display: flex;
	align-items: center;
	gap: 1.4rem;
	padding: 1.25rem 1.5rem;
	font-family: var(--sans, sans-serif);
	font-size: .88rem;
	background: rgba(46, 78, 120, .07);
	border: 1px solid rgba(46, 78, 120, .22);
	box-shadow: 0 8px 20px rgba(22, 56, 78, .08);
}
.fp-notice-body {
	flex: 1 1 auto;
	min-width: 0;
}
.fp-notice-heading {
	font-family: var(--serif, serif);
	font-size: 1.08rem;
	font-weight: 700;
	color: var(--ink, #16384e);
	margin: 0 0 .3rem;
}
.fp-notice-msg {
	margin: 0;
	color: var(--body, #445);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fp-notice-i { color: var(--fp-accent); margin-right: .3rem; }
.fp-notice-latest {
	display: flex;
	align-items: center;
	gap: .55rem;
	margin: 0;
	white-space: nowrap;
	flex: 1 1 auto;
	min-width: 0;
}
.fp-notice-label {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--fp-accent);
}
.fp-notice-file { color: var(--ink, #16384e); text-decoration: none; }
.fp-notice-file:hover { color: var(--fp-accent); text-decoration: underline; }
.fp-notice-dl { color: var(--fp-accent); font-weight: 700; text-decoration: none; }
.fp-notice-dl:hover { text-decoration: underline; }
.fp-notice-x {
	flex: 0 0 auto;
	background: none;
	border: 0;
	font-size: 1.3rem;
	line-height: 1;
	color: var(--body, #667);
	cursor: pointer;
	padding: .2rem .35rem;
}
.fp-notice-x:hover { color: var(--ink, #16384e); }

/* ---------- Toolbar ---------- */

.fp-tools { padding: 1.1rem 0 0; }
.fp-toolbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.fp-filter-caption {
	flex: 0 0 auto;
	font-family: var(--sans, sans-serif);
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--body, #667);
}
.fp-search {
	flex: 0 0 260px;
	padding: .7rem .9rem;
	border: 1px solid var(--hairline, #e5e9ee);
	border-radius: 0;
	font-size: .93rem;
	background: #fff;
}
.fp-search:focus { outline: 2px solid var(--fp-accent); outline-offset: 0; }
.fp-chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.fp-chip {
	font-family: var(--sans, sans-serif);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .06em;
	padding: .42rem .95rem;
	border: 1px solid var(--hairline, #e5e9ee);
	border-radius: 999px;
	background: #fff;
	color: var(--ink, #16384e);
	cursor: pointer;
	transition: all .2s ease;
}
.fp-chip:hover { border-color: var(--fp-accent); color: var(--fp-accent); }
.fp-chip[aria-pressed="true"] {
	background: var(--fp-accent);
	border-color: var(--fp-accent);
	color: #fff;
}

/* ---------- Landing: category cards ---------- */

.fp-view { padding: 1.2rem 0 4rem; }
.fp-section-title {
	font-size: 1.15rem;
	letter-spacing: .01em;
	margin: 1.6rem 0 1rem;
}
#fp-cats { scroll-margin-top: 90px; } /* browse-all scroll lands below fixed nav */
.fp-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
	gap: .9rem;
	margin-bottom: 2rem;
}
.fp-cat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .35rem;
	padding: 1.15rem 1.1rem 1.25rem;
	border: 1px solid var(--hairline, #e5e9ee);
	background: var(--paper, #fff);
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.fp-cat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(22, 56, 78, .07);
	border-color: var(--fp-cat-accent, var(--fp-accent));
}
.fp-cat-icon { color: var(--fp-cat-accent, var(--fp-accent)); }
.fp-cat-icon svg { width: 20px; height: 20px; }
.fp-cat-name {
	font-family: var(--serif, serif);
	font-size: 1.06rem;
	color: var(--ink, #16384e);
	line-height: 1.25;
}
.fp-cat-count {
	font-family: var(--sans, sans-serif);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--body, #667);
}
.fp-cat-rule {
	width: 34px;
	height: 3px;
	background: #c55165; /* brand red under each category (client 10/14/2026) */
	margin-top: .45rem;
	transition: width .25s ease;
}
.fp-cat-card:hover .fp-cat-rule { width: 52px; }

/* ---------- File rows / cards ---------- */

.fp-recent, .fp-file-list { display: flex; flex-direction: column; }
.fp-list-head,
.fp-file-row {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) minmax(0, 160px) 150px 28px;
	gap: 1rem;
	align-items: center;
}
.fp-list-head {
	font-family: var(--sans, sans-serif);
	font-size: .64rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--body, #889);
	padding: .35rem .4rem;
	border-bottom: 1px solid var(--hairline, #e5e9ee);
}
.fp-file-row {
	padding: .6rem .4rem;
	border-bottom: 1px solid var(--hairline, #e5e9ee);
	text-decoration: none;
	transition: background .2s ease;
}
.fp-file-row:first-child { border-top: 1px solid var(--hairline, #e5e9ee); }
.fp-file-row:hover { background: rgba(22, 56, 78, .03); }
.fp-badge {
	display: inline-flex;
	justify-content: center;
	font-family: var(--sans, sans-serif);
	font-size: .66rem;
	font-weight: 700;
	letter-spacing: .1em;
	padding: .3rem .5rem;
	border: 1px solid var(--hairline, #e5e9ee);
	color: var(--fp-accent);
	min-width: 48px;
}
.fp-file-title {
	font-family: var(--serif, serif);
	font-size: .95rem;
	color: var(--ink, #16384e);
	line-height: 1.35;
}
.fp-file-row:hover .fp-file-title { color: var(--fp-accent); }
.fp-file-cat {
	font-family: var(--sans, sans-serif);
	font-size: .78rem;
	color: var(--body, #667);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fp-file-meta { font-size: .82rem; color: var(--body, #778); white-space: nowrap; }
.fp-file-tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .25rem; }
.fp-file-tag {
	font-family: var(--sans, sans-serif);
	font-size: .66rem;
	font-weight: 600;
	letter-spacing: .05em;
	padding: .16rem .55rem;
	border-radius: 999px;
	background: rgba(22, 56, 78, .06);
	color: var(--ink-soft, #2c4d63);
}
.fp-dl {
	color: var(--fp-accent);
	font-weight: 700;
	text-align: center;
}
.fp-empty { color: var(--body, #667); padding: 2rem 0; }
.fp-browse-all { margin-top: 1.2rem; }
.fp-browse-all button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font-family: var(--sans, sans-serif);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--fp-accent);
}
.fp-browse-all button:hover { text-decoration: underline; }

/* ---------- Breadcrumb ---------- */

.fp-breadcrumb {
	display: flex;
	gap: .6rem;
	align-items: center;
	font-family: var(--sans, sans-serif);
	font-size: .8rem;
	letter-spacing: .04em;
	margin-bottom: 1.6rem;
	color: var(--body, #778);
}
.fp-breadcrumb a { color: var(--fp-accent); text-decoration: none; }
.fp-breadcrumb a:hover { text-decoration: underline; }
#fp-crumb-current { color: var(--ink, #16384e); font-weight: 600; }

/* ---------- Category filter bar (drill-down) ---------- */
/* Compact persistent version of the landing's category boxes: stays visible
   while browsing a category, with the active one highlighted navy/white. */
.fp-catbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.fp-catbar[hidden] { display: none; }
.fp-catbtn {
	font-family: var(--sans, sans-serif);
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .01em;
	padding: .5rem 1rem;
	border: 1px solid var(--hairline, #e5e9ee);
	border-radius: 999px;
	background: #fff;
	color: var(--ink, #16384e);
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.fp-catbtn:hover { border-color: var(--fp-accent); color: var(--fp-accent); }
.fp-catbtn[aria-pressed="true"],
.fp-catbtn[aria-pressed="true"]:hover {
	background: var(--fp-accent);
	border-color: var(--fp-accent);
	color: #fff;
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
	.fp-header { padding: 6rem 0 1.1rem; }
	.fp-header .fp-search { flex: 1 1 100%; }
	.fp-notice-inner { flex-wrap: wrap; align-items: flex-start; gap: .4rem .9rem; padding: 1.1rem 1.2rem; }
	.fp-notice-body { flex: 1 1 calc(100% - 3rem); }
	.fp-notice-msg { white-space: normal; }
	.fp-notice-latest { margin-left: 0; }
	.fp-cat-grid { grid-template-columns: repeat(2, 1fr); }
	.fp-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: .3rem;
		width: 100%;
	}
	.fp-chip { flex: 0 0 auto; }
	.fp-catbar {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: .3rem;
	}
	.fp-catbtn { flex: 0 0 auto; }
	.fp-list-head,
	.fp-file-row { grid-template-columns: 52px minmax(0, 1fr) 130px 24px; }
	.fp-list-head span:nth-child(3),
	.fp-file-cat { display: none; }
	.fp-gate-card { padding: 2.2rem 1.5rem; }
}

@media (max-width: 560px) {
	.fp-list-head { display: none; }
	.fp-file-row { grid-template-columns: 52px minmax(0, 1fr) 24px; }
	.fp-file-meta { grid-column: 2; justify-self: start; white-space: normal; }
	.fp-dl { grid-row: 1; grid-column: 3; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.fp-cat-card, .fp-cat-rule, .fp-chip, .fp-catbtn, .fp-file-row { transition: none; }
	.fp-portal .rv, .fp-gate .rv { opacity: 1; transform: none; transition: none; }
}

/* ---------- Sub-category chips (committee breakdown) ---------- */

.fp-subcats[hidden] { display: none; }
.fp-subcats {
	display: flex;
	gap: .45rem;
	flex-wrap: wrap;
	margin-bottom: 1.4rem;
}
/* Distinct from the white category pills above: a recessed tinted fill with
   no border and muted text, so the committee sub-filters read as secondary. */
.fp-subcat-chip {
	background: rgba(46, 78, 120, .07);
	border-color: transparent;
	color: var(--ink-soft, #2c4d63);
	font-size: .7rem;
}
.fp-subcat-chip:hover {
	background: rgba(46, 78, 120, .13);
	border-color: transparent;
	color: var(--fp-accent);
}
.fp-subcat-chip[aria-pressed="true"] {
	background: var(--fp-accent);
	border-color: var(--fp-accent);
	color: #fff;
}
@media (max-width: 720px) {
	.fp-subcats {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: .3rem;
	}
	.fp-subcat-chip { flex: 0 0 auto; }
}

/* ---------- File viewer (in-page PDF preview) ---------- */

.fp-viewer[hidden] { display: none; }
.fp-viewer {
	position: fixed;
	inset: 0;
	z-index: 1000; /* above the theme's fixed nav.site (z-index: 100) */
	display: flex;
	flex-direction: column;
	gap: 0;
	background: rgba(16, 34, 48, .82);
	padding: 3vh 3vw;
}
.fp-viewer-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: var(--ink, #16384e);
	color: #fff;
	padding: .7rem 1rem;
	border-radius: 4px 4px 0 0;
}
.fp-viewer-title {
	font-family: var(--serif, serif);
	font-size: 1rem;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fp-viewer-actions { display: flex; align-items: center; gap: .8rem; flex: 0 0 auto; }
.fp-viewer-dl {
	font-family: var(--sans, sans-serif);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .04em;
	color: #fff;
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 999px;
	padding: .35rem .9rem;
	white-space: nowrap;
	transition: background .2s ease;
}
.fp-viewer-dl:hover { background: rgba(255, 255, 255, .15); }
.fp-viewer-close {
	background: none;
	border: 0;
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 .2rem;
}
.fp-viewer-frame {
	flex: 1 1 auto;
	width: 100%;
	border: 0;
	background: #fff;
	border-radius: 0 0 4px 4px;
}
@media (max-width: 720px) {
	.fp-viewer { padding: 0; }
	.fp-viewer-bar, .fp-viewer-frame { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.fp-viewer-dl { transition: none; }
}

/* ---------- "The Latest" band ---------- */

.fp-latest { padding: 1.4rem 0 0; }
/* Solid brand navy so the band pops against the page (client ask, Oct 2026);
   the welcome card above stays the deeper slate — two distinct blues. */
.fp-latest-card {
	padding: 1.6rem 1.8rem 1.8rem;
	background: var(--fp-accent, #2e4e78);
	border: 1px solid rgba(255, 255, 255, .16);
	box-shadow: 0 12px 30px rgba(22, 56, 78, .22);
}
.fp-latest-title {
	font-family: var(--serif, serif);
	font-weight: 400;
	font-size: 1.35rem;
	color: #fff;
	margin: 0 0 1rem;
}
.fp-latest-card .fp-badge { color: #fff; border-color: rgba(255, 255, 255, .35); }
.fp-latest-list { display: flex; flex-direction: column; }
.fp-latest-help {
	margin: 1.1rem 0 0;
	padding-top: .9rem;
	border-top: 1px solid rgba(255, 255, 255, .18);
	font-family: var(--sans, sans-serif);
	font-size: .84rem;
	color: rgba(255, 255, 255, .85);
}
.fp-latest-help a { color: #fff; text-decoration: underline; }
.fp-latest-file {
	display: flex;
	align-items: baseline;
	gap: .6rem;
	padding: .32rem 0;
	font-family: var(--sans, sans-serif);
	font-size: .88rem;
	text-decoration: none;
	min-width: 0;
}
.fp-latest-file .fp-badge { flex: 0 0 auto; }
.fp-latest-name {
	color: #fff;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.fp-latest-file:hover .fp-latest-name { color: #fff; text-decoration: underline; }
.fp-latest-date {
	flex: 0 0 auto;
	margin-left: auto;
	font-size: .74rem;
	color: rgba(255, 255, 255, .65);
	white-space: nowrap;
}
@media (max-width: 760px) {

	.fp-latest-card { padding: 1.3rem 1.2rem; }
}

/* ---------- Topic chips overflow ---------- */

.fp-chips:not(.fp-chips-open) .fp-chip-overflow:not([aria-pressed="true"]) { display: none; }
.fp-chips-toggle {
	font-family: var(--sans, sans-serif);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	padding: .42rem .95rem;
	border: 1px dashed var(--hairline, #e5e9ee);
	border-radius: 999px;
	background: transparent;
	color: var(--fp-accent);
	cursor: pointer;
}
.fp-chips-toggle:hover { border-color: var(--fp-accent); }
