/**
 * In The Kibble: My Dogs
 *
 * The theme runs Tailwind with `corePlugins.preflight = false` and Bootstrap 5's Reboot
 * no longer ships a global `img` rule, so there is no site-wide `max-width: 100%` to lean
 * on. Every component below therefore resets what it needs itself, and every image gets
 * an explicit box. Nothing here relies on a reset existing.
 *
 * Palette follows the site - see the token block below.
 */

/* ------------------------------------------------------------------- palette
   Nothing here names a colour. The site's palette lives on the active theme as
   custom properties (itk-v4/style.css declares them on :root, and the cut in
   assets/themes/theme-v4b.css re-pitches every one of them), so this plugin
   reads those tokens and follows whatever cut is live instead of carrying a
   second, drifting scheme of its own. Before this block it was hardcoded
   Tailwind amber/orange on stone, which is the palette the site had two themes
   ago - orange buttons on a page whose own buttons are near-black.

   Two rules held while mapping:

     - Roles, not hues. --blue is the site's ACTION slot whatever a cut paints
       it (v4b paints it brick #93292E). Mapping the old orange onto --blue
       means the accent rotates with the theme rather than being re-pinned by
       hand each time.
     - Every token carries a fallback equal to v4b's value, so the panel still
       looks deliberate if it is ever rendered under a theme that declares none
       of these - and the launcher, sheet and toast are fixed-position, so they
       must not depend on sitting inside a themed container.

   The local names are prefixed --itkd-, NOT --itk-: itk-nutrition and
   itk-recall-desk already own the --itk-* namespace, and colliding there
   silently repaints their panels.
   -------------------------------------------------------------------------- */

