/* Interface overrides, loaded after Bootstrap and the legacy theme. */
html.app-page { background: #f3f5f7; padding-bottom: 0; }
body.app-body {
	background: #f3f5f7;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	padding: 0;
}
.app-body .app-shell {
	max-width: 1220px;
	background: #fff;
	border-color: #e1e5e9;
	border-radius: 0;
	box-shadow: none;
	margin-bottom: 0;
	min-height: 100vh;
	box-sizing: border-box;
}
.app-body .app-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-left: 0;
	border-color: #e1e5e9;
}
.app-body .app-header-row::before,
.app-body .app-header-row::after,
.app-body .dashboard-grid::before,
.app-body .dashboard-grid::after,
.app-body .home-action-grid::before,
.app-body .home-action-grid::after,
.app-body .news-grid::before,
.app-body .news-grid::after,
.app-body .project-choice-grid::before,
.app-body .project-choice-grid::after {
	display: none;
}
.app-body .app-header-row > [class*="span"] {
	width: auto;
	margin: 0;
	float: none;
}
.app-body .app-brand { max-width: 230px; }
.app-body h2.welcome-user { font-size: 22px; line-height: 1.4; }
.app-body .app-tutorial-card {
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	max-width: none;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
.app-body .app-tutorial-label { color: #596570; letter-spacing: 0; text-transform: none; font-size: 13px; }
.app-body .navbar.nav-primary .navbar-inner {
	background: #f3f5f7 !important;
	border-color: #e1e5e9;
	border-radius: 8px;
	box-shadow: none;
}
body.app-body .navbar.nav-primary .nav > li > a {
	font-size: 13px;
	border-radius: 6px;
	padding: 10px 12px !important;
	margin: 6px 2px;
}
body.app-body .navbar.nav-primary .nav > li > a:hover {
	background: #e5e9ed;
	padding: 10px 12px !important;
}
body.app-body .navbar.nav-primary .nav .active > a,
body.app-body .navbar.nav-primary .nav .active > a:hover {
	background: #263b4b !important;
	padding: 10px 12px !important;
	box-shadow: none;
}
.app-body .nav.pn li:empty { display: none; }
.app-body .page-title { font-size: 28px; line-height: 1.25; letter-spacing: -0.025em; }
.app-body .page-eyebrow { color: #806018; }
.app-body .dashboard-grid,
.app-body .home-action-grid,
.app-body .news-grid,
.app-body .project-choice-grid {
	display: grid;
	gap: 20px;
	margin-left: 0;
}
.app-body .dashboard-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.app-body .home-action-grid,
.app-body .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.app-body .project-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-body .dashboard-grid > [class*="span"],
.app-body .home-action-grid > [class*="span"],
.app-body .news-grid > [class*="span"],
.app-body .project-choice-grid > [class*="span"] {
	width: auto;
	min-width: 0;
	float: none;
	margin: 0;
}
.app-body .home-hero-card,
.app-body .home-section-card,
.app-body .sidebar-card,
.app-body .project-choice-card,
.app-body .dashboard-action-card,
.app-body .news-card,
.app-body .sidebar-link-card {
	box-sizing: border-box;
	background: #fff;
	border-color: #dfe4e8;
	border-radius: 10px;
	box-shadow: none;
}
.app-body .home-hero-card { background: #f7f8fa; }
.app-body .home-section-card { margin-top: 24px; }
.app-body .dashboard-action-primary { border-top: 4px solid #d8b706; padding-top: 13px; }
.app-body .dashboard-action-card,
.app-body .project-choice-card { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.app-body .dashboard-action-card:hover,
.app-body .project-choice-card:hover,
.app-body .sidebar-link-card:hover {
	border-color: #8a9ba8;
	box-shadow: 0 4px 12px rgba(34, 43, 52, 0.08);
	transform: none;
}
.app-body .dashboard-action-card img,
.app-body .expert-card-image,
.app-body .project-choice-media,
.app-body .project-choice-media img { border-radius: 6px; }
.app-body .project-choice-media { border: 0; padding: 0; }
.app-body .dashboard-action-card img { width: 48px; height: 48px; border-radius: 12px; }
.app-body .dashboard-action-title,
.app-body .project-choice-title { margin-top: 18px; }
.app-body .project-choice-media img { aspect-ratio: 40 / 21; }
.app-body .btn.btn-help-big {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: auto !important;
	height: auto !important;
	min-height: 40px;
	padding: 8px 12px !important;
	text-indent: 0;
	color: #263b4b !important;
	background: #fff !important;
	border: 1px solid #b8c2cb !important;
	border-radius: 6px;
	text-decoration: none;
}
.app-body .btn.btn-help-big::before {
	content: "?";
	display: inline-block;
	width: 18px;
	height: 18px;
	line-height: 18px;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-weight: 700;
	text-align: center;
}
.app-body .btn.btn-help-big:hover { background: #eaf0f5 !important; border-color: #8a9ba8 !important; }
.app-body .latestNews-title {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font-size: 20px;
	line-height: 1.4;
	text-transform: none;
}
.app-body .news-card h4 { line-height: 1.4; font-size: 16px; }
.app-body .news-card-body { flex-wrap: wrap; }
.app-body .newsletter-featured { width: 70px; height: auto; }
.app-body .sidebar-card h3 { font-size: 20px; line-height: 1.4; }
.app-body .sidebar-card p { color: #596570; }
.app-body .sidebar-link-card { margin-top: 12px; padding: 14px 16px; }
.app-body label,
.app-body input,
.app-body button,
.app-body select,
.app-body textarea { font-family: inherit; font-size: 14px !important; }
.app-body .btn { font-size: 13px !important; border-radius: 6px; }
.app-body .app-form-card input[type="text"],
.app-body .app-form-card input[type="password"],
.app-body .app-form-card select,
.app-body .app-form-card textarea {
	border-color: #b8c2cb;
	border-radius: 6px;
	box-shadow: none;
}
.app-body a:focus-visible,
.app-body button:focus-visible,
.app-body input:focus-visible,
.app-body select:focus-visible,
.app-body textarea:focus-visible {
	outline: 3px solid #286b9a;
	outline-offset: 3px;
}
/* Keep Project Information within the shell instead of fixed Bootstrap columns. */
.project-info-page .workflow-progress,
.project-info-page .project-form-card,
.project-info-page .page-nav .navbar-inner {
	box-sizing: border-box;
	width: 100%;
	margin-left: 0;
	background: #f7f8fa;
	border: 1px solid #dfe4e8;
	border-radius: 10px;
	box-shadow: none;
}
.project-info-page .workflow-progress { padding: 18px 20px; }
.project-info-page .project-form-card { padding: 28px; background: #fff; }
.project-info-page .project-form-card fieldset { max-width: 790px; min-width: 0; margin: 0 auto; }
.project-info-page .project-form-card .controls { min-width: 0; }
.project-info-page .project-form-card .controls input,
.project-info-page .project-form-card .controls select,
.project-info-page .project-form-card .controls textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 10px;
}
.project-info-page .project-form-card .controls textarea { min-height: 140px; }
.project-info-page .form-note { margin-top: 16px; }
.project-info-page .page-nav .btn { min-height: 40px; padding: 8px 16px; background-image: none; }
.project-info-page .page-nav .btn-continue { background: #263b4b; border-color: #263b4b; color: #fff; }
.project-info-page .page-nav .btn-continue:hover { background: #344f63; }
.project-info-page .btn-continue .icon-arrow-right { background-image: url(../bootstrap/img/glyphicons-halflings-white.png); }
@media (max-width: 979px) {
	.project-info-page .project-form-card { padding: 20px; }
	.project-info-page .project-form-card .control-label { display: block; float: none; width: auto; text-align: left; }
	.project-info-page .project-form-card .controls,
	.project-info-page .form-note { margin-left: 0 !important; }
}
/* Pile design: reserve room for the fixed-size diagram without wrapping the form. */
.pile-design-form .workflow-stage-row,
.pile-design-form .workflow-layout,
.pile-design-form .workflow-layout > .span10 > .row {
	display: grid;
	gap: 20px;
	margin-left: 0;
}
.pile-design-form .workflow-stage-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.pile-design-form .workflow-layout { grid-template-columns: 184px minmax(0, 1fr); align-items: start; }
.pile-design-form .workflow-layout > .span10 > .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pile-design-form .workflow-stage-row::before,
.pile-design-form .workflow-stage-row::after,
.pile-design-form .workflow-layout::before,
.pile-design-form .workflow-layout::after,
.pile-design-form .workflow-layout > .span10 > .row::before,
.pile-design-form .workflow-layout > .span10 > .row::after,
.pile-design-form .pile-helix-row::before,
.pile-design-form .pile-helix-row::after { display: none; }
.pile-design-form .workflow-stage-row > [class*="span"],
.pile-design-form .workflow-layout [class*="span"] {
	box-sizing: border-box;
	min-width: 0;
	float: none;
	width: auto;
	margin-left: 0;
}
.pile-design-form .workflow-layout .row { margin-left: 0; }
.pile-design-form .workflow-layout > .span10 > .row > .span6 { grid-column: 1 / -1; }
.pile-design-form .workflow-tools { padding-top: 0; }
.pile-design-form .workflow-progress,
.pile-design-form .calc-sidecard,
.pile-design-form .page-nav .navbar-inner {
	background: #f7f8fa;
	border: 1px solid #dfe4e8;
	border-radius: 10px;
	box-shadow: none;
}
.pile-design-form .workflow-layout #soilGraphic {
	box-sizing: border-box;
	background: #fff;
	border-color: #dfe4e8;
	border-radius: 6px;
	box-shadow: none;
}
.pile-design-form .control-label { width: 130px; }
.pile-design-form .controls { margin-left: 146px; }
.pile-design-form .workflow-layout input.span1 { width: 70px; }
.pile-design-form .workflow-layout select.span2 { width: 170px; max-width: 100%; }
.pile-design-form .pile-helix-row {
	display: grid;
	grid-template-columns: 90px 80px 80px 24px;
	gap: 10px;
	align-items: center;
	min-height: 36px;
}
.pile-design-form .workflow-layout .pile-helix-row select { width: 100%; }
.pile-design-form .calc-sidecard { padding: 20px 16px; }
.pile-design-form .calc-sidecard .controls > .span1 { display: inline-block; min-width: 55px; }
.pile-design-form .calc-sidecard .btn.btn-warning { min-width: 0; max-width: 100%; border-radius: 6px; margin-bottom: 8px; }
@media (max-width: 1100px) {
	.pile-design-form .control-label { display: block; float: none; width: auto; text-align: left; }
	.pile-design-form .controls { margin-left: 0; }
}
@media (max-width: 979px) {
	.pile-design-form .workflow-stage-row,
	.pile-design-form .workflow-layout > .span10 > .row { grid-template-columns: minmax(0, 1fr); }
	.pile-design-form .workflow-tools { justify-content: flex-start; }
}
@media (max-width: 650px) {
	.pile-design-form .workflow-layout { grid-template-columns: minmax(0, 1fr); }
	.pile-design-form .workflow-layout > .span2 { width: 184px; margin: 0 auto; }
	.pile-design-form .pile-helix-row { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr) 20px; gap: 6px; }
}
/* Login and registration share a compact form layout outside the app navigation. */
.app-body.page-auth .app-shell {
	background: transparent;
	border: 0;
}
.auth-entry {
	width: 100%;
	max-width: 760px;
	margin: 20px auto 32px;
}
.auth-entry-login { max-width: 460px; }
.auth-entry-brand { margin-bottom: 28px; text-align: center; }
.auth-entry-brand img { width: 260px; max-width: 100%; height: auto; }
.auth-entry-card {
	padding: 32px;
	background: #fff;
	border: 1px solid #dfe4e8;
	border-top: 4px solid #d8b706;
	border-radius: 12px;
	box-shadow: 0 6px 20px rgba(34, 43, 52, 0.05);
}
.auth-entry-heading { margin-bottom: 24px; }
.auth-entry-form { margin: 0; }
.auth-entry-form fieldset { margin: 0 0 24px; min-width: 0; }
.auth-entry-form legend {
	margin-bottom: 18px;
	padding-bottom: 8px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.5;
	color: #263b4b;
	border-color: #e1e5e9;
}
.auth-entry-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 20px;
}
.auth-entry-field { min-width: 0; margin-bottom: 18px; }
.auth-entry-field-wide { grid-column: 1 / -1; }
.auth-entry-field label { margin-bottom: 6px; color: #344654; font-weight: 600; }
.app-body .auth-entry-field input,
.app-body .auth-entry-field select {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	height: 44px;
	margin: 0;
	padding: 10px 12px;
	font-size: 16px !important;
	line-height: 22px;
	color: #24313d;
	background: #fff;
	border: 1px solid #b8c2cb;
	border-radius: 6px;
	box-shadow: none;
}
.app-body .auth-entry-field input:focus,
.app-body .auth-entry-field select:focus { border-color: #286b9a; }
.auth-entry-hint { margin: 8px 0 0; font-size: 13px; color: #596570; }
.auth-entry-recovery { margin: -2px 0 20px; text-align: right; }
.auth-entry a { color: #245f88; text-decoration: underline; text-underline-offset: 3px; }
.auth-entry a:hover { color: #193e58; }
.app-body .auth-entry .auth-entry-submit {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	margin: 0 !important;
	padding: 12px 18px;
	font-size: 15px !important;
	font-weight: 600;
	line-height: 20px !important;
	color: #fff;
	background: #263b4b;
	border: 1px solid #263b4b;
	box-shadow: none;
}
.app-body .auth-entry .auth-entry-submit:hover,
.app-body .auth-entry .auth-entry-submit:focus { background: #344f63; }
.auth-entry-switch { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid #e1e5e9; text-align: center; }
.auth-entry-help { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 20px; font-size: 13px; }
.auth-entry-agreement { padding-top: 4px; }
.auth-entry-agreement p { margin-bottom: 16px; color: #596570; }
.auth-entry-errors p {
	padding: 12px;
	margin: 0 0 16px;
	color: #982a2a;
	background: #fff2f2;
	border: 1px solid #efc5c5;
	border-radius: 6px;
}
.auth-entry-field label.error {
	display: block;
	margin: 6px 0 0;
	font-size: 13px !important;
	font-weight: 400;
	color: #982a2a;
}
.app-body .auth-entry-field input.error,
.app-body .auth-entry-field select.error { border-color: #b74343; color: #24313d; }
@media (max-width: 600px) {
	.auth-entry { margin-top: 8px; }
	.auth-entry-card { padding: 24px 20px; }
	.auth-entry-grid { grid-template-columns: minmax(0, 1fr); }
	.auth-entry-brand img { width: 220px; }
}
@media (max-width: 979px) {
	.app-body .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
	.app-body .app-shell { padding: 20px 16px; border: 0; }
	.app-body .app-header-row { flex-direction: column-reverse; gap: 16px; }
	.app-body .app-tutorial-card { justify-content: center; }
	.app-body .home-action-grid,
	.app-body .news-grid,
	.app-body .project-choice-grid { grid-template-columns: minmax(0, 1fr); }
	.app-body .home-hero-card,
	.app-body .home-section-card,
	.app-body .sidebar-card { padding: 20px; }
	.app-body .page-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	.app-body .dashboard-action-card,
	.app-body .project-choice-card { transition: none; }
}
