/*
 * SEATURTLE.ORG modern site shell
 * Version 0.6
 * Canonical responsive shell baseline
 *
 * No dependency on legacy site.css or ddlevelsmenu styles.
 * Shell owns viewport layout, masthead, navigation, footer, and page gutters.
 */

:root {
	--sto-shell-font: Arial, Helvetica, sans-serif;
	--sto-shell-text: #20252a;
	--sto-shell-muted: #59635e;
	--sto-shell-primary: #176b45;
	--sto-shell-primary-dark: #0f5133;
	--sto-shell-border: #ccd3cf;
	--sto-shell-surface: #fff;
	--sto-shell-soft: #f7f9f8;
	--sto-shell-max: 1440px;
	--sto-shell-gutter: 24px;
	--sto-shell-radius: 5px;
}

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

html {
	min-width: 0;
	background: #fff;
}

body.sto-site {
	min-width: 0;
	margin: 0;
	background: var(--sto-shell-surface);
	color: var(--sto-shell-text);
	font-family: var(--sto-shell-font);
	font-size: 16px;
	line-height: 1.45;
}

.sto-site a {
	color: var(--sto-shell-primary);
}

.sto-site a:hover {
	color: var(--sto-shell-primary-dark);
}

.sto-shell-inner,
.sto-site-main {
	width: min(var(--sto-shell-max), calc(100% - (2 * var(--sto-shell-gutter))));
	margin-inline: auto;
}

/* Masthead */
.sto-site-header {
	background: #fff;
}

.sto-masthead {
	position: relative;
	min-height: 90px;
	overflow: hidden;
	background:
		linear-gradient(90deg, rgb(0 0 0 / 20%), rgb(0 0 0 / 2%) 55%, rgb(0 0 0 / 10%)),
		url("/images/banner.jpg") center 43% / cover no-repeat;
	color: #fff;
}

.sto-masthead-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 90px;
	padding-block: 10px;
}

.sto-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 7px 11px 7px 9px;
	border-radius: var(--sto-shell-radius);
	background: rgb(255 255 255 / 86%);
	color: #111;
	font-size: clamp(1.25rem, 2vw, 1.65rem);
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	letter-spacing: -.02em;
}

.sto-brand:hover {
	color: #111;
	background: #fff;
}

.sto-brand-mark {
	display: block;
	width: 30px;
	height: 27px;
	object-fit: contain;
	flex: 0 0 auto;
}

.sto-photo-credit {
	position: absolute;
	right: max(var(--sto-shell-gutter), calc((100% - var(--sto-shell-max)) / 2 + var(--sto-shell-gutter)));
	bottom: 6px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgb(0 0 0 / 36%);
	color: #fff !important;
	font-size: .78rem;
	font-weight: 700;
	text-decoration: none;
}

.sto-photo-credit:hover,
.sto-photo-credit:focus-visible {
	background: rgb(0 0 0 / 62%);
	color: #fff !important;
}

/* Primary navigation */
.sto-nav {
	border-bottom: 1px solid var(--sto-shell-border);
	background: #f1f8f2;
	box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}

.sto-nav-inner {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 16px;
}

.sto-nav-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 7px 0;
	border: 0;
	background: transparent;
	color: var(--sto-shell-text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.sto-nav-toggle-icon {
	width: 20px;
	height: 14px;
	border-top: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	position: relative;
}

.sto-nav-toggle-icon::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 4px;
	border-top: 2px solid currentColor;
}

