.fm-shell {
	--fm-navy: #17324d;
	--fm-teal: #6f4aa8;
	--fm-green: #27784b;
	--fm-amber: #a35c00;
	--fm-red: #b42318;
	--fm-border: #d7dee3;
	--fm-muted: #657680;
	width: 100%;
	max-width: none;
	margin: 0 auto;
	padding: 24px 20px 52px;
	color: #243441;
	font-family: inherit;
}

.fm-shell *,
.fm-shell *::before,
.fm-shell *::after {
	box-sizing: border-box;
}

.fm-header,
.fm-case-head,
.fm-section-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
}

.fm-header,
.fm-case-head {
	margin-bottom: 24px;
}

.fm-header h1,
.fm-case-head h1 {
	margin: 0 0 6px;
	color: var(--fm-navy);
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	line-height: 1.15;
	padding-bottom: 10px;
	border-bottom: 4px solid var(--fm-teal);
}

.fm-header p,
.fm-case-head p,
.fm-section-head p {
	margin: 0;
	max-width: 760px;
	color: #576874;
}

.fm-eyebrow {
	margin: 0 0 6px !important;
	color: var(--fm-teal) !important;
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.fm-card {
	margin: 0 0 18px;
	padding: 22px;
	border: 1px solid var(--fm-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 7px rgba(23, 50, 77, .045);
}

.fm-card h2 {
	margin: 0 0 20px;
	color: var(--fm-navy);
	font-size: 1.25rem;
}

.fm-card h3 {
	margin: 22px 0 8px;
	font-size: 1rem;
}

.fm-form {
	display: grid;
	gap: 18px;
}

.fm-form .fm-card {
	margin: 0;
}

.fm-form-section h2 {
	margin-bottom: 18px;
}

.fm-form .fm-grid > .fm-field,
.fm-form .fm-grid > .fm-check {
	margin-bottom: 0;
}

.fm-grid {
	display: grid;
	gap: 18px;
}

.fm-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fm-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fm-span-2,
.fm-detail-full {
	grid-column: 1 / -1;
}

.fm-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0 0 18px;
	font-weight: 700;
}

.fm-field > span {
	color: #263947;
}

.fm-field em,
.fm-fieldset em {
	color: var(--fm-red);
	font-size: .73rem;
	font-style: normal;
	text-transform: uppercase;
}

.fm-field small {
	color: var(--fm-muted);
	font-weight: 400;
	line-height: 1.4;
}

.fm-field input,
.fm-field textarea,
.fm-field select,
.fm-toolbar input,
.fm-toolbar select,
.fm-action-item select {
	width: 100%;
	border: 1px solid #adbac3;
	border-radius: 8px;
	background: #fff;
	color: #172b3a;
	font: inherit;
	padding: 11px 12px;
}

.fm-field input,
.fm-field select,
.fm-toolbar input,
.fm-toolbar select,
.fm-action-item select {
	min-height: 46px;
}

.fm-field textarea {
	resize: vertical;
}

.fm-field input:focus,
.fm-field textarea:focus,
.fm-field select:focus,
.fm-toolbar input:focus,
.fm-toolbar select:focus {
	outline: 3px solid rgba(111, 74, 168, .2);
	border-color: var(--fm-teal);
}

.fm-fieldset {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
}

.fm-fieldset legend {
	margin-bottom: 12px;
	color: #263947;
	font-weight: 800;
}

.fm-type-options {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.fm-type-options label {
	display: flex;
	gap: 10px;
	min-height: 84px;
	padding: 14px;
	border: 1px solid var(--fm-border);
	border-radius: 10px;
	background: #fbfcfc;
	cursor: pointer;
}

.fm-type-options label:has(input:checked) {
	border-color: var(--fm-teal);
	background: #f7f3fb;
	box-shadow: 0 0 0 2px rgba(111, 74, 168, .12);
}

.fm-type-options input,
.fm-check input {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	margin-top: 2px;
}

.fm-type-options span {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.fm-type-options small {
	color: var(--fm-muted);
	font-weight: 400;
	line-height: 1.35;
}

.fm-check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0 0 18px;
	font-weight: 500;
}

.fm-person-fields {
	padding: 22px;
	border: 1px solid var(--fm-border);
	background: #fff;
}

.fm-person-fields > legend {
	padding: 0 6px;
	color: var(--fm-navy);
	font-size: 1.25rem;
}

.fm-submit-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 16px;
	border-top: 1px solid #e4e9ec;
}

.fm-submit-row p {
	margin: 0;
	max-width: 680px;
	color: var(--fm-muted);
	font-size: .9rem;
}

.fm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	background: var(--fm-teal);
	color: #fff !important;
	font-weight: 800;
	text-decoration: none !important;
	padding: 12px 18px;
	cursor: pointer;
}

.fm-button:hover {
	background: #066b76;
}

.fm-button--secondary {
	border: 1px solid #a8b6be;
	background: #fff;
	color: var(--fm-navy) !important;
}

.fm-button--secondary:hover {
	background: #f0f5f6;
}

