/* A FOLD (ui/Fold.astro; Maayan's creator mocks, 2026-11-19): a rounded box, its title in the book's face, a quiet note after
   it, its chevron at the end (up while open); its head's own controls (slot "end") after the title, the line broken when
   there is no room: the title always top left, the chevron top right. Plain flow, nothing placed over. Tokens only. */
.g-fold { position: relative; box-sizing: border-box; border-radius: var(--g-fold-r); background: var(--g-pick-bg); }
.g-fold__head { display: flex; align-items: flex-start; gap: var(--g-4); padding: 0 var(--g-fold-pad); list-style: none; cursor: pointer; }
.g-fold__main { flex: 1; min-width: 0; min-height: var(--g-fold-head); display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: var(--g-2) var(--g-5); padding-block: var(--g-3); box-sizing: border-box; }
.g-fold__head::-webkit-details-marker { display: none; }
.g-fold__t { flex: 1 1 auto; min-width: 0; font-family: var(--g-font-book); font-size: var(--g-t-title2); line-height: 1.3; color: var(--g-text); }
.g-fold__note { color: var(--g-text-2); }
.g-fold__chev { display: inline-flex; flex: none; width: var(--g-icon); height: var(--g-icon); margin-top: calc((var(--g-fold-head) - var(--g-icon)) / 2); color: var(--g-text); transition: transform var(--g-mid) var(--g-ease); }
.g-fold__chev > svg { width: 100%; height: 100%; }
.g-fold[open] > .g-fold__head .g-fold__chev { transform: rotate(180deg); }
.g-fold__head:focus-visible { outline: none; box-shadow: var(--g-ring); border-radius: var(--g-fold-r); }
.g-fold__end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--g-2) var(--g-5); cursor: auto; }
.g-fold__body { padding: 0 var(--g-fold-pad) var(--g-fold-pad); }
/* opened and closed with a simple ease in and out (Maayan, 2026-11-19), its height growing from none to its own; a browser
   without ::details-content opens it at once, as before */
.g-fold { interpolate-size: allow-keywords; }
.g-fold::details-content { height: 0; overflow: clip; transition: height var(--g-mid) var(--g-ease-in-out), content-visibility var(--g-mid) allow-discrete; }
.g-fold[open]::details-content { height: auto; }
.g-fold--fixed > .g-fold__head { cursor: default; pointer-events: none; }
.g-fold--fixed > .g-fold__head .g-fold__chev { display: none; }
.g-fold--fixed > .g-fold__head .g-fold__end { pointer-events: auto; }
/* in a fold (the growl creator's mocks, 2026-11-19): its fields outlined on the box, their labels in the book's face; its
   text buttons plain words, underlined (Upload GrowlMaster..., Add another row, Edit image) */
.g-fold .g-field__label { font: normal var(--g-t-sub) / 1.4 var(--g-font-book); color: var(--g-text-2); }
.g-fold .g-field__input { background-color: transparent; border: var(--g-hair) solid var(--g-text-2); font-family: var(--g-font-book); }
.g-fold .g-btn--plain, .g-fold-foot .g-btn--plain { color: var(--g-text); font-family: var(--g-font-book); font-weight: normal; text-decoration: underline; text-underline-offset: var(--g-1); padding-inline: 0; }
/* a phone: tighter, its room for what is inside (Maayan, 2026-11-19: "mobile - the sections have too much paddings") */
@media (max-width: 899px) { .g-fold { --g-fold-pad: var(--g-4); --g-fold-head: var(--g-touch-lg); } }
/* a phone: no box at all, the sections one under the other, a light sepia line between them (Maayan, 2026-11-22: "in mobile
   we dont want the sections's gray boxes because its waistful ... between sections add a light seperator line - 1px color
   sepia 10% only on mobile"); the page's own side room is theirs */
@media (max-width: 899px) {
  .g-fold { background: none; border-radius: 0; border-top: 1px solid var(--g-sep-sepia); }
  .g-fold > .g-fold__head, .g-fold > .g-fold__body, .g-fold::details-content > .g-fold__body { padding-inline: 0; }
  .g-fold__body { padding-inline: 0; }
  .g-fold__head { padding-inline: 0; }
}
