/**
 * Free tools (gap 9). Loaded only by the tool templates.
 *
 * Colours are the ones already on the site: the #7D6FE0 -> #009FE3 button
 * gradient from newhome.css, #009FE3 for accents, #001E6E from the footer.
 */

.toolpage {
	font-family: 'Noto Sans', sans-serif;
	color: #001E6E;
}
/* The outer bound is the site's own .container (0 80px / max 1530px), so the
   tool pages line up with every standard page and inherit its breakpoints.
   .toolinner only stops the interactive area from stretching to 1530px. */
.toolpage .toolinner {
	max-width: 1180px;
	margin: 0 auto;
}
.toolhead {
	max-width: 760px;
	margin: 0 auto;
	padding: 54px 0 34px;
	text-align: center;
}
.toolhead__eyebrow {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #009FE3;
}
.toolhead__title {
	margin: 0 0 14px;
	font-size: 42px;
	line-height: 1.14;
	font-weight: 700;
	color: #001E6E;
}
.toolhead__sub {
	margin: 0;
	font-size: 18px;
	line-height: 1.6;
	color: #3d4a63;
}

/* --- layout ------------------------------------------------------------ */

.toolgrid {
	display: grid;
	/* minmax(0, 1fr) rather than 1fr: a bare 1fr is minmax(auto, 1fr), so the
	   results table's min-content width pushed the track - and the page - wider
	   than the viewport instead of letting the table scroll inside it. */
	grid-template-columns: 370px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	padding-bottom: 20px;
}
.toolpanel {
	min-width: 0;
	padding: 24px;
	border: 1px solid rgba(0, 30, 110, 0.12);
	border-radius: 16px;
	background: #fff;
}
.toolpanel--inputs {
	position: sticky;
	top: 24px;
	background: linear-gradient(180deg, #F4FBFF 0%, #FFFFFF 100%);
}
.toolpanel__heading {
	margin: 0 0 18px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #8b94a7;
}

/* --- fields ------------------------------------------------------------ */

.toolfield {
	margin-bottom: 16px;
}
.toolfield > label,
.toolfield__label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
	color: #2d3a55;
}
.toolfield__hint {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	line-height: 1.45;
	font-weight: 400;
	color: #8b94a7;
}
.toolinput,
.toolselect {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid rgba(0, 30, 110, 0.18);
	border-radius: 9px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	color: #001E6E;
}
.toolinput:focus,
.toolselect:focus {
	outline: none;
	border-color: #009FE3;
	box-shadow: 0 0 0 3px rgba(0, 159, 227, 0.16);
}
.toolinput--sm {
	height: 38px;
	font-size: 14px;
}
.toolbutton {
	display: inline-block;
	padding: 12px 22px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(90deg, #7D6FE0 0%, #009FE3 100%);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	transition: filter 0.18s ease;
}
.toolbutton:hover {
	filter: brightness(1.07);
	color: #fff;
}
.toolbutton--ghost {
	background: #fff;
	border: 1px solid rgba(0, 30, 110, 0.18);
	color: #001E6E;
}
.toolbutton--ghost:hover {
	border-color: #009FE3;
	color: #009FE3;
	filter: none;
}
.toolbutton--sm {
	padding: 8px 14px;
	font-size: 13px;
}
.toolactions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

/* --- rounds ------------------------------------------------------------ */

.roundcard {
	position: relative;
	margin-bottom: 14px;
	padding: 16px 16px 10px;
	border: 1px solid rgba(0, 30, 110, 0.12);
	border-radius: 12px;
	background: #fff;
}
.roundcard__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}
.roundcard__name {
	flex: 1 1 auto;
	height: 36px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: #001E6E;
}
.roundcard__name:hover {
	border-color: rgba(0, 30, 110, 0.14);
}
.roundcard__name:focus {
	outline: none;
	border-color: #009FE3;
	background: #fff;
}
.roundcard__remove {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border: 1px solid rgba(0, 30, 110, 0.16);
	border-radius: 50%;
	background: #fff;
	font-size: 16px;
	line-height: 1;
	color: #8b94a7;
	cursor: pointer;
}
.roundcard__remove:hover {
	border-color: #b4232b;
	color: #b4232b;
}
.roundcard__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

/* --- results ----------------------------------------------------------- */

.tooltable {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
.tooltable th,
.tooltable td {
	padding: 11px 12px;
	border-bottom: 1px solid rgba(0, 30, 110, 0.09);
	text-align: right;
}
.tooltable th {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #8b94a7;
	white-space: nowrap;
}
.tooltable th:first-child,
.tooltable td:first-child {
	text-align: left;
}
.tooltable tbody tr:last-child td {
	border-bottom: 0;
}
.tooltable td.is-strong {
	font-weight: 700;
	color: #001E6E;
}
.tooltable__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.toolstats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin-bottom: 24px;
}
.toolstat {
	padding: 16px 18px;
	border-radius: 12px;
	background: #F4FBFF;
}
.toolstat__value {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
	color: #001E6E;
}
.toolstat__label {
	margin-top: 5px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #8b94a7;
}