.sto-nav-list {
	display: flex;
	align-items: stretch;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sto-nav-item {
	position: relative;
}

.sto-nav-link,
.sto-nav-menu-button {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 46px;
	padding: 0 14px;
	border: 0;
	background: transparent;
	color: var(--sto-shell-text);
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.sto-nav-link:hover,
.sto-nav-link:focus-visible,
.sto-nav-menu-button:hover,
.sto-nav-menu-button:focus-visible,
.sto-nav-menu-button[aria-expanded="true"] {
	background: #f2f6f4;
	color: var(--sto-shell-primary-dark);
}

.sto-nav-caret {
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
}

.sto-nav-menu {
	position: absolute;
	z-index: 30;
	top: calc(100% - 1px);
	left: 0;
	display: grid;
	min-width: 240px;
	max-width: min(360px, calc(100vw - 24px));
	margin: 0;
	padding: 6px;
	border: 1px solid var(--sto-shell-border);
	border-radius: 0 0 var(--sto-shell-radius) var(--sto-shell-radius);
	background: #fff;
	box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
	list-style: none;
}

.sto-nav-menu[hidden] {
	display: none;
}

.sto-nav-menu a {
	display: block;
	padding: 8px 10px;
	border-radius: 4px;
	color: var(--sto-shell-text);
	font-size: .9rem;
	text-decoration: none;
}

.sto-nav-menu a:hover,
.sto-nav-menu a:focus-visible {
	background: #f2f6f4;
	color: var(--sto-shell-primary-dark);
}

.sto-account-nav {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 7px;
	margin-left: auto;
	min-height: 46px;
	font-size: .875rem;
	white-space: nowrap;
}

.sto-account-link {
	color: var(--sto-shell-muted) !important;
	font-weight: 700;
	text-decoration: none;
}

.sto-account-link:hover,
.sto-account-link:focus-visible {
	color: var(--sto-shell-primary-dark) !important;
	text-decoration: underline;
}

.sto-account-separator {
	color: #9aa39e;
}

.sto-account-menu-wrap {
	position: relative;
}

.sto-account-menu-button {
	display: flex;
	align-items: center;
	gap: 7px;
	min-height: 46px;
	padding: 0 6px 0 14px;
	border: 0;
	background: transparent;
	color: var(--sto-shell-text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.sto-account-menu-button:hover,
.sto-account-menu-button:focus-visible,
.sto-account-menu-button[aria-expanded="true"] {
	background: #f2f6f4;
	color: var(--sto-shell-primary-dark);
}

.sto-account-menu {
	right: 0;
	left: auto;
	min-width: 190px;
}

.sto-menu-separator {
	height: 1px;
	margin: 5px 8px;
	background: #e1e6e3;
}

/* Page and footer */
.sto-site-main {
	padding-top: 12px;
	min-height: 55vh;
}

.sto-site-footer {
	margin-top: 28px;
	border-top: 1px solid var(--sto-shell-border);
	background: var(--sto-shell-soft);
	color: var(--sto-shell-muted);
}

.sto-footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 28px;
	min-height: 74px;
	padding-block: 16px;
	font-size: .8rem;
}

.sto-footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.sto-footer-links a {
	color: var(--sto-shell-muted);
	text-decoration: none;
}

.sto-footer-links a:hover,
.sto-footer-links a:focus-visible {
	color: var(--sto-shell-primary-dark);
	text-decoration: underline;
}

.sto-shell-skip {
	position: absolute;
	z-index: 100;
	left: 12px;
	top: -60px;
	padding: 8px 12px;
	border-radius: 0 0 4px 4px;
	background: #fff;
	color: var(--sto-shell-primary-dark);
	font-weight: 700;
}

.sto-shell-skip:focus {
	top: 0;
}

@media (max-width: 900px) {
	:root {
		--sto-shell-gutter: 16px;
	}

	.sto-masthead,
	.sto-masthead-inner {
		min-height: 78px;
	}

	.sto-masthead-inner {
		padding-block: 8px;
	}

	.sto-nav-toggle {
		display: inline-flex;
	}

	.sto-nav-inner {
		display: block;
	}

	.sto-nav-list {
		display: none;
		padding: 0 0 10px;
	}

	.sto-nav-list.sto-nav-open {
		display: grid;
	}

	.sto-nav-item {
		border-top: 1px solid #e5e9e7;
	}

	.sto-nav-link,
	.sto-nav-menu-button {
		width: 100%;
		min-height: 42px;
		justify-content: space-between;
		padding: 8px 4px;
		text-align: left;
	}

	.sto-nav-menu {
		position: static;
		min-width: 0;
		max-width: none;
		padding: 0 0 8px 14px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.sto-nav-menu a {
		padding: 7px 8px;
	}

	.sto-account-nav {
		position: absolute;
		right: var(--sto-shell-gutter);
		top: 0;
		min-height: 44px;
	}

	.sto-account-menu-button {
		min-height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sto-site *,
	.sto-site *::before,
	.sto-site *::after {
		scroll-behavior: auto !important;
	}
}

/* Photograph credit disclosure */
.sto-photo-credit-wrap {
	position: absolute;
	right: max(var(--sto-shell-gutter), calc((100% - var(--sto-shell-max)) / 2 + var(--sto-shell-gutter)));
	bottom: 6px;
	z-index: 12;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
}

.sto-photo-credit-wrap .sto-photo-credit {
	position: static;
	right: auto;
	bottom: auto;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 82%);
	border-radius: 50%;
	background: rgb(0 0 0 / 48%);
	font-size: .8rem;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.sto-photo-credit-caption {
	position: absolute;
	right: 0;
	bottom: 34px;
	width: min(380px, calc(100vw - (2 * var(--sto-shell-gutter))));
	max-width: calc(100vw - (2 * var(--sto-shell-gutter)));
	padding: 8px 10px;
	border: 1px solid var(--sto-shell-border);
	border-radius: 4px;
	background: rgb(255 255 255 / 98%);
	box-shadow: 0 5px 18px rgb(0 0 0 / 22%);
	color: var(--sto-shell-text);
	font-size: .76rem;
	line-height: 1.35;
	text-align: left;
	box-sizing: border-box;
	overflow-wrap: anywhere;
}

.sto-photo-credit-caption[hidden] { display: none; }
.sto-photo-credit-caption a {
	display: block;
	color: var(--sto-shell-text) !important;
	text-decoration: none;
}
.sto-photo-credit-caption a:hover,
.sto-photo-credit-caption a:focus-visible {
	color: var(--sto-shell-primary-dark) !important;
	text-decoration: underline;
}

/* Phone shell density. This is the single <=600px density block. */
@media (max-width: 600px) {
	:root { --sto-shell-gutter: 10px; }
	body.sto-site { font-size: 15px; }
	.sto-masthead, .sto-masthead-inner { min-height: 64px; }
	.sto-masthead { background-position: 61% 43%; }
	.sto-masthead-inner { align-items: center; padding-block: 7px; }
	.sto-brand { gap: 7px; font-size: 1rem; padding: 5px 7px; }
	.sto-brand-mark { width: 24px; height: 21px; }
	.sto-nav-toggle { min-height: 38px; padding: 4px 0; }
	.sto-account-nav { font-size: .82rem; }
	.sto-footer-inner {
		align-items: flex-start;
		flex-direction: column;
		min-height: 0;
		padding-block: 16px;
	}
	.sto-photo-credit-caption { display: none !important; }
}

/* Responsive shell structure */
.sto-nav-inner {
	position: relative;
}

/* Keep the full desktop navigation until the shell genuinely runs out of room. */
@media (min-width: 761px) and (max-width: 900px) {
	.sto-nav-toggle { display: none; }
	.sto-nav-inner { display: flex; }
	.sto-nav-list { display: flex; padding: 0; }
	.sto-nav-item { border-top: 0; }
	.sto-nav-link,
	.sto-nav-menu-button {
		width: auto;
		min-height: 46px;
		justify-content: flex-start;
		padding: 0 10px;
		font-size: .9rem;
	}
	.sto-nav-menu {
		position: absolute;
		min-width: 220px;
		max-width: min(340px, calc(100vw - 24px));
		padding: 6px;
		border: 1px solid var(--sto-shell-border);
		border-radius: 0 0 var(--sto-shell-radius) var(--sto-shell-radius);
		box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
	}
	.sto-account-nav {
		position: relative;
		right: auto;
		top: auto;
		min-height: 46px;
		font-size: .82rem;
	}
	.sto-account-menu-button { min-height: 46px; }
}

/* Narrow shell: Menu and account share the navigation row. */
@media (max-width: 760px) {
	.sto-nav-inner {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-items: center;
		column-gap: 10px;
	}
	.sto-nav-toggle {
		display: inline-flex;
		grid-column: 1;
		grid-row: 1;
	}
	.sto-account-nav {
		position: relative;
		right: auto;
		top: auto;
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
		min-width: 0;
		max-width: 100%;
		min-height: 44px;
	}
	.sto-account-menu-wrap { max-width: 100%; }
	.sto-account-menu-button {
		max-width: 100%;
		min-height: 44px;
		padding: 0 4px 0 8px;
	}
	.sto-account-menu-button > span:first-child {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.sto-account-link { font-size: .78rem; }
	.sto-account-separator { font-size: .7rem; }
	.sto-nav-list,
	.sto-nav-list.sto-nav-open {
		grid-column: 1 / -1;
		grid-row: 2;
	}
	.sto-account-menu {
		position: absolute;
		right: 0;
		left: auto;
		top: calc(100% - 1px);
		min-width: 190px;
		padding: 6px;
		border: 1px solid var(--sto-shell-border);
		border-radius: 0 0 var(--sto-shell-radius) var(--sto-shell-radius);
		background: #fff;
		box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
	}
}

@media (max-width: 430px) {
	.sto-account-nav { gap: 4px; }
	.sto-account-link { font-size: .72rem; }
	.sto-account-separator { font-size: .62rem; }
}

/* Prefer dynamic viewport units when supported. */
@supports (width: 100dvw) {
	.sto-photo-credit-caption {
		width: min(380px, calc(100dvw - (2 * var(--sto-shell-gutter))));
		max-width: calc(100dvw - (2 * var(--sto-shell-gutter)));
	}
}




/* Compact application shell
 * Use for task-oriented applications that need maximum working viewport.
 * Global SEATURTLE.ORG navigation remains available from the menu button;
 * application/resource navigation belongs below this shell.
 */
.sto-app-header {
	position: relative;
	z-index: 40;
	border-bottom: 1px solid var(--sto-shell-border);
	background: #f1f8f2;
	color: var(--sto-shell-text);
}

.sto-app-header .sto-shell-inner {
	position: relative;
}

.sto-app-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 54px;
}

.sto-app-brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: var(--sto-shell-primary-dark) !important;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	letter-spacing: -.015em;
}

.sto-app-brand:hover,
.sto-app-brand:focus-visible { color: var(--sto-shell-primary) !important; }
.sto-app-brand .sto-brand-mark { width: 26px; height: 23px; }
.sto-app-brand-name { white-space: nowrap; }
.sto-app-spacer { flex: 1 1 auto; min-width: 8px; }

.sto-app-account {
	position: relative;
	flex: 0 1 auto;
	min-width: 0;
}

.sto-app-header .sto-account-menu-button {
	min-height: 38px;
	padding: 0 8px;
	border-radius: var(--sto-shell-radius);
	color: var(--sto-shell-text);
}

.sto-app-header .sto-account-menu-button:hover,
.sto-app-header .sto-account-menu-button:focus-visible,
.sto-app-header .sto-account-menu-button[aria-expanded="true"] {
	background: rgb(23 107 69 / 9%);
	color: var(--sto-shell-primary-dark);
}

.sto-app-header .sto-nav-caret { border-top-color: currentColor; }

.sto-app-menu-button {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: var(--sto-shell-radius);
	background: transparent;
	color: var(--sto-shell-text);
	cursor: pointer;
}

.sto-app-menu-button:hover,
.sto-app-menu-button:focus-visible,
.sto-app-menu-button[aria-expanded="true"] { background: rgb(23 107 69 / 9%); color: var(--sto-shell-primary-dark); }
.sto-app-menu-button:focus-visible,
.sto-app-brand:focus-visible { outline: 3px solid rgb(23 107 69 / 32%); outline-offset: 2px; }

.sto-app-menu-icon,
.sto-app-menu-icon::before,
.sto-app-menu-icon::after {
	display: block;
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}
.sto-app-menu-icon { position: relative; }
.sto-app-menu-icon::before,
.sto-app-menu-icon::after { position: absolute; left: 0; content: ""; }
.sto-app-menu-icon::before { top: -6px; }
.sto-app-menu-icon::after { top: 6px; }

.sto-app-global-nav {
	position: absolute;
	right: var(--sto-shell-gutter);
	top: calc(100% - 2px);
	width: min(360px, calc(100vw - (2 * var(--sto-shell-gutter))));
	padding: 8px;
	border: 1px solid var(--sto-shell-border);
	border-radius: 0 0 var(--sto-shell-radius) var(--sto-shell-radius);
	background: #fff;
	box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
	color: var(--sto-shell-text);
}
.sto-app-global-nav[hidden] { display: none; }
.sto-app-global-nav .sto-nav-list { display: grid; margin: 0; padding: 0; }
.sto-app-global-nav .sto-nav-item { border-top: 1px solid #e5e9e7; }
.sto-app-global-nav .sto-nav-item:first-child { border-top: 0; }
.sto-app-global-nav .sto-nav-link,
.sto-app-global-nav .sto-nav-menu-button {
	width: 100%;
	min-height: 40px;
	justify-content: space-between;
	padding: 7px 8px;
	text-align: left;
}
.sto-app-global-nav .sto-nav-menu {
	position: static;
	min-width: 0;
	max-width: none;
	padding: 0 0 7px 12px;
	border: 0;
	box-shadow: none;
}

@media (max-width: 600px) {
	.sto-app-bar { min-height: 48px; gap: 8px; }
	.sto-app-brand { gap: 6px; font-size: .9rem; }
	.sto-app-brand .sto-brand-mark { width: 22px; height: 20px; }
	.sto-app-header .sto-account-menu-button { max-width: 120px; padding-inline: 6px; font-size: .8rem; }
	.sto-app-header .sto-account-menu-button > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.sto-app-menu-button { width: 38px; height: 38px; }
	.sto-app-global-nav { right: var(--sto-shell-gutter); }
}
