/**
 * Tools, and the list of them.
 *
 * The whole of a tool page is public. Only the frame where the tool runs is
 * swapped for a lock, so the page reads the same to everybody and the one
 * difference is the part that does the work.
 */

/* ══════════════ All tools ══════════════ */

.cur-tlist {
	background: var(--cur-paper);
}

.cur-tlist__hero {
	background: var(--cur-peach-pale);
	border-bottom: 1px solid var(--cur-line);
	padding: 3rem var(--cur-gutter);
}

.cur-tlist__hero > * {
	max-width: var(--cur-max-width);
	margin-inline: auto;
}

.cur-tlist__title {
	margin: 0.6rem auto 0;
	font: 400 clamp(2.1rem, 5vw, 2.9rem)/1.05 var(--cur-serif);
	letter-spacing: -0.02em;
}

.cur-tlist__lede {
	margin-top: 0.8rem;
	max-width: 42rem;
	font-size: 1.05rem;
	line-height: 1.6;
}

.cur-tlist__filters {
	max-width: var(--cur-max-width);
	margin: 0 auto;
	padding: 1.2rem var(--cur-gutter);
	border-bottom: 1px solid var(--cur-line);
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

.cur-tlist__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	min-width: 0;
}

.cur-tlist__chip {
	padding: 9px 17px;
	border: 1px solid rgba(36, 27, 22, 0.25);
	border-radius: var(--cur-radius-pill);
	color: var(--cur-ink);
	font: 700 0.85rem/1 var(--cur-sans);
	text-decoration: none;
}

.cur-tlist__chip.is-on {
	background: var(--cur-mustard);
	border-color: var(--cur-mustard);
}

.cur-tlist__sort {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	flex: none;
}

.cur-tlist__sort label {
	font: 700 0.72rem/1 var(--cur-sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cur-ink-muted);
}

.cur-tlist__sort select {
	min-height: 42px;
	padding: 9px 14px;
	border: 1px solid rgba(36, 27, 22, 0.3);
	border-radius: var(--cur-radius-pill);
	background: var(--cur-paper);
	font-family: inherit;
	font-size: 0.86rem;
}

.cur-tlist__grid {
	max-width: var(--cur-max-width);
	margin: 0 auto;
	padding: 2.2rem var(--cur-gutter) 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 1.4rem;
}

.cur-tlist__card {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	min-width: 0;
	padding: 1.6rem;
	background: var(--cur-white);
	border: 1px solid var(--cur-line);
	border-radius: var(--cur-radius-panel);
	box-shadow: var(--cur-shadow-card);
}

.cur-tlist__icon,
.cur-tool__icon {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 10px;
	background: var(--cur-green-pale);
	color: var(--cur-green-deep);
}