:root {
	/* Ink and text greys */
	--itkd-ink:       var(--ink, #141210);
	--itkd-body-2:    var(--body-2, #302E26);
	--itkd-body:      var(--body, #4A483D);
	--itkd-muted:     var(--muted, #63604F);
	--itkd-muted-2:   var(--muted-2, #656252);

	/* Surfaces. --panel is the step up off the ground; --soft is the
	   near-invisible one used for row hovers and input wells.
	   The fallback was sand #E6E2CE until sand was retired from the brand on
	   2026-08-26. It is dead code either way, since the theme always defines
	   --panel, but a retired brand colour should not sit here waiting to be
	   copied into something else. */
	--itkd-bg:        var(--bg, #FFFFFF);
	--itkd-white:     var(--white, #FFFFFF);
	--itkd-panel:     var(--panel, #FAF8EE);
	--itkd-soft:      var(--row-alt, #FAF8EE);

	/* Hairlines */
	--itkd-rule:      var(--rule, #C8C3AE);
	--itkd-rule-lt:   var(--rule-lt, #E3DFCB);

	/* Action: filled buttons, the active chip, the kicker, every selected
	   state. --itkd-action-tint is the one value with no upstream token - a
	   ~7% wash of the action colour, for the fill behind a selected card. */
	--itkd-action:      var(--blue, #93292E);
	--itkd-action-d:    var(--blue-d, #74201F);
	--itkd-on-action:   var(--on-blue, #FFFFFF);
	--itkd-action-tint: color-mix(in srgb, var(--itkd-action) 7%, var(--itkd-white));
	--itkd-ring:        var(--focus-ring, rgba(147, 41, 46, .20));

	/* Semantics. A green has to stay green and a red has to stay red, so these
	   map onto the theme's own semantic slots rather than onto the accent. */
	--itkd-good:      var(--green, #256B54);
	--itkd-good-bg:   var(--ok-bg, #EAF4DA);
	--itkd-warn:      var(--amber, #855209);
	--itkd-warn-bg:   var(--warn-bg, #FBE6DE);
	--itkd-warn-line: var(--warn-line, #F3CDBE);
	--itkd-bad:       var(--red, #B03A17);

	/* The hard offset shadow and the sheet scrim, on the theme's warm black
	   rather than on stone-900. */
	--itkd-shadow:    rgb(20 18 16 / 0.9);
	--itkd-scrim:     rgb(20 18 16 / 0.5);
}

/* color-mix has been in every browser since 2023, but a miss here would leave
   a selected card with no fill at all rather than a wrong one, so the tint
   falls back to the plain sand panel. */
@supports not (color: color-mix(in srgb, red 7%, white)) {
	:root { --itkd-action-tint: var(--itkd-panel); }
}

.itk-dogs-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------ nav button */

.itk-dogs-nav-item .itk-dogs-nav {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.itk-dogs-nav-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex: 0 0 26px;
	border-radius: 0;
	background: var(--itkd-panel);
	font-size: 0.85rem;
	line-height: 1;
	overflow: hidden;
}

.itk-dogs-nav-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.itk-dogs-nav-has-dog .itk-dogs-nav-label {
	font-weight: 600;
}

/* -------------------------------------------------------------------- launcher */

/* Only rendered when the header nav item cannot be seen, see UI.ensureLauncher(). */
.itk-dogs-launcher {
	position: fixed;
	/* Bottom-left on purpose: the reCAPTCHA badge and most chat widgets live in the
	   bottom-right corner, and this would sit on top of them. */
	left: 1rem;
	bottom: 1rem;
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	max-width: calc(100vw - 2rem);
	padding: 0.5rem 0.95rem 0.5rem 0.5rem;
	background: var(--itkd-white);
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--itkd-body-2);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.itk-dogs-launcher:hover {
	transform: translateY(-2px);
	box-shadow: none;
}

.itk-dogs-launcher .itk-dogs-nav-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 9rem;
}

/* ----------------------------------------------------------------------- panel */

.itk-dogs-panel {
	position: fixed;
	z-index: 100000;
	width: 340px;
	max-width: calc(100vw - 24px);
	background: var(--itkd-white);
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	box-shadow: 6px 6px 0 var(--itkd-shadow);
	padding: 0.85rem;
	font-size: 0.9rem;
	color: var(--itkd-body-2);
}

/* Below the desktop breakpoint the navbar collapses, so there is nothing sensible to
   anchor to, become a bottom sheet instead. */
.itk-dogs-panel-sheet {
	top: auto !important;
	left: 0 !important;
	right: 0;
	bottom: 0;
	width: auto;
	max-width: none;
	border-radius: 0;
	border-bottom: 0;
}

.itk-dogs-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.15rem 0.25rem 0.6rem;
	border-bottom: 1px solid var(--itkd-rule-lt);
	margin-bottom: 0.5rem;
}

.itk-dogs-x {
	appearance: none;
	background: none;
	border: 0;
	font-size: 1.4rem;
	line-height: 1;
	color: var(--itkd-muted-2);
	cursor: pointer;
	padding: 0 0.25rem;
}

.itk-dogs-x:hover {
	color: var(--itkd-body);
}

.itk-dogs-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.itk-dogs-list-item {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	text-align: left;
	background: none;
	border: 1px solid transparent;
	border-radius: 0;
	padding: 0.5rem;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.itk-dogs-list-item:hover {
	background: var(--itkd-soft);
}

.itk-dogs-list-item.is-active {
	background: var(--itkd-action-tint);
	border-color: var(--itkd-action);
}

.itk-dogs-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	border-radius: 0;
	background: var(--itkd-panel);
	overflow: hidden;
	font-size: 1.05rem;
}

.itk-dogs-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.itk-dogs-list-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.itk-dogs-list-name {
	font-weight: 600;
}

.itk-dogs-list-sub {
	font-size: 0.78rem;
	color: var(--itkd-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.itk-dogs-tick {
	color: var(--itkd-action);
	font-weight: 700;
}

.itk-dogs-switch {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.6rem 0.25rem 0.25rem;
	font-size: 0.83rem;
	color: var(--itkd-body);
	cursor: pointer;
}

.itk-dogs-panel-actions {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: 0.6rem;
	padding-top: 0.6rem;
	border-top: 1px solid var(--itkd-rule-lt);
}

.itk-dogs-cta {
	margin-top: 0.6rem;
	padding: 0.75rem;
	background: var(--itkd-panel);
	border-radius: 0;
	text-align: center;
}

.itk-dogs-cta p {
	margin: 0 0 0.5rem;
	font-size: 0.8rem;
	color: var(--itkd-muted);
}

/* --------------------------------------------------------------------- buttons */

.itk-dogs-btn,
.itk-dogs-btn-ghost {
	display: inline-block;
	text-align: center;
	font: inherit;
	font-weight: 600;
	font-size: 0.88rem;
	border-radius: 0;
	padding: 0.6rem 1rem;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.itk-dogs-btn {
	background: var(--itkd-action);
	border: 1px solid var(--itkd-action);
	color: var(--itkd-on-action);
}

.itk-dogs-btn:hover {
	background: var(--itkd-action-d);
	border-color: var(--itkd-action-d);
	color: var(--itkd-on-action);
}

.itk-dogs-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

/* The secondary button is the site's .p-btn: an ink outline that fills with the
   lightest hairline tone on hover. It used to be a grey outline that turned amber,
   which is the one button shape the site does not have anywhere. */
.itk-dogs-btn-ghost {
	background: var(--itkd-white);
	border: 1px solid var(--itkd-ink);
	color: var(--itkd-ink);
}

.itk-dogs-btn-ghost:hover {
	background: var(--itkd-rule-lt);
	color: var(--itkd-ink);
}

.itk-dogs-btn-text {
	appearance: none;
	background: none;
	border: 0;
	padding: 0.4rem 0.2rem;
	font: inherit;
	font-size: 0.85rem;
	color: var(--itkd-muted);
	cursor: pointer;
	text-decoration: underline;
}

.itk-dogs-btn-text:hover {
	color: var(--itkd-body-2);
}

.itk-dogs-danger:hover {
	color: var(--itkd-bad);
}

.itk-dogs-inline-btn {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------------------------------------------------------------- breed picker */

/* The chosen breeds. One slot for a pure breed, two for a mix, and the active one is
   where the next pick from the wheel lands. */
.itk-dogs-slots {
	display: flex;
	gap: 0.4rem;
	margin-bottom: 0.75rem;
}

.itk-dogs-slot {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex: 1 1 0;
	min-width: 0;
	padding: 0.55rem 0.7rem;
	border: 1px dashed var(--itkd-rule);
	border-radius: 0;
	background: var(--itkd-soft);
	font: inherit;
	font-size: 0.86rem;
	color: var(--itkd-muted-2);
	cursor: pointer;
	text-align: left;
	transition: all 0.14s ease;
}

.itk-dogs-slot.is-filled {
	border-style: solid;
	color: var(--itkd-body-2);
	font-weight: 600;
	background: var(--itkd-white);
}

.itk-dogs-slot.is-active {
	border-color: var(--itkd-action);
	box-shadow: 0 0 0 3px var(--itkd-ring);
}

.itk-dogs-slot-index {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	border-radius: 0;
	background: var(--itkd-rule-lt);
	font-size: 0.68rem;
	font-weight: 700;
	color: var(--itkd-muted);
}

.itk-dogs-slot.is-active .itk-dogs-slot-index {
	background: var(--itkd-action);
	color: var(--itkd-on-action);
}

.itk-dogs-slot-name {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.itk-dogs-slot-x {
	flex: 0 0 auto;
	font-size: 1rem;
	line-height: 1;
	color: var(--itkd-muted-2);
	padding: 0 0.15rem;
}

.itk-dogs-slot-x:hover {
	color: var(--itkd-bad);
}

.itk-dogs-search {
	margin-bottom: 0.7rem;
}

.itk-dogs-search input {
	font-size: 0.92rem;
	padding: 0.55rem 0.8rem;
}

/* Horizontal, snap-scrolling wheel of breed cards. */
.itk-dogs-wheel {
	display: flex;
	gap: 0.55rem;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 0.2rem 0.15rem 0.6rem;
	scrollbar-width: thin;
}

.itk-dogs-wheel::-webkit-scrollbar {
	height: 6px;
}

.itk-dogs-wheel::-webkit-scrollbar-thumb {
	background: var(--itkd-rule);
	border-radius: 0;
}

.itk-dogs-breed {
	scroll-snap-align: center;
	flex: 0 0 auto;
	width: 86px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.2rem 0.5rem;
	border: 1px solid transparent;
	border-radius: 0;
	background: none;
	font: inherit;
	cursor: pointer;
	transition: background-color 0.14s ease, border-color 0.14s ease;
}

.itk-dogs-breed:hover {
	background: var(--itkd-soft);
}

.itk-dogs-breed.is-on {
	border-color: var(--itkd-action);
	background: var(--itkd-action-tint);
}

.itk-dogs-breed:focus-visible {
	outline: 2px solid var(--itkd-ink);
	outline-offset: 1px;
}

.itk-dogs-breed-photo {
	display: block;
	width: 62px;
	height: 62px;
	border-radius: 0;
	overflow: hidden;
	background: var(--itkd-panel);
	box-shadow: none;
}

.itk-dogs-breed-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.itk-dogs-breed.is-on .itk-dogs-breed-photo {
	box-shadow: 0 0 0 2px var(--itkd-action);
}

/* Stand-in until a real photo exists: hue derived from the breed name so each one is
   at least distinguishable, with the initials on top.

   The hue still rotates per breed - that is the whole point of the tile - but the
   saturation is pulled right down. At the old 62%/55% a row of these was a strip of
   candy on a page whose theme deliberately turned OFF its own rotating card tints
   ("cards are white, so the grid reads as one material", theme-v4b.css). Muted, they
   read as tinted paper of the same family as the sand ground and still tell one breed
   from the next. The initials stay at 26% lightness, which clears AA against the
   lightest hue the wheel can produce. */
.itk-dogs-breed-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		135deg,
		hsl(var(--itk-hue) 30% 88%),
		hsl(var(--itk-hue) 26% 78%)
	);
	color: hsl(var(--itk-hue) 34% 26%);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.itk-dogs-breed-name {
	font-size: 0.7rem;
	line-height: 1.2;
	text-align: center;
	color: var(--itkd-body);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.itk-dogs-breed.is-on .itk-dogs-breed-name {
	color: var(--itkd-action);
	font-weight: 600;
}

.itk-dogs-wheel-empty {
	margin: 0 0 0.5rem;
	font-size: 0.83rem;
	color: var(--itkd-muted-2);
}

/* ------------------------------------------------------------------ flow chrome */

.itk-dogs-sheet-body {
	overflow: hidden;
	transition: height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Content fades out before the height animates to the next step's size. */
.itk-dogs-flow-out {
	opacity: 0;
	transition: opacity 0.12s ease;
}

.itk-dogs-flow-progress {
	height: 3px;
	background: var(--itkd-rule-lt);
	border-radius: 0;
	overflow: hidden;
	margin-bottom: 1rem;
}

.itk-dogs-flow-progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--itkd-action-d), var(--itkd-action));
	border-radius: 0;
	transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.itk-dogs-flow-head {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	margin-bottom: 0.45rem;
}

.itk-dogs-flow-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border-radius: 0;
	background: var(--itkd-panel);
	font-size: 1rem;
	line-height: 1;
}

.itk-dogs-flow-head .itk-dogs-kicker {
	margin-bottom: 0.1rem;
}

.itk-dogs-flow-head .itk-dogs-title {
	font-size: 1.22rem;
	line-height: 1.25;
	margin: 0;
}

.itk-dogs-sheet .itk-dogs-lede {
	font-size: 0.86rem;
	margin-bottom: 0.9rem;
}

/* Text input with the submit tucked inside it, one obvious next move per step. */
.itk-dogs-namefield {
	position: relative;
	display: flex;
	align-items: center;
}

.itk-dogs-namefield input {
	font: inherit;
	font-size: 1rem;
	width: 100%;
	padding: 0.72rem 0.9rem;
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	background: var(--itkd-soft);
	color: var(--itkd-ink);
	box-sizing: border-box;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.itk-dogs-namefield input:focus {
	outline: none;
	border-color: var(--itkd-action);
	background: var(--itkd-white);
	box-shadow: 0 0 0 3px var(--itkd-ring);
}

.itk-dogs-go {
	position: absolute;
	right: 0.35rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 0;
	background: var(--itkd-action);
	color: var(--itkd-on-action);
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.itk-dogs-go:hover {
	background: var(--itkd-action-d);
	transform: translateX(2px);
}

/* ------------------------------------------------------------ size cards + misc */

.itk-dogs-choice {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.4rem;
}

.itk-dogs-option {
	margin: 0;
	cursor: pointer;
}

.itk-dogs-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.itk-dogs-option span {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	height: 100%;
	padding: 0.6rem 0.5rem;
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	background: var(--itkd-white);
	text-align: center;
	transition: all 0.14s ease;
}

.itk-dogs-option strong {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--itkd-body-2);
}

.itk-dogs-option em {
	font-style: normal;
	font-size: 0.68rem;
	line-height: 1.25;
	color: var(--itkd-muted-2);
}

.itk-dogs-option:hover span {
	border-color: var(--itkd-ink);
}

.itk-dogs-option input:checked + span {
	border-color: var(--itkd-action);
	background: var(--itkd-action-tint);
	box-shadow: 0 0 0 1px var(--itkd-action) inset;
}

.itk-dogs-option input:checked + span em {
	color: var(--itkd-action);
}

.itk-dogs-option input:focus-visible + span {
	outline: 2px solid var(--itkd-ink);
	outline-offset: 2px;
}

.itk-dogs-inline-field {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.9rem;
}

.itk-dogs-inline-field label {
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--itkd-body);
}

.itk-dogs-inline-field label span {
	font-weight: 400;
	color: var(--itkd-muted-2);
}

.itk-dogs-inline-field input[type='date'],
.itk-dogs-unitwrap {
	display: flex;
	align-items: center;
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	background: var(--itkd-soft);
	overflow: hidden;
}

.itk-dogs-inline-field input[type='date'] {
	font: inherit;
	font-size: 0.92rem;
	padding: 0.5rem 0.7rem;
	color: var(--itkd-ink);
}

.itk-dogs-unitwrap input {
	font: inherit;
	font-size: 0.92rem;
	width: 5rem;
	padding: 0.5rem 0.6rem;
	border: 0;
	background: transparent;
	color: var(--itkd-ink);
	text-align: right;
}

.itk-dogs-unitwrap input:focus,
.itk-dogs-inline-field input[type='date']:focus {
	outline: none;
}

.itk-dogs-unitwrap select {
	font: inherit;
	font-size: 0.82rem;
	padding: 0.5rem 0.4rem;
	border: 0;
	border-left: 1px solid var(--itkd-rule);
	background: var(--itkd-rule-lt);
	color: var(--itkd-body);
	cursor: pointer;
}

/* What we worked out from the birthday, shown rather than silently applied. */
.itk-dogs-derived {
	margin: 0.7rem 0 0;
	padding: 0.5rem 0.7rem;
	background: var(--itkd-good-bg);
	border-radius: 0;
	font-size: 0.82rem;
	color: var(--itkd-good);
}

.itk-dogs-chips-stage {
	margin-top: 0.7rem;
}

.itk-dogs-picker-compact {
	max-height: 190px;
}

.itk-dogs-skip-step {
	margin-left: auto;
}

/* -------------------------------------------------------------- fit notes */

.itk-dogs-fit {
	margin: 0.6rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.87rem;
}

.itk-dogs-fit li {
	position: relative;
	padding-left: 1.35rem;
	margin-top: 0.25rem;
}

.itk-dogs-fit li::before {
	position: absolute;
	left: 0;
	top: 0;
}

.itk-dogs-fit-yes::before {
	content: '✓';
	color: var(--itkd-good);
	font-weight: 700;
}

.itk-dogs-fit-no::before {
	content: '!';
	color: var(--itkd-warn);
	font-weight: 700;
}

/* ---------------------------------------------------------------- sheet/wizard */

.itk-dogs-locked {
	overflow: hidden;
}

/* The one presentation for the profile flow: centred on desktop, a bottom sheet on
   phones where a centred card fights the on-screen keyboard. */
.itk-dogs-sheet {
	position: fixed;
	inset: 0;
	z-index: 100001;
	background: rgb(20 18 16 / 0);
	
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	transition: background-color 0.22s ease, backdrop-filter 0.22s ease;
}

.itk-dogs-sheet-in {
	background: var(--itkd-scrim);
	
}

@media (min-width: 640px) {
	.itk-dogs-sheet {
		align-items: center;
		padding: 1.5rem;
	}
}

.itk-dogs-sheet-panel {
	position: relative;
	background: var(--itkd-white);
	width: 100%;
	max-width: 540px;
	max-height: 92vh;
	overflow-y: auto;
	border-radius: 0;
	padding: 1.6rem 1.25rem 1.5rem;
	box-shadow: 0 -2px 0 var(--itkd-shadow);

	opacity: 0;
	transform: translateY(18px) scale(0.98);
	transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.itk-dogs-sheet-in .itk-dogs-sheet-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
}

@media (min-width: 640px) {
	.itk-dogs-sheet-panel {
		border-radius: 0;
		padding: 2rem;
		box-shadow: 6px 6px 0 var(--itkd-shadow);
	}
}

/* The unprompted greeting peeks from a corner instead of taking over the page (see openWizard). */
.itk-dogs-sheet.itk-dogs-sheet--peek {
	inset: auto 12px 12px 12px;
	background: transparent;
	pointer-events: none;
	padding: 0;
}

.itk-dogs-sheet--peek.itk-dogs-sheet-in {
	background: transparent;
}

.itk-dogs-sheet--peek .itk-dogs-sheet-panel {
	pointer-events: auto;
	max-height: 70vh;
	padding: 1.25rem 1.1rem 1.1rem;
	box-shadow: 4px 4px 0 var(--itkd-shadow);
}

@media (min-width: 640px) {
	.itk-dogs-sheet.itk-dogs-sheet--peek {
		inset: auto 24px 92px auto; /* clears the reCAPTCHA badge in the bottom-right corner */
		align-items: flex-end;
		padding: 0;
	}

	.itk-dogs-sheet--peek .itk-dogs-sheet-panel {
		max-width: 380px;
		padding: 1.4rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.itk-dogs-sheet,
	.itk-dogs-sheet-panel {
		transition: none;
	}

	.itk-dogs-sheet-panel {
		opacity: 1;
		transform: none;
	}
}

.itk-dogs-sheet-x {
	position: absolute;
	top: 0.6rem;
	right: 0.8rem;
}

@keyframes itk-dogs-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes itk-dogs-rise {
	from { transform: translateY(24px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.itk-dogs-kicker {
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--itkd-action);
}

.itk-dogs-title {
	margin: 0 0 0.4rem;
	font-size: 1.55rem;
	line-height: 1.2;
	font-weight: 700;
	color: var(--itkd-ink);
}

.itk-dogs-lede {
	margin: 0 0 1.1rem;
	color: var(--itkd-body);
	font-size: 0.92rem;
	line-height: 1.5;
}

/* ----------------------------------------------------------------------- forms */

.itk-dogs-form {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.itk-dogs-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.itk-dogs-label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--itkd-body);
}

.itk-dogs-field input {
	font: inherit;
	font-size: 1rem;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	background: var(--itkd-white);
	color: var(--itkd-ink);
	width: 100%;
	box-sizing: border-box;
}

.itk-dogs-field input:focus {
	outline: 2px solid var(--itkd-action);
	outline-offset: 1px;
	border-color: var(--itkd-action);
}

.itk-dogs-hint,
.itk-dogs-fineprint {
	font-size: 0.78rem;
	color: var(--itkd-muted);
	margin: 0;
}

.itk-dogs-check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.86rem;
	color: var(--itkd-body);
}

.itk-dogs-error {
	margin: 0;
	padding: 0.55rem 0.7rem;
	background: var(--itkd-warn-bg);
	border: 1px solid var(--itkd-warn-line);
	border-radius: 0;
	color: var(--itkd-bad);
	font-size: 0.85rem;
}

.itk-dogs-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/* Off-screen rather than display:none, a bot that only skips hidden fields still
   fills this one in. */
.itk-dogs-hp {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------- allergen picker */

.itk-dogs-picker {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	max-height: 46vh;
	overflow-y: auto;
	padding-right: 0.2rem;
}

.itk-dogs-group-title {
	margin: 0 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--itkd-muted-2);
}

.itk-dogs-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.itk-dogs-chip {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	margin: 0;
}

.itk-dogs-chip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.itk-dogs-chip span {
	display: inline-block;
	padding: 0.42rem 0.75rem;
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	font-size: 0.86rem;
	background: var(--itkd-white);
	color: var(--itkd-body);
	transition: all 0.12s ease;
	user-select: none;
}

.itk-dogs-chip:hover span {
	border-color: var(--itkd-ink);
}

.itk-dogs-chip input:checked + span {
	background: var(--itkd-action);
	border-color: var(--itkd-action);
	color: var(--itkd-on-action);
	font-weight: 600;
}

.itk-dogs-chip input:focus-visible + span {
	outline: 2px solid var(--itkd-ink);
	outline-offset: 2px;
}

.itk-dogs-chip-extra {
	display: none;
}

.itk-dogs-group-open .itk-dogs-chip-extra {
	display: inline-flex;
}

.itk-dogs-more {
	appearance: none;
	background: none;
	border: 0;
	margin-top: 0.4rem;
	padding: 0;
	font: inherit;
	font-size: 0.82rem;
	color: var(--itkd-action);
	cursor: pointer;
	text-decoration: underline;
}

/* -------------------------------------------------------------- product verdict */

.itk-dogs-verdict {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	margin: 1rem 0 1.25rem;
	padding: 1rem 1.1rem;
	border-radius: 0;
	border: 2px solid;
	font-size: 0.92rem;
	line-height: 1.5;
}

/* Direct child only. The <strong> inside the matched-ingredient list must stay inline,
   otherwise "Chicken: chicken fat" breaks after the label and strands the colon. */
.itk-dogs-verdict > div > strong {
	display: block;
	font-size: 1rem;
	margin-bottom: 0.15rem;
}

.itk-dogs-verdict p {
	margin: 0;
}

.itk-dogs-verdict-icon {
	font-size: 1.35rem;
	line-height: 1.2;
	flex: 0 0 auto;
}

.itk-dogs-verdict-list {
	margin: 0.5rem 0 0;
	padding-left: 1.1rem;
}

.itk-dogs-verdict-list li {
	margin-bottom: 0.15rem;
}

.itk-dogs-verdict-bad {
	background: var(--itkd-warn-bg);
	border-color: var(--itkd-bad);
	color: var(--itkd-bad);
}

.itk-dogs-verdict-good {
	background: var(--itkd-good-bg);
	border-color: var(--itkd-good);
	color: var(--itkd-good);
}

.itk-dogs-verdict-unknown {
	background: var(--itkd-panel);
	border-color: var(--itkd-warn);
	color: var(--itkd-warn);
}

.itk-dogs-verdict-neutral {
	background: var(--itkd-soft);
	border-color: var(--itkd-rule);
	color: var(--itkd-body);
}

/* ------------------------------------------------------------------ card flags */

.itk-dogs-flagged {
	position: relative;
}

.itk-dogs-flag {
	position: absolute;
	top: 0.45rem;
	left: 0.45rem;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 0;
	background: var(--itkd-warn-bg);
	border: 2px solid var(--itkd-bad);
	font-size: 0.9rem;
	line-height: 1;
	pointer-events: none;
}

/* Text links, a related-posts entry, a sidebar list, get a marker in the line rather
   than a badge floated over the words. */
.itk-dogs-flag-inline {
	display: inline-block;
	margin-left: 0.35rem;
	font-size: 0.85em;
	line-height: 1;
	vertical-align: baseline;
	cursor: help;
}

.itk-dogs-hidden {
	display: none !important;
}

.itk-dogs-hidden-note {
	grid-column: 1 / -1;
	width: 100%;
	margin: 0.5rem 0;
	padding: 0.7rem 0.9rem;
	background: var(--itkd-panel);
	border: 1px dashed var(--itkd-rule);
	border-radius: 0;
	font-size: 0.85rem;
	color: var(--itkd-warn);
}

/* ----------------------------------------------------------------------- toast */

.itk-dogs-toast {
	position: fixed;
	left: 50%;
	bottom: 1.25rem;
	z-index: 100002;
	transform: translate(-50%, 1rem);
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
	max-width: calc(100vw - 2rem);
	padding: 0.7rem 1.1rem;
	background: var(--itkd-ink);
	color: var(--itkd-bg);
	border-radius: 0;
	font-size: 0.88rem;
	box-shadow: none;
}

.itk-dogs-toast-in {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- account page */

.itk-dogs-account {
	max-width: 960px;
	margin: 0 auto;
	padding: 2.5rem 1rem 4rem;
	color: var(--itkd-body-2);
}

.itk-dogs-account img {
	max-width: 100%;
}

.itk-dogs-account-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.75rem;
}

.itk-dogs-page-title {
	margin: 0;
	font-size: 2rem;
	font-weight: 700;
	color: var(--itkd-ink);
}

.itk-dogs-empty {
	text-align: center;
	padding: 3rem 1.5rem;
	background: var(--itkd-panel);
	border: 1px dashed var(--itkd-rule);
	border-radius: 0;
	margin-bottom: 2rem;
}

.itk-dogs-empty span {
	font-size: 2.75rem;
	display: block;
	margin-bottom: 0.5rem;
}

.itk-dogs-empty h2 {
	margin: 0 0 0.4rem;
	font-size: 1.3rem;
	font-weight: 700;
}

.itk-dogs-empty p {
	margin: 0 auto 1.25rem;
	max-width: 34rem;
	color: var(--itkd-muted);
}

.itk-dogs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
	margin-bottom: 1.5rem;
}

.itk-dogs-profile {
	display: flex;
	flex-direction: column;
	background: var(--itkd-white);
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
}

.itk-dogs-photo {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--itkd-panel);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
	overflow: hidden;
}

.itk-dogs-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.itk-dogs-photo-btn {
	position: absolute;
	right: 0.6rem;
	bottom: 0.6rem;
	margin: 0;
	padding: 0.35rem 0.7rem;
	background: rgb(255 255 255 / 0.94);
	border-radius: 0;
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--itkd-body);
	cursor: pointer;
	box-shadow: none;
}

.itk-dogs-photo-hint {
	position: absolute;
	right: 0.6rem;
	bottom: 0.6rem;
	padding: 0.3rem 0.6rem;
	background: rgb(255 255 255 / 0.9);
	border-radius: 0;
	font-size: 0.72rem;
	color: var(--itkd-muted);
}

.itk-dogs-profile-body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	flex: 1 1 auto;
}

.itk-dogs-profile-body h2 {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
}

.itk-dogs-profile-meta {
	margin: -0.3rem 0 0;
	font-size: 0.83rem;
	color: var(--itkd-muted);
}

.itk-dogs-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	flex: 1 1 auto;
	align-content: flex-start;
}

.itk-dogs-tag {
	display: inline-block;
	padding: 0.22rem 0.55rem;
	background: var(--itkd-panel);
	border-radius: 0;
	font-size: 0.76rem;
	color: var(--itkd-warn);
}

.itk-dogs-tag-muted {
	background: var(--itkd-rule-lt);
	color: var(--itkd-muted-2);
}

.itk-dogs-profile-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	border-top: 1px solid var(--itkd-rule-lt);
	padding-top: 0.6rem;
}

/* --------------------------------------------------------------------- auth box */

.itk-dogs-authbox {
	display: grid;
	gap: 1.75rem;
	margin-top: 2.5rem;
	padding: 1.75rem;
	background: var(--itkd-panel);
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
}

@media (min-width: 820px) {
	.itk-dogs-authbox {
		grid-template-columns: 1fr 1fr;
		align-items: start;
		gap: 2.5rem;
	}
}

.itk-dogs-authbox-copy h2 {
	margin: 0 0 0.6rem;
	font-size: 1.45rem;
	font-weight: 700;
	color: var(--itkd-ink);
}

.itk-dogs-authbox-copy p {
	margin: 0;
	color: var(--itkd-body);
	line-height: 1.6;
}

.itk-dogs-authbox-forms {
	background: var(--itkd-white);
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	padding: 1.25rem;
}

.itk-dogs-tabs {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 1.1rem;
	background: var(--itkd-rule-lt);
	border-radius: 0;
	padding: 0.22rem;
}

.itk-dogs-tabs button {
	flex: 1 1 auto;
	appearance: none;
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0.5rem;
	font: inherit;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--itkd-muted);
	cursor: pointer;
}

.itk-dogs-tabs button.is-active {
	background: var(--itkd-white);
	color: var(--itkd-ink);
	box-shadow: none;
}

.itk-dogs-noscript {
	padding: 1rem;
	background: var(--itkd-panel);
	border: 1px solid var(--itkd-rule);
	border-radius: 0;
	color: var(--itkd-warn);
}

/* On-screen keyboard (2026-10-04): --itkd-kb is set by trackKeyboard() in
   itk-dogs.js. The sheet's bottom edge sits on top of the keyboard and the panel
   shrinks to what is left, so the field being typed in stays visible. */
.itk-dogs-sheet {
	bottom: var(--itkd-kb, 0px);
}

.itk-dogs-sheet-panel {
	max-height: min(92vh, 100%);
}

.itk-dogs-sheet.itk-dogs-sheet--peek {
	bottom: calc(12px + var(--itkd-kb, 0px));
}

.itk-dogs-sheet--peek .itk-dogs-sheet-panel {
	max-height: min(70vh, calc(100dvh - var(--itkd-kb, 0px) - 24px));
}

@media (min-width: 640px) {
	.itk-dogs-sheet.itk-dogs-sheet--peek {
		bottom: calc(92px + var(--itkd-kb, 0px));
	}
}

/* Phones: the profile sheet fills the screen above the keyboard (owner request
   2026-10-04). The unprompted greeting stays a corner card until its field is
   focused and the keyboard opens; then it takes the screen too. */
@media (max-width: 639px) {
	.itk-dogs-sheet:not(.itk-dogs-sheet--peek) .itk-dogs-sheet-panel {
		height: 100%;
		max-height: 100%;
		max-width: none;
		box-shadow: none;
		padding-top: calc(1.6rem + env(safe-area-inset-top, 0px));
	}

	html.itkd-kb-open .itk-dogs-sheet.itk-dogs-sheet--peek {
		inset: 0 0 var(--itkd-kb, 0px) 0;
		background: var(--itkd-white);
		pointer-events: auto;
	}

	html.itkd-kb-open .itk-dogs-sheet--peek .itk-dogs-sheet-panel {
		height: 100%;
		max-height: 100%;
		box-shadow: none;
	}
}
