/* How page fits one laptop screen (1440×800 and up): rearranged into two aligned columns, nothing shrunk or hidden.
   Left: copy / preset, the three modes, the three numbers, then Wallets + Bundle + Smart sells + Volume + Market making
   as one 3×2 grid of equal-height tiles, Advanced collapsed. Right: token, the mode in one line (Details opens the rest),
   the cost summary. The page still scrolls normally when a window is too short or a section is opened. */
@media (min-width: 1251px) {
  .page.how { padding-top: 14px; padding-bottom: 14px; gap: 10px; }
  .page.how .how-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; }
  .page.how .how-c { gap: 8px; padding: 12px 16px; }
  .page.how .hl-or { margin: -1px 0; }

  /* Tiles: one grid, equal rows, the Wallets tile two columns wide so its two slots sit side by side */
  .page.how .hs.hs-fit { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
  .page.how .hs-fit > .hs-t, .page.how .hs-fit > .hw {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto 1fr;
    align-items: center; align-content: start; column-gap: 10px; row-gap: 8px; padding: 12px 14px; min-width: 0; overflow: visible;
  }
  .page.how .hs-fit > .hs-t > span { display: contents; }
  .page.how .hs-fit > .hs-t > :first-child { grid-area: 1 / 1; }
  .page.how .hs-fit > .hs-t b { grid-area: 1 / 2; min-width: 0; line-height: 1.3; }
  .page.how .hs-fit > .hs-t > :last-child { grid-area: 1 / 3; }
  .page.how .hs-fit > .hs-t small { grid-area: 2 / 1 / 3 / 4; align-self: start; white-space: normal; overflow: visible; line-height: 1.45; }

  .page.how .hs-fit > .hw { grid-column: span 2; }
  .page.how .hs-fit .hw-h { display: contents; }
  html:root .page.how .hs-fit .hw-ic { grid-area: 1 / 1; width: auto; height: auto; background: none !important; box-shadow: none !important; border-radius: 0; color: var(--tx2); }
  .page.how .hs-fit .hw-h > span:last-child { grid-area: 1 / 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; line-height: 1.3; }
  .page.how .hs-fit .hw-h b { font-size: 13px; }
  .page.how .hs-fit .hw-edit { grid-area: 1 / 3; padding: 0; border: 0; background: none; opacity: .6; }
  .page.how .hs-fit .hw:hover .hw-edit, .page.how .hs-fit .hw-edit:hover { opacity: 1; color: var(--ac); }
  .page.how .hs-fit .hw-edit > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .page.how .hs-fit .hw-slots { grid-area: 2 / 1 / 3 / 4; align-self: end; padding: 0; border-top: 0; gap: 10px; }
  .page.how .hs-fit .hw-slot { height: 34px; }

  /* Right column */
  .page.how .how-side { gap: 12px; grid-template-rows: auto auto 1fr; align-content: stretch; }
  .page.how .how-side .hh { padding: 12px 14px; }
  html:root .page.how .ha-mode { gap: 8px !important; padding: 14px 16px !important; }
  .page.how .ha-mode .ha-mh { gap: 8px !important; }
  .page.how .ha-mode p.ha-one { margin: 0; }
  .page.how .ha-mh b, .page.how .ha-more, .page.how .ha-fund .hf-addr > .mono, .page.how .hh-tags { white-space: nowrap; }
  .page.how .hh-tags { flex-wrap: nowrap; }
  .page.how .ha-more { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--ln); background: none;
    color: var(--tx2); font: 500 11.5px var(--f); cursor: pointer; }
  .page.how .ha-more:hover { color: var(--tx); border-color: var(--ln2); }
  .page.how .ha-more:focus-visible { outline: 2px solid color-mix(in srgb, var(--ac) 55%, transparent); outline-offset: 2px; }
  .page.how .ha { padding: 2px 0; align-content: space-between; }
  .page.how .ha-g { gap: 6px; padding: 10px 16px; }
  .page.how .ha-g.ha-fund { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 8px; }
  .page.how .ha-g.ha-fund > .ha-r { grid-column: 1 / -1; }
  .page.how .ha-g.ha-fund .hf-btns .btn { height: 36px; padding: 0 16px; }

  /* Bottom bar */
  .page.how .how-go { margin-top: 0; padding: 10px 12px 10px 18px; }
}
/* Narrower laptops: a slimmer right column gives the left one room so the mode cards stay at two lines */
@media (min-width: 1251px) and (max-width: 1399px) {
  .page.how .how-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ---- Mode panel: the chosen mode's settings, right under the three mode cards (Block 0 / Organic / Manual).
   One frosted inset box, a 3-column grid of 40px fields, 12/16px spacing. Height + fade on a mode switch (pages.js __hpSwap). */
.hl-panel { position: relative; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), rgba(10,13,18,.16);
  box-shadow: inset 0 0 0 1px rgba(223,233,245,.08), inset 0 1px 0 rgba(240,247,255,.05); }
