/* LinkForge desktop pass.
   MOBILE-FIRST: everything that changes the look sits in a min-width media query (>= 768px unless noted), so the phone layout
   (<= 480px) is exactly what it was. The few base rules below (.lf-item) only change markup plumbing, not the look.
   Loaded from base.html, the footer partials, /plans and the public profile page. */

/* policy cards: each card and its "read more" line are wrapped so a multi-column grid keeps them together;
   on a phone the wrapper disappears (display:contents), so the 1-column list is unchanged */
.lf-item { display: contents; }
.lf-hdr-desk { display: none; }

@media (min-width: 768px) {

  /* ===== 1. shared footer: the desktop footer (brand + horizontal nav on one row), ~1120px centred ===== */
  html body .lf-foot { background: #0a0a0f !important; padding: 0 !important; margin-top: 96px !important; border-top: 0 !important; color: #8b8b94; font: 14px/1.6 Inter, system-ui, sans-serif; }
  html body .lf-foot__inner { max-width: 1120px !important; margin: 0 auto !important; padding: 0 32px !important; }
  html body .lf-foot__top { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important;
    gap: 24px !important; margin: 0 !important; padding: 40px 0 32px; border-top: 1px solid rgba(255,255,255,.07); }
  html body .lf-foot__brand { display: inline-flex !important; gap: 12px; }
  html body .lf-foot__name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
  html body .lf-foot__nav { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 4px !important; }
  html body .lf-foot__nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; font-weight: 500; font-size: 14px; background: transparent !important; color: #a1a1aa; }
  html body .lf-foot__nav a:hover { color: #fff; background: rgba(255,255,255,.05) !important; }
  html body .lf-foot__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 20px 0 36px; border-top: 1px solid rgba(255,255,255,.05); font-size: 13px; }
  html body .lf-foot__bottom p { margin: 0 !important; }

  /* ===== dark pages whose <body> is the light default: no white band above/below the footer ===== */
  body.lf-dark-page { background: #0a0a0f; color: #fff; }

  /* ===== 2. /legal and /support hubs ===== */
  html body .lf-hub { max-width: 1040px !important; padding: 48px 32px 72px !important; }
  html body .lf-hub__title { font-size: 40px; }
  html body .lf-hub__lead { font-size: 17px; }
  html body .lf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; align-items: start; }
  .lf-item { display: block; }
  .lf-item .lf-card__detail { margin-top: 4px; }
  .lf-entity dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
  .lf-hub-cta { box-sizing: border-box; width: min(976px, calc(100% - 64px)); margin-left: auto !important; margin-right: auto !important; }

  /* ===== 4. policy pages: centred text column, ~72 characters per line ===== */
  .lf-prose { max-width: 38rem !important; }

  /* ===== 5. /plans: roomy single column from 640px, three columns only from 1024px (see below) ===== */

  /* ===== 6. auth pages: the compact public header (Home / Pricing / Log in) is only shown on desktop ===== */
  .lf-hdr-desk { display: block; }
  .lf-hdr-desk ~ main.min-h-screen { min-height: calc(100vh - 65px); }

  /* ===== 7. public profile pages (and /demo): a centred phone-width card instead of a stretched full-viewport crop ===== */
  body.lf-pbody { background-color: #0b0b10; }
  .lf-prof { width: min(100%, 430px); min-height: min(880px, calc(100vh - 64px)) !important; margin: 32px auto 0 !important; border-radius: 40px; overflow: hidden;
    box-shadow: 0 0 0 9px #17171f, 0 0 0 10px rgba(255,255,255,.14), 0 40px 90px -30px rgba(0,0,0,.9); position: relative; }
  .lf-prof .lf-cover { height: min(60vh, 400px) !important; }
  .lf-prof .lf-bottom { height: min(40vh, 280px) !important; }
  .lf-px { max-width: 406px; }
  .lf-prof ~ .lf-foot { margin-top: 48px !important; }
}

@media (min-width: 640px) {
  .lf-plans { max-width: 34rem; margin-left: auto; margin-right: auto; }
}

@media (min-width: 1024px) {
  .lf-plans { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html body .lf-hub { max-width: 1160px !important; }
  html body .lf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lf-hub-cta { width: min(1096px, calc(100% - 64px)); }

  /* ===== 8/9. owner pages with the slide-over page menu: keep it open as a left sidebar ===== */
  html body [data-lf-drawer="always"] { transform: none !important; visibility: visible !important; transition: none !important; width: 16rem !important; }
  html body [data-lf-drawer="always"] .lf-drawer-head { display: none !important; }
  html body [data-lf-menu] { display: none !important; }
  body:has([data-lf-drawer="always"]) { padding-left: 16rem; }
  body:has([data-lf-drawer="always"]) [data-lf-topbar] { margin-left: -16rem; padding-left: 16rem; }
  body:has([data-lf-drawer="always"]) main#main-content { max-width: 60rem !important; padding-left: 32px; padding-right: 32px; }
  body:has([data-lf-drawer="always"]) .lf-foot { margin-left: -16rem; padding-left: 16rem !important; }

  /* the narrow single-card owner pages (sign-ups, ad pixels, security) get a wider, still centred column */
  main#main-content.min-h-screen > .max-w-lg { max-width: 44rem; }
}
