/* Moonlit — the routes the prototype has no screen for: search, journal, article, 404,
   CMS pages, wishlist and the account pages. Built in the prototype's own language. */

/* ---------------------------------------------------------------- rich text */
.ml-rte { max-width: 72ch; }
.ml-tbl__w { max-width: 72ch; overflow-x: auto; margin-top: 16px; }
.ml-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.ml-tbl th, .ml-tbl td { padding: 10px 14px; border-bottom: 1px solid var(--ml-line); text-align: left; white-space: nowrap; }
.ml-tbl thead th { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ml-text-2); }
.ml-tbl tbody th { font-weight: 600; }
.ml-rte > * + * { margin-top: 1.1em; }
.ml-rte h2 { font-family: var(--ml-display); font-size: 32px; line-height: 1.15; margin-top: 1.8em; }
.ml-rte h3 { font-family: var(--ml-display); font-size: 24px; line-height: 1.2; margin-top: 1.6em; }
.ml-rte p, .ml-rte li { font-size: 16px; line-height: 1.7; color: var(--ml-text-2); }
.ml-rte strong { color: var(--ml-text); font-weight: 500; }
.ml-rte a { color: var(--ml-accent); text-decoration: underline; text-underline-offset: 3px; }
.ml-rte ul, .ml-rte ol { padding-left: 1.2em; display: flex; flex-direction: column; gap: .5em; }
.ml-rte ul li { list-style: disc; }
.ml-rte ol li { list-style: decimal; }
.ml-rte img { margin-block: 1.6em; }
.ml-rte blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 2px solid var(--ml-rose); font-family: var(--ml-display); font-size: 22px; color: var(--ml-text); }
.ml-page__body { margin-inline: auto; }

/* ---------------------------------------------------------------- big search */
.ml-bigsearch { display: flex; align-items: center; gap: 12px; max-width: 640px; padding-bottom: 10px; border-bottom: 1px solid var(--ml-line-strong); }
.ml-bigsearch input { flex: 1 1 auto; min-width: 0; border: 0; background: none; font-size: 16px; }
.ml-bigsearch .ml-btn { min-height: 40px; }

/* ---------------------------------------------------------------- journal */
.ml-art { display: block; }
.ml-art__b { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; }
.ml-art__b strong { font-weight: 400; }
.ml-art:hover .ml-art__b strong { color: var(--ml-rose); }
.ml-article__head { display: flex; flex-direction: column; gap: 16px; padding-block: 56px 32px; align-items: center; text-align: center; }
.ml-article__h { max-width: 24ch; }
.ml-article__m { aspect-ratio: 1328 / 700; }
.ml-article__body { padding-block: 48px; margin-inline: auto; }
.ml-article__tags { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 24px; }
.ml-article__back { padding-bottom: 72px; }

/* ---------------------------------------------------------------- 404 */
.ml-404__in { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding-block: 120px 140px; }
.ml-404__in .ml-body-l { max-width: 52ch; color: var(--ml-text-2); }
.ml-404__links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 767px) { .ml-404__in { padding-block: 64px 80px; } }
/* 3 Nov (RESPONSIVE): the column centres its children, so the search form shrank to its content and, at 360, its
   placeholder pushed it 6px past both gutters; it now takes the column's width (still capped at 640px) */
.ml-404__in .ml-bigsearch { width: 100%; }

/* ---------------------------------------------------------------- account */
.ml-acct { display: flex; justify-content: center; }
.ml-acct__card { display: flex; flex-direction: column; gap: 12px; width: min(460px, 100%); padding: 36px; border: 1px solid var(--ml-line); background: var(--ml-white); }
.ml-acct__full { width: min(860px, 100%); display: flex; flex-direction: column; gap: 18px; }
.ml-acct__l { font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ml-text-2); }
.ml-acct__note { margin-bottom: 6px; }
.ml-acct__ok { color: var(--ml-accent); }
.ml-acct__err { color: var(--ml-sale); }
.ml-orders li a { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--ml-line); }
.ml-addrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.ml-addrs li { padding: 20px; border: 1px solid var(--ml-line); }

/* ---------------------------------------------------------------- page header (.ml-chead)
   Search, journal, account, wishlist, CMS and theme pages share this header; it had no rules, so a
   page photo ran full width at its natural height. Same rhythm as the collection title row
   (.ml-ctitle, p52/36); with a photo it is a split: copy left, photo right in a fixed 4:3 frame. */
.ml-chead { padding: 52px 0 36px; }
.ml-chead__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.ml-chead__c { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ml-chead__t { max-width: 56ch; color: var(--ml-text-2); }
.ml-chead__m { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ml-image); }
.ml-chead__m img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .ml-chead__in:has(> .ml-chead__m) { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; }
}
@media (max-width: 767px) {
  .ml-chead { padding: 28px 0 20px; }
  .ml-chead__in { gap: 20px; }
}

/* ---------------------------------------------------------------- passwordless account (31 Oct, Seravine's structure)
   Before sign-in: .ml-au = the midnight editorial panel beside the white form card; stacked on phones.
   After sign-in: .ml-ah = the greeting hero, then .ml-ah__grid of cards. */