.cur-tlist__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.cur-tlist__tag {
	padding: 4px 11px;
	border-radius: var(--cur-radius-pill);
	background: var(--cur-green-pale);
	color: var(--cur-green-deep);
	font: 700 0.66rem/1.4 var(--cur-sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.cur-tlist__tag.is-club {
	background: var(--cur-ink);
	color: var(--cur-cream);
}

.cur-tlist__name {
	margin: 0;
	font: 400 1.5rem/1.15 var(--cur-serif);
	letter-spacing: -0.01em;
}

.cur-tlist__name a {
	color: var(--cur-ink);
	text-decoration: none;
}

.cur-tlist__name a:hover,
.cur-tlist__name a:focus {
	color: var(--cur-tomato);
}

.cur-tlist__says {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
}

.cur-tlist__pair {
	margin-top: auto;
	padding-top: 0.9rem;
	border-top: 1px solid var(--cur-line);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cur-tlist__pair p {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--cur-ink-muted);
}

.cur-tlist__pair strong {
	color: var(--cur-ink);
}

.cur-tlist__open {
	align-self: flex-start;
	padding: 12px 24px;
	border-radius: 8px;
	background: var(--cur-tomato);
	color: #fff;
	font: 700 0.88rem/1 var(--cur-sans);
	text-decoration: none;
}

.cur-tlist__open:hover,
.cur-tlist__open:focus {
	background: var(--cur-tomato-hover);
	color: #fff;
}

.cur-tlist__none {
	max-width: 40rem;
	margin: 0 auto;
	padding: 4rem var(--cur-gutter);
	text-align: center;
}

.cur-tlist__none h2 {
	margin: 0 0 0.6rem;
	font: 400 1.9rem/1.1 var(--cur-serif);
}

.cur-tlist__pages {
	max-width: var(--cur-max-width);
	margin: 0 auto;
	padding: 2.4rem var(--cur-gutter) 3.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

.cur-tlist__pages p {
	margin: 0;
	color: var(--cur-ink-muted);
	font-size: 0.86rem;
}

.cur-tlist__pages div {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
}

.cur-tlist__pages a,
.cur-tlist__pages span {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0 12px;
	border: 1px solid rgba(36, 27, 22, 0.25);
	border-radius: 8px;
	color: var(--cur-ink);
	font: 700 0.88rem/1 var(--cur-sans);
	text-decoration: none;
}

.cur-tlist__pages span[aria-hidden] {
	color: rgba(36, 27, 22, 0.35);
	border-color: rgba(36, 27, 22, 0.14);
}

.cur-tlist__pages .is-on {
	background: var(--cur-tomato);
	border-color: var(--cur-tomato);
	color: #fff;
}

/* ══════════════ One tool ══════════════ */

.cur-tool {
	background: var(--cur-paper);
}

.cur-tool__missing {
	padding: 5rem var(--cur-gutter);
	text-align: center;
}

.cur-tool__hero {
	background: var(--cur-peach-pale);
	border-bottom: 1px solid var(--cur-line);
	padding: 2.6rem var(--cur-gutter);
	display: flex;
	flex-wrap: wrap;
	gap: 1.4rem;
	align-items: center;
}

.cur-tool__hero > * {
	flex: none;
}

.cur-tool__hero-words {
	flex: 999 1 20rem;
	min-width: 0;
	max-width: 44rem;
}

.cur-tool__icon {
	width: 56px;
	height: 56px;
	border-radius: 12px;
}

.cur-tool__title {
	margin: 0.3rem 0 0;
	font: 400 clamp(2rem, 4.6vw, 2.7rem)/1.06 var(--cur-serif);
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.cur-tool__says {
	margin: 0.7rem 0 0;
	font-size: 1.05rem;
	line-height: 1.6;
}

.cur-tool__body {
	max-width: 62rem;
	margin: 0 auto;
	padding: 2.2rem var(--cur-gutter) 3.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
}

/* ── The tool itself ───────────────────────── */

.cur-tool__frame {
	/*
	 * The writing on this page wants a readable column, but a tool does not:
	 * the first one is a spreadsheet, and 848px of it meant scrolling sideways
	 * to see columns that would have fitted. So the tool alone steps out of
	 * the column and takes the width of the page, while everything around it
	 * stays where it was.
	 *
	 * The margin is never positive, so on a narrow screen this does nothing
	 * and the tool simply fills its column as before.
	 */
	--cur-tool-room: min( var(--cur-max-width), calc( 100vw - 2 * var(--cur-gutter) ) );
	margin-inline: min( 0px, calc( ( 100% - var(--cur-tool-room) ) / 2 ) );
	border: 1px solid var(--cur-line);
	border-radius: var(--cur-radius-panel);
	background: var(--cur-white);
	overflow: hidden;
}

.cur-tool__frame iframe {
	display: block;
	width: 100%;
	height: 620px;
	border: 0;
	background: var(--cur-white);
}

/* ── What this tool is, in full ─────────────── */

.cur-tool__about {
	max-width: 44rem;
	margin-top: 1.2rem;
	font-size: 1.02rem;
	line-height: 1.65;
}

.cur-tool__about > :first-child { margin-top: 0; }
.cur-tool__about > :last-child { margin-bottom: 0; }

.cur-tool__about h2 {
	margin: 2.2rem 0 0.7rem;
	font-family: var(--cur-serif);
	font-size: 1.65rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.cur-tool__about h3 {
	margin: 1.7rem 0 0.5rem;
	font-size: 1.1rem;
	font-weight: 700;
}

.cur-tool__about p { margin: 0 0 1rem; }

.cur-tool__about ul,
.cur-tool__about ol {
	margin: 0 0 1rem;
	padding-left: 1.4rem;
}

.cur-tool__about li { margin-bottom: 0.4rem; }

.cur-tool__about a {
	color: var(--cur-tomato);
	text-decoration: underline;
}

.cur-tool__about code {
	padding: 0.1em 0.35em;
	border-radius: 4px;
	background: var(--cur-cream);
	font-size: 0.92em;
}

/* ── The lock, over the tool rather than instead of it ─────── */

/*
 * A locked tool is still shown. Somebody who cannot see what a tool looks
 * like will not make an account to find out, so the frame stays and the lock
 * sits on top of it: visible, and untouchable.
 */
.cur-tool__frame.is-locked {
	position: relative;
}

.cur-tool__frame.is-locked iframe {
	/* Fixed, because a locked frame never gets the tool's height messages and
	   the lock needs a known amount of room to sit in. */
	height: 540px;
	pointer-events: none;
}

.cur-tool__veil {
	position: absolute;
	inset: 0;
	display: flex;
	/* Low, not centred: the card would otherwise cover the middle of the tool,
	   which is the part worth seeing before you decide to sign up. */
	align-items: flex-end;
	justify-content: center;
	padding: 1.5rem;
	/* Clear at the top so the tool reads, solid lower down so the card does. */
	background: linear-gradient(
		to bottom,
		rgba( 255, 253, 248, 0.25 ) 0%,
		rgba( 255, 253, 248, 0.78 ) 38%,
		rgba( 255, 253, 248, 0.95 ) 100%
	);
}

.cur-tool__veil .cur-tool__lock {
	width: min(42rem, 100%);
	box-shadow: 0 14px 34px rgba( 36, 27, 22, 0.16 );
}

@media (max-width: 680px) {
	.cur-tool__frame.is-locked iframe { height: 620px; }
	.cur-tool__veil { padding: 1rem; }
}

/* ── The lock card itself ─────── */

.cur-tool__lock {
	display: flex;
	flex-wrap: wrap;
	gap: 1.6rem;
	align-items: center;
	padding: 2rem;
	border: 1px solid var(--cur-line);
	border-radius: var(--cur-radius-panel);
	background: var(--cur-cream);
}

.cur-tool__lock.is-club {
	background: #efe7f3;
}

.cur-tool__lockicon {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--cur-butter);
	color: #705010;
}

.cur-tool__lock.is-club .cur-tool__lockicon {
	background: var(--cur-paper);
	color: #5c4a72;
}

.cur-tool__lock-words {
	flex: 999 1 18rem;
	min-width: 0;
}

.cur-tool__lock-words h2 {
	margin: 0 0 0.5rem;
	font: 400 1.6rem/1.15 var(--cur-serif);
}

.cur-tool__lock-words p {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.6;
}

.cur-tool__lock-go {
	flex: 1 1 13rem;
	min-width: 0;
	max-width: 16rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	text-align: center;
}

.cur-tool__price {
	margin: 0;
	font: 400 2rem/1 var(--cur-serif);
}

.cur-tool__price span {
	font: 400 0.85rem/1 var(--cur-sans);
	color: var(--cur-ink-muted);
}

.cur-tool__button {
	display: block;
	padding: 14px 20px;
	border-radius: 8px;
	background: var(--cur-tomato);
	color: #fff;
	font: 700 0.9rem/1.2 var(--cur-sans);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
}

.cur-tool__button:hover,
.cur-tool__button:focus {
	background: var(--cur-tomato-hover);
	color: #fff;
}

.cur-tool__quiet {
	color: var(--cur-ink);
	font: 600 0.86rem/1.4 var(--cur-sans);
	text-decoration: none;
	border-bottom: 2px solid var(--cur-tomato);
	align-self: center;
	padding-bottom: 2px;
}

/* ── What it takes and gives ───────────────── */

.cur-tool__pair {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
}

.cur-tool__pair > div {
	flex: 1 1 16rem;
	min-width: 0;
	padding: 1.2rem 1.4rem;
	border: 1px solid var(--cur-line);
	border-radius: var(--cur-radius-panel);
	background: var(--cur-white);
}

.cur-tool__pair p:last-child {
	margin: 0.5rem 0 0;
	font-size: 0.95rem;
	line-height: 1.6;
}

/* ── The same line on every tool page ──────── */

.cur-tool__private {
	display: flex;
	flex-wrap: wrap;
	gap: 1.1rem;
	align-items: flex-start;
	padding: 1.3rem 1.5rem;
	border: 1px solid var(--cur-line);
	border-radius: var(--cur-radius-panel);
	background: var(--cur-green-pale);
}

.cur-tool__privateicon {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--cur-green);
	color: #fff;
}

.cur-tool__private h2 {
	margin: 0 0 0.3rem;
	font: 400 1.3rem/1.15 var(--cur-serif);
}

.cur-tool__private p {
	margin: 0;
	font-size: 0.93rem;
	line-height: 1.6;
}

.cur-tool__private > div {
	flex: 999 1 18rem;
	min-width: 0;
}

.cur-tool__back {
	margin: 0;
}

.cur-tool__back a {
	color: var(--cur-ink);
	font: 600 0.9rem/1 var(--cur-sans);
	text-decoration: none;
	border-bottom: 2px solid var(--cur-tomato);
	padding-bottom: 2px;
}

@media (max-width: 680px) {
	.cur-tool__lock-go {
		max-width: none;
	}

	.cur-tool__frame iframe {
		height: 520px;
	}
}

/* ── The workspace shelf ────────────────────────────────────
   Drawn by the page, never by the tool, so it looks and behaves
   the same in every tool there will ever be.                   */

.cur-shelf {
	border: 1px solid rgba(36, 27, 22, 0.14);
	border-radius: 16px;
	background: var(--cur-cream);
	padding: 1.6rem 1.7rem 1.8rem;
}

.cur-shelf__head {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.2rem;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 1.1rem;
}

.cur-shelf__head h2 {
	margin: 0;
	font: 400 1.45rem/1.1 var(--cur-serif);
	color: var(--cur-ink);
}

.cur-shelf__count {
	margin: 0;
	font: 700 0.72rem/1 var(--cur-sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(36, 27, 22, 0.56);
}

.cur-shelf__said {
	margin: 0 0 1rem;
	padding: 0.7rem 0.95rem;
	border-radius: 9px;
	background: var(--cur-butter);
	font: 600 0.88rem/1.4 var(--cur-sans);
	color: var(--cur-ink);
}

.cur-shelf__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.8rem;
}

.cur-shelf__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem 1.1rem;
	padding: 0.8rem 0.9rem;
	border: 1px solid rgba(36, 27, 22, 0.12);
	border-radius: 12px;
	background: var(--cur-paper);
}

.cur-shelf__shot {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 9px;
	background: var(--cur-peach-pale);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.cur-shelf__shot img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.cur-shelf__about {
	flex: 1 1 11rem;
	min-width: 0;
}

.cur-shelf__name {
	margin: 0 0 0.2rem;
	font: 600 0.98rem/1.3 var(--cur-sans);
	color: var(--cur-ink);
	overflow-wrap: anywhere;
}

.cur-shelf__when {
	margin: 0;
	font: 400 0.8rem/1.3 var(--cur-sans);
	color: rgba(36, 27, 22, 0.56);
}

.cur-shelf__go {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.cur-shelf__button {
	appearance: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0.85rem;
	border: 1px solid rgba(36, 27, 22, 0.24);
	border-radius: 7px;
	background: none;
	color: var(--cur-ink);
	font: 600 0.82rem/1 var(--cur-sans);
	text-decoration: none;
}

.cur-shelf__button:hover,
.cur-shelf__button:focus-visible {
	border-color: var(--cur-ink);
	background: var(--cur-butter);
}

.cur-shelf__button.is-go {
	border-color: transparent;
	background: var(--cur-tomato);
	color: #fff;
}

.cur-shelf__button.is-go:hover,
.cur-shelf__button.is-go:focus-visible {
	background: var(--cur-tomato-hover);
}

.cur-shelf__button.is-drop {
	border-color: transparent;
	color: var(--cur-tomato);
}

.cur-shelf__button.is-drop:hover,
.cur-shelf__button.is-drop:focus-visible {
	background: var(--cur-peach-pale);
	border-color: var(--cur-tomato);
}

.cur-shelf__none {
	margin: 0;
	padding: 1.4rem 0;
	text-align: center;
	font: 400 0.92rem/1.5 var(--cur-sans);
	color: rgba(36, 27, 22, 0.6);
}

.cur-shelf__warn {
	margin: 1rem 0 0;
	padding: 0.8rem 1rem;
	border-radius: 9px;
	background: var(--cur-butter);
	font: 400 0.86rem/1.5 var(--cur-sans);
	color: var(--cur-ink);
}

/* ── The same shelf, for somebody without Club ─────────────── */

.cur-shelf--ask {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.4rem 2rem;
	background: var(--cur-green-pale);
	border-color: rgba(67, 95, 53, 0.28);
}

.cur-shelf__ask-words {
	flex: 1 1 20rem;
	min-width: 0;
}

.cur-shelf__ask-words h2 {
	margin: 0 0 0.4rem;
	font: 400 1.45rem/1.15 var(--cur-serif);
	color: var(--cur-green-deep);
}

.cur-shelf__ask-words p {
	margin: 0;
	font: 400 0.95rem/1.55 var(--cur-sans);
	color: var(--cur-ink);
}

.cur-shelf__ask-go {
	flex: 0 1 14rem;
	min-width: 0;
	text-align: center;
}

.cur-shelf--ask .cur-tool__button {
	background: var(--cur-green);
}

.cur-shelf--ask .cur-tool__button:hover,
.cur-shelf--ask .cur-tool__button:focus-visible {
	background: var(--cur-green-deep);
}

@media (max-width: 680px) {
	.cur-shelf {
		padding: 1.3rem 1.1rem 1.4rem;
	}

	.cur-shelf__go {
		flex: 1 1 100%;
	}

	.cur-shelf__ask-go {
		flex: 1 1 100%;
	}
}
