/* Way to be Gluten Free — kitchen tools. Scoped to .wtbgf-tools; uses the Blocksy palette. */
.wtbgf-tools {
	--wt-accent: var(--theme-palette-color-1, #8F612E);
	--wt-accent-2: var(--theme-palette-color-2, #a7753d);
	--wt-text: var(--theme-palette-color-4, #2a1903);
	--wt-muted: var(--theme-palette-color-3, #687279);
	--wt-line: var(--theme-palette-color-5, #E9EBEC);
	--wt-soft: var(--theme-palette-color-6, #F4F5F6);
	--wt-white: #fff;
	--wt-ok: #2f7d4f;
	--wt-check: #9a6b00;
	--wt-swap: var(--theme-palette-color-1, #8F612E);
	color: var(--wt-text);
	max-width: 900px;
	margin: 0 auto;
}
.wtbgf-tools *, .wtbgf-tools *::before, .wtbgf-tools *::after { box-sizing: border-box; }

.wtbgf-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.wtbgf-nav a {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
	border: 1px solid var(--wt-line); background: var(--wt-white); color: var(--wt-text);
	text-decoration: none; font-weight: 500; line-height: 1.2;
}
.wtbgf-nav a:hover, .wtbgf-nav a:focus-visible { border-color: var(--wt-accent); color: var(--wt-accent); }

.wtbgf-tool {
	background: var(--wt-white); border: 1px solid var(--wt-line); border-radius: 16px;
	padding: clamp(18px, 4vw, 32px); margin: 0 0 32px; scroll-margin-top: 90px;
	box-shadow: 0 1px 2px rgba(42, 25, 3, .04);
}
.wtbgf-tool h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 1.8rem); line-height: 1.25; }
.wtbgf-lede { margin: 0 0 20px; color: var(--wt-muted); }
.wtbgf-subhead { margin: 32px 0 12px; font-size: 1.15rem; padding-top: 24px; border-top: 1px solid var(--wt-line); }

.wtbgf-form { display: grid; gap: 16px; }
.wtbgf-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.wtbgf-field { display: grid; gap: 6px; min-width: 0; }
.wtbgf-field[hidden] { display: none; }
.wtbgf-field label { font-weight: 600; font-size: .95rem; }
.wtbgf-hint { font-weight: 400; color: var(--wt-muted); font-size: .9em; }
.wtbgf-tools textarea, .wtbgf-tools input[type="number"], .wtbgf-tools select {
	width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd4d8; border-radius: 10px;
	background: var(--wt-white); color: var(--wt-text); font: inherit; font-size: 16px; /* 16px stops iOS zoom */
}
.wtbgf-tools textarea { min-height: 170px; line-height: 1.5; resize: vertical; }
.wtbgf-tools textarea:focus, .wtbgf-tools input:focus, .wtbgf-tools select:focus {
	outline: 2px solid var(--wt-accent); outline-offset: 1px; border-color: var(--wt-accent);
}
.wtbgf-inline { display: flex; gap: 8px; }
.wtbgf-inline input { flex: 1 1 auto; min-width: 0; }
.wtbgf-inline select { flex: 0 0 auto; width: auto; }
.wtbgf-check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.wtbgf-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--wt-accent); flex: 0 0 auto; }

.wtbgf-btn {
	justify-self: start; min-height: 48px; padding: 12px 24px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--wt-accent); color: var(--wt-white); font: inherit; font-weight: 600; font-size: 1rem;
}
.wtbgf-btn:hover, .wtbgf-btn:focus-visible { background: var(--wt-accent-2); }
.wtbgf-btn--secondary { background: var(--wt-white); color: var(--wt-accent); border: 2px solid var(--wt-accent); }
.wtbgf-btn--secondary:hover, .wtbgf-btn--secondary:focus-visible { background: var(--wt-soft); color: var(--wt-accent); }
.wtbgf-link {
	justify-self: start; padding: 0; border: 0; background: none; color: var(--wt-accent); cursor: pointer;
	font: inherit; font-size: .95rem; text-decoration: underline; text-underline-offset: 3px;
}

.wtbgf-out { margin-top: 24px; padding-top: 24px; border-top: 1px dashed var(--wt-line); outline: none; }
.wtbgf-out[hidden] { display: none; }
.wtbgf-out-title { margin: 0 0 8px; font-size: 1.3rem; }
.wtbgf-summary { margin: 0 0 14px; color: var(--wt-muted); }
.wtbgf-msg { margin: 0; color: var(--wt-check); font-weight: 600; }

.wtbgf-table-wrap { overflow-x: auto; }
.wtbgf-table { width: 100%; border-collapse: collapse; font-size: .97rem; margin: 0; }
.wtbgf-table th, .wtbgf-table td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--wt-line); }
.wtbgf-table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--wt-muted); }
.wtbgf-table td:first-child { width: 38%; color: var(--wt-muted); }
.wtbgf-table tr.is-changed td:first-child { text-decoration: line-through; text-decoration-color: rgba(143, 97, 46, .5); }
.wtbgf-res { font-weight: 600; }
.wtbgf-note { display: block; margin-top: 4px; font-size: .9rem; color: var(--wt-muted); line-height: 1.45; }
.wtbgf-note-inline { color: var(--wt-muted); font-size: .9em; }
.wtbgf-badge {
	display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 999px; font-size: .75rem;
	font-weight: 700; letter-spacing: .02em; vertical-align: 1px; white-space: nowrap;
}
.wtbgf-badge.is-changed { background: rgba(143, 97, 46, .12); color: var(--wt-swap); }
.wtbgf-badge.is-check { background: #fff4d6; color: var(--wt-check); }
.wtbgf-badge.is-ok { background: #e3f3ea; color: var(--wt-ok); }

.wtbgf-callout {
	margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--wt-soft);
	border-left: 4px solid var(--wt-accent);
}
.wtbgf-tools h4 { margin: 22px 0 8px; font-size: 1.05rem; }
.wtbgf-tips { margin: 8px 0 0; padding-left: 1.2em; }
.wtbgf-tips li { margin: 6px 0; }
.wtbgf-next { margin: 18px 0 0; font-weight: 500; }
.wtbgf-next a, .wtbgf-sources a { color: var(--wt-accent); }

.wtbgf-meter { height: 14px; border-radius: 999px; background: var(--wt-line); overflow: hidden; margin: 14px 0 6px; }
.wtbgf-meter span { display: block; height: 100%; background: var(--wt-accent); border-radius: 999px; min-width: 2px; }
.wtbgf-meter-legend { margin: 0 0 12px; font-size: .88rem; color: var(--wt-muted); }
.wtbgf-convert-result { margin: 0; font-size: 1.1rem; }

.wtbgf-sources { padding: 4px 4px 0; color: var(--wt-muted); font-size: .92rem; }
.wtbgf-sources h2 { font-size: 1.1rem; color: var(--wt-text); margin: 0 0 8px; }
.wtbgf-sources ul { padding-left: 1.2em; }

@media (max-width: 640px) {
	.wtbgf-nav a { flex: 1 1 100%; justify-content: center; }
	.wtbgf-btn { width: 100%; justify-self: stretch; }
	.wtbgf-table thead { display: none; }
	.wtbgf-table, .wtbgf-table tbody, .wtbgf-table tr, .wtbgf-table td { display: block; width: 100%; }
	.wtbgf-table tr { padding: 12px 0; border-bottom: 1px solid var(--wt-line); }
	.wtbgf-table td { border: 0; padding: 2px 0; }
	.wtbgf-table td:first-child { width: 100%; font-size: .9rem; }
}