/* Stacked bars: founder share shrinking round by round. */
.toolchart {
	margin: 4px 0 26px;
}
.toolbar {
	margin-bottom: 12px;
}
.toolbar__top {
	display: flex;
	justify-content: space-between;
	margin-bottom: 5px;
	font-size: 13px;
	color: #55617a;
}
.toolbar__track {
	position: relative;
	height: 22px;
	border-radius: 6px;
	background: #EDF2F7;
	overflow: hidden;
}
.toolbar__fill {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	background: linear-gradient(90deg, #7D6FE0 0%, #009FE3 100%);
	transition: width 0.3s ease;
}

.toolnote {
	margin: 26px 0 0;
	padding-top: 18px;
	border-top: 1px solid rgba(0, 30, 110, 0.1);
	font-size: 13px;
	line-height: 1.6;
	color: #8b94a7;
}
.toolnote strong {
	color: #55617a;
}

/* --- long-form copy under a tool --------------------------------------- */

.toolcopy {
	max-width: 760px;
	margin: 10px auto 0;
	padding: 34px 0 10px;
	font-size: 17px;
	line-height: 1.72;
	color: #3d4a63;
}
.toolcopy h2 {
	margin: 34px 0 12px;
	font-size: 26px;
	font-weight: 700;
	color: #001E6E;
}
.toolcopy h2:first-child {
	margin-top: 0;
}
.toolcopy h3 {
	margin: 26px 0 10px;
	font-size: 20px;
	font-weight: 700;
	color: #001E6E;
}
.toolcopy p {
	margin: 0 0 18px;
}
.toolcopy ul {
	margin: 0 0 18px;
	padding-left: 22px;
}
.toolcopy li {
	margin-bottom: 8px;
}
.toolcopy a {
	color: #009FE3;
}

/* --- the hub ----------------------------------------------------------- */

.toolcards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
	padding-bottom: 10px;
}
.toolcard {
	display: flex;
	flex-direction: column;
	padding: 26px;
	border: 1px solid rgba(0, 30, 110, 0.12);
	border-radius: 16px;
	background: #fff;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.toolcard:hover {
	border-color: rgba(0, 159, 227, 0.5);
	box-shadow: 0 4px 18px rgba(0, 30, 110, 0.07);
}
.toolcard__kind {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #009FE3;
}
.toolcard__title {
	margin: 0 0 10px;
	font-size: 22px;
	line-height: 1.28;
	font-weight: 700;
}
.toolcard__title a {
	color: #001E6E;
	text-decoration: none;
}
.toolcard__title a:hover {
	color: #009FE3;
}
.toolcard__desc {
	flex: 1 1 auto;
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.6;
	color: #4a5670;
}
.toolcard__soon {
	display: inline-block;
	padding: 7px 14px;
	border-radius: 999px;
	background: #EDF2F7;
	font-size: 13px;
	font-weight: 600;
	color: #8b94a7;
}

@media (max-width: 900px) {
	.toolgrid {
		grid-template-columns: minmax(0, 1fr);
	}
	.toolpanel--inputs {
		position: static;
	}
	.toolhead {
		padding: 36px 0 26px;
	}
	.toolhead__title {
		font-size: 30px;
	}
	.toolhead__sub {
		font-size: 16px;
	}
	.toolcopy {
		font-size: 16px;
	}
}

/* --- the fund structure map -------------------------------------------- */

.structuremap {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	padding-bottom: 10px;
}
.structuremap__flow {
	display: flex;
	flex-direction: column;
}
.structurenode {
	display: block;
	width: 100%;
	padding: 16px 18px;
	border: 1px solid rgba(0, 30, 110, 0.14);
	border-radius: 12px;
	background: #fff;
	font-family: 'Noto Sans', sans-serif;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.structurenode:hover {
	border-color: #009FE3;
}
.structurenode.is-active {
	border-color: transparent;
	background: linear-gradient(90deg, #7D6FE0 0%, #009FE3 100%);
	box-shadow: 0 4px 16px rgba(0, 159, 227, 0.22);
}
.structurenode__short {
	display: block;
	margin-bottom: 3px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: #8b94a7;
}
.structurenode__name {
	display: block;
	font-size: 17px;
	font-weight: 700;
	color: #001E6E;
}
.structurenode.is-active .structurenode__short,
.structurenode.is-active .structurenode__name {
	color: #fff;
}
.structurenode.is-active .structurenode__short {
	opacity: 0.85;
}
.structurearrow {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	margin: 7px 0;
	padding: 0 18px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #a7b0c2;
}
.structurearrow__down::before {
	content: "\2193\00a0";
	color: #009FE3;
}
.structurearrow__up::after {
	content: "\00a0\2191";
	color: #7D6FE0;
}
.structuredetail {
	padding: 28px 30px;
	border: 1px solid rgba(0, 30, 110, 0.12);
	border-radius: 16px;
	background: linear-gradient(180deg, #F4FBFF 0%, #FFFFFF 100%);
	font-family: 'Noto Sans', sans-serif;
}
.structuredetail__heading {
	margin: 0 0 16px;
	font-size: 26px;
	font-weight: 700;
	color: #001E6E;
}
.structuredetail__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.structuredetail__list li {
	position: relative;
	margin-bottom: 14px;
	padding-left: 20px;
	font-size: 16px;
	line-height: 1.65;
	color: #3d4a63;
}
.structuredetail__list li:last-child {
	margin-bottom: 0;
}
.structuredetail__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #009FE3;
}

@media (max-width: 900px) {
	.structuremap {
		grid-template-columns: minmax(0, 1fr);
	}
	.structuredetail {
		padding: 22px 20px;
	}
	.structuredetail__heading {
		font-size: 22px;
	}
}

/* --- "more free tools", at the foot of a single tool -------------------- */

.toolmore {
	margin-top: 54px;
	padding-top: 34px;
	border-top: 1px solid rgba(0, 30, 110, 0.1);
}
.toolmore__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}
.toolmore__heading {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #8b94a7;
}
.toolmore__all {
	font-size: 15px;
	font-weight: 600;
	color: #009FE3;
	text-decoration: none;
	white-space: nowrap;
}
.toolmore__all:hover {
	color: #7D6FE0;
}