.fm-button--small {
	padding: 8px 12px;
	font-size: .86rem;
}

.fm-button--full {
	width: 100%;
}

.fm-confirmation {
	padding: 26px;
	border: 1px solid #8ac2a4;
	border-radius: 14px;
	background: #effaf3;
}

.fm-confirmation h2 {
	margin-top: 0;
	color: #175c35;
}

.fm-confirmation .fm-button {
	margin: 8px 8px 0 0;
}

.fm-notice,
.fm-alert {
	margin: 0 0 20px;
	padding: 15px 18px;
	border-radius: 9px;
}

.fm-notice--error {
	background: #fff0ef;
	color: #7a211b;
}

.fm-notice--success {
	background: #effaf3;
	color: #175c35;
}

.fm-alert {
	display: flex;
	gap: 14px;
	align-items: center;
	border-left: 5px solid var(--fm-red);
	background: #fff0ef;
	color: #65201b;
}

.fm-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 22px;
}

.fm-metrics > div {
	display: flex;
	flex-direction: column;
	padding: 14px 16px;
	border: 1px solid var(--fm-border);
	border-radius: 12px;
	background: #fff;
}

.fm-metrics > div.is-alert {
	border-color: #e6aaa5;
	background: #fff6f5;
}

.fm-metrics strong {
	color: var(--fm-navy);
	font-size: 1.55rem;
	line-height: 1.15;
}

.fm-metrics span {
	color: var(--fm-muted);
	font-size: .9rem;
}

.fm-toolbar,
.fm-toolbar-filters,
.fm-search {
	display: flex;
	gap: 12px;
}

.fm-toolbar {
	justify-content: space-between;
	margin-bottom: 16px;
}

.fm-search {
	width: 100%;
	max-width: 460px;
	gap: 0;
}

.fm-search input {
	border-radius: 8px 0 0 8px;
}

.fm-search button {
	border: 0;
	border-radius: 0 8px 8px 0;
	background: var(--fm-navy);
	color: #fff;
	font-weight: 700;
	padding: 0 16px;
}

.fm-table-wrap {
	overflow: auto;
	border: 1px solid var(--fm-border);
	border-radius: 12px;
	background: #fff;
}

.fm-table {
	width: 100%;
	border-collapse: collapse;
}

.fm-table th,
.fm-table td {
	padding: 14px 16px;
	border-bottom: 1px solid #e5eaed;
	text-align: left;
	white-space: nowrap;
}

.fm-table th {
	background: #f2f5f6;
	color: #52636f;
	font-size: .78rem;
	text-transform: uppercase;
}

.fm-table tbody tr {
	cursor: pointer;
}

.fm-table tbody tr:hover,
.fm-table tbody tr:focus {
	background: #f5fbfb;
}

.fm-table a {
	color: var(--fm-navy);
}

.fm-table .fm-summary-cell {
	min-width: 260px;
	max-width: 420px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fm-empty {
	text-align: center !important;
	color: var(--fm-muted);
}

.fm-pill {
	display: inline-block;
	padding: 5px 9px;
	border-radius: 999px;
	background: #e8edf0;
	color: #344956;
	font-size: .78rem;
	font-weight: 800;
	white-space: nowrap;
}

.fm-type--complaint,
.fm-priority--urgent {
	background: #fde2df;
	color: #922318;
}

.fm-type--compliment {
	background: #dff4e7;
	color: #17643a;
}

.fm-type--comment {
	background: #e3f2f4;
	color: #14606a;
}

.fm-priority--high {
	background: #fff0c7;
	color: #775900;
}

.fm-pill--error {
	background: #fde2df;
	color: #922318;
}

.fm-overdue {
	color: var(--fm-red);
	font-weight: 800;
}

.fm-back {
	display: inline-block;
	margin-bottom: 16px;
	color: var(--fm-teal);
	font-weight: 700;
	text-decoration: none;
}

.fm-case-tags,
.fm-email-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fm-case-layout {
	display: block;
}

.fm-sticky {
	position: static;
	margin-top: 18px;
}

.fm-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 24px;
	margin: 0;
}

.fm-details > div {
	padding: 12px 0;
	border-bottom: 1px solid #edf0f2;
}

.fm-details dt {
	margin-bottom: 4px;
	color: var(--fm-muted);
	font-size: .78rem;
	font-weight: 800;
	text-transform: uppercase;
}

.fm-details dd {
	margin: 0;
	line-height: 1.55;
}

.fm-detail-narrative {
	margin-top: 12px;
	padding: 14px !important;
	border: 0 !important;
	border-radius: 10px;
	background: #f7f9fa;
}

.fm-files {
	margin: 0;
	padding-left: 20px;
}

.fm-inline-upload {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #e4e9ec;
}

.fm-section-head {
	margin-bottom: 18px;
}

.fm-section-head h2 {
	margin-bottom: 4px;
}

.fm-email-unavailable {
	margin: 0;
	max-width: 260px;
	text-align: right;
}

.fm-communications article {
	padding: 13px 0;
	border-top: 1px solid #edf0f2;
}