.hp-in { display: grid; gap: 12px; padding: 12px 16px 16px; }
.hl-panel.hp-swap .hp-in { animation: hpIn .25s cubic-bezier(.25,.8,.25,1) both; }
@keyframes hpIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.hp-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.hp-f { display: grid; gap: 6px; min-width: 0; margin: 0; }
.hp-l { display: flex; align-items: center; gap: 7px; min-width: 0; height: 22px; white-space: nowrap; overflow: hidden; }
.hp-l > span { flex: none; }
.hp-l em { margin-left: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.hp-f .inp { height: 40px; }
.hp-two { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.hp-two > i { font-style: normal; color: var(--tx3); }
.hp-two .inp { padding: 0 10px; gap: 6px; }
.hp-slots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px; }
.hp-slots .hw-slot { height: 40px; min-width: 0; border-radius: 10px; padding: 0 10px; }
.hp-slots .hw-slot > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-pen { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 10px; border: 0; background: rgba(201,220,242,.03);
  box-shadow: inset 0 0 0 1px rgba(223,233,245,.1); color: var(--tx3); cursor: pointer; }
.hp-pen:hover { color: var(--tx); box-shadow: inset 0 0 0 1px rgba(223,233,245,.22); }
.hp-pen:focus-visible { outline: 2px solid color-mix(in srgb, var(--ac) 55%, transparent); outline-offset: 2px; }
.hp-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--tx3); font-size: 12px; line-height: 1.45; }
.hp-note > .i, .hp-note > svg { flex: none; margin-top: 2px; color: var(--mc, var(--ac)); opacity: .85; }
/* the three remaining tiles: one row, no hole where Bundle was */
.page.how .hs.hs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* in the review's Launch pop-up the panel sits without wallets */
.rv-lq .hl-panel { margin-top: 12px; }
@media (max-width: 700px) { .hp-g { grid-template-columns: 1fr; } .hp-w { grid-column: auto !important; } }
@media (prefers-reduced-motion: reduce) { .hl-panel.hp-swap .hp-in { animation: none; } }
/* Fit: the mode cards put their icon on the title line so the line under it gets the full card width (two lines, not three),
   and the page tightens a little on short laptop screens (800px tall) so the How step stays one screen in every mode. */
