/* Ask Gemma page (inc/ask-gemma.php). Loads after kitchen-jobs.css, which supplies the dark hero (kj-hero, kj-eyebrow, kj-lead),
   the icon size (kj-ico) and the --kj-* tints used below.

   Design notes (1 Dec 2026 polish), same rules as the kitchen jobs pages:
   - The question card is the page's one featured surface: it rises into the hero and carries the hard leaf offset shadow.
     Nothing else on the page uses that shadow.
   - "Recently answered" sits on the paper as a calm white list, built like the jobs list: the whole row is the link.
   - Never white text on green. Green surfaces (icon circles, the button, the arrow on hover) carry ink.
   - Focus rings are 3px --leaf-deep on light surfaces. Fields are 48px or taller, every link and button 44px or taller.
   - Weights are 400 / 500 / 700 only: those are the faces the live site ships.
   - The thank-you tick and the error mark are drawn here, in CSS, so the role="status" / role="alert" markup stays untouched. */

.ag { --ag-lift: 44px; } /* how far the question card rises into the hero */
@media (min-width: 900px) { .ag { --ag-lift: 76px; } }

.ag-hero { padding-bottom: calc(clamp(30px, 5vw, 52px) + var(--ag-lift)); }

/* ---------- Layout: the form first, then the answers ---------- */
.ag-main { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; padding-bottom: clamp(44px, 7vw, 76px);
	scroll-margin-top: calc(var(--ag-lift) + 132px); } /* after sending, #ask lands with the whole card clear of the sticky header (about 113px) */
body.admin-bar .ag-main { scroll-margin-top: calc(var(--ag-lift) + 164px); }
@media (min-width: 900px) {
	.ag-main { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 52px; }
	.ag-side { padding-top: 36px; }
}

/* ---------- The question card ---------- */
.ag-form-card { min-width: 0; margin: calc(-1 * var(--ag-lift)) 5px 5px 0; padding: 22px 18px 24px; background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: 5px 5px 0 var(--leaf); }
.ag-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 20px; font-size: clamp(1.4rem, 3vw, 1.65rem); overflow-wrap: anywhere; } /* wraps under its icon when text is scaled right up */
.ag-title .kj-ico { width: 2.5rem; height: 2.5rem; padding: .6rem; border-radius: 50%; background: var(--leaf); color: var(--ink); }