.fm-communications article > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
}

.fm-communications article p {
	margin: 4px 0 0;
	color: var(--fm-muted);
	font-size: .84rem;
}

.fm-note-form,
.fm-action-form {
	padding-bottom: 22px;
	border-bottom: 1px solid var(--fm-border);
}

.fm-timeline article {
	position: relative;
	margin-left: 8px;
	padding: 20px 0 4px 22px;
	border-left: 2px solid #cfdbdf;
}

.fm-timeline article::before {
	content: "";
	position: absolute;
	left: -6px;
	top: 24px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--fm-teal);
}

.fm-timeline article div {
	display: flex;
	justify-content: space-between;
	gap: 14px;
}

.fm-timeline article span,
.fm-audit-list span {
	color: var(--fm-muted);
	font-size: .82rem;
}

.fm-timeline article p {
	margin: 8px 0;
	line-height: 1.55;
}

.fm-action-list {
	padding-top: 8px;
}

.fm-action-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 140px auto;
	gap: 12px;
	align-items: center;
	padding: 15px 0;
	border-bottom: 1px solid #edf0f2;
}

.fm-action-item p {
	margin: 4px 0 0;
	color: var(--fm-muted);
	font-size: .84rem;
}

.fm-action-item.is-complete strong {
	color: var(--fm-muted);
	text-decoration: line-through;
}

.fm-target-grid {
	grid-template-columns: 1fr;
	gap: 0;
}

.fm-target-grid .fm-field {
	margin-bottom: 16px;
}

.fm-manage-group {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #e4e9ec;
}

.fm-manage-group h3 {
	margin: 0 0 14px;
	color: var(--fm-navy);
	font-size: .82rem;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.fm-sticky > h2 + .fm-manage-group {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.fm-manage-group > .fm-field:last-child {
	margin-bottom: 0;
}

.fm-muted,
.fm-closure-hint {
	color: var(--fm-muted);
}

.fm-closure-hint {
	font-size: .8rem;
}

.fm-audit summary {
	cursor: pointer;
	color: var(--fm-navy);
	font-weight: 800;
}

.fm-audit-list p {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid #edf0f2;
}

@media (max-width: 940px) {
	.fm-case-layout {
		grid-template-columns: 1fr;
	}

	.fm-sticky {
		position: static;
	}

	.fm-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.fm-header,
	.fm-case-head,
	.fm-section-head,
	.fm-submit-row,
	.fm-toolbar {
		flex-direction: column;
	}

	.fm-grid--2,
	.fm-grid--3,
	.fm-type-options,
	.fm-details {
		grid-template-columns: 1fr;
	}

	.fm-span-2,
	.fm-detail-full {
		grid-column: auto;
	}

	.fm-toolbar-filters,
	.fm-search {
		width: 100%;
		max-width: none;
	}

	.fm-toolbar-filters > label {
		flex: 1;
	}

	.fm-action-item {
		grid-template-columns: 1fr;
	}

	.fm-case-tags {
		order: -1;
	}

	.fm-email-unavailable {
		max-width: none;
		text-align: left;
	}
}

@media (max-width: 520px) {
	.fm-shell {
		padding: 18px 12px 40px;
	}

	.fm-card {
		padding: 18px;
	}

	.fm-metrics,
	.fm-toolbar-filters {
		grid-template-columns: 1fr;
		display: grid;
	}

	.fm-submit-row .fm-button,
	.fm-email-actions .fm-button {
		width: 100%;
	}

	.fm-timeline article div,
	.fm-audit-list p,
	.fm-communications article > div {
		flex-direction: column;
		gap: 3px;
	}
}

/* Public feedback form */
.fm-public-shell {
	max-width: 920px;
	padding-left: 0;
	padding-right: 0;
}

.fm-public-form {
	gap: 22px;
}

.fm-public-form .fm-card {
	padding: clamp(20px, 4vw, 32px);
	border-radius: 16px;
}

.fm-public-form .fm-card h2 {
	margin-bottom: 8px;
	font-size: clamp(1.3rem, 3vw, 1.65rem);
}

.fm-section-intro {
	margin: 0 0 22px;
	color: var(--fm-muted);
	line-height: 1.55;
}

.fm-type-options--public label {
	min-height: 112px;
	align-items: flex-start;
}

.fm-type-options--public strong {
	font-size: 1.03rem;
}

.fm-anonymous-choice {
	margin: 20px 0;
	padding: 14px 16px;
	border: 1px solid var(--fm-border);
	border-radius: 10px;
	background: #f8fafb;
}

.fm-public-submit {
	display: grid;
	gap: 18px;
}

.fm-public-submit p {
	margin: 0;
	color: var(--fm-muted);
	font-size: .94rem;
	line-height: 1.55;
}

.fm-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

@media (max-width: 720px) {
	.fm-public-shell {
		padding-top: 12px;
	}

	.fm-type-options--public,
	.fm-public-form .fm-grid--2 {
		grid-template-columns: 1fr;
	}

	.fm-type-options--public label {
		min-height: 0;
	}
}