@media (min-width: 1251px) {
  html:root .page.how .hl-mode { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: start; gap: 4px 8px !important; padding: 12px 14px !important; min-height: 0; }
  .page.how .hl-mode > span { display: contents; }
  .page.how .hl-mode > :first-child { grid-area: 1 / 1; }
  .page.how .hl-mode b { grid-area: 1 / 2; line-height: 1.3; padding-right: 12px; }
  .page.how .hl-mode small { grid-area: 2 / 1 / 3 / 3; line-height: 1.4; }
  html:root .page.how .hl-mode.on::after { top: 16px; }
  .page.how .hs-3 > .hs-t { row-gap: 6px; padding: 10px 14px; }
}
@media (min-width: 1251px) and (max-height: 860px) {
  html:root .page.how { padding-top: 0; padding-bottom: 8px; gap: 8px; }
  html:root .page.how .hl-adv .tt-adv-h { padding: 5px 0; }
  .page.how .hs-3 > .hs-t { row-gap: 4px; padding: 9px 14px; }
  .page.how .how-c { padding: 12px 16px 10px; }
  .page.how .hl-prev { padding-top: 5px; padding-bottom: 5px; }
  .page.how .hl-or { margin: -3px 0; }
  .page.how .hp-in { padding: 12px; gap: 10px; }
  .page.how .hp-g { row-gap: 10px; }
  .page.how .hp-l { height: 18px; }
  html:root .page.how .hl-mode { padding: 10px 12px !important; }
}
/* Wallet size → eligible holders: the line under the Wallets row (pages.js wHint), amber when funds are short */
.hp-wh { grid-column: 2 / span 2; display: flex; align-items: flex-start; gap: 6px; margin: -4px 0 0; min-width: 0; color: var(--tx3); font-size: 11.5px; line-height: 1.45; }
.hp-wh > svg, .hp-wh > .i { flex: none; margin-top: 2px; opacity: .85; }
.hp-wh.warn { color: color-mix(in srgb, var(--c-amber, #f5b84a) 78%, var(--tx2)); } .hp-wh.warn > svg, .hp-wh.warn > .i { color: var(--c-amber, #f5b84a); opacity: 1; }
.hp-wh.ok > svg, .hp-wh.ok > .i { color: var(--up); }
.hp-wh .hw-go { color: inherit; font-weight: 500; text-underline-offset: 2px; margin-left: 2px; } .hp-wh .hw-go:hover { color: var(--tx); }
@media (max-width: 700px) { .hp-wh { grid-column: auto; } }
/* Import wallets: wallets that can't cover the max wallet size */
.imp-tbl tr.imp-low > td { opacity: .5; } .imp-tbl tr.imp-low.sel > td { opacity: .72; }
.imp-lowt { flex: none; padding: 1px 6px; border-radius: 999px; font-size: 10.5px; font-weight: 500; line-height: 16px; color: var(--c-amber, #f5b84a);
  background: color-mix(in srgb, var(--c-amber, #f5b84a) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-amber, #f5b84a) 28%, transparent); }
/* Manual mode: the small line under its note (funding and wallets live in the live dashboard) */
.hp-sub { display: block; margin-top: 2px; color: var(--tx3); font-size: 11.5px; line-height: 1.45; opacity: .75; }
/* Manual: two equal columns (dev buy | deployer), the deployer slot fills its column next to the pen */
.hl-panel[data-hp="manual"] .hp-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hl-panel[data-hp="manual"] .hp-w { grid-column: auto !important; }
.hl-panel[data-hp="manual"] .hp-slots { grid-template-columns: minmax(0, 1fr) 40px; }
/* Manual: the settings card is short, so it sizes to its content (no empty stretch under Advanced) */
.page.how.how-man .how-grid { align-items: start; }
.page.how.how-man .how-main, .page.how.how-man .how-c { height: auto; align-self: start; }
.page.how.how-man .how-c { width: 100%; justify-self: stretch; box-sizing: border-box; }   /* same width as the other modes */
/* Advanced (gas, slippage, priority): no "Reset to preset" button here */

/* Organic: four across (developer buy, holders buy, holders count, wallet size), then buy delay + wallets */
/* sized by the panel's own width: four across when wide, two across (wallets on their own row) when narrow */
.hl-panel[data-hp="organic"] .hp-in { container-type: inline-size; }
.hl-panel[data-hp="organic"] .hp-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hl-panel[data-hp="organic"] .hp-w { grid-column: 1 / -1 !important; }
@container (min-width: 760px) {
  .hl-panel[data-hp="organic"] .hp-g { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hl-panel[data-hp="organic"] .hp-w { grid-column: span 3 !important; }
}
/* Organic: the wallet-size line sits under the Wallets row (full width when narrow, under the slots when wide) */
.hl-panel[data-hp="organic"] .hp-wh { grid-column: 1 / -1; }
@container (min-width: 760px) { .hl-panel[data-hp="organic"] .hp-wh { grid-column: 2 / span 3; } }