.ag-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: 0; }
.ag-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; min-width: 0; }
.ag-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ag-form label { margin: 0; color: var(--ink); font-size: .95rem; font-weight: 700; line-height: 1.35; }
.ag-form label span { color: var(--kj-quiet); font-weight: 400; }
.ag-form input, .ag-form select, .ag-form textarea { display: block; width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 10px 14px;
	background-color: #fff; border: 1.5px solid var(--kj-edge); border-radius: 10px; box-shadow: none; color: var(--ink); font: 400 1rem/1.4 var(--font-body); transition: border-color .15s ease; }
.ag-form select { -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262523' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 13px center; background-size: 18px 18px; }
/* The question box is what the page is for: a bigger label, bigger type and room to write. */
.ag-field--q { gap: 9px; }
.ag-form .ag-field--q label { font-size: 1.1rem; }
.ag-form textarea { min-height: 11.5rem; padding: 14px 16px; border-radius: 12px; font-size: 1.0625rem; line-height: 1.55; resize: vertical; }
.ag-form input:hover, .ag-form select:hover, .ag-form textarea:hover { border-color: var(--ink); }
.ag-form input:focus, .ag-form select:focus, .ag-form textarea:focus { outline: 3px solid var(--leaf-deep); outline-offset: 1px; border-color: var(--ink); box-shadow: none; }
.ag-form ::placeholder { color: #6A6862; opacity: 1; }
@media (min-width: 560px) {
	.ag-form-card { padding: 30px 32px 32px; }
	.ag-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* Reassurance: the privacy sentence, sitting just above the button. */
.ag-small { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 0; padding: 12px 14px; background: var(--paper); border-radius: 10px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.ag-small .kj-ico { margin-top: 1px; color: var(--leaf-ink); }
.ag-small span { min-width: 0; }
.ag-small a { position: relative; display: inline-block; color: var(--leaf-ink); font-weight: 700; }
.ag-small a::after { content: ""; position: absolute; inset: -12px -8px; } /* a 44px tap area, while the focus ring stays tight to the word */
.ag .ag-small a:focus-visible { outline-offset: 2px; }

.ag-form .gfh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; justify-self: start; min-height: 52px; padding: 14px 24px 14px 28px; font-size: 1.05rem; }
.ag-form .gfh-btn .kj-ico { transition: transform .15s ease; }
.ag-form .gfh-btn:hover .kj-ico { transform: translateX(3px); }
@media (max-width: 559px) { .ag-form .gfh-btn { width: 100%; } }

/* Error: drawn like the Team page's error note. The mark is a background image, so the alert's markup is unchanged. */
.ag-err { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 12px 14px; background: #fff; border: 1.5px solid #8a1f11; border-radius: 10px; color: #8a1f11; font-weight: 700; line-height: 1.45; }
.ag-err::before { content: ""; flex: none; width: 1.25rem; height: 1.25rem; margin-top: 2px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a1f11' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Thank-you: a finished state. An ink tick on a leaf circle, the message, one button. */
.ag-sent { padding: 4px 0 2px; }
.ag-sent::before { content: ""; display: block; width: 3.5rem; height: 3.5rem; margin: 0 0 18px; border-radius: 50%;
	background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262523' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 1.9rem 1.9rem no-repeat; }
.ag-sent h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3.4vw, 1.9rem); text-wrap: balance; }
.ag-sent p { max-width: 54ch; margin: 0 0 22px; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.ag-sent p:last-child { margin: 0; }
.ag-sent .gfh-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 28px; font-size: 1.05rem; }
@media (max-width: 559px) { .ag-sent .gfh-btn { width: 100%; } }

/* The trap field: off-screen and out of the tab order (tabindex="-1" in the markup). */
.ag-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Recently answered ---------- */
.ag-side { min-width: 0; }
.ag-side:not(:has(.ag-answers, .ag-foot)) { display: none; } /* no answers and no hub page yet: don't leave the heading on its own */
.ag-side h2 { margin: 0 0 14px; font-size: clamp(1.35rem, 3vw, 1.6rem); }
.ag-answers { list-style: none; margin: 0; padding: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.ag-answers:last-child { border-radius: var(--radius); }
.ag-answers li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 9px; justify-items: start; margin: 0; padding: 16px 62px 16px 18px; transition: background .15s ease; }
.ag-answers li + li { border-top: 1px solid var(--line); }
.ag-answers a { color: var(--ink); font-size: 1.05rem; font-weight: 700; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.ag-answers a::after { content: ""; position: absolute; inset: 0; } /* the whole row is the tap target */
.ag-answers li:first-child a::after { border-radius: 13px 13px 0 0; }
.ag-answers:last-child li:last-child a::after { border-radius: 0 0 13px 13px; }
.ag-answers li:hover { background: var(--kj-soft); }
.ag-answers li:hover a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--leaf-deep); }
.ag .ag-answers a:focus-visible { outline: none; } /* the ring is drawn on the whole row instead */
.ag-answers a:focus-visible::after { outline: 3px solid var(--leaf-deep); outline-offset: -3px; }
.ag-topic { padding: 4px 10px; border: 1px solid var(--kj-tint-line); border-radius: 12px; /* a pill on one line, a soft box if a long topic wraps */ background: var(--kj-tint); color: #3d5414;
	font-family: var(--font-mono); font-size: .72rem; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; }
.ag-go { position: absolute; top: 0; bottom: 0; right: 16px; display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; margin: auto 0; border-radius: 50%; background: var(--kj-tint); color: var(--ink);
	pointer-events: none; transition: background .15s ease, transform .15s ease; }
.ag-go .kj-ico { width: 1rem; height: 1rem; stroke-width: 2.4; }
.ag-answers li:hover .ag-go, .ag-answers a:focus-visible ~ .ag-go { background: var(--leaf); transform: translateX(3px); }

/* The list's footer: every answer lives one tap away. */
.ag-foot { display: flex; margin: 0; padding: 12px 16px; background: var(--kj-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.ag-answers + .ag-foot { border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.ag-all { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px 8px 18px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink);
	color: var(--ink); font-size: 1rem; font-weight: 700; line-height: 1.3; text-decoration: none; transition: background .15s ease, color .15s ease; }
.ag-all .kj-ico { width: 1.05rem; height: 1.05rem; }
.ag-all:hover { background: var(--ink); color: #fff; }
.ag .ag-all:focus-visible { border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
	.ag-form .gfh-btn:hover .kj-ico, .ag-answers li:hover .ag-go, .ag-answers a:focus-visible ~ .ag-go { transform: none; }
}