.ml-au-sec { padding-block: clamp(32px, 4.444vw, 64px) clamp(56px, 6.667vw, 96px); }
.ml-au { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); max-width: 1080px; margin-inline: auto; border: 1px solid var(--ml-line); background: var(--ml-white); }
.ml-au__panel { display: flex; flex-direction: column; gap: 18px; padding: 56px 48px; background: var(--ml-midnight); color: var(--ml-inverse); }
.ml-au__mark { width: max-content; }
.ml-au__kick { color: var(--ml-lunar); }
.ml-au__line { margin: 0; font-family: var(--ml-display); font-weight: 300; font-size: clamp(28px, 2.5vw, 36px); line-height: 1.12; }
.ml-au__points { display: flex; flex-direction: column; gap: 14px; margin-top: auto; padding-top: 24px; border-top: 1px solid rgba(244, 242, 236, .18); }
.ml-au__points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: rgba(244, 242, 236, .86); }
.ml-au__points svg { flex: 0 0 auto; margin-top: 3px; color: var(--ml-lunar); }
.ml-au__card { display: flex; flex-direction: column; gap: 14px; padding: 56px 48px; }
.ml-au__card form { display: flex; flex-direction: column; gap: 14px; }
.ml-au__card--solo { max-width: 520px; margin-inline: auto; border: 1px solid var(--ml-line); background: var(--ml-white); }
.ml-au__t { margin: 0 0 4px; }
.ml-au__lede { margin: 0; }
.ml-au__f { display: flex; flex-direction: column; gap: 8px; }
.ml-au__f .ml-select { max-width: none; }
.ml-au__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.ml-au__note { margin: 0; padding: 12px 14px; background: var(--ml-mist); color: var(--ml-text); border-left: 2px solid var(--ml-accent); }
.ml-au__note--err { border-left-color: var(--ml-sale); color: var(--ml-sale); }
.ml-au__foot { margin: 6px 0 0; }

.ml-ah-wrap { display: flex; flex-direction: column; gap: 20px; max-width: 1080px; margin-inline: auto; }
.ml-ah { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 36px 40px; background: var(--ml-midnight); color: var(--ml-inverse); }
.ml-ah__star { color: var(--ml-lunar); }
.ml-ah__c { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ml-ah__t { margin: 0; }
.ml-ah__mail { margin: 0; color: rgba(244, 242, 236, .72); overflow-wrap: anywhere; }
.ml-ah__a { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ml-ah__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.ml-ah__box { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px; border: 1px solid var(--ml-line); background: var(--ml-white); min-width: 0; }
.ml-ah__box--wide { grid-column: 1 / -1; }
.ml-ah__box > form, .ml-ah__form { align-self: stretch; display: flex; flex-direction: column; gap: 14px; }
.ml-ah__bh { align-self: stretch; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ml-ah__h { margin: 0; font-family: var(--ml-display); font-weight: 300; font-size: 28px; line-height: 1.1; }
.ml-ah__pill { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--ml-midnight); color: var(--ml-inverse); font-size: 11px; letter-spacing: .06em; }
.ml-ah__pill--soft { background: var(--ml-mist); color: var(--ml-text); }
.ml-ah__pill--off { background: var(--ml-sale); }
.ml-ah__orders { align-self: stretch; }
.ml-ah__order { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 20px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--ml-line); color: var(--ml-text); }
.ml-ah__order:hover .ml-ah__go { color: var(--ml-accent); }
.ml-ah__om { display: flex; flex-direction: column; gap: 2px; }
.ml-ah__os { display: flex; gap: 6px; flex-wrap: wrap; }
.ml-ah__empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ml-ah__empty .ml-d5 { margin: 0; }
.ml-ah__addr { font-style: normal; line-height: 1.7; }
.ml-ah__saved { margin-top: 4px; }
.ml-ah__sp { margin-top: 10px; }
.ml-ah__links { display: flex; gap: 22px; flex-wrap: wrap; margin: 0; }
.ml-ah__edit { align-self: stretch; }
.ml-ah__edit > summary { cursor: pointer; list-style: none; width: max-content; }
.ml-ah__edit > summary::-webkit-details-marker { display: none; }
.ml-ah__edit[open] > form { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.ml-ah__del { color: var(--ml-sale); }
.ml-ah__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; }
.ml-ah__fields .field { display: flex; flex-direction: column; gap: 6px; }
.ml-ah__fields .field label { font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ml-text-2); }
.ml-ah__fields .field input:not([type=checkbox]), .ml-ah__fields .field select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--ml-line); background: var(--ml-white); font-size: 13px; color: var(--ml-text); }
.ml-ah__fields .field:last-child { grid-column: 1 / -1; }
.ml-ah__fields .field:last-child label { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ml-text); }
.ml-ah__tot { align-self: stretch; display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; }
.ml-ah__tot div { display: flex; justify-content: space-between; gap: 16px; }
.ml-ah__total { padding-top: 10px; border-top: 1px solid var(--ml-line); }
@media (max-width: 1023px) { .ml-au__panel, .ml-au__card { padding: 40px 32px; } }
@media (max-width: 767px) {
  .ml-au { grid-template-columns: 1fr; }
  .ml-au__panel { padding: 28px 20px; gap: 12px; }
  .ml-au__points { margin-top: 4px; padding-top: 16px; }
  .ml-au__card { padding: 28px 20px; }
  .ml-au__row, .ml-ah__grid, .ml-ah__fields { grid-template-columns: 1fr; }
  .ml-ah { grid-template-columns: 1fr; gap: 12px; padding: 28px 20px; }
  .ml-ah__star { display: none; }
  .ml-ah__a { flex-direction: row; align-items: center; gap: 20px; }
  .ml-ah__box { padding: 24px 20px; }
  .ml-ah__order { grid-template-columns: minmax(0, 1fr) auto; }
  .ml-ah__os { grid-column: 1 / -1; grid-row: 2; }
  .ml-ah__go { display: none; }
}
